@jsb188/graphql 1.1.7 → 1.1.10
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 +14 -4
- package/cache/index.test.ts +319 -0
- package/cache/index.ts +522 -85
- package/client/index.ts +2 -2
- package/client/request.ts +48 -9
- package/deno.test.json +6 -0
- package/gql/fragments/accountFragments.ts +1 -0
- package/gql/fragments/aiChatFragments.ts +1 -0
- package/gql/fragments/dataTableFragments.ts +212 -0
- package/gql/fragments/emailFragments.ts +26 -0
- package/gql/fragments/inboundContactFragments.ts +15 -0
- package/gql/fragments/integrationFragments.ts +22 -0
- package/gql/fragments/logFragments.ts +40 -12
- package/gql/fragments/organizationFragments.ts +59 -24
- package/gql/fragments/productFragments.ts +0 -24
- package/gql/fragments/reportFragments.ts +52 -10
- package/gql/fragments/sheetFragments.ts +145 -0
- package/gql/fragments/storageFragments.ts +3 -1
- package/gql/fragments/workflowFragments.ts +43 -0
- package/gql/mutations/accountMutations.ts +24 -2
- package/gql/mutations/aiChatMutations.ts +28 -1
- package/gql/mutations/authMutations.ts +3 -3
- package/gql/mutations/billingMutations.ts +1 -1
- package/gql/mutations/dataTableMutations.ts +84 -0
- package/gql/mutations/inboundContactMutations.ts +24 -0
- package/gql/mutations/index.ts +12 -8
- package/gql/mutations/integrationMutations.ts +25 -0
- package/gql/mutations/logMutations.ts +15 -1
- package/gql/mutations/organizationMutations.ts +151 -2
- package/gql/mutations/sheetMutations.ts +168 -0
- package/gql/mutations/storageMutations.ts +1 -2
- package/gql/queries/aiChatQueries.ts +1 -1
- package/gql/queries/billingQueries.ts +1 -1
- package/gql/queries/dataTableQueries.ts +45 -0
- package/gql/queries/emailQueries.ts +44 -0
- package/gql/queries/inboundContactQueries.ts +40 -0
- package/gql/queries/index.ts +11 -6
- package/gql/queries/logQueries.ts +47 -20
- package/gql/queries/organizationQueries.ts +62 -8
- package/gql/queries/productQueries.ts +1 -40
- package/gql/queries/reportQueries.ts +81 -13
- package/gql/queries/sheetQueries.ts +72 -0
- package/gql/queries/workflowQueries.ts +30 -0
- package/hooks/index.ts +208 -58
- package/hooks/use-account-mtn.ts +52 -4
- package/hooks/use-aiChat-mtn.ts +62 -6
- package/hooks/use-aiChat-qry.ts +76 -24
- package/hooks/use-app-qry.ts +2 -2
- package/hooks/use-auth-mtn.ts +5 -5
- package/hooks/use-dataTable-mtn.ts +87 -0
- package/hooks/use-dataTable-qry.ts +172 -0
- package/hooks/use-email-qry.ts +112 -0
- package/hooks/use-inboundContact-mtn.ts +31 -0
- package/hooks/use-inboundContact-qry.ts +88 -0
- package/hooks/use-integration-mtn.ts +59 -0
- package/hooks/use-integration-qry.ts +15 -0
- package/hooks/use-log-mtn.ts +6 -6
- package/hooks/use-log-qry.ts +38 -35
- package/hooks/use-organization-mtn.ts +288 -16
- package/hooks/use-organization-qry.ts +71 -22
- package/hooks/use-product-qry.ts +4 -46
- package/hooks/use-report-qry.ts +94 -10
- package/hooks/use-sheet-mtn.ts +181 -0
- package/hooks/use-sheet-qry.ts +157 -0
- package/hooks/use-storage-mtn.ts +6 -5
- package/hooks/use-storage-qry.ts +1 -1
- package/hooks/use-workflow-qry.ts +72 -0
- package/package.json +23 -4
- package/sse.ts +2 -2
- package/tsconfig.json +12 -0
- package/types.d.ts +2 -1
- package/utils.ts +2 -4
- package/gql/fragments/actionFragments.ts +0 -16
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import {
|
|
2
|
+
import { accountFragment } from '../fragments/accountFragments.ts';
|
|
3
|
+
import { integrationConnectionFragment } from '../fragments/integrationFragments.ts';
|
|
4
|
+
import { organizationChildFragment, organizationComplianceFragment, organizationFragment, organizationRelationshipFragment, organizationSiteFragment } from '../fragments/organizationFragments.ts';
|
|
5
|
+
import { emailFragment, phoneFragment } from '../fragments/otherFragments.ts';
|
|
6
|
+
import { storageFileFragment } from '../fragments/storageFragments.ts';
|
|
3
7
|
|
|
4
8
|
// Always use organizationRelationship() instead
|
|
5
9
|
|
|
@@ -32,6 +36,10 @@ query organizationRelationship (
|
|
|
32
36
|
|
|
33
37
|
compliance {
|
|
34
38
|
...organizationComplianceFragment
|
|
39
|
+
|
|
40
|
+
files {
|
|
41
|
+
...storageFileFragment
|
|
42
|
+
}
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
}
|
|
@@ -40,6 +48,7 @@ query organizationRelationship (
|
|
|
40
48
|
${organizationFragment}
|
|
41
49
|
${organizationComplianceFragment}
|
|
42
50
|
${organizationRelationshipFragment}
|
|
51
|
+
${storageFileFragment}
|
|
43
52
|
`;
|
|
44
53
|
|
|
45
54
|
export const myOrganizationsQry = gql`
|
|
@@ -53,6 +62,13 @@ query myOrganizations {
|
|
|
53
62
|
|
|
54
63
|
compliance {
|
|
55
64
|
...organizationComplianceFragment
|
|
65
|
+
|
|
66
|
+
files {
|
|
67
|
+
...storageFileFragment
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
integrations {
|
|
71
|
+
...integrationConnectionFragment
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
}
|
|
@@ -61,6 +77,8 @@ query myOrganizations {
|
|
|
61
77
|
${organizationFragment}
|
|
62
78
|
${organizationComplianceFragment}
|
|
63
79
|
${organizationRelationshipFragment}
|
|
80
|
+
${integrationConnectionFragment}
|
|
81
|
+
${storageFileFragment}
|
|
64
82
|
`;
|
|
65
83
|
|
|
66
84
|
export const childOrganizationsQry = gql`
|
|
@@ -86,6 +104,10 @@ query childOrganizations (
|
|
|
86
104
|
|
|
87
105
|
compliance {
|
|
88
106
|
...organizationComplianceFragment
|
|
107
|
+
|
|
108
|
+
files {
|
|
109
|
+
...storageFileFragment
|
|
110
|
+
}
|
|
89
111
|
}
|
|
90
112
|
}
|
|
91
113
|
}
|
|
@@ -94,20 +116,52 @@ query childOrganizations (
|
|
|
94
116
|
${organizationChildFragment}
|
|
95
117
|
${organizationFragment}
|
|
96
118
|
${organizationComplianceFragment}
|
|
119
|
+
${storageFileFragment}
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
export const organizationMembersQry = gql`
|
|
123
|
+
query organizationMembers (
|
|
124
|
+
$organizationId: GenericID!
|
|
125
|
+
$showGuests: Boolean
|
|
126
|
+
) {
|
|
127
|
+
organizationMembers (
|
|
128
|
+
organizationId: $organizationId
|
|
129
|
+
showGuests: $showGuests
|
|
130
|
+
) {
|
|
131
|
+
...organizationRelationshipFragment
|
|
132
|
+
|
|
133
|
+
account {
|
|
134
|
+
...accountFragment
|
|
135
|
+
|
|
136
|
+
email {
|
|
137
|
+
...emailFragment
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
phone {
|
|
141
|
+
...phoneFragment
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
${organizationRelationshipFragment}
|
|
148
|
+
${accountFragment}
|
|
149
|
+
${emailFragment}
|
|
150
|
+
${phoneFragment}
|
|
97
151
|
`;
|
|
98
152
|
|
|
99
|
-
export const
|
|
100
|
-
query
|
|
153
|
+
export const organizationSitesQry = gql`
|
|
154
|
+
query organizationSites (
|
|
101
155
|
$organizationId: GenericID!
|
|
102
|
-
$
|
|
156
|
+
$parentId: GenericID!
|
|
103
157
|
) {
|
|
104
|
-
|
|
158
|
+
organizationSites (
|
|
105
159
|
organizationId: $organizationId
|
|
106
|
-
|
|
160
|
+
parentId: $parentId
|
|
107
161
|
) {
|
|
108
|
-
...
|
|
162
|
+
...organizationSiteFragment
|
|
109
163
|
}
|
|
110
164
|
}
|
|
111
165
|
|
|
112
|
-
${
|
|
166
|
+
${organizationSiteFragment}
|
|
113
167
|
`;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import {
|
|
3
|
-
import { organizationComplianceFragment, organizationFragment } from '../fragments/organizationFragments';
|
|
4
|
-
import { productAttendanceFragment, productCalEventFragment, productFragment, productLivestockFragment } from '../fragments/productFragments';
|
|
2
|
+
import { productCalEventFragment, productFragment } from '../fragments/productFragments.ts';
|
|
5
3
|
|
|
6
4
|
export const productsListQry = gql`
|
|
7
5
|
query productsList (
|
|
@@ -24,47 +22,10 @@ query productsList (
|
|
|
24
22
|
...on ProductCalEvent {
|
|
25
23
|
...productCalEventFragment
|
|
26
24
|
}
|
|
27
|
-
...on ProductLivestock {
|
|
28
|
-
...productLivestockFragment
|
|
29
|
-
}
|
|
30
25
|
}
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
|
|
34
29
|
${productFragment}
|
|
35
30
|
${productCalEventFragment}
|
|
36
|
-
${productLivestockFragment}
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
export const productAttendanceListQry = gql`
|
|
40
|
-
query productAttendanceList (
|
|
41
|
-
$productId: GenericID!
|
|
42
|
-
$organizationId: GenericID!
|
|
43
|
-
$calDate: CalDateString!
|
|
44
|
-
) {
|
|
45
|
-
productAttendanceList (
|
|
46
|
-
productId: $productId
|
|
47
|
-
organizationId: $organizationId
|
|
48
|
-
calDate: $calDate
|
|
49
|
-
) {
|
|
50
|
-
...productAttendanceFragment
|
|
51
|
-
|
|
52
|
-
organization {
|
|
53
|
-
...organizationFragment
|
|
54
|
-
|
|
55
|
-
compliance {
|
|
56
|
-
...organizationComplianceFragment
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
checkedBy {
|
|
61
|
-
...accountFragment
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
${productAttendanceFragment}
|
|
67
|
-
${organizationFragment}
|
|
68
|
-
${organizationComplianceFragment}
|
|
69
|
-
${accountFragment}
|
|
70
31
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import { reportColumnDataFragment, reportFragment,
|
|
3
|
-
import { storageFileFragment } from '../fragments/storageFragments';
|
|
2
|
+
import { reportColumnDataFragment, reportFragment, reportGroupFragment, reportRowDataFragment, reportSectionFragment, reportSubmissionFragment } from '../fragments/reportFragments.ts';
|
|
3
|
+
import { storageFileFragment } from '../fragments/storageFragments.ts';
|
|
4
4
|
|
|
5
5
|
export const reportsQry = gql`
|
|
6
6
|
query reports (
|
|
@@ -15,6 +15,10 @@ query reports (
|
|
|
15
15
|
) {
|
|
16
16
|
...reportFragment
|
|
17
17
|
|
|
18
|
+
submission {
|
|
19
|
+
...reportSubmissionFragment
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
sections {
|
|
19
23
|
...reportSectionFragment
|
|
20
24
|
|
|
@@ -31,36 +35,100 @@ query reports (
|
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
}
|
|
39
|
+
}
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
${reportFragment}
|
|
42
|
+
${reportSubmissionFragment}
|
|
43
|
+
${reportSectionFragment}
|
|
44
|
+
${storageFileFragment}
|
|
45
|
+
${reportRowDataFragment}
|
|
46
|
+
${reportColumnDataFragment}
|
|
47
|
+
`;
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
export const reportQry = gql`
|
|
50
|
+
query report (
|
|
51
|
+
$organizationId: GenericID!
|
|
52
|
+
$reportSourceId: CursorToIDs!
|
|
53
|
+
) {
|
|
54
|
+
report (
|
|
55
|
+
organizationId: $organizationId
|
|
56
|
+
reportSourceId: $reportSourceId
|
|
57
|
+
) {
|
|
58
|
+
...reportFragment
|
|
59
|
+
|
|
60
|
+
aside {
|
|
61
|
+
title
|
|
62
|
+
nullText
|
|
63
|
+
|
|
64
|
+
items {
|
|
65
|
+
className
|
|
66
|
+
label
|
|
67
|
+
text
|
|
42
68
|
}
|
|
43
69
|
}
|
|
70
|
+
|
|
71
|
+
submission {
|
|
72
|
+
...reportSubmissionFragment
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
sections {
|
|
76
|
+
...reportSectionFragment
|
|
77
|
+
|
|
78
|
+
files {
|
|
79
|
+
...storageFileFragment
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
rows {
|
|
83
|
+
...reportRowDataFragment
|
|
84
|
+
|
|
85
|
+
columns {
|
|
86
|
+
...reportColumnDataFragment
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
44
91
|
}
|
|
45
92
|
}
|
|
46
93
|
|
|
47
94
|
${reportFragment}
|
|
95
|
+
${reportSubmissionFragment}
|
|
48
96
|
${reportSectionFragment}
|
|
49
97
|
${storageFileFragment}
|
|
50
98
|
${reportRowDataFragment}
|
|
51
99
|
${reportColumnDataFragment}
|
|
52
100
|
`;
|
|
53
101
|
|
|
54
|
-
export const
|
|
55
|
-
query
|
|
102
|
+
export const reportGroupsQry = gql`
|
|
103
|
+
query reportGroups (
|
|
104
|
+
$organizationId: GenericID!
|
|
105
|
+
) {
|
|
106
|
+
reportGroups (
|
|
107
|
+
organizationId: $organizationId
|
|
108
|
+
) {
|
|
109
|
+
...reportGroupFragment
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
${reportGroupFragment}
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
export const reportSubmissionsQry = gql`
|
|
117
|
+
query reportSubmissions (
|
|
56
118
|
$organizationId: GenericID!
|
|
119
|
+
$filter: ReportsFilter!
|
|
120
|
+
$sort: ReportsSort
|
|
121
|
+
$limit: Int!
|
|
57
122
|
) {
|
|
58
|
-
|
|
123
|
+
reportSubmissions (
|
|
59
124
|
organizationId: $organizationId
|
|
125
|
+
filter: $filter
|
|
126
|
+
sort: $sort
|
|
127
|
+
limit: $limit
|
|
60
128
|
) {
|
|
61
|
-
...
|
|
129
|
+
...reportSubmissionFragment
|
|
62
130
|
}
|
|
63
131
|
}
|
|
64
132
|
|
|
65
|
-
${
|
|
133
|
+
${reportSubmissionFragment}
|
|
66
134
|
`;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { sheetCellFragment, sheetFragment, sheetGridFragment, sheetRangeFragment, sheetRegionFragment } from '../fragments/sheetFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const sheetsQry = gql`
|
|
5
|
+
query sheets (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$active: Boolean
|
|
8
|
+
) {
|
|
9
|
+
sheets (
|
|
10
|
+
organizationId: $organizationId
|
|
11
|
+
active: $active
|
|
12
|
+
) {
|
|
13
|
+
...sheetFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${sheetFragment}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const sheetQry = gql`
|
|
21
|
+
query sheet (
|
|
22
|
+
$organizationId: GenericID!
|
|
23
|
+
$sheetId: GenericID!
|
|
24
|
+
) {
|
|
25
|
+
sheet (
|
|
26
|
+
organizationId: $organizationId
|
|
27
|
+
sheetId: $sheetId
|
|
28
|
+
) {
|
|
29
|
+
...sheetFragment
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
${sheetFragment}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export const sheetGridQry = gql`
|
|
37
|
+
query sheetGrid (
|
|
38
|
+
$organizationId: GenericID!
|
|
39
|
+
$sheetId: GenericID!
|
|
40
|
+
$viewport: SheetGridViewportInput!
|
|
41
|
+
) {
|
|
42
|
+
sheetGrid (
|
|
43
|
+
organizationId: $organizationId
|
|
44
|
+
sheetId: $sheetId
|
|
45
|
+
viewport: $viewport
|
|
46
|
+
) {
|
|
47
|
+
...sheetGridFragment
|
|
48
|
+
|
|
49
|
+
sheet {
|
|
50
|
+
...sheetFragment
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
cells {
|
|
54
|
+
...sheetCellFragment
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ranges {
|
|
58
|
+
...sheetRangeFragment
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
regions {
|
|
62
|
+
...sheetRegionFragment
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
${sheetGridFragment}
|
|
68
|
+
${sheetFragment}
|
|
69
|
+
${sheetCellFragment}
|
|
70
|
+
${sheetRangeFragment}
|
|
71
|
+
${sheetRegionFragment}
|
|
72
|
+
`;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { workflowFragment, workflowRunFragment } from '../fragments/workflowFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const workflowsQry = gql`
|
|
5
|
+
query workflows (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
) {
|
|
8
|
+
workflows (
|
|
9
|
+
organizationId: $organizationId
|
|
10
|
+
) {
|
|
11
|
+
...workflowFragment
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${workflowFragment}
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const workflowRunsQry = gql`
|
|
19
|
+
query workflowRuns (
|
|
20
|
+
$workflowId: GenericID!
|
|
21
|
+
) {
|
|
22
|
+
workflowRuns (
|
|
23
|
+
workflowId: $workflowId
|
|
24
|
+
) {
|
|
25
|
+
...workflowRunFragment
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
${workflowRunFragment}
|
|
30
|
+
`;
|