@uidu/cli 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1248 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import mri from "mri";
5
+ import pc2 from "picocolors";
6
+
7
+ // src/commands/auth.ts
8
+ import { isCancel, password as passwordPrompt, text } from "@clack/prompts";
9
+
10
+ // src/config.ts
11
+ import fs from "fs";
12
+ import os from "os";
13
+ import path from "path";
14
+
15
+ // ../client/src/client.ts
16
+ import { ClientError, GraphQLClient } from "graphql-request";
17
+
18
+ // ../client/src/types.ts
19
+ var UiduError = class extends Error {
20
+ code;
21
+ graphQLErrors;
22
+ cause;
23
+ constructor(opts) {
24
+ super(opts.message);
25
+ this.name = "UiduError";
26
+ this.code = opts.code;
27
+ this.graphQLErrors = opts.graphQLErrors ?? [];
28
+ this.cause = opts.cause;
29
+ }
30
+ };
31
+
32
+ // ../client/src/client.ts
33
+ var UiduClient = class {
34
+ endpoint;
35
+ client;
36
+ constructor(config) {
37
+ this.endpoint = config.endpoint ?? `https://${config.workspace}.uidu.org/graphql`;
38
+ const headers = { ...config.headers ?? {} };
39
+ if (config.publicToken) headers["X-Uidu-Public-Token"] = config.publicToken;
40
+ if (config.apiKey) headers["Authorization"] = `Bearer ${config.apiKey}`;
41
+ this.client = new GraphQLClient(this.endpoint, { headers });
42
+ }
43
+ async query(document, variables) {
44
+ try {
45
+ return await this.client.request(
46
+ document,
47
+ variables ?? {}
48
+ );
49
+ } catch (err) {
50
+ throw toUiduError(err);
51
+ }
52
+ }
53
+ mutate(document, variables) {
54
+ return this.query(document, variables);
55
+ }
56
+ };
57
+ function createClient(config) {
58
+ return new UiduClient(config);
59
+ }
60
+ function toUiduError(err) {
61
+ if (err instanceof ClientError) {
62
+ return new UiduError({
63
+ code: "GRAPHQL_ERROR",
64
+ message: err.message,
65
+ graphQLErrors: err.response.errors ?? [],
66
+ cause: err
67
+ });
68
+ }
69
+ return new UiduError({
70
+ code: "NETWORK_ERROR",
71
+ message: err instanceof Error ? err.message : "Unknown network error",
72
+ cause: err
73
+ });
74
+ }
75
+
76
+ // ../client/src/generated/index.ts
77
+ var GetBookingDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetBooking" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "booking" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "number" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "itemsCount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "itemsTotal" } }, { "kind": "Field", "name": { "kind": "Name", "value": "paymentIntentId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "paidAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "refundedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expiredAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "willExpireAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldValuesByShortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "contact" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }] } }] } }] } }] };
78
+ var ListBookingsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListBookings" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "bookings" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "before" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "number" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "itemsCount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "itemsTotal" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "paidAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expiredAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "willExpireAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "contact" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }] } }] } }] } }] } }] } }] };
79
+ var GetCallDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCall" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "call" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "quantity" } }, { "kind": "Field", "name": { "kind": "Name", "value": "salaryMin" } }, { "kind": "Field", "name": { "kind": "Name", "value": "salaryMax" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expiresAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "completedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "primaryAddress" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "city" } }, { "kind": "Field", "name": { "kind": "Name", "value": "countryCode" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "form" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FormFields" } }] } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FormFields" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Form" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "inputs" }, "name": { "kind": "Name", "value": "formQuestions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "label" } }, { "kind": "Field", "name": { "kind": "Name", "value": "required" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hidden" } }, { "kind": "Field", "name": { "kind": "Name", "value": "placeholder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hint" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "rules" } }, { "kind": "Field", "name": { "kind": "Name", "value": "preferences" } }, { "kind": "Field", "name": { "kind": "Name", "value": "field" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "accessor" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadPresignedUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadParams" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "options" }, "name": { "kind": "Name", "value": "optionList" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] };
80
+ var ListCallsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListCalls" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "calls" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "quantity" } }, { "kind": "Field", "name": { "kind": "Name", "value": "salaryMin" } }, { "kind": "Field", "name": { "kind": "Name", "value": "salaryMax" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expiresAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "primaryAddress" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "city" } }] } }] } }] } }] } }] } }] } }] };
81
+ var GetCampaignDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCampaign" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "campaign" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "innerName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduledAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sentAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "preferences" } }, { "kind": "Field", "name": { "kind": "Name", "value": "list" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] };
82
+ var ListCampaignsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListCampaigns" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "kind" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "campaigns" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "kind" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "kind" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "status" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "status" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "innerName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduledAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sentAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] } }] } }] } }] };
83
+ var CreateFieldValueDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateFieldValue" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateFieldValueInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createFieldValue" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "fieldValue" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "content" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
84
+ var CreatePageDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreatePage" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreatePageInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createPage" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "page" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
85
+ var CreatePageBlockDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreatePageBlock" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreatePageBlockInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createPageBlock" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageBlock" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
86
+ var CreateProjectDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateProject" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateProjectInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createProject" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "project" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
87
+ var GetPageDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetPage" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "project" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "page" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "slug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "metaTitle" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metaDescription" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metaKeywords" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metaImage" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "pageBlocks" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "templateBlock" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "block" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldValues" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "content" } }, { "kind": "Field", "name": { "kind": "Name", "value": "field" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "linkedRecord" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Form" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "inputs" }, "name": { "kind": "Name", "value": "formQuestions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "label" } }, { "kind": "Field", "name": { "kind": "Name", "value": "required" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hidden" } }, { "kind": "Field", "name": { "kind": "Name", "value": "placeholder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hint" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "rules" } }, { "kind": "Field", "name": { "kind": "Name", "value": "preferences" } }, { "kind": "Field", "name": { "kind": "Name", "value": "field" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "accessor" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadPresignedUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadParams" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "options" }, "name": { "kind": "Name", "value": "optionList" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] };
88
+ var ListPagesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListPages" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "project" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "pages" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }] } }] } }] } }] } }] } }] } }] };
89
+ var CreateContactDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateContact" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateContactInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createContact" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "contact" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
90
+ var DeleteContactDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteContact" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteContactInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteContact" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "contact" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
91
+ var CreateDealDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateDeal" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateDealInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createDeal" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deal" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
92
+ var UpdateDealDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateDeal" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateDealInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateDeal" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deal" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
93
+ var GetContactDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetContact" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "contact" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }, { "kind": "Field", "name": { "kind": "Name", "value": "avatar" } }, { "kind": "Field", "name": { "kind": "Name", "value": "avatarData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedPrimaryAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldValuesByShortname" } }] } }] } }] } }] };
94
+ var GetDealDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetDeal" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deal" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "amount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deadline" } }, { "kind": "Field", "name": { "kind": "Name", "value": "winProbability" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "pipeline" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "user" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "firstName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "lastName" } }] } }] } }] } }] } }] };
95
+ var ListContactsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListContacts" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "contacts" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }, { "kind": "Field", "name": { "kind": "Name", "value": "avatar" } }, { "kind": "Field", "name": { "kind": "Name", "value": "avatarData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }] } }] } }] } }] };
96
+ var ListDealsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListDeals" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "SearchParams" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deals" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "amount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deadline" } }, { "kind": "Field", "name": { "kind": "Name", "value": "winProbability" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "pipeline" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] };
97
+ var CreateCourseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateCourse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateCourseInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createCourse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "course" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
98
+ var UpdateCourseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateCourse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateCourseInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateCourse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "course" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
99
+ var DeleteCourseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteCourse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteCourseInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteCourse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "course" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
100
+ var GetCourseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCourse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "course" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstract" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "mode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tags" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "draft" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] } }] };
101
+ var ListCoursesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListCourses" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "SearchParams" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "courses" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "abstract" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "mode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tags" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "draft" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }] } }] } }] } }] } }] } }] };
102
+ var CreateDonationCampaignDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateDonationCampaign" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateDonationCampaignInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createDonationCampaign" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "donationCampaign" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
103
+ var UpdateDonationCampaignDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateDonationCampaign" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateDonationCampaignInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateDonationCampaign" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "donationCampaign" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
104
+ var DeleteDonationCampaignDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteDonationCampaign" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteDonationCampaignInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteDonationCampaign" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "donationCampaign" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
105
+ var GetDonationCampaignDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetDonationCampaign" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "donationCampaign" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "goal" } }, { "kind": "Field", "name": { "kind": "Name", "value": "donationsAmount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "donationsCount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "donationsAverage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startsAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "primaryAddress" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "city" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "form" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FormFields" } }] } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FormFields" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Form" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "inputs" }, "name": { "kind": "Name", "value": "formQuestions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "label" } }, { "kind": "Field", "name": { "kind": "Name", "value": "required" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hidden" } }, { "kind": "Field", "name": { "kind": "Name", "value": "placeholder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hint" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "rules" } }, { "kind": "Field", "name": { "kind": "Name", "value": "preferences" } }, { "kind": "Field", "name": { "kind": "Name", "value": "field" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "accessor" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadPresignedUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadParams" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "options" }, "name": { "kind": "Name", "value": "optionList" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] };
106
+ var ListDonationCampaignsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListDonationCampaigns" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "donationCampaigns" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "goal" } }, { "kind": "Field", "name": { "kind": "Name", "value": "donationsAmount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "donationsCount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startsAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }] } }] } }] } }] } }] } }] };
107
+ var CreateEventDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateEvent" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateEventInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createEvent" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "event" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
108
+ var GetEventDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetEvent" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "event" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isPaidEvent" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hasSeats" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currentCapacity" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "toGoogleCalendarUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "toIcsUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "primaryAddress" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "city" } }, { "kind": "Field", "name": { "kind": "Name", "value": "postalCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "countryCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "latitude" } }, { "kind": "Field", "name": { "kind": "Name", "value": "longitude" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "instance" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "beginsAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "finishesAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endDate" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endTime" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "instances" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "beginsAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "finishesAt" } }] } }] } }] } }] } }] };
109
+ var ListEventsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListEvents" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "events" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isPaidEvent" } }, { "kind": "Field", "name": { "kind": "Name", "value": "primaryAddress" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "formattedAddress" } }, { "kind": "Field", "name": { "kind": "Name", "value": "city" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "instance" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "beginsAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "finishesAt" } }] } }] } }] } }] } }] } }] } }] };
110
+ var UpdateEventDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateEvent" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateEventInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateEvent" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "event" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
111
+ var CreateFormDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateForm" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateFormInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createForm" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "form" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
112
+ var UpdateFormDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateForm" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateFormInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateForm" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "form" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
113
+ var DeleteFormDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteForm" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteFormInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteForm" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "form" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
114
+ var GetFormDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetForm" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "form" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FormFields" } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FormFields" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Form" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "inputs" }, "name": { "kind": "Name", "value": "formQuestions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "label" } }, { "kind": "Field", "name": { "kind": "Name", "value": "required" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hidden" } }, { "kind": "Field", "name": { "kind": "Name", "value": "placeholder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hint" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fieldKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "rules" } }, { "kind": "Field", "name": { "kind": "Name", "value": "preferences" } }, { "kind": "Field", "name": { "kind": "Name", "value": "field" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "accessor" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "shortname" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadPresignedUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uploadParams" } }, { "kind": "Field", "alias": { "kind": "Name", "value": "options" }, "name": { "kind": "Name", "value": "optionList" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] };
115
+ var ListFormsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListForms" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "forms" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }] } }] } }] } }] } }] } }] };
116
+ var CreateChannelDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateChannel" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateChannelInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createChannel" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "channel" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
117
+ var UpdateChannelDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateChannel" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateChannelInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateChannel" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "channel" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
118
+ var DeleteChannelDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteChannel" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteChannelInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteChannel" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "channel" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
119
+ var GetChannelDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetChannel" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "channel" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "channelKbCollections" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "IntValue", "value": "100" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbCollections" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "IntValue", "value": "100" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "iconData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbArticles" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "IntValue", "value": "100" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "workspaceTagList" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "color" } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] } }] };
120
+ var GetKbArticleDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetKbArticle" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbArticle" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isDraft" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] };
121
+ var GetKbCollectionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetKbCollection" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "iconData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbArticles" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "IntValue", "value": "50" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isDraft" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] } }] } }] } }] } }] };
122
+ var CreateKbCollectionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateKbCollection" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateKbCollectionInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createKbCollection" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
123
+ var UpdateKbCollectionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateKbCollection" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateKbCollectionInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateKbCollection" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
124
+ var DeleteKbCollectionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteKbCollection" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteKbCollectionInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteKbCollection" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
125
+ var CreateKbArticleDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateKbArticle" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateKbArticleInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createKbArticle" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbArticle" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
126
+ var UpdateKbArticleDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateKbArticle" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateKbArticleInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateKbArticle" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbArticle" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
127
+ var DeleteKbArticleDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteKbArticle" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteKbArticleInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteKbArticle" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbArticle" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
128
+ var ListKbArticlesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListKbArticles" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbArticles" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "before" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isDraft" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kbCollection" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] } }] } }] } }] };
129
+ var ListKbCollectionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListKbCollections" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "kbCollections" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "before" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "before" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "last" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "last" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "iconData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "position" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] } }] } }] } }] };
130
+ var CreateNoteDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateNote" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateNoteInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createNote" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "note" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
131
+ var UpdateNoteDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateNote" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateNoteInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateNote" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "note" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
132
+ var DeleteNoteDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteNote" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteNoteInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteNote" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "note" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
133
+ var ListEmployeesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListEmployees" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "employees" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "employeeCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "user" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "firstName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "lastName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "currentEmployment" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "jobTitle" } }, { "kind": "Field", "name": { "kind": "Name", "value": "contractType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isActive" } }, { "kind": "Field", "name": { "kind": "Name", "value": "startDate" } }] } }] } }] } }] } }] } }] } }] };
134
+ var CreateSpaceDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateSpace" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateSpaceInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createSpace" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "space" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
135
+ var UpdateSpaceDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateSpace" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateSpaceInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateSpace" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "space" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
136
+ var DeleteSpaceDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteSpace" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteSpaceInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteSpace" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "space" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
137
+ var CreateStoryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateStory" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateStoryInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createStory" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "story" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
138
+ var GetStoryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetStory" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "story" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "body" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicUrl" } }] } }] } }] } }] };
139
+ var ListStoriesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListStories" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "currentWorkspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "storiesConnection" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "first" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "first" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "after" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "after" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "pageInfo" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "hasNextPage" } }, { "kind": "Field", "name": { "kind": "Name", "value": "endCursor" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "edges" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "node" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "cover" } }, { "kind": "Field", "name": { "kind": "Name", "value": "coverData" } }, { "kind": "Field", "name": { "kind": "Name", "value": "published" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publishedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicPath" } }] } }] } }] } }] } }] } }] };
140
+ var UpdateStoryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateStory" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateStoryInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateStory" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "story" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
141
+ var CreateWorkspaceDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateWorkspace" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateWorkspaceInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createWorkspace" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "workspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
142
+ var GenerateWorkspaceApiCredentialsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "GenerateWorkspaceApiCredentials" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "GenerateWorkspaceApiCredentialsInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "generateWorkspaceApiCredentials" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "apiKey" } }, { "kind": "Field", "name": { "kind": "Name", "value": "apiSecret" } }, { "kind": "Field", "name": { "kind": "Name", "value": "workspace" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
143
+ var CreateTaskDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateTask" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateTaskInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createTask" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "task" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
144
+ var UpdateTaskDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateTask" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateTaskInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateTask" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "task" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
145
+ var DeleteTaskDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteTask" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DeleteTaskInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteTask" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "task" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] } }] };
146
+
147
+ // ../client/src/utils/relay.ts
148
+ function nodes(connection) {
149
+ if (!connection?.edges) return [];
150
+ return connection.edges.flatMap((edge) => edge?.node ? [edge.node] : []);
151
+ }
152
+
153
+ // ../client/src/cms.ts
154
+ async function getPage(client, variables) {
155
+ const result = await client.query(GetPageDocument, variables);
156
+ return result.currentWorkspace?.project?.page ?? null;
157
+ }
158
+ async function listPages(client, variables) {
159
+ const result = await client.query(ListPagesDocument, variables);
160
+ return nodes(result.currentWorkspace?.project?.pages);
161
+ }
162
+ async function createProject(client, variables) {
163
+ const result = await client.mutate(CreateProjectDocument, variables);
164
+ return result.createProject ?? null;
165
+ }
166
+ async function createPage(client, variables) {
167
+ const result = await client.mutate(CreatePageDocument, variables);
168
+ return result.createPage ?? null;
169
+ }
170
+ async function createPageBlock(client, variables) {
171
+ const result = await client.mutate(CreatePageBlockDocument, variables);
172
+ return result.createPageBlock ?? null;
173
+ }
174
+ async function createFieldValue(client, variables) {
175
+ const result = await client.mutate(CreateFieldValueDocument, variables);
176
+ return result.createFieldValue ?? null;
177
+ }
178
+
179
+ // ../client/src/system.ts
180
+ async function createWorkspace(client, variables) {
181
+ const result = await client.mutate(CreateWorkspaceDocument, variables);
182
+ return result.createWorkspace ?? null;
183
+ }
184
+ async function generateWorkspaceApiCredentials(client, variables) {
185
+ const result = await client.mutate(
186
+ GenerateWorkspaceApiCredentialsDocument,
187
+ variables
188
+ );
189
+ return result.generateWorkspaceApiCredentials ?? null;
190
+ }
191
+
192
+ // ../client/src/spaces.ts
193
+ async function createSpace(client, variables) {
194
+ const result = await client.mutate(CreateSpaceDocument, variables);
195
+ return result.createSpace ?? null;
196
+ }
197
+
198
+ // ../client/src/tasks.ts
199
+ async function createTask(client, variables) {
200
+ const result = await client.mutate(CreateTaskDocument, variables);
201
+ return result.createTask ?? null;
202
+ }
203
+
204
+ // ../client/src/notes.ts
205
+ async function createNote(client, variables) {
206
+ const result = await client.mutate(CreateNoteDocument, variables);
207
+ return result.createNote ?? null;
208
+ }
209
+
210
+ // ../client/src/mutations.ts
211
+ async function createCourse(c, v) {
212
+ return (await c.mutate(CreateCourseDocument, v)).createCourse ?? null;
213
+ }
214
+ async function updateCourse(c, v) {
215
+ return (await c.mutate(UpdateCourseDocument, v)).updateCourse ?? null;
216
+ }
217
+ async function deleteCourse(c, v) {
218
+ return (await c.mutate(DeleteCourseDocument, v)).deleteCourse ?? null;
219
+ }
220
+ async function createForm(c, v) {
221
+ return (await c.mutate(CreateFormDocument, v)).createForm ?? null;
222
+ }
223
+ async function updateForm(c, v) {
224
+ return (await c.mutate(UpdateFormDocument, v)).updateForm ?? null;
225
+ }
226
+ async function deleteForm(c, v) {
227
+ return (await c.mutate(DeleteFormDocument, v)).deleteForm ?? null;
228
+ }
229
+ async function createContact(c, v) {
230
+ return (await c.mutate(CreateContactDocument, v)).createContact ?? null;
231
+ }
232
+ async function deleteContact(c, v) {
233
+ return (await c.mutate(DeleteContactDocument, v)).deleteContact ?? null;
234
+ }
235
+ async function createDeal(c, v) {
236
+ return (await c.mutate(CreateDealDocument, v)).createDeal ?? null;
237
+ }
238
+ async function updateDeal(c, v) {
239
+ return (await c.mutate(UpdateDealDocument, v)).updateDeal ?? null;
240
+ }
241
+ async function createKbCollection(c, v) {
242
+ return (await c.mutate(CreateKbCollectionDocument, v)).createKbCollection ?? null;
243
+ }
244
+ async function updateKbCollection(c, v) {
245
+ return (await c.mutate(UpdateKbCollectionDocument, v)).updateKbCollection ?? null;
246
+ }
247
+ async function deleteKbCollection(c, v) {
248
+ return (await c.mutate(DeleteKbCollectionDocument, v)).deleteKbCollection ?? null;
249
+ }
250
+ async function createKbArticle(c, v) {
251
+ return (await c.mutate(CreateKbArticleDocument, v)).createKbArticle ?? null;
252
+ }
253
+ async function updateKbArticle(c, v) {
254
+ return (await c.mutate(UpdateKbArticleDocument, v)).updateKbArticle ?? null;
255
+ }
256
+ async function deleteKbArticle(c, v) {
257
+ return (await c.mutate(DeleteKbArticleDocument, v)).deleteKbArticle ?? null;
258
+ }
259
+ async function createChannel(c, v) {
260
+ return (await c.mutate(CreateChannelDocument, v)).createChannel ?? null;
261
+ }
262
+ async function updateChannel(c, v) {
263
+ return (await c.mutate(UpdateChannelDocument, v)).updateChannel ?? null;
264
+ }
265
+ async function deleteChannel(c, v) {
266
+ return (await c.mutate(DeleteChannelDocument, v)).deleteChannel ?? null;
267
+ }
268
+ async function updateEvent(c, v) {
269
+ return (await c.mutate(UpdateEventDocument, v)).updateEvent ?? null;
270
+ }
271
+ async function updateStory(c, v) {
272
+ return (await c.mutate(UpdateStoryDocument, v)).updateStory ?? null;
273
+ }
274
+ async function updateDonationCampaign(c, v) {
275
+ return (await c.mutate(UpdateDonationCampaignDocument, v)).updateDonationCampaign ?? null;
276
+ }
277
+ async function deleteDonationCampaign(c, v) {
278
+ return (await c.mutate(DeleteDonationCampaignDocument, v)).deleteDonationCampaign ?? null;
279
+ }
280
+ async function updateTask(c, v) {
281
+ return (await c.mutate(UpdateTaskDocument, v)).updateTask ?? null;
282
+ }
283
+ async function deleteTask(c, v) {
284
+ return (await c.mutate(DeleteTaskDocument, v)).deleteTask ?? null;
285
+ }
286
+ async function updateNote(c, v) {
287
+ return (await c.mutate(UpdateNoteDocument, v)).updateNote ?? null;
288
+ }
289
+ async function deleteNote(c, v) {
290
+ return (await c.mutate(DeleteNoteDocument, v)).deleteNote ?? null;
291
+ }
292
+ async function updateSpace(c, v) {
293
+ return (await c.mutate(UpdateSpaceDocument, v)).updateSpace ?? null;
294
+ }
295
+ async function deleteSpace(c, v) {
296
+ return (await c.mutate(DeleteSpaceDocument, v)).deleteSpace ?? null;
297
+ }
298
+
299
+ // ../client/src/forms.ts
300
+ async function getForm(client, variables) {
301
+ const result = await client.query(GetFormDocument, variables);
302
+ return result.currentWorkspace?.form ?? null;
303
+ }
304
+ async function listForms(client, variables = {}) {
305
+ const result = await client.query(ListFormsDocument, variables);
306
+ return nodes(result.currentWorkspace?.forms);
307
+ }
308
+
309
+ // ../client/src/help-center.ts
310
+ async function getChannel(client, variables) {
311
+ const result = await client.query(GetChannelDocument, variables);
312
+ return result.currentWorkspace?.channel ?? null;
313
+ }
314
+
315
+ // ../client/src/events.ts
316
+ async function getEvent(client, variables) {
317
+ const result = await client.query(GetEventDocument, variables);
318
+ return result.currentWorkspace?.event ?? null;
319
+ }
320
+ async function listEvents(client, variables = {}) {
321
+ const result = await client.query(ListEventsDocument, variables);
322
+ return nodes(result.currentWorkspace?.events);
323
+ }
324
+ async function createEvent(client, variables) {
325
+ const result = await client.mutate(CreateEventDocument, variables);
326
+ return result.createEvent ?? null;
327
+ }
328
+
329
+ // ../client/src/calls.ts
330
+ async function getCall(client, variables) {
331
+ const result = await client.query(GetCallDocument, variables);
332
+ return result.currentWorkspace?.call ?? null;
333
+ }
334
+ async function listCalls(client, variables = {}) {
335
+ const result = await client.query(ListCallsDocument, variables);
336
+ return nodes(result.currentWorkspace?.calls);
337
+ }
338
+
339
+ // ../client/src/donations.ts
340
+ async function getDonationCampaign(client, variables) {
341
+ const result = await client.query(GetDonationCampaignDocument, variables);
342
+ return result.currentWorkspace?.donationCampaign ?? null;
343
+ }
344
+ async function listDonationCampaigns(client, variables = {}) {
345
+ const result = await client.query(ListDonationCampaignsDocument, variables);
346
+ return nodes(result.currentWorkspace?.donationCampaigns);
347
+ }
348
+ async function createDonationCampaign(client, variables) {
349
+ const result = await client.mutate(CreateDonationCampaignDocument, variables);
350
+ return result.createDonationCampaign ?? null;
351
+ }
352
+
353
+ // ../client/src/stories.ts
354
+ async function getStory(client, variables) {
355
+ const result = await client.query(GetStoryDocument, variables);
356
+ return result.currentWorkspace?.story ?? null;
357
+ }
358
+ async function listStories(client, variables = {}) {
359
+ const result = await client.query(ListStoriesDocument, variables);
360
+ return nodes(result.currentWorkspace?.storiesConnection);
361
+ }
362
+ async function createStory(client, variables) {
363
+ const result = await client.mutate(CreateStoryDocument, variables);
364
+ return result.createStory ?? null;
365
+ }
366
+
367
+ // ../client/src/people.ts
368
+ async function listEmployees(client, variables = {}) {
369
+ const result = await client.query(ListEmployeesDocument, variables);
370
+ return nodes(result.currentWorkspace?.employees);
371
+ }
372
+
373
+ // ../client/src/bookings.ts
374
+ async function getBooking(client, variables) {
375
+ const result = await client.query(GetBookingDocument, variables);
376
+ return result.currentWorkspace?.booking ?? null;
377
+ }
378
+ async function listBookings(client, variables = {}) {
379
+ const result = await client.query(ListBookingsDocument, variables);
380
+ return nodes(result.currentWorkspace?.bookings);
381
+ }
382
+
383
+ // ../client/src/courses.ts
384
+ async function getCourse(client, variables) {
385
+ const result = await client.query(GetCourseDocument, variables);
386
+ return result.currentWorkspace?.course ?? null;
387
+ }
388
+ async function listCourses(client, variables = {}) {
389
+ const result = await client.query(ListCoursesDocument, variables);
390
+ return nodes(result.currentWorkspace?.courses);
391
+ }
392
+
393
+ // ../client/src/campaigns.ts
394
+ async function getCampaign(client, variables) {
395
+ const result = await client.query(GetCampaignDocument, variables);
396
+ return result.currentWorkspace?.campaign ?? null;
397
+ }
398
+ async function listCampaigns(client, variables = {}) {
399
+ const result = await client.query(ListCampaignsDocument, variables);
400
+ return nodes(result.currentWorkspace?.campaigns);
401
+ }
402
+
403
+ // ../client/src/contacts.ts
404
+ async function getContact(client, variables) {
405
+ const result = await client.query(GetContactDocument, variables);
406
+ return result.currentWorkspace?.contact ?? null;
407
+ }
408
+ async function listContacts(client) {
409
+ const result = await client.query(ListContactsDocument);
410
+ return result.currentWorkspace?.contacts ?? [];
411
+ }
412
+ async function getDeal(client, variables) {
413
+ const result = await client.query(GetDealDocument, variables);
414
+ return result.currentWorkspace?.deal ?? null;
415
+ }
416
+ async function listDeals(client, variables = {}) {
417
+ const result = await client.query(ListDealsDocument, variables);
418
+ return nodes(result.currentWorkspace?.deals);
419
+ }
420
+
421
+ // ../client/src/kb.ts
422
+ async function getKbArticle(client, variables) {
423
+ const result = await client.query(GetKbArticleDocument, variables);
424
+ return result.currentWorkspace?.kbArticle ?? null;
425
+ }
426
+ async function listKbArticles(client, variables = {}) {
427
+ const result = await client.query(ListKbArticlesDocument, variables);
428
+ return nodes(result.currentWorkspace?.kbArticles);
429
+ }
430
+ async function getKbCollection(client, variables) {
431
+ const result = await client.query(GetKbCollectionDocument, variables);
432
+ return result.currentWorkspace?.kbCollection ?? null;
433
+ }
434
+ async function listKbCollections(client, variables = {}) {
435
+ const result = await client.query(ListKbCollectionsDocument, variables);
436
+ return nodes(result.currentWorkspace?.kbCollections);
437
+ }
438
+
439
+ // src/config.ts
440
+ var CONFIG_DIR = path.join(os.homedir(), ".uidu");
441
+ var CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
442
+ var DEFAULT_CLIENT_ID = "O8cLWB5PT4Aalb1_wnnUbpDaZ-rUGw3trGM-V_luNzE";
443
+ function readConfig() {
444
+ try {
445
+ return JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
446
+ } catch {
447
+ return {};
448
+ }
449
+ }
450
+ function writeConfig(config) {
451
+ fs.mkdirSync(CONFIG_DIR, { recursive: true });
452
+ fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + "\n", {
453
+ mode: 384
454
+ });
455
+ }
456
+ function clearConfig() {
457
+ try {
458
+ fs.rmSync(CONFIG_FILE);
459
+ } catch {
460
+ }
461
+ }
462
+ var configPath = CONFIG_FILE;
463
+ function resolveAuth(overrides = {}) {
464
+ const file = readConfig();
465
+ const workspace = overrides.workspace ?? process.env.UIDU_WORKSPACE ?? file.workspace;
466
+ if (!workspace) {
467
+ throw new Error(
468
+ "No workspace configured. Set UIDU_WORKSPACE, pass --workspace, or run `uidu login`."
469
+ );
470
+ }
471
+ return {
472
+ workspace,
473
+ endpoint: overrides.endpoint ?? process.env.UIDU_ENDPOINT ?? file.endpoint,
474
+ publicToken: overrides.publicToken ?? process.env.UIDU_PUBLIC_TOKEN ?? file.publicToken,
475
+ apiKey: overrides.apiKey ?? process.env.UIDU_API_KEY ?? file.apiKey
476
+ };
477
+ }
478
+ function makeClient(auth) {
479
+ return createClient({
480
+ workspace: auth.workspace,
481
+ endpoint: auth.endpoint,
482
+ publicToken: auth.publicToken,
483
+ apiKey: auth.apiKey
484
+ });
485
+ }
486
+
487
+ // src/output.ts
488
+ import pc from "picocolors";
489
+ function emit(data, opts) {
490
+ if (opts.json) {
491
+ process.stdout.write(JSON.stringify(data, null, 2) + "\n");
492
+ return;
493
+ }
494
+ if (typeof data === "string") {
495
+ process.stdout.write(data + "\n");
496
+ return;
497
+ }
498
+ process.stdout.write(JSON.stringify(data, null, 2) + "\n");
499
+ }
500
+ function info(message) {
501
+ process.stderr.write(pc.dim(message) + "\n");
502
+ }
503
+ function fail(message, opts) {
504
+ if (opts.json) {
505
+ process.stdout.write(
506
+ JSON.stringify({ error: message }, null, 2) + "\n"
507
+ );
508
+ } else {
509
+ process.stderr.write(pc.red(`\u2716 ${message}`) + "\n");
510
+ }
511
+ process.exit(1);
512
+ }
513
+
514
+ // src/oauth.ts
515
+ import { spawn } from "child_process";
516
+ import crypto from "crypto";
517
+ import http from "http";
518
+ var DEFAULT_OAUTH_BASE = "https://me.uidu.org/oauth";
519
+ var DEFAULT_CALLBACK_PORT = 4123;
520
+ function tokenError(status, json) {
521
+ const desc = json.error_description ?? json.error ?? `HTTP ${status}`;
522
+ return new Error(`Login failed: ${desc}`);
523
+ }
524
+ async function passwordGrant(opts) {
525
+ const body = new URLSearchParams({
526
+ grant_type: "password",
527
+ email: opts.email,
528
+ password: opts.password,
529
+ client_id: opts.clientId
530
+ });
531
+ if (opts.clientSecret) body.set("client_secret", opts.clientSecret);
532
+ return postToken(`${opts.base}/token`, body);
533
+ }
534
+ function pkcePair() {
535
+ const verifier = crypto.randomBytes(32).toString("base64url");
536
+ const challenge = crypto.createHash("sha256").update(verifier).digest("base64url");
537
+ return { verifier, challenge };
538
+ }
539
+ function randomState() {
540
+ return crypto.randomBytes(16).toString("base64url");
541
+ }
542
+ function buildAuthorizeUrl(opts) {
543
+ const params = new URLSearchParams({
544
+ client_id: opts.clientId,
545
+ response_type: "code",
546
+ redirect_uri: opts.redirectUri,
547
+ scope: opts.scope ?? "public",
548
+ state: opts.state,
549
+ code_challenge: opts.challenge,
550
+ code_challenge_method: "S256"
551
+ });
552
+ return `${opts.base}/authorize?${params.toString()}`;
553
+ }
554
+ async function exchangeAuthCode(opts) {
555
+ const body = new URLSearchParams({
556
+ grant_type: "authorization_code",
557
+ code: opts.code,
558
+ redirect_uri: opts.redirectUri,
559
+ client_id: opts.clientId,
560
+ code_verifier: opts.verifier
561
+ });
562
+ return postToken(`${opts.base}/token`, body);
563
+ }
564
+ async function postToken(url, body) {
565
+ const res = await fetch(url, {
566
+ method: "POST",
567
+ headers: {
568
+ "Content-Type": "application/x-www-form-urlencoded",
569
+ Accept: "application/json"
570
+ },
571
+ body
572
+ });
573
+ const json = await res.json().catch(() => ({}));
574
+ if (!res.ok || typeof json.access_token !== "string") {
575
+ throw tokenError(res.status, json);
576
+ }
577
+ return json;
578
+ }
579
+ function waitForCallback(opts) {
580
+ return new Promise((resolve, reject) => {
581
+ const server = http.createServer((req, res) => {
582
+ const url = new URL(req.url ?? "/", `http://localhost:${opts.port}`);
583
+ if (url.pathname !== "/callback") {
584
+ res.writeHead(404).end();
585
+ return;
586
+ }
587
+ const err = url.searchParams.get("error");
588
+ const code = url.searchParams.get("code");
589
+ const state = url.searchParams.get("state");
590
+ const done = (ok, message) => {
591
+ res.writeHead(ok ? 200 : 400, { "Content-Type": "text/html" });
592
+ res.end(
593
+ `<!doctype html><meta charset="utf-8"><body style="font:15px system-ui;padding:3rem;text-align:center">${message}</body>`
594
+ );
595
+ server.close();
596
+ };
597
+ if (err) {
598
+ done(false, `Login failed: ${err}. You can close this tab.`);
599
+ reject(new Error(`Authorization failed: ${err}`));
600
+ } else if (!code || state !== opts.expectedState) {
601
+ done(false, "Login failed: invalid response. You can close this tab.");
602
+ reject(new Error("Invalid authorization response (state mismatch)."));
603
+ } else {
604
+ done(true, "\u2713 Logged in to uidu. You can close this tab and return to the terminal.");
605
+ resolve(code);
606
+ }
607
+ });
608
+ server.on("error", reject);
609
+ server.listen(opts.port, () => {
610
+ });
611
+ const timeout = opts.timeoutMs ?? 18e4;
612
+ setTimeout(() => {
613
+ server.close();
614
+ reject(new Error(`Timed out after ${Math.round(timeout / 1e3)}s waiting for the browser.`));
615
+ }, timeout).unref();
616
+ });
617
+ }
618
+ function openBrowser(url) {
619
+ const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "cmd" : "xdg-open";
620
+ const args = process.platform === "win32" ? ["/c", "start", "", url] : [url];
621
+ try {
622
+ const child = spawn(cmd, args, { stdio: "ignore", detached: true });
623
+ child.on("error", () => {
624
+ });
625
+ child.unref();
626
+ } catch {
627
+ }
628
+ }
629
+
630
+ // src/commands/auth.ts
631
+ function interactive(opts) {
632
+ return Boolean(process.stdout.isTTY) && !opts.json;
633
+ }
634
+ async function login(opts) {
635
+ const stored = readConfig();
636
+ const clientId = opts.clientId ?? process.env.UIDU_CLIENT_ID ?? stored.clientId ?? DEFAULT_CLIENT_ID;
637
+ if (!clientId) {
638
+ fail(
639
+ "Missing OAuth client id. Register a public Doorkeeper::Application for the CLI, then pass --client-id or set UIDU_CLIENT_ID.",
640
+ opts
641
+ );
642
+ }
643
+ const oauthBase = opts.oauthBase ?? process.env.UIDU_OAUTH_BASE ?? stored.oauthBase ?? DEFAULT_OAUTH_BASE;
644
+ const workspace = opts.workspace ?? process.env.UIDU_WORKSPACE ?? stored.workspace;
645
+ const usePassword = opts.passwordGrant || Boolean(process.env.UIDU_PASSWORD);
646
+ let token;
647
+ let email = opts.email ?? process.env.UIDU_EMAIL;
648
+ if (usePassword) {
649
+ let pwd = process.env.UIDU_PASSWORD;
650
+ if ((!email || !pwd) && !interactive(opts)) {
651
+ fail(
652
+ "Non-interactive login needs --email + UIDU_PASSWORD, or run on a TTY for the browser flow.",
653
+ opts
654
+ );
655
+ }
656
+ if (!email) {
657
+ const a = await text({ message: "uidu account email" });
658
+ if (isCancel(a)) fail("Cancelled.", opts);
659
+ email = a;
660
+ }
661
+ if (!pwd) {
662
+ const a = await passwordPrompt({ message: "Password" });
663
+ if (isCancel(a)) fail("Cancelled.", opts);
664
+ pwd = a;
665
+ }
666
+ try {
667
+ token = await passwordGrant({
668
+ base: oauthBase,
669
+ clientId,
670
+ clientSecret: opts.clientSecret ?? process.env.UIDU_CLIENT_SECRET,
671
+ email,
672
+ password: pwd
673
+ });
674
+ } catch (err) {
675
+ fail(err instanceof Error ? err.message : String(err), opts);
676
+ }
677
+ } else {
678
+ const port = opts.port ?? DEFAULT_CALLBACK_PORT;
679
+ const redirectUri = `http://localhost:${port}/callback`;
680
+ const { verifier, challenge } = pkcePair();
681
+ const state = randomState();
682
+ const url = buildAuthorizeUrl({
683
+ base: oauthBase,
684
+ clientId,
685
+ redirectUri,
686
+ state,
687
+ challenge
688
+ });
689
+ const callback = waitForCallback({ port, expectedState: state });
690
+ const noBrowser = opts.noBrowser || Boolean(process.env.UIDU_NO_BROWSER) || !process.stdout.isTTY;
691
+ if (noBrowser) {
692
+ info(`Open this URL to sign in to uidu:
693
+ ${url}`);
694
+ } else {
695
+ info("Opening your browser to sign in to uidu\u2026");
696
+ info(`If it doesn't open, visit:
697
+ ${url}`);
698
+ openBrowser(url);
699
+ }
700
+ let code;
701
+ try {
702
+ code = await callback;
703
+ } catch (err) {
704
+ fail(err instanceof Error ? err.message : String(err), opts);
705
+ }
706
+ try {
707
+ token = await exchangeAuthCode({
708
+ base: oauthBase,
709
+ clientId,
710
+ redirectUri,
711
+ code,
712
+ verifier
713
+ });
714
+ } catch (err) {
715
+ fail(err instanceof Error ? err.message : String(err), opts);
716
+ }
717
+ }
718
+ const expiresAt = token.expires_in ? new Date(Date.now() + token.expires_in * 1e3).toISOString() : void 0;
719
+ writeConfig({
720
+ ...stored,
721
+ workspace: workspace ?? stored.workspace,
722
+ apiKey: token.access_token,
723
+ refreshToken: token.refresh_token ?? stored.refreshToken,
724
+ expiresAt,
725
+ clientId,
726
+ oauthBase,
727
+ account: email ? { email } : stored.account
728
+ });
729
+ emit(
730
+ { ok: true, account: email ?? null, workspace: workspace ?? null, expiresAt },
731
+ opts
732
+ );
733
+ }
734
+ function logout(opts) {
735
+ clearConfig();
736
+ emit({ ok: true, message: "Cleared stored credentials." }, opts);
737
+ }
738
+ function whoami(opts) {
739
+ const config = readConfig();
740
+ const expired = config.expiresAt ? new Date(config.expiresAt).getTime() < Date.now() : null;
741
+ emit(
742
+ {
743
+ workspace: config.workspace ?? process.env.UIDU_WORKSPACE ?? null,
744
+ account: config.account?.email ?? null,
745
+ hasPublicToken: Boolean(
746
+ config.publicToken ?? process.env.UIDU_PUBLIC_TOKEN
747
+ ),
748
+ hasApiKey: Boolean(config.apiKey ?? process.env.UIDU_API_KEY),
749
+ tokenExpiresAt: config.expiresAt ?? null,
750
+ tokenExpired: expired,
751
+ configPath
752
+ },
753
+ opts
754
+ );
755
+ }
756
+
757
+ // src/commands/authoring.ts
758
+ function requireBearer(ctx) {
759
+ if (!ctx.auth.apiKey) {
760
+ fail(
761
+ "Authoring requires a Bearer token. Set UIDU_API_KEY (or run `uidu login`, once implemented).",
762
+ ctx
763
+ );
764
+ }
765
+ }
766
+ function attributesFrom(args, ctx) {
767
+ let attrs = {};
768
+ if (args.attributes) {
769
+ try {
770
+ attrs = JSON.parse(args.attributes);
771
+ } catch {
772
+ fail("--attributes must be valid JSON.", ctx);
773
+ }
774
+ }
775
+ if (args.name != null) attrs.name = args.name;
776
+ if (args.slug != null) attrs.slug = args.slug;
777
+ return attrs;
778
+ }
779
+ function checkErrors(payload, ctx) {
780
+ const errors = payload?.errors ?? [];
781
+ if (errors.length > 0) {
782
+ fail(`Mutation returned errors: ${JSON.stringify(errors)}`, ctx);
783
+ }
784
+ }
785
+ function buildAuthoringContext(overrides, opts) {
786
+ return { auth: resolveAuth(overrides), json: opts.json };
787
+ }
788
+ async function workspaceCreate(ctx, args) {
789
+ requireBearer(ctx);
790
+ const client = makeClient(ctx.auth);
791
+ const attributes = attributesFrom(args, ctx);
792
+ const payload = await createWorkspace(client, {
793
+ input: { attributes }
794
+ });
795
+ checkErrors(payload, ctx);
796
+ emit(payload, ctx);
797
+ }
798
+ async function projectCreate(ctx, args) {
799
+ requireBearer(ctx);
800
+ const client = makeClient(ctx.auth);
801
+ const attributes = attributesFrom(args, ctx);
802
+ const payload = await createProject(client, {
803
+ input: { attributes }
804
+ });
805
+ checkErrors(payload, ctx);
806
+ emit(payload, ctx);
807
+ }
808
+ async function pageCreate(ctx, args) {
809
+ requireBearer(ctx);
810
+ const client = makeClient(ctx.auth);
811
+ const attributes = attributesFrom(args, ctx);
812
+ const payload = await createPage(client, {
813
+ input: { attributes }
814
+ });
815
+ checkErrors(payload, ctx);
816
+ emit(payload, ctx);
817
+ }
818
+ async function pageBlockCreate(ctx, args) {
819
+ requireBearer(ctx);
820
+ const client = makeClient(ctx.auth);
821
+ const attributes = attributesFrom(args, ctx);
822
+ const payload = await createPageBlock(client, {
823
+ input: { attributes }
824
+ });
825
+ checkErrors(payload, ctx);
826
+ emit(payload, ctx);
827
+ }
828
+ async function fieldValueCreate(ctx, args) {
829
+ requireBearer(ctx);
830
+ const client = makeClient(ctx.auth);
831
+ const attributes = attributesFrom(args, ctx);
832
+ const payload = await createFieldValue(client, {
833
+ input: { attributes }
834
+ });
835
+ checkErrors(payload, ctx);
836
+ emit(payload, ctx);
837
+ }
838
+ async function generateCredentials(ctx) {
839
+ requireBearer(ctx);
840
+ const client = makeClient(ctx.auth);
841
+ const payload = await generateWorkspaceApiCredentials(client, {
842
+ input: {}
843
+ });
844
+ checkErrors(payload, ctx);
845
+ emit(payload, ctx);
846
+ }
847
+
848
+ // src/commands/create.ts
849
+ import { spawn as spawn2 } from "child_process";
850
+ function create(args, _opts) {
851
+ info("Delegating to create-uidu-app\u2026");
852
+ return new Promise((resolve) => {
853
+ const child = spawn2("npm", ["create", "uidu-app@latest", ...args], {
854
+ stdio: "inherit"
855
+ });
856
+ child.on("close", (code) => resolve(code ?? 0));
857
+ child.on("error", () => resolve(1));
858
+ });
859
+ }
860
+
861
+ // src/commands/read.ts
862
+ function requireProject(ctx) {
863
+ const projectId = ctx.projectId ?? process.env.UIDU_PROJECT_ID;
864
+ if (!projectId) {
865
+ fail(
866
+ "This command needs a project. Pass --project <id> or set UIDU_PROJECT_ID.",
867
+ ctx
868
+ );
869
+ }
870
+ return projectId;
871
+ }
872
+ async function pagesList(ctx) {
873
+ const client = makeClient(ctx.auth);
874
+ const projectId = requireProject(ctx);
875
+ const pages = await listPages(client, { projectId, first: ctx.first ?? 100 });
876
+ emit(pages, ctx);
877
+ }
878
+ async function pageGet(ctx, slug) {
879
+ if (!slug) fail("Usage: uidu page get <slug> [--project <id>]", ctx);
880
+ const client = makeClient(ctx.auth);
881
+ const projectId = requireProject(ctx);
882
+ const page = await getPage(client, { projectId, slug });
883
+ if (!page) fail(`Page not found: ${slug}`, ctx);
884
+ emit(page, ctx);
885
+ }
886
+ function buildReadContext(overrides, opts) {
887
+ return {
888
+ auth: resolveAuth(overrides),
889
+ json: opts.json,
890
+ projectId: opts.projectId,
891
+ first: opts.first
892
+ };
893
+ }
894
+
895
+ // src/resources.ts
896
+ function createVars(attributes) {
897
+ return { input: { attributes } };
898
+ }
899
+ function updateVars(id, attributes) {
900
+ return { input: { id, attributes } };
901
+ }
902
+ function deleteVars(id) {
903
+ return { input: { id } };
904
+ }
905
+ var RESOURCES = {
906
+ events: {
907
+ list: (c, first) => listEvents(c, { first }),
908
+ get: (c, id) => getEvent(c, { id }),
909
+ create: (c, a) => createEvent(c, createVars(a)),
910
+ update: (c, id, a) => updateEvent(c, updateVars(id, a))
911
+ },
912
+ stories: {
913
+ list: (c, first) => listStories(c, { first }),
914
+ get: (c, id) => getStory(c, { id }),
915
+ create: (c, a) => createStory(c, createVars(a)),
916
+ update: (c, id, a) => updateStory(c, updateVars(id, a))
917
+ },
918
+ donations: {
919
+ list: (c, first) => listDonationCampaigns(c, { first }),
920
+ get: (c, id) => getDonationCampaign(c, { id }),
921
+ create: (c, a) => createDonationCampaign(c, createVars(a)),
922
+ update: (c, id, a) => updateDonationCampaign(c, updateVars(id, a)),
923
+ delete: (c, id) => deleteDonationCampaign(c, deleteVars(id))
924
+ },
925
+ courses: {
926
+ list: (c, first) => listCourses(c, { first }),
927
+ get: (c, id) => getCourse(c, { id }),
928
+ create: (c, a) => createCourse(c, createVars(a)),
929
+ update: (c, id, a) => updateCourse(c, updateVars(id, a)),
930
+ delete: (c, id) => deleteCourse(c, deleteVars(id))
931
+ },
932
+ forms: {
933
+ list: (c, first) => listForms(c, { first }),
934
+ get: (c, id) => getForm(c, { id }),
935
+ create: (c, a) => createForm(c, createVars(a)),
936
+ update: (c, id, a) => updateForm(c, updateVars(id, a)),
937
+ delete: (c, id) => deleteForm(c, deleteVars(id))
938
+ },
939
+ contacts: {
940
+ list: (c) => listContacts(c),
941
+ get: (c, id) => getContact(c, { id }),
942
+ create: (c, a) => createContact(c, createVars(a)),
943
+ delete: (c, id) => deleteContact(c, deleteVars(id))
944
+ },
945
+ deals: {
946
+ list: (c, first) => listDeals(c, { first }),
947
+ get: (c, id) => getDeal(c, { id }),
948
+ create: (c, a) => createDeal(c, createVars(a)),
949
+ update: (c, id, a) => updateDeal(c, updateVars(id, a))
950
+ },
951
+ employees: {
952
+ list: (c, first) => listEmployees(c, { first })
953
+ },
954
+ bookings: {
955
+ list: (c, first) => listBookings(c, { first }),
956
+ get: (c, id) => getBooking(c, { id })
957
+ },
958
+ calls: {
959
+ list: (c, first) => listCalls(c, { first }),
960
+ get: (c, id) => getCall(c, { id })
961
+ },
962
+ campaigns: {
963
+ list: (c, first) => listCampaigns(c, { first }),
964
+ get: (c, id) => getCampaign(c, { id })
965
+ },
966
+ "kb-collections": {
967
+ list: (c, first) => listKbCollections(c, { first }),
968
+ get: (c, id) => getKbCollection(c, { id }),
969
+ create: (c, a) => createKbCollection(c, createVars(a)),
970
+ update: (c, id, a) => updateKbCollection(c, updateVars(id, a)),
971
+ delete: (c, id) => deleteKbCollection(c, deleteVars(id))
972
+ },
973
+ "kb-articles": {
974
+ list: (c, first) => listKbArticles(c, { first }),
975
+ get: (c, id) => getKbArticle(c, { id }),
976
+ create: (c, a) => createKbArticle(c, createVars(a)),
977
+ update: (c, id, a) => updateKbArticle(c, updateVars(id, a)),
978
+ delete: (c, id) => deleteKbArticle(c, deleteVars(id))
979
+ },
980
+ channel: {
981
+ get: (c, id) => getChannel(c, { id }),
982
+ create: (c, a) => createChannel(c, createVars(a)),
983
+ update: (c, id, a) => updateChannel(c, updateVars(id, a)),
984
+ delete: (c, id) => deleteChannel(c, deleteVars(id))
985
+ },
986
+ // Write-only scopes (no list/get in the client yet).
987
+ tasks: {
988
+ create: (c, a) => createTask(c, createVars(a)),
989
+ update: (c, id, a) => updateTask(c, updateVars(id, a)),
990
+ delete: (c, id) => deleteTask(c, deleteVars(id))
991
+ },
992
+ notes: {
993
+ create: (c, a) => createNote(c, createVars(a)),
994
+ update: (c, id, a) => updateNote(c, updateVars(id, a)),
995
+ delete: (c, id) => deleteNote(c, deleteVars(id))
996
+ },
997
+ spaces: {
998
+ create: (c, a) => createSpace(c, createVars(a)),
999
+ update: (c, id, a) => updateSpace(c, updateVars(id, a)),
1000
+ delete: (c, id) => deleteSpace(c, deleteVars(id))
1001
+ }
1002
+ };
1003
+ function isResource(name) {
1004
+ return Object.prototype.hasOwnProperty.call(RESOURCES, name);
1005
+ }
1006
+ function requireBearer2(auth, opts) {
1007
+ if (!auth.apiKey) {
1008
+ fail(
1009
+ "Authoring requires a Bearer token. Run `uidu login` or set UIDU_API_KEY.",
1010
+ opts
1011
+ );
1012
+ }
1013
+ }
1014
+ function checkErrors2(payload, opts) {
1015
+ const errors = payload?.errors ?? [];
1016
+ if (errors.length > 0) {
1017
+ fail(`Mutation returned errors: ${JSON.stringify(errors)}`, opts);
1018
+ }
1019
+ }
1020
+ async function runResource(name, action, rest, input) {
1021
+ const res = RESOURCES[name];
1022
+ const opts = { json: input.json };
1023
+ const auth = resolveAuth(input.authOverrides);
1024
+ const client = makeClient(auth);
1025
+ switch (action) {
1026
+ case "list": {
1027
+ if (!res.list) fail(`\`${name}\` does not support list.`, opts);
1028
+ emit(await res.list(client, input.first ?? 100), opts);
1029
+ return;
1030
+ }
1031
+ case "get": {
1032
+ const id = rest[0];
1033
+ if (!id) fail(`Usage: uidu ${name} get <id>`, opts);
1034
+ if (!res.get) fail(`\`${name}\` does not support get.`, opts);
1035
+ const record = await res.get(client, id);
1036
+ if (!record) fail(`${name} not found: ${id}`, opts);
1037
+ emit(record, opts);
1038
+ return;
1039
+ }
1040
+ case "create": {
1041
+ if (!res.create) fail(`\`${name}\` does not support create.`, opts);
1042
+ requireBearer2(auth, opts);
1043
+ const payload = await res.create(client, input.attributes);
1044
+ checkErrors2(payload, opts);
1045
+ emit(payload, opts);
1046
+ return;
1047
+ }
1048
+ case "update": {
1049
+ const id = rest[0];
1050
+ if (!id) fail(`Usage: uidu ${name} update <id> --attributes '<json>'`, opts);
1051
+ if (!res.update) fail(`\`${name}\` does not support update.`, opts);
1052
+ requireBearer2(auth, opts);
1053
+ const payload = await res.update(client, id, input.attributes);
1054
+ checkErrors2(payload, opts);
1055
+ emit(payload, opts);
1056
+ return;
1057
+ }
1058
+ case "delete": {
1059
+ const id = rest[0];
1060
+ if (!id) fail(`Usage: uidu ${name} delete <id>`, opts);
1061
+ if (!res.delete) fail(`\`${name}\` does not support delete.`, opts);
1062
+ requireBearer2(auth, opts);
1063
+ const payload = await res.delete(client, id);
1064
+ checkErrors2(payload, opts);
1065
+ emit(payload, opts);
1066
+ return;
1067
+ }
1068
+ default:
1069
+ fail(`Unknown action for ${name}: ${action ?? "(none)"}.`, opts);
1070
+ }
1071
+ }
1072
+
1073
+ // src/index.ts
1074
+ var VERSION = "0.0.0";
1075
+ var HELP = `${pc2.bold("uidu")} \u2014 the uidu CLI ${pc2.dim(`v${VERSION}`)}
1076
+
1077
+ ${pc2.bold("Usage")}
1078
+ uidu <command> [subcommand] [args] [options]
1079
+
1080
+ ${pc2.bold("Auth")}
1081
+ login Sign in via browser (OAuth Auth Code + PKCE)
1082
+ ${pc2.dim("--client-id (or UIDU_CLIENT_ID) [--port 4123]")}
1083
+ ${pc2.dim("--password-grant / UIDU_PASSWORD \u2192 non-interactive (CI, agents)")}
1084
+ logout Clear stored credentials
1085
+ whoami Show the current workspace / auth state
1086
+
1087
+ ${pc2.bold("CMS")} ${pc2.dim("(pages need --project <id>)")}
1088
+ pages list List CMS pages
1089
+ page get <slug> Fetch one CMS page
1090
+ page create Create a page ${pc2.dim("--name --slug | --attributes <json>")}
1091
+ block create Create a page block ${pc2.dim("--attributes <json>")}
1092
+ field create Create a field value ${pc2.dim("--attributes <json>")}
1093
+
1094
+ ${pc2.bold("Entities")} ${pc2.dim("<entity> list | get <id> | create | update <id> | delete <id>")}
1095
+ ${pc2.dim("events, stories, donations, courses, forms, contacts, deals, employees,")}
1096
+ ${pc2.dim("bookings, calls, campaigns, kb-collections, kb-articles, channel,")}
1097
+ ${pc2.dim("tasks, notes, spaces (write-only)")}
1098
+ ${pc2.dim("writes need a Bearer token \xB7 --attributes <json> / --name / --slug \xB7 --first <n> for lists")}
1099
+
1100
+ ${pc2.bold("Provisioning")} ${pc2.dim("(Bearer / UIDU_API_KEY)")}
1101
+ workspace create Create a workspace ${pc2.dim("--name | --attributes <json>")}
1102
+ workspace credentials Generate workspace API credentials
1103
+ project create Create a project ${pc2.dim("--attributes <json>")}
1104
+
1105
+ ${pc2.bold("Scaffold")}
1106
+ create [name] [...] Scaffold a new app (delegates to create-uidu-app)
1107
+
1108
+ ${pc2.bold("Options")}
1109
+ --json Machine-readable output (for agents)
1110
+ --workspace <slug> Override the workspace
1111
+ --project <id> Project id for CMS reads
1112
+ --first <n> Page size for list commands
1113
+ -h, --help Show this help
1114
+ -v, --version Show version
1115
+
1116
+ ${pc2.dim("Config resolves in order: --flags > env (UIDU_*) > ~/.uidu/config.json")}
1117
+ ${pc2.dim("Roadmap & auth model: plans/ai-connector.md")}
1118
+ `;
1119
+ async function main() {
1120
+ const argv = mri(process.argv.slice(2), {
1121
+ alias: { h: "help", v: "version" },
1122
+ boolean: ["help", "version", "json", "password-grant", "browser"],
1123
+ string: [
1124
+ "workspace",
1125
+ "project",
1126
+ "endpoint",
1127
+ "public-token",
1128
+ "api-key",
1129
+ "attributes",
1130
+ "name",
1131
+ "slug",
1132
+ "email",
1133
+ "client-id",
1134
+ "client-secret",
1135
+ "oauth-base",
1136
+ "port"
1137
+ ]
1138
+ });
1139
+ if (argv.version) {
1140
+ console.log(`uidu v${VERSION}`);
1141
+ return;
1142
+ }
1143
+ const [group, action, ...rest] = argv._;
1144
+ if (argv.help || !group) {
1145
+ console.log(HELP);
1146
+ return;
1147
+ }
1148
+ const opts = { json: Boolean(argv.json) };
1149
+ const authOverrides = {
1150
+ workspace: argv.workspace,
1151
+ endpoint: argv.endpoint,
1152
+ publicToken: argv["public-token"],
1153
+ apiKey: argv["api-key"]
1154
+ };
1155
+ const readOpts = {
1156
+ ...opts,
1157
+ projectId: argv.project,
1158
+ first: argv.first != null ? Number(argv.first) : void 0
1159
+ };
1160
+ const readCtx = () => buildReadContext(authOverrides, readOpts);
1161
+ const authoringArgs = {
1162
+ attributes: argv.attributes,
1163
+ name: argv.name,
1164
+ slug: argv.slug
1165
+ };
1166
+ const authoringCtx = () => buildAuthoringContext(authOverrides, opts);
1167
+ const resourceAttributes = (() => {
1168
+ let a = {};
1169
+ if (typeof argv.attributes === "string") {
1170
+ try {
1171
+ a = JSON.parse(argv.attributes);
1172
+ } catch {
1173
+ fail("--attributes must be valid JSON.", opts);
1174
+ }
1175
+ }
1176
+ if (argv.name != null) a.name = argv.name;
1177
+ if (argv.slug != null) a.slug = argv.slug;
1178
+ return a;
1179
+ })();
1180
+ const loginOptions = {
1181
+ ...opts,
1182
+ email: argv.email,
1183
+ workspace: argv.workspace,
1184
+ clientId: argv["client-id"],
1185
+ clientSecret: argv["client-secret"],
1186
+ oauthBase: argv["oauth-base"],
1187
+ port: argv.port != null ? Number(argv.port) : void 0,
1188
+ passwordGrant: Boolean(argv["password-grant"]),
1189
+ noBrowser: argv.browser === false
1190
+ };
1191
+ try {
1192
+ switch (group) {
1193
+ case "login":
1194
+ return await login(loginOptions);
1195
+ case "logout":
1196
+ return logout(opts);
1197
+ case "whoami":
1198
+ return whoami(opts);
1199
+ case "pages":
1200
+ if (action === "list") return await pagesList(readCtx());
1201
+ return unknown(`pages ${action ?? ""}`.trim(), opts);
1202
+ case "page":
1203
+ if (action === "get") return await pageGet(readCtx(), rest[0]);
1204
+ if (action === "create") return await pageCreate(authoringCtx(), authoringArgs);
1205
+ return unknown(`page ${action ?? ""}`.trim(), opts);
1206
+ case "block":
1207
+ if (action === "create")
1208
+ return await pageBlockCreate(authoringCtx(), authoringArgs);
1209
+ return unknown(`block ${action ?? ""}`.trim(), opts);
1210
+ case "field":
1211
+ if (action === "create")
1212
+ return await fieldValueCreate(authoringCtx(), authoringArgs);
1213
+ return unknown(`field ${action ?? ""}`.trim(), opts);
1214
+ case "workspace":
1215
+ if (action === "create")
1216
+ return await workspaceCreate(authoringCtx(), authoringArgs);
1217
+ if (action === "credentials")
1218
+ return await generateCredentials(authoringCtx());
1219
+ return unknown(`workspace ${action ?? ""}`.trim(), opts);
1220
+ case "project":
1221
+ if (action === "create")
1222
+ return await projectCreate(authoringCtx(), authoringArgs);
1223
+ return unknown(`project ${action ?? ""}`.trim(), opts);
1224
+ case "create": {
1225
+ const passthrough = [action, ...rest].filter(Boolean);
1226
+ const code = await create(passthrough, opts);
1227
+ process.exit(code);
1228
+ return;
1229
+ }
1230
+ default:
1231
+ if (isResource(group)) {
1232
+ return await runResource(group, action, rest, {
1233
+ authOverrides,
1234
+ json: opts.json,
1235
+ first: readOpts.first,
1236
+ attributes: resourceAttributes
1237
+ });
1238
+ }
1239
+ return unknown(group, opts);
1240
+ }
1241
+ } catch (err) {
1242
+ fail(err instanceof Error ? err.message : String(err), opts);
1243
+ }
1244
+ }
1245
+ function unknown(command, opts) {
1246
+ fail(`Unknown command: ${command}. Run \`uidu --help\`.`, opts);
1247
+ }
1248
+ void main();