@jsb188/graphql 1.1.11 → 1.1.12
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/audience.d.ts +343 -0
- package/cache/config.ts +58 -24
- package/cache/index.chat-activity.test.ts +119 -0
- package/cache/index.chat.test.ts +92 -0
- package/cache/index.helpers.ts +96 -0
- package/cache/index.regression.test.ts +149 -0
- package/cache/index.test.ts +370 -42
- package/cache/index.ts +326 -799
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +98 -19
- package/cache/store.ts +22 -64
- package/cache/value.helpers.ts +17 -0
- package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
- package/{drafts/index.ts → client/draft-persistence.ts} +5 -2
- package/client/index.ts +3 -2
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +130 -215
- package/deno.lock +17 -0
- package/deno.test.json +2 -0
- package/gql/fragments/agentMemoryFragments.ts +5 -1
- package/gql/fragments/agentNoteFragments.ts +150 -0
- package/gql/fragments/aiChatFragments.ts +36 -10
- package/gql/fragments/audienceFragments.ts +141 -0
- package/gql/fragments/campaignFragments.ts +415 -126
- package/gql/fragments/dataTableFragments.ts +48 -80
- package/gql/fragments/emailFragments.ts +28 -23
- package/gql/fragments/fieldDocFragments.ts +222 -40
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/logFragments.ts +93 -2
- package/gql/fragments/organizationFragments.ts +10 -0
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +652 -140
- package/gql/fragments/sheetFragments.ts +84 -373
- package/gql/fragments/storageFragments.ts +25 -1
- package/gql/fragments/workflowFragments.ts +13 -1
- package/gql/mutations/agentMemoryMutations.ts +32 -0
- package/gql/mutations/agentNoteMutations.ts +62 -0
- package/gql/mutations/aiChatMutations.ts +36 -4
- package/gql/mutations/audienceMutations.ts +71 -0
- package/gql/mutations/authMutations.ts +45 -1
- package/gql/mutations/billingMutations.ts +24 -0
- package/gql/mutations/campaignMutations.ts +170 -127
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +18 -75
- package/gql/mutations/fieldDocMutations.ts +162 -13
- package/gql/mutations/index.ts +8 -5
- package/gql/mutations/organizationMutations.ts +6 -0
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +1052 -354
- package/gql/mutations/sheetMutations.ts +62 -118
- package/gql/mutations/storageMutations.ts +0 -1
- package/gql/mutations/workflowMutations.ts +18 -0
- package/gql/queries/agentMemoryQueries.ts +6 -0
- package/gql/queries/agentNoteQueries.ts +89 -0
- package/gql/queries/aiChatQueries.ts +56 -4
- package/gql/queries/audienceQueries.ts +128 -0
- package/gql/queries/authQueries.ts +6 -0
- package/gql/queries/billingQueries.ts +95 -6
- package/gql/queries/campaignQueries.ts +132 -23
- package/gql/queries/dataTableQueries.ts +24 -65
- package/gql/queries/emailQueries.ts +18 -61
- package/gql/queries/emailReplyReportQueries.ts +76 -0
- package/gql/queries/fieldDocQueries.ts +100 -92
- package/gql/queries/inboundContactQueries.ts +4 -0
- package/gql/queries/index.ts +3 -1
- package/gql/queries/logQueries.ts +62 -7
- package/gql/queries/organizationQueries.ts +13 -0
- package/gql/queries/qrCodeQueries.ts +20 -0
- package/gql/queries/scheduleQueries.ts +633 -257
- package/gql/queries/sheetQueries.ts +59 -152
- package/gql/queries/workflowQueries.ts +10 -4
- package/hooks/index.helpers.test.ts +50 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +863 -685
- package/hooks/use-agentMemory-mtn.ts +29 -31
- package/hooks/use-agentMemory-qry.ts +15 -3
- package/hooks/use-agentNote-mtn.ts +82 -0
- package/hooks/use-agentNote-qry.ts +190 -0
- package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +72 -0
- package/hooks/use-aiChat-mtn.ts +96 -112
- package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +229 -383
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-audience-mtn.ts +194 -0
- package/hooks/use-audience-qry.helpers.test.ts +80 -0
- package/hooks/use-audience-qry.helpers.ts +63 -0
- package/hooks/use-audience-qry.ts +330 -0
- package/hooks/use-auth-mtn.ts +30 -1
- package/hooks/use-billing-mtn.ts +31 -0
- package/hooks/use-billing-qry.ts +76 -0
- package/hooks/use-campaign-generation-recovery.ts +53 -0
- package/hooks/use-campaign-mtn.ts +224 -165
- package/hooks/use-campaign-qry.helpers.ts +40 -0
- package/hooks/use-campaign-qry.ts +631 -54
- package/hooks/use-dataTable-mtn.ts +23 -115
- package/hooks/use-dataTable-qry.ts +66 -916
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +33 -178
- package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
- package/hooks/use-fieldDoc-mtn.ts +244 -32
- package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
- package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
- package/hooks/use-fieldDoc-qry.ts +134 -102
- package/hooks/use-inboundContact-qry.ts +7 -9
- package/hooks/use-log-mtn.ts +25 -12
- package/hooks/use-log-qry.ts +99 -46
- package/hooks/use-organization-qry.ts +16 -60
- package/hooks/use-publicFormEmail-mtn.ts +27 -0
- package/hooks/use-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +506 -333
- package/hooks/use-schedule-qry.ts +682 -101
- package/hooks/use-schedule-reactive.ts +486 -0
- package/hooks/use-sheet-mtn.ts +91 -199
- package/hooks/use-sheet-qry.ts +84 -238
- package/hooks/use-storage-qry.ts +84 -61
- package/hooks/use-workflow-mtn.ts +39 -22
- package/hooks/use-workflow-qry.ts +40 -61
- package/libs/ai-chat-outgoing.helpers.ts +153 -0
- package/libs/ai-chat-outgoing.ts +11 -0
- package/libs/ai-chat-outgoing.types.ts +25 -0
- package/libs/ai-chat-run-realtime.ts +20 -0
- package/libs/ai-chat-submission-realtime.ts +150 -0
- package/libs/fragment-realtime-sequence.ts +55 -0
- package/libs/fragment-recovery.test.ts +326 -0
- package/libs/fragment-recovery.ts +325 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/orchestrator-realtime.helpers.test.ts +229 -0
- package/libs/orchestrator-realtime.helpers.ts +317 -0
- package/libs/orchestrator-realtime.ts +433 -0
- package/libs/request-cache-regression.test.ts +122 -0
- package/{client → libs}/request-managed-session.test.ts +1 -1
- package/libs/request-no-store.test.ts +419 -0
- package/libs/sheet-command-batch.ts +44 -0
- package/libs/sheet-view-realtime-router.test.ts +214 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/loaders/campaign.test.ts +186 -0
- package/loaders/campaign.ts +56 -83
- package/loaders/emailPreference.ts +75 -0
- package/loaders/rest.ts +12 -0
- package/package.json +42 -17
- package/schedule.d.ts +1790 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +26 -115
- package/tests/agent-note-detail-cache.test.ts +120 -0
- package/tests/agent-note-search.test.ts +444 -0
- package/types.d.ts +46 -25
- package/client/data-table-realtime-subscriptions.test.ts +0 -740
- package/client/data-table-realtime-subscriptions.ts +0 -955
- package/client/data-table-realtime.test.ts +0 -792
- package/client/data-table-realtime.ts +0 -1218
- package/client/fragment-realtime-sequence.ts +0 -52
- package/client/open-sheet.ts +0 -137
- package/client/request-no-store.test.ts +0 -157
- package/gql/fragments/agentDocFragments.ts +0 -46
- package/gql/fragments/billingFragments.ts +0 -14
- package/gql/mutations/agentDocMutations.ts +0 -177
- package/gql/queries/agentDocQueries.ts +0 -120
- package/hooks/use-agentDoc-mtn.ts +0 -285
- package/hooks/use-agentDoc-qry.ts +0 -208
- /package/{client → libs}/sse-ticket.test.ts +0 -0
|
@@ -1,102 +1,70 @@
|
|
|
1
|
+
// The one DataTable fragment: every listing, detail and mutation selects it,
|
|
2
|
+
// and the server's $dataTableFragment realtime updates patch it.
|
|
1
3
|
export const dataTableFragment = `fragment dataTableFragment on DataTable {
|
|
2
4
|
id
|
|
3
5
|
cursor
|
|
4
6
|
organizationId
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
kind
|
|
9
|
+
source
|
|
7
10
|
title
|
|
8
11
|
description
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
rowCount
|
|
13
|
+
revision
|
|
14
|
+
syncState
|
|
15
|
+
syncError
|
|
16
|
+
syncedAt
|
|
17
|
+
derivePausedAt
|
|
18
|
+
derivePauseReason
|
|
19
|
+
canManage
|
|
20
|
+
archivedAt
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cells {
|
|
22
|
-
key
|
|
23
|
-
label
|
|
24
|
-
humanLabel
|
|
25
|
-
iconName
|
|
26
|
-
fieldType
|
|
27
|
-
format
|
|
28
|
-
instructions
|
|
29
|
-
openLink
|
|
30
|
-
humansOnly
|
|
31
|
-
humansCannotEdit
|
|
32
|
-
hidden
|
|
33
|
-
indexed
|
|
34
|
-
width
|
|
22
|
+
columns {
|
|
23
|
+
key
|
|
24
|
+
label
|
|
25
|
+
type
|
|
26
|
+
origin
|
|
27
|
+
unit
|
|
28
|
+
currency
|
|
29
|
+
retired
|
|
30
|
+
}
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
coverageWarnings {
|
|
33
|
+
code
|
|
34
|
+
columnKey
|
|
35
|
+
message
|
|
36
|
+
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}
|
|
38
|
+
ownerNote {
|
|
39
|
+
id
|
|
40
|
+
headline
|
|
41
|
+
emoji
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
createdAt
|
|
50
45
|
updatedAt
|
|
51
46
|
}`;
|
|
52
47
|
|
|
53
|
-
export const dataTablePartialFragment = `fragment dataTablePartialFragment on DataTable {
|
|
54
|
-
id
|
|
55
|
-
name
|
|
56
|
-
title
|
|
57
|
-
description
|
|
58
|
-
deletedAt
|
|
59
|
-
}`;
|
|
60
|
-
|
|
61
|
-
export const dataTableMetadataFragment = `fragment dataTableMetadataFragment on DataTableMetadata {
|
|
62
|
-
id
|
|
63
|
-
name
|
|
64
|
-
title
|
|
65
|
-
description
|
|
66
|
-
}`;
|
|
67
|
-
|
|
68
48
|
export const dataTableRowFragment = `fragment dataTableRowFragment on DataTableRow {
|
|
69
49
|
id
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
key
|
|
51
|
+
cells
|
|
52
|
+
sourceReadableId
|
|
53
|
+
derivePending
|
|
54
|
+
deriveError
|
|
55
|
+
changedAt
|
|
76
56
|
}`;
|
|
77
57
|
|
|
78
|
-
export const
|
|
58
|
+
export const dataTableRunFragment = `fragment dataTableRunFragment on DataTableRun {
|
|
79
59
|
id
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
datetimeValue
|
|
91
|
-
relatedTable
|
|
92
|
-
relatedId
|
|
93
|
-
reference {
|
|
94
|
-
dataTableId
|
|
95
|
-
dataTableRowId
|
|
96
|
-
cellKey
|
|
97
|
-
}
|
|
98
|
-
referenceStatus
|
|
99
|
-
|
|
100
|
-
createdAt
|
|
101
|
-
updatedAt
|
|
60
|
+
cause
|
|
61
|
+
added
|
|
62
|
+
changed
|
|
63
|
+
removed
|
|
64
|
+
derived
|
|
65
|
+
llmCalls
|
|
66
|
+
reason
|
|
67
|
+
error
|
|
68
|
+
startedAt
|
|
69
|
+
finishedAt
|
|
102
70
|
}`;
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const emailMessageFragment = `fragment emailMessageFragment on EmailMessage {
|
|
2
2
|
id
|
|
3
3
|
cursor
|
|
4
4
|
organizationId
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
subject
|
|
8
|
-
postmarkMessageId
|
|
5
|
+
direction
|
|
6
|
+
kind
|
|
9
7
|
status
|
|
10
|
-
|
|
8
|
+
statusGroup
|
|
9
|
+
statusDetail
|
|
10
|
+
fromEmail
|
|
11
|
+
fromName
|
|
12
|
+
toEmail
|
|
13
|
+
toName
|
|
14
|
+
subject
|
|
11
15
|
previewText
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
processingCompletedAt
|
|
16
|
+
postmarkMessageId
|
|
17
|
+
campaignId
|
|
18
|
+
relatedEmailMessageId
|
|
19
|
+
occurredAt
|
|
17
20
|
}`;
|
|
18
21
|
|
|
19
|
-
export const
|
|
22
|
+
export const emailMessageDetailsFragment = `fragment emailMessageDetailsFragment on EmailMessage {
|
|
20
23
|
id
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
bodyText
|
|
25
|
+
bodyFormat
|
|
26
|
+
processingStartedAt
|
|
27
|
+
processingCompletedAt
|
|
25
28
|
replyToEmail
|
|
29
|
+
cc
|
|
26
30
|
replyToName
|
|
27
|
-
|
|
28
|
-
body
|
|
29
|
-
status
|
|
30
|
-
postmarkMessageId
|
|
31
|
-
errorMessage
|
|
31
|
+
suppressionReason
|
|
32
32
|
sentAt
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
deliveredAt
|
|
34
|
+
firstOpenedAt
|
|
35
|
+
bouncedAt
|
|
36
|
+
bounceType
|
|
37
|
+
spamComplaintAt
|
|
38
|
+
broadcast
|
|
35
39
|
relatedLogIds
|
|
40
|
+
updatedAt
|
|
36
41
|
}`;
|
|
@@ -1,27 +1,111 @@
|
|
|
1
|
-
|
|
1
|
+
// Program-owned group fields shared by program lists, forms and editor sources.
|
|
2
|
+
export const fieldDocProgramGroupFragment = `fragment fieldDocProgramGroupFragment on FieldDocProgramGroup {
|
|
3
|
+
id
|
|
4
|
+
fieldDocProgramId
|
|
5
|
+
name
|
|
6
|
+
order
|
|
7
|
+
}`;
|
|
8
|
+
|
|
9
|
+
// Org-agnostic program fields. Per-organization data (enrollment state, forms)
|
|
10
|
+
// never goes on this fragment: one cache entry is shared by every organization.
|
|
11
|
+
export const fieldDocProgramFragment = `fragment fieldDocProgramFragment on FieldDocProgram {
|
|
12
|
+
id
|
|
13
|
+
isCatalog
|
|
14
|
+
name
|
|
15
|
+
shortName
|
|
16
|
+
description
|
|
17
|
+
categoryKey
|
|
18
|
+
operations
|
|
19
|
+
layout {
|
|
20
|
+
columns
|
|
21
|
+
headers
|
|
22
|
+
gridLayoutStyle
|
|
23
|
+
}
|
|
24
|
+
retired
|
|
25
|
+
}`;
|
|
26
|
+
|
|
27
|
+
// Enrollment scalars only; id is "<organizationId>:<programId>". Program and
|
|
28
|
+
// forms are selected beside it (fieldDocProgramEnrollmentStatement).
|
|
29
|
+
export const fieldDocProgramEnrollmentFragment = `fragment fieldDocProgramEnrollmentFragment on FieldDocProgramEnrollment {
|
|
2
30
|
id
|
|
3
31
|
organizationId
|
|
32
|
+
archivedAt
|
|
33
|
+
restorableUntil
|
|
34
|
+
}`;
|
|
4
35
|
|
|
36
|
+
// The form; org-agnostic
|
|
37
|
+
export const fieldDocFragment = `fragment fieldDocFragment on FieldDoc {
|
|
38
|
+
order
|
|
39
|
+
id
|
|
40
|
+
fieldDocProgramId
|
|
5
41
|
documentName
|
|
6
42
|
title
|
|
43
|
+
draftTitle
|
|
7
44
|
description
|
|
8
|
-
agentHint
|
|
9
45
|
frequency
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
46
|
+
isProgramDoc
|
|
47
|
+
retired
|
|
48
|
+
published
|
|
49
|
+
publishedRevisionNumber
|
|
50
|
+
hasDraft
|
|
51
|
+
}`;
|
|
52
|
+
|
|
53
|
+
// The one submission shape, shared by submission lists and the document header.
|
|
54
|
+
// Spread it directly in operations, never inside another fragment.
|
|
55
|
+
export const fieldDocSubmissionFragment = `fragment fieldDocSubmissionFragment on FieldDocSubmission {
|
|
56
|
+
id
|
|
57
|
+
cursor
|
|
58
|
+
readableId
|
|
59
|
+
fieldDocId
|
|
60
|
+
fieldDocProgramId
|
|
61
|
+
programName
|
|
62
|
+
programShortName
|
|
63
|
+
isProgramDoc
|
|
64
|
+
definitionRevisionId
|
|
65
|
+
|
|
66
|
+
organizationId
|
|
67
|
+
organizationName
|
|
68
|
+
childOrgId
|
|
69
|
+
childOrgName
|
|
70
|
+
siteId
|
|
71
|
+
location
|
|
72
|
+
|
|
73
|
+
documentName
|
|
74
|
+
title
|
|
75
|
+
frequency
|
|
13
76
|
period
|
|
77
|
+
status
|
|
78
|
+
statusOverridden
|
|
14
79
|
summary
|
|
80
|
+
identifierHint
|
|
81
|
+
|
|
82
|
+
instanceKey
|
|
83
|
+
instanceStatus
|
|
84
|
+
instanceClosedAt
|
|
85
|
+
|
|
86
|
+
activityAt
|
|
87
|
+
createdAt
|
|
88
|
+
updatedAt
|
|
15
89
|
}`;
|
|
16
90
|
|
|
17
|
-
|
|
91
|
+
// Immutable definition revision scalars; sections and elements are selected
|
|
92
|
+
// beside it with their own fragments
|
|
93
|
+
export const fieldDocDefinitionFragment = `fragment fieldDocDefinitionFragment on FieldDocDefinition {
|
|
94
|
+
id
|
|
95
|
+
fieldDocId
|
|
96
|
+
revisionNumber
|
|
97
|
+
title
|
|
98
|
+
description
|
|
99
|
+
}`;
|
|
100
|
+
|
|
101
|
+
export const fieldDocDefinitionSectionFragment = `fragment fieldDocDefinitionSectionFragment on FieldDocDefinitionSection {
|
|
18
102
|
id
|
|
19
103
|
key
|
|
20
104
|
title
|
|
21
105
|
description
|
|
22
106
|
}`;
|
|
23
107
|
|
|
24
|
-
export const
|
|
108
|
+
export const fieldDocDefinitionElementFragment = `fragment fieldDocDefinitionElementFragment on FieldDocDefinitionElement {
|
|
25
109
|
id
|
|
26
110
|
key
|
|
27
111
|
kind
|
|
@@ -31,52 +115,150 @@ export const fieldDocElementDataFragment = `fragment fieldDocElementDataFragment
|
|
|
31
115
|
required
|
|
32
116
|
allowMultipleAnswers
|
|
33
117
|
doNotAllowNotes
|
|
118
|
+
answerType
|
|
119
|
+
tableColumns {
|
|
120
|
+
key
|
|
121
|
+
label
|
|
122
|
+
type
|
|
123
|
+
required
|
|
124
|
+
options
|
|
125
|
+
}
|
|
126
|
+
lineNumber
|
|
127
|
+
}`;
|
|
34
128
|
|
|
129
|
+
// One answer; id is "<submissionId>:<key>". Spread it directly in operations,
|
|
130
|
+
// never inside another fragment.
|
|
131
|
+
export const fieldDocAnswerFragment = `fragment fieldDocAnswerFragment on FieldDocAnswer {
|
|
132
|
+
id
|
|
133
|
+
key
|
|
35
134
|
text
|
|
135
|
+
tableRows {
|
|
136
|
+
id
|
|
137
|
+
cells {
|
|
138
|
+
key
|
|
139
|
+
text
|
|
140
|
+
isCustomBooleanLabel
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
answerState
|
|
144
|
+
answerReason
|
|
36
145
|
note
|
|
37
146
|
warningNote
|
|
38
147
|
referenceIds
|
|
39
|
-
lineNumber
|
|
40
148
|
}`;
|
|
41
149
|
|
|
42
|
-
|
|
150
|
+
// Edit session scalars only; id is "<organizationId>:<fieldDocId>". The source,
|
|
151
|
+
// editor and custom instructions are selected beside it (fieldDocEditSessionStatement).
|
|
152
|
+
export const fieldDocEditSessionFragment = `fragment fieldDocEditSessionFragment on FieldDocEditSession {
|
|
43
153
|
id
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
columns
|
|
48
|
-
headers
|
|
49
|
-
gridLayoutStyle
|
|
50
|
-
}
|
|
51
|
-
lastSubmissionPeriod
|
|
52
|
-
lastSubmissionFieldDocId
|
|
154
|
+
organizationId
|
|
155
|
+
mode
|
|
156
|
+
manageable
|
|
53
157
|
}`;
|
|
54
158
|
|
|
55
|
-
|
|
159
|
+
// id is "<organizationId>:<fieldDocId>"
|
|
160
|
+
export const fieldDocEditorSourceFragment = `fragment fieldDocEditorSourceFragment on FieldDocEditorSource {
|
|
161
|
+
order
|
|
56
162
|
id
|
|
57
|
-
fieldDocSubmissionId
|
|
58
163
|
fieldDocId
|
|
59
|
-
|
|
164
|
+
organizationId
|
|
165
|
+
fieldDocProgramId
|
|
166
|
+
isProgramDoc
|
|
167
|
+
documentName
|
|
60
168
|
frequency
|
|
61
|
-
|
|
169
|
+
editVersion
|
|
170
|
+
hasDraft
|
|
171
|
+
draftStale
|
|
172
|
+
publishedRevisionNumber
|
|
173
|
+
draftUpdatedAt
|
|
174
|
+
}`;
|
|
62
175
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
176
|
+
// Nested fragments are selected directly by operations, never spread inside another fragment.
|
|
177
|
+
export const fieldDocProgramStatement = `...fieldDocProgramFragment
|
|
178
|
+
groups {
|
|
179
|
+
...fieldDocProgramGroupFragment
|
|
180
|
+
}`;
|
|
67
181
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
182
|
+
export const fieldDocStatement = `...fieldDocFragment
|
|
183
|
+
group {
|
|
184
|
+
...fieldDocProgramGroupFragment
|
|
185
|
+
}`;
|
|
72
186
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
187
|
+
export const fieldDocEditorSourceStatement = `...fieldDocEditorSourceFragment
|
|
188
|
+
group {
|
|
189
|
+
...fieldDocProgramGroupFragment
|
|
190
|
+
}`;
|
|
191
|
+
|
|
192
|
+
export const fieldDocProgramImports = `${fieldDocProgramFragment}
|
|
193
|
+
${fieldDocProgramGroupFragment}`;
|
|
194
|
+
export const fieldDocImports = `${fieldDocFragment}
|
|
195
|
+
${fieldDocProgramGroupFragment}`;
|
|
196
|
+
export const fieldDocEditorSourceImports = `${fieldDocEditorSourceFragment}
|
|
197
|
+
${fieldDocProgramGroupFragment}`;
|
|
198
|
+
|
|
199
|
+
// The enrollment selection shared by fieldDocProgramEnrollments and every
|
|
200
|
+
// mutation returning FieldDocProgramEnrollment, so all of them cache the same tree
|
|
201
|
+
export const fieldDocProgramEnrollmentStatement = `...fieldDocProgramEnrollmentFragment
|
|
202
|
+
|
|
203
|
+
fieldDocSubmissionUpdates {
|
|
204
|
+
fieldDocId
|
|
205
|
+
lastSubmissionUpdatedAt
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
program {
|
|
209
|
+
${fieldDocProgramStatement}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
forms {
|
|
213
|
+
${fieldDocStatement}
|
|
214
|
+
}`;
|
|
215
|
+
|
|
216
|
+
export const fieldDocProgramEnrollmentImports = `
|
|
217
|
+
${fieldDocProgramEnrollmentFragment}
|
|
218
|
+
${fieldDocProgramGroupFragment}
|
|
219
|
+
${fieldDocProgramFragment}
|
|
220
|
+
${fieldDocFragment}
|
|
221
|
+
`;
|
|
222
|
+
|
|
223
|
+
// The edit session selection shared by fieldDocEditSession and
|
|
224
|
+
// editFieldDocCustomInstructions, so the mutation result updates the cached session
|
|
225
|
+
export const fieldDocEditSessionStatement = `...fieldDocEditSessionFragment
|
|
226
|
+
|
|
227
|
+
fieldDoc {
|
|
228
|
+
${fieldDocEditorSourceStatement}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
editor {
|
|
232
|
+
definition {
|
|
233
|
+
title
|
|
234
|
+
description
|
|
235
|
+
agentHint
|
|
236
|
+
sections {
|
|
237
|
+
key
|
|
238
|
+
label
|
|
239
|
+
description
|
|
240
|
+
hint
|
|
241
|
+
elements {
|
|
242
|
+
key
|
|
243
|
+
kind
|
|
244
|
+
label
|
|
245
|
+
description
|
|
246
|
+
hint
|
|
247
|
+
options
|
|
248
|
+
required
|
|
249
|
+
settings
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
customInstructions {
|
|
256
|
+
elementKey
|
|
257
|
+
instructions
|
|
258
|
+
updatedAt
|
|
259
|
+
}`;
|
|
260
|
+
|
|
261
|
+
export const fieldDocEditSessionImports = `
|
|
262
|
+
${fieldDocEditSessionFragment}
|
|
263
|
+
${fieldDocEditorSourceImports}
|
|
264
|
+
`;
|
|
@@ -14,14 +14,33 @@ export const logEntryFragment = `fragment logEntryFragment on LogEntry {
|
|
|
14
14
|
location
|
|
15
15
|
inboundContactEmail
|
|
16
16
|
inboundContactPhone
|
|
17
|
-
fieldDocName
|
|
18
|
-
fieldDocSubmissionPeriod
|
|
19
17
|
accountPersonName
|
|
20
18
|
summary
|
|
21
19
|
source
|
|
22
20
|
confidence
|
|
23
21
|
originalMessage
|
|
24
22
|
flagColor
|
|
23
|
+
translation {
|
|
24
|
+
version
|
|
25
|
+
sourceHash
|
|
26
|
+
originalLanguage
|
|
27
|
+
texts {
|
|
28
|
+
language
|
|
29
|
+
translatedAt
|
|
30
|
+
summary
|
|
31
|
+
notes
|
|
32
|
+
item
|
|
33
|
+
values {
|
|
34
|
+
ordinal
|
|
35
|
+
label
|
|
36
|
+
}
|
|
37
|
+
fields {
|
|
38
|
+
key
|
|
39
|
+
textValue
|
|
40
|
+
}
|
|
41
|
+
searchText
|
|
42
|
+
}
|
|
43
|
+
}
|
|
25
44
|
date
|
|
26
45
|
createdAt
|
|
27
46
|
updatedAt
|
|
@@ -62,3 +81,75 @@ export const logEntryDetailsFragment = `fragment logEntryDetailsFragment on LogE
|
|
|
62
81
|
|
|
63
82
|
notes
|
|
64
83
|
}`;
|
|
84
|
+
|
|
85
|
+
export const logRevisionSummaryFragment = `fragment logRevisionSummaryFragment on LogRevision {
|
|
86
|
+
id
|
|
87
|
+
cursor
|
|
88
|
+
organizationId
|
|
89
|
+
logEntryId
|
|
90
|
+
revisionNumber
|
|
91
|
+
action
|
|
92
|
+
mutationSource
|
|
93
|
+
createdAt
|
|
94
|
+
revisionHash
|
|
95
|
+
hashVersion
|
|
96
|
+
|
|
97
|
+
actor {
|
|
98
|
+
kind
|
|
99
|
+
accountId
|
|
100
|
+
displayName
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
changes {
|
|
104
|
+
path
|
|
105
|
+
operation
|
|
106
|
+
before
|
|
107
|
+
after
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
proof {
|
|
111
|
+
status
|
|
112
|
+
object
|
|
113
|
+
generation
|
|
114
|
+
hash
|
|
115
|
+
archivedAt
|
|
116
|
+
retentionUntil
|
|
117
|
+
}
|
|
118
|
+
}`;
|
|
119
|
+
|
|
120
|
+
export const logRevisionFragment = `fragment logRevisionFragment on LogRevision {
|
|
121
|
+
id
|
|
122
|
+
cursor
|
|
123
|
+
organizationId
|
|
124
|
+
logEntryId
|
|
125
|
+
revisionNumber
|
|
126
|
+
action
|
|
127
|
+
mutationSource
|
|
128
|
+
createdAt
|
|
129
|
+
snapshot
|
|
130
|
+
previousRevisionHash
|
|
131
|
+
revisionHash
|
|
132
|
+
hashVersion
|
|
133
|
+
|
|
134
|
+
actor {
|
|
135
|
+
kind
|
|
136
|
+
accountId
|
|
137
|
+
displayName
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
changes {
|
|
141
|
+
path
|
|
142
|
+
operation
|
|
143
|
+
before
|
|
144
|
+
after
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
proof {
|
|
148
|
+
status
|
|
149
|
+
object
|
|
150
|
+
generation
|
|
151
|
+
hash
|
|
152
|
+
archivedAt
|
|
153
|
+
retentionUntil
|
|
154
|
+
}
|
|
155
|
+
}`;
|
|
@@ -18,8 +18,13 @@ export const organizationFragment = `fragment organizationFragment on Organizati
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
settings {
|
|
21
|
+
schedule { defaultSurface }
|
|
22
|
+
id
|
|
21
23
|
timeZone
|
|
22
24
|
language
|
|
25
|
+
displayTranslatedLogs
|
|
26
|
+
translateLanguage
|
|
27
|
+
logRevisionsProof
|
|
23
28
|
color
|
|
24
29
|
priorityService
|
|
25
30
|
routes {
|
|
@@ -52,8 +57,13 @@ export const organizationFragment = `fragment organizationFragment on Organizati
|
|
|
52
57
|
}`;
|
|
53
58
|
|
|
54
59
|
export const organizationSettingsFragment = `fragment organizationSettingsFragment on OrganizationSettings {
|
|
60
|
+
schedule { defaultSurface }
|
|
61
|
+
id
|
|
55
62
|
timeZone
|
|
56
63
|
language
|
|
64
|
+
displayTranslatedLogs
|
|
65
|
+
translateLanguage
|
|
66
|
+
logRevisionsProof
|
|
57
67
|
color
|
|
58
68
|
priorityService
|
|
59
69
|
routes {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Share the complete QR record shape across management reads and mutations.
|
|
3
|
+
* References stay inline: their identity includes the entity type, and the
|
|
4
|
+
* displayed name snapshot belongs to this issued code rather than a live entity.
|
|
5
|
+
*/
|
|
6
|
+
export const qrCodeFragment = `fragment qrCodeFragment on QrCode {
|
|
7
|
+
id
|
|
8
|
+
cursor
|
|
9
|
+
organizationId
|
|
10
|
+
publicId
|
|
11
|
+
name
|
|
12
|
+
fields {
|
|
13
|
+
key
|
|
14
|
+
description
|
|
15
|
+
kind
|
|
16
|
+
value
|
|
17
|
+
reference {
|
|
18
|
+
type
|
|
19
|
+
id
|
|
20
|
+
}
|
|
21
|
+
displayNameSnapshot
|
|
22
|
+
}
|
|
23
|
+
payloadVersion
|
|
24
|
+
qrText
|
|
25
|
+
createdByAccountId
|
|
26
|
+
createdAt
|
|
27
|
+
updatedAt
|
|
28
|
+
archivedAt
|
|
29
|
+
}`;
|