@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.
- package/LICENSE +21 -0
- package/audience.d.ts +205 -0
- package/cache/config.ts +65 -28
- package/cache/index.helpers.ts +96 -0
- package/cache/index.ts +364 -808
- package/cache/mounted-queries.ts +33 -0
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +107 -22
- package/cache/realtime-fence.ts +47 -0
- package/cache/realtime-live.ts +17 -0
- 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} +13 -39
- package/client/index.ts +4 -2
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +122 -232
- package/client/storage-asset.ts +58 -0
- package/gql/fragments/accountAuthFragments.ts +0 -4
- package/gql/fragments/agentMemoryFragments.ts +5 -1
- package/gql/fragments/agentNoteFragments.ts +156 -0
- package/gql/fragments/aiChatFragments.ts +35 -11
- package/gql/fragments/aiChatLinkFragments.ts +8 -0
- package/gql/fragments/audienceFragments.ts +76 -0
- package/gql/fragments/dataTableFragments.ts +48 -80
- package/gql/fragments/emailFragments.ts +49 -21
- package/gql/fragments/emailOutreachFragments.ts +281 -0
- package/gql/fragments/fieldDocFragments.ts +222 -40
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/libraryFragments.ts +120 -0
- package/gql/fragments/logFragments.ts +93 -2
- package/gql/fragments/organizationFragments.ts +12 -0
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +574 -145
- package/gql/fragments/sheetFragments.ts +86 -424
- package/gql/fragments/storageFragments.ts +25 -1
- package/gql/fragments/workWaitFragments.ts +13 -0
- package/gql/fragments/workflowFragments.ts +32 -4
- package/gql/mutations/agentMemoryMutations.ts +32 -0
- package/gql/mutations/agentNoteMutations.ts +64 -0
- package/gql/mutations/aiChatLinkMutations.ts +13 -0
- package/gql/mutations/aiChatMutations.ts +34 -4
- package/gql/mutations/audienceMutations.ts +58 -0
- package/gql/mutations/authMutations.ts +24 -28
- package/gql/mutations/billingMutations.ts +24 -0
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +18 -75
- package/gql/mutations/emailMutations.ts +22 -0
- package/gql/mutations/emailOutreachMutations.ts +139 -0
- package/gql/mutations/fieldDocMutations.ts +162 -13
- package/gql/mutations/index.ts +10 -5
- package/gql/mutations/organizationMutations.ts +6 -0
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +389 -417
- package/gql/mutations/sheetMutations.ts +62 -118
- package/gql/mutations/storageMutations.ts +1 -1
- package/gql/mutations/workflowMutations.ts +94 -0
- package/gql/queries/agentMemoryQueries.ts +12 -2
- package/gql/queries/agentNoteQueries.ts +86 -0
- package/gql/queries/aiChatQueries.ts +63 -12
- package/gql/queries/audienceQueries.ts +104 -0
- package/gql/queries/authQueries.ts +20 -4
- package/gql/queries/billingQueries.ts +114 -9
- package/gql/queries/dataTableQueries.ts +43 -75
- package/gql/queries/emailOutreachQueries.ts +282 -0
- package/gql/queries/emailQueries.ts +48 -64
- package/gql/queries/emailReplyReportQueries.ts +127 -0
- package/gql/queries/fieldDocQueries.ts +128 -98
- package/gql/queries/inboundContactQueries.ts +15 -4
- package/gql/queries/index.ts +5 -3
- package/gql/queries/libraryQueries.ts +112 -0
- package/gql/queries/logQueries.ts +86 -12
- package/gql/queries/organizationQueries.ts +44 -12
- package/gql/queries/qrCodeQueries.ts +27 -0
- package/gql/queries/scheduleQueries.ts +401 -278
- package/gql/queries/sheetQueries.ts +94 -165
- package/gql/queries/storageQueries.ts +11 -4
- package/gql/queries/workflowQueries.ts +61 -12
- package/gql/reactivity.ts +98 -0
- package/gql/recordReads.ts +171 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +920 -715
- package/hooks/use-agentMemory-mtn.ts +29 -31
- package/hooks/use-agentMemory-qry.ts +15 -3
- package/hooks/use-agentNote-mtn.ts +89 -0
- package/hooks/use-agentNote-qry.ts +162 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +57 -0
- package/hooks/use-aiChat-mtn.ts +104 -115
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +254 -387
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-audience-mtn.ts +170 -0
- package/hooks/use-audience-qry.helpers.ts +39 -0
- package/hooks/use-audience-qry.ts +245 -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-dataTable-mtn.ts +23 -115
- package/hooks/use-dataTable-qry.ts +69 -914
- package/hooks/use-email-mtn.ts +26 -0
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +44 -174
- 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-mtn.ts +244 -32
- 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-library-qry.ts +233 -0
- 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-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +231 -348
- package/hooks/use-schedule-qry.ts +208 -139
- package/hooks/use-schedule-reactive.ts +218 -0
- package/hooks/use-sheet-mtn.ts +91 -199
- package/hooks/use-sheet-qry.ts +88 -237
- package/hooks/use-storage-qry.ts +84 -61
- package/hooks/use-workflow-mtn.ts +84 -23
- package/hooks/use-workflow-qry.ts +60 -61
- package/libs/ai-chat-link-events.ts +78 -0
- 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/data-changes.helpers.ts +161 -0
- package/libs/data-changes.ts +382 -0
- package/libs/fragment-realtime-sequence.ts +55 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/record-read.ts +327 -0
- package/libs/sheet-command-batch.ts +45 -0
- package/libs/sheet-realtime-packet.ts +53 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/loaders/emailPreference.ts +69 -0
- package/loaders/rest.ts +12 -0
- package/package.json +77 -25
- package/schedule.d.ts +1183 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +26 -115
- package/types.d.ts +48 -25
- package/cache/index.test.ts +0 -881
- 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-managed-session.test.ts +0 -574
- package/client/request-no-store.test.ts +0 -157
- package/client/sse-ticket.test.ts +0 -26
- package/deno.lock +0 -170
- package/deno.test.json +0 -10
- package/gql/fragments/agentDocFragments.ts +0 -46
- package/gql/fragments/billingFragments.ts +0 -14
- package/gql/fragments/campaignFragments.ts +0 -277
- package/gql/mutations/agentDocMutations.ts +0 -177
- package/gql/mutations/campaignMutations.ts +0 -215
- package/gql/queries/agentDocQueries.ts +0 -120
- package/gql/queries/appQueries.ts +0 -14
- package/gql/queries/campaignQueries.ts +0 -127
- package/hooks/use-agentDoc-mtn.ts +0 -285
- package/hooks/use-agentDoc-qry.ts +0 -208
- package/hooks/use-app-qry.ts +0 -22
- package/hooks/use-campaign-mtn.ts +0 -377
- package/hooks/use-campaign-qry.ts +0 -257
- package/loaders/campaign.ts +0 -137
- package/tsconfig.json +0 -13
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { registerENV } from '@jsb188/app';
|
|
2
|
-
import { makeVariablesKey } from '@jsb188/app/utils/logic.ts';
|
|
3
|
-
import { clearGraphQLClientCache, loadDataFromCache } from '../cache/index.ts';
|
|
4
|
-
import { graphqlRequestNoStore, graphqlServerRequest } from './request.ts';
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* Build the smallest GraphQL document needed to prove root-cache isolation.
|
|
8
|
-
*/
|
|
9
|
-
function buildOpenSheetTestQuery() {
|
|
10
|
-
return {
|
|
11
|
-
definitions: [
|
|
12
|
-
{
|
|
13
|
-
kind: 'OperationDefinition',
|
|
14
|
-
name: { value: 'openSheet' },
|
|
15
|
-
operation: 'query',
|
|
16
|
-
selectionSet: {
|
|
17
|
-
selections: [
|
|
18
|
-
{
|
|
19
|
-
kind: 'Field',
|
|
20
|
-
name: { value: 'openSheet' },
|
|
21
|
-
selectionSet: {
|
|
22
|
-
selections: [
|
|
23
|
-
{
|
|
24
|
-
kind: 'Field',
|
|
25
|
-
name: { value: 'id' },
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
loc: { source: { body: 'query openSheet { openSheet { id } }' } },
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
Deno.test('graphqlRequestNoStore isolates auth flights and leaves root cache empty', async () => {
|
|
39
|
-
clearGraphQLClientCache();
|
|
40
|
-
registerENV({
|
|
41
|
-
GQL_SERVER: 'https://graphql.test/open-sheet',
|
|
42
|
-
IS_BROWSER: '',
|
|
43
|
-
});
|
|
44
|
-
const originalFetch = globalThis.fetch;
|
|
45
|
-
const authorizationHeaders: Array<string | null> = [];
|
|
46
|
-
globalThis.fetch = (async (_input: URL | RequestInfo, init?: RequestInit) => {
|
|
47
|
-
authorizationHeaders.push(new Headers(init?.headers).get('authorization'));
|
|
48
|
-
return new Response(
|
|
49
|
-
JSON.stringify({ data: { openSheet: { id: 'sheet-1' } } }),
|
|
50
|
-
{
|
|
51
|
-
status: 200,
|
|
52
|
-
headers: { 'content-type': 'application/json' },
|
|
53
|
-
},
|
|
54
|
-
);
|
|
55
|
-
}) as typeof fetch;
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
const gqlQuery = buildOpenSheetTestQuery();
|
|
59
|
-
const variables = { sheetId: 'sheet-1' };
|
|
60
|
-
const [first, second] = await Promise.all([
|
|
61
|
-
graphqlRequestNoStore(gqlQuery, variables, {
|
|
62
|
-
authToken: 'auth-token-a',
|
|
63
|
-
}),
|
|
64
|
-
graphqlRequestNoStore(gqlQuery, variables, {
|
|
65
|
-
authToken: 'auth-token-b',
|
|
66
|
-
}),
|
|
67
|
-
]);
|
|
68
|
-
const cachedData = loadDataFromCache(
|
|
69
|
-
{},
|
|
70
|
-
gqlQuery,
|
|
71
|
-
makeVariablesKey(variables),
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
JSON.stringify(authorizationHeaders) !==
|
|
76
|
-
JSON.stringify(['auth-token-a', 'auth-token-b'])
|
|
77
|
-
) {
|
|
78
|
-
throw new Error(
|
|
79
|
-
'No-store calls did not preserve independent auth headers.',
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
if (
|
|
83
|
-
first?.openSheet?.id !== 'sheet-1' ||
|
|
84
|
-
second?.openSheet?.id !== 'sheet-1'
|
|
85
|
-
) {
|
|
86
|
-
throw new Error('No-store responses were not returned independently.');
|
|
87
|
-
}
|
|
88
|
-
if (Object.keys(cachedData).length) {
|
|
89
|
-
throw new Error('No-store response entered the root query cache.');
|
|
90
|
-
}
|
|
91
|
-
} finally {
|
|
92
|
-
globalThis.fetch = originalFetch;
|
|
93
|
-
clearGraphQLClientCache();
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
Deno.test('graphqlServerRequest reuses results within one account cache scope', async () => {
|
|
98
|
-
registerENV({
|
|
99
|
-
GQL_SERVER: 'https://graphql.test/server-cache',
|
|
100
|
-
IS_BROWSER: '',
|
|
101
|
-
});
|
|
102
|
-
const originalFetch = globalThis.fetch;
|
|
103
|
-
let fetchCount = 0;
|
|
104
|
-
globalThis.fetch = (async (_input: URL | RequestInfo, init?: RequestInit) => {
|
|
105
|
-
fetchCount++;
|
|
106
|
-
return new Response(
|
|
107
|
-
JSON.stringify({
|
|
108
|
-
data: {
|
|
109
|
-
openSheet: {
|
|
110
|
-
id: new Headers(init?.headers).get('authorization'),
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
}),
|
|
114
|
-
{
|
|
115
|
-
status: 200,
|
|
116
|
-
headers: { 'content-type': 'application/json' },
|
|
117
|
-
},
|
|
118
|
-
);
|
|
119
|
-
}) as typeof fetch;
|
|
120
|
-
|
|
121
|
-
try {
|
|
122
|
-
const gqlQuery = buildOpenSheetTestQuery();
|
|
123
|
-
const variables = { sheetId: 'server-cache-sheet' };
|
|
124
|
-
const [first, joined] = await Promise.all([
|
|
125
|
-
graphqlServerRequest(gqlQuery, variables, {
|
|
126
|
-
authToken: 'auth-token-a',
|
|
127
|
-
cacheAccountId: 'account-a',
|
|
128
|
-
}),
|
|
129
|
-
graphqlServerRequest(gqlQuery, variables, {
|
|
130
|
-
authToken: 'auth-token-a',
|
|
131
|
-
cacheAccountId: 'account-a',
|
|
132
|
-
}),
|
|
133
|
-
]);
|
|
134
|
-
const cached = await graphqlServerRequest(gqlQuery, variables, {
|
|
135
|
-
authToken: 'auth-token-a',
|
|
136
|
-
cacheAccountId: 'account-a',
|
|
137
|
-
});
|
|
138
|
-
const otherAccount = await graphqlServerRequest(gqlQuery, variables, {
|
|
139
|
-
authToken: 'auth-token-b',
|
|
140
|
-
cacheAccountId: 'account-b',
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
fetchCount !== 2 ||
|
|
145
|
-
first?.openSheet?.id !== 'auth-token-a' ||
|
|
146
|
-
joined?.openSheet?.id !== 'auth-token-a' ||
|
|
147
|
-
cached?.openSheet?.id !== 'auth-token-a' ||
|
|
148
|
-
otherAccount?.openSheet?.id !== 'auth-token-b'
|
|
149
|
-
) {
|
|
150
|
-
throw new Error(
|
|
151
|
-
'Server request cache did not preserve account-scoped reuse.',
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
} finally {
|
|
155
|
-
globalThis.fetch = originalFetch;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Assert one client-side SSE credential invariant with a useful failure.
|
|
3
|
-
*/
|
|
4
|
-
function expect(value: unknown, message: string) {
|
|
5
|
-
if (!value) {
|
|
6
|
-
throw new Error(message);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
Deno.test('AI chat EventSource URLs contain only the single-use SSE ticket', async () => {
|
|
11
|
-
const runtime = await Deno.readTextFile(
|
|
12
|
-
new URL('../hooks/use-aiChat-qry.ts', import.meta.url),
|
|
13
|
-
);
|
|
14
|
-
expect(
|
|
15
|
-
runtime.includes('session_key: sessionKey'),
|
|
16
|
-
'AI chat SSE must send its one-time ticket',
|
|
17
|
-
);
|
|
18
|
-
expect(
|
|
19
|
-
!runtime.includes('auth_token'),
|
|
20
|
-
'AI chat SSE URLs must never contain the reusable access JWT',
|
|
21
|
-
);
|
|
22
|
-
expect(
|
|
23
|
-
!runtime.includes('getAuthToken'),
|
|
24
|
-
'AI chat SSE must not read a reusable bearer for EventSource query parameters',
|
|
25
|
-
);
|
|
26
|
-
});
|
package/deno.lock
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "5",
|
|
3
|
-
"specifiers": {
|
|
4
|
-
"npm:luxon@3.7.2": "3.7.2",
|
|
5
|
-
"npm:node-polyglot@^2.6.0": "2.6.0"
|
|
6
|
-
},
|
|
7
|
-
"npm": {
|
|
8
|
-
"call-bind-apply-helpers@1.0.2": {
|
|
9
|
-
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
|
10
|
-
"dependencies": [
|
|
11
|
-
"es-errors",
|
|
12
|
-
"function-bind"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
"call-bind@1.0.9": {
|
|
16
|
-
"integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==",
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"call-bind-apply-helpers",
|
|
19
|
-
"es-define-property",
|
|
20
|
-
"get-intrinsic",
|
|
21
|
-
"set-function-length"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"call-bound@1.0.4": {
|
|
25
|
-
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
|
26
|
-
"dependencies": [
|
|
27
|
-
"call-bind-apply-helpers",
|
|
28
|
-
"get-intrinsic"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"define-data-property@1.1.4": {
|
|
32
|
-
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
|
33
|
-
"dependencies": [
|
|
34
|
-
"es-define-property",
|
|
35
|
-
"es-errors",
|
|
36
|
-
"gopd"
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"define-properties@1.2.1": {
|
|
40
|
-
"integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
|
|
41
|
-
"dependencies": [
|
|
42
|
-
"define-data-property",
|
|
43
|
-
"has-property-descriptors",
|
|
44
|
-
"object-keys"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
"dunder-proto@1.0.1": {
|
|
48
|
-
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
|
49
|
-
"dependencies": [
|
|
50
|
-
"call-bind-apply-helpers",
|
|
51
|
-
"es-errors",
|
|
52
|
-
"gopd"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"es-define-property@1.0.1": {
|
|
56
|
-
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="
|
|
57
|
-
},
|
|
58
|
-
"es-errors@1.3.0": {
|
|
59
|
-
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
|
|
60
|
-
},
|
|
61
|
-
"es-object-atoms@1.1.2": {
|
|
62
|
-
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
|
|
63
|
-
"dependencies": [
|
|
64
|
-
"es-errors"
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
"function-bind@1.1.2": {
|
|
68
|
-
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
|
69
|
-
},
|
|
70
|
-
"get-intrinsic@1.3.0": {
|
|
71
|
-
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
|
72
|
-
"dependencies": [
|
|
73
|
-
"call-bind-apply-helpers",
|
|
74
|
-
"es-define-property",
|
|
75
|
-
"es-errors",
|
|
76
|
-
"es-object-atoms",
|
|
77
|
-
"function-bind",
|
|
78
|
-
"get-proto",
|
|
79
|
-
"gopd",
|
|
80
|
-
"has-symbols",
|
|
81
|
-
"hasown",
|
|
82
|
-
"math-intrinsics"
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
"get-proto@1.0.1": {
|
|
86
|
-
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
|
87
|
-
"dependencies": [
|
|
88
|
-
"dunder-proto",
|
|
89
|
-
"es-object-atoms"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"gopd@1.2.0": {
|
|
93
|
-
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
|
|
94
|
-
},
|
|
95
|
-
"has-property-descriptors@1.0.2": {
|
|
96
|
-
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
|
97
|
-
"dependencies": [
|
|
98
|
-
"es-define-property"
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
"has-symbols@1.1.0": {
|
|
102
|
-
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
|
|
103
|
-
},
|
|
104
|
-
"hasown@2.0.4": {
|
|
105
|
-
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
|
106
|
-
"dependencies": [
|
|
107
|
-
"function-bind"
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
"js-tokens@4.0.0": {
|
|
111
|
-
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
|
112
|
-
},
|
|
113
|
-
"loose-envify@1.4.0": {
|
|
114
|
-
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
|
115
|
-
"dependencies": [
|
|
116
|
-
"js-tokens"
|
|
117
|
-
],
|
|
118
|
-
"bin": true
|
|
119
|
-
},
|
|
120
|
-
"luxon@3.7.2": {
|
|
121
|
-
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew=="
|
|
122
|
-
},
|
|
123
|
-
"math-intrinsics@1.1.0": {
|
|
124
|
-
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="
|
|
125
|
-
},
|
|
126
|
-
"node-polyglot@2.6.0": {
|
|
127
|
-
"integrity": "sha512-ZZFkaYzIfGfBvSM6QhA9dM8EEaUJOVewzGSRcXWbJELXDj0lajAtKaENCYxvF5yE+TgHg6NQb0CmgYMsMdcNJQ==",
|
|
128
|
-
"dependencies": [
|
|
129
|
-
"hasown",
|
|
130
|
-
"object.entries",
|
|
131
|
-
"warning"
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
"object-keys@1.1.1": {
|
|
135
|
-
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
|
136
|
-
},
|
|
137
|
-
"object.entries@1.1.9": {
|
|
138
|
-
"integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
|
|
139
|
-
"dependencies": [
|
|
140
|
-
"call-bind",
|
|
141
|
-
"call-bound",
|
|
142
|
-
"define-properties",
|
|
143
|
-
"es-object-atoms"
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"set-function-length@1.2.2": {
|
|
147
|
-
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
|
148
|
-
"dependencies": [
|
|
149
|
-
"define-data-property",
|
|
150
|
-
"es-errors",
|
|
151
|
-
"function-bind",
|
|
152
|
-
"get-intrinsic",
|
|
153
|
-
"gopd",
|
|
154
|
-
"has-property-descriptors"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
"warning@4.0.3": {
|
|
158
|
-
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
|
159
|
-
"dependencies": [
|
|
160
|
-
"loose-envify"
|
|
161
|
-
]
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"workspace": {
|
|
165
|
-
"dependencies": [
|
|
166
|
-
"npm:luxon@3.7.2",
|
|
167
|
-
"npm:node-polyglot@^2.6.0"
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
}
|
package/deno.test.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"imports": {
|
|
3
|
-
"@jsb188/app": "../@jsb188:app/src/main.ts",
|
|
4
|
-
"@jsb188/app/": "../@jsb188:app/src/",
|
|
5
|
-
"@jsb188/mday/": "../@jsb188:mday/src/",
|
|
6
|
-
"@jsb188/react/": "../@jsb188:react/src/",
|
|
7
|
-
"luxon": "npm:luxon@3.7.2",
|
|
8
|
-
"node-polyglot": "npm:node-polyglot@^2.6.0"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// NOTE: The selection set must stay exactly aligned with the server's
|
|
2
|
-
// realtime $agentDocFragment emit (mapDataToGraphQLFragment 'agent_docs' case
|
|
3
|
-
// in server/src/utils/graphql-data.ts) so useReactiveFragment merges cleanly.
|
|
4
|
-
// Viewer-specific facts (viewerPermission, viewerCanEditAccess) are never
|
|
5
|
-
// emitted over WS, so they are selected by the agentDoc query, not here.
|
|
6
|
-
|
|
7
|
-
export const agentDocFragment = `fragment agentDocFragment on AgentDoc {
|
|
8
|
-
id
|
|
9
|
-
organizationId
|
|
10
|
-
accountId
|
|
11
|
-
lastEditAccountId
|
|
12
|
-
folderId
|
|
13
|
-
|
|
14
|
-
title
|
|
15
|
-
content
|
|
16
|
-
position
|
|
17
|
-
deletedAt
|
|
18
|
-
|
|
19
|
-
access {
|
|
20
|
-
team
|
|
21
|
-
public
|
|
22
|
-
network
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
settings {
|
|
26
|
-
aiCannotEdit
|
|
27
|
-
aiCannotRead
|
|
28
|
-
pinned
|
|
29
|
-
hiddenSurfaces
|
|
30
|
-
reviewBy
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
files {
|
|
34
|
-
id
|
|
35
|
-
uri
|
|
36
|
-
size
|
|
37
|
-
contentType
|
|
38
|
-
at
|
|
39
|
-
intent
|
|
40
|
-
name
|
|
41
|
-
description
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
createdAt
|
|
45
|
-
updatedAt
|
|
46
|
-
}`;
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Campaign fragments.
|
|
3
|
-
*
|
|
4
|
-
* Each fragment NAME is the realtime contract: the cache keys one of these
|
|
5
|
-
* spreads as `$<fragmentName>:<id>`, which is byte-identical to what the
|
|
6
|
-
* server pushes through FRAGMENT_NAMES.campaignTemplate / campaign /
|
|
7
|
-
* campaignTemplateElement. Renaming a fragment here silently stops websocket
|
|
8
|
-
* patches from landing on the cached row.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* One element of a template definition. "kind" is the structural role and
|
|
13
|
-
* "type" is how a QUESTION is answered; type is null for SECTION and CONTENT.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export const campaignTemplateElementFragment = `fragment campaignTemplateElementFragment on CampaignElement {
|
|
17
|
-
id
|
|
18
|
-
parentId
|
|
19
|
-
kind
|
|
20
|
-
type
|
|
21
|
-
key
|
|
22
|
-
order
|
|
23
|
-
label
|
|
24
|
-
description
|
|
25
|
-
placeholder
|
|
26
|
-
required
|
|
27
|
-
options {
|
|
28
|
-
value
|
|
29
|
-
label
|
|
30
|
-
}
|
|
31
|
-
validation {
|
|
32
|
-
minLength
|
|
33
|
-
maxLength
|
|
34
|
-
min
|
|
35
|
-
max
|
|
36
|
-
pattern
|
|
37
|
-
maxFiles
|
|
38
|
-
acceptedContentTypes
|
|
39
|
-
}
|
|
40
|
-
visibleWhen {
|
|
41
|
-
elementKey
|
|
42
|
-
operator
|
|
43
|
-
values
|
|
44
|
-
}
|
|
45
|
-
settings {
|
|
46
|
-
numbered
|
|
47
|
-
fullWidth
|
|
48
|
-
}
|
|
49
|
-
files {
|
|
50
|
-
id
|
|
51
|
-
uri
|
|
52
|
-
contentType
|
|
53
|
-
}
|
|
54
|
-
}`;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Org-side reusable campaign template, with its element tree.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
export const campaignTemplateFragment = `fragment campaignTemplateFragment on CampaignTemplate {
|
|
61
|
-
id
|
|
62
|
-
organizationId
|
|
63
|
-
kind
|
|
64
|
-
status
|
|
65
|
-
generationError
|
|
66
|
-
title
|
|
67
|
-
description
|
|
68
|
-
responseWorkflowId
|
|
69
|
-
siteId
|
|
70
|
-
settings {
|
|
71
|
-
__typename
|
|
72
|
-
... on EmailCampaignSettings {
|
|
73
|
-
subject
|
|
74
|
-
body
|
|
75
|
-
bodyHTML
|
|
76
|
-
replyToAgentDomain
|
|
77
|
-
secondaryReplyToEmail
|
|
78
|
-
}
|
|
79
|
-
... on FormCampaignSettings {
|
|
80
|
-
color
|
|
81
|
-
backgroundFillStyle
|
|
82
|
-
confirmationMessage
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
headerImage {
|
|
86
|
-
id
|
|
87
|
-
uri
|
|
88
|
-
contentType
|
|
89
|
-
}
|
|
90
|
-
elements {
|
|
91
|
-
...campaignTemplateElementFragment
|
|
92
|
-
}
|
|
93
|
-
createdAt
|
|
94
|
-
updatedAt
|
|
95
|
-
}`;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Template list row. Deliberately omits the element tree so a list page does
|
|
99
|
-
* not pull every definition in the organization.
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
export const campaignTemplateSummaryFragment = `fragment campaignTemplateSummaryFragment on CampaignTemplateSummary {
|
|
103
|
-
id
|
|
104
|
-
organizationId
|
|
105
|
-
kind
|
|
106
|
-
status
|
|
107
|
-
generationError
|
|
108
|
-
title
|
|
109
|
-
description
|
|
110
|
-
headerImage {
|
|
111
|
-
id
|
|
112
|
-
uri
|
|
113
|
-
contentType
|
|
114
|
-
}
|
|
115
|
-
createdAt
|
|
116
|
-
updatedAt
|
|
117
|
-
cursor
|
|
118
|
-
}`;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* One published campaign, including its campaign-owned form definition.
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
export const campaignFragment = `fragment campaignFragment on Campaign {
|
|
125
|
-
id
|
|
126
|
-
organizationId
|
|
127
|
-
templateId
|
|
128
|
-
kind
|
|
129
|
-
status
|
|
130
|
-
publicId
|
|
131
|
-
audience
|
|
132
|
-
title
|
|
133
|
-
description
|
|
134
|
-
definitionSnapshot {
|
|
135
|
-
schemaVersion
|
|
136
|
-
snapshotSource
|
|
137
|
-
sections {
|
|
138
|
-
key
|
|
139
|
-
order
|
|
140
|
-
label
|
|
141
|
-
description
|
|
142
|
-
settings {
|
|
143
|
-
numbered
|
|
144
|
-
fullWidth
|
|
145
|
-
}
|
|
146
|
-
elements {
|
|
147
|
-
key
|
|
148
|
-
kind
|
|
149
|
-
type
|
|
150
|
-
order
|
|
151
|
-
label
|
|
152
|
-
description
|
|
153
|
-
placeholder
|
|
154
|
-
options {
|
|
155
|
-
value
|
|
156
|
-
label
|
|
157
|
-
}
|
|
158
|
-
required
|
|
159
|
-
validation {
|
|
160
|
-
minLength
|
|
161
|
-
maxLength
|
|
162
|
-
min
|
|
163
|
-
max
|
|
164
|
-
pattern
|
|
165
|
-
maxFiles
|
|
166
|
-
acceptedContentTypes
|
|
167
|
-
}
|
|
168
|
-
visibleWhen {
|
|
169
|
-
elementKey
|
|
170
|
-
operator
|
|
171
|
-
values
|
|
172
|
-
}
|
|
173
|
-
settings {
|
|
174
|
-
numbered
|
|
175
|
-
fullWidth
|
|
176
|
-
}
|
|
177
|
-
files {
|
|
178
|
-
id
|
|
179
|
-
order
|
|
180
|
-
uri
|
|
181
|
-
contentType
|
|
182
|
-
size
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
settings {
|
|
188
|
-
__typename
|
|
189
|
-
... on EmailCampaignSettings {
|
|
190
|
-
subject
|
|
191
|
-
body
|
|
192
|
-
bodyHTML
|
|
193
|
-
replyToAgentDomain
|
|
194
|
-
secondaryReplyToEmail
|
|
195
|
-
}
|
|
196
|
-
... on FormCampaignSettings {
|
|
197
|
-
color
|
|
198
|
-
backgroundFillStyle
|
|
199
|
-
confirmationMessage
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
siteId
|
|
203
|
-
headerImage {
|
|
204
|
-
id
|
|
205
|
-
uri
|
|
206
|
-
contentType
|
|
207
|
-
}
|
|
208
|
-
scheduledAt
|
|
209
|
-
opensAt
|
|
210
|
-
closesAt
|
|
211
|
-
publishedAt
|
|
212
|
-
completedAt
|
|
213
|
-
errorMessage
|
|
214
|
-
isOpen
|
|
215
|
-
createdAt
|
|
216
|
-
updatedAt
|
|
217
|
-
}`;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Campaign list row; omits the published snapshot.
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
|
-
export const campaignSummaryFragment = `fragment campaignSummaryFragment on CampaignSummary {
|
|
224
|
-
id
|
|
225
|
-
organizationId
|
|
226
|
-
templateId
|
|
227
|
-
kind
|
|
228
|
-
status
|
|
229
|
-
publicId
|
|
230
|
-
audience
|
|
231
|
-
title
|
|
232
|
-
opensAt
|
|
233
|
-
closesAt
|
|
234
|
-
publishedAt
|
|
235
|
-
completedAt
|
|
236
|
-
isOpen
|
|
237
|
-
createdAt
|
|
238
|
-
cursor
|
|
239
|
-
}`;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* One respondent row for the organization-side people list. Answers stay out
|
|
243
|
-
* of this projection until a response detail surface needs them.
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
export const campaignResponseFragment = `fragment campaignResponseFragment on CampaignResponse {
|
|
247
|
-
id
|
|
248
|
-
cursor
|
|
249
|
-
campaignId
|
|
250
|
-
templateId
|
|
251
|
-
respondentName
|
|
252
|
-
respondentEmail
|
|
253
|
-
childOrgId
|
|
254
|
-
childOrgName
|
|
255
|
-
status
|
|
256
|
-
submittedAt
|
|
257
|
-
activityAt
|
|
258
|
-
createdAt
|
|
259
|
-
}`;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* One email campaign recipient snapshot, as the organization sees it.
|
|
263
|
-
*/
|
|
264
|
-
|
|
265
|
-
export const campaignRecipientFragment = `fragment campaignRecipientFragment on CampaignRecipient {
|
|
266
|
-
id
|
|
267
|
-
cursor
|
|
268
|
-
campaignId
|
|
269
|
-
inboundContactId
|
|
270
|
-
emailAddress
|
|
271
|
-
personName
|
|
272
|
-
invitedAt
|
|
273
|
-
firstOpenedAt
|
|
274
|
-
respondedAt
|
|
275
|
-
revokedAt
|
|
276
|
-
createdAt
|
|
277
|
-
}`;
|