@jsb188/graphql 1.1.12 → 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.
- package/LICENSE +21 -0
- package/audience.d.ts +14 -152
- package/cache/config.ts +35 -32
- package/cache/index.helpers.ts +1 -1
- package/cache/index.ts +73 -44
- package/cache/mounted-queries.ts +33 -0
- package/cache/persist.ts +10 -4
- package/cache/realtime-fence.ts +47 -0
- package/cache/realtime-live.ts +17 -0
- package/client/draft-persistence.ts +10 -39
- package/client/index.ts +2 -1
- package/client/request.ts +9 -34
- package/client/storage-asset.ts +58 -0
- package/gql/fragments/accountAuthFragments.ts +0 -4
- package/gql/fragments/agentNoteFragments.ts +8 -2
- package/gql/fragments/aiChatFragments.ts +0 -2
- package/gql/fragments/aiChatLinkFragments.ts +8 -0
- package/gql/fragments/audienceFragments.ts +1 -66
- package/gql/fragments/emailFragments.ts +27 -4
- package/gql/fragments/emailOutreachFragments.ts +281 -0
- package/gql/fragments/inboundContactFragments.ts +1 -1
- package/gql/fragments/libraryFragments.ts +120 -0
- package/gql/fragments/organizationFragments.ts +4 -2
- package/gql/fragments/scheduleFragments.ts +241 -324
- package/gql/fragments/sheetFragments.ts +4 -53
- package/gql/fragments/workWaitFragments.ts +13 -0
- package/gql/fragments/workflowFragments.ts +20 -4
- package/gql/mutations/agentNoteMutations.ts +2 -0
- package/gql/mutations/aiChatLinkMutations.ts +13 -0
- package/gql/mutations/aiChatMutations.ts +4 -6
- package/gql/mutations/audienceMutations.ts +0 -13
- package/gql/mutations/authMutations.ts +12 -60
- package/gql/mutations/emailMutations.ts +22 -0
- package/gql/mutations/emailOutreachMutations.ts +139 -0
- package/gql/mutations/index.ts +3 -1
- package/gql/mutations/organizationMutations.ts +2 -2
- package/gql/mutations/scheduleMutations.ts +61 -787
- package/gql/mutations/storageMutations.ts +1 -0
- package/gql/mutations/workflowMutations.ts +76 -0
- package/gql/queries/agentMemoryQueries.ts +6 -2
- package/gql/queries/agentNoteQueries.ts +26 -29
- package/gql/queries/aiChatQueries.ts +39 -40
- package/gql/queries/audienceQueries.ts +31 -55
- package/gql/queries/authQueries.ts +16 -6
- package/gql/queries/billingQueries.ts +26 -10
- package/gql/queries/dataTableQueries.ts +24 -15
- package/gql/queries/emailOutreachQueries.ts +282 -0
- package/gql/queries/emailQueries.ts +39 -12
- package/gql/queries/emailReplyReportQueries.ts +60 -9
- package/gql/queries/fieldDocQueries.ts +36 -14
- package/gql/queries/inboundContactQueries.ts +11 -4
- package/gql/queries/index.ts +2 -2
- package/gql/queries/libraryQueries.ts +112 -0
- package/gql/queries/logQueries.ts +31 -12
- package/gql/queries/organizationQueries.ts +31 -12
- package/gql/queries/qrCodeQueries.ts +11 -4
- package/gql/queries/scheduleQueries.ts +252 -505
- package/gql/queries/sheetQueries.ts +36 -14
- package/gql/queries/storageQueries.ts +11 -4
- package/gql/queries/workflowQueries.ts +53 -10
- package/gql/reactivity.ts +98 -0
- package/gql/recordReads.ts +171 -0
- package/hooks/index.ts +79 -52
- package/hooks/use-agentNote-mtn.ts +7 -0
- package/hooks/use-agentNote-qry.ts +30 -58
- package/hooks/use-agentNote-recovery.ts +6 -21
- package/hooks/use-aiChat-mtn.ts +9 -4
- package/hooks/use-aiChat-qry.ts +28 -7
- package/hooks/use-audience-mtn.ts +0 -24
- package/hooks/use-audience-qry.helpers.ts +0 -24
- package/hooks/use-audience-qry.ts +1 -86
- package/hooks/use-dataTable-mtn.ts +3 -3
- package/hooks/use-dataTable-qry.ts +7 -2
- package/hooks/use-email-mtn.ts +26 -0
- package/hooks/use-email-qry.helpers.ts +1 -1
- package/hooks/use-email-qry.ts +18 -3
- package/hooks/use-emailOutreach-mtn.ts +211 -0
- package/hooks/use-emailOutreach-qry.helpers.ts +25 -0
- package/hooks/use-emailOutreach-qry.ts +367 -0
- package/hooks/use-emailOutreachReplyReport-qry.ts +46 -0
- package/hooks/use-fieldDoc-qry.ts +1 -1
- package/hooks/use-library-qry.ts +233 -0
- package/hooks/use-qrCode-qry.ts +1 -1
- package/hooks/use-schedule-mtn.ts +10 -300
- package/hooks/use-schedule-qry.ts +168 -680
- package/hooks/use-schedule-reactive.ts +71 -339
- package/hooks/use-sheet-qry.ts +6 -1
- package/hooks/use-workflow-mtn.ts +45 -1
- package/hooks/use-workflow-qry.ts +22 -2
- package/libs/ai-chat-link-events.ts +78 -0
- package/libs/data-changes.helpers.ts +161 -0
- package/libs/data-changes.ts +382 -0
- package/libs/fragment-realtime-sequence.ts +3 -3
- package/libs/record-read.ts +327 -0
- package/libs/sheet-command-batch.ts +3 -2
- package/libs/sheet-realtime-packet.ts +53 -0
- package/loaders/emailPreference.ts +18 -24
- package/package.json +44 -17
- package/schedule.d.ts +267 -874
- package/types.d.ts +3 -1
- package/cache/index.chat-activity.test.ts +0 -119
- package/cache/index.chat.test.ts +0 -92
- package/cache/index.regression.test.ts +0 -149
- package/cache/index.test.ts +0 -1209
- package/deno.lock +0 -187
- package/deno.test.json +0 -12
- package/gql/fragments/campaignFragments.ts +0 -566
- package/gql/mutations/campaignMutations.ts +0 -258
- package/gql/queries/appQueries.ts +0 -14
- package/gql/queries/campaignQueries.ts +0 -236
- package/hooks/index.helpers.test.ts +0 -50
- package/hooks/use-agentNote-recovery.helpers.test.ts +0 -68
- package/hooks/use-aiChat-qry.helpers.test.ts +0 -63
- package/hooks/use-app-qry.ts +0 -22
- package/hooks/use-audience-qry.helpers.test.ts +0 -80
- package/hooks/use-campaign-generation-recovery.ts +0 -53
- package/hooks/use-campaign-mtn.ts +0 -436
- package/hooks/use-campaign-qry.helpers.ts +0 -40
- package/hooks/use-campaign-qry.ts +0 -834
- package/hooks/use-emailCampaignReplyReport-qry.ts +0 -27
- package/hooks/use-fieldDoc-qry.helpers.test.ts +0 -65
- package/hooks/use-publicFormEmail-mtn.ts +0 -27
- package/libs/fragment-recovery.test.ts +0 -326
- package/libs/fragment-recovery.ts +0 -325
- package/libs/orchestrator-realtime.helpers.test.ts +0 -229
- package/libs/orchestrator-realtime.helpers.ts +0 -317
- package/libs/orchestrator-realtime.ts +0 -433
- package/libs/request-cache-regression.test.ts +0 -122
- package/libs/request-managed-session.test.ts +0 -574
- package/libs/request-no-store.test.ts +0 -419
- package/libs/sheet-view-realtime-router.test.ts +0 -214
- package/libs/sse-ticket.test.ts +0 -26
- package/loaders/campaign.test.ts +0 -186
- package/loaders/campaign.ts +0 -110
- package/tests/agent-note-detail-cache.test.ts +0 -120
- package/tests/agent-note-search.test.ts +0 -444
- package/tsconfig.json +0 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
2
|
import { workflowFragment } from '../fragments/workflowFragments.ts';
|
|
3
|
+
import { workWaitItemFragment } from '../fragments/workWaitFragments.ts';
|
|
3
4
|
|
|
4
5
|
export const cancelReminderMtn = gql`
|
|
5
6
|
mutation cancelReminder (
|
|
@@ -15,6 +16,7 @@ mutation cancelReminder (
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
${workflowFragment}
|
|
19
|
+
${workWaitItemFragment}
|
|
18
20
|
`;
|
|
19
21
|
|
|
20
22
|
export const updateReminderMtn = gql`
|
|
@@ -39,6 +41,7 @@ mutation updateReminder (
|
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
${workflowFragment}
|
|
44
|
+
${workWaitItemFragment}
|
|
42
45
|
`;
|
|
43
46
|
|
|
44
47
|
export const editProgramWorkflowMtn = gql`
|
|
@@ -51,6 +54,7 @@ mutation editProgramWorkflow (
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
${workflowFragment}
|
|
57
|
+
${workWaitItemFragment}
|
|
54
58
|
`;
|
|
55
59
|
|
|
56
60
|
export const deleteWorkflowMtn = gql`
|
|
@@ -58,3 +62,75 @@ mutation deleteWorkflow($organizationId: GenericID!, $workflowId: GenericID!) {
|
|
|
58
62
|
deleteWorkflow(organizationId: $organizationId, workflowId: $workflowId)
|
|
59
63
|
}
|
|
60
64
|
`;
|
|
65
|
+
|
|
66
|
+
export const publishWorkflowMtn = gql`
|
|
67
|
+
mutation publishWorkflow (
|
|
68
|
+
$organizationId: GenericID!
|
|
69
|
+
$workflowId: GenericID!
|
|
70
|
+
$revision: Int!
|
|
71
|
+
) {
|
|
72
|
+
publishWorkflow (
|
|
73
|
+
organizationId: $organizationId
|
|
74
|
+
workflowId: $workflowId
|
|
75
|
+
revision: $revision
|
|
76
|
+
) {
|
|
77
|
+
...workflowFragment
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${workflowFragment}
|
|
82
|
+
${workWaitItemFragment}
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
export const setWorkflowActiveMtn = gql`
|
|
86
|
+
mutation setWorkflowActive (
|
|
87
|
+
$organizationId: GenericID!
|
|
88
|
+
$workflowId: GenericID!
|
|
89
|
+
$active: Boolean!
|
|
90
|
+
) {
|
|
91
|
+
setWorkflowActive (
|
|
92
|
+
organizationId: $organizationId
|
|
93
|
+
workflowId: $workflowId
|
|
94
|
+
active: $active
|
|
95
|
+
) {
|
|
96
|
+
...workflowFragment
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
${workflowFragment}
|
|
101
|
+
${workWaitItemFragment}
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
export const discardWorkflowDraftMtn = gql`
|
|
105
|
+
mutation discardWorkflowDraft (
|
|
106
|
+
$organizationId: GenericID!
|
|
107
|
+
$workflowId: GenericID!
|
|
108
|
+
) {
|
|
109
|
+
discardWorkflowDraft (
|
|
110
|
+
organizationId: $organizationId
|
|
111
|
+
workflowId: $workflowId
|
|
112
|
+
) {
|
|
113
|
+
...workflowFragment
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
${workflowFragment}
|
|
118
|
+
${workWaitItemFragment}
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
export const removeWorkflowAddedBehaviorMtn = gql`
|
|
122
|
+
mutation removeWorkflowAddedBehavior (
|
|
123
|
+
$organizationId: GenericID!
|
|
124
|
+
$workflowId: GenericID!
|
|
125
|
+
) {
|
|
126
|
+
removeWorkflowAddedBehavior (
|
|
127
|
+
organizationId: $organizationId
|
|
128
|
+
workflowId: $workflowId
|
|
129
|
+
) {
|
|
130
|
+
...workflowFragment
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
${workflowFragment}
|
|
135
|
+
${workWaitItemFragment}
|
|
136
|
+
`;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
2
|
import { agentMemoryFragment } from '../fragments/agentMemoryFragments.ts';
|
|
3
|
+
import { live } from '../reactivity.ts';
|
|
3
4
|
|
|
4
|
-
export const agentMemoriesQry =
|
|
5
|
+
export const agentMemoriesQry = live(
|
|
6
|
+
gql`
|
|
5
7
|
query agentMemories (
|
|
6
8
|
$organizationId: GenericID!
|
|
7
9
|
$scope: AgentMemoryScope
|
|
@@ -25,4 +27,6 @@ query agentMemories (
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
${agentMemoryFragment}
|
|
28
|
-
|
|
30
|
+
`,
|
|
31
|
+
{ refresh: 'auto', lists: ['agentMemory'] },
|
|
32
|
+
);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
2
|
import { agentNoteDetailFragment, agentNoteFragment } from '../fragments/agentNoteFragments.ts';
|
|
3
|
+
import { live } from '../reactivity.ts';
|
|
3
4
|
|
|
4
|
-
export const agentNoteBootstrapProgressQry =
|
|
5
|
+
export const agentNoteBootstrapProgressQry = live(
|
|
6
|
+
gql`
|
|
5
7
|
query agentNoteBootstrapProgress ($organizationId: GenericID!) {
|
|
6
8
|
agentNoteBootstrapProgress (organizationId: $organizationId) {
|
|
7
9
|
outcome
|
|
@@ -9,16 +11,22 @@ query agentNoteBootstrapProgress ($organizationId: GenericID!) {
|
|
|
9
11
|
nextReviewAt
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
|
-
|
|
14
|
+
`,
|
|
15
|
+
{ refresh: 'notice', derived: ['agentNoteBootstrap'] },
|
|
16
|
+
);
|
|
13
17
|
|
|
14
|
-
export const agentNotesRevisionQry =
|
|
18
|
+
export const agentNotesRevisionQry = live(
|
|
19
|
+
gql`
|
|
15
20
|
query agentNotesRevision ($organizationId: GenericID!) {
|
|
16
21
|
agentNotesRevision (organizationId: $organizationId)
|
|
17
22
|
}
|
|
18
|
-
|
|
23
|
+
`,
|
|
24
|
+
{ refresh: 'auto' },
|
|
25
|
+
);
|
|
19
26
|
|
|
20
27
|
// One complete homepage collection; groups and "show more" are local display state.
|
|
21
|
-
export const agentNotesQry =
|
|
28
|
+
export const agentNotesQry = live(
|
|
29
|
+
gql`
|
|
22
30
|
query agentNotes ($organizationId: GenericID!) {
|
|
23
31
|
agentNotes (organizationId: $organizationId) {
|
|
24
32
|
...agentNoteFragment
|
|
@@ -26,9 +34,12 @@ query agentNotes ($organizationId: GenericID!) {
|
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
${agentNoteFragment}
|
|
29
|
-
|
|
37
|
+
`,
|
|
38
|
+
{ refresh: 'auto', lists: ['agentNote'] },
|
|
39
|
+
);
|
|
30
40
|
|
|
31
|
-
export const searchAgentNotesQry =
|
|
41
|
+
export const searchAgentNotesQry = live(
|
|
42
|
+
gql`
|
|
32
43
|
query searchAgentNotes (
|
|
33
44
|
$organizationId: GenericID!
|
|
34
45
|
$query: String!
|
|
@@ -51,9 +62,12 @@ query searchAgentNotes (
|
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
${agentNoteFragment}
|
|
54
|
-
|
|
65
|
+
`,
|
|
66
|
+
{ refresh: 'auto', lists: ['agentNote'] },
|
|
67
|
+
);
|
|
55
68
|
|
|
56
|
-
export const agentNoteQry =
|
|
69
|
+
export const agentNoteQry = live(
|
|
70
|
+
gql`
|
|
57
71
|
query agentNote (
|
|
58
72
|
$organizationId: GenericID!
|
|
59
73
|
$agentNoteId: GenericID!
|
|
@@ -67,23 +81,6 @@ query agentNote (
|
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
${agentNoteDetailFragment}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// the note of every campaign created from it afterwards (null when unset)
|
|
74
|
-
export const campaignTemplateAgentNoteFocusQry = gql`
|
|
75
|
-
query campaignTemplateAgentNoteFocus (
|
|
76
|
-
$organizationId: GenericID!
|
|
77
|
-
$campaignTemplateId: GenericID!
|
|
78
|
-
) {
|
|
79
|
-
campaignTemplateAgentNoteFocus (
|
|
80
|
-
organizationId: $organizationId
|
|
81
|
-
campaignTemplateId: $campaignTemplateId
|
|
82
|
-
) {
|
|
83
|
-
organizationId
|
|
84
|
-
campaignTemplateId
|
|
85
|
-
focus
|
|
86
|
-
updatedAt
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
84
|
+
`,
|
|
85
|
+
{ refresh: 'auto', derived: ['agentNote'] },
|
|
86
|
+
);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
2
|
import { aiChatFragment, aiChatMessageFragment, aiChatRunFragment } from '../fragments/aiChatFragments.ts';
|
|
3
|
+
import { aiChatLinkFragment } from '../fragments/aiChatLinkFragments.ts';
|
|
3
4
|
import { storageFileFragment } from '../fragments/storageFragments.ts';
|
|
5
|
+
import { live } from '../reactivity.ts';
|
|
4
6
|
|
|
5
|
-
export const aiChatMetadataQry =
|
|
7
|
+
export const aiChatMetadataQry = live(
|
|
8
|
+
gql`
|
|
6
9
|
query aiChatMetadata (
|
|
7
10
|
$aiChatId: GenericID!
|
|
8
11
|
) {
|
|
@@ -17,9 +20,12 @@ query aiChatMetadata (
|
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
${aiChatRunFragment}
|
|
20
|
-
|
|
23
|
+
`,
|
|
24
|
+
{ refresh: 'auto' },
|
|
25
|
+
);
|
|
21
26
|
|
|
22
|
-
export const aiChatQry =
|
|
27
|
+
export const aiChatQry = live(
|
|
28
|
+
gql`
|
|
23
29
|
query aiChat (
|
|
24
30
|
$aiChatId: GenericID!
|
|
25
31
|
$includeWork: Boolean! = false
|
|
@@ -48,9 +54,24 @@ ${aiChatFragment}
|
|
|
48
54
|
${aiChatMessageFragment}
|
|
49
55
|
${aiChatRunFragment}
|
|
50
56
|
${storageFileFragment}
|
|
51
|
-
|
|
57
|
+
`,
|
|
58
|
+
{ refresh: 'auto', lists: ['aiChatMessage'] },
|
|
59
|
+
);
|
|
52
60
|
|
|
53
|
-
export const
|
|
61
|
+
export const aiChatLinksQry = live(
|
|
62
|
+
gql`
|
|
63
|
+
query aiChatLinks($aiChatId: GenericID!) {
|
|
64
|
+
aiChatLinks(aiChatId: $aiChatId) {
|
|
65
|
+
...aiChatLinkFragment
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
${aiChatLinkFragment}
|
|
69
|
+
`,
|
|
70
|
+
{ refresh: 'auto', lists: ['aiChatLink'] },
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
export const aiChatMessagesQry = live(
|
|
74
|
+
gql`
|
|
54
75
|
query aiChatMessages (
|
|
55
76
|
$aiChatId: GenericID!
|
|
56
77
|
$includeWork: Boolean! = false
|
|
@@ -71,39 +92,12 @@ query aiChatMessages (
|
|
|
71
92
|
|
|
72
93
|
${aiChatMessageFragment}
|
|
73
94
|
${storageFileFragment}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
query orchestratorArtifacts (
|
|
78
|
-
$aiChatId: GenericID!
|
|
79
|
-
) {
|
|
80
|
-
orchestratorArtifacts (
|
|
81
|
-
aiChatId: $aiChatId
|
|
82
|
-
) {
|
|
83
|
-
aiChatId
|
|
84
|
-
runId
|
|
85
|
-
callId
|
|
86
|
-
organizationId
|
|
87
|
-
toolName
|
|
88
|
-
kind
|
|
89
|
-
action
|
|
90
|
-
sheetId
|
|
91
|
-
sheetTabId
|
|
92
|
-
dataTableId
|
|
93
|
-
fieldDocId
|
|
94
|
-
fieldDocProgramId
|
|
95
|
-
hasDraft
|
|
96
|
-
draftStateAt
|
|
97
|
-
workflowId
|
|
98
|
-
active
|
|
99
|
-
title
|
|
100
|
-
replayed
|
|
101
|
-
at
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
95
|
+
`,
|
|
96
|
+
{ refresh: 'auto', lists: ['aiChatMessage'] },
|
|
97
|
+
);
|
|
105
98
|
|
|
106
|
-
export const aiChatsQry =
|
|
99
|
+
export const aiChatsQry = live(
|
|
100
|
+
gql`
|
|
107
101
|
query aiChats (
|
|
108
102
|
$organizationId: GenericID
|
|
109
103
|
$filter: AIChatsFilter
|
|
@@ -124,9 +118,12 @@ query aiChats (
|
|
|
124
118
|
}
|
|
125
119
|
|
|
126
120
|
${aiChatFragment}
|
|
127
|
-
|
|
121
|
+
`,
|
|
122
|
+
{ refresh: 'auto', lists: ['aiChat'] },
|
|
123
|
+
);
|
|
128
124
|
|
|
129
|
-
export const aiChatWorkMessagesQry =
|
|
125
|
+
export const aiChatWorkMessagesQry = live(
|
|
126
|
+
gql`
|
|
130
127
|
query aiChatMessages($aiChatId: GenericID!, $runId: String!, $cursor: Cursor, $after: Boolean!, $limit: Int!) {
|
|
131
128
|
aiChatMessages(aiChatId: $aiChatId, runId: $runId, cursor: $cursor, after: $after, limit: $limit) {
|
|
132
129
|
...aiChatMessageFragment
|
|
@@ -134,4 +131,6 @@ query aiChatMessages($aiChatId: GenericID!, $runId: String!, $cursor: Cursor, $a
|
|
|
134
131
|
}
|
|
135
132
|
${aiChatMessageFragment}
|
|
136
133
|
${storageFileFragment}
|
|
137
|
-
|
|
134
|
+
`,
|
|
135
|
+
{ refresh: 'auto', lists: ['aiChatMessage'] },
|
|
136
|
+
);
|
|
@@ -4,12 +4,11 @@ import {
|
|
|
4
4
|
audienceEventFragment,
|
|
5
5
|
audienceListFragment,
|
|
6
6
|
audienceListMemberFragment,
|
|
7
|
-
campaignAudienceMemberFragment,
|
|
8
|
-
campaignAudiencePreviewFragment,
|
|
9
|
-
campaignAudienceSessionFragment,
|
|
10
7
|
} from '../fragments/audienceFragments.ts';
|
|
8
|
+
import { live } from '../reactivity.ts';
|
|
11
9
|
|
|
12
|
-
export const audienceListsQry =
|
|
10
|
+
export const audienceListsQry = live(
|
|
11
|
+
gql`
|
|
13
12
|
query audienceLists(
|
|
14
13
|
$organizationId: GenericID!
|
|
15
14
|
$filter: AudienceListsFilter
|
|
@@ -24,18 +23,24 @@ query audienceLists(
|
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
${audienceListFragment}
|
|
27
|
-
|
|
26
|
+
`,
|
|
27
|
+
{ refresh: 'auto', lists: ['audienceList'], derived: ['audienceListMember'] },
|
|
28
|
+
);
|
|
28
29
|
|
|
29
|
-
export const audienceListQry =
|
|
30
|
+
export const audienceListQry = live(
|
|
31
|
+
gql`
|
|
30
32
|
query audienceList($organizationId: GenericID!, $audienceListId: GenericID!) {
|
|
31
33
|
audienceList(organizationId: $organizationId, audienceListId: $audienceListId) {
|
|
32
34
|
...audienceListFragment
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
${audienceListFragment}
|
|
36
|
-
|
|
38
|
+
`,
|
|
39
|
+
{ refresh: 'auto' },
|
|
40
|
+
);
|
|
37
41
|
|
|
38
|
-
export const audienceListMembersQry =
|
|
42
|
+
export const audienceListMembersQry = live(
|
|
43
|
+
gql`
|
|
39
44
|
query audienceListMembers(
|
|
40
45
|
$organizationId: GenericID!
|
|
41
46
|
$filter: AudienceListMembersFilter!
|
|
@@ -53,9 +58,12 @@ query audienceListMembers(
|
|
|
53
58
|
}
|
|
54
59
|
${audienceListMemberFragment}
|
|
55
60
|
${audienceEmailAddressFragment}
|
|
56
|
-
|
|
61
|
+
`,
|
|
62
|
+
{ refresh: 'auto', lists: ['audienceListMember'], scope: { audienceListId: 'filter.audienceListId' } },
|
|
63
|
+
);
|
|
57
64
|
|
|
58
|
-
export const audienceListOverviewQry =
|
|
65
|
+
export const audienceListOverviewQry = live(
|
|
66
|
+
gql`
|
|
59
67
|
query audienceListOverview($organizationId: GenericID!, $audienceListId: GenericID!) {
|
|
60
68
|
audienceListOverview(organizationId: $organizationId, audienceListId: $audienceListId) {
|
|
61
69
|
total
|
|
@@ -67,62 +75,30 @@ query audienceListOverview($organizationId: GenericID!, $audienceListId: Generic
|
|
|
67
75
|
eligible
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
|
-
|
|
78
|
+
`,
|
|
79
|
+
{ refresh: 'auto', derived: ['audienceList', 'audienceListMember', 'audienceEmailAddress'] },
|
|
80
|
+
);
|
|
71
81
|
|
|
72
|
-
export const audienceEmailAddressQry =
|
|
82
|
+
export const audienceEmailAddressQry = live(
|
|
83
|
+
gql`
|
|
73
84
|
query audienceEmailAddress($organizationId: GenericID!, $emailAddressId: GenericID!) {
|
|
74
85
|
audienceEmailAddress(organizationId: $organizationId, emailAddressId: $emailAddressId) {
|
|
75
86
|
...audienceEmailAddressFragment
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
89
|
${audienceEmailAddressFragment}
|
|
79
|
-
|
|
90
|
+
`,
|
|
91
|
+
{ refresh: 'auto' },
|
|
92
|
+
);
|
|
80
93
|
|
|
81
|
-
export const audienceAddressHistoryQry =
|
|
94
|
+
export const audienceAddressHistoryQry = live(
|
|
95
|
+
gql`
|
|
82
96
|
query audienceAddressHistory($organizationId: GenericID!, $emailAddressId: GenericID!, $afterId: GenericID, $limit: Int) {
|
|
83
97
|
audienceAddressHistory(organizationId: $organizationId, emailAddressId: $emailAddressId, afterId: $afterId, limit: $limit) {
|
|
84
98
|
...audienceEventFragment
|
|
85
99
|
}
|
|
86
100
|
}
|
|
87
101
|
${audienceEventFragment}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* Cache/WS contract: one root carries the campaign-keyed session and preview fragments, written together by
|
|
92
|
-
* this query and by setCampaignAudience, and refreshed by one ALWAYS reset targeting { organizationId, campaignId }.
|
|
93
|
-
*/
|
|
94
|
-
export const campaignAudienceQry = gql`
|
|
95
|
-
query campaignAudience($organizationId: GenericID!, $campaignId: GenericID!) {
|
|
96
|
-
campaignAudience(organizationId: $organizationId, campaignId: $campaignId) {
|
|
97
|
-
session { ...campaignAudienceSessionFragment }
|
|
98
|
-
preview { ...campaignAudiencePreviewFragment }
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
${campaignAudienceSessionFragment}
|
|
102
|
-
${campaignAudiencePreviewFragment}
|
|
103
|
-
`;
|
|
104
|
-
|
|
105
|
-
/*
|
|
106
|
-
* Cache/WS contract: pages of this query are dropped and refetched by RESET_ONLY resets
|
|
107
|
-
* targeting { organizationId, campaignId? }; rows are never patched through fragments.
|
|
108
|
-
*/
|
|
109
|
-
export const campaignAudienceMembersQry = gql`
|
|
110
|
-
query campaignAudienceMembers(
|
|
111
|
-
$organizationId: GenericID!
|
|
112
|
-
$campaignId: GenericID!
|
|
113
|
-
$filter: CampaignAudienceMembersFilter
|
|
114
|
-
$sort: CampaignAudienceMembersSort
|
|
115
|
-
$cursor: Cursor
|
|
116
|
-
$after: Boolean!
|
|
117
|
-
$limit: Int!
|
|
118
|
-
) {
|
|
119
|
-
campaignAudienceMembers(organizationId: $organizationId, campaignId: $campaignId, filter: $filter, sort: $sort, cursor: $cursor, after: $after, limit: $limit) {
|
|
120
|
-
...campaignAudienceMemberFragment
|
|
121
|
-
address {
|
|
122
|
-
...audienceEmailAddressFragment
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
${campaignAudienceMemberFragment}
|
|
127
|
-
${audienceEmailAddressFragment}
|
|
128
|
-
`;
|
|
102
|
+
`,
|
|
103
|
+
{ refresh: 'auto', derived: ['audienceList', 'audienceListMember', 'audienceEmailAddress'] },
|
|
104
|
+
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
2
|
import { accountSessionFragment } from '../fragments/accountSessionFragments.ts';
|
|
3
|
+
import { live } from '../reactivity.ts';
|
|
3
4
|
|
|
4
5
|
const ORGANIZATION_AUTHORIZATION_FIELDS = `
|
|
5
6
|
organizationAuthorizations {
|
|
@@ -14,13 +15,17 @@ const ORGANIZATION_AUTHORIZATION_FIELDS = `
|
|
|
14
15
|
}
|
|
15
16
|
`;
|
|
16
17
|
|
|
17
|
-
export const agentLoginAvailableQry =
|
|
18
|
+
export const agentLoginAvailableQry = live(
|
|
19
|
+
gql`
|
|
18
20
|
query agentLoginAvailable {
|
|
19
21
|
agentLoginAvailable
|
|
20
22
|
}
|
|
21
|
-
|
|
23
|
+
`,
|
|
24
|
+
{ refresh: 'auto' },
|
|
25
|
+
);
|
|
22
26
|
|
|
23
|
-
export const myAccountSessionsQry =
|
|
27
|
+
export const myAccountSessionsQry = live(
|
|
28
|
+
gql`
|
|
24
29
|
query myAccountSessions {
|
|
25
30
|
myAccountSessions {
|
|
26
31
|
...accountSessionFragment
|
|
@@ -28,9 +33,12 @@ query myAccountSessions {
|
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
${accountSessionFragment}
|
|
31
|
-
|
|
36
|
+
`,
|
|
37
|
+
{ refresh: 'auto', lists: ['accountSession'] },
|
|
38
|
+
);
|
|
32
39
|
|
|
33
|
-
export const organizationMemberSessionsQry =
|
|
40
|
+
export const organizationMemberSessionsQry = live(
|
|
41
|
+
gql`
|
|
34
42
|
query organizationMemberSessions (
|
|
35
43
|
$organizationId: GenericID!
|
|
36
44
|
$accountId: GenericID!
|
|
@@ -44,4 +52,6 @@ query organizationMemberSessions (
|
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
54
|
${accountSessionFragment}
|
|
47
|
-
|
|
55
|
+
`,
|
|
56
|
+
{ refresh: 'auto', lists: ['accountSession'] },
|
|
57
|
+
);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
+
import { live } from '../reactivity.ts';
|
|
2
3
|
|
|
3
|
-
export const organizationUsageQry =
|
|
4
|
+
export const organizationUsageQry = live(
|
|
5
|
+
gql`
|
|
4
6
|
query organizationUsage(
|
|
5
7
|
$organizationId: GenericID!
|
|
6
8
|
$occurredAtFrom: DateTime!
|
|
@@ -21,9 +23,12 @@ query organizationUsage(
|
|
|
21
23
|
eventCount
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
|
-
|
|
26
|
+
`,
|
|
27
|
+
{ refresh: 'auto' },
|
|
28
|
+
);
|
|
25
29
|
|
|
26
|
-
export const billingPlansQry =
|
|
30
|
+
export const billingPlansQry = live(
|
|
31
|
+
gql`
|
|
27
32
|
query billingPlans {
|
|
28
33
|
billingPlans {
|
|
29
34
|
planKey
|
|
@@ -40,9 +45,12 @@ query billingPlans {
|
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
|
-
|
|
48
|
+
`,
|
|
49
|
+
{ refresh: 'auto' },
|
|
50
|
+
);
|
|
44
51
|
|
|
45
|
-
export const billingClientConfigQry =
|
|
52
|
+
export const billingClientConfigQry = live(
|
|
53
|
+
gql`
|
|
46
54
|
query billingClientConfig {
|
|
47
55
|
billingClientConfig {
|
|
48
56
|
publishableKey
|
|
@@ -50,9 +58,12 @@ query billingClientConfig {
|
|
|
50
58
|
paymentMethodTypes
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
|
-
|
|
61
|
+
`,
|
|
62
|
+
{ refresh: 'auto' },
|
|
63
|
+
);
|
|
54
64
|
|
|
55
|
-
export const organizationBillingQry =
|
|
65
|
+
export const organizationBillingQry = live(
|
|
66
|
+
gql`
|
|
56
67
|
query organizationBilling (
|
|
57
68
|
$organizationId: GenericID!
|
|
58
69
|
) {
|
|
@@ -101,9 +112,12 @@ query organizationBilling (
|
|
|
101
112
|
}
|
|
102
113
|
}
|
|
103
114
|
}
|
|
104
|
-
|
|
115
|
+
`,
|
|
116
|
+
{ refresh: 'auto', derived: ['organizationBilling'] },
|
|
117
|
+
);
|
|
105
118
|
|
|
106
|
-
export const billingPurchasePreviewQry =
|
|
119
|
+
export const billingPurchasePreviewQry = live(
|
|
120
|
+
gql`
|
|
107
121
|
query billingPurchasePreview (
|
|
108
122
|
$organizationId: GenericID!
|
|
109
123
|
$priceId: String!
|
|
@@ -121,4 +135,6 @@ query billingPurchasePreview (
|
|
|
121
135
|
taxStatus
|
|
122
136
|
}
|
|
123
137
|
}
|
|
124
|
-
|
|
138
|
+
`,
|
|
139
|
+
{ refresh: 'auto' },
|
|
140
|
+
);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
dataTableRowFragment,
|
|
5
|
-
dataTableRunFragment,
|
|
6
|
-
} from '../fragments/dataTableFragments.ts';
|
|
2
|
+
import { dataTableFragment, dataTableRowFragment, dataTableRunFragment } from '../fragments/dataTableFragments.ts';
|
|
3
|
+
import { live } from '../reactivity.ts';
|
|
7
4
|
|
|
8
|
-
export const dataTablesQry =
|
|
5
|
+
export const dataTablesQry = live(
|
|
6
|
+
gql`
|
|
9
7
|
query dataTables (
|
|
10
8
|
$organizationId: GenericID!
|
|
11
9
|
$filter: DataTablesFilter
|
|
@@ -27,9 +25,12 @@ query dataTables (
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
${dataTableFragment}
|
|
30
|
-
|
|
28
|
+
`,
|
|
29
|
+
{ refresh: 'notice', lists: ['dataTable'] },
|
|
30
|
+
);
|
|
31
31
|
|
|
32
|
-
export const dataTableQry =
|
|
32
|
+
export const dataTableQry = live(
|
|
33
|
+
gql`
|
|
33
34
|
query dataTable (
|
|
34
35
|
$organizationId: GenericID!
|
|
35
36
|
$dataTableId: GenericID!
|
|
@@ -43,11 +44,14 @@ query dataTable (
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
${dataTableFragment}
|
|
46
|
-
|
|
47
|
+
`,
|
|
48
|
+
{ refresh: 'notice' },
|
|
49
|
+
);
|
|
47
50
|
|
|
48
|
-
// One keyset page of a table's live rows.
|
|
49
|
-
//
|
|
50
|
-
export const dataTableRowsQry =
|
|
51
|
+
// One keyset page of a table's live rows. A row the page does not hold (an
|
|
52
|
+
// `added` or `touched` dataTableRow change) shows the declared notice.
|
|
53
|
+
export const dataTableRowsQry = live(
|
|
54
|
+
gql`
|
|
51
55
|
query dataTableRows (
|
|
52
56
|
$organizationId: GenericID!
|
|
53
57
|
$dataTableId: GenericID!
|
|
@@ -72,9 +76,12 @@ query dataTableRows (
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
${dataTableRowFragment}
|
|
75
|
-
|
|
79
|
+
`,
|
|
80
|
+
{ refresh: 'notice', lists: ['dataTableRow'] },
|
|
81
|
+
);
|
|
76
82
|
|
|
77
|
-
export const dataTableRunsQry =
|
|
83
|
+
export const dataTableRunsQry = live(
|
|
84
|
+
gql`
|
|
78
85
|
query dataTableRuns (
|
|
79
86
|
$organizationId: GenericID!
|
|
80
87
|
$dataTableId: GenericID!
|
|
@@ -90,4 +97,6 @@ query dataTableRuns (
|
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
${dataTableRunFragment}
|
|
93
|
-
|
|
100
|
+
`,
|
|
101
|
+
{ refresh: 'auto' },
|
|
102
|
+
);
|