diff --git a/bun.lock b/bun.lock index 23cbf36..6e10869 100644 --- a/bun.lock +++ b/bun.lock @@ -17,7 +17,7 @@ "@graphile/pg-aggregates": "^0.2.0-rc.1", "@graphile/simplify-inflection": "^8.0.0-rc.2", "@graphql-yoga/plugin-disable-introspection": "^2.19.0", - "@omnidotdev/providers": "github:omnidotdev/providers#49f2fc4", + "@omnidotdev/providers": "github:omnidotdev/providers#1c99594", "@omnidotdev/search": "github:omnidotdev/search", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.68.0", @@ -347,7 +347,7 @@ "@npmcli/redact": ["@npmcli/redact@4.0.0", "", {}, "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q=="], - "@omnidotdev/providers": ["@omnidotdev/providers@github:omnidotdev/providers#49f2fc4", { "dependencies": { "ajv": "^8.18.0", "jose": "^6.1.3" }, "peerDependencies": { "@aws-sdk/client-s3": ">=3.0.0", "@aws-sdk/s3-request-presigner": ">=3.0.0", "@envelop/types": ">=5.0.0", "@escape.tech/graphql-armor": ">=3.0.0", "@iggy.rs/sdk": ">=1.0.0", "@openfeature/server-sdk": ">=1.0.0", "@tanstack/query-core": ">=5.0.0", "ajv": ">=8.0.0", "graphile-export": ">=1.0.0-rc.0", "postgraphile": ">=5.0.0-rc.0", "react": ">=19.0.0", "unleash-client": ">=6.0.0" }, "optionalPeers": ["@aws-sdk/client-s3", "@aws-sdk/s3-request-presigner", "@envelop/types", "@escape.tech/graphql-armor", "@iggy.rs/sdk", "@openfeature/server-sdk", "@tanstack/query-core", "ajv", "graphile-export", "postgraphile", "react", "unleash-client"] }, "omnidotdev-providers-49f2fc4", "sha512-XyTp7f+ZgZSh8mkMMl/x/Y2Oo1y/O984HAXCmPFH21Orrzmi6Ak2E45RduwHp6aeuGSg1cMELoOna3Tdj0QXrg=="], + "@omnidotdev/providers": ["@omnidotdev/providers@github:omnidotdev/providers#1c99594", { "dependencies": { "ajv": "^8.18.0", "jose": "^6.1.3" }, "peerDependencies": { "@aws-sdk/client-s3": ">=3.0.0", "@aws-sdk/s3-request-presigner": ">=3.0.0", "@envelop/types": ">=5.0.0", "@escape.tech/graphql-armor": ">=3.0.0", "@iggy.rs/sdk": ">=1.0.0", "@openfeature/server-sdk": ">=1.0.0", "@tanstack/query-core": ">=5.0.0", "ajv": ">=8.0.0", "graphile-export": ">=1.0.0-rc.0", "postgraphile": ">=5.0.0-rc.0", "react": ">=19.0.0", "unleash-client": ">=6.0.0" }, "optionalPeers": ["@aws-sdk/client-s3", "@aws-sdk/s3-request-presigner", "@envelop/types", "@escape.tech/graphql-armor", "@iggy.rs/sdk", "@openfeature/server-sdk", "@tanstack/query-core", "ajv", "graphile-export", "postgraphile", "react", "unleash-client"] }, "omnidotdev-providers-1c99594", "sha512-lk0LMZp7rcnLRgpsBotgMT22I6x4ugUyYcUNvFzjRb6r+06CLgd6jYeBkuclX+rWYxyCKp1cM/4BOx6ujYitQQ=="], "@omnidotdev/search": ["@omnidotdev/search@github:omnidotdev/search#02bb5c1", { "dependencies": { "meilisearch": "^0.48.0" } }, "omnidotdev-search-02bb5c1", "sha512-1jp7JTCsDy8Ac0qG2kLVK6J/2HDraJhsNVObkBsS/Lobt222cU15uao93PSNpgzOZ014kmI5Gfu/GpcQq8vjuw=="], diff --git a/package.json b/package.json index a50f10f..d521cee 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@graphile/pg-aggregates": "^0.2.0-rc.1", "@graphile/simplify-inflection": "^8.0.0-rc.2", "@graphql-yoga/plugin-disable-introspection": "^2.19.0", - "@omnidotdev/providers": "github:omnidotdev/providers#49f2fc4", + "@omnidotdev/providers": "github:omnidotdev/providers#1c99594", "@omnidotdev/search": "github:omnidotdev/search", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.68.0", diff --git a/src/generated/graphql/schema.executable.ts b/src/generated/graphql/schema.executable.ts index d52d677..34107ee 100644 --- a/src/generated/graphql/schema.executable.ts +++ b/src/generated/graphql/schema.executable.ts @@ -122,7 +122,7 @@ const spec_postTag = { } }, extensions: { - oid: "739621", + oid: "748018", isTableLike: true, pg: { serviceName: "main", @@ -200,7 +200,7 @@ const spec_postStatusChange = { } }, extensions: { - oid: "745938", + oid: "748106", isTableLike: true, pg: { serviceName: "main", @@ -283,7 +283,7 @@ const spec_reaction = { } }, extensions: { - oid: "743996", + oid: "748068", isTableLike: true, pg: { serviceName: "main", @@ -364,7 +364,7 @@ const spec_tag = { } }, extensions: { - oid: "739634", + oid: "748031", isTableLike: true, pg: { serviceName: "main", @@ -437,7 +437,7 @@ const notificationPreferenceCodec = recordCodec({ } }, extensions: { - oid: "746611", + oid: "748134", isTableLike: true, pg: { serviceName: "main", @@ -530,7 +530,7 @@ const spec_comment = { } }, extensions: { - oid: "270503", + oid: "747527", isTableLike: true, pg: { serviceName: "main", @@ -630,7 +630,7 @@ const spec_user = { } }, extensions: { - oid: "270635", + oid: "747659", isTableLike: true, pg: { serviceName: "main", @@ -738,7 +738,7 @@ const spec_projectStatusConfig = { } }, extensions: { - oid: "270599", + oid: "747623", isTableLike: true, pg: { serviceName: "main", @@ -830,7 +830,7 @@ const spec_projectLink = { } }, extensions: { - oid: "300307", + oid: "747840", isTableLike: true, pg: { serviceName: "main", @@ -841,10 +841,24 @@ const spec_projectLink = { executor: executor }; const projectLinkCodec = recordCodec(spec_projectLink); -const statusTemplateIdentifier = sql.identifier("public", "status_template"); -const spec_statusTemplate = { - name: "statusTemplate", - identifier: statusTemplateIdentifier, +const voteIdentifier = sql.identifier("public", "vote"); +const voteTypeCodec = enumCodec({ + name: "voteType", + identifier: sql.identifier("public", "vote_type"), + values: ["up", "down"], + description: undefined, + extensions: { + oid: "747510", + pg: { + serviceName: "main", + schemaName: "public", + name: "vote_type" + } + } +}); +const spec_vote = { + name: "vote", + identifier: voteIdentifier, attributes: { __proto__: null, id: { @@ -858,7 +872,7 @@ const spec_statusTemplate = { canUpdate: true } }, - organization_id: { + post_id: { codec: TYPES.uuid, notNull: true, extensions: { @@ -868,8 +882,8 @@ const spec_statusTemplate = { canUpdate: true } }, - name: { - codec: TYPES.text, + user_id: { + codec: TYPES.uuid, notNull: true, extensions: { __proto__: null, @@ -878,8 +892,8 @@ const spec_statusTemplate = { canUpdate: true } }, - display_name: { - codec: TYPES.text, + vote_type: { + codec: voteTypeCodec, notNull: true, extensions: { __proto__: null, @@ -888,34 +902,6 @@ const spec_statusTemplate = { canUpdate: true } }, - color: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - description: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - sort_order: { - codec: TYPES.int, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, created_at: { codec: TYPES.timestamptz, notNull: true, @@ -938,8 +924,10 @@ const spec_statusTemplate = { canUpdate: true } }, - show_on_roadmap: { - codec: TYPES.boolean, + weight: { + codec: TYPES.int, + notNull: true, + hasDefault: true, extensions: { __proto__: null, canSelect: true, @@ -949,21 +937,21 @@ const spec_statusTemplate = { } }, extensions: { - oid: "270616", + oid: "747680", isTableLike: true, pg: { serviceName: "main", schemaName: "public", - name: "status_template" + name: "vote" } }, executor: executor }; -const statusTemplateCodec = recordCodec(spec_statusTemplate); -const signalClusterIdentifier = sql.identifier("public", "signal_cluster"); -const spec_signalCluster = { - name: "signalCluster", - identifier: signalClusterIdentifier, +const voteCodec = recordCodec(spec_vote); +const statusTemplateIdentifier = sql.identifier("public", "status_template"); +const spec_statusTemplate = { + name: "statusTemplate", + identifier: statusTemplateIdentifier, attributes: { __proto__: null, id: { @@ -977,7 +965,7 @@ const spec_signalCluster = { canUpdate: true } }, - project_id: { + organization_id: { codec: TYPES.uuid, notNull: true, extensions: { @@ -987,28 +975,9 @@ const spec_signalCluster = { canUpdate: true } }, - label: { - codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - summary: { + name: { codec: TYPES.text, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - member_count: { - codec: TYPES.int, notNull: true, - hasDefault: true, extensions: { __proto__: null, canSelect: true, @@ -1016,65 +985,9 @@ const spec_signalCluster = { canUpdate: true } }, - created_at: { - codec: TYPES.timestamptz, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - }, - updated_at: { - codec: TYPES.timestamptz, - notNull: true, - hasDefault: true, - extensions: { - __proto__: null, - canSelect: true, - canInsert: true, - canUpdate: true - } - } - }, - extensions: { - oid: "731880", - isTableLike: true, - pg: { - serviceName: "main", - schemaName: "public", - name: "signal_cluster" - } - }, - executor: executor -}; -const signalClusterCodec = recordCodec(spec_signalCluster); -const voteIdentifier = sql.identifier("public", "vote"); -const voteTypeCodec = enumCodec({ - name: "voteType", - identifier: sql.identifier("public", "vote_type"), - values: ["up", "down"], - description: undefined, - extensions: { - oid: "270486", - pg: { - serviceName: "main", - schemaName: "public", - name: "vote_type" - } - } -}); -const spec_vote = { - name: "vote", - identifier: voteIdentifier, - attributes: { - __proto__: null, - id: { - codec: TYPES.uuid, + display_name: { + codec: TYPES.text, notNull: true, - hasDefault: true, extensions: { __proto__: null, canSelect: true, @@ -1082,9 +995,8 @@ const spec_vote = { canUpdate: true } }, - post_id: { - codec: TYPES.uuid, - notNull: true, + color: { + codec: TYPES.text, extensions: { __proto__: null, canSelect: true, @@ -1092,9 +1004,8 @@ const spec_vote = { canUpdate: true } }, - user_id: { - codec: TYPES.uuid, - notNull: true, + description: { + codec: TYPES.text, extensions: { __proto__: null, canSelect: true, @@ -1102,9 +1013,9 @@ const spec_vote = { canUpdate: true } }, - vote_type: { - codec: voteTypeCodec, - notNull: true, + sort_order: { + codec: TYPES.int, + hasDefault: true, extensions: { __proto__: null, canSelect: true, @@ -1134,10 +1045,8 @@ const spec_vote = { canUpdate: true } }, - weight: { - codec: TYPES.int, - notNull: true, - hasDefault: true, + show_on_roadmap: { + codec: TYPES.boolean, extensions: { __proto__: null, canSelect: true, @@ -1147,17 +1056,17 @@ const spec_vote = { } }, extensions: { - oid: "270656", + oid: "747640", isTableLike: true, pg: { serviceName: "main", schemaName: "public", - name: "vote" + name: "status_template" } }, executor: executor }; -const voteCodec = recordCodec(spec_vote); +const statusTemplateCodec = recordCodec(spec_statusTemplate); const attachmentIdentifier = sql.identifier("public", "attachment"); const spec_attachment = { name: "attachment", @@ -1275,7 +1184,7 @@ const spec_attachment = { } }, extensions: { - oid: "708031", + oid: "747935", isTableLike: true, pg: { serviceName: "main", @@ -1378,7 +1287,7 @@ const spec_wardenSyncQueue = { } }, extensions: { - oid: "706846", + oid: "747874", isTableLike: true, pg: { serviceName: "main", @@ -1389,6 +1298,118 @@ const spec_wardenSyncQueue = { executor: executor }; const wardenSyncQueueCodec = recordCodec(spec_wardenSyncQueue); +const signalClusterIdentifier = sql.identifier("public", "signal_cluster"); +const spec_signalCluster_attributes_centroid_codec_vector = { + name: "vector", + sqlType: sql`vector`, + toPg(str) { + return str; + }, + fromPg(str) { + return str; + }, + executor: null, + attributes: void 0 +}; +const spec_signalCluster = { + name: "signalCluster", + identifier: signalClusterIdentifier, + attributes: { + __proto__: null, + id: { + codec: TYPES.uuid, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + project_id: { + codec: TYPES.uuid, + notNull: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + label: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + summary: { + codec: TYPES.text, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + centroid: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + member_count: { + codec: TYPES.int, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + created_at: { + codec: TYPES.timestamptz, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, + updated_at: { + codec: TYPES.timestamptz, + notNull: true, + hasDefault: true, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + } + }, + extensions: { + oid: "747965", + isTableLike: true, + pg: { + serviceName: "main", + schemaName: "public", + name: "signal_cluster" + } + }, + executor: executor +}; +const signalClusterCodec = recordCodec(spec_signalCluster); const signalIdentifier = sql.identifier("public", "signal"); const spec_signal = { name: "signal", @@ -1532,6 +1553,15 @@ const spec_signal = { canUpdate: true } }, + embedding: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, cluster_id: { codec: TYPES.uuid, extensions: { @@ -1543,7 +1573,7 @@ const spec_signal = { } }, extensions: { - oid: "706866", + oid: "747894", isTableLike: true, pg: { serviceName: "main", @@ -1657,7 +1687,6 @@ const spec_post = { }, number: { codec: TYPES.int, - notNull: true, extensions: { tags: { behavior: "-attribute:insert -attribute:update" @@ -1695,6 +1724,15 @@ const spec_post = { canUpdate: true } }, + embedding: { + codec: spec_signalCluster_attributes_centroid_codec_vector, + extensions: { + __proto__: null, + canSelect: true, + canInsert: true, + canUpdate: true + } + }, duplicate_of_id: { codec: TYPES.uuid, extensions: { @@ -1724,7 +1762,7 @@ const spec_post = { } }, extensions: { - oid: "270549", + oid: "747573", isTableLike: true, pg: { serviceName: "main", @@ -1890,7 +1928,7 @@ const spec_project = { } }, extensions: { - oid: "270566", + oid: "747590", isTableLike: true, pg: { serviceName: "main", @@ -2176,11 +2214,11 @@ const project_link_resourceOptionsConfig = { }, uniques: project_linkUniques }; -const status_templateUniques = [{ +const voteUniques = [{ attributes: ["id"], isPrimary: true }, { - attributes: ["organization_id", "name"], + attributes: ["post_id", "user_id"], extensions: { tags: { __proto__: null, @@ -2188,53 +2226,30 @@ const status_templateUniques = [{ } } }]; -const status_template_resourceOptionsConfig = { - executor: executor, - name: "status_template", - identifier: "main.public.status_template", - from: statusTemplateIdentifier, - codec: statusTemplateCodec, - extensions: { - pg: { - serviceName: "main", - schemaName: "public", - name: "status_template" - }, - canSelect: true, - canInsert: true, - canUpdate: true, - canDelete: true - }, - uniques: status_templateUniques -}; -const signal_clusterUniques = [{ - attributes: ["id"], - isPrimary: true -}]; -const signal_cluster_resourceOptionsConfig = { +const vote_resourceOptionsConfig = { executor: executor, - name: "signal_cluster", - identifier: "main.public.signal_cluster", - from: signalClusterIdentifier, - codec: signalClusterCodec, + name: "vote", + identifier: "main.public.vote", + from: voteIdentifier, + codec: voteCodec, extensions: { pg: { serviceName: "main", schemaName: "public", - name: "signal_cluster" + name: "vote" }, canSelect: true, canInsert: true, canUpdate: true, canDelete: true }, - uniques: signal_clusterUniques + uniques: voteUniques }; -const voteUniques = [{ +const status_templateUniques = [{ attributes: ["id"], isPrimary: true }, { - attributes: ["post_id", "user_id"], + attributes: ["organization_id", "name"], extensions: { tags: { __proto__: null, @@ -2242,24 +2257,24 @@ const voteUniques = [{ } } }]; -const vote_resourceOptionsConfig = { +const status_template_resourceOptionsConfig = { executor: executor, - name: "vote", - identifier: "main.public.vote", - from: voteIdentifier, - codec: voteCodec, + name: "status_template", + identifier: "main.public.status_template", + from: statusTemplateIdentifier, + codec: statusTemplateCodec, extensions: { pg: { serviceName: "main", schemaName: "public", - name: "vote" + name: "status_template" }, canSelect: true, canInsert: true, canUpdate: true, canDelete: true }, - uniques: voteUniques + uniques: status_templateUniques }; const attachmentUniques = [{ attributes: ["id"], @@ -2288,6 +2303,29 @@ const warden_sync_queueUniques = [{ attributes: ["id"], isPrimary: true }]; +const signal_clusterUniques = [{ + attributes: ["id"], + isPrimary: true +}]; +const signal_cluster_resourceOptionsConfig = { + executor: executor, + name: "signal_cluster", + identifier: "main.public.signal_cluster", + from: signalClusterIdentifier, + codec: signalClusterCodec, + extensions: { + pg: { + serviceName: "main", + schemaName: "public", + name: "signal_cluster" + }, + canSelect: true, + canInsert: true, + canUpdate: true, + canDelete: true + }, + uniques: signal_clusterUniques +}; const signalUniques = [{ attributes: ["id"], isPrimary: true @@ -2405,13 +2443,14 @@ const registryConfig = { projectStatusConfig: projectStatusConfigCodec, int4: TYPES.int, projectLink: projectLinkCodec, - statusTemplate: statusTemplateCodec, - signalCluster: signalClusterCodec, vote: voteCodec, voteType: voteTypeCodec, + statusTemplate: statusTemplateCodec, attachment: attachmentCodec, wardenSyncQueue: wardenSyncQueueCodec, jsonb: TYPES.jsonb, + signalCluster: signalClusterCodec, + vector: spec_signalCluster_attributes_centroid_codec_vector, signal: signalCodec, post: postCodec, project: projectCodec, @@ -2428,9 +2467,8 @@ const registryConfig = { user: user_resourceOptionsConfig, project_status_config: project_status_config_resourceOptionsConfig, project_link: project_link_resourceOptionsConfig, - status_template: status_template_resourceOptionsConfig, - signal_cluster: signal_cluster_resourceOptionsConfig, vote: vote_resourceOptionsConfig, + status_template: status_template_resourceOptionsConfig, attachment: attachment_resourceOptionsConfig, warden_sync_queue: { executor: executor, @@ -2451,6 +2489,7 @@ const registryConfig = { }, uniques: warden_sync_queueUniques }, + signal_cluster: signal_cluster_resourceOptionsConfig, signal: signal_resourceOptionsConfig, project: project_resourceOptionsConfig, post: post_resourceOptionsConfig @@ -4321,6 +4360,13 @@ function ProjectLinkInput_titleApply(obj, val, info) { function ProjectLinkInput_orderApply(obj, val, info) { obj.set("order", bakedInputRuntime(info.schema, info.field.type, val)); } +const CreateVotePayload_voteEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_votePgResource, voteUniques[0].attributes, $mutation, fieldArgs); +function VoteInput_voteTypeApply(obj, val, info) { + obj.set("vote_type", bakedInputRuntime(info.schema, info.field.type, val)); +} +function VoteInput_weightApply(obj, val, info) { + obj.set("weight", bakedInputRuntime(info.schema, info.field.type, val)); +} const CreateStatusTemplatePayload_statusTemplateEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_status_templatePgResource, status_templateUniques[0].attributes, $mutation, fieldArgs); function StatusTemplateInput_organizationIdApply(obj, val, info) { obj.set("organization_id", bakedInputRuntime(info.schema, info.field.type, val)); @@ -4334,23 +4380,6 @@ function StatusTemplateInput_descriptionApply(obj, val, info) { function StatusTemplateInput_showOnRoadmapApply(obj, val, info) { obj.set("show_on_roadmap", bakedInputRuntime(info.schema, info.field.type, val)); } -const CreateSignalClusterPayload_signalClusterEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_signal_clusterPgResource, signal_clusterUniques[0].attributes, $mutation, fieldArgs); -function SignalClusterInput_labelApply(obj, val, info) { - obj.set("label", bakedInputRuntime(info.schema, info.field.type, val)); -} -function SignalClusterInput_summaryApply(obj, val, info) { - obj.set("summary", bakedInputRuntime(info.schema, info.field.type, val)); -} -function SignalClusterInput_memberCountApply(obj, val, info) { - obj.set("member_count", bakedInputRuntime(info.schema, info.field.type, val)); -} -const CreateVotePayload_voteEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_votePgResource, voteUniques[0].attributes, $mutation, fieldArgs); -function VoteInput_voteTypeApply(obj, val, info) { - obj.set("vote_type", bakedInputRuntime(info.schema, info.field.type, val)); -} -function VoteInput_weightApply(obj, val, info) { - obj.set("weight", bakedInputRuntime(info.schema, info.field.type, val)); -} const CreateAttachmentPayload_attachmentEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_attachmentPgResource, attachmentUniques[0].attributes, $mutation, fieldArgs); function AttachmentInput_storageKeyApply(obj, val, info) { obj.set("storage_key", bakedInputRuntime(info.schema, info.field.type, val)); @@ -4389,6 +4418,16 @@ function WardenSyncQueueInput_lastErrorApply(obj, val, info) { function WardenSyncQueueInput_nextRetryAtApply(obj, val, info) { obj.set("next_retry_at", bakedInputRuntime(info.schema, info.field.type, val)); } +const CreateSignalClusterPayload_signalClusterEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_signal_clusterPgResource, signal_clusterUniques[0].attributes, $mutation, fieldArgs); +function SignalClusterInput_labelApply(obj, val, info) { + obj.set("label", bakedInputRuntime(info.schema, info.field.type, val)); +} +function SignalClusterInput_summaryApply(obj, val, info) { + obj.set("summary", bakedInputRuntime(info.schema, info.field.type, val)); +} +function SignalClusterInput_memberCountApply(obj, val, info) { + obj.set("member_count", bakedInputRuntime(info.schema, info.field.type, val)); +} const CreateProjectPayload_projectEdgePlan = ($mutation, fieldArgs) => pgMutationPayloadEdge(otherSource_projectPgResource, projectUniques[0].attributes, $mutation, fieldArgs); function ProjectInput_imageApply(obj, val, info) { obj.set("image", bakedInputRuntime(info.schema, info.field.type, val)); @@ -4875,23 +4914,74 @@ const planWrapper10 = (plan, _, fieldArgs) => { projectId, organizationId: project.organizationId }, - organizationId: project.organizationId, - subject: linkId + organizationId: project.organizationId, + subject: linkId + }); + } catch (error) { + console.error("[Events] Failed to emit projectLink.created:", error); + } + }); + return $result; +}; +function oldPlan11(_, args) { + const $insert = pgInsertSingle(otherSource_votePgResource); + args.apply($insert); + return object({ + result: $insert + }); +} +const planWrapper11 = (plan, _, fieldArgs) => { + const $result = plan(), + $input = fieldArgs.getRaw(["input", "vote"]), + $db = context().get("db"); + sideEffect([$result, $input, $db], async ([result, input, db]) => { + if (!result) return; + const { + postId + } = input, + voteId = result?.id; + if (!voteId) return; + const post = await db.query.posts.findFirst({ + where(table, { + eq + }) { + return eq(table.id, postId); + }, + with: { + project: { + columns: { + organizationId: !0 + } + } + } + }); + if (!post?.project) return; + try { + await events.emit({ + type: "backfeed.vote.created", + data: { + voteId, + postId, + projectId: post.projectId, + organizationId: post.project.organizationId + }, + organizationId: post.project.organizationId, + subject: voteId }); } catch (error) { - console.error("[Events] Failed to emit projectLink.created:", error); + console.error("[Events] Failed to emit vote.created:", error); } }); return $result; }; -function oldPlan12(_, args) { +function oldPlan13(_, args) { const $insert = pgInsertSingle(otherSource_status_templatePgResource); args.apply($insert); return object({ result: $insert }); } -const planWrapper11 = (plan, _, fieldArgs) => { +const planWrapper12 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "statusTemplate"]), $observer = context().get("observer"), $db = context().get("db"); @@ -4903,25 +4993,25 @@ const planWrapper11 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan11(...planParams) { +function oldPlan12(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan12.apply(this, args); + $prev = oldPlan13.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createStatusTemplate, but that function did not return a step! -${String(oldPlan12)}`); +${String(oldPlan13)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper11(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper12(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper12 = (plan, _, fieldArgs) => { +const planWrapper13 = (plan, _, fieldArgs) => { const $result = plan(), $input = fieldArgs.getRaw(["input", "statusTemplate"]); sideEffect([$result, $input], async ([result, input]) => { @@ -4947,57 +5037,6 @@ const planWrapper12 = (plan, _, fieldArgs) => { }); return $result; }; -function oldPlan13(_, args) { - const $insert = pgInsertSingle(otherSource_votePgResource); - args.apply($insert); - return object({ - result: $insert - }); -} -const planWrapper13 = (plan, _, fieldArgs) => { - const $result = plan(), - $input = fieldArgs.getRaw(["input", "vote"]), - $db = context().get("db"); - sideEffect([$result, $input, $db], async ([result, input, db]) => { - if (!result) return; - const { - postId - } = input, - voteId = result?.id; - if (!voteId) return; - const post = await db.query.posts.findFirst({ - where(table, { - eq - }) { - return eq(table.id, postId); - }, - with: { - project: { - columns: { - organizationId: !0 - } - } - } - }); - if (!post?.project) return; - try { - await events.emit({ - type: "backfeed.vote.created", - data: { - voteId, - postId, - projectId: post.projectId, - organizationId: post.project.organizationId - }, - organizationId: post.project.organizationId, - subject: voteId - }); - } catch (error) { - console.error("[Events] Failed to emit vote.created:", error); - } - }); - return $result; -}; function oldPlan14(_, args) { const $insert = pgInsertSingle(otherSource_attachmentPgResource); args.apply($insert); @@ -5817,7 +5856,7 @@ const planWrapper32 = (plan, _, fieldArgs) => { return $result; }; const oldPlan34 = (_$root, args) => { - const $update = pgUpdateSingle(otherSource_status_templatePgResource, { + const $update = pgUpdateSingle(otherSource_votePgResource, { id: args.getRaw(['input', "rowId"]) }); args.apply($update); @@ -5831,19 +5870,14 @@ const planWrapper33 = (plan, _, fieldArgs) => { $db = context().get("db"); sideEffect([$input, $observer, $db], async ([input, observer, db]) => { if (!observer) throw Error("Unauthorized"); - let organizationId; - { - const statusTemplate = await db.query.statusTemplates.findFirst({ - where(table, { - eq - }) { - return eq(table.id, input); - } - }); - if (!statusTemplate) throw Error("Status template not found"); - organizationId = statusTemplate.organizationId; - } - if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); + const vote = await db.query.votes.findFirst({ + where(table, { + eq + }) { + return eq(table.id, input); + } + }); + if (observer.id !== vote?.userId) throw Error("Unauthorized"); }); return plan(); }; @@ -5852,7 +5886,7 @@ function oldPlan33(...planParams) { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], $prev = oldPlan34.apply(this, args); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.updateStatusTemplate, but that function did not return a step! + console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! ${String(oldPlan34)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } @@ -5867,39 +5901,49 @@ ${String(oldPlan34)}`); } const planWrapper34 = (plan, _, fieldArgs) => { const $result = plan(), - $templateId = fieldArgs.getRaw(["input", "rowId"]), + $voteId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); - sideEffect([$result, $templateId, $db], async ([result, templateId, db]) => { + sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { if (!result) return; - const template = await db.query.statusTemplates.findFirst({ + const vote = await db.query.votes.findFirst({ where(table, { eq }) { - return eq(table.id, templateId); + return eq(table.id, voteId); }, - columns: { - organizationId: !0 + with: { + post: { + with: { + project: { + columns: { + organizationId: !0 + } + } + } + } } }); - if (!template) return; + if (!vote?.post?.project) return; try { await events.emit({ - type: "backfeed.statusTemplate.updated", + type: "backfeed.vote.updated", data: { - statusTemplateId: templateId, - organizationId: template.organizationId + voteId, + postId: vote.postId, + projectId: vote.post.projectId, + organizationId: vote.post.project.organizationId }, - organizationId: template.organizationId, - subject: templateId + organizationId: vote.post.project.organizationId, + subject: voteId }); } catch (error) { - console.error("[Events] Failed to emit statusTemplate.updated:", error); + console.error("[Events] Failed to emit vote.updated:", error); } }); return $result; }; const oldPlan36 = (_$root, args) => { - const $update = pgUpdateSingle(otherSource_votePgResource, { + const $update = pgUpdateSingle(otherSource_status_templatePgResource, { id: args.getRaw(['input', "rowId"]) }); args.apply($update); @@ -5913,14 +5957,19 @@ const planWrapper35 = (plan, _, fieldArgs) => { $db = context().get("db"); sideEffect([$input, $observer, $db], async ([input, observer, db]) => { if (!observer) throw Error("Unauthorized"); - const vote = await db.query.votes.findFirst({ - where(table, { - eq - }) { - return eq(table.id, input); - } - }); - if (observer.id !== vote?.userId) throw Error("Unauthorized"); + let organizationId; + { + const statusTemplate = await db.query.statusTemplates.findFirst({ + where(table, { + eq + }) { + return eq(table.id, input); + } + }); + if (!statusTemplate) throw Error("Status template not found"); + organizationId = statusTemplate.organizationId; + } + if (!(await checkPermission(observer.identityProviderId, "organization", organizationId, "admin"))) throw Error("Insufficient permissions"); }); return plan(); }; @@ -5929,7 +5978,7 @@ function oldPlan35(...planParams) { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], $prev = oldPlan36.apply(this, args); if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! + console.error(`Wrapped a plan function at Mutation.updateStatusTemplate, but that function did not return a step! ${String(oldPlan36)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } @@ -5944,43 +5993,33 @@ ${String(oldPlan36)}`); } const planWrapper36 = (plan, _, fieldArgs) => { const $result = plan(), - $voteId = fieldArgs.getRaw(["input", "rowId"]), + $templateId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); - sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { + sideEffect([$result, $templateId, $db], async ([result, templateId, db]) => { if (!result) return; - const vote = await db.query.votes.findFirst({ + const template = await db.query.statusTemplates.findFirst({ where(table, { eq }) { - return eq(table.id, voteId); + return eq(table.id, templateId); }, - with: { - post: { - with: { - project: { - columns: { - organizationId: !0 - } - } - } - } + columns: { + organizationId: !0 } }); - if (!vote?.post?.project) return; + if (!template) return; try { await events.emit({ - type: "backfeed.vote.updated", + type: "backfeed.statusTemplate.updated", data: { - voteId, - postId: vote.postId, - projectId: vote.post.projectId, - organizationId: vote.post.project.organizationId + statusTemplateId: templateId, + organizationId: template.organizationId }, - organizationId: vote.post.project.organizationId, - subject: voteId + organizationId: template.organizationId, + subject: templateId }); } catch (error) { - console.error("[Events] Failed to emit vote.updated:", error); + console.error("[Events] Failed to emit statusTemplate.updated:", error); } }); return $result; @@ -6671,12 +6710,82 @@ const planWrapper55 = (plan, _, fieldArgs) => { subject: linkId }); } catch (error) { - console.error("[Events] Failed to emit projectLink.deleted:", error); + console.error("[Events] Failed to emit projectLink.deleted:", error); + } + }); + return $result; +}; +const oldPlan57 = (_$root, args) => { + const $delete = pgDeleteSingle(otherSource_votePgResource, { + id: args.getRaw(['input', "rowId"]) + }); + args.apply($delete); + return object({ + result: $delete + }); +}; +function oldPlan56(...planParams) { + const smartPlan = (...overrideParams) => { + const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], + $prev = oldPlan57.apply(this, args); + if (!($prev instanceof ExecutableStep)) { + console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! +${String(oldPlan57)}`); + throw Error("Wrapped a plan function, but that function did not return a step!"); + } + args[1].autoApply($prev); + return $prev; + }, + [$source, fieldArgs, info] = planParams, + $newPlan = planWrapper33(smartPlan, $source, fieldArgs, info); + if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); + if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); + return $newPlan; +} +const planWrapper57 = (plan, _, fieldArgs) => { + const $result = plan(), + $voteId = fieldArgs.getRaw(["input", "rowId"]), + $db = context().get("db"); + sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { + if (!result) return; + const vote = await db.query.votes.findFirst({ + where(table, { + eq + }) { + return eq(table.id, voteId); + }, + with: { + post: { + with: { + project: { + columns: { + organizationId: !0 + } + } + } + } + } + }); + if (!vote?.post?.project) return; + try { + await events.emit({ + type: "backfeed.vote.deleted", + data: { + voteId, + postId: vote.postId, + projectId: vote.post.projectId, + organizationId: vote.post.project.organizationId + }, + organizationId: vote.post.project.organizationId, + subject: voteId + }); + } catch (error) { + console.error("[Events] Failed to emit vote.deleted:", error); } }); return $result; }; -const oldPlan57 = (_$root, args) => { +const oldPlan59 = (_$root, args) => { const $delete = pgDeleteSingle(otherSource_status_templatePgResource, { id: args.getRaw(['input', "rowId"]) }); @@ -6685,7 +6794,7 @@ const oldPlan57 = (_$root, args) => { result: $delete }); }; -const planWrapper56 = (plan, _, fieldArgs) => { +const planWrapper58 = (plan, _, fieldArgs) => { const $input = fieldArgs.getRaw(["input", "rowId"]), $observer = context().get("observer"), $db = context().get("db"); @@ -6707,25 +6816,25 @@ const planWrapper56 = (plan, _, fieldArgs) => { }); return plan(); }; -function oldPlan56(...planParams) { +function oldPlan58(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan57.apply(this, args); + $prev = oldPlan59.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteStatusTemplate, but that function did not return a step! -${String(oldPlan57)}`); +${String(oldPlan59)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper56(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper58(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; } -const planWrapper57 = (plan, _, fieldArgs) => { +const planWrapper59 = (plan, _, fieldArgs) => { const $result = plan(), $templateId = fieldArgs.getRaw(["input", "rowId"]), $db = context().get("db"); @@ -6758,76 +6867,6 @@ const planWrapper57 = (plan, _, fieldArgs) => { }); return $result; }; -const oldPlan59 = (_$root, args) => { - const $delete = pgDeleteSingle(otherSource_votePgResource, { - id: args.getRaw(['input', "rowId"]) - }); - args.apply($delete); - return object({ - result: $delete - }); -}; -function oldPlan58(...planParams) { - const smartPlan = (...overrideParams) => { - const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan59.apply(this, args); - if (!($prev instanceof ExecutableStep)) { - console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! -${String(oldPlan59)}`); - throw Error("Wrapped a plan function, but that function did not return a step!"); - } - args[1].autoApply($prev); - return $prev; - }, - [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper35(smartPlan, $source, fieldArgs, info); - if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); - if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); - return $newPlan; -} -const planWrapper59 = (plan, _, fieldArgs) => { - const $result = plan(), - $voteId = fieldArgs.getRaw(["input", "rowId"]), - $db = context().get("db"); - sideEffect([$result, $voteId, $db], async ([result, voteId, db]) => { - if (!result) return; - const vote = await db.query.votes.findFirst({ - where(table, { - eq - }) { - return eq(table.id, voteId); - }, - with: { - post: { - with: { - project: { - columns: { - organizationId: !0 - } - } - } - } - } - }); - if (!vote?.post?.project) return; - try { - await events.emit({ - type: "backfeed.vote.deleted", - data: { - voteId, - postId: vote.postId, - projectId: vote.post.projectId, - organizationId: vote.post.project.organizationId - }, - organizationId: vote.post.project.organizationId, - subject: voteId - }); - } catch (error) { - console.error("[Events] Failed to emit vote.deleted:", error); - } - }); - return $result; -}; const oldPlan60 = (_$root, args) => { const $delete = pgDeleteSingle(otherSource_attachmentPgResource, { id: args.getRaw(['input', "rowId"]) @@ -7176,7 +7215,7 @@ type Post { statusUpdatedAt: Datetime! createdAt: Datetime! updatedAt: Datetime! - number: Int! + number: Int source: String sentiment: String aiTags: JSON @@ -16633,145 +16672,99 @@ input ProjectLinkInput { updatedAt: Datetime } -"""The output of our create \`StatusTemplate\` mutation.""" -type CreateStatusTemplatePayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`StatusTemplate\` that was created by this mutation.""" - statusTemplate: StatusTemplate - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge -} - -"""All input for the create \`StatusTemplate\` mutation.""" -input CreateStatusTemplateInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The \`StatusTemplate\` to be created by this mutation.""" - statusTemplate: StatusTemplateInput! -} - -"""An input for mutations affecting \`StatusTemplate\`""" -input StatusTemplateInput { - rowId: UUID - organizationId: UUID! - name: String! - displayName: String! - color: String - description: String - sortOrder: Int - createdAt: Datetime - updatedAt: Datetime - showOnRoadmap: Boolean -} - -"""The output of our create \`SignalCluster\` mutation.""" -type CreateSignalClusterPayload { +"""The output of our create \`Vote\` mutation.""" +type CreateVotePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`SignalCluster\` that was created by this mutation.""" - signalCluster: SignalCluster + """The \`Vote\` that was created by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the create \`SignalCluster\` mutation.""" -input CreateSignalClusterInput { +"""All input for the create \`Vote\` mutation.""" +input CreateVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The \`SignalCluster\` to be created by this mutation.""" - signalCluster: SignalClusterInput! + """The \`Vote\` to be created by this mutation.""" + vote: VoteInput! } -"""An input for mutations affecting \`SignalCluster\`""" -input SignalClusterInput { +"""An input for mutations affecting \`Vote\`""" +input VoteInput { rowId: UUID - projectId: UUID! - label: String - summary: String - memberCount: Int + postId: UUID! + userId: UUID! + voteType: VoteType! createdAt: Datetime updatedAt: Datetime + weight: Int } -"""The output of our create \`Vote\` mutation.""" -type CreateVotePayload { +"""The output of our create \`StatusTemplate\` mutation.""" +type CreateStatusTemplatePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`Vote\` that was created by this mutation.""" - vote: Vote + """The \`StatusTemplate\` that was created by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the create \`Vote\` mutation.""" -input CreateVoteInput { +"""All input for the create \`StatusTemplate\` mutation.""" +input CreateStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The \`Vote\` to be created by this mutation.""" - vote: VoteInput! + """The \`StatusTemplate\` to be created by this mutation.""" + statusTemplate: StatusTemplateInput! } -"""An input for mutations affecting \`Vote\`""" -input VoteInput { +"""An input for mutations affecting \`StatusTemplate\`""" +input StatusTemplateInput { rowId: UUID - postId: UUID! - userId: UUID! - voteType: VoteType! + organizationId: UUID! + name: String! + displayName: String! + color: String + description: String + sortOrder: Int createdAt: Datetime updatedAt: Datetime - weight: Int + showOnRoadmap: Boolean } """The output of our create \`Attachment\` mutation.""" @@ -16871,6 +16864,52 @@ input WardenSyncQueueInput { createdAt: Datetime } +"""The output of our create \`SignalCluster\` mutation.""" +type CreateSignalClusterPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`SignalCluster\` that was created by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the create \`SignalCluster\` mutation.""" +input CreateSignalClusterInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The \`SignalCluster\` to be created by this mutation.""" + signalCluster: SignalClusterInput! +} + +"""An input for mutations affecting \`SignalCluster\`""" +input SignalClusterInput { + rowId: UUID + projectId: UUID! + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create \`Project\` mutation.""" type CreateProjectPayload { """ @@ -17328,31 +17367,31 @@ input ProjectLinkPatch { updatedAt: Datetime } -"""The output of our update \`StatusTemplate\` mutation.""" -type UpdateStatusTemplatePayload { +"""The output of our update \`Vote\` mutation.""" +type UpdateVotePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`StatusTemplate\` that was updated by this mutation.""" - statusTemplate: StatusTemplate + """The \`Vote\` that was updated by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the \`updateStatusTemplate\` mutation.""" -input UpdateStatusTemplateInput { +"""All input for the \`updateVote\` mutation.""" +input UpdateVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -17361,52 +17400,47 @@ input UpdateStatusTemplateInput { rowId: UUID! """ - An object where the defined keys will be set on the \`StatusTemplate\` being updated. + An object where the defined keys will be set on the \`Vote\` being updated. """ - patch: StatusTemplatePatch! + patch: VotePatch! } -""" -Represents an update to a \`StatusTemplate\`. Fields that are set will be updated. -""" -input StatusTemplatePatch { +"""Represents an update to a \`Vote\`. Fields that are set will be updated.""" +input VotePatch { rowId: UUID - organizationId: UUID - name: String - displayName: String - color: String - description: String - sortOrder: Int + postId: UUID + userId: UUID + voteType: VoteType createdAt: Datetime updatedAt: Datetime - showOnRoadmap: Boolean + weight: Int } -"""The output of our update \`SignalCluster\` mutation.""" -type UpdateSignalClusterPayload { +"""The output of our update \`StatusTemplate\` mutation.""" +type UpdateStatusTemplatePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`SignalCluster\` that was updated by this mutation.""" - signalCluster: SignalCluster + """The \`StatusTemplate\` that was updated by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the \`updateSignalCluster\` mutation.""" -input UpdateSignalClusterInput { +"""All input for the \`updateStatusTemplate\` mutation.""" +input UpdateStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -17415,71 +17449,25 @@ input UpdateSignalClusterInput { rowId: UUID! """ - An object where the defined keys will be set on the \`SignalCluster\` being updated. + An object where the defined keys will be set on the \`StatusTemplate\` being updated. """ - patch: SignalClusterPatch! + patch: StatusTemplatePatch! } """ -Represents an update to a \`SignalCluster\`. Fields that are set will be updated. +Represents an update to a \`StatusTemplate\`. Fields that are set will be updated. """ -input SignalClusterPatch { - rowId: UUID - projectId: UUID - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update \`Vote\` mutation.""" -type UpdateVotePayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`Vote\` that was updated by this mutation.""" - vote: Vote - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge -} - -"""All input for the \`updateVote\` mutation.""" -input UpdateVoteInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! - - """ - An object where the defined keys will be set on the \`Vote\` being updated. - """ - patch: VotePatch! -} - -"""Represents an update to a \`Vote\`. Fields that are set will be updated.""" -input VotePatch { +input StatusTemplatePatch { rowId: UUID - postId: UUID - userId: UUID - voteType: VoteType + organizationId: UUID + name: String + displayName: String + color: String + description: String + sortOrder: Int createdAt: Datetime updatedAt: Datetime - weight: Int + showOnRoadmap: Boolean } """The output of our update \`Attachment\` mutation.""" @@ -17589,6 +17577,57 @@ input WardenSyncQueuePatch { createdAt: Datetime } +"""The output of our update \`SignalCluster\` mutation.""" +type UpdateSignalClusterPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`SignalCluster\` that was updated by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the \`updateSignalCluster\` mutation.""" +input UpdateSignalClusterInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! + + """ + An object where the defined keys will be set on the \`SignalCluster\` being updated. + """ + patch: SignalClusterPatch! +} + +""" +Represents an update to a \`SignalCluster\`. Fields that are set will be updated. +""" +input SignalClusterPatch { + rowId: UUID + projectId: UUID + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update \`Project\` mutation.""" type UpdateProjectPayload { """ @@ -17934,64 +17973,31 @@ input DeleteProjectLinkInput { rowId: UUID! } -"""The output of our delete \`StatusTemplate\` mutation.""" -type DeleteStatusTemplatePayload { - """ - The exact same \`clientMutationId\` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The \`StatusTemplate\` that was deleted by this mutation.""" - statusTemplate: StatusTemplate - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge -} - -"""All input for the \`deleteStatusTemplate\` mutation.""" -input DeleteStatusTemplateInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! -} - -"""The output of our delete \`SignalCluster\` mutation.""" -type DeleteSignalClusterPayload { +"""The output of our delete \`Vote\` mutation.""" +type DeleteVotePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`SignalCluster\` that was deleted by this mutation.""" - signalCluster: SignalCluster + """The \`Vote\` that was deleted by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`SignalCluster\`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our \`Vote\`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the \`deleteSignalCluster\` mutation.""" -input DeleteSignalClusterInput { +"""All input for the \`deleteVote\` mutation.""" +input DeleteVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18000,31 +18006,31 @@ input DeleteSignalClusterInput { rowId: UUID! } -"""The output of our delete \`Vote\` mutation.""" -type DeleteVotePayload { +"""The output of our delete \`StatusTemplate\` mutation.""" +type DeleteStatusTemplatePayload { """ The exact same \`clientMutationId\` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The \`Vote\` that was deleted by this mutation.""" - vote: Vote + """The \`StatusTemplate\` that was deleted by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our \`Vote\`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our \`StatusTemplate\`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the \`deleteVote\` mutation.""" -input DeleteVoteInput { +"""All input for the \`deleteStatusTemplate\` mutation.""" +input DeleteStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18099,6 +18105,39 @@ input DeleteWardenSyncQueueInput { rowId: UUID! } +"""The output of our delete \`SignalCluster\` mutation.""" +type DeleteSignalClusterPayload { + """ + The exact same \`clientMutationId\` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The \`SignalCluster\` that was deleted by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our \`SignalCluster\`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the \`deleteSignalCluster\` mutation.""" +input DeleteSignalClusterInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! +} + """The output of our delete \`Project\` mutation.""" type DeleteProjectPayload { """ @@ -18289,27 +18328,27 @@ type Query implements Node { """Get a single \`ProjectLink\`.""" projectLink(rowId: UUID!): ProjectLink - """Get a single \`StatusTemplate\`.""" - statusTemplate(rowId: UUID!): StatusTemplate - - """Get a single \`StatusTemplate\`.""" - statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate - - """Get a single \`SignalCluster\`.""" - signalCluster(rowId: UUID!): SignalCluster - """Get a single \`Vote\`.""" vote(rowId: UUID!): Vote """Get a single \`Vote\`.""" voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote + """Get a single \`StatusTemplate\`.""" + statusTemplate(rowId: UUID!): StatusTemplate + + """Get a single \`StatusTemplate\`.""" + statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate + """Get a single \`Attachment\`.""" attachment(rowId: UUID!): Attachment """Get a single \`WardenSyncQueue\`.""" wardenSyncQueue(rowId: UUID!): WardenSyncQueue + """Get a single \`SignalCluster\`.""" + signalCluster(rowId: UUID!): SignalCluster + """Get a single \`Signal\`.""" signal(rowId: UUID!): Signal @@ -18600,8 +18639,8 @@ type Query implements Node { orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] ): ProjectLinkConnection - """Reads and enables pagination through a set of \`StatusTemplate\`.""" - statusTemplates( + """Reads and enables pagination through a set of \`Vote\`.""" + votes( """Only read the first \`n\` values of the set.""" first: Int @@ -18623,19 +18662,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: StatusTemplateCondition + condition: VoteCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: StatusTemplateFilter + filter: VoteFilter - """The method to use when ordering \`StatusTemplate\`.""" - orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] - ): StatusTemplateConnection + """The method to use when ordering \`Vote\`.""" + orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] + ): VoteConnection - """Reads and enables pagination through a set of \`SignalCluster\`.""" - signalClusters( + """Reads and enables pagination through a set of \`StatusTemplate\`.""" + statusTemplates( """Only read the first \`n\` values of the set.""" first: Int @@ -18657,19 +18696,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: SignalClusterCondition + condition: StatusTemplateCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: SignalClusterFilter + filter: StatusTemplateFilter - """The method to use when ordering \`SignalCluster\`.""" - orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] - ): SignalClusterConnection + """The method to use when ordering \`StatusTemplate\`.""" + orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] + ): StatusTemplateConnection - """Reads and enables pagination through a set of \`Vote\`.""" - votes( + """Reads and enables pagination through a set of \`Attachment\`.""" + attachments( """Only read the first \`n\` values of the set.""" first: Int @@ -18691,19 +18730,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: VoteCondition + condition: AttachmentCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: VoteFilter + filter: AttachmentFilter - """The method to use when ordering \`Vote\`.""" - orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] - ): VoteConnection + """The method to use when ordering \`Attachment\`.""" + orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] + ): AttachmentConnection - """Reads and enables pagination through a set of \`Attachment\`.""" - attachments( + """Reads and enables pagination through a set of \`WardenSyncQueue\`.""" + wardenSyncQueues( """Only read the first \`n\` values of the set.""" first: Int @@ -18725,19 +18764,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: AttachmentCondition + condition: WardenSyncQueueCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: AttachmentFilter + filter: WardenSyncQueueFilter - """The method to use when ordering \`Attachment\`.""" - orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] - ): AttachmentConnection + """The method to use when ordering \`WardenSyncQueue\`.""" + orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] + ): WardenSyncQueueConnection - """Reads and enables pagination through a set of \`WardenSyncQueue\`.""" - wardenSyncQueues( + """Reads and enables pagination through a set of \`SignalCluster\`.""" + signalClusters( """Only read the first \`n\` values of the set.""" first: Int @@ -18759,16 +18798,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: WardenSyncQueueCondition + condition: SignalClusterCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: WardenSyncQueueFilter + filter: SignalClusterFilter - """The method to use when ordering \`WardenSyncQueue\`.""" - orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] - ): WardenSyncQueueConnection + """The method to use when ordering \`SignalCluster\`.""" + orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] + ): SignalClusterConnection """Reads and enables pagination through a set of \`Signal\`.""" signals( @@ -18947,22 +18986,6 @@ type Mutation { input: CreateProjectLinkInput! ): CreateProjectLinkPayload - """Creates a single \`StatusTemplate\`.""" - createStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateStatusTemplateInput! - ): CreateStatusTemplatePayload - - """Creates a single \`SignalCluster\`.""" - createSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateSignalClusterInput! - ): CreateSignalClusterPayload - """Creates a single \`Vote\`.""" createVote( """ @@ -18971,6 +18994,14 @@ type Mutation { input: CreateVoteInput! ): CreateVotePayload + """Creates a single \`StatusTemplate\`.""" + createStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateStatusTemplateInput! + ): CreateStatusTemplatePayload + """Creates a single \`Attachment\`.""" createAttachment( """ @@ -18987,6 +19018,14 @@ type Mutation { input: CreateWardenSyncQueueInput! ): CreateWardenSyncQueuePayload + """Creates a single \`SignalCluster\`.""" + createSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSignalClusterInput! + ): CreateSignalClusterPayload + """Creates a single \`Project\`.""" createProject( """ @@ -19059,22 +19098,6 @@ type Mutation { input: UpdateProjectLinkInput! ): UpdateProjectLinkPayload - """Updates a single \`StatusTemplate\` using a unique key and a patch.""" - updateStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateStatusTemplateInput! - ): UpdateStatusTemplatePayload - - """Updates a single \`SignalCluster\` using a unique key and a patch.""" - updateSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateSignalClusterInput! - ): UpdateSignalClusterPayload - """Updates a single \`Vote\` using a unique key and a patch.""" updateVote( """ @@ -19083,6 +19106,14 @@ type Mutation { input: UpdateVoteInput! ): UpdateVotePayload + """Updates a single \`StatusTemplate\` using a unique key and a patch.""" + updateStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateStatusTemplateInput! + ): UpdateStatusTemplatePayload + """Updates a single \`Attachment\` using a unique key and a patch.""" updateAttachment( """ @@ -19099,6 +19130,14 @@ type Mutation { input: UpdateWardenSyncQueueInput! ): UpdateWardenSyncQueuePayload + """Updates a single \`SignalCluster\` using a unique key and a patch.""" + updateSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSignalClusterInput! + ): UpdateSignalClusterPayload + """Updates a single \`Project\` using a unique key and a patch.""" updateProject( """ @@ -19171,22 +19210,6 @@ type Mutation { input: DeleteProjectLinkInput! ): DeleteProjectLinkPayload - """Deletes a single \`StatusTemplate\` using a unique key.""" - deleteStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteStatusTemplateInput! - ): DeleteStatusTemplatePayload - - """Deletes a single \`SignalCluster\` using a unique key.""" - deleteSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteSignalClusterInput! - ): DeleteSignalClusterPayload - """Deletes a single \`Vote\` using a unique key.""" deleteVote( """ @@ -19195,6 +19218,14 @@ type Mutation { input: DeleteVoteInput! ): DeleteVotePayload + """Deletes a single \`StatusTemplate\` using a unique key.""" + deleteStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteStatusTemplateInput! + ): DeleteStatusTemplatePayload + """Deletes a single \`Attachment\` using a unique key.""" deleteAttachment( """ @@ -19211,6 +19242,14 @@ type Mutation { input: DeleteWardenSyncQueueInput! ): DeleteWardenSyncQueuePayload + """Deletes a single \`SignalCluster\` using a unique key.""" + deleteSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSignalClusterInput! + ): DeleteSignalClusterPayload + """Deletes a single \`Project\` using a unique key.""" deleteProject( """ @@ -20023,17 +20062,17 @@ ${String(oldPlan2)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan11.apply(this, args); + $prev = oldPlan12.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createStatusTemplate, but that function did not return a step! -${String(oldPlan11)}`); +${String(oldPlan12)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper12(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper13(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -20092,17 +20131,17 @@ ${String(oldPlan6)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan13.apply(this, args); + $prev = oldPlan11.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.createVote, but that function did not return a step! -${String(oldPlan13)}`); +${String(oldPlan11)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper13(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper11(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -20325,17 +20364,17 @@ ${String(oldPlan47)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan56.apply(this, args); + $prev = oldPlan58.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteStatusTemplate, but that function did not return a step! -${String(oldPlan56)}`); +${String(oldPlan58)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper57(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper59(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -20394,17 +20433,17 @@ ${String(oldPlan51)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan58.apply(this, args); + $prev = oldPlan56.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.deleteVote, but that function did not return a step! -${String(oldPlan58)}`); +${String(oldPlan56)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper59(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper57(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -20686,17 +20725,17 @@ ${String(oldPlan24)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan33.apply(this, args); + $prev = oldPlan35.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateStatusTemplate, but that function did not return a step! -${String(oldPlan33)}`); +${String(oldPlan35)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper34(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper36(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; @@ -20755,17 +20794,17 @@ ${String(oldPlan28)}`); plan(...planParams) { const smartPlan = (...overrideParams) => { const args = [...overrideParams.concat(planParams.slice(overrideParams.length))], - $prev = oldPlan35.apply(this, args); + $prev = oldPlan33.apply(this, args); if (!($prev instanceof ExecutableStep)) { console.error(`Wrapped a plan function at Mutation.updateVote, but that function did not return a step! -${String(oldPlan35)}`); +${String(oldPlan33)}`); throw Error("Wrapped a plan function, but that function did not return a step!"); } args[1].autoApply($prev); return $prev; }, [$source, fieldArgs, info] = planParams, - $newPlan = planWrapper36(smartPlan, $source, fieldArgs, info); + $newPlan = planWrapper34(smartPlan, $source, fieldArgs, info); if ($newPlan === void 0) throw Error("Your plan wrapper didn't return anything; it must return a step or null!"); if ($newPlan !== null && !isStep($newPlan)) throw Error(`Your plan wrapper returned something other than a step... It must return a step (or null). (Returned: ${inspect($newPlan)})`); return $newPlan; diff --git a/src/generated/graphql/schema.graphql b/src/generated/graphql/schema.graphql index 9fde39d..4b5cb3f 100644 --- a/src/generated/graphql/schema.graphql +++ b/src/generated/graphql/schema.graphql @@ -43,7 +43,7 @@ type Post { statusUpdatedAt: Datetime! createdAt: Datetime! updatedAt: Datetime! - number: Int! + number: Int source: String sentiment: String aiTags: JSON @@ -9500,145 +9500,99 @@ input ProjectLinkInput { updatedAt: Datetime } -"""The output of our create `StatusTemplate` mutation.""" -type CreateStatusTemplatePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `StatusTemplate` that was created by this mutation.""" - statusTemplate: StatusTemplate - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `StatusTemplate`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering `StatusTemplate`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge -} - -"""All input for the create `StatusTemplate` mutation.""" -input CreateStatusTemplateInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `StatusTemplate` to be created by this mutation.""" - statusTemplate: StatusTemplateInput! -} - -"""An input for mutations affecting `StatusTemplate`""" -input StatusTemplateInput { - rowId: UUID - organizationId: UUID! - name: String! - displayName: String! - color: String - description: String - sortOrder: Int - createdAt: Datetime - updatedAt: Datetime - showOnRoadmap: Boolean -} - -"""The output of our create `SignalCluster` mutation.""" -type CreateSignalClusterPayload { +"""The output of our create `Vote` mutation.""" +type CreateVotePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SignalCluster` that was created by this mutation.""" - signalCluster: SignalCluster + """The `Vote` that was created by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the create `SignalCluster` mutation.""" -input CreateSignalClusterInput { +"""All input for the create `Vote` mutation.""" +input CreateVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `SignalCluster` to be created by this mutation.""" - signalCluster: SignalClusterInput! + """The `Vote` to be created by this mutation.""" + vote: VoteInput! } -"""An input for mutations affecting `SignalCluster`""" -input SignalClusterInput { +"""An input for mutations affecting `Vote`""" +input VoteInput { rowId: UUID - projectId: UUID! - label: String - summary: String - memberCount: Int + postId: UUID! + userId: UUID! + voteType: VoteType! createdAt: Datetime updatedAt: Datetime + weight: Int } -"""The output of our create `Vote` mutation.""" -type CreateVotePayload { +"""The output of our create `StatusTemplate` mutation.""" +type CreateStatusTemplatePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Vote` that was created by this mutation.""" - vote: Vote + """The `StatusTemplate` that was created by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our `StatusTemplate`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering `StatusTemplate`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the create `Vote` mutation.""" -input CreateVoteInput { +"""All input for the create `StatusTemplate` mutation.""" +input CreateStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `Vote` to be created by this mutation.""" - vote: VoteInput! + """The `StatusTemplate` to be created by this mutation.""" + statusTemplate: StatusTemplateInput! } -"""An input for mutations affecting `Vote`""" -input VoteInput { +"""An input for mutations affecting `StatusTemplate`""" +input StatusTemplateInput { rowId: UUID - postId: UUID! - userId: UUID! - voteType: VoteType! + organizationId: UUID! + name: String! + displayName: String! + color: String + description: String + sortOrder: Int createdAt: Datetime updatedAt: Datetime - weight: Int + showOnRoadmap: Boolean } """The output of our create `Attachment` mutation.""" @@ -9738,6 +9692,52 @@ input WardenSyncQueueInput { createdAt: Datetime } +"""The output of our create `SignalCluster` mutation.""" +type CreateSignalClusterPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SignalCluster` that was created by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the create `SignalCluster` mutation.""" +input CreateSignalClusterInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `SignalCluster` to be created by this mutation.""" + signalCluster: SignalClusterInput! +} + +"""An input for mutations affecting `SignalCluster`""" +input SignalClusterInput { + rowId: UUID + projectId: UUID! + label: String + summary: String + memberCount: Int + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create `Project` mutation.""" type CreateProjectPayload { """ @@ -10195,6 +10195,55 @@ input ProjectLinkPatch { updatedAt: Datetime } +"""The output of our update `Vote` mutation.""" +type UpdateVotePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Vote` that was updated by this mutation.""" + vote: Vote + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge +} + +"""All input for the `updateVote` mutation.""" +input UpdateVoteInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! + + """ + An object where the defined keys will be set on the `Vote` being updated. + """ + patch: VotePatch! +} + +"""Represents an update to a `Vote`. Fields that are set will be updated.""" +input VotePatch { + rowId: UUID + postId: UUID + userId: UUID + voteType: VoteType + createdAt: Datetime + updatedAt: Datetime + weight: Int +} + """The output of our update `StatusTemplate` mutation.""" type UpdateStatusTemplatePayload { """ @@ -10249,31 +10298,31 @@ input StatusTemplatePatch { showOnRoadmap: Boolean } -"""The output of our update `SignalCluster` mutation.""" -type UpdateSignalClusterPayload { +"""The output of our update `Attachment` mutation.""" +type UpdateAttachmentPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SignalCluster` that was updated by this mutation.""" - signalCluster: SignalCluster + """The `Attachment` that was updated by this mutation.""" + attachment: Attachment """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our `Attachment`. May be used by Relay 1.""" + attachmentEdge( + """The method to use when ordering `Attachment`.""" + orderBy: [AttachmentOrderBy!]! = [PRIMARY_KEY_ASC] + ): AttachmentEdge } -"""All input for the `updateSignalCluster` mutation.""" -input UpdateSignalClusterInput { +"""All input for the `updateAttachment` mutation.""" +input UpdateAttachmentInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10282,98 +10331,53 @@ input UpdateSignalClusterInput { rowId: UUID! """ - An object where the defined keys will be set on the `SignalCluster` being updated. + An object where the defined keys will be set on the `Attachment` being updated. """ - patch: SignalClusterPatch! + patch: AttachmentPatch! } """ -Represents an update to a `SignalCluster`. Fields that are set will be updated. +Represents an update to a `Attachment`. Fields that are set will be updated. """ -input SignalClusterPatch { - rowId: UUID - projectId: UUID - label: String - summary: String - memberCount: Int - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update `Vote` mutation.""" -type UpdateVotePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Vote` that was updated by this mutation.""" - vote: Vote - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge -} - -"""All input for the `updateVote` mutation.""" -input UpdateVoteInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! - - """ - An object where the defined keys will be set on the `Vote` being updated. - """ - patch: VotePatch! -} - -"""Represents an update to a `Vote`. Fields that are set will be updated.""" -input VotePatch { +input AttachmentPatch { rowId: UUID postId: UUID userId: UUID - voteType: VoteType + url: String + storageKey: String + mimeType: String + fileSize: Int + kind: String + width: Int + height: Int createdAt: Datetime - updatedAt: Datetime - weight: Int } -"""The output of our update `Attachment` mutation.""" -type UpdateAttachmentPayload { +"""The output of our update `WardenSyncQueue` mutation.""" +type UpdateWardenSyncQueuePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Attachment` that was updated by this mutation.""" - attachment: Attachment + """The `WardenSyncQueue` that was updated by this mutation.""" + wardenSyncQueue: WardenSyncQueue """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Attachment`. May be used by Relay 1.""" - attachmentEdge( - """The method to use when ordering `Attachment`.""" - orderBy: [AttachmentOrderBy!]! = [PRIMARY_KEY_ASC] - ): AttachmentEdge + """An edge for our `WardenSyncQueue`. May be used by Relay 1.""" + wardenSyncQueueEdge( + """The method to use when ordering `WardenSyncQueue`.""" + orderBy: [WardenSyncQueueOrderBy!]! = [PRIMARY_KEY_ASC] + ): WardenSyncQueueEdge } -"""All input for the `updateAttachment` mutation.""" -input UpdateAttachmentInput { +"""All input for the `updateWardenSyncQueue` mutation.""" +input UpdateWardenSyncQueueInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10382,53 +10386,50 @@ input UpdateAttachmentInput { rowId: UUID! """ - An object where the defined keys will be set on the `Attachment` being updated. + An object where the defined keys will be set on the `WardenSyncQueue` being updated. """ - patch: AttachmentPatch! + patch: WardenSyncQueuePatch! } """ -Represents an update to a `Attachment`. Fields that are set will be updated. +Represents an update to a `WardenSyncQueue`. Fields that are set will be updated. """ -input AttachmentPatch { +input WardenSyncQueuePatch { rowId: UUID - postId: UUID - userId: UUID - url: String - storageKey: String - mimeType: String - fileSize: Int - kind: String - width: Int - height: Int + operation: String + payload: JSON + attempts: Int + maxAttempts: Int + lastError: String + nextRetryAt: Datetime createdAt: Datetime } -"""The output of our update `WardenSyncQueue` mutation.""" -type UpdateWardenSyncQueuePayload { +"""The output of our update `SignalCluster` mutation.""" +type UpdateSignalClusterPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `WardenSyncQueue` that was updated by this mutation.""" - wardenSyncQueue: WardenSyncQueue + """The `SignalCluster` that was updated by this mutation.""" + signalCluster: SignalCluster """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `WardenSyncQueue`. May be used by Relay 1.""" - wardenSyncQueueEdge( - """The method to use when ordering `WardenSyncQueue`.""" - orderBy: [WardenSyncQueueOrderBy!]! = [PRIMARY_KEY_ASC] - ): WardenSyncQueueEdge + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge } -"""All input for the `updateWardenSyncQueue` mutation.""" -input UpdateWardenSyncQueueInput { +"""All input for the `updateSignalCluster` mutation.""" +input UpdateSignalClusterInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10437,23 +10438,22 @@ input UpdateWardenSyncQueueInput { rowId: UUID! """ - An object where the defined keys will be set on the `WardenSyncQueue` being updated. + An object where the defined keys will be set on the `SignalCluster` being updated. """ - patch: WardenSyncQueuePatch! + patch: SignalClusterPatch! } """ -Represents an update to a `WardenSyncQueue`. Fields that are set will be updated. +Represents an update to a `SignalCluster`. Fields that are set will be updated. """ -input WardenSyncQueuePatch { +input SignalClusterPatch { rowId: UUID - operation: String - payload: JSON - attempts: Int - maxAttempts: Int - lastError: String - nextRetryAt: Datetime + projectId: UUID + label: String + summary: String + memberCount: Int createdAt: Datetime + updatedAt: Datetime } """The output of our update `Project` mutation.""" @@ -10801,64 +10801,31 @@ input DeleteProjectLinkInput { rowId: UUID! } -"""The output of our delete `StatusTemplate` mutation.""" -type DeleteStatusTemplatePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `StatusTemplate` that was deleted by this mutation.""" - statusTemplate: StatusTemplate - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `StatusTemplate`. May be used by Relay 1.""" - statusTemplateEdge( - """The method to use when ordering `StatusTemplate`.""" - orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] - ): StatusTemplateEdge -} - -"""All input for the `deleteStatusTemplate` mutation.""" -input DeleteStatusTemplateInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - rowId: UUID! -} - -"""The output of our delete `SignalCluster` mutation.""" -type DeleteSignalClusterPayload { +"""The output of our delete `Vote` mutation.""" +type DeleteVotePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SignalCluster` that was deleted by this mutation.""" - signalCluster: SignalCluster + """The `Vote` that was deleted by this mutation.""" + vote: Vote """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `SignalCluster`. May be used by Relay 1.""" - signalClusterEdge( - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] - ): SignalClusterEdge + """An edge for our `Vote`. May be used by Relay 1.""" + voteEdge( + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] + ): VoteEdge } -"""All input for the `deleteSignalCluster` mutation.""" -input DeleteSignalClusterInput { +"""All input for the `deleteVote` mutation.""" +input DeleteVoteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10867,31 +10834,31 @@ input DeleteSignalClusterInput { rowId: UUID! } -"""The output of our delete `Vote` mutation.""" -type DeleteVotePayload { +"""The output of our delete `StatusTemplate` mutation.""" +type DeleteStatusTemplatePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Vote` that was deleted by this mutation.""" - vote: Vote + """The `StatusTemplate` that was deleted by this mutation.""" + statusTemplate: StatusTemplate """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Vote`. May be used by Relay 1.""" - voteEdge( - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!]! = [PRIMARY_KEY_ASC] - ): VoteEdge + """An edge for our `StatusTemplate`. May be used by Relay 1.""" + statusTemplateEdge( + """The method to use when ordering `StatusTemplate`.""" + orderBy: [StatusTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): StatusTemplateEdge } -"""All input for the `deleteVote` mutation.""" -input DeleteVoteInput { +"""All input for the `deleteStatusTemplate` mutation.""" +input DeleteStatusTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10966,6 +10933,39 @@ input DeleteWardenSyncQueueInput { rowId: UUID! } +"""The output of our delete `SignalCluster` mutation.""" +type DeleteSignalClusterPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SignalCluster` that was deleted by this mutation.""" + signalCluster: SignalCluster + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SignalCluster`. May be used by Relay 1.""" + signalClusterEdge( + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!]! = [PRIMARY_KEY_ASC] + ): SignalClusterEdge +} + +"""All input for the `deleteSignalCluster` mutation.""" +input DeleteSignalClusterInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + rowId: UUID! +} + """The output of our delete `Project` mutation.""" type DeleteProjectPayload { """ @@ -11156,27 +11156,27 @@ type Query implements Node { """Get a single `ProjectLink`.""" projectLink(rowId: UUID!): ProjectLink - """Get a single `StatusTemplate`.""" - statusTemplate(rowId: UUID!): StatusTemplate - - """Get a single `StatusTemplate`.""" - statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate - - """Get a single `SignalCluster`.""" - signalCluster(rowId: UUID!): SignalCluster - """Get a single `Vote`.""" vote(rowId: UUID!): Vote """Get a single `Vote`.""" voteByPostIdAndUserId(postId: UUID!, userId: UUID!): Vote + """Get a single `StatusTemplate`.""" + statusTemplate(rowId: UUID!): StatusTemplate + + """Get a single `StatusTemplate`.""" + statusTemplateByOrganizationIdAndName(organizationId: UUID!, name: String!): StatusTemplate + """Get a single `Attachment`.""" attachment(rowId: UUID!): Attachment """Get a single `WardenSyncQueue`.""" wardenSyncQueue(rowId: UUID!): WardenSyncQueue + """Get a single `SignalCluster`.""" + signalCluster(rowId: UUID!): SignalCluster + """Get a single `Signal`.""" signal(rowId: UUID!): Signal @@ -11467,8 +11467,8 @@ type Query implements Node { orderBy: [ProjectLinkOrderBy!] = [PRIMARY_KEY_ASC] ): ProjectLinkConnection - """Reads and enables pagination through a set of `StatusTemplate`.""" - statusTemplates( + """Reads and enables pagination through a set of `Vote`.""" + votes( """Only read the first `n` values of the set.""" first: Int @@ -11490,19 +11490,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: StatusTemplateCondition + condition: VoteCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: StatusTemplateFilter + filter: VoteFilter - """The method to use when ordering `StatusTemplate`.""" - orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] - ): StatusTemplateConnection + """The method to use when ordering `Vote`.""" + orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] + ): VoteConnection - """Reads and enables pagination through a set of `SignalCluster`.""" - signalClusters( + """Reads and enables pagination through a set of `StatusTemplate`.""" + statusTemplates( """Only read the first `n` values of the set.""" first: Int @@ -11524,19 +11524,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: SignalClusterCondition + condition: StatusTemplateCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: SignalClusterFilter + filter: StatusTemplateFilter - """The method to use when ordering `SignalCluster`.""" - orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] - ): SignalClusterConnection + """The method to use when ordering `StatusTemplate`.""" + orderBy: [StatusTemplateOrderBy!] = [PRIMARY_KEY_ASC] + ): StatusTemplateConnection - """Reads and enables pagination through a set of `Vote`.""" - votes( + """Reads and enables pagination through a set of `Attachment`.""" + attachments( """Only read the first `n` values of the set.""" first: Int @@ -11558,19 +11558,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: VoteCondition + condition: AttachmentCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: VoteFilter + filter: AttachmentFilter - """The method to use when ordering `Vote`.""" - orderBy: [VoteOrderBy!] = [PRIMARY_KEY_ASC] - ): VoteConnection + """The method to use when ordering `Attachment`.""" + orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] + ): AttachmentConnection - """Reads and enables pagination through a set of `Attachment`.""" - attachments( + """Reads and enables pagination through a set of `WardenSyncQueue`.""" + wardenSyncQueues( """Only read the first `n` values of the set.""" first: Int @@ -11592,19 +11592,19 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: AttachmentCondition + condition: WardenSyncQueueCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: AttachmentFilter + filter: WardenSyncQueueFilter - """The method to use when ordering `Attachment`.""" - orderBy: [AttachmentOrderBy!] = [PRIMARY_KEY_ASC] - ): AttachmentConnection + """The method to use when ordering `WardenSyncQueue`.""" + orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] + ): WardenSyncQueueConnection - """Reads and enables pagination through a set of `WardenSyncQueue`.""" - wardenSyncQueues( + """Reads and enables pagination through a set of `SignalCluster`.""" + signalClusters( """Only read the first `n` values of the set.""" first: Int @@ -11626,16 +11626,16 @@ type Query implements Node { """ A condition to be used in determining which values should be returned by the collection. """ - condition: WardenSyncQueueCondition + condition: SignalClusterCondition """ A filter to be used in determining which values should be returned by the collection. """ - filter: WardenSyncQueueFilter + filter: SignalClusterFilter - """The method to use when ordering `WardenSyncQueue`.""" - orderBy: [WardenSyncQueueOrderBy!] = [PRIMARY_KEY_ASC] - ): WardenSyncQueueConnection + """The method to use when ordering `SignalCluster`.""" + orderBy: [SignalClusterOrderBy!] = [PRIMARY_KEY_ASC] + ): SignalClusterConnection """Reads and enables pagination through a set of `Signal`.""" signals( @@ -11814,22 +11814,6 @@ type Mutation { input: CreateProjectLinkInput! ): CreateProjectLinkPayload - """Creates a single `StatusTemplate`.""" - createStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateStatusTemplateInput! - ): CreateStatusTemplatePayload - - """Creates a single `SignalCluster`.""" - createSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateSignalClusterInput! - ): CreateSignalClusterPayload - """Creates a single `Vote`.""" createVote( """ @@ -11838,6 +11822,14 @@ type Mutation { input: CreateVoteInput! ): CreateVotePayload + """Creates a single `StatusTemplate`.""" + createStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateStatusTemplateInput! + ): CreateStatusTemplatePayload + """Creates a single `Attachment`.""" createAttachment( """ @@ -11854,6 +11846,14 @@ type Mutation { input: CreateWardenSyncQueueInput! ): CreateWardenSyncQueuePayload + """Creates a single `SignalCluster`.""" + createSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSignalClusterInput! + ): CreateSignalClusterPayload + """Creates a single `Project`.""" createProject( """ @@ -11926,22 +11926,6 @@ type Mutation { input: UpdateProjectLinkInput! ): UpdateProjectLinkPayload - """Updates a single `StatusTemplate` using a unique key and a patch.""" - updateStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateStatusTemplateInput! - ): UpdateStatusTemplatePayload - - """Updates a single `SignalCluster` using a unique key and a patch.""" - updateSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateSignalClusterInput! - ): UpdateSignalClusterPayload - """Updates a single `Vote` using a unique key and a patch.""" updateVote( """ @@ -11950,6 +11934,14 @@ type Mutation { input: UpdateVoteInput! ): UpdateVotePayload + """Updates a single `StatusTemplate` using a unique key and a patch.""" + updateStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateStatusTemplateInput! + ): UpdateStatusTemplatePayload + """Updates a single `Attachment` using a unique key and a patch.""" updateAttachment( """ @@ -11966,6 +11958,14 @@ type Mutation { input: UpdateWardenSyncQueueInput! ): UpdateWardenSyncQueuePayload + """Updates a single `SignalCluster` using a unique key and a patch.""" + updateSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSignalClusterInput! + ): UpdateSignalClusterPayload + """Updates a single `Project` using a unique key and a patch.""" updateProject( """ @@ -12038,22 +12038,6 @@ type Mutation { input: DeleteProjectLinkInput! ): DeleteProjectLinkPayload - """Deletes a single `StatusTemplate` using a unique key.""" - deleteStatusTemplate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteStatusTemplateInput! - ): DeleteStatusTemplatePayload - - """Deletes a single `SignalCluster` using a unique key.""" - deleteSignalCluster( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteSignalClusterInput! - ): DeleteSignalClusterPayload - """Deletes a single `Vote` using a unique key.""" deleteVote( """ @@ -12062,6 +12046,14 @@ type Mutation { input: DeleteVoteInput! ): DeleteVotePayload + """Deletes a single `StatusTemplate` using a unique key.""" + deleteStatusTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteStatusTemplateInput! + ): DeleteStatusTemplatePayload + """Deletes a single `Attachment` using a unique key.""" deleteAttachment( """ @@ -12078,6 +12070,14 @@ type Mutation { input: DeleteWardenSyncQueueInput! ): DeleteWardenSyncQueuePayload + """Deletes a single `SignalCluster` using a unique key.""" + deleteSignalCluster( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSignalClusterInput! + ): DeleteSignalClusterPayload + """Deletes a single `Project` using a unique key.""" deleteProject( """ diff --git a/src/lib/authz/index.ts b/src/lib/authz/index.ts index a656cc6..858bc59 100644 --- a/src/lib/authz/index.ts +++ b/src/lib/authz/index.ts @@ -13,6 +13,8 @@ import { enqueueWardenSync } from "./syncQueue"; import type { PermissionCheck, PermissionCheckResult, + WardenRelation, + WardenResourceType, } from "@omnidotdev/providers"; export { default as authzRoutes } from "./routes"; @@ -35,11 +37,11 @@ export function isAuthzEnabled(): boolean { * Check if a user has permission on a resource. * Exported for graphile-export EXPORTABLE compatibility. */ -export async function checkPermission( +export async function checkPermission( userId: string, - resourceType: string, + resourceType: T, resourceId: string, - permission: string, + permission: WardenRelation, requestCache?: Map, ): Promise { if (!isAuthzEnabled()) return true; diff --git a/src/lib/config/graphile.config.ts b/src/lib/config/graphile.config.ts index 0f6a6a5..c786517 100644 --- a/src/lib/config/graphile.config.ts +++ b/src/lib/config/graphile.config.ts @@ -17,6 +17,7 @@ import { VotePlugin, } from "lib/graphql/plugins/authorization"; import { AuthzSyncPlugin } from "lib/graphql/plugins/authz"; +import { PgVectorPlugin } from "lib/graphql/plugins/codecs"; import { DefaultStatusTemplatesPlugin } from "lib/graphql/plugins/defaults"; import { EventEmissionPlugin, @@ -58,6 +59,8 @@ const preset: GraphileConfig.Preset = { }, disablePlugins: ["PgIndexBehaviorsPlugin"], plugins: [ + // pgvector codec support (must load before introspection builds codecs) + PgVectorPlugin, // Observer query plugin (returns current authenticated user) observerPlugin, // Authorization plugins (pre-mutation validation) diff --git a/src/lib/graphql/plugins/codecs/PgVector.plugin.ts b/src/lib/graphql/plugins/codecs/PgVector.plugin.ts new file mode 100644 index 0000000..a00f216 --- /dev/null +++ b/src/lib/graphql/plugins/codecs/PgVector.plugin.ts @@ -0,0 +1,165 @@ +/** + * pgvector codec plugin. + * + * The feedback brain stores embeddings in `vector` columns (post.embedding, + * signal.embedding, signal_cluster.centroid) provided by the pgvector + * extension. PostGraphile has no built-in codec for `vector`, so introspection + * would otherwise dump the raw pg_type and warn "Could not build PgCodec for + * 'public.vector'; maybe you need a plugin implementing + * gather.hooks.pgCodecs_findPgCodec to add support." before silently dropping + * the columns. + * + * This plugin registers a codec for `vector` (and its array form `_vector`) so + * the type resolves cleanly. The codec is treated as text on the wire: pgvector + * accepts/returns `[1,2,3]` string literals, which is all the runtime needs for + * the columns to round-trip through the registry. + * + * We deliberately do NOT expose embeddings through GraphQL. They are internal AI + * artifacts (1536-float arrays) with no API consumer, are large enough to bloat + * list responses, and grouping/filtering on them is meaningless. The + * `schema.entityBehavior` below disables every attribute behavior for + * vector-typed columns, so they are intentionally excluded from fields, + * conditions, filters, ordering, and the aggregate/groupBy machinery rather than + * triggering "Couldn't find a 'output' variant" warnings. This keeps the + * generated schema identical to its pre-codec shape, minus the warning noise. + * + * To expose them later, drop the behavior override below; the codec is already + * mapped to the String scalar, so the columns would surface as text. For a + * dedicated scalar instead, register one and call `setGraphQLTypeForPgCodec`, + * mirroring the upstream PgLtreePlugin. + * + * Modeled on graphile-build-pg's PgLtreePlugin. + * @see https://postgraphile.org/postgraphile/next/extending-raw + */ + +import { gatherConfig } from "postgraphile/graphile-build"; + +/** + * Negative behaviors applied to every vector-typed attribute so it is excluded + * from the schema entirely - core field/condition/order behaviors plus the + * @graphile/pg-aggregates participation (aggregate, groupBy, havingBy, and the + * aggregate orderBy/filterBy scopes). + * + * pg-aggregates only registers spec-prefixed behavior strings in the + * `BehaviorString` type (e.g. `distinctCount:attribute:aggregate`), but the + * runtime matches behaviors positionally against the suffix, so these generic + * forms validly disable every spec at once. They are absent from the type + * union, hence the cast. + */ +const HIDDEN_ATTRIBUTE_BEHAVIORS = [ + "-attribute:base", + "-attribute:select", + "-attribute:insert", + "-attribute:update", + "-attribute:filterBy", + "-attribute:orderBy", + "-attribute:groupBy", + "-attribute:havingBy", + "-attribute:aggregate", + "-attribute:aggregate:orderBy", + "-attribute:aggregate:filterBy", +] as GraphileBuild.BehaviorString[]; + +const PgVectorPlugin: GraphileConfig.Plugin = { + name: "PgVectorPlugin", + version: "0.0.0", + description: "Adds a PgCodec for the pgvector `vector` type.", + + gather: gatherConfig({ + initialState: (_cache, { lib }) => { + const { + dataplanPg: { listOfCodec }, + graphileBuild: { EXPORTABLE }, + sql, + } = lib; + + // pgvector serializes as a text literal (e.g. "[1,2,3]"), so a passthrough + // text codec is sufficient for values to round-trip through the registry. + const vectorCodec = EXPORTABLE( + (sql) => ({ + name: "vector", + sqlType: sql`vector`, + toPg: (str: string) => str, + fromPg: (str: string) => str, + executor: null, + attributes: undefined, + }), + [sql], + ); + + const vectorArrayCodec = EXPORTABLE( + (listOfCodec, vectorCodec) => listOfCodec(vectorCodec), + [listOfCodec, vectorCodec], + ); + + return { vectorCodec, vectorArrayCodec }; + }, + + hooks: { + async pgCodecs_findPgCodec(info, event) { + // Another plugin already supplied a codec; skip. + if (event.pgCodec) return; + + const { serviceName, pgType } = event; + const { typname } = pgType; + if (typname !== "vector" && typname !== "_vector") return; + + // Only claim types that belong to the pgvector extension, so we don't + // shadow an unrelated user-defined type that happens to be named the same. + const vectorExt = await info.helpers.pgIntrospection.getExtensionByName( + serviceName, + "vector", + ); + if (!vectorExt || pgType.typnamespace !== vectorExt.extnamespace) + return; + + event.pgCodec = + typname === "vector" + ? info.state.vectorCodec + : info.state.vectorArrayCodec; + }, + }, + }), + + schema: { + hooks: { + // graphile-build-pg walks every registered codec to assign it a GraphQL + // type and warns ("Do not know how to convert PgCodec 'vector'...") for any + // scalar it can't map. The columns are already hidden by the behavior + // override below (behavior is checked before type resolution, so they stay + // out of the schema), but the codec still needs *some* type to silence that + // pass. Map it to the built-in String scalar - representable as text, and + // never surfaced because no field references it. + init(_, build) { + const codec = build.pgCodecs.vector; + if (codec && !build.hasGraphQLTypeForPgCodec(codec)) { + build.setGraphQLTypeForPgCodec(codec, "output", "String"); + build.setGraphQLTypeForPgCodec(codec, "input", "String"); + } + return _; + }, + }, + entityBehavior: { + // Strip all behaviors from vector-typed attributes so they never surface + // in the schema. Runs after the inferred defaults so these negations win. + pgCodecAttribute: { + inferred: { + provides: ["pgVectorHidden"], + after: ["default"], + callback(behavior, [codec, attributeName]) { + const attributeCodec = codec.attributes?.[attributeName]?.codec; + const isVector = + attributeCodec?.name === "vector" || + attributeCodec?.arrayOfCodec?.name === "vector"; + + if (!isVector) return behavior; + + return [behavior, ...HIDDEN_ATTRIBUTE_BEHAVIORS]; + }, + }, + }, + }, + }, +}; + +export default PgVectorPlugin; diff --git a/src/lib/graphql/plugins/codecs/index.ts b/src/lib/graphql/plugins/codecs/index.ts new file mode 100644 index 0000000..a04a33d --- /dev/null +++ b/src/lib/graphql/plugins/codecs/index.ts @@ -0,0 +1 @@ +export { default as PgVectorPlugin } from "./PgVector.plugin"; diff --git a/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts b/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts index 0b6fcb1..14ffa79 100644 --- a/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts +++ b/src/lib/graphql/plugins/defaults/DefaultStatusTemplates.plugin.ts @@ -18,8 +18,6 @@ import type { PlanWrapperFn } from "postgraphile/utils"; /** * Default status templates seeded for every organization. - * - * @knipignore also consumed by the backfill script in the knip-ignored scripts dir */ export const DEFAULT_STATUS_TEMPLATES: Omit< InsertStatusTemplate,