@jsb188/graphql 1.1.10 → 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.
Files changed (116) hide show
  1. package/cache/config.ts +64 -50
  2. package/cache/index.test.ts +671 -109
  3. package/cache/index.ts +1700 -1240
  4. package/cache/persist.ts +721 -0
  5. package/cache/store.ts +437 -0
  6. package/client/data-table-realtime-subscriptions.test.ts +740 -0
  7. package/client/data-table-realtime-subscriptions.ts +955 -0
  8. package/client/data-table-realtime.test.ts +792 -0
  9. package/client/data-table-realtime.ts +1218 -0
  10. package/client/fragment-realtime-sequence.ts +52 -0
  11. package/client/index.ts +2 -0
  12. package/client/open-sheet.ts +137 -0
  13. package/client/request-managed-session.test.ts +574 -0
  14. package/client/request-no-store.test.ts +157 -0
  15. package/client/request.ts +954 -163
  16. package/client/sse-ticket.test.ts +26 -0
  17. package/deno.lock +170 -0
  18. package/deno.test.json +8 -4
  19. package/drafts/index.ts +149 -0
  20. package/drafts/store.ts +397 -0
  21. package/gql/eagerQueryMap.ts +12 -0
  22. package/gql/fragments/accountAuthFragments.ts +5 -0
  23. package/gql/fragments/accountFragments.ts +0 -3
  24. package/gql/fragments/accountSessionFragments.ts +16 -0
  25. package/gql/fragments/agentDocFragments.ts +46 -0
  26. package/gql/fragments/agentMemoryFragments.ts +19 -0
  27. package/gql/fragments/aiChatFragments.ts +16 -0
  28. package/gql/fragments/billingFragments.ts +0 -11
  29. package/gql/fragments/campaignFragments.ts +277 -0
  30. package/gql/fragments/dataTableFragments.ts +18 -128
  31. package/gql/fragments/emailFragments.ts +19 -9
  32. package/gql/fragments/fieldDocFragments.ts +82 -0
  33. package/gql/fragments/logFragments.ts +20 -79
  34. package/gql/fragments/organizationFragments.ts +43 -5
  35. package/gql/fragments/scheduleFragments.ts +155 -0
  36. package/gql/fragments/sheetFragments.ts +552 -22
  37. package/gql/fragments/storageFragments.ts +21 -0
  38. package/gql/fragments/workflowFragments.ts +28 -4
  39. package/gql/mutations/accountMutations.ts +0 -2
  40. package/gql/mutations/agentDocMutations.ts +177 -0
  41. package/gql/mutations/agentMemoryMutations.ts +36 -0
  42. package/gql/mutations/aiChatMutations.ts +17 -4
  43. package/gql/mutations/authMutations.ts +158 -17
  44. package/gql/mutations/campaignMutations.ts +215 -0
  45. package/gql/mutations/dataTableMutations.ts +48 -26
  46. package/gql/mutations/fieldDocMutations.ts +24 -0
  47. package/gql/mutations/index.ts +6 -1
  48. package/gql/mutations/logMutations.ts +6 -29
  49. package/gql/mutations/organizationMutations.ts +13 -4
  50. package/gql/mutations/scheduleMutations.ts +423 -0
  51. package/gql/mutations/sheetMutations.ts +273 -56
  52. package/gql/mutations/storageMutations.ts +20 -0
  53. package/gql/mutations/workflowMutations.ts +42 -0
  54. package/gql/queries/agentDocQueries.ts +120 -0
  55. package/gql/queries/agentMemoryQueries.ts +22 -0
  56. package/gql/queries/aiChatQueries.ts +18 -2
  57. package/gql/queries/authQueries.ts +41 -0
  58. package/gql/queries/billingQueries.ts +23 -0
  59. package/gql/queries/campaignQueries.ts +127 -0
  60. package/gql/queries/dataTableQueries.ts +100 -11
  61. package/gql/queries/emailQueries.ts +55 -3
  62. package/gql/queries/fieldDocQueries.ts +158 -0
  63. package/gql/queries/index.ts +8 -2
  64. package/gql/queries/logQueries.ts +11 -28
  65. package/gql/queries/organizationQueries.ts +52 -1
  66. package/gql/queries/scheduleQueries.ts +315 -0
  67. package/gql/queries/sheetQueries.ts +336 -25
  68. package/gql/queries/storageQueries.ts +38 -0
  69. package/gql/queries/workflowQueries.ts +72 -3
  70. package/hooks/index.ts +2065 -971
  71. package/hooks/use-account-mtn.ts +76 -81
  72. package/hooks/use-agentDoc-mtn.ts +285 -0
  73. package/hooks/use-agentDoc-qry.ts +208 -0
  74. package/hooks/use-agentMemory-mtn.ts +73 -0
  75. package/hooks/use-agentMemory-qry.ts +44 -0
  76. package/hooks/use-aiChat-mtn.ts +232 -137
  77. package/hooks/use-aiChat-qry.ts +480 -222
  78. package/hooks/use-app-qry.ts +12 -9
  79. package/hooks/use-auth-mtn.ts +406 -252
  80. package/hooks/use-auth-qry.ts +51 -0
  81. package/hooks/use-campaign-mtn.ts +377 -0
  82. package/hooks/use-campaign-qry.ts +257 -0
  83. package/hooks/use-dataTable-mtn.ts +116 -33
  84. package/hooks/use-dataTable-qry.ts +859 -35
  85. package/hooks/use-email-qry.ts +194 -79
  86. package/hooks/use-fieldDoc-mtn.ts +50 -0
  87. package/hooks/use-fieldDoc-qry.ts +180 -0
  88. package/hooks/use-inboundContact-mtn.ts +19 -16
  89. package/hooks/use-inboundContact-qry.ts +63 -55
  90. package/hooks/use-integration-mtn.ts +56 -38
  91. package/hooks/use-integration-qry.ts +24 -9
  92. package/hooks/use-log-mtn.ts +72 -56
  93. package/hooks/use-log-qry.ts +93 -69
  94. package/hooks/use-organization-mtn.ts +334 -277
  95. package/hooks/use-organization-qry.ts +199 -129
  96. package/hooks/use-schedule-mtn.ts +416 -0
  97. package/hooks/use-schedule-qry.ts +157 -0
  98. package/hooks/use-sheet-mtn.ts +233 -47
  99. package/hooks/use-sheet-qry.ts +353 -70
  100. package/hooks/use-storage-mtn.ts +81 -41
  101. package/hooks/use-storage-qry.ts +104 -13
  102. package/hooks/use-workflow-mtn.ts +55 -0
  103. package/hooks/use-workflow-qry.ts +206 -48
  104. package/loaders/campaign.ts +137 -0
  105. package/package.json +94 -71
  106. package/sse.ts +157 -104
  107. package/tsconfig.json +11 -10
  108. package/types.d.ts +60 -30
  109. package/utils.ts +78 -49
  110. package/gql/fragments/productFragments.ts +0 -39
  111. package/gql/fragments/reportFragments.ts +0 -90
  112. package/gql/mutations/billingMutations.ts +0 -34
  113. package/gql/queries/productQueries.ts +0 -31
  114. package/gql/queries/reportQueries.ts +0 -134
  115. package/hooks/use-product-qry.ts +0 -67
  116. package/hooks/use-report-qry.ts +0 -153
@@ -0,0 +1,41 @@
1
+ import { gql } from 'graphql-tag';
2
+ import { accountSessionFragment } from '../fragments/accountSessionFragments.ts';
3
+
4
+ const ORGANIZATION_AUTHORIZATION_FIELDS = `
5
+ organizationAuthorizations {
6
+ id
7
+ organizationId
8
+ ssoConnectionId
9
+ authorizationMethod
10
+ authorizedAt
11
+ lastActivityAt
12
+ revokedAt
13
+ revokeReason
14
+ }
15
+ `;
16
+
17
+ export const myAccountSessionsQry = gql`
18
+ query myAccountSessions {
19
+ myAccountSessions {
20
+ ...accountSessionFragment
21
+ ${ORGANIZATION_AUTHORIZATION_FIELDS}
22
+ }
23
+ }
24
+ ${accountSessionFragment}
25
+ `;
26
+
27
+ export const organizationMemberSessionsQry = gql`
28
+ query organizationMemberSessions (
29
+ $organizationId: GenericID!
30
+ $accountId: GenericID!
31
+ ) {
32
+ organizationMemberSessions (
33
+ organizationId: $organizationId
34
+ accountId: $accountId
35
+ ) {
36
+ ...accountSessionFragment
37
+ ${ORGANIZATION_AUTHORIZATION_FIELDS}
38
+ }
39
+ }
40
+ ${accountSessionFragment}
41
+ `;
@@ -1,6 +1,29 @@
1
1
  import { gql } from 'graphql-tag';
2
2
  import { platformProductFragment } from '../fragments/billingFragments.ts';
3
3
 
4
+ export const organizationUsageQry = gql`
5
+ query organizationUsage(
6
+ $organizationId: GenericID!
7
+ $occurredAtFrom: DateTime!
8
+ $occurredAtTo: DateTime!
9
+ $meters: [UsageMeter!]
10
+ $origins: [UsageOrigin!]
11
+ ) {
12
+ organizationUsage(
13
+ organizationId: $organizationId
14
+ occurredAtFrom: $occurredAtFrom
15
+ occurredAtTo: $occurredAtTo
16
+ meters: $meters
17
+ origins: $origins
18
+ ) {
19
+ meter
20
+ origin
21
+ quantity
22
+ eventCount
23
+ }
24
+ }
25
+ `;
26
+
4
27
  export const platformProductsQry = gql`
5
28
  query platformProducts {
6
29
  platformProducts {
@@ -0,0 +1,127 @@
1
+ import { gql } from 'graphql-tag';
2
+ import {
3
+ campaignFragment,
4
+ campaignRecipientFragment,
5
+ campaignResponseFragment,
6
+ campaignSummaryFragment,
7
+ campaignTemplateElementFragment,
8
+ campaignTemplateFragment,
9
+ campaignTemplateSummaryFragment,
10
+ } from '../fragments/campaignFragments.ts';
11
+
12
+ export const campaignTemplatesQry = gql`
13
+ query campaignTemplates (
14
+ $organizationId: GenericID!
15
+ $kind: CampaignKind
16
+ $status: CampaignTemplateStatus
17
+ $cursor: Cursor
18
+ $after: Boolean
19
+ $limit: Int
20
+ ) {
21
+ campaignTemplates (
22
+ organizationId: $organizationId
23
+ kind: $kind
24
+ status: $status
25
+ cursor: $cursor
26
+ after: $after
27
+ limit: $limit
28
+ ) {
29
+ ...campaignTemplateSummaryFragment
30
+ }
31
+ }
32
+ ${campaignTemplateSummaryFragment}
33
+ `;
34
+
35
+ export const campaignTemplateQry = gql`
36
+ query campaignTemplate (
37
+ $organizationId: GenericID!
38
+ $templateId: GenericID!
39
+ ) {
40
+ campaignTemplate (
41
+ organizationId: $organizationId
42
+ templateId: $templateId
43
+ ) {
44
+ ...campaignTemplateFragment
45
+ }
46
+ }
47
+ ${campaignTemplateElementFragment}
48
+ ${campaignTemplateFragment}
49
+ `;
50
+
51
+ export const campaignsQry = gql`
52
+ query campaigns (
53
+ $organizationId: GenericID!
54
+ $filter: CampaignsFilter!
55
+ $cursor: Cursor
56
+ $after: Boolean!
57
+ $limit: Int!
58
+ ) {
59
+ campaigns (
60
+ organizationId: $organizationId
61
+ filter: $filter
62
+ cursor: $cursor
63
+ after: $after
64
+ limit: $limit
65
+ ) {
66
+ ...campaignSummaryFragment
67
+ }
68
+ }
69
+ ${campaignSummaryFragment}
70
+ `;
71
+
72
+ export const campaignQry = gql`
73
+ query campaign (
74
+ $organizationId: GenericID!
75
+ $campaignId: GenericID!
76
+ ) {
77
+ campaign (
78
+ organizationId: $organizationId
79
+ campaignId: $campaignId
80
+ ) {
81
+ ...campaignFragment
82
+ }
83
+ }
84
+ ${campaignFragment}
85
+ `;
86
+
87
+ export const campaignResponsesQry = gql`
88
+ query campaignResponses (
89
+ $organizationId: GenericID!
90
+ $filter: CampaignResponsesFilter!
91
+ $cursor: Cursor
92
+ $after: Boolean!
93
+ $limit: Int!
94
+ ) {
95
+ campaignResponses (
96
+ organizationId: $organizationId
97
+ filter: $filter
98
+ cursor: $cursor
99
+ after: $after
100
+ limit: $limit
101
+ ) {
102
+ ...campaignResponseFragment
103
+ }
104
+ }
105
+ ${campaignResponseFragment}
106
+ `;
107
+
108
+ export const campaignRecipientsQry = gql`
109
+ query campaignRecipients (
110
+ $organizationId: GenericID!
111
+ $filter: CampaignRecipientsFilter!
112
+ $cursor: Cursor
113
+ $after: Boolean!
114
+ $limit: Int!
115
+ ) {
116
+ campaignRecipients (
117
+ organizationId: $organizationId
118
+ filter: $filter
119
+ cursor: $cursor
120
+ after: $after
121
+ limit: $limit
122
+ ) {
123
+ ...campaignRecipientFragment
124
+ }
125
+ }
126
+ ${campaignRecipientFragment}
127
+ `;
@@ -1,45 +1,134 @@
1
1
  import { gql } from 'graphql-tag';
2
- import { dataTableCellFragment, dataTableFragment, dataTableRowFragment } from '../fragments/dataTableFragments.ts';
2
+ import {
3
+ dataTableCellFragment,
4
+ dataTableFragment,
5
+ dataTableMetadataFragment,
6
+ dataTableRowFragment,
7
+ } from '../fragments/dataTableFragments.ts';
3
8
 
4
9
  export const dataTablesQry = gql`
5
10
  query dataTables (
6
11
  $organizationId: GenericID!
7
- $active: Boolean
12
+ $filter: DataTablesFilter
13
+ $sort: GridItemSort
14
+ $cursor: Cursor
15
+ $after: Boolean!
16
+ $limit: Int!
8
17
  ) {
9
18
  dataTables (
10
19
  organizationId: $organizationId
11
- active: $active
20
+ filter: $filter
21
+ sort: $sort
22
+ cursor: $cursor
23
+ after: $after
24
+ limit: $limit
12
25
  ) {
13
26
  ...dataTableFragment
27
+ realtimeToken
14
28
  }
15
29
  }
16
30
 
17
31
  ${dataTableFragment}
18
32
  `;
19
33
 
20
- export const dataTableRowsQry = gql`
21
- query dataTableRows (
34
+ export const dataTableQry = gql`
35
+ query dataTable (
36
+ $organizationId: GenericID!
37
+ $dataTableId: GenericID!
38
+ ) {
39
+ dataTable (
40
+ organizationId: $organizationId
41
+ dataTableId: $dataTableId
42
+ ) {
43
+ ...dataTableFragment
44
+ realtimeToken
45
+ }
46
+ }
47
+
48
+ ${dataTableFragment}
49
+ `;
50
+
51
+ export const dataTableMetadataQry = gql`
52
+ query dataTableMetadata (
53
+ $dataTableId: GenericID!
54
+ ) {
55
+ dataTableMetadata (
56
+ dataTableId: $dataTableId
57
+ ) {
58
+ ...dataTableMetadataFragment
59
+ }
60
+ }
61
+
62
+ ${dataTableMetadataFragment}
63
+ `;
64
+
65
+ export const dataTableRowsSnapshotQry = gql`
66
+ query dataTableRowsSnapshot (
22
67
  $dataTableId: GenericID!
23
68
  $organizationId: GenericID!
24
69
  $cursor: Cursor
25
70
  $limit: Int!
26
- $filter: DataTableRowsFilterInput
27
71
  ) {
28
- dataTableRows (
72
+ dataTableRowsSnapshot (
29
73
  dataTableId: $dataTableId
30
74
  organizationId: $organizationId
31
75
  cursor: $cursor
32
76
  limit: $limit
33
- filter: $filter
34
77
  ) {
35
- ...dataTableRowFragment
78
+ dataTableId
79
+ currentSeq
36
80
 
37
- cells {
38
- ...dataTableCellFragment
81
+ dataTable {
82
+ ...dataTableFragment
83
+ realtimeToken
84
+ }
85
+
86
+ rows {
87
+ ...dataTableRowFragment
88
+
89
+ cells {
90
+ ...dataTableCellFragment
91
+ }
39
92
  }
40
93
  }
41
94
  }
42
95
 
96
+ ${dataTableFragment}
43
97
  ${dataTableRowFragment}
44
98
  ${dataTableCellFragment}
45
99
  `;
100
+
101
+ // Stage 6 bounded tail contract. Journal payloads are storage transitions, so
102
+ // a tail can identify a recovery target but only the snapshot query above may
103
+ // acknowledge the normalized client cache.
104
+ export const dataTableChangesQry = gql`
105
+ query dataTableChanges (
106
+ $dataTableId: GenericID!
107
+ $organizationId: GenericID!
108
+ $afterSeq: BigInt!
109
+ $limit: Int!
110
+ ) {
111
+ dataTableChanges (
112
+ dataTableId: $dataTableId
113
+ organizationId: $organizationId
114
+ afterSeq: $afterSeq
115
+ limit: $limit
116
+ ) {
117
+ dataTableId
118
+ currentSeq
119
+ requiresSnapshot
120
+ changes {
121
+ dataTableId
122
+ seq
123
+ kind
124
+ payload
125
+ actorAccountId
126
+ sourceSocketId
127
+ commandId
128
+ correlationId
129
+ causationId
130
+ createdAt
131
+ }
132
+ }
133
+ }
134
+ `;
@@ -1,5 +1,9 @@
1
1
  import { gql } from 'graphql-tag';
2
- import { inboundEmailAttachmentFragment, inboundEmailFragment } from '../fragments/emailFragments.ts';
2
+ import {
3
+ inboundEmailFragment,
4
+ outboundEmailFragment,
5
+ } from '../fragments/emailFragments.ts';
6
+ import { storageFileFragment } from '../fragments/storageFragments.ts';
3
7
 
4
8
  export const inboundEmailQry = gql`
5
9
  query inboundEmail (
@@ -14,10 +18,30 @@ query inboundEmail (
14
18
  }
15
19
  }
16
20
 
17
- ${inboundEmailAttachmentFragment}
18
21
  ${inboundEmailFragment}
19
22
  `;
20
23
 
24
+ export const outboundEmailQry = gql`
25
+ query outboundEmail (
26
+ $organizationId: GenericID!
27
+ $outboundEmailId: GenericID!
28
+ ) {
29
+ outboundEmail (
30
+ organizationId: $organizationId
31
+ outboundEmailId: $outboundEmailId
32
+ ) {
33
+ ...outboundEmailFragment
34
+
35
+ files {
36
+ ...storageFileFragment
37
+ }
38
+ }
39
+ }
40
+
41
+ ${storageFileFragment}
42
+ ${outboundEmailFragment}
43
+ `;
44
+
21
45
  export const inboundEmailsQry = gql`
22
46
  query inboundEmails (
23
47
  $organizationId: GenericID!
@@ -39,6 +63,34 @@ query inboundEmails (
39
63
  }
40
64
  }
41
65
 
42
- ${inboundEmailAttachmentFragment}
43
66
  ${inboundEmailFragment}
44
67
  `;
68
+
69
+ export const outboundEmailsQry = gql`
70
+ query outboundEmails (
71
+ $organizationId: GenericID!
72
+ $filter: OutboundEmailsFilter
73
+ $sort: OutboundEmailsSort
74
+ $cursor: Cursor
75
+ $after: Boolean!
76
+ $limit: Int!
77
+ ) {
78
+ outboundEmails (
79
+ organizationId: $organizationId
80
+ filter: $filter
81
+ sort: $sort
82
+ cursor: $cursor
83
+ after: $after
84
+ limit: $limit
85
+ ) {
86
+ ...outboundEmailFragment
87
+
88
+ files {
89
+ ...storageFileFragment
90
+ }
91
+ }
92
+ }
93
+
94
+ ${storageFileFragment}
95
+ ${outboundEmailFragment}
96
+ `;
@@ -0,0 +1,158 @@
1
+ import { gql } from 'graphql-tag';
2
+ import {
3
+ fieldDocElementDataFragment,
4
+ fieldDocFragment,
5
+ fieldDocGroupFragment,
6
+ fieldDocSectionFragment,
7
+ fieldDocSubmissionFragment,
8
+ } from '../fragments/fieldDocFragments.ts';
9
+ import { storageFileFragment } from '../fragments/storageFragments.ts';
10
+
11
+ export const fieldDocMetadataQry = gql`
12
+ query fieldDocMetadata (
13
+ $fieldDocSourceId: CursorToIDs!
14
+ ) {
15
+ fieldDocMetadata (
16
+ fieldDocSourceId: $fieldDocSourceId
17
+ ) {
18
+ id
19
+ title
20
+ description
21
+ }
22
+ }
23
+ `;
24
+
25
+ export const fieldDocGroupMetadataQry = gql`
26
+ query fieldDocGroupMetadata (
27
+ $fieldDocGroupId: GenericID!
28
+ ) {
29
+ fieldDocGroupMetadata (
30
+ fieldDocGroupId: $fieldDocGroupId
31
+ ) {
32
+ id
33
+ name
34
+ shortName
35
+ }
36
+ }
37
+ `;
38
+
39
+ export const fieldDocsQry = gql`
40
+ query fieldDocs (
41
+ $organizationId: GenericID!
42
+ $filter: FieldDocsFilter!
43
+ $sort: FieldDocsSort
44
+ ) {
45
+ fieldDocs (
46
+ organizationId: $organizationId
47
+ filter: $filter
48
+ sort: $sort
49
+ ) {
50
+ ...fieldDocFragment
51
+
52
+ submission {
53
+ ...fieldDocSubmissionFragment
54
+ }
55
+
56
+ sections {
57
+ ...fieldDocSectionFragment
58
+
59
+ elements {
60
+ ...fieldDocElementDataFragment
61
+
62
+ files {
63
+ ...storageFileFragment
64
+ }
65
+ }
66
+ }
67
+
68
+ }
69
+ }
70
+
71
+ ${fieldDocFragment}
72
+ ${fieldDocSubmissionFragment}
73
+ ${fieldDocSectionFragment}
74
+ ${storageFileFragment}
75
+ ${fieldDocElementDataFragment}
76
+ `;
77
+
78
+ export const fieldDocQry = gql`
79
+ query fieldDoc (
80
+ $organizationId: GenericID!
81
+ $fieldDocSourceId: CursorToIDs!
82
+ ) {
83
+ fieldDoc (
84
+ organizationId: $organizationId
85
+ fieldDocSourceId: $fieldDocSourceId
86
+ ) {
87
+ ...fieldDocFragment
88
+
89
+ aside {
90
+ title
91
+ nullText
92
+
93
+ items {
94
+ className
95
+ label
96
+ text
97
+ }
98
+ }
99
+
100
+ submission {
101
+ ...fieldDocSubmissionFragment
102
+ }
103
+
104
+ sections {
105
+ ...fieldDocSectionFragment
106
+
107
+ elements {
108
+ ...fieldDocElementDataFragment
109
+
110
+ files {
111
+ ...storageFileFragment
112
+ }
113
+ }
114
+ }
115
+
116
+ }
117
+ }
118
+
119
+ ${fieldDocFragment}
120
+ ${fieldDocSubmissionFragment}
121
+ ${fieldDocSectionFragment}
122
+ ${storageFileFragment}
123
+ ${fieldDocElementDataFragment}
124
+ `;
125
+
126
+ export const fieldDocGroupsQry = gql`
127
+ query fieldDocGroups (
128
+ $organizationId: GenericID!
129
+ ) {
130
+ fieldDocGroups (
131
+ organizationId: $organizationId
132
+ ) {
133
+ ...fieldDocGroupFragment
134
+ }
135
+ }
136
+
137
+ ${fieldDocGroupFragment}
138
+ `;
139
+
140
+ export const fieldDocSubmissionsQry = gql`
141
+ query fieldDocSubmissions (
142
+ $organizationId: GenericID!
143
+ $filter: FieldDocsFilter!
144
+ $sort: FieldDocsSort
145
+ $limit: Int!
146
+ ) {
147
+ fieldDocSubmissions (
148
+ organizationId: $organizationId
149
+ filter: $filter
150
+ sort: $sort
151
+ limit: $limit
152
+ ) {
153
+ ...fieldDocSubmissionFragment
154
+ }
155
+ }
156
+
157
+ ${fieldDocSubmissionFragment}
158
+ `;
@@ -1,11 +1,17 @@
1
+ export * from './campaignQueries.ts';
2
+ export * from './agentDocQueries.ts';
3
+ export * from './agentMemoryQueries.ts';
1
4
  export * from './aiChatQueries.ts';
2
5
  export * from './appQueries.ts';
6
+ export * from './authQueries.ts';
3
7
  export * from './billingQueries.ts';
8
+ export * from './dataTableQueries.ts';
4
9
  export * from './emailQueries.ts';
10
+ export * from './fieldDocQueries.ts';
5
11
  export * from './inboundContactQueries.ts';
6
12
  export * from './logQueries.ts';
7
13
  export * from './organizationQueries.ts';
8
- export * from './productQueries.ts';
9
- export * from './dataTableQueries.ts';
14
+ export * from './scheduleQueries.ts';
10
15
  export * from './sheetQueries.ts';
16
+ export * from './storageQueries.ts';
11
17
  export * from './workflowQueries.ts';
@@ -1,29 +1,15 @@
1
1
  import { gql } from 'graphql-tag';
2
2
  import { accountFragment } from '../fragments/accountFragments.ts';
3
3
  import {
4
- logEntryFragment,
5
- logArableFragment,
6
- logFarmersMarketFragment,
7
- logGrowerNetworkFragment,
8
- logLivestockFragment
4
+ logEntryDetailsFragment,
5
+ logEntryFragment,
9
6
  } from '../fragments/logFragments.ts';
10
7
  import { storageFileFragment } from '../fragments/storageFragments.ts';
11
8
 
12
9
  export const logEntryFragmentStatement = `...logEntryFragment
13
10
 
14
11
  details {
15
- ...on LogArable {
16
- ...logArableFragment
17
- }
18
- ...on LogFarmersMarket {
19
- ...logFarmersMarketFragment
20
- }
21
- ...on LogGrowerNetwork {
22
- ...logGrowerNetworkFragment
23
- }
24
- ...on LogLivestock {
25
- ...logLivestockFragment
26
- }
12
+ ...logEntryDetailsFragment
27
13
  }
28
14
 
29
15
  account {
@@ -33,10 +19,7 @@ export const logEntryFragmentStatement = `...logEntryFragment
33
19
  export const logEntryFragmentImports = `
34
20
  ${accountFragment}
35
21
  ${logEntryFragment}
36
- ${logArableFragment}
37
- ${logFarmersMarketFragment}
38
- ${logGrowerNetworkFragment}
39
- ${logLivestockFragment}
22
+ ${logEntryDetailsFragment}
40
23
  `;
41
24
 
42
25
  export const logEntryQry = gql`
@@ -89,16 +72,16 @@ ${storageFileFragment}
89
72
  ${logEntryFragmentImports}
90
73
  `;
91
74
 
92
- export const logEntriesForReportQry = gql`
93
- query logEntriesForReport (
75
+ export const logEntriesForFieldDocQry = gql`
76
+ query logEntriesForFieldDoc (
94
77
  $organizationId: GenericID!
95
- $reportSourceId: CursorToIDs!
96
- $reportSubmissionId: GenericID!
78
+ $fieldDocSourceId: CursorToIDs!
79
+ $fieldDocSubmissionId: GenericID!
97
80
  ) {
98
- logEntriesForReport (
81
+ logEntriesForFieldDoc (
99
82
  organizationId: $organizationId
100
- reportSourceId: $reportSourceId
101
- reportSubmissionId: $reportSubmissionId
83
+ fieldDocSourceId: $fieldDocSourceId
84
+ fieldDocSubmissionId: $fieldDocSubmissionId
102
85
  ) {
103
86
  ${logEntryFragmentStatement}
104
87