@jsb188/graphql 1.1.11 → 1.1.13

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.
Files changed (174) hide show
  1. package/LICENSE +21 -0
  2. package/audience.d.ts +205 -0
  3. package/cache/config.ts +65 -28
  4. package/cache/index.helpers.ts +96 -0
  5. package/cache/index.ts +364 -808
  6. package/cache/mounted-queries.ts +33 -0
  7. package/cache/optimistic-ui-runtime.ts +46 -0
  8. package/cache/optimistic-ui.ts +401 -0
  9. package/cache/persist.ts +107 -22
  10. package/cache/realtime-fence.ts +47 -0
  11. package/cache/realtime-live.ts +17 -0
  12. package/cache/store.ts +22 -64
  13. package/cache/value.helpers.ts +17 -0
  14. package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
  15. package/{drafts/index.ts → client/draft-persistence.ts} +13 -39
  16. package/client/index.ts +4 -2
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +122 -232
  19. package/client/storage-asset.ts +58 -0
  20. package/gql/fragments/accountAuthFragments.ts +0 -4
  21. package/gql/fragments/agentMemoryFragments.ts +5 -1
  22. package/gql/fragments/agentNoteFragments.ts +156 -0
  23. package/gql/fragments/aiChatFragments.ts +35 -11
  24. package/gql/fragments/aiChatLinkFragments.ts +8 -0
  25. package/gql/fragments/audienceFragments.ts +76 -0
  26. package/gql/fragments/dataTableFragments.ts +48 -80
  27. package/gql/fragments/emailFragments.ts +49 -21
  28. package/gql/fragments/emailOutreachFragments.ts +281 -0
  29. package/gql/fragments/fieldDocFragments.ts +222 -40
  30. package/gql/fragments/inboundContactFragments.ts +2 -0
  31. package/gql/fragments/libraryFragments.ts +120 -0
  32. package/gql/fragments/logFragments.ts +93 -2
  33. package/gql/fragments/organizationFragments.ts +12 -0
  34. package/gql/fragments/qrCodeFragments.ts +29 -0
  35. package/gql/fragments/scheduleFragments.ts +574 -145
  36. package/gql/fragments/sheetFragments.ts +86 -424
  37. package/gql/fragments/storageFragments.ts +25 -1
  38. package/gql/fragments/workWaitFragments.ts +13 -0
  39. package/gql/fragments/workflowFragments.ts +32 -4
  40. package/gql/mutations/agentMemoryMutations.ts +32 -0
  41. package/gql/mutations/agentNoteMutations.ts +64 -0
  42. package/gql/mutations/aiChatLinkMutations.ts +13 -0
  43. package/gql/mutations/aiChatMutations.ts +34 -4
  44. package/gql/mutations/audienceMutations.ts +58 -0
  45. package/gql/mutations/authMutations.ts +24 -28
  46. package/gql/mutations/billingMutations.ts +24 -0
  47. package/gql/mutations/contactMutations.ts +23 -0
  48. package/gql/mutations/dataTableMutations.ts +18 -75
  49. package/gql/mutations/emailMutations.ts +22 -0
  50. package/gql/mutations/emailOutreachMutations.ts +139 -0
  51. package/gql/mutations/fieldDocMutations.ts +162 -13
  52. package/gql/mutations/index.ts +10 -5
  53. package/gql/mutations/organizationMutations.ts +6 -0
  54. package/gql/mutations/qrCodeMutations.ts +20 -0
  55. package/gql/mutations/scheduleMutations.ts +389 -417
  56. package/gql/mutations/sheetMutations.ts +62 -118
  57. package/gql/mutations/storageMutations.ts +1 -1
  58. package/gql/mutations/workflowMutations.ts +94 -0
  59. package/gql/queries/agentMemoryQueries.ts +12 -2
  60. package/gql/queries/agentNoteQueries.ts +86 -0
  61. package/gql/queries/aiChatQueries.ts +63 -12
  62. package/gql/queries/audienceQueries.ts +104 -0
  63. package/gql/queries/authQueries.ts +20 -4
  64. package/gql/queries/billingQueries.ts +114 -9
  65. package/gql/queries/dataTableQueries.ts +43 -75
  66. package/gql/queries/emailOutreachQueries.ts +282 -0
  67. package/gql/queries/emailQueries.ts +48 -64
  68. package/gql/queries/emailReplyReportQueries.ts +127 -0
  69. package/gql/queries/fieldDocQueries.ts +128 -98
  70. package/gql/queries/inboundContactQueries.ts +15 -4
  71. package/gql/queries/index.ts +5 -3
  72. package/gql/queries/libraryQueries.ts +112 -0
  73. package/gql/queries/logQueries.ts +86 -12
  74. package/gql/queries/organizationQueries.ts +44 -12
  75. package/gql/queries/qrCodeQueries.ts +27 -0
  76. package/gql/queries/scheduleQueries.ts +401 -278
  77. package/gql/queries/sheetQueries.ts +94 -165
  78. package/gql/queries/storageQueries.ts +11 -4
  79. package/gql/queries/workflowQueries.ts +61 -12
  80. package/gql/reactivity.ts +98 -0
  81. package/gql/recordReads.ts +171 -0
  82. package/hooks/index.helpers.ts +52 -0
  83. package/hooks/index.ts +920 -715
  84. package/hooks/use-agentMemory-mtn.ts +29 -31
  85. package/hooks/use-agentMemory-qry.ts +15 -3
  86. package/hooks/use-agentNote-mtn.ts +89 -0
  87. package/hooks/use-agentNote-qry.ts +162 -0
  88. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  89. package/hooks/use-agentNote-recovery.ts +57 -0
  90. package/hooks/use-aiChat-mtn.ts +104 -115
  91. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  92. package/hooks/use-aiChat-qry.ts +254 -387
  93. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  94. package/hooks/use-audience-mtn.ts +170 -0
  95. package/hooks/use-audience-qry.helpers.ts +39 -0
  96. package/hooks/use-audience-qry.ts +245 -0
  97. package/hooks/use-auth-mtn.ts +30 -1
  98. package/hooks/use-billing-mtn.ts +31 -0
  99. package/hooks/use-billing-qry.ts +76 -0
  100. package/hooks/use-dataTable-mtn.ts +23 -115
  101. package/hooks/use-dataTable-qry.ts +69 -914
  102. package/hooks/use-email-mtn.ts +26 -0
  103. package/hooks/use-email-qry.helpers.ts +37 -0
  104. package/hooks/use-email-qry.ts +44 -174
  105. package/hooks/use-emailOutreach-mtn.ts +211 -0
  106. package/hooks/use-emailOutreach-qry.helpers.ts +25 -0
  107. package/hooks/use-emailOutreach-qry.ts +367 -0
  108. package/hooks/use-emailOutreachReplyReport-qry.ts +46 -0
  109. package/hooks/use-fieldDoc-mtn.ts +244 -32
  110. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  111. package/hooks/use-fieldDoc-qry.ts +134 -102
  112. package/hooks/use-inboundContact-qry.ts +7 -9
  113. package/hooks/use-library-qry.ts +233 -0
  114. package/hooks/use-log-mtn.ts +25 -12
  115. package/hooks/use-log-qry.ts +99 -46
  116. package/hooks/use-organization-qry.ts +16 -60
  117. package/hooks/use-qrCode-mtn.ts +40 -0
  118. package/hooks/use-qrCode-qry.ts +78 -0
  119. package/hooks/use-schedule-mtn.ts +231 -348
  120. package/hooks/use-schedule-qry.ts +208 -139
  121. package/hooks/use-schedule-reactive.ts +218 -0
  122. package/hooks/use-sheet-mtn.ts +91 -199
  123. package/hooks/use-sheet-qry.ts +88 -237
  124. package/hooks/use-storage-qry.ts +84 -61
  125. package/hooks/use-workflow-mtn.ts +84 -23
  126. package/hooks/use-workflow-qry.ts +60 -61
  127. package/libs/ai-chat-link-events.ts +78 -0
  128. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  129. package/libs/ai-chat-outgoing.ts +11 -0
  130. package/libs/ai-chat-outgoing.types.ts +25 -0
  131. package/libs/ai-chat-run-realtime.ts +20 -0
  132. package/libs/ai-chat-submission-realtime.ts +150 -0
  133. package/libs/data-changes.helpers.ts +161 -0
  134. package/libs/data-changes.ts +382 -0
  135. package/libs/fragment-realtime-sequence.ts +55 -0
  136. package/libs/open-sheet.ts +138 -0
  137. package/libs/record-read.ts +327 -0
  138. package/libs/sheet-command-batch.ts +45 -0
  139. package/libs/sheet-realtime-packet.ts +53 -0
  140. package/libs/sheet-view-realtime-router.ts +99 -0
  141. package/loaders/emailPreference.ts +69 -0
  142. package/loaders/rest.ts +12 -0
  143. package/package.json +77 -25
  144. package/schedule.d.ts +1183 -0
  145. package/sse.helpers.ts +19 -0
  146. package/sse.ts +26 -115
  147. package/types.d.ts +48 -25
  148. package/cache/index.test.ts +0 -881
  149. package/client/data-table-realtime-subscriptions.test.ts +0 -740
  150. package/client/data-table-realtime-subscriptions.ts +0 -955
  151. package/client/data-table-realtime.test.ts +0 -792
  152. package/client/data-table-realtime.ts +0 -1218
  153. package/client/fragment-realtime-sequence.ts +0 -52
  154. package/client/open-sheet.ts +0 -137
  155. package/client/request-managed-session.test.ts +0 -574
  156. package/client/request-no-store.test.ts +0 -157
  157. package/client/sse-ticket.test.ts +0 -26
  158. package/deno.lock +0 -170
  159. package/deno.test.json +0 -10
  160. package/gql/fragments/agentDocFragments.ts +0 -46
  161. package/gql/fragments/billingFragments.ts +0 -14
  162. package/gql/fragments/campaignFragments.ts +0 -277
  163. package/gql/mutations/agentDocMutations.ts +0 -177
  164. package/gql/mutations/campaignMutations.ts +0 -215
  165. package/gql/queries/agentDocQueries.ts +0 -120
  166. package/gql/queries/appQueries.ts +0 -14
  167. package/gql/queries/campaignQueries.ts +0 -127
  168. package/hooks/use-agentDoc-mtn.ts +0 -285
  169. package/hooks/use-agentDoc-qry.ts +0 -208
  170. package/hooks/use-app-qry.ts +0 -22
  171. package/hooks/use-campaign-mtn.ts +0 -377
  172. package/hooks/use-campaign-qry.ts +0 -257
  173. package/loaders/campaign.ts +0 -137
  174. package/tsconfig.json +0 -13
@@ -1,177 +0,0 @@
1
- import { gql } from 'graphql-tag';
2
- import { agentDocFragment } from '../fragments/agentDocFragments.ts';
3
-
4
- export const createAgentDocMtn = gql`
5
- mutation createAgentDoc (
6
- $organizationId: GenericID!
7
- $title: String
8
- $folderId: GenericID
9
- $position: Float
10
- ) {
11
- createAgentDoc (
12
- organizationId: $organizationId
13
- title: $title
14
- folderId: $folderId
15
- position: $position
16
- )
17
- }
18
- `;
19
-
20
- // NOTE: content is the noteDoc document serialized as JSON text (the caller
21
- // must JSON.stringify the sanitized doc), and imageStorageIds carries every
22
- // image storageId still present in the doc so the server can reconcile
23
- // agent_doc_storage_rels against it.
24
-
25
- export const updateAgentDocMtn = gql`
26
- mutation updateAgentDoc (
27
- $organizationId: GenericID!
28
- $agentDocId: GenericID!
29
- $title: String
30
- $content: String
31
- $folderId: GenericID
32
- $imageStorageIds: [GenericID!]
33
- ) {
34
- updateAgentDoc (
35
- organizationId: $organizationId
36
- agentDocId: $agentDocId
37
- title: $title
38
- content: $content
39
- folderId: $folderId
40
- imageStorageIds: $imageStorageIds
41
- ) {
42
- ...agentDocFragment
43
- }
44
- }
45
-
46
- ${agentDocFragment}
47
- `;
48
-
49
- export const deleteAgentDocMtn = gql`
50
- mutation deleteAgentDoc (
51
- $organizationId: GenericID!
52
- $agentDocId: GenericID!
53
- ) {
54
- deleteAgentDoc (
55
- organizationId: $organizationId
56
- agentDocId: $agentDocId
57
- )
58
- }
59
- `;
60
-
61
- // NOTE: The selection is intentionally NOT agentDocFragment: the access
62
- // record update returns the bare row (no rels attached), so selecting
63
- // content/files here would merge rel-unfiltered content and an empty files
64
- // list over the issuer's cached agentDoc fragment. Only the access-relevant
65
- // fields update.
66
-
67
- export const updateAgentDocAccessMtn = gql`
68
- mutation updateAgentDocAccess (
69
- $organizationId: GenericID!
70
- $agentDocId: GenericID!
71
- $access: DocAccessInput!
72
- ) {
73
- updateAgentDocAccess (
74
- organizationId: $organizationId
75
- agentDocId: $agentDocId
76
- access: $access
77
- ) {
78
- id
79
- organizationId
80
-
81
- access {
82
- team
83
- public
84
- network
85
- }
86
-
87
- updatedAt
88
- }
89
- }
90
- `;
91
-
92
- // NOTE: Same bare-row rule as updateAgentDocAccess: the settings update
93
- // returns the row without rels attached, so only the settings-relevant
94
- // fields are selected to keep the issuer's cached content/files intact.
95
-
96
- export const updateAgentDocSettingsMtn = gql`
97
- mutation updateAgentDocSettings (
98
- $organizationId: GenericID!
99
- $agentDocId: GenericID!
100
- $settings: AgentDocSettingsInput!
101
- ) {
102
- updateAgentDocSettings (
103
- organizationId: $organizationId
104
- agentDocId: $agentDocId
105
- settings: $settings
106
- ) {
107
- id
108
- organizationId
109
-
110
- settings {
111
- aiCannotEdit
112
- aiCannotRead
113
- pinned
114
- hiddenSurfaces
115
- reviewBy
116
- }
117
-
118
- updatedAt
119
- }
120
- }
121
- `;
122
-
123
- export const createAgentDocFolderMtn = gql`
124
- mutation createAgentDocFolder (
125
- $organizationId: GenericID!
126
- $name: String!
127
- $position: Float
128
- ) {
129
- createAgentDocFolder (
130
- organizationId: $organizationId
131
- name: $name
132
- position: $position
133
- ) {
134
- id
135
- organizationId
136
- name
137
- position
138
- createdAt
139
- updatedAt
140
- }
141
- }
142
- `;
143
-
144
- export const updateAgentDocFolderMtn = gql`
145
- mutation updateAgentDocFolder (
146
- $organizationId: GenericID!
147
- $folderId: GenericID!
148
- $name: String
149
- $position: Float
150
- ) {
151
- updateAgentDocFolder (
152
- organizationId: $organizationId
153
- folderId: $folderId
154
- name: $name
155
- position: $position
156
- ) {
157
- id
158
- organizationId
159
- name
160
- position
161
- createdAt
162
- updatedAt
163
- }
164
- }
165
- `;
166
-
167
- export const deleteAgentDocFolderMtn = gql`
168
- mutation deleteAgentDocFolder (
169
- $organizationId: GenericID!
170
- $folderId: GenericID!
171
- ) {
172
- deleteAgentDocFolder (
173
- organizationId: $organizationId
174
- folderId: $folderId
175
- )
176
- }
177
- `;
@@ -1,215 +0,0 @@
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
- `;
@@ -1,120 +0,0 @@
1
- import { gql } from 'graphql-tag';
2
- import { agentDocFragment } from '../fragments/agentDocFragments.ts';
3
-
4
- export const agentDocMetadataQry = gql`
5
- query agentDocMetadata (
6
- $agentDocId: GenericID!
7
- ) {
8
- agentDoc (
9
- agentDocId: $agentDocId
10
- ) {
11
- id
12
- title
13
- }
14
- }
15
- `;
16
-
17
- // NOTE: viewerPermission and viewerCanEditAccess are per-viewer facts
18
- // resolved by the server for the requesting account. They are selected
19
- // outside agentDocFragment because realtime emits never carry them, and the
20
- // fragment must stay aligned with the server's emit field list.
21
- // The query takes no organizationId: the server resolves the owner org from
22
- // the agent doc row (openSheet-style contract), so network-org members and
23
- // grant holders outside the owner org can open a shared agent doc.
24
-
25
- export const agentDocQry = gql`
26
- query agentDoc (
27
- $agentDocId: GenericID!
28
- ) {
29
- agentDoc (
30
- agentDocId: $agentDocId
31
- ) {
32
- ...agentDocFragment
33
-
34
- viewerPermission
35
- viewerCanEditAccess
36
- }
37
- }
38
-
39
- ${agentDocFragment}
40
- `;
41
-
42
- // NOTE: The list selection intentionally excludes content and files: the
43
- // list screen only needs row metadata, and merging a content-free selection
44
- // through the normalized cache must not clobber a full agentDoc fragment,
45
- // so the heavy fields are simply never selected here.
46
-
47
- export const agentDocsQry = gql`
48
- query agentDocs (
49
- $organizationId: GenericID!
50
- $folderId: GenericID
51
- $sort: GridItemSort
52
- $cursor: Cursor
53
- $after: Boolean!
54
- $limit: Int!
55
- ) {
56
- agentDocs (
57
- organizationId: $organizationId
58
- folderId: $folderId
59
- sort: $sort
60
- cursor: $cursor
61
- after: $after
62
- limit: $limit
63
- ) {
64
- id
65
- organizationId
66
- folderId
67
- title
68
-
69
- settings {
70
- aiCannotEdit
71
- aiCannotRead
72
- pinned
73
- hiddenSurfaces
74
- reviewBy
75
- }
76
-
77
- position
78
- deletedAt
79
- createdAt
80
- updatedAt
81
- }
82
- }
83
- `;
84
-
85
- export const agentDocFoldersQry = gql`
86
- query agentDocFolders (
87
- $organizationId: GenericID!
88
- ) {
89
- agentDocFolders (
90
- organizationId: $organizationId
91
- ) {
92
- id
93
- organizationId
94
- name
95
- position
96
- createdAt
97
- updatedAt
98
- }
99
- }
100
- `;
101
-
102
- // NOTE: agentDocAccessGrants is owner-org only: the access settings screen
103
- // loads the grants list with it, on top of the base policy carried by the
104
- // AgentDoc fragment's "access" selection.
105
-
106
- export const agentDocAccessGrantsQry = gql`
107
- query agentDocAccessGrants (
108
- $organizationId: GenericID!
109
- $agentDocId: GenericID!
110
- ) {
111
- agentDocAccessGrants (
112
- organizationId: $organizationId
113
- agentDocId: $agentDocId
114
- ) {
115
- granteeType
116
- granteeId
117
- permission
118
- }
119
- }
120
- `;
@@ -1,14 +0,0 @@
1
- import { gql } from 'graphql-tag';
2
-
3
- export const updateNoteQry = gql`
4
- query updateNote {
5
- updateNote {
6
- webVersion
7
- mobileVersion
8
- emoji
9
- title
10
- at
11
- text
12
- }
13
- }
14
- `;
@@ -1,127 +0,0 @@
1
- import { gql } from 'graphql-tag';
2
- import {
3
- campaignFragment,
4
- campaignRecipientFragment,
5
- campaignResponseFragment,
6
- campaignSummaryFragment,
7
- campaignTemplateElementFragment,
8
- campaignTemplateFragment,
9
- campaignTemplateSummaryFragment,
10
- } from '../fragments/campaignFragments.ts';
11
-
12
- export const campaignTemplatesQry = gql`
13
- query campaignTemplates (
14
- $organizationId: GenericID!
15
- $kind: CampaignKind
16
- $status: CampaignTemplateStatus
17
- $cursor: Cursor
18
- $after: Boolean
19
- $limit: Int
20
- ) {
21
- campaignTemplates (
22
- organizationId: $organizationId
23
- kind: $kind
24
- status: $status
25
- cursor: $cursor
26
- after: $after
27
- limit: $limit
28
- ) {
29
- ...campaignTemplateSummaryFragment
30
- }
31
- }
32
- ${campaignTemplateSummaryFragment}
33
- `;
34
-
35
- export const campaignTemplateQry = gql`
36
- query campaignTemplate (
37
- $organizationId: GenericID!
38
- $templateId: GenericID!
39
- ) {
40
- campaignTemplate (
41
- organizationId: $organizationId
42
- templateId: $templateId
43
- ) {
44
- ...campaignTemplateFragment
45
- }
46
- }
47
- ${campaignTemplateElementFragment}
48
- ${campaignTemplateFragment}
49
- `;
50
-
51
- export const campaignsQry = gql`
52
- query campaigns (
53
- $organizationId: GenericID!
54
- $filter: CampaignsFilter!
55
- $cursor: Cursor
56
- $after: Boolean!
57
- $limit: Int!
58
- ) {
59
- campaigns (
60
- organizationId: $organizationId
61
- filter: $filter
62
- cursor: $cursor
63
- after: $after
64
- limit: $limit
65
- ) {
66
- ...campaignSummaryFragment
67
- }
68
- }
69
- ${campaignSummaryFragment}
70
- `;
71
-
72
- export const campaignQry = gql`
73
- query campaign (
74
- $organizationId: GenericID!
75
- $campaignId: GenericID!
76
- ) {
77
- campaign (
78
- organizationId: $organizationId
79
- campaignId: $campaignId
80
- ) {
81
- ...campaignFragment
82
- }
83
- }
84
- ${campaignFragment}
85
- `;
86
-
87
- export const campaignResponsesQry = gql`
88
- query campaignResponses (
89
- $organizationId: GenericID!
90
- $filter: CampaignResponsesFilter!
91
- $cursor: Cursor
92
- $after: Boolean!
93
- $limit: Int!
94
- ) {
95
- campaignResponses (
96
- organizationId: $organizationId
97
- filter: $filter
98
- cursor: $cursor
99
- after: $after
100
- limit: $limit
101
- ) {
102
- ...campaignResponseFragment
103
- }
104
- }
105
- ${campaignResponseFragment}
106
- `;
107
-
108
- export const campaignRecipientsQry = gql`
109
- query campaignRecipients (
110
- $organizationId: GenericID!
111
- $filter: CampaignRecipientsFilter!
112
- $cursor: Cursor
113
- $after: Boolean!
114
- $limit: Int!
115
- ) {
116
- campaignRecipients (
117
- organizationId: $organizationId
118
- filter: $filter
119
- cursor: $cursor
120
- after: $after
121
- limit: $limit
122
- ) {
123
- ...campaignRecipientFragment
124
- }
125
- }
126
- ${campaignRecipientFragment}
127
- `;