@jsb188/graphql 1.1.8 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache/config.ts +66 -42
- package/cache/index.test.ts +881 -0
- package/cache/index.ts +1815 -979
- package/cache/persist.ts +721 -0
- package/cache/store.ts +437 -0
- package/client/data-table-realtime-subscriptions.test.ts +740 -0
- package/client/data-table-realtime-subscriptions.ts +955 -0
- package/client/data-table-realtime.test.ts +792 -0
- package/client/data-table-realtime.ts +1218 -0
- package/client/fragment-realtime-sequence.ts +52 -0
- package/client/index.ts +4 -2
- package/client/open-sheet.ts +137 -0
- package/client/request-managed-session.test.ts +574 -0
- package/client/request-no-store.test.ts +157 -0
- package/client/request.ts +973 -143
- package/client/sse-ticket.test.ts +26 -0
- package/deno.lock +170 -0
- package/deno.test.json +10 -0
- package/drafts/index.ts +149 -0
- package/drafts/store.ts +397 -0
- package/gql/eagerQueryMap.ts +12 -0
- package/gql/fragments/accountAuthFragments.ts +5 -0
- package/gql/fragments/accountFragments.ts +1 -3
- package/gql/fragments/accountSessionFragments.ts +16 -0
- package/gql/fragments/agentDocFragments.ts +46 -0
- package/gql/fragments/agentMemoryFragments.ts +19 -0
- package/gql/fragments/aiChatFragments.ts +17 -0
- package/gql/fragments/billingFragments.ts +0 -11
- package/gql/fragments/campaignFragments.ts +277 -0
- package/gql/fragments/dataTableFragments.ts +102 -0
- package/gql/fragments/emailFragments.ts +36 -0
- package/gql/fragments/fieldDocFragments.ts +82 -0
- package/gql/fragments/inboundContactFragments.ts +15 -0
- package/gql/fragments/integrationFragments.ts +22 -0
- package/gql/fragments/logFragments.ts +33 -64
- package/gql/fragments/organizationFragments.ts +94 -21
- package/gql/fragments/scheduleFragments.ts +155 -0
- package/gql/fragments/sheetFragments.ts +675 -0
- package/gql/fragments/storageFragments.ts +21 -1
- package/gql/fragments/workflowFragments.ts +67 -0
- package/gql/mutations/accountMutations.ts +24 -4
- package/gql/mutations/agentDocMutations.ts +177 -0
- package/gql/mutations/agentMemoryMutations.ts +36 -0
- package/gql/mutations/aiChatMutations.ts +43 -3
- package/gql/mutations/authMutations.ts +160 -19
- package/gql/mutations/campaignMutations.ts +215 -0
- package/gql/mutations/dataTableMutations.ts +106 -0
- package/gql/mutations/fieldDocMutations.ts +24 -0
- package/gql/mutations/inboundContactMutations.ts +24 -0
- package/gql/mutations/index.ts +17 -8
- package/gql/mutations/integrationMutations.ts +25 -0
- package/gql/mutations/logMutations.ts +10 -19
- package/gql/mutations/organizationMutations.ts +160 -2
- package/gql/mutations/scheduleMutations.ts +423 -0
- package/gql/mutations/sheetMutations.ts +385 -0
- package/gql/mutations/storageMutations.ts +21 -2
- package/gql/mutations/workflowMutations.ts +42 -0
- package/gql/queries/agentDocQueries.ts +120 -0
- package/gql/queries/agentMemoryQueries.ts +22 -0
- package/gql/queries/aiChatQueries.ts +18 -2
- package/gql/queries/authQueries.ts +41 -0
- package/gql/queries/billingQueries.ts +24 -1
- package/gql/queries/campaignQueries.ts +127 -0
- package/gql/queries/dataTableQueries.ts +134 -0
- package/gql/queries/emailQueries.ts +96 -0
- package/gql/queries/fieldDocQueries.ts +158 -0
- package/gql/queries/inboundContactQueries.ts +40 -0
- package/gql/queries/index.ts +17 -6
- package/gql/queries/logQueries.ts +42 -32
- package/gql/queries/organizationQueries.ts +113 -8
- package/gql/queries/scheduleQueries.ts +315 -0
- package/gql/queries/sheetQueries.ts +383 -0
- package/gql/queries/storageQueries.ts +38 -0
- package/gql/queries/workflowQueries.ts +99 -0
- package/hooks/index.ts +2104 -860
- package/hooks/use-account-mtn.ts +91 -48
- package/hooks/use-agentDoc-mtn.ts +285 -0
- package/hooks/use-agentDoc-qry.ts +208 -0
- package/hooks/use-agentMemory-mtn.ts +73 -0
- package/hooks/use-agentMemory-qry.ts +44 -0
- package/hooks/use-aiChat-mtn.ts +248 -97
- package/hooks/use-aiChat-qry.ts +501 -191
- package/hooks/use-app-qry.ts +14 -11
- package/hooks/use-auth-mtn.ts +410 -256
- package/hooks/use-auth-qry.ts +51 -0
- package/hooks/use-campaign-mtn.ts +377 -0
- package/hooks/use-campaign-qry.ts +257 -0
- package/hooks/use-dataTable-mtn.ts +170 -0
- package/hooks/use-dataTable-qry.ts +996 -0
- package/hooks/use-email-qry.ts +227 -0
- package/hooks/use-fieldDoc-mtn.ts +50 -0
- package/hooks/use-fieldDoc-qry.ts +180 -0
- package/hooks/use-inboundContact-mtn.ts +34 -0
- package/hooks/use-inboundContact-qry.ts +96 -0
- package/hooks/use-integration-mtn.ts +77 -0
- package/hooks/use-integration-qry.ts +30 -0
- package/hooks/use-log-mtn.ts +77 -61
- package/hooks/use-log-qry.ts +99 -72
- package/hooks/use-organization-mtn.ts +409 -80
- package/hooks/use-organization-qry.ts +211 -92
- package/hooks/use-schedule-mtn.ts +416 -0
- package/hooks/use-schedule-qry.ts +157 -0
- package/hooks/use-sheet-mtn.ts +367 -0
- package/hooks/use-sheet-qry.ts +440 -0
- package/hooks/use-storage-mtn.ts +83 -42
- package/hooks/use-storage-qry.ts +104 -13
- package/hooks/use-workflow-mtn.ts +55 -0
- package/hooks/use-workflow-qry.ts +230 -0
- package/loaders/campaign.ts +137 -0
- package/package.json +94 -52
- package/sse.ts +158 -105
- package/tsconfig.json +13 -0
- package/types.d.ts +60 -29
- package/utils.ts +77 -50
- package/gql/fragments/actionFragments.ts +0 -16
- package/gql/fragments/productFragments.ts +0 -63
- package/gql/fragments/reportFragments.ts +0 -48
- package/gql/mutations/billingMutations.ts +0 -34
- package/gql/queries/productQueries.ts +0 -70
- package/gql/queries/reportQueries.ts +0 -66
- package/hooks/use-product-qry.ts +0 -109
- package/hooks/use-report-qry.ts +0 -69
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
1
|
export const organizationFragment = `fragment organizationFragment on Organization {
|
|
3
2
|
id
|
|
3
|
+
readableId
|
|
4
4
|
stripeCustomerId
|
|
5
|
+
emailHandle
|
|
5
6
|
name
|
|
6
7
|
commodities
|
|
7
8
|
operation
|
|
8
|
-
|
|
9
|
-
dailyDigestTime
|
|
10
9
|
activated
|
|
11
10
|
|
|
12
11
|
address {
|
|
@@ -18,45 +17,81 @@ export const organizationFragment = `fragment organizationFragment on Organizati
|
|
|
18
17
|
country
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
features
|
|
22
20
|
settings {
|
|
23
21
|
timeZone
|
|
24
22
|
language
|
|
25
23
|
color
|
|
24
|
+
priorityService
|
|
25
|
+
routes {
|
|
26
|
+
id
|
|
27
|
+
columnWidths
|
|
28
|
+
columnOrder
|
|
29
|
+
}
|
|
30
|
+
sidebar {
|
|
31
|
+
kind
|
|
32
|
+
order
|
|
33
|
+
slug
|
|
34
|
+
label
|
|
35
|
+
iconName
|
|
36
|
+
items {
|
|
37
|
+
kind
|
|
38
|
+
order
|
|
39
|
+
slug
|
|
40
|
+
label
|
|
41
|
+
iconName
|
|
42
|
+
}
|
|
43
|
+
}
|
|
26
44
|
}
|
|
27
45
|
|
|
28
46
|
directory {
|
|
29
|
-
department
|
|
30
47
|
name
|
|
48
|
+
department
|
|
31
49
|
emailAddress
|
|
32
50
|
phoneNumber
|
|
33
51
|
}
|
|
34
52
|
}`;
|
|
35
53
|
|
|
54
|
+
export const organizationSettingsFragment = `fragment organizationSettingsFragment on OrganizationSettings {
|
|
55
|
+
timeZone
|
|
56
|
+
language
|
|
57
|
+
color
|
|
58
|
+
priorityService
|
|
59
|
+
routes {
|
|
60
|
+
id
|
|
61
|
+
columnWidths
|
|
62
|
+
columnOrder
|
|
63
|
+
}
|
|
64
|
+
sidebar {
|
|
65
|
+
kind
|
|
66
|
+
order
|
|
67
|
+
slug
|
|
68
|
+
label
|
|
69
|
+
iconName
|
|
70
|
+
items {
|
|
71
|
+
kind
|
|
72
|
+
order
|
|
73
|
+
slug
|
|
74
|
+
label
|
|
75
|
+
iconName
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}`;
|
|
79
|
+
|
|
36
80
|
export const organizationComplianceFragment = `fragment organizationComplianceFragment on OrganizationCompliance {
|
|
37
81
|
id
|
|
38
|
-
|
|
39
|
-
name
|
|
82
|
+
documentName
|
|
40
83
|
type
|
|
41
84
|
expirationDate
|
|
42
|
-
notes
|
|
43
85
|
createdAt
|
|
44
86
|
updatedAt
|
|
45
|
-
|
|
46
|
-
files {
|
|
47
|
-
id
|
|
48
|
-
complianceId
|
|
49
|
-
storageId
|
|
50
|
-
order
|
|
51
|
-
uri
|
|
52
|
-
contentType
|
|
53
|
-
}
|
|
54
87
|
}`;
|
|
55
88
|
|
|
56
89
|
export const organizationRelationshipFragment = `fragment organizationRelationshipFragment on OrganizationRelationship {
|
|
57
90
|
id
|
|
91
|
+
organizationId
|
|
58
92
|
primary
|
|
59
93
|
role
|
|
94
|
+
notes
|
|
60
95
|
|
|
61
96
|
acl {
|
|
62
97
|
id
|
|
@@ -74,18 +109,56 @@ export const organizationRelationshipFragment = `fragment organizationRelationsh
|
|
|
74
109
|
}
|
|
75
110
|
}`;
|
|
76
111
|
|
|
112
|
+
export const organizationSiteFragment = `fragment organizationSiteFragment on OrganizationSite {
|
|
113
|
+
id
|
|
114
|
+
readableId
|
|
115
|
+
organizationId
|
|
116
|
+
parentId
|
|
117
|
+
name
|
|
118
|
+
region
|
|
119
|
+
note
|
|
120
|
+
createdAt
|
|
121
|
+
organizationName
|
|
122
|
+
parentName
|
|
123
|
+
}`;
|
|
124
|
+
|
|
77
125
|
export const organizationChildFragment = `fragment organizationChildFragment on OrganizationChild {
|
|
78
126
|
id
|
|
127
|
+
parentId
|
|
79
128
|
cursor
|
|
80
129
|
addedAt
|
|
130
|
+
affiliated
|
|
131
|
+
memory
|
|
132
|
+
|
|
133
|
+
preferredContacts {
|
|
134
|
+
department
|
|
135
|
+
name
|
|
136
|
+
emailAddress
|
|
137
|
+
phoneNumber
|
|
138
|
+
}
|
|
81
139
|
}`;
|
|
82
140
|
|
|
83
|
-
export const
|
|
141
|
+
export const orgPageRouteFragment = `fragment orgPageRouteFragment on OrgPageRoute {
|
|
84
142
|
id
|
|
85
143
|
organizationId
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
144
|
+
slug
|
|
145
|
+
query
|
|
146
|
+
logEntriesFilter {
|
|
147
|
+
siteId
|
|
148
|
+
preset
|
|
149
|
+
types
|
|
150
|
+
activities
|
|
151
|
+
startDate
|
|
152
|
+
endDate
|
|
153
|
+
query
|
|
154
|
+
}
|
|
155
|
+
childOrgsFilter {
|
|
156
|
+
childOrgIds
|
|
157
|
+
affiliated
|
|
158
|
+
}
|
|
159
|
+
columns
|
|
160
|
+
iconName
|
|
161
|
+
starred
|
|
89
162
|
createdAt
|
|
90
163
|
updatedAt
|
|
91
164
|
}`;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// NOTE: Each selection set must stay exactly aligned with the server's
|
|
2
|
+
// realtime emit for the same table (mapDataToGraphQLFragment in
|
|
3
|
+
// server/src/utils/graphql-data.ts: 'schedule_calendars', 'schedule_resources',
|
|
4
|
+
// 'schedule_series', 'schedule_occurrences', 'schedule_requests') so
|
|
5
|
+
// useReactiveFragment merges a patch cleanly instead of blanking fields.
|
|
6
|
+
//
|
|
7
|
+
// Per-viewer facts are never emitted over WS — the organization room is not an
|
|
8
|
+
// authorization cohort — so viewerPermission and viewerCanEditAccess are
|
|
9
|
+
// selected by the calendar QUERY, not by this fragment.
|
|
10
|
+
|
|
11
|
+
export const scheduleCalendarFragment = `fragment scheduleCalendarFragment on ScheduleCalendar {
|
|
12
|
+
id
|
|
13
|
+
organizationId
|
|
14
|
+
|
|
15
|
+
kind
|
|
16
|
+
name
|
|
17
|
+
description
|
|
18
|
+
timeZone
|
|
19
|
+
siteId
|
|
20
|
+
color
|
|
21
|
+
ordinal
|
|
22
|
+
|
|
23
|
+
access {
|
|
24
|
+
team
|
|
25
|
+
public
|
|
26
|
+
network
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
deletedAt
|
|
30
|
+
createdAt
|
|
31
|
+
updatedAt
|
|
32
|
+
}`;
|
|
33
|
+
|
|
34
|
+
export const scheduleResourceFragment = `fragment scheduleResourceFragment on ScheduleResource {
|
|
35
|
+
id
|
|
36
|
+
organizationId
|
|
37
|
+
siteId
|
|
38
|
+
|
|
39
|
+
kind
|
|
40
|
+
key
|
|
41
|
+
name
|
|
42
|
+
capacity
|
|
43
|
+
config
|
|
44
|
+
ordinal
|
|
45
|
+
|
|
46
|
+
retiredAt
|
|
47
|
+
createdAt
|
|
48
|
+
updatedAt
|
|
49
|
+
}`;
|
|
50
|
+
|
|
51
|
+
export const scheduleSeriesFragment = `fragment scheduleSeriesFragment on ScheduleSeries {
|
|
52
|
+
id
|
|
53
|
+
organizationId
|
|
54
|
+
calendarId
|
|
55
|
+
resourceId
|
|
56
|
+
|
|
57
|
+
kind
|
|
58
|
+
title
|
|
59
|
+
note
|
|
60
|
+
location
|
|
61
|
+
recurrence
|
|
62
|
+
timeZone
|
|
63
|
+
startsAt
|
|
64
|
+
endsAt
|
|
65
|
+
durationMinutes
|
|
66
|
+
allDay
|
|
67
|
+
slotTemplate
|
|
68
|
+
active
|
|
69
|
+
|
|
70
|
+
createdAt
|
|
71
|
+
updatedAt
|
|
72
|
+
}`;
|
|
73
|
+
|
|
74
|
+
// "slots" and "assignments" are emitted only when the server attached them, so
|
|
75
|
+
// a fragment patch can never blank a hydrated list with an empty one.
|
|
76
|
+
export const scheduleOccurrenceFragment = `fragment scheduleOccurrenceFragment on ScheduleOccurrence {
|
|
77
|
+
id
|
|
78
|
+
organizationId
|
|
79
|
+
calendarId
|
|
80
|
+
seriesId
|
|
81
|
+
resourceId
|
|
82
|
+
siteId
|
|
83
|
+
|
|
84
|
+
kind
|
|
85
|
+
title
|
|
86
|
+
note
|
|
87
|
+
location
|
|
88
|
+
startAt
|
|
89
|
+
endAt
|
|
90
|
+
timeZone
|
|
91
|
+
allDay
|
|
92
|
+
status
|
|
93
|
+
detached
|
|
94
|
+
version
|
|
95
|
+
|
|
96
|
+
slots {
|
|
97
|
+
id
|
|
98
|
+
occurrenceId
|
|
99
|
+
key
|
|
100
|
+
label
|
|
101
|
+
requiredCount
|
|
102
|
+
predicate
|
|
103
|
+
ordinal
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
assignments {
|
|
107
|
+
id
|
|
108
|
+
organizationId
|
|
109
|
+
occurrenceId
|
|
110
|
+
slotId
|
|
111
|
+
actorType
|
|
112
|
+
actorAccountId
|
|
113
|
+
actorOrganizationId
|
|
114
|
+
actorContactId
|
|
115
|
+
status
|
|
116
|
+
startAt
|
|
117
|
+
endAt
|
|
118
|
+
assignedByAccountId
|
|
119
|
+
releasedAt
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
publishedAt
|
|
123
|
+
canceledAt
|
|
124
|
+
deletedAt
|
|
125
|
+
createdAt
|
|
126
|
+
updatedAt
|
|
127
|
+
}`;
|
|
128
|
+
|
|
129
|
+
// The open-shift board and the approval queue both race on this row, so it is
|
|
130
|
+
// a fragment rather than an inline selection: a claim has to patch every
|
|
131
|
+
// mounted board in place the instant it lands.
|
|
132
|
+
export const scheduleRequestFragment = `fragment scheduleRequestFragment on ScheduleRequest {
|
|
133
|
+
id
|
|
134
|
+
organizationId
|
|
135
|
+
calendarId
|
|
136
|
+
|
|
137
|
+
kind
|
|
138
|
+
status
|
|
139
|
+
requesterAccountId
|
|
140
|
+
sourceAssignmentId
|
|
141
|
+
targetAssignmentId
|
|
142
|
+
targetOccurrenceId
|
|
143
|
+
claimedByAccountId
|
|
144
|
+
startAt
|
|
145
|
+
endAt
|
|
146
|
+
reason
|
|
147
|
+
autoApproved
|
|
148
|
+
decidedByAccountId
|
|
149
|
+
decidedAt
|
|
150
|
+
decisionNote
|
|
151
|
+
expiresAt
|
|
152
|
+
|
|
153
|
+
createdAt
|
|
154
|
+
updatedAt
|
|
155
|
+
}`;
|