@jsb188/graphql 1.1.5 → 1.1.6

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.
@@ -3,13 +3,53 @@ export const organizationFragment = `fragment organizationFragment on Organizati
3
3
  id
4
4
  stripeCustomerId
5
5
  name
6
+ commodities
6
7
  operation
8
+
7
9
  dailyDigestTime
8
- domains
10
+ activated
11
+
12
+ address {
13
+ line1
14
+ line2
15
+ city
16
+ state
17
+ postalCode
18
+ country
19
+ }
9
20
 
21
+ features
10
22
  settings {
11
- emoji
12
23
  timeZone
24
+ language
25
+ color
26
+ }
27
+
28
+ directory {
29
+ department
30
+ name
31
+ emailAddress
32
+ phoneNumber
33
+ }
34
+ }`;
35
+
36
+ export const organizationComplianceFragment = `fragment organizationComplianceFragment on OrganizationCompliance {
37
+ id
38
+ number
39
+ name
40
+ type
41
+ expirationDate
42
+ notes
43
+ createdAt
44
+ updatedAt
45
+
46
+ files {
47
+ id
48
+ complianceId
49
+ storageId
50
+ order
51
+ uri
52
+ contentType
13
53
  }
14
54
  }`;
15
55
 
@@ -21,12 +61,31 @@ export const organizationRelationshipFragment = `fragment organizationRelationsh
21
61
  acl {
22
62
  id
23
63
  billing
64
+ compliance
24
65
  digests
66
+ finances
67
+ integrations
25
68
  logs
26
69
  members
27
- finances
70
+ orgManagement
71
+ products
28
72
  settings
29
- integrations
30
- reminders
73
+ viewData
31
74
  }
32
75
  }`;
76
+
77
+ export const organizationChildFragment = `fragment organizationChildFragment on OrganizationChild {
78
+ id
79
+ cursor
80
+ addedAt
81
+ }`;
82
+
83
+ export const organizationInstructionsFragment = `fragment organizationInstructionsFragment on OrganizationInstructions {
84
+ id
85
+ organizationId
86
+ logType
87
+ summary
88
+ instructions
89
+ createdAt
90
+ updatedAt
91
+ }`;
@@ -8,15 +8,17 @@ export const phoneFragment = `fragment phoneFragment on Phone {
8
8
  id
9
9
  number
10
10
  verified
11
- primary
12
11
  }`;
13
12
 
14
- export const alertFragment = `fragment alertFragment on Alert {
13
+ export const addressFragment = `fragment addressFragment on Address {
15
14
  id
16
- relatedId
17
- relatedUserId
18
- type
19
- value
20
- createdAt
21
- updatedAt
15
+ organizationId
16
+ line1
17
+ line2
18
+ city
19
+ state
20
+ postalCode
21
+ country
22
+ createdAt
23
+ updatedAt
22
24
  }`;
@@ -0,0 +1,63 @@
1
+
2
+ export const productFragment = `fragment productFragment on Product {
3
+ id
4
+ organizationId
5
+ cursor
6
+
7
+ metadata {
8
+ overview
9
+ }
10
+
11
+ createdAt
12
+ updatedAt
13
+ }`;
14
+
15
+ export const productCalEventFragment = `fragment productCalEventFragment on ProductCalEvent {
16
+ __typename
17
+
18
+ id
19
+ name
20
+
21
+ schedule {
22
+ frequency
23
+ weeksOfMonth
24
+ daysOfWeek
25
+ time
26
+ }
27
+
28
+ address {
29
+ line1
30
+ line2
31
+ city
32
+ state
33
+ postalCode
34
+ country
35
+ }
36
+
37
+ startAt
38
+ endAt
39
+ }`;
40
+
41
+ export const productAttendanceFragment = `fragment productAttendanceFragment on ProductAttendance {
42
+ id
43
+ productId
44
+ organizationId
45
+ calDate
46
+ attended
47
+ }`;
48
+
49
+ export const productLivestockFragment = `fragment productLivestockFragment on ProductLivestock {
50
+ __typename
51
+
52
+ id
53
+ damIdentifier
54
+ livestockIdentifier
55
+ livestockGroup
56
+
57
+ type
58
+ status
59
+ livestockClass
60
+
61
+ birthDate
62
+ deathDate
63
+ }`;
@@ -0,0 +1,47 @@
1
+
2
+ export const reportFragment = `fragment reportFragment on Report {
3
+ id
4
+ organizationId
5
+
6
+ documentName
7
+ title
8
+ description
9
+ type
10
+ period
11
+ evidencesCount
12
+ gridLayoutStyle
13
+
14
+ activityAt
15
+ }`;
16
+
17
+ export const reportSectionFragment = `fragment reportSectionFragment on ReportSection {
18
+ id
19
+ isGroupTitle
20
+ sectionKey
21
+ sectionName
22
+ title
23
+ description
24
+ }`;
25
+
26
+ export const reportRowDataFragment = `fragment reportRowDataFragment on ReportRowData {
27
+ id
28
+ preset
29
+ className
30
+ isHeader
31
+ }`;
32
+
33
+ export const reportColumnDataFragment = `fragment reportColumnDataFragment on ReportColumnData {
34
+ id
35
+ className
36
+ label
37
+ text
38
+ placeholder
39
+ checked
40
+ }`;
41
+
42
+ export const reportAvailabilityFragment = `fragment reportAvailabilityFragment on ReportAvailability {
43
+ id
44
+ organizationId
45
+ type
46
+ periods
47
+ }`;
@@ -19,3 +19,13 @@ mutation editAccount (
19
19
  }
20
20
  ${accountFragment}
21
21
  `;
22
+
23
+ export const requestChangeEmailMtn = gql`
24
+ mutation requestChangeEmail (
25
+ $emailAddress: String!
26
+ ) {
27
+ requestChangeEmail (
28
+ emailAddress: $emailAddress
29
+ )
30
+ }
31
+ `;
@@ -24,6 +24,17 @@ ${emailFragment}
24
24
  ${phoneFragment}
25
25
  `;
26
26
 
27
+ export const confirmPasswordMtn = gql`
28
+ mutation confirmPassword (
29
+ $password: String!
30
+ ) {
31
+ confirmPassword (
32
+ password: $password
33
+ )
34
+ }
35
+ `;
36
+
37
+
27
38
  export const authenticateWithPasswordMtn = gql`
28
39
  mutation authenticateWithPassword (
29
40
  $identifier: String!
@@ -128,22 +139,6 @@ mutation confirmPhoneVerificationCode (
128
139
  }
129
140
  }`;
130
141
 
131
- export const sendEmailVerificationMtn = gql`
132
- mutation sendEmailVerification (
133
- $userId: UserID!
134
- $email: String!
135
- ) {
136
- sendEmailVerification (
137
- userId: $userId
138
- email: $email
139
- ) {
140
- token
141
- userId
142
- username
143
- emailAddress
144
- }
145
- }`;
146
-
147
142
  export const signUpWithEmailMtn = gql`
148
143
  mutation signUpWithEmail (
149
144
  $emailAddress: String!
@@ -3,5 +3,6 @@ export * from './aiChatMutations';
3
3
  export * from './authMutations';
4
4
  export * from './billingMutations';
5
5
  export * from './logMutations';
6
+ export * from './organizationMutations';
6
7
  export * from './otherMutations';
7
8
  export * from './userAuthMutations';
@@ -1,42 +1,56 @@
1
1
  import { gql } from 'graphql-tag';
2
- import { logEntryFragment, logEntryArableFragment } from '../fragments/logFragments';
2
+ import { logEntryFragment, logArableFragment, logLivestockFragment, logFarmersMarketFragment } from '../fragments/logFragments';
3
3
 
4
4
  export const editLogEntryMtn = gql`
5
5
  mutation editLogEntry (
6
+ $organizationId: GenericID!
6
7
  $logEntryId: GenericID!
7
8
  $accountId: GenericID
8
9
  $date: DateTime
9
10
 
10
- $arableDetails: LogEntryArableInput
11
- $livestockDetails: LogEntryLivestockInput
11
+ $arableDetails: LogArableInput
12
+ $livestockDetails: LogLivestockInput
13
+ $farmersMarketDetails: LogFarmersMarketInput
12
14
  ) {
13
15
  editLogEntry (
16
+ organizationId: $organizationId
14
17
  logEntryId: $logEntryId
15
18
  accountId: $accountId
16
19
  date: $date
17
20
 
18
21
  arableDetails: $arableDetails
19
22
  livestockDetails: $livestockDetails
23
+ farmersMarketDetails: $farmersMarketDetails
20
24
  ) {
21
25
  ...logEntryFragment
22
26
 
23
27
  details {
24
- ...on LogEntryArable {
25
- ...logEntryArableFragment
28
+ ...on LogArable {
29
+ ...logArableFragment
30
+ }
31
+ ...on LogFarmersMarket {
32
+ ...logFarmersMarketFragment
33
+ }
34
+ ...on LogLivestock {
35
+ ...logLivestockFragment
26
36
  }
27
37
  }
28
38
  }
29
39
  }
30
40
 
31
41
  ${logEntryFragment}
32
- ${logEntryArableFragment}
42
+ ${logArableFragment}
43
+ ${logFarmersMarketFragment}
44
+ ${logLivestockFragment}
33
45
  `;
34
46
 
35
47
  export const deleteLogEntryMtn = gql`
36
48
  mutation deleteLogEntry (
49
+ $organizationId: GenericID!
37
50
  $logEntryId: GenericID!
38
51
  ) {
39
52
  deleteLogEntry (
53
+ organizationId: $organizationId
40
54
  logEntryId: $logEntryId
41
55
  )
42
56
  }
@@ -0,0 +1,42 @@
1
+ import { gql } from 'graphql-tag';
2
+ import { organizationFragment } from '../fragments/organizationFragments';
3
+
4
+ export const switchOrganizationMtn = gql`
5
+ mutation switchOrganization (
6
+ $organizationId: GenericID!
7
+ ) {
8
+ switchOrganization (
9
+ organizationId: $organizationId
10
+ )
11
+ }
12
+ `;
13
+
14
+ export const deleteComplianceDocumentMtn = gql`
15
+ mutation deleteComplianceDocument (
16
+ $organizationId: GenericID!
17
+ $complianceId: GenericID!
18
+ ) {
19
+ deleteComplianceDocument (
20
+ organizationId: $organizationId
21
+ complianceId: $complianceId
22
+ )
23
+ }
24
+ `;
25
+
26
+ export const editOrganizationMtn = gql`
27
+ mutation editOrganization (
28
+ $organizationId: GenericID!
29
+ $name: String
30
+ $address: AddressInput
31
+ ) {
32
+ editOrganization (
33
+ organizationId: $organizationId
34
+ name: $name
35
+ address: $address
36
+ ) {
37
+ ...organizationFragment
38
+ }
39
+ }
40
+
41
+ ${organizationFragment}
42
+ `;
@@ -1,5 +1,4 @@
1
1
  import { gql } from 'graphql-tag';
2
- import { alertFragment } from '../fragments/otherFragments';
3
2
 
4
3
  export const prepareFileUploadMtn = gql`
5
4
  mutation prepareFileUpload (
@@ -28,19 +27,3 @@ mutation finishFileUpload (
28
27
  }
29
28
  }
30
29
  `;
31
-
32
- export const alertCallToActionMtn = gql`
33
- mutation alertCallToAction (
34
- $alertId: GenericID!
35
- $approve: Boolean!
36
- ) {
37
- alertCallToAction (
38
- alertId: $alertId
39
- approve: $approve
40
- ) {
41
- ...alertFragment
42
- }
43
- }
44
-
45
- ${alertFragment}
46
- `;
@@ -6,18 +6,6 @@ mutation signOut {
6
6
  }
7
7
  `;
8
8
 
9
- export const updateAppSettingsMtn = gql`
10
- mutation updateAppSettings (
11
- $stickySection: StickySection
12
- ) {
13
- updateAppSettings (
14
- stickySection: $stickySection
15
- ) {
16
- stickySection
17
- }
18
- }
19
- `;
20
-
21
9
  export const consumeTokenMtn = gql`
22
10
  mutation consumeToken (
23
11
  $token: Token!
@@ -10,6 +10,7 @@ query aiChat (
10
10
  aiChatId: $aiChatId
11
11
  ) {
12
12
  cursor
13
+ inProgress
13
14
  ...aiChatFragment
14
15
 
15
16
  messages (
@@ -46,12 +47,14 @@ ${aiChatMessageFragment}
46
47
 
47
48
  export const aiChatsQry = gql`
48
49
  query aiChats (
50
+ $organizationId: GenericID!
49
51
  $filter: AIChatsFilter
50
52
  $cursor: Cursor
51
53
  $after: Boolean!
52
54
  $limit: Int!
53
55
  ) {
54
56
  aiChats (
57
+ organizationId: $organizationId
55
58
  filter: $filter
56
59
  cursor: $cursor
57
60
  after: $after
@@ -0,0 +1,6 @@
1
+ export * from './aiChatQueries';
2
+ export * from './appQueries';
3
+ export * from './billingQueries';
4
+ export * from './logQueries';
5
+ export * from './organizationQueries';
6
+ export * from './productQueries';
@@ -1,11 +1,39 @@
1
1
  import { gql } from 'graphql-tag';
2
2
  import { accountFragment } from '../fragments/accountFragments';
3
- import { logEntryFragment, logEntryArableFragment } from '../fragments/logFragments';
3
+ import { logEntryFragment, logArableFragment, logLivestockFragment, logFarmersMarketFragment } from '../fragments/logFragments';
4
+ import { actionTaskFragment } from '../fragments/actionFragments';
5
+
6
+ export const logEntryFragmentStatement = `...logEntryFragment
7
+
8
+ details {
9
+ ...on LogArable {
10
+ ...logArableFragment
11
+ }
12
+ ...on LogFarmersMarket {
13
+ ...logFarmersMarketFragment
14
+ }
15
+ ...on LogLivestock {
16
+ ...logLivestockFragment
17
+ }
18
+ }
19
+
20
+ account {
21
+ ...accountFragment
22
+ }`;
23
+
24
+ export const logEntryFragmentImports = `
25
+ ${accountFragment}
26
+ ${logEntryFragment}
27
+ ${logArableFragment}
28
+ ${logFarmersMarketFragment}
29
+ ${logLivestockFragment}
30
+ `;
4
31
 
5
32
  export const logEntriesQry = gql`
6
33
  query logEntries (
7
34
  $organizationId: GenericID!
8
35
  $filter: LogEntriesFilter!
36
+ $sort: LogEntriesSort
9
37
  $cursor: Cursor
10
38
  $after: Boolean!
11
39
  $limit: Int!
@@ -13,25 +41,46 @@ query logEntries (
13
41
  logEntries (
14
42
  organizationId: $organizationId
15
43
  filter: $filter
44
+ sort: $sort
16
45
  cursor: $cursor
17
46
  after: $after
18
47
  limit: $limit
19
48
  ) {
20
- ...logEntryFragment
49
+ ${logEntryFragmentStatement}
21
50
 
22
- details {
23
- ...on LogEntryArable {
24
- ...logEntryArableFragment
25
- }
51
+ actions {
52
+ ...actionTaskFragment
26
53
  }
54
+ }
55
+ }
27
56
 
28
- account {
29
- ...accountFragment
57
+ ${actionTaskFragment}
58
+ ${logEntryFragmentImports}
59
+ `;
60
+
61
+ export const logEvidencesQry = gql`
62
+ query logEvidences (
63
+ $organizationId: GenericID!
64
+ $reportId: CursorToID!
65
+ $cursor: Cursor
66
+ $after: Boolean!
67
+ $limit: Int!
68
+ ) {
69
+ logEvidences (
70
+ organizationId: $organizationId
71
+ reportId: $reportId
72
+ cursor: $cursor
73
+ after: $after
74
+ limit: $limit
75
+ ) {
76
+ ${logEntryFragmentStatement}
77
+
78
+ actions {
79
+ ...actionTaskFragment
30
80
  }
31
81
  }
32
82
  }
33
83
 
34
- ${accountFragment}
35
- ${logEntryFragment}
36
- ${logEntryArableFragment}
84
+ ${actionTaskFragment}
85
+ ${logEntryFragmentImports}
37
86
  `;
@@ -1,5 +1,5 @@
1
1
  import { gql } from 'graphql-tag';
2
- import { organizationFragment, organizationRelationshipFragment } from '../fragments/organizationFragments';
2
+ import { organizationChildFragment, organizationComplianceFragment, organizationFragment, organizationInstructionsFragment, organizationRelationshipFragment } from '../fragments/organizationFragments';
3
3
 
4
4
  // Always use organizationRelationship() instead
5
5
 
@@ -29,11 +29,16 @@ query organizationRelationship (
29
29
  organization {
30
30
  ...organizationFragment
31
31
  membersCount
32
+
33
+ compliance {
34
+ ...organizationComplianceFragment
35
+ }
32
36
  }
33
37
  }
34
38
  }
35
39
 
36
40
  ${organizationFragment}
41
+ ${organizationComplianceFragment}
37
42
  ${organizationRelationshipFragment}
38
43
  `;
39
44
 
@@ -44,10 +49,65 @@ query myOrganizations {
44
49
 
45
50
  organization {
46
51
  ...organizationFragment
52
+ membersCount
53
+
54
+ compliance {
55
+ ...organizationComplianceFragment
56
+ }
47
57
  }
48
58
  }
49
59
  }
50
60
 
51
61
  ${organizationFragment}
62
+ ${organizationComplianceFragment}
52
63
  ${organizationRelationshipFragment}
53
64
  `;
65
+
66
+ export const childOrganizationsQry = gql`
67
+ query childOrganizations (
68
+ $organizationId: GenericID!
69
+ $filter: ChildOrgsFilter
70
+ $cursor: Cursor
71
+ $after: Boolean!
72
+ $limit: Int!
73
+ ) {
74
+ childOrganizations (
75
+ organizationId: $organizationId
76
+ filter: $filter
77
+ cursor: $cursor
78
+ after: $after
79
+ limit: $limit
80
+ ) {
81
+ ...organizationChildFragment
82
+
83
+ organization {
84
+ ...organizationFragment
85
+ membersCount
86
+
87
+ compliance {
88
+ ...organizationComplianceFragment
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ ${organizationChildFragment}
95
+ ${organizationFragment}
96
+ ${organizationComplianceFragment}
97
+ `;
98
+
99
+ export const organizationWorkflowsQry = gql`
100
+ query organizationWorkflows (
101
+ $organizationId: GenericID!
102
+ $operation: OrganizationOperation!
103
+ ) {
104
+ organizationWorkflows (
105
+ organizationId: $organizationId
106
+ operation: $operation
107
+ ) {
108
+ ...organizationInstructionsFragment
109
+ }
110
+ }
111
+
112
+ ${organizationInstructionsFragment}
113
+ `;