@jsb188/graphql 1.1.8 → 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 +478 -102
- 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 +0 -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 +93 -9
- 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,5 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import { organizationFragment } from '../fragments/organizationFragments';
|
|
2
|
+
import { organizationChildFragment, organizationComplianceFragment, organizationFragment, organizationRelationshipFragment, organizationSettingsFragment, organizationSiteFragment } from '../fragments/organizationFragments.ts';
|
|
3
3
|
|
|
4
4
|
export const switchOrganizationMtn = gql`
|
|
5
5
|
mutation switchOrganization (
|
|
@@ -23,20 +23,169 @@ mutation deleteComplianceDocument (
|
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
25
|
|
|
26
|
+
export const editComplianceDocumentMtn = gql`
|
|
27
|
+
mutation editComplianceDocument (
|
|
28
|
+
$complianceId: GenericID!
|
|
29
|
+
$documentName: String
|
|
30
|
+
$type: OrganizationComplianceType
|
|
31
|
+
$expirationDate: CalDateString
|
|
32
|
+
) {
|
|
33
|
+
editComplianceDocument (
|
|
34
|
+
complianceId: $complianceId
|
|
35
|
+
documentName: $documentName
|
|
36
|
+
type: $type
|
|
37
|
+
expirationDate: $expirationDate
|
|
38
|
+
) {
|
|
39
|
+
...organizationComplianceFragment
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
${organizationComplianceFragment}
|
|
44
|
+
`;
|
|
45
|
+
|
|
26
46
|
export const editOrganizationMtn = gql`
|
|
27
47
|
mutation editOrganization (
|
|
28
48
|
$organizationId: GenericID!
|
|
29
49
|
$name: String
|
|
30
50
|
$address: AddressInput
|
|
51
|
+
$directory: [OrgContactInput!]
|
|
31
52
|
) {
|
|
32
53
|
editOrganization (
|
|
33
54
|
organizationId: $organizationId
|
|
34
55
|
name: $name
|
|
35
56
|
address: $address
|
|
57
|
+
directory: $directory
|
|
58
|
+
) {
|
|
59
|
+
...organizationFragment
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${organizationFragment}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
export const editOrganizationInboundEmailMtn = gql`
|
|
67
|
+
mutation editOrganizationInboundEmail (
|
|
68
|
+
$organizationId: GenericID!
|
|
69
|
+
$inboundEmail: String
|
|
70
|
+
) {
|
|
71
|
+
editOrganizationInboundEmail (
|
|
72
|
+
organizationId: $organizationId
|
|
73
|
+
inboundEmail: $inboundEmail
|
|
36
74
|
) {
|
|
37
75
|
...organizationFragment
|
|
38
76
|
}
|
|
39
77
|
}
|
|
40
78
|
|
|
41
79
|
${organizationFragment}
|
|
42
|
-
`;
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export const editOrganizationSettingsMtn = gql`
|
|
83
|
+
mutation editOrganizationSettings (
|
|
84
|
+
$organizationId: GenericID!
|
|
85
|
+
$sidebar: [OrganizationSidebarGroupInput!]
|
|
86
|
+
$routeId: String
|
|
87
|
+
$columnWidths: [String!]
|
|
88
|
+
) {
|
|
89
|
+
editOrganizationSettings (
|
|
90
|
+
organizationId: $organizationId
|
|
91
|
+
sidebar: $sidebar
|
|
92
|
+
routeId: $routeId
|
|
93
|
+
columnWidths: $columnWidths
|
|
94
|
+
) {
|
|
95
|
+
...organizationSettingsFragment
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
${organizationSettingsFragment}
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
export const editChildOrganizationMtn = gql`
|
|
103
|
+
mutation editChildOrganization (
|
|
104
|
+
$organizationId: GenericID!
|
|
105
|
+
$childOrgId: GenericID!
|
|
106
|
+
$name: String
|
|
107
|
+
$operation: OrganizationOperation
|
|
108
|
+
$address: AddressInput
|
|
109
|
+
$preferredContacts: [OrgContactInput!]
|
|
110
|
+
) {
|
|
111
|
+
editChildOrganization (
|
|
112
|
+
organizationId: $organizationId
|
|
113
|
+
childOrgId: $childOrgId
|
|
114
|
+
name: $name
|
|
115
|
+
operation: $operation
|
|
116
|
+
address: $address
|
|
117
|
+
preferredContacts: $preferredContacts
|
|
118
|
+
) {
|
|
119
|
+
...organizationChildFragment
|
|
120
|
+
|
|
121
|
+
organization {
|
|
122
|
+
...organizationFragment
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
${organizationChildFragment}
|
|
128
|
+
${organizationFragment}
|
|
129
|
+
`;
|
|
130
|
+
|
|
131
|
+
export const editSiteLocationMtn = gql`
|
|
132
|
+
mutation editSiteLocation (
|
|
133
|
+
$siteLocationId: GenericID!
|
|
134
|
+
$name: String
|
|
135
|
+
$region: String
|
|
136
|
+
$note: String
|
|
137
|
+
) {
|
|
138
|
+
editSiteLocation (
|
|
139
|
+
siteLocationId: $siteLocationId
|
|
140
|
+
name: $name
|
|
141
|
+
region: $region
|
|
142
|
+
note: $note
|
|
143
|
+
) {
|
|
144
|
+
...organizationSiteFragment
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
${organizationSiteFragment}
|
|
149
|
+
`;
|
|
150
|
+
|
|
151
|
+
export const deleteChildOrganizationMtn = gql`
|
|
152
|
+
mutation deleteChildOrganization (
|
|
153
|
+
$organizationId: GenericID!
|
|
154
|
+
$childOrgId: GenericID!
|
|
155
|
+
) {
|
|
156
|
+
deleteChildOrganization (
|
|
157
|
+
organizationId: $organizationId
|
|
158
|
+
childOrgId: $childOrgId
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
export const editMembershipMtn = gql`
|
|
164
|
+
mutation editMembership (
|
|
165
|
+
$organizationId: GenericID!
|
|
166
|
+
$accountId: GenericID!
|
|
167
|
+
$role: OrganizationRole
|
|
168
|
+
$notes: String
|
|
169
|
+
) {
|
|
170
|
+
editMembership (
|
|
171
|
+
organizationId: $organizationId
|
|
172
|
+
accountId: $accountId
|
|
173
|
+
role: $role
|
|
174
|
+
notes: $notes
|
|
175
|
+
) {
|
|
176
|
+
...organizationRelationshipFragment
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
${organizationRelationshipFragment}
|
|
181
|
+
`;
|
|
182
|
+
|
|
183
|
+
export const removeMembershipMtn = gql`
|
|
184
|
+
mutation removeMembership (
|
|
185
|
+
$membershipId: GenericID!
|
|
186
|
+
) {
|
|
187
|
+
removeMembership (
|
|
188
|
+
membershipId: $membershipId
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
`;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { sheetCellFragment, sheetFragment, sheetRangeFragment, sheetRegionFragment } from '../fragments/sheetFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const createSheetMtn = gql`
|
|
5
|
+
mutation createSheet (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$title: String!
|
|
8
|
+
$name: String
|
|
9
|
+
$description: String
|
|
10
|
+
$position: Float
|
|
11
|
+
$design: SheetDesignPatchInput
|
|
12
|
+
) {
|
|
13
|
+
createSheet (
|
|
14
|
+
organizationId: $organizationId
|
|
15
|
+
title: $title
|
|
16
|
+
name: $name
|
|
17
|
+
description: $description
|
|
18
|
+
position: $position
|
|
19
|
+
design: $design
|
|
20
|
+
) {
|
|
21
|
+
...sheetFragment
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${sheetFragment}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const updateSheetMtn = gql`
|
|
29
|
+
mutation updateSheet (
|
|
30
|
+
$organizationId: GenericID!
|
|
31
|
+
$sheetId: GenericID!
|
|
32
|
+
$title: String
|
|
33
|
+
$name: String
|
|
34
|
+
$description: String
|
|
35
|
+
$position: Float
|
|
36
|
+
$design: SheetDesignPatchInput
|
|
37
|
+
$active: Boolean
|
|
38
|
+
) {
|
|
39
|
+
updateSheet (
|
|
40
|
+
organizationId: $organizationId
|
|
41
|
+
sheetId: $sheetId
|
|
42
|
+
title: $title
|
|
43
|
+
name: $name
|
|
44
|
+
description: $description
|
|
45
|
+
position: $position
|
|
46
|
+
design: $design
|
|
47
|
+
active: $active
|
|
48
|
+
) {
|
|
49
|
+
...sheetFragment
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
${sheetFragment}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export const editSheetCellsMtn = gql`
|
|
57
|
+
mutation editSheetCells (
|
|
58
|
+
$organizationId: GenericID!
|
|
59
|
+
$sheetId: GenericID!
|
|
60
|
+
$cells: [SheetCellEditInput!]!
|
|
61
|
+
) {
|
|
62
|
+
editSheetCells (
|
|
63
|
+
organizationId: $organizationId
|
|
64
|
+
sheetId: $sheetId
|
|
65
|
+
cells: $cells
|
|
66
|
+
) {
|
|
67
|
+
...sheetCellFragment
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
${sheetCellFragment}
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
export const clearSheetCellMtn = gql`
|
|
75
|
+
mutation clearSheetCell (
|
|
76
|
+
$organizationId: GenericID!
|
|
77
|
+
$sheetId: GenericID!
|
|
78
|
+
$rowIndex: Int!
|
|
79
|
+
$columnIndex: Int!
|
|
80
|
+
) {
|
|
81
|
+
clearSheetCell (
|
|
82
|
+
organizationId: $organizationId
|
|
83
|
+
sheetId: $sheetId
|
|
84
|
+
rowIndex: $rowIndex
|
|
85
|
+
columnIndex: $columnIndex
|
|
86
|
+
) {
|
|
87
|
+
...sheetCellFragment
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
${sheetCellFragment}
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
export const upsertSheetRangeMtn = gql`
|
|
95
|
+
mutation upsertSheetRange (
|
|
96
|
+
$organizationId: GenericID!
|
|
97
|
+
$sheetId: GenericID!
|
|
98
|
+
$rangeId: GenericID
|
|
99
|
+
$range: SheetRangeInput!
|
|
100
|
+
) {
|
|
101
|
+
upsertSheetRange (
|
|
102
|
+
organizationId: $organizationId
|
|
103
|
+
sheetId: $sheetId
|
|
104
|
+
rangeId: $rangeId
|
|
105
|
+
range: $range
|
|
106
|
+
) {
|
|
107
|
+
...sheetRangeFragment
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
${sheetRangeFragment}
|
|
112
|
+
`;
|
|
113
|
+
|
|
114
|
+
export const deleteSheetRangeMtn = gql`
|
|
115
|
+
mutation deleteSheetRange (
|
|
116
|
+
$organizationId: GenericID!
|
|
117
|
+
$sheetId: GenericID!
|
|
118
|
+
$rangeId: GenericID!
|
|
119
|
+
) {
|
|
120
|
+
deleteSheetRange (
|
|
121
|
+
organizationId: $organizationId
|
|
122
|
+
sheetId: $sheetId
|
|
123
|
+
rangeId: $rangeId
|
|
124
|
+
) {
|
|
125
|
+
...sheetRangeFragment
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
${sheetRangeFragment}
|
|
130
|
+
`;
|
|
131
|
+
|
|
132
|
+
export const upsertSheetDataTableRegionMtn = gql`
|
|
133
|
+
mutation upsertSheetDataTableRegion (
|
|
134
|
+
$organizationId: GenericID!
|
|
135
|
+
$sheetId: GenericID!
|
|
136
|
+
$regionId: GenericID
|
|
137
|
+
$region: SheetRegionInput!
|
|
138
|
+
) {
|
|
139
|
+
upsertSheetDataTableRegion (
|
|
140
|
+
organizationId: $organizationId
|
|
141
|
+
sheetId: $sheetId
|
|
142
|
+
regionId: $regionId
|
|
143
|
+
region: $region
|
|
144
|
+
) {
|
|
145
|
+
...sheetRegionFragment
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
${sheetRegionFragment}
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
export const deleteSheetRegionMtn = gql`
|
|
153
|
+
mutation deleteSheetRegion (
|
|
154
|
+
$organizationId: GenericID!
|
|
155
|
+
$sheetId: GenericID!
|
|
156
|
+
$regionId: GenericID!
|
|
157
|
+
) {
|
|
158
|
+
deleteSheetRegion (
|
|
159
|
+
organizationId: $organizationId
|
|
160
|
+
sheetId: $sheetId
|
|
161
|
+
regionId: $regionId
|
|
162
|
+
) {
|
|
163
|
+
...sheetRegionFragment
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
${sheetRegionFragment}
|
|
168
|
+
`;
|
|
@@ -2,7 +2,6 @@ import { gql } from 'graphql-tag';
|
|
|
2
2
|
|
|
3
3
|
export const createSignedUploadUrlMtn = gql`
|
|
4
4
|
mutation createSignedUploadUrl (
|
|
5
|
-
$temporaryId: String!
|
|
6
5
|
$organizationId: GenericID!
|
|
7
6
|
$fileName: String!
|
|
8
7
|
$contentType: String!
|
|
@@ -10,13 +9,13 @@ mutation createSignedUploadUrl (
|
|
|
10
9
|
$uploadIntent: StorageIntentObject!
|
|
11
10
|
) {
|
|
12
11
|
createSignedUploadUrl (
|
|
13
|
-
temporaryId: $temporaryId
|
|
14
12
|
organizationId: $organizationId
|
|
15
13
|
fileName: $fileName
|
|
16
14
|
contentType: $contentType
|
|
17
15
|
fileSize: $fileSize
|
|
18
16
|
uploadIntent: $uploadIntent
|
|
19
17
|
) {
|
|
18
|
+
id
|
|
20
19
|
signedUrl
|
|
21
20
|
fileUri
|
|
22
21
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { dataTableCellFragment, dataTableFragment, dataTableRowFragment } from '../fragments/dataTableFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const dataTablesQry = gql`
|
|
5
|
+
query dataTables (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$active: Boolean
|
|
8
|
+
) {
|
|
9
|
+
dataTables (
|
|
10
|
+
organizationId: $organizationId
|
|
11
|
+
active: $active
|
|
12
|
+
) {
|
|
13
|
+
...dataTableFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${dataTableFragment}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const dataTableRowsQry = gql`
|
|
21
|
+
query dataTableRows (
|
|
22
|
+
$dataTableId: GenericID!
|
|
23
|
+
$organizationId: GenericID!
|
|
24
|
+
$cursor: Cursor
|
|
25
|
+
$limit: Int!
|
|
26
|
+
$filter: DataTableRowsFilterInput
|
|
27
|
+
) {
|
|
28
|
+
dataTableRows (
|
|
29
|
+
dataTableId: $dataTableId
|
|
30
|
+
organizationId: $organizationId
|
|
31
|
+
cursor: $cursor
|
|
32
|
+
limit: $limit
|
|
33
|
+
filter: $filter
|
|
34
|
+
) {
|
|
35
|
+
...dataTableRowFragment
|
|
36
|
+
|
|
37
|
+
cells {
|
|
38
|
+
...dataTableCellFragment
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
${dataTableRowFragment}
|
|
44
|
+
${dataTableCellFragment}
|
|
45
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { inboundEmailAttachmentFragment, inboundEmailFragment } from '../fragments/emailFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const inboundEmailQry = gql`
|
|
5
|
+
query inboundEmail (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$inboundEmailId: GenericID!
|
|
8
|
+
) {
|
|
9
|
+
inboundEmail (
|
|
10
|
+
organizationId: $organizationId
|
|
11
|
+
inboundEmailId: $inboundEmailId
|
|
12
|
+
) {
|
|
13
|
+
...inboundEmailFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${inboundEmailAttachmentFragment}
|
|
18
|
+
${inboundEmailFragment}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const inboundEmailsQry = gql`
|
|
22
|
+
query inboundEmails (
|
|
23
|
+
$organizationId: GenericID!
|
|
24
|
+
$filter: InboundEmailsFilter
|
|
25
|
+
$sort: InboundEmailsSort
|
|
26
|
+
$cursor: Cursor
|
|
27
|
+
$after: Boolean!
|
|
28
|
+
$limit: Int!
|
|
29
|
+
) {
|
|
30
|
+
inboundEmails (
|
|
31
|
+
organizationId: $organizationId
|
|
32
|
+
filter: $filter
|
|
33
|
+
sort: $sort
|
|
34
|
+
cursor: $cursor
|
|
35
|
+
after: $after
|
|
36
|
+
limit: $limit
|
|
37
|
+
) {
|
|
38
|
+
...inboundEmailFragment
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${inboundEmailAttachmentFragment}
|
|
43
|
+
${inboundEmailFragment}
|
|
44
|
+
`;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { inboundContactFragment } from '../fragments/inboundContactFragments.ts';
|
|
3
|
+
|
|
4
|
+
export const inboundContactQry = gql`
|
|
5
|
+
query inboundContact (
|
|
6
|
+
$organizationId: GenericID!
|
|
7
|
+
$inboundContactId: GenericID!
|
|
8
|
+
) {
|
|
9
|
+
inboundContact (
|
|
10
|
+
organizationId: $organizationId
|
|
11
|
+
inboundContactId: $inboundContactId
|
|
12
|
+
) {
|
|
13
|
+
...inboundContactFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${inboundContactFragment}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const inboundContactsQry = gql`
|
|
21
|
+
query inboundContacts (
|
|
22
|
+
$organizationId: GenericID!
|
|
23
|
+
$sort: InboundContactsSort
|
|
24
|
+
$cursor: Cursor
|
|
25
|
+
$after: Boolean!
|
|
26
|
+
$limit: Int!
|
|
27
|
+
) {
|
|
28
|
+
inboundContacts (
|
|
29
|
+
organizationId: $organizationId
|
|
30
|
+
sort: $sort
|
|
31
|
+
cursor: $cursor
|
|
32
|
+
after: $after
|
|
33
|
+
limit: $limit
|
|
34
|
+
) {
|
|
35
|
+
...inboundContactFragment
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
${inboundContactFragment}
|
|
40
|
+
`;
|
package/gql/queries/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
export * from './aiChatQueries';
|
|
2
|
-
export * from './appQueries';
|
|
3
|
-
export * from './billingQueries';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './aiChatQueries.ts';
|
|
2
|
+
export * from './appQueries.ts';
|
|
3
|
+
export * from './billingQueries.ts';
|
|
4
|
+
export * from './emailQueries.ts';
|
|
5
|
+
export * from './inboundContactQueries.ts';
|
|
6
|
+
export * from './logQueries.ts';
|
|
7
|
+
export * from './organizationQueries.ts';
|
|
8
|
+
export * from './productQueries.ts';
|
|
9
|
+
export * from './dataTableQueries.ts';
|
|
10
|
+
export * from './sheetQueries.ts';
|
|
11
|
+
export * from './workflowQueries.ts';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
-
import { accountFragment } from '../fragments/accountFragments';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { accountFragment } from '../fragments/accountFragments.ts';
|
|
3
|
+
import {
|
|
4
|
+
logEntryFragment,
|
|
5
|
+
logArableFragment,
|
|
6
|
+
logFarmersMarketFragment,
|
|
7
|
+
logGrowerNetworkFragment,
|
|
8
|
+
logLivestockFragment
|
|
9
|
+
} from '../fragments/logFragments.ts';
|
|
10
|
+
import { storageFileFragment } from '../fragments/storageFragments.ts';
|
|
5
11
|
|
|
6
12
|
export const logEntryFragmentStatement = `...logEntryFragment
|
|
7
13
|
|
|
@@ -12,6 +18,9 @@ export const logEntryFragmentStatement = `...logEntryFragment
|
|
|
12
18
|
...on LogFarmersMarket {
|
|
13
19
|
...logFarmersMarketFragment
|
|
14
20
|
}
|
|
21
|
+
...on LogGrowerNetwork {
|
|
22
|
+
...logGrowerNetworkFragment
|
|
23
|
+
}
|
|
15
24
|
...on LogLivestock {
|
|
16
25
|
...logLivestockFragment
|
|
17
26
|
}
|
|
@@ -26,9 +35,31 @@ ${accountFragment}
|
|
|
26
35
|
${logEntryFragment}
|
|
27
36
|
${logArableFragment}
|
|
28
37
|
${logFarmersMarketFragment}
|
|
38
|
+
${logGrowerNetworkFragment}
|
|
29
39
|
${logLivestockFragment}
|
|
30
40
|
`;
|
|
31
41
|
|
|
42
|
+
export const logEntryQry = gql`
|
|
43
|
+
query logEntry (
|
|
44
|
+
$organizationId: GenericID!
|
|
45
|
+
$logEntryId: GenericID!
|
|
46
|
+
) {
|
|
47
|
+
logEntry (
|
|
48
|
+
organizationId: $organizationId
|
|
49
|
+
logEntryId: $logEntryId
|
|
50
|
+
) {
|
|
51
|
+
${logEntryFragmentStatement}
|
|
52
|
+
|
|
53
|
+
files {
|
|
54
|
+
...storageFileFragment
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
${storageFileFragment}
|
|
60
|
+
${logEntryFragmentImports}
|
|
61
|
+
`;
|
|
62
|
+
|
|
32
63
|
export const logEntriesQry = gql`
|
|
33
64
|
query logEntries (
|
|
34
65
|
$organizationId: GenericID!
|
|
@@ -48,39 +79,35 @@ query logEntries (
|
|
|
48
79
|
) {
|
|
49
80
|
${logEntryFragmentStatement}
|
|
50
81
|
|
|
51
|
-
|
|
52
|
-
...
|
|
82
|
+
files {
|
|
83
|
+
...storageFileFragment
|
|
53
84
|
}
|
|
54
85
|
}
|
|
55
86
|
}
|
|
56
87
|
|
|
57
|
-
${
|
|
88
|
+
${storageFileFragment}
|
|
58
89
|
${logEntryFragmentImports}
|
|
59
90
|
`;
|
|
60
91
|
|
|
61
|
-
export const
|
|
62
|
-
query
|
|
92
|
+
export const logEntriesForReportQry = gql`
|
|
93
|
+
query logEntriesForReport (
|
|
63
94
|
$organizationId: GenericID!
|
|
64
|
-
$
|
|
65
|
-
$
|
|
66
|
-
$after: Boolean!
|
|
67
|
-
$limit: Int!
|
|
95
|
+
$reportSourceId: CursorToIDs!
|
|
96
|
+
$reportSubmissionId: GenericID!
|
|
68
97
|
) {
|
|
69
|
-
|
|
98
|
+
logEntriesForReport (
|
|
70
99
|
organizationId: $organizationId
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
after: $after
|
|
74
|
-
limit: $limit
|
|
100
|
+
reportSourceId: $reportSourceId
|
|
101
|
+
reportSubmissionId: $reportSubmissionId
|
|
75
102
|
) {
|
|
76
103
|
${logEntryFragmentStatement}
|
|
77
104
|
|
|
78
|
-
|
|
79
|
-
...
|
|
105
|
+
files {
|
|
106
|
+
...storageFileFragment
|
|
80
107
|
}
|
|
81
108
|
}
|
|
82
109
|
}
|
|
83
110
|
|
|
84
|
-
${
|
|
111
|
+
${storageFileFragment}
|
|
85
112
|
${logEntryFragmentImports}
|
|
86
113
|
`;
|