@jsb188/graphql 1.1.8 → 1.1.11
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/cache/config.ts +66 -42
- package/cache/index.test.ts +881 -0
- package/cache/index.ts +1815 -979
- package/cache/persist.ts +721 -0
- package/cache/store.ts +437 -0
- package/client/data-table-realtime-subscriptions.test.ts +740 -0
- package/client/data-table-realtime-subscriptions.ts +955 -0
- package/client/data-table-realtime.test.ts +792 -0
- package/client/data-table-realtime.ts +1218 -0
- package/client/fragment-realtime-sequence.ts +52 -0
- package/client/index.ts +4 -2
- package/client/open-sheet.ts +137 -0
- package/client/request-managed-session.test.ts +574 -0
- package/client/request-no-store.test.ts +157 -0
- package/client/request.ts +973 -143
- package/client/sse-ticket.test.ts +26 -0
- package/deno.lock +170 -0
- package/deno.test.json +10 -0
- package/drafts/index.ts +149 -0
- package/drafts/store.ts +397 -0
- package/gql/eagerQueryMap.ts +12 -0
- package/gql/fragments/accountAuthFragments.ts +5 -0
- package/gql/fragments/accountFragments.ts +1 -3
- package/gql/fragments/accountSessionFragments.ts +16 -0
- package/gql/fragments/agentDocFragments.ts +46 -0
- package/gql/fragments/agentMemoryFragments.ts +19 -0
- package/gql/fragments/aiChatFragments.ts +17 -0
- package/gql/fragments/billingFragments.ts +0 -11
- package/gql/fragments/campaignFragments.ts +277 -0
- package/gql/fragments/dataTableFragments.ts +102 -0
- package/gql/fragments/emailFragments.ts +36 -0
- package/gql/fragments/fieldDocFragments.ts +82 -0
- package/gql/fragments/inboundContactFragments.ts +15 -0
- package/gql/fragments/integrationFragments.ts +22 -0
- package/gql/fragments/logFragments.ts +33 -64
- package/gql/fragments/organizationFragments.ts +94 -21
- package/gql/fragments/scheduleFragments.ts +155 -0
- package/gql/fragments/sheetFragments.ts +675 -0
- package/gql/fragments/storageFragments.ts +21 -1
- package/gql/fragments/workflowFragments.ts +67 -0
- package/gql/mutations/accountMutations.ts +24 -4
- package/gql/mutations/agentDocMutations.ts +177 -0
- package/gql/mutations/agentMemoryMutations.ts +36 -0
- package/gql/mutations/aiChatMutations.ts +43 -3
- package/gql/mutations/authMutations.ts +160 -19
- package/gql/mutations/campaignMutations.ts +215 -0
- package/gql/mutations/dataTableMutations.ts +106 -0
- package/gql/mutations/fieldDocMutations.ts +24 -0
- package/gql/mutations/inboundContactMutations.ts +24 -0
- package/gql/mutations/index.ts +17 -8
- package/gql/mutations/integrationMutations.ts +25 -0
- package/gql/mutations/logMutations.ts +10 -19
- package/gql/mutations/organizationMutations.ts +160 -2
- package/gql/mutations/scheduleMutations.ts +423 -0
- package/gql/mutations/sheetMutations.ts +385 -0
- package/gql/mutations/storageMutations.ts +21 -2
- package/gql/mutations/workflowMutations.ts +42 -0
- package/gql/queries/agentDocQueries.ts +120 -0
- package/gql/queries/agentMemoryQueries.ts +22 -0
- package/gql/queries/aiChatQueries.ts +18 -2
- package/gql/queries/authQueries.ts +41 -0
- package/gql/queries/billingQueries.ts +24 -1
- package/gql/queries/campaignQueries.ts +127 -0
- package/gql/queries/dataTableQueries.ts +134 -0
- package/gql/queries/emailQueries.ts +96 -0
- package/gql/queries/fieldDocQueries.ts +158 -0
- package/gql/queries/inboundContactQueries.ts +40 -0
- package/gql/queries/index.ts +17 -6
- package/gql/queries/logQueries.ts +42 -32
- package/gql/queries/organizationQueries.ts +113 -8
- package/gql/queries/scheduleQueries.ts +315 -0
- package/gql/queries/sheetQueries.ts +383 -0
- package/gql/queries/storageQueries.ts +38 -0
- package/gql/queries/workflowQueries.ts +99 -0
- package/hooks/index.ts +2104 -860
- package/hooks/use-account-mtn.ts +91 -48
- package/hooks/use-agentDoc-mtn.ts +285 -0
- package/hooks/use-agentDoc-qry.ts +208 -0
- package/hooks/use-agentMemory-mtn.ts +73 -0
- package/hooks/use-agentMemory-qry.ts +44 -0
- package/hooks/use-aiChat-mtn.ts +248 -97
- package/hooks/use-aiChat-qry.ts +501 -191
- package/hooks/use-app-qry.ts +14 -11
- package/hooks/use-auth-mtn.ts +410 -256
- package/hooks/use-auth-qry.ts +51 -0
- package/hooks/use-campaign-mtn.ts +377 -0
- package/hooks/use-campaign-qry.ts +257 -0
- package/hooks/use-dataTable-mtn.ts +170 -0
- package/hooks/use-dataTable-qry.ts +996 -0
- package/hooks/use-email-qry.ts +227 -0
- package/hooks/use-fieldDoc-mtn.ts +50 -0
- package/hooks/use-fieldDoc-qry.ts +180 -0
- package/hooks/use-inboundContact-mtn.ts +34 -0
- package/hooks/use-inboundContact-qry.ts +96 -0
- package/hooks/use-integration-mtn.ts +77 -0
- package/hooks/use-integration-qry.ts +30 -0
- package/hooks/use-log-mtn.ts +77 -61
- package/hooks/use-log-qry.ts +99 -72
- package/hooks/use-organization-mtn.ts +409 -80
- package/hooks/use-organization-qry.ts +211 -92
- package/hooks/use-schedule-mtn.ts +416 -0
- package/hooks/use-schedule-qry.ts +157 -0
- package/hooks/use-sheet-mtn.ts +367 -0
- package/hooks/use-sheet-qry.ts +440 -0
- package/hooks/use-storage-mtn.ts +83 -42
- package/hooks/use-storage-qry.ts +104 -13
- package/hooks/use-workflow-mtn.ts +55 -0
- package/hooks/use-workflow-qry.ts +230 -0
- package/loaders/campaign.ts +137 -0
- package/package.json +94 -52
- package/sse.ts +158 -105
- package/tsconfig.json +13 -0
- package/types.d.ts +60 -29
- package/utils.ts +77 -50
- package/gql/fragments/actionFragments.ts +0 -16
- package/gql/fragments/productFragments.ts +0 -63
- package/gql/fragments/reportFragments.ts +0 -48
- package/gql/mutations/billingMutations.ts +0 -34
- package/gql/queries/productQueries.ts +0 -70
- package/gql/queries/reportQueries.ts +0 -66
- package/hooks/use-product-qry.ts +0 -109
- package/hooks/use-report-qry.ts +0 -69
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import {
|
|
3
|
+
campaignFragment,
|
|
4
|
+
campaignTemplateElementFragment,
|
|
5
|
+
campaignTemplateFragment,
|
|
6
|
+
} from '../fragments/campaignFragments.ts';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns a GENERATING template immediately. The definition is written by a
|
|
10
|
+
* durable job, and the settled ACTIVE or ERROR state arrives over the
|
|
11
|
+
* websocket as a $campaignTemplateFragment patch.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export const createCampaignTemplateMtn = gql`
|
|
15
|
+
mutation createCampaignTemplate (
|
|
16
|
+
$organizationId: GenericID!
|
|
17
|
+
$kind: CampaignKind!
|
|
18
|
+
$instructions: String
|
|
19
|
+
$sourceStorageIds: [GenericID!]
|
|
20
|
+
$title: String
|
|
21
|
+
$siteId: GenericID
|
|
22
|
+
) {
|
|
23
|
+
createCampaignTemplate (
|
|
24
|
+
organizationId: $organizationId
|
|
25
|
+
kind: $kind
|
|
26
|
+
instructions: $instructions
|
|
27
|
+
sourceStorageIds: $sourceStorageIds
|
|
28
|
+
title: $title
|
|
29
|
+
siteId: $siteId
|
|
30
|
+
) {
|
|
31
|
+
...campaignTemplateFragment
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
${campaignTemplateElementFragment}
|
|
35
|
+
${campaignTemplateFragment}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export const retryCampaignTemplateGenerationMtn = gql`
|
|
39
|
+
mutation retryCampaignTemplateGeneration (
|
|
40
|
+
$organizationId: GenericID!
|
|
41
|
+
$templateId: GenericID!
|
|
42
|
+
) {
|
|
43
|
+
retryCampaignTemplateGeneration (
|
|
44
|
+
organizationId: $organizationId
|
|
45
|
+
templateId: $templateId
|
|
46
|
+
) {
|
|
47
|
+
...campaignTemplateFragment
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
${campaignTemplateElementFragment}
|
|
51
|
+
${campaignTemplateFragment}
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const updateCampaignTemplateMtn = gql`
|
|
55
|
+
mutation updateCampaignTemplate (
|
|
56
|
+
$organizationId: GenericID!
|
|
57
|
+
$templateId: GenericID!
|
|
58
|
+
$title: String
|
|
59
|
+
$description: String
|
|
60
|
+
$responseWorkflowId: GenericID
|
|
61
|
+
$siteId: GenericID
|
|
62
|
+
$headerImageStorageId: GenericID
|
|
63
|
+
$settings: CampaignSettingsInput
|
|
64
|
+
) {
|
|
65
|
+
updateCampaignTemplate (
|
|
66
|
+
organizationId: $organizationId
|
|
67
|
+
templateId: $templateId
|
|
68
|
+
title: $title
|
|
69
|
+
description: $description
|
|
70
|
+
responseWorkflowId: $responseWorkflowId
|
|
71
|
+
siteId: $siteId
|
|
72
|
+
headerImageStorageId: $headerImageStorageId
|
|
73
|
+
settings: $settings
|
|
74
|
+
) {
|
|
75
|
+
...campaignTemplateFragment
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
${campaignTemplateElementFragment}
|
|
79
|
+
${campaignTemplateFragment}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export const saveCampaignTemplateDefinitionMtn = gql`
|
|
83
|
+
mutation saveCampaignTemplateDefinition (
|
|
84
|
+
$organizationId: GenericID!
|
|
85
|
+
$templateId: GenericID!
|
|
86
|
+
$sections: [CampaignSectionInput!]!
|
|
87
|
+
) {
|
|
88
|
+
saveCampaignTemplateDefinition (
|
|
89
|
+
organizationId: $organizationId
|
|
90
|
+
templateId: $templateId
|
|
91
|
+
sections: $sections
|
|
92
|
+
) {
|
|
93
|
+
...campaignTemplateFragment
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
${campaignTemplateElementFragment}
|
|
97
|
+
${campaignTemplateFragment}
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
export const saveCampaignDefinitionMtn = gql`
|
|
101
|
+
mutation saveCampaignDefinition (
|
|
102
|
+
$organizationId: GenericID!
|
|
103
|
+
$campaignId: GenericID!
|
|
104
|
+
$title: String
|
|
105
|
+
$description: String
|
|
106
|
+
$sections: [CampaignSectionInput!]!
|
|
107
|
+
) {
|
|
108
|
+
saveCampaignDefinition (
|
|
109
|
+
organizationId: $organizationId
|
|
110
|
+
campaignId: $campaignId
|
|
111
|
+
title: $title
|
|
112
|
+
description: $description
|
|
113
|
+
sections: $sections
|
|
114
|
+
) {
|
|
115
|
+
...campaignFragment
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
${campaignFragment}
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
export const archiveCampaignTemplateMtn = gql`
|
|
122
|
+
mutation archiveCampaignTemplate (
|
|
123
|
+
$organizationId: GenericID!
|
|
124
|
+
$templateId: GenericID!
|
|
125
|
+
) {
|
|
126
|
+
archiveCampaignTemplate (
|
|
127
|
+
organizationId: $organizationId
|
|
128
|
+
templateId: $templateId
|
|
129
|
+
) {
|
|
130
|
+
...campaignTemplateFragment
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
${campaignTemplateElementFragment}
|
|
134
|
+
${campaignTemplateFragment}
|
|
135
|
+
`;
|
|
136
|
+
|
|
137
|
+
export const publishCampaignMtn = gql`
|
|
138
|
+
mutation publishCampaign (
|
|
139
|
+
$organizationId: GenericID!
|
|
140
|
+
$templateId: GenericID!
|
|
141
|
+
$audience: CampaignAudience!
|
|
142
|
+
$idempotencyKey: String
|
|
143
|
+
$title: String
|
|
144
|
+
$description: String
|
|
145
|
+
$settings: CampaignSettingsInput
|
|
146
|
+
$opensAt: String
|
|
147
|
+
$closesAt: String
|
|
148
|
+
$scheduledAt: String
|
|
149
|
+
) {
|
|
150
|
+
publishCampaign (
|
|
151
|
+
organizationId: $organizationId
|
|
152
|
+
templateId: $templateId
|
|
153
|
+
audience: $audience
|
|
154
|
+
idempotencyKey: $idempotencyKey
|
|
155
|
+
title: $title
|
|
156
|
+
description: $description
|
|
157
|
+
settings: $settings
|
|
158
|
+
opensAt: $opensAt
|
|
159
|
+
closesAt: $closesAt
|
|
160
|
+
scheduledAt: $scheduledAt
|
|
161
|
+
) {
|
|
162
|
+
...campaignFragment
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
${campaignFragment}
|
|
166
|
+
`;
|
|
167
|
+
|
|
168
|
+
export const sendCampaignEmailMtn = gql`
|
|
169
|
+
mutation sendCampaignEmail (
|
|
170
|
+
$organizationId: GenericID!
|
|
171
|
+
$templateId: GenericID!
|
|
172
|
+
$inboundContactIds: [GenericID!]
|
|
173
|
+
$sendBatchId: String
|
|
174
|
+
) {
|
|
175
|
+
sendCampaignEmail (
|
|
176
|
+
organizationId: $organizationId
|
|
177
|
+
templateId: $templateId
|
|
178
|
+
inboundContactIds: $inboundContactIds
|
|
179
|
+
sendBatchId: $sendBatchId
|
|
180
|
+
) {
|
|
181
|
+
...campaignFragment
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
${campaignFragment}
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
export const closeCampaignMtn = gql`
|
|
188
|
+
mutation closeCampaign (
|
|
189
|
+
$organizationId: GenericID!
|
|
190
|
+
$campaignId: GenericID!
|
|
191
|
+
) {
|
|
192
|
+
closeCampaign (
|
|
193
|
+
organizationId: $organizationId
|
|
194
|
+
campaignId: $campaignId
|
|
195
|
+
) {
|
|
196
|
+
...campaignFragment
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
${campaignFragment}
|
|
200
|
+
`;
|
|
201
|
+
|
|
202
|
+
export const cancelCampaignMtn = gql`
|
|
203
|
+
mutation cancelCampaign (
|
|
204
|
+
$organizationId: GenericID!
|
|
205
|
+
$campaignId: GenericID!
|
|
206
|
+
) {
|
|
207
|
+
cancelCampaign (
|
|
208
|
+
organizationId: $organizationId
|
|
209
|
+
campaignId: $campaignId
|
|
210
|
+
) {
|
|
211
|
+
...campaignFragment
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
${campaignFragment}
|
|
215
|
+
`;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import {
|
|
3
|
+
dataTableCellFragment,
|
|
4
|
+
dataTableFragment,
|
|
5
|
+
dataTableRowFragment,
|
|
6
|
+
} from '../fragments/dataTableFragments.ts';
|
|
7
|
+
|
|
8
|
+
export const createDataTableMtn = gql`
|
|
9
|
+
mutation createDataTable (
|
|
10
|
+
$organizationId: GenericID!
|
|
11
|
+
$title: String!
|
|
12
|
+
$name: String
|
|
13
|
+
$description: String
|
|
14
|
+
) {
|
|
15
|
+
createDataTable (
|
|
16
|
+
organizationId: $organizationId
|
|
17
|
+
title: $title
|
|
18
|
+
name: $name
|
|
19
|
+
description: $description
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const deleteDataTableMtn = gql`
|
|
25
|
+
mutation deleteDataTable (
|
|
26
|
+
$organizationId: GenericID!
|
|
27
|
+
$dataTableId: GenericID!
|
|
28
|
+
) {
|
|
29
|
+
deleteDataTable (
|
|
30
|
+
organizationId: $organizationId
|
|
31
|
+
dataTableId: $dataTableId
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export const editDataTableCellsMtn = gql`
|
|
37
|
+
mutation editDataTableCells (
|
|
38
|
+
$organizationId: GenericID!
|
|
39
|
+
$dataTableId: GenericID!
|
|
40
|
+
$cells: [DataTableCellEditInput!]!
|
|
41
|
+
$commandId: String
|
|
42
|
+
) {
|
|
43
|
+
editDataTableCells (
|
|
44
|
+
organizationId: $organizationId
|
|
45
|
+
dataTableId: $dataTableId
|
|
46
|
+
cells: $cells
|
|
47
|
+
commandId: $commandId
|
|
48
|
+
) {
|
|
49
|
+
...dataTableCellFragment
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
${dataTableCellFragment}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export const deleteDataTableRowsMtn = gql`
|
|
57
|
+
mutation deleteDataTableRows (
|
|
58
|
+
$organizationId: GenericID!
|
|
59
|
+
$dataTableId: GenericID!
|
|
60
|
+
$dataTableRowIds: [GenericID!]!
|
|
61
|
+
$commandId: String
|
|
62
|
+
$previewClientId: String
|
|
63
|
+
$previewEnvelopeId: String
|
|
64
|
+
$previewSeq: BigInt
|
|
65
|
+
) {
|
|
66
|
+
deleteDataTableRows (
|
|
67
|
+
organizationId: $organizationId
|
|
68
|
+
dataTableId: $dataTableId
|
|
69
|
+
dataTableRowIds: $dataTableRowIds
|
|
70
|
+
commandId: $commandId
|
|
71
|
+
previewClientId: $previewClientId
|
|
72
|
+
previewEnvelopeId: $previewEnvelopeId
|
|
73
|
+
previewSeq: $previewSeq
|
|
74
|
+
) {
|
|
75
|
+
...dataTableRowFragment
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${dataTableRowFragment}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export const editDataTableDesignMtn = gql`
|
|
83
|
+
mutation editDataTableDesign (
|
|
84
|
+
$organizationId: GenericID!
|
|
85
|
+
$dataTableId: GenericID!
|
|
86
|
+
$design: DataTableDesignPatchInput!
|
|
87
|
+
$commandId: String
|
|
88
|
+
$previewClientId: String
|
|
89
|
+
$previewEnvelopeId: String
|
|
90
|
+
$previewSeq: BigInt
|
|
91
|
+
) {
|
|
92
|
+
editDataTableDesign (
|
|
93
|
+
organizationId: $organizationId
|
|
94
|
+
dataTableId: $dataTableId
|
|
95
|
+
design: $design
|
|
96
|
+
commandId: $commandId
|
|
97
|
+
previewClientId: $previewClientId
|
|
98
|
+
previewEnvelopeId: $previewEnvelopeId
|
|
99
|
+
previewSeq: $previewSeq
|
|
100
|
+
) {
|
|
101
|
+
...dataTableFragment
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
${dataTableFragment}
|
|
106
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { fieldDocFragment } from '../fragments/fieldDocFragments.ts';
|
|
3
|
+
|
|
4
|
+
// NOTE: The response is the same mapped document the fieldDoc query serves
|
|
5
|
+
// (same cursor id), so the issuer can merge it straight over its cached
|
|
6
|
+
// fieldDoc fragment.
|
|
7
|
+
|
|
8
|
+
export const editFieldDocAgentHintMtn = gql`
|
|
9
|
+
mutation editFieldDocAgentHint (
|
|
10
|
+
$organizationId: GenericID!
|
|
11
|
+
$fieldDocSourceId: CursorToIDs!
|
|
12
|
+
$agentHint: String
|
|
13
|
+
) {
|
|
14
|
+
editFieldDocAgentHint (
|
|
15
|
+
organizationId: $organizationId
|
|
16
|
+
fieldDocSourceId: $fieldDocSourceId
|
|
17
|
+
agentHint: $agentHint
|
|
18
|
+
) {
|
|
19
|
+
...fieldDocFragment
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
${fieldDocFragment}
|
|
24
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { inboundContactFragment } from '../fragments/inboundContactFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const editInboundContactMtn = gql`
|
|
5
|
+
mutation editInboundContact (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$inboundContactId: GenericID!
|
|
8
|
+
$associatedOrganizationIds: [GenericID]
|
|
9
|
+
$personName: String
|
|
10
|
+
$memory: String
|
|
11
|
+
) {
|
|
12
|
+
editInboundContact (
|
|
13
|
+
organizationId: $organizationId
|
|
14
|
+
inboundContactId: $inboundContactId
|
|
15
|
+
associatedOrganizationIds: $associatedOrganizationIds
|
|
16
|
+
personName: $personName
|
|
17
|
+
memory: $memory
|
|
18
|
+
) {
|
|
19
|
+
...inboundContactFragment
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
${inboundContactFragment}
|
|
24
|
+
`;
|
package/gql/mutations/index.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
1
|
+
export * from './campaignMutations.ts';
|
|
2
|
+
export * from './agentDocMutations.ts';
|
|
3
|
+
export * from './agentMemoryMutations.ts';
|
|
4
|
+
export * from './accountMutations.ts';
|
|
5
|
+
export * from './aiChatMutations.ts';
|
|
6
|
+
export * from './authMutations.ts';
|
|
7
|
+
export * from './integrationMutations.ts';
|
|
8
|
+
export * from './fieldDocMutations.ts';
|
|
9
|
+
export * from './inboundContactMutations.ts';
|
|
10
|
+
export * from './logMutations.ts';
|
|
11
|
+
export * from './organizationMutations.ts';
|
|
12
|
+
export * from './dataTableMutations.ts';
|
|
13
|
+
export * from './scheduleMutations.ts';
|
|
14
|
+
export * from './sheetMutations.ts';
|
|
15
|
+
export * from './storageMutations.ts';
|
|
16
|
+
export * from './userAuthMutations.ts';
|
|
17
|
+
export * from './workflowMutations.ts';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
export const createIntegrationAuthorizationUrlMtn = gql`
|
|
4
|
+
mutation createIntegrationAuthorizationUrl (
|
|
5
|
+
$organizationId: GenericID!
|
|
6
|
+
$provider: IntegrationProvider!
|
|
7
|
+
) {
|
|
8
|
+
createIntegrationAuthorizationUrl (
|
|
9
|
+
organizationId: $organizationId
|
|
10
|
+
provider: $provider
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const disconnectIntegrationMtn = gql`
|
|
16
|
+
mutation disconnectIntegration (
|
|
17
|
+
$organizationId: GenericID!
|
|
18
|
+
$provider: IntegrationProvider!
|
|
19
|
+
) {
|
|
20
|
+
disconnectIntegration (
|
|
21
|
+
organizationId: $organizationId
|
|
22
|
+
provider: $provider
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
logEntryDetailsFragment,
|
|
4
|
+
logEntryFragment,
|
|
5
|
+
} from '../fragments/logFragments.ts';
|
|
3
6
|
|
|
4
7
|
export const editLogEntryMtn = gql`
|
|
5
8
|
mutation editLogEntry (
|
|
@@ -7,41 +10,29 @@ mutation editLogEntry (
|
|
|
7
10
|
$logEntryId: GenericID!
|
|
8
11
|
$accountId: GenericID
|
|
9
12
|
$date: DateTime
|
|
13
|
+
$flagColor: String
|
|
10
14
|
|
|
11
|
-
$
|
|
12
|
-
$livestockDetails: LogLivestockInput
|
|
13
|
-
$farmersMarketDetails: LogFarmersMarketInput
|
|
15
|
+
$details: LogEntryDetailsInput
|
|
14
16
|
) {
|
|
15
17
|
editLogEntry (
|
|
16
18
|
organizationId: $organizationId
|
|
17
19
|
logEntryId: $logEntryId
|
|
18
20
|
accountId: $accountId
|
|
19
21
|
date: $date
|
|
22
|
+
flagColor: $flagColor
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
livestockDetails: $livestockDetails
|
|
23
|
-
farmersMarketDetails: $farmersMarketDetails
|
|
24
|
+
details: $details
|
|
24
25
|
) {
|
|
25
26
|
...logEntryFragment
|
|
26
27
|
|
|
27
28
|
details {
|
|
28
|
-
...
|
|
29
|
-
...logArableFragment
|
|
30
|
-
}
|
|
31
|
-
...on LogFarmersMarket {
|
|
32
|
-
...logFarmersMarketFragment
|
|
33
|
-
}
|
|
34
|
-
...on LogLivestock {
|
|
35
|
-
...logLivestockFragment
|
|
36
|
-
}
|
|
29
|
+
...logEntryDetailsFragment
|
|
37
30
|
}
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
33
|
|
|
41
34
|
${logEntryFragment}
|
|
42
|
-
${
|
|
43
|
-
${logFarmersMarketFragment}
|
|
44
|
-
${logLivestockFragment}
|
|
35
|
+
${logEntryDetailsFragment}
|
|
45
36
|
`;
|
|
46
37
|
|
|
47
38
|
export const deleteLogEntryMtn = gql`
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
organizationChildFragment,
|
|
4
|
+
organizationComplianceFragment,
|
|
5
|
+
organizationFragment,
|
|
6
|
+
organizationRelationshipFragment,
|
|
7
|
+
organizationSettingsFragment,
|
|
8
|
+
organizationSiteFragment,
|
|
9
|
+
} from '../fragments/organizationFragments.ts';
|
|
3
10
|
|
|
4
11
|
export const switchOrganizationMtn = gql`
|
|
5
12
|
mutation switchOrganization (
|
|
@@ -23,20 +30,171 @@ mutation deleteComplianceDocument (
|
|
|
23
30
|
}
|
|
24
31
|
`;
|
|
25
32
|
|
|
33
|
+
export const editComplianceDocumentMtn = gql`
|
|
34
|
+
mutation editComplianceDocument (
|
|
35
|
+
$complianceId: GenericID!
|
|
36
|
+
$documentName: String
|
|
37
|
+
$type: OrganizationComplianceType
|
|
38
|
+
$expirationDate: CalDateString
|
|
39
|
+
) {
|
|
40
|
+
editComplianceDocument (
|
|
41
|
+
complianceId: $complianceId
|
|
42
|
+
documentName: $documentName
|
|
43
|
+
type: $type
|
|
44
|
+
expirationDate: $expirationDate
|
|
45
|
+
) {
|
|
46
|
+
...organizationComplianceFragment
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${organizationComplianceFragment}
|
|
51
|
+
`;
|
|
52
|
+
|
|
26
53
|
export const editOrganizationMtn = gql`
|
|
27
54
|
mutation editOrganization (
|
|
28
55
|
$organizationId: GenericID!
|
|
29
56
|
$name: String
|
|
30
57
|
$address: AddressInput
|
|
58
|
+
$directory: [OrgContactInput!]
|
|
31
59
|
) {
|
|
32
60
|
editOrganization (
|
|
33
61
|
organizationId: $organizationId
|
|
34
62
|
name: $name
|
|
35
63
|
address: $address
|
|
64
|
+
directory: $directory
|
|
65
|
+
) {
|
|
66
|
+
...organizationFragment
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${organizationFragment}
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
export const editOrganizationInboundEmailMtn = gql`
|
|
74
|
+
mutation editOrganizationInboundEmail (
|
|
75
|
+
$organizationId: GenericID!
|
|
76
|
+
$inboundEmail: String
|
|
77
|
+
) {
|
|
78
|
+
editOrganizationInboundEmail (
|
|
79
|
+
organizationId: $organizationId
|
|
80
|
+
emailHandle: $inboundEmail
|
|
36
81
|
) {
|
|
37
82
|
...organizationFragment
|
|
38
83
|
}
|
|
39
84
|
}
|
|
40
85
|
|
|
41
86
|
${organizationFragment}
|
|
42
|
-
`;
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const editOrganizationSettingsMtn = gql`
|
|
90
|
+
mutation editOrganizationSettings (
|
|
91
|
+
$organizationId: GenericID!
|
|
92
|
+
$sidebar: [OrganizationSidebarItemInput!]
|
|
93
|
+
$routeId: String
|
|
94
|
+
$columnWidths: [String!]
|
|
95
|
+
$columnOrder: [String!]
|
|
96
|
+
) {
|
|
97
|
+
editOrganizationSettings (
|
|
98
|
+
organizationId: $organizationId
|
|
99
|
+
sidebar: $sidebar
|
|
100
|
+
routeId: $routeId
|
|
101
|
+
columnWidths: $columnWidths
|
|
102
|
+
columnOrder: $columnOrder
|
|
103
|
+
) {
|
|
104
|
+
...organizationSettingsFragment
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
${organizationSettingsFragment}
|
|
109
|
+
`;
|
|
110
|
+
|
|
111
|
+
export const editChildOrganizationMtn = gql`
|
|
112
|
+
mutation editChildOrganization (
|
|
113
|
+
$organizationId: GenericID!
|
|
114
|
+
$childOrgId: GenericID!
|
|
115
|
+
$name: String
|
|
116
|
+
$operation: String
|
|
117
|
+
$address: AddressInput
|
|
118
|
+
$preferredContacts: [OrgContactInput!]
|
|
119
|
+
) {
|
|
120
|
+
editChildOrganization (
|
|
121
|
+
organizationId: $organizationId
|
|
122
|
+
childOrgId: $childOrgId
|
|
123
|
+
name: $name
|
|
124
|
+
operation: $operation
|
|
125
|
+
address: $address
|
|
126
|
+
preferredContacts: $preferredContacts
|
|
127
|
+
) {
|
|
128
|
+
...organizationChildFragment
|
|
129
|
+
|
|
130
|
+
organization {
|
|
131
|
+
...organizationFragment
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
${organizationChildFragment}
|
|
137
|
+
${organizationFragment}
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
export const editSiteLocationMtn = gql`
|
|
141
|
+
mutation editSiteLocation (
|
|
142
|
+
$siteLocationId: GenericID!
|
|
143
|
+
$name: String
|
|
144
|
+
$region: String
|
|
145
|
+
$note: String
|
|
146
|
+
) {
|
|
147
|
+
editSiteLocation (
|
|
148
|
+
siteLocationId: $siteLocationId
|
|
149
|
+
name: $name
|
|
150
|
+
region: $region
|
|
151
|
+
note: $note
|
|
152
|
+
) {
|
|
153
|
+
...organizationSiteFragment
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
${organizationSiteFragment}
|
|
158
|
+
`;
|
|
159
|
+
|
|
160
|
+
export const deleteChildOrganizationMtn = gql`
|
|
161
|
+
mutation deleteChildOrganization (
|
|
162
|
+
$organizationId: GenericID!
|
|
163
|
+
$childOrgId: GenericID!
|
|
164
|
+
) {
|
|
165
|
+
deleteChildOrganization (
|
|
166
|
+
organizationId: $organizationId
|
|
167
|
+
childOrgId: $childOrgId
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
171
|
+
|
|
172
|
+
export const editMembershipMtn = gql`
|
|
173
|
+
mutation editMembership (
|
|
174
|
+
$organizationId: GenericID!
|
|
175
|
+
$accountId: GenericID!
|
|
176
|
+
$role: OrganizationRole
|
|
177
|
+
$notes: String
|
|
178
|
+
) {
|
|
179
|
+
editMembership (
|
|
180
|
+
organizationId: $organizationId
|
|
181
|
+
accountId: $accountId
|
|
182
|
+
role: $role
|
|
183
|
+
notes: $notes
|
|
184
|
+
) {
|
|
185
|
+
...organizationRelationshipFragment
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
${organizationRelationshipFragment}
|
|
190
|
+
`;
|
|
191
|
+
|
|
192
|
+
export const removeMembershipMtn = gql`
|
|
193
|
+
mutation removeMembership (
|
|
194
|
+
$membershipId: GenericID!
|
|
195
|
+
) {
|
|
196
|
+
removeMembership (
|
|
197
|
+
membershipId: $membershipId
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
`;
|