@faststore/core 3.64.0 → 3.65.0

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 (166) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +49 -49
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/react-loadable-manifest.json +3 -2
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/2778.js +1 -1
  14. package/.next/server/chunks/4365.js +1 -0
  15. package/.next/server/chunks/5244.js +1 -0
  16. package/.next/server/chunks/6011.js +2 -2
  17. package/.next/server/chunks/6886.js +1 -1
  18. package/.next/server/chunks/7692.js +1 -1
  19. package/.next/server/chunks/{7819.js → 8130.js} +1 -6
  20. package/.next/server/chunks/83.js +1 -1
  21. package/.next/server/chunks/{1650.js → 8404.js} +1 -6
  22. package/.next/server/chunks/948.js +2 -2
  23. package/.next/server/chunks/9563.js +2 -2
  24. package/.next/server/functions-config-manifest.json +1 -1
  25. package/.next/server/middleware-build-manifest.js +1 -1
  26. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  27. package/.next/server/pages/404.js.nft.json +1 -1
  28. package/.next/server/pages/500.js.nft.json +1 -1
  29. package/.next/server/pages/[...slug].js +1 -1
  30. package/.next/server/pages/[...slug].js.nft.json +1 -1
  31. package/.next/server/pages/[slug]/p.js +1 -1
  32. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  33. package/.next/server/pages/_app.js.nft.json +1 -1
  34. package/.next/server/pages/_document.js.nft.json +1 -1
  35. package/.next/server/pages/_error.js.nft.json +1 -1
  36. package/.next/server/pages/account/403.js +1 -1
  37. package/.next/server/pages/account/403.js.nft.json +1 -1
  38. package/.next/server/pages/account/404.js +1 -1
  39. package/.next/server/pages/account/404.js.nft.json +1 -1
  40. package/.next/server/pages/account/[...unknown].js.nft.json +1 -1
  41. package/.next/server/pages/account/orders/[id].js +1 -1
  42. package/.next/server/pages/account/orders/[id].js.nft.json +1 -1
  43. package/.next/server/pages/account/orders.js +1 -1
  44. package/.next/server/pages/account/orders.js.nft.json +1 -1
  45. package/.next/server/pages/account/profile.js +1 -1
  46. package/.next/server/pages/account/profile.js.nft.json +1 -1
  47. package/.next/server/pages/account/security.js +1 -1
  48. package/.next/server/pages/account/security.js.nft.json +1 -1
  49. package/.next/server/pages/account/user-details.js +1 -1
  50. package/.next/server/pages/account/user-details.js.nft.json +1 -1
  51. package/.next/server/pages/account.js +1 -1
  52. package/.next/server/pages/account.js.nft.json +1 -1
  53. package/.next/server/pages/api/graphql.js +2 -2
  54. package/.next/server/pages/api/graphql.js.nft.json +1 -1
  55. package/.next/server/pages/api/health/live.js.nft.json +1 -1
  56. package/.next/server/pages/api/health/ready.js.nft.json +1 -1
  57. package/.next/server/pages/api/preview.js.nft.json +1 -1
  58. package/.next/server/pages/checkout.js.nft.json +1 -1
  59. package/.next/server/pages/en-US/404.html +2 -2
  60. package/.next/server/pages/en-US/500.html +2 -2
  61. package/.next/server/pages/en-US/checkout.html +2 -2
  62. package/.next/server/pages/en-US/login.html +2 -2
  63. package/.next/server/pages/en-US/s.html +2 -2
  64. package/.next/server/pages/en-US.html +2 -2
  65. package/.next/server/pages/index.js.nft.json +1 -1
  66. package/.next/server/pages/login.js.nft.json +1 -1
  67. package/.next/server/pages/s.js.nft.json +1 -1
  68. package/.next/server/pages-manifest.json +1 -1
  69. package/.next/static/chunks/{4803.82e70544e5ad3f13.js → 4803.de5b14237d616808.js} +1 -1
  70. package/.next/static/chunks/4949.ea0775ca3029fb98.js +1 -0
  71. package/.next/static/chunks/{7692.a2ae6dca22038761.js → 7692.1597d1d292a09609.js} +1 -1
  72. package/.next/static/chunks/7861.3fe27a385fea2fb7.js +6 -0
  73. package/.next/static/chunks/9173-c1819846b9006c7a.js +1 -0
  74. package/.next/static/chunks/941.80a0abd58f11d696.js +1 -0
  75. package/.next/static/chunks/pages/{[...slug]-72047653203f9fd2.js → [...slug]-0db18c1c0920e8d2.js} +1 -1
  76. package/.next/static/chunks/pages/_app-1c533ab202b7acef.js +1 -0
  77. package/.next/static/chunks/pages/account/403-c791997011f970b6.js +1 -0
  78. package/.next/static/chunks/pages/account/404-74e64bb12e8f5a68.js +1 -0
  79. package/.next/static/chunks/pages/account/orders/[id]-b9feb0c860ff1cec.js +1 -0
  80. package/.next/static/chunks/pages/account/orders-1d8409a8b4b0e581.js +1 -0
  81. package/.next/static/chunks/pages/account/profile-5a919fa02b76a422.js +1 -0
  82. package/.next/static/chunks/pages/account/security-b5ab3d1ecbbea9d9.js +1 -0
  83. package/.next/static/chunks/pages/account/user-details-6f9fe72e02f5c5df.js +1 -0
  84. package/.next/static/chunks/webpack-a24b8ac1ca628dfe.js +1 -0
  85. package/.next/static/css/32b1696118552960.css +1 -0
  86. package/.next/static/css/{84d35f475d0dc928.css → 831a1f72fe4b2d80.css} +1 -1
  87. package/.next/static/css/ba1d8927d8745656.css +1 -0
  88. package/.next/static/css/e46393a76c5d93a9.css +1 -0
  89. package/.next/static/czdZM7l3yYhwzU9FTEtWh/_buildManifest.js +1 -0
  90. package/.next/trace +131 -129
  91. package/.turbo/turbo-build.log +24 -21
  92. package/.turbo/turbo-test.log +5 -5
  93. package/@generated/gql.ts +14 -6
  94. package/@generated/graphql.ts +372 -5
  95. package/@generated/persisted-documents.json +4 -3
  96. package/@generated/schema.graphql +249 -0
  97. package/CHANGELOG.md +12 -0
  98. package/package.json +6 -4
  99. package/public/icons.svg +26 -0
  100. package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +3 -1
  101. package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerBody.tsx +12 -2
  102. package/src/components/account/MyAccountDrawer/OrganizationSignInButton/OrganizationSignInButton.tsx +7 -1
  103. package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +12 -2
  104. package/src/components/account/MyAccountMenu/styles.scss +1 -1
  105. package/src/components/account/MyAccountUserDetails/MyAccountUserDetails.tsx +61 -0
  106. package/src/components/account/MyAccountUserDetails/index.ts +1 -0
  107. package/src/components/account/MyAccountUserDetails/styles.module.scss +108 -0
  108. package/src/components/account/components/MyAccountTag/MyAccountTag.tsx +13 -0
  109. package/src/components/account/components/MyAccountTag/index.ts +1 -0
  110. package/src/components/account/components/MyAccountTag/styles.scss +23 -0
  111. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +5 -5
  112. package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/MyAccountSelectedTags.tsx +16 -4
  113. package/src/components/account/orders/MyAccountOrderDetails/MyAccountBuyingPolicyAlert/MyAccountBuyingPolicyAlert.tsx +153 -0
  114. package/src/components/account/orders/MyAccountOrderDetails/MyAccountBuyingPolicyAlert/index.ts +1 -0
  115. package/src/components/account/orders/MyAccountOrderDetails/MyAccountBuyingPolicyAlert/styles.scss +72 -0
  116. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/MyAccountOrderActionModal.tsx +41 -88
  117. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/index.ts +0 -1
  118. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/styles.module.scss +29 -16
  119. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +54 -107
  120. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/styles.scss +5 -28
  121. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +16 -3
  122. package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/MyAccountPaymentCard.tsx +1 -3
  123. package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +13 -2
  124. package/src/components/account/profile/i18n.ts +7 -0
  125. package/src/components/account/profile/index.ts +1 -0
  126. package/src/components/account/profile/profile.module.scss +89 -0
  127. package/src/components/account/profile/profile.tsx +63 -0
  128. package/src/components/account/profile/use-date-formatter.ts +25 -0
  129. package/src/components/account/security/SecurityDrawer.tsx +160 -0
  130. package/src/components/account/security/SecuritySection.tsx +45 -0
  131. package/src/components/account/security/index.ts +2 -0
  132. package/src/components/account/security/styles.module.scss +263 -0
  133. package/src/components/navigation/Navbar/Navbar.tsx +4 -1
  134. package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +4 -1
  135. package/src/experimental/myAccountSeverSideProps.ts +9 -0
  136. package/src/pages/account/orders/[id].tsx +61 -5
  137. package/src/pages/account/orders/index.tsx +14 -2
  138. package/src/pages/account/profile.tsx +31 -5
  139. package/src/pages/account/security.tsx +15 -4
  140. package/src/pages/account/user-details.tsx +54 -17
  141. package/src/sdk/account/getIsRepresentative.ts +20 -0
  142. package/src/sdk/account/getMyAccountRoutes.ts +17 -13
  143. package/src/sdk/account/useOrderAuthorization.ts +79 -0
  144. package/src/utils/getCookie.ts +7 -0
  145. package/src/utils/userOrderStatus.ts +4 -0
  146. package/test/server/index.test.ts +3 -0
  147. package/.next/server/chunks/2570.js +0 -1
  148. package/.next/server/chunks/941.js +0 -1
  149. package/.next/static/_fNL5rUsrvwdHfkRr9RdO/_buildManifest.js +0 -1
  150. package/.next/static/chunks/4949.58cc42cd6109f59a.js +0 -6
  151. package/.next/static/chunks/9173-94386b70c1626a31.js +0 -1
  152. package/.next/static/chunks/941.6fb7ccae2268ce5d.js +0 -1
  153. package/.next/static/chunks/pages/_app-c3dce4c45c6c6b35.js +0 -1
  154. package/.next/static/chunks/pages/account/403-6f4addf9a9d54a1c.js +0 -1
  155. package/.next/static/chunks/pages/account/404-9e8ca6ee5f981dae.js +0 -1
  156. package/.next/static/chunks/pages/account/orders/[id]-0780c7252aa3283f.js +0 -1
  157. package/.next/static/chunks/pages/account/orders-6aad8b35fc95ce57.js +0 -1
  158. package/.next/static/chunks/pages/account/profile-adfe3518bdab5463.js +0 -1
  159. package/.next/static/chunks/pages/account/security-ea5c8811b3e6e415.js +0 -1
  160. package/.next/static/chunks/pages/account/user-details-9309d14f4e59f398.js +0 -1
  161. package/.next/static/chunks/webpack-c76f1cac87402029.js +0 -1
  162. package/.next/static/css/506442c818624bd2.css +0 -1
  163. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/useOrderActionModal.ts +0 -38
  164. package/src/sdk/account/useApproveOrder.ts +0 -53
  165. package/src/sdk/account/useRejectOrder.ts +0 -53
  166. /package/.next/static/{_fNL5rUsrvwdHfkRr9RdO → czdZM7l3yYhwzU9FTEtWh}/_ssgManifest.js +0 -0
@@ -144,6 +144,189 @@ export type AvailableDeliveryWindows = {
144
144
  tax: Maybe<Scalars['Int']['output']>
145
145
  }
146
146
 
147
+ /** Commercial Authorization dimension status. */
148
+ export type CommercialAuthorizationDimensionStatus = {
149
+ /** Creation date. */
150
+ creationDate: Scalars['String']['output']
151
+ /** Creation environment. */
152
+ creationEnvironment: Scalars['String']['output']
153
+ /** Creation version. */
154
+ creationVersion: Scalars['String']['output']
155
+ /** Dimension status ID. */
156
+ id: Scalars['String']['output']
157
+ /** Dimension status name. */
158
+ name: Scalars['String']['output']
159
+ /** Priority level. */
160
+ priority: Scalars['Int']['output']
161
+ /** Indicates if all rules acceptance is required. */
162
+ requireAllRulesAcceptance: Scalars['Boolean']['output']
163
+ /** Collection of rules for this dimension. */
164
+ ruleCollection: Array<CommercialAuthorizationRule>
165
+ /** Dimension score. */
166
+ score: Scalars['Float']['output']
167
+ /** Indicates if simulation should be performed. */
168
+ shouldSimulate: Scalars['Boolean']['output']
169
+ /** Current status of the dimension. */
170
+ status: CommercialAuthorizationStatus
171
+ /** Unit ID, if applicable. */
172
+ unitId: Maybe<Scalars['String']['output']>
173
+ }
174
+
175
+ /** Commercial Authorization item. */
176
+ export type CommercialAuthorizationItem = {
177
+ /** Additional information as key-value pairs. */
178
+ additionalInfo: Scalars['JSONObject']['output']
179
+ /** Item ID. */
180
+ id: Scalars['String']['output']
181
+ /** Item price. */
182
+ price: Scalars['Float']['output']
183
+ /** Item quantity. */
184
+ quantity: Scalars['Int']['output']
185
+ /** Item SKU. */
186
+ sku: Scalars['String']['output']
187
+ /** Total manual discount applied. */
188
+ totalManualDiscount: Scalars['Float']['output']
189
+ /** Total system discount applied. */
190
+ totalSystemDiscount: Scalars['Float']['output']
191
+ }
192
+
193
+ /** Commercial Authorization response. */
194
+ export type CommercialAuthorizationResponse = {
195
+ /** Additional information as key-value pairs. */
196
+ additionalInfo: Scalars['JSONObject']['output']
197
+ /** Callback endpoint URL. */
198
+ callbackEndpoint: Scalars['String']['output']
199
+ /** Creation environment. */
200
+ creationEnvironment: Scalars['String']['output']
201
+ /** Creation version. */
202
+ creationVersion: Scalars['String']['output']
203
+ /** Dimension status information. */
204
+ dimensionStatus: Array<CommercialAuthorizationDimensionStatus>
205
+ /** Commercial Authorization ID. */
206
+ id: Scalars['String']['output']
207
+ /** Collection of items in the commercial authorization. */
208
+ itemCollection: Array<CommercialAuthorizationItem>
209
+ /** Marketplace payment value. */
210
+ marketPlacePaymentValue: Scalars['Float']['output']
211
+ /** Order ID associated with the commercial authorization. */
212
+ orderId: Scalars['String']['output']
213
+ /** Current status of the commercial authorization. */
214
+ status: CommercialAuthorizationStatus
215
+ /** Total order value desired by the seller. */
216
+ totalOrderValueDesiredBySeller: Scalars['Float']['output']
217
+ /** List of units. */
218
+ units: Array<Scalars['String']['output']>
219
+ /** User profile ID. */
220
+ userProfileId: Scalars['String']['output']
221
+ /** Workflow instance ID. */
222
+ workflowInstanceId: Scalars['String']['output']
223
+ }
224
+
225
+ /** Commercial Authorization rule. */
226
+ export type CommercialAuthorizationRule = {
227
+ /** Authorization data, if available. */
228
+ authorizationData: Maybe<CommercialAuthorizationRuleAuthorizationData>
229
+ /** List of authorized email addresses. */
230
+ authorizedEmails: Array<Scalars['String']['output']>
231
+ /** DO ID, if applicable. */
232
+ doId: Maybe<Scalars['String']['output']>
233
+ /** Rule ID. */
234
+ id: Scalars['String']['output']
235
+ /**
236
+ * Indicates that the user is listed as one of the possible approvers,
237
+ * but does not necessarily mean that he or she is the next in the chain to approve.
238
+ */
239
+ isUserAuthorized: Scalars['Boolean']['output']
240
+ /**
241
+ * Indicates that the user is next in the approval chain.
242
+ * This means that they must take an approval or rejection action.
243
+ */
244
+ isUserNextAuthorizer: Scalars['Boolean']['output']
245
+ /** Rule name. */
246
+ name: Scalars['String']['output']
247
+ /** Indicates if notification is enabled. */
248
+ notification: Scalars['Boolean']['output']
249
+ /** Rule priority. */
250
+ priority: Scalars['Int']['output']
251
+ /** Score interval configuration. */
252
+ scoreInterval: CommercialAuthorizationRuleScoreInterval
253
+ /** Current status of the rule. */
254
+ status: CommercialAuthorizationStatus
255
+ /** Timeout value. */
256
+ timeout: Scalars['Int']['output']
257
+ /** Rule trigger configuration. */
258
+ trigger: CommercialAuthorizationRuleTrigger
259
+ }
260
+
261
+ /** Commercial Authorization rule authorization data. */
262
+ export type CommercialAuthorizationRuleAuthorizationData = {
263
+ /** List of authorizers. */
264
+ authorizers: Array<CommercialAuthorizationRuleAuthorizer>
265
+ /** Indicates if all approvals are required. */
266
+ requireAllApprovals: Scalars['Boolean']['output']
267
+ }
268
+
269
+ /** Commercial Authorization rule authorizer. */
270
+ export type CommercialAuthorizationRuleAuthorizer = {
271
+ /** Authorization date. */
272
+ authorizationDate: Maybe<Scalars['String']['output']>
273
+ /** Authorizer email. */
274
+ email: Maybe<Scalars['String']['output']>
275
+ /** Authorizer ID. */
276
+ id: Scalars['String']['output']
277
+ /** Authorizer type. */
278
+ type: Scalars['String']['output']
279
+ }
280
+
281
+ /** Commercial Authorization rule score interval. */
282
+ export type CommercialAuthorizationRuleScoreInterval = {
283
+ /** Accept score threshold. */
284
+ accept: Scalars['Float']['output']
285
+ /** Deny score threshold. */
286
+ deny: Scalars['Float']['output']
287
+ }
288
+
289
+ /** Commercial Authorization rule trigger. */
290
+ export type CommercialAuthorizationRuleTrigger = {
291
+ /** Trigger condition. */
292
+ condition: CommercialAuthorizationRuleTriggerCondition
293
+ /** Trigger effect. */
294
+ effect: CommercialAuthorizationRuleTriggerEffect
295
+ }
296
+
297
+ /** Commercial Authorization rule trigger condition. */
298
+ export type CommercialAuthorizationRuleTriggerCondition = {
299
+ /** Condition type. */
300
+ conditionType: Scalars['Int']['output']
301
+ /** Condition description. */
302
+ description: Maybe<Scalars['String']['output']>
303
+ /** Condition expression. */
304
+ expression: Maybe<Scalars['String']['output']>
305
+ /** Greater than value. */
306
+ greatherThan: Maybe<Scalars['Float']['output']>
307
+ /** Less than value. */
308
+ lessThan: Maybe<Scalars['Float']['output']>
309
+ }
310
+
311
+ /** Commercial Authorization rule trigger effect. */
312
+ export type CommercialAuthorizationRuleTriggerEffect = {
313
+ /** Effect description. */
314
+ description: Maybe<Scalars['String']['output']>
315
+ /** Effect type. */
316
+ effectType: Scalars['Int']['output']
317
+ /** Function path. */
318
+ funcPath: Maybe<Scalars['String']['output']>
319
+ }
320
+
321
+ /** Commercial Authorization status. */
322
+ export type CommercialAuthorizationStatus =
323
+ /** Authorization has been accepted. */
324
+ | 'accepted'
325
+ /** Authorization has been denied. */
326
+ | 'denied'
327
+ /** Authorization is pending. */
328
+ | 'pending'
329
+
147
330
  export type DeliveryIds = {
148
331
  /** DeliveryIds courier id */
149
332
  courierId: Maybe<Scalars['String']['output']>
@@ -157,6 +340,12 @@ export type DeliveryIds = {
157
340
  warehouseId: Maybe<Scalars['String']['output']>
158
341
  }
159
342
 
343
+ /** Input to get commercial authorizations by order ID. */
344
+ export type ICommercialAuthorizationByOrderId = {
345
+ /** Order ID to get commercial authorizations for. */
346
+ orderId: Scalars['String']['input']
347
+ }
348
+
160
349
  export type IGeoCoordinates = {
161
350
  /** The latitude of the geographic coordinates. */
162
351
  latitude: Scalars['Float']['input']
@@ -172,6 +361,18 @@ export type IPersonNewsletter = {
172
361
  name: Scalars['String']['input']
173
362
  }
174
363
 
364
+ /** Input to process order authorization (approve or reject). */
365
+ export type IProcessOrderAuthorization = {
366
+ /** Whether the authorization is approved (true) or rejected (false). */
367
+ approved: Scalars['Boolean']['input']
368
+ /** Dimension ID associated with the authorization. */
369
+ dimensionId: Scalars['String']['input']
370
+ /** Order authorization ID. */
371
+ orderAuthorizationId: Scalars['String']['input']
372
+ /** Rule ID associated with the authorization. */
373
+ ruleId: Scalars['String']['input']
374
+ }
375
+
175
376
  /** Shipping Simulation item input. */
176
377
  export type IShippingItem = {
177
378
  /** ShippingItem ID / Sku. */
@@ -422,6 +623,8 @@ export type MessageInfo = {
422
623
  export type Mutation = {
423
624
  /** Cancels user order */
424
625
  cancelOrder: Maybe<UserOrderCancel>
626
+ /** Process Order Authorization */
627
+ processOrderAuthorization: Maybe<ProcessOrderAuthorizationResponse>
425
628
  /** Subscribes a new person to the newsletter list. */
426
629
  subscribeToNewsletter: Maybe<PersonNewsletter>
427
630
  /** Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns `null`. */
@@ -434,6 +637,10 @@ export type MutationCancelOrderArgs = {
434
637
  data: IUserOrderCancel
435
638
  }
436
639
 
640
+ export type MutationProcessOrderAuthorizationArgs = {
641
+ data: IProcessOrderAuthorization
642
+ }
643
+
437
644
  export type MutationSubscribeToNewsletterArgs = {
438
645
  data: IPersonNewsletter
439
646
  }
@@ -496,6 +703,24 @@ export type PickupStoreInfo = {
496
703
  isPickupStore: Maybe<Scalars['Boolean']['output']>
497
704
  }
498
705
 
706
+ /** Process Order Authorization response. */
707
+ export type ProcessOrderAuthorizationResponse = {
708
+ /** Indicates if authorization is pending for other authorizers. */
709
+ isPendingForOtherAuthorizer: Scalars['Boolean']['output']
710
+ /** The updated rule for authorization, if any. */
711
+ ruleForAuthorization: Maybe<ProcessOrderAuthorizationRule>
712
+ }
713
+
714
+ /** Extended Commercial Authorization rule with additional process context. */
715
+ export type ProcessOrderAuthorizationRule = {
716
+ /** Dimension ID. */
717
+ dimensionId: Scalars['String']['output']
718
+ /** Order authorization ID. */
719
+ orderAuthorizationId: Scalars['String']['output']
720
+ /** Base rule information. */
721
+ rule: CommercialAuthorizationRule
722
+ }
723
+
499
724
  export type ProductCountResult = {
500
725
  /** Total product count. */
501
726
  total: Scalars['Int']['output']
@@ -538,6 +763,8 @@ export type ProfileAddress = {
538
763
  export type Query = {
539
764
  /** Returns the account name of the current user or the B2B contract name if applicable. */
540
765
  accountName: Maybe<Scalars['String']['output']>
766
+ /** Returns the account profile information for the current authenticated user (b2b or b2c user). */
767
+ accountProfile: StoreAccountProfile
541
768
  /** Returns information about all collections. */
542
769
  allCollections: StoreCollectionConnection
543
770
  /** Returns information about all products. */
@@ -560,6 +787,8 @@ export type Query = {
560
787
  sellers: Maybe<SellersData>
561
788
  /** Returns information about shipping simulation. */
562
789
  shipping: Maybe<ShippingData>
790
+ /** Returns information about the current user details. */
791
+ userDetails: StoreUserDetails
563
792
  /** Returns information about the Details of an User Order. */
564
793
  userOrder: Maybe<UserOrderResult>
565
794
  /** Returns information about the user validation. */
@@ -741,6 +970,13 @@ export type SkuVariantsSlugsMapArgs = {
741
970
  dominantVariantName: InputMaybe<Scalars['String']['input']>
742
971
  }
743
972
 
973
+ /** Account profile information. */
974
+ export type StoreAccountProfile = {
975
+ email: Maybe<Scalars['String']['output']>
976
+ id: Maybe<Scalars['String']['output']>
977
+ name: Maybe<Scalars['String']['output']>
978
+ }
979
+
744
980
  /** Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers. */
745
981
  export type StoreAggregateOffer = {
746
982
  /** Highest price among all sellers. */
@@ -1264,12 +1500,25 @@ export type StoreSuggestions = {
1264
1500
  terms: Array<StoreSuggestionTerm>
1265
1501
  }
1266
1502
 
1503
+ /** User details information. */
1504
+ export type StoreUserDetails = {
1505
+ /** User's email. */
1506
+ email: Maybe<Scalars['String']['output']>
1507
+ /** User's name. */
1508
+ name: Maybe<Scalars['String']['output']>
1509
+ /** User's organizational unit. */
1510
+ orgUnit: Maybe<Scalars['String']['output']>
1511
+ /** User's role. */
1512
+ role: Maybe<Array<Maybe<Scalars['String']['output']>>>
1513
+ }
1514
+
1267
1515
  export type UserOrder = {
1268
1516
  affiliateId: Maybe<Scalars['String']['output']>
1269
1517
  allowCancellation: Maybe<Scalars['Boolean']['output']>
1270
1518
  allowEdition: Maybe<Scalars['Boolean']['output']>
1271
1519
  authorizedDate: Maybe<Scalars['String']['output']>
1272
1520
  callCenterOperatorData: Maybe<Scalars['String']['output']>
1521
+ canProcessOrderAuthorization: Maybe<Scalars['Boolean']['output']>
1273
1522
  cancelReason: Maybe<Scalars['String']['output']>
1274
1523
  cancellationData: Maybe<UserOrderCancellationData>
1275
1524
  cancellationRequests: Maybe<Array<Maybe<UserOrderCancellationRequest>>>
@@ -1308,6 +1557,7 @@ export type UserOrder = {
1308
1557
  paymentData: Maybe<UserOrderPaymentData>
1309
1558
  ratesAndBenefitsData: Maybe<UserOrderRatesAndBenefitsData>
1310
1559
  roundingError: Maybe<Scalars['Int']['output']>
1560
+ ruleForAuthorization: Maybe<ProcessOrderAuthorizationRule>
1311
1561
  salesChannel: Maybe<Scalars['String']['output']>
1312
1562
  sellerOrderId: Maybe<Scalars['String']['output']>
1313
1563
  sellers: Maybe<Array<Maybe<UserOrderStoreSellers>>>
@@ -1918,6 +2168,7 @@ export type UserOrderRestitutions = {
1918
2168
 
1919
2169
  export type UserOrderResult = {
1920
2170
  allowCancellation: Maybe<Scalars['Boolean']['output']>
2171
+ canProcessOrderAuthorization: Maybe<Scalars['Boolean']['output']>
1921
2172
  clientProfileData: Maybe<UserOrderClientProfileData>
1922
2173
  customData: Maybe<UserOrderCustomData>
1923
2174
  customFields: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>
@@ -1925,6 +2176,7 @@ export type UserOrderResult = {
1925
2176
  items: Maybe<Array<Maybe<UserOrderItems>>>
1926
2177
  orderId: Maybe<Scalars['String']['output']>
1927
2178
  paymentData: Maybe<UserOrderPaymentData>
2179
+ ruleForAuthorization: Maybe<ProcessOrderAuthorizationRule>
1928
2180
  shippingData: Maybe<UserOrderShippingData>
1929
2181
  status: Maybe<Scalars['String']['output']>
1930
2182
  statusDescription: Maybe<Scalars['String']['output']>
@@ -2276,8 +2528,49 @@ export type ServerOrderDetailsQueryQuery = {
2276
2528
  userOrder: {
2277
2529
  orderId: string | null
2278
2530
  status: string | null
2531
+ canProcessOrderAuthorization: boolean | null
2279
2532
  statusDescription: string | null
2280
2533
  allowCancellation: boolean | null
2534
+ ruleForAuthorization: {
2535
+ orderAuthorizationId: string
2536
+ dimensionId: string
2537
+ rule: {
2538
+ id: string
2539
+ name: string
2540
+ status: CommercialAuthorizationStatus
2541
+ doId: string | null
2542
+ authorizedEmails: Array<string>
2543
+ priority: number
2544
+ timeout: number
2545
+ notification: boolean
2546
+ isUserAuthorized: boolean
2547
+ isUserNextAuthorizer: boolean
2548
+ trigger: {
2549
+ condition: {
2550
+ conditionType: number
2551
+ description: string | null
2552
+ lessThan: number | null
2553
+ greatherThan: number | null
2554
+ expression: string | null
2555
+ }
2556
+ effect: {
2557
+ description: string | null
2558
+ effectType: number
2559
+ funcPath: string | null
2560
+ }
2561
+ }
2562
+ scoreInterval: { accept: number; deny: number }
2563
+ authorizationData: {
2564
+ requireAllApprovals: boolean
2565
+ authorizers: Array<{
2566
+ id: string
2567
+ email: string | null
2568
+ type: string
2569
+ authorizationDate: string | null
2570
+ }>
2571
+ } | null
2572
+ }
2573
+ } | null
2281
2574
  storePreferencesData: { currencyCode: string | null } | null
2282
2575
  clientProfileData: {
2283
2576
  firstName: string | null
@@ -2450,7 +2743,14 @@ export type ServerListOrdersQueryQuery = {
2450
2743
 
2451
2744
  export type ServerProfileQueryQueryVariables = Exact<{ [key: string]: never }>
2452
2745
 
2453
- export type ServerProfileQueryQuery = { accountName: string | null }
2746
+ export type ServerProfileQueryQuery = {
2747
+ accountName: string | null
2748
+ accountProfile: {
2749
+ name: string | null
2750
+ email: string | null
2751
+ id: string | null
2752
+ }
2753
+ }
2454
2754
 
2455
2755
  export type ServerSecurityQueryQueryVariables = Exact<{ [key: string]: never }>
2456
2756
 
@@ -2460,7 +2760,15 @@ export type ServerUserDetailsQueryQueryVariables = Exact<{
2460
2760
  [key: string]: never
2461
2761
  }>
2462
2762
 
2463
- export type ServerUserDetailsQueryQuery = { accountName: string | null }
2763
+ export type ServerUserDetailsQueryQuery = {
2764
+ accountName: string | null
2765
+ userDetails: {
2766
+ name: string | null
2767
+ email: string | null
2768
+ role: Array<string | null> | null
2769
+ orgUnit: string | null
2770
+ }
2771
+ }
2464
2772
 
2465
2773
  export type CancelOrderMutationMutationVariables = Exact<{
2466
2774
  data: IUserOrderCancel
@@ -2470,6 +2778,56 @@ export type CancelOrderMutationMutation = {
2470
2778
  cancelOrder: { data: string | null } | null
2471
2779
  }
2472
2780
 
2781
+ export type ProcessOrderAuthorizationMutationMutationVariables = Exact<{
2782
+ data: IProcessOrderAuthorization
2783
+ }>
2784
+
2785
+ export type ProcessOrderAuthorizationMutationMutation = {
2786
+ processOrderAuthorization: {
2787
+ isPendingForOtherAuthorizer: boolean
2788
+ ruleForAuthorization: {
2789
+ orderAuthorizationId: string
2790
+ dimensionId: string
2791
+ rule: {
2792
+ id: string
2793
+ name: string
2794
+ status: CommercialAuthorizationStatus
2795
+ doId: string | null
2796
+ authorizedEmails: Array<string>
2797
+ priority: number
2798
+ timeout: number
2799
+ notification: boolean
2800
+ isUserAuthorized: boolean
2801
+ isUserNextAuthorizer: boolean
2802
+ trigger: {
2803
+ condition: {
2804
+ conditionType: number
2805
+ description: string | null
2806
+ lessThan: number | null
2807
+ greatherThan: number | null
2808
+ expression: string | null
2809
+ }
2810
+ effect: {
2811
+ description: string | null
2812
+ effectType: number
2813
+ funcPath: string | null
2814
+ }
2815
+ }
2816
+ scoreInterval: { accept: number; deny: number }
2817
+ authorizationData: {
2818
+ requireAllApprovals: boolean
2819
+ authorizers: Array<{
2820
+ id: string
2821
+ email: string | null
2822
+ type: string
2823
+ authorizationDate: string | null
2824
+ }>
2825
+ } | null
2826
+ }
2827
+ } | null
2828
+ } | null
2829
+ }
2830
+
2473
2831
  export type ValidateUserQueryVariables = Exact<{ [key: string]: never }>
2474
2832
 
2475
2833
  export type ValidateUserQuery = { validateUser: { isValid: boolean } | null }
@@ -3511,7 +3869,7 @@ export const ServerProductQueryDocument = {
3511
3869
  export const ServerOrderDetailsQueryDocument = {
3512
3870
  __meta__: {
3513
3871
  operationName: 'ServerOrderDetailsQuery',
3514
- operationHash: '577feb29827ad55ea5b52fbc4e36844fbee9109d',
3872
+ operationHash: '4758ccbf776bfa5d9b9f15f92bee6ecb78706b20',
3515
3873
  },
3516
3874
  } as unknown as TypedDocumentString<
3517
3875
  ServerOrderDetailsQueryQuery,
@@ -3529,7 +3887,7 @@ export const ServerListOrdersQueryDocument = {
3529
3887
  export const ServerProfileQueryDocument = {
3530
3888
  __meta__: {
3531
3889
  operationName: 'ServerProfileQuery',
3532
- operationHash: 'c4191223fe0b642eee3aaaa2c56563da7d163265',
3890
+ operationHash: '0ed4b5db8fed122d8418195d01fb91b30261d587',
3533
3891
  },
3534
3892
  } as unknown as TypedDocumentString<
3535
3893
  ServerProfileQueryQuery,
@@ -3547,7 +3905,7 @@ export const ServerSecurityQueryDocument = {
3547
3905
  export const ServerUserDetailsQueryDocument = {
3548
3906
  __meta__: {
3549
3907
  operationName: 'ServerUserDetailsQuery',
3550
- operationHash: '92d9db34aa133d60d474c6d4cdcdd2fc19041a5e',
3908
+ operationHash: '522e5feeb80e67cee931bc98eac9d08ea75c75d2',
3551
3909
  },
3552
3910
  } as unknown as TypedDocumentString<
3553
3911
  ServerUserDetailsQueryQuery,
@@ -3562,6 +3920,15 @@ export const CancelOrderMutationDocument = {
3562
3920
  CancelOrderMutationMutation,
3563
3921
  CancelOrderMutationMutationVariables
3564
3922
  >
3923
+ export const ProcessOrderAuthorizationMutationDocument = {
3924
+ __meta__: {
3925
+ operationName: 'ProcessOrderAuthorizationMutation',
3926
+ operationHash: '8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d',
3927
+ },
3928
+ } as unknown as TypedDocumentString<
3929
+ ProcessOrderAuthorizationMutationMutation,
3930
+ ProcessOrderAuthorizationMutationMutationVariables
3931
+ >
3565
3932
  export const ValidateUserDocument = {
3566
3933
  __meta__: {
3567
3934
  operationName: 'ValidateUser',
@@ -2,12 +2,13 @@
2
2
  "47315a3cd26ddd9c7fa963778988464341b8193f": "query ServerAccountPageQuery { accountName }",
3
3
  "4b33c5c07f440dc7489e55619dc2211a13786e72": "fragment ServerCollectionPage on Query { collection(slug: $slug) { id } } query ServerCollectionPageQuery($slug: String!) { collection(slug: $slug) { breadcrumbList { itemListElement { item name position } } meta { selectedFacets { key value } } seo { description title } } ...ServerCollectionPage }",
4
4
  "46103bee661405bde706d72126fdbf9b0a0c9e6e": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes seller { identifier } } } id: productID sku unitMultiplier ...CartProductItem } fragment ServerProduct on Query { product(locator: $locator) { id: productID } } query ServerProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { brand { name } breadcrumbList { itemListElement { item name position } } description gtin image { alternateName url } isVariantOf { productGroupID } name offers { highPrice lowPrice lowPriceWithTaxes offers { availability itemCondition price priceCurrency priceValidUntil seller { identifier } } priceCurrency } id: productID releaseDate seo { canonical description title } sku ...ProductDetailsFragment_product } ...ServerProduct }",
5
- "577feb29827ad55ea5b52fbc4e36844fbee9109d": "query ServerOrderDetailsQuery($orderId: String!) { accountName userOrder(orderId: $orderId) { allowCancellation clientProfileData { corporateName email firstName isCorporate lastName phone } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total uniqueId } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } orderId paymentData { transactions { isActive payments { bankIssuedInvoiceIdentificationNumber connectorResponses { authId } group id installments lastDigits paymentOrigin paymentSystemName redemptionCode referenceValue tid url value } } } status statusDescription storePreferencesData { currencyCode } totals { id name value } } }",
5
+ "4758ccbf776bfa5d9b9f15f92bee6ecb78706b20": "query ServerOrderDetailsQuery($orderId: String!) { accountName userOrder(orderId: $orderId) { allowCancellation canProcessOrderAuthorization clientProfileData { corporateName email firstName isCorporate lastName phone } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total uniqueId } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } orderId paymentData { transactions { isActive payments { bankIssuedInvoiceIdentificationNumber connectorResponses { authId } group id installments lastDigits paymentOrigin paymentSystemName redemptionCode referenceValue tid url value } } } ruleForAuthorization { dimensionId orderAuthorizationId rule { authorizationData { authorizers { authorizationDate email id type } requireAllApprovals } authorizedEmails doId id isUserAuthorized isUserNextAuthorizer name notification priority scoreInterval { accept deny } status timeout trigger { condition { conditionType description expression greatherThan lessThan } effect { description effectType funcPath } } } } status statusDescription storePreferencesData { currencyCode } totals { id name value } } }",
6
6
  "ee84ac3f5b58c5e1950a927a42c5c1dd6012fcc4": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { accountName listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode customFields { type value } items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
7
- "c4191223fe0b642eee3aaaa2c56563da7d163265": "query ServerProfileQuery { accountName }",
7
+ "0ed4b5db8fed122d8418195d01fb91b30261d587": "query ServerProfileQuery { accountName accountProfile { email id name } }",
8
8
  "9f24767f16e6e05c168336701a6c6c7b6b5dc1c6": "query ServerSecurityQuery { accountName }",
9
- "92d9db34aa133d60d474c6d4cdcdd2fc19041a5e": "query ServerUserDetailsQuery { accountName }",
9
+ "522e5feeb80e67cee931bc98eac9d08ea75c75d2": "query ServerUserDetailsQuery { accountName userDetails { email name orgUnit role } }",
10
10
  "e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
11
+ "8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d": "mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) { processOrderAuthorization(data: $data) { isPendingForOtherAuthorizer ruleForAuthorization { dimensionId orderAuthorizationId rule { authorizationData { authorizers { authorizationDate email id type } requireAllApprovals } authorizedEmails doId id isUserAuthorized isUserNextAuthorizer name notification priority scoreInterval { accept deny } status timeout trigger { condition { conditionType description expression greatherThan lessThan } effect { description effectType funcPath } } } } } }",
11
12
  "32f99c73c3de958b64d6bece1afe800469f54548": "query ValidateUser { validateUser { isValid } }",
12
13
  "c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0": "fragment CartItem on StoreOffer { itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber shouldSplitItem } } }",
13
14
  "feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",