@doswiftly/storefront-sdk 9.1.0 → 11.0.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.
@@ -128,6 +128,13 @@ export interface Cart {
128
128
  key: string;
129
129
  value: string | null;
130
130
  }>;
131
+ email: string | null;
132
+ phone: string | null;
133
+ shippingAddress: MailingAddress | null;
134
+ billingAddress: MailingAddress | null;
135
+ selectedShippingMethod: CartShippingMethod | null;
136
+ selectedPaymentMethod: CartSelectedPaymentMethod | null;
137
+ appliedGiftCards: CartAppliedGiftCard[];
131
138
  }
132
139
  /**
133
140
  * Customer-filled attribute selection submitted with a cart line.
@@ -175,11 +182,193 @@ export interface CartCreateInput {
175
182
  key: string;
176
183
  value: string;
177
184
  }>;
185
+ /** Phase 3 Task 3.2 — initial checkout fields w jednym round-trip. */
186
+ email?: string;
187
+ shippingAddress?: CartAddressInput;
178
188
  }
179
189
  export interface CartBuyerIdentityInput {
180
190
  email?: string;
181
191
  phone?: string;
192
+ /** ISO 3166-1 alpha-2 country code (e.g. 'PL', 'DE'). */
182
193
  countryCode?: string;
183
194
  customerId?: string;
195
+ /** ISO 639-1 preferred language code (e.g. 'PL', 'EN'). Accepted by backend; not yet persisted server-side. */
196
+ languageCode?: string;
197
+ }
198
+ /**
199
+ * Non-blocking cart warning surfaced by mutations alongside a successful
200
+ * payload. Cart mutation completes — these are advisory hints (low stock,
201
+ * partial availability, etc.) for the storefront UI to render as soft warnings.
202
+ *
203
+ * Mirror of GraphQL `CartWarning` type.
204
+ */
205
+ export interface CartWarning {
206
+ message: string;
207
+ code: string;
208
+ target: string | null;
209
+ }
210
+ /**
211
+ * Mailing address shape used for shipping/billing addresses on the cart.
212
+ * Mirrors backend `MailingAddress` GraphQL type. Subset of fields surface'd
213
+ * for storefront usage — full shape z optional id when address is persisted.
214
+ */
215
+ export interface MailingAddress {
216
+ id: string | null;
217
+ firstName: string | null;
218
+ lastName: string | null;
219
+ name: string | null;
220
+ company: string | null;
221
+ streetLine1: string | null;
222
+ streetLine2: string | null;
223
+ city: string | null;
224
+ state: string | null;
225
+ stateCode: string | null;
226
+ country: string | null;
227
+ countryCode: string | null;
228
+ postalCode: string | null;
229
+ phone: string | null;
230
+ isDefault: boolean | null;
231
+ }
232
+ /**
233
+ * Input for cartSetShippingAddress / cartSetBillingAddress / CartCreateInput.shippingAddress.
234
+ * Mirror of GraphQL `CartAddressInput` — server validates required fields
235
+ * (firstName/lastName/streetLine1/city/country/postalCode).
236
+ */
237
+ export interface CartAddressInput {
238
+ firstName?: string;
239
+ lastName?: string;
240
+ company?: string;
241
+ streetLine1: string;
242
+ streetLine2?: string;
243
+ city: string;
244
+ state?: string;
245
+ country: string;
246
+ postalCode: string;
247
+ phone?: string;
248
+ }
249
+ /**
250
+ * Shipping method selected on a cart (Decision D8 term unification —
251
+ * formerly `ShippingRate`). Returned from `cart.selectedShippingMethod`.
252
+ */
253
+ export interface CartShippingMethod {
254
+ handle: string;
255
+ title: string;
256
+ price: Money;
257
+ }
258
+ /**
259
+ * Gift card currently applied to the cart (one entry per gift card).
260
+ * Balance NOT yet debited — actual deduction happens atomically at cartComplete.
261
+ */
262
+ export interface CartAppliedGiftCard {
263
+ maskedCode: string;
264
+ lastCharacters: string;
265
+ appliedAmount: Money;
266
+ remainingBalance: Money;
267
+ }
268
+ /**
269
+ * Payment method (integration provider) selected on the cart.
270
+ * Mirror of GraphQL `PaymentMethod` type.
271
+ */
272
+ export interface CartSelectedPaymentMethod {
273
+ id: string;
274
+ name: string;
275
+ provider: string;
276
+ type: PaymentMethodType;
277
+ icon: string | null;
278
+ description: string | null;
279
+ isDefault: boolean | null;
280
+ supportedCurrencies: string[] | null;
281
+ position: number | null;
282
+ }
283
+ /**
284
+ * Payment method category — the set of values the backend actually returns
285
+ * today. Each value corresponds to a registered provider mapping on the
286
+ * server. Wallet categories (Apple Pay, Google Pay, PayPal) intentionally
287
+ * not present until their respective providers are deployed — `OTHER` is
288
+ * the fallback for any registered-but-unmapped provider.
289
+ */
290
+ export type PaymentMethodType = 'CARD' | 'BLIK' | 'BANK_TRANSFER' | 'CASH_ON_DELIVERY' | 'OTHER';
291
+ export interface CartSetShippingAddressInput {
292
+ cartId: string;
293
+ address: CartAddressInput;
294
+ }
295
+ export interface CartSetBillingAddressInput {
296
+ cartId: string;
297
+ address: CartAddressInput;
298
+ }
299
+ export interface CartSelectShippingMethodInput {
300
+ cartId: string;
301
+ shippingMethodId: string;
302
+ }
303
+ export interface CartSelectPaymentMethodInput {
304
+ cartId: string;
305
+ paymentMethodId: string;
306
+ }
307
+ export interface CartApplyGiftCardInput {
308
+ cartId: string;
309
+ giftCardCode: string;
310
+ }
311
+ export interface CartRemoveGiftCardInput {
312
+ cartId: string;
313
+ giftCardCode: string;
314
+ }
315
+ export interface CartUpdateGiftCardRecipientInput {
316
+ cartId: string;
317
+ lineItemId: string;
318
+ recipientEmail?: string;
319
+ recipientName?: string;
320
+ message?: string;
321
+ }
322
+ export interface CartCompleteInput {
323
+ cartId: string;
324
+ idempotencyKey?: string;
325
+ }
326
+ /**
327
+ * Order surface — matches SSOT `Order` fragment shape (status + totals + lifecycle
328
+ * timestamps + shipping address + payment capability signal). The
329
+ * `canCreatePayment` + `paymentMethodType` fields let the storefront decide
330
+ * post-completion payment flow without hard-coded provider checks.
331
+ *
332
+ * Line items NOT included — query them via the separate `order(id).lineItems`
333
+ * field when needed (Relay Connection, paginated).
334
+ */
335
+ export interface Order {
336
+ id: string;
337
+ orderNumber: string;
338
+ totals: {
339
+ total: Money;
340
+ subtotal: Money;
341
+ totalTax: Money | null;
342
+ totalShipping: Money | null;
343
+ };
344
+ status: string;
345
+ paymentStatus: string;
346
+ fulfillmentStatus: string;
347
+ processedAt: string;
348
+ confirmedAt: string | null;
349
+ cancelledAt: string | null;
350
+ expiredAt: string | null;
351
+ shippingAddress: MailingAddress | null;
352
+ itemCount: number;
353
+ canCreatePayment: boolean;
354
+ paymentMethodType: PaymentMethodType;
355
+ }
356
+ export type DiscountErrorCode = 'NOT_FOUND' | 'INACTIVE' | 'NOT_STARTED' | 'EXPIRED' | 'USAGE_LIMIT_REACHED' | 'CUSTOMER_USAGE_LIMIT_REACHED' | 'CUSTOMER_NOT_ELIGIBLE' | 'MINIMUM_ORDER_NOT_MET' | 'MINIMUM_QUANTITY_NOT_MET' | 'DISCOUNT_COMBINATION_NOT_ALLOWED' | 'SHOP_NOT_FOUND';
357
+ export type DiscountApplicationType = 'PERCENTAGE' | 'FIXED_AMOUNT' | 'FREE_SHIPPING' | 'BUY_X_GET_Y';
358
+ export interface DiscountInfo {
359
+ code: string;
360
+ title: string;
361
+ type: DiscountApplicationType;
362
+ value: number;
363
+ discountAmount: Money | null;
364
+ }
365
+ export interface DiscountValidationError {
366
+ code: DiscountErrorCode;
367
+ message: string;
368
+ }
369
+ export interface DiscountValidationResult {
370
+ isValid: boolean;
371
+ discount: DiscountInfo | null;
372
+ error: DiscountValidationError | null;
184
373
  }
185
374
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/cart/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAMD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAMD,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS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CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAMD,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,UAAU,GACV,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,8BAA8B,GAC9B,uBAAuB,GACvB,uBAAuB,GACvB,0BAA0B,GAC1B,kCAAkC,GAClC,gBAAgB,CAAC;AAErB,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ,cAAc,GACd,eAAe,GACf,aAAa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACvC"}
@@ -47,7 +47,8 @@ export { FallbackBotProtectionManager } from './bot-protection/fallback-manager'
47
47
  export { StorefrontError, ErrorCodes, type StorefrontErrorOptions } from './errors';
48
48
  export { cacheNone, cacheShort, cacheLong, cachePrivate, cacheCustom, generateCacheControlHeader, type CacheOverrides, } from './cache';
49
49
  export { CartClient } from './cart/cart-client';
50
- export type { Cart, CartLine, CartLineEdge, CartLineConnection, ProductVariant, ProductVariantWeight, ImageThumbnail, PageInfo, AttributeSelection, CartLineCost, CartCost, CartBuyerIdentity, CartDiscountCode, CartDiscountAllocation, CartLineInput, CartLineUpdateInput, CartCreateInput, CartBuyerIdentityInput, CartAttributeSelectionInput, SelectedOption, Money, } from './cart/types';
50
+ export type { CartMutationOutcome, CartCompleteOutcome } from './cart/cart-client';
51
+ export type { Cart, CartLine, CartLineEdge, CartLineConnection, ProductVariant, ProductVariantWeight, ImageThumbnail, PageInfo, AttributeSelection, CartLineCost, CartCost, CartBuyerIdentity, CartDiscountCode, CartDiscountAllocation, CartLineInput, CartLineUpdateInput, CartCreateInput, CartBuyerIdentityInput, CartAttributeSelectionInput, SelectedOption, Money, CartAddressInput, CartSetShippingAddressInput, CartSetBillingAddressInput, CartSelectShippingMethodInput, CartSelectPaymentMethodInput, CartApplyGiftCardInput, CartRemoveGiftCardInput, CartUpdateGiftCardRecipientInput, CartCompleteInput, CartShippingMethod, CartAppliedGiftCard, CartSelectedPaymentMethod, PaymentMethodType, CartWarning, Order, DiscountValidationResult, DiscountInfo, DiscountValidationError, DiscountErrorCode, DiscountApplicationType, } from './cart/types';
51
52
  export { AuthClient } from './auth/auth-client';
52
53
  export type { Customer, CustomerAccessToken, MailingAddress, AuthResult, CustomerCreateInput, } from './auth/types';
53
54
  export { assertNoUserErrors } from './helpers/assert-no-user-errors';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB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AAE,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAG/G,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG7E,OAAO,EAAE,YAAY,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGzE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtG,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAE,KAAK,SAAS,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -53,7 +53,7 @@ export interface BotProtectionMiddlewareOptions {
53
53
  protectedOperations: string[];
54
54
  /** Default fail strategy when token acquisition fails (default: 'open') */
55
55
  defaultFailStrategy?: FailStrategy;
56
- /** Override fail strategy per operation (e.g. CheckoutComplete = closed) */
56
+ /** Override fail strategy per operation (e.g. CartComplete = closed) */
57
57
  failStrategyOverrides?: Record<string, FailStrategy>;
58
58
  }
59
59
  /** Header name for bot protection token */
@@ -1 +1 @@
1
- {"version":3,"file":"bot-protection.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/bot-protection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAOlD,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEnF,0CAA0C;IAC1C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AS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEnF,0CAA0C;IAC1C,OAAO,IAAI,IAAI,CAAC;CACjB;AAMD,+CAA+C;AAC/C,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,OAAO,EAAE,2BAA2B,CAAC;IACrC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC9C,qDAAqD;IACrD,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAM7C,MAAM,WAAW,8BAA8B;IAC7C,0DAA0D;IAC1D,aAAa,EAAE,0BAA0B,CAAC;IAC1C,0DAA0D;IAC1D,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACtD;AAMD,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAM9D;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,UAAU,CA2C3F"}
@@ -9,9 +9,9 @@
9
9
  * - customerRefreshToken → CustomerRefreshTokenPayload
10
10
  * - customerSignup(input: CustomerCreateInput!) → CustomerSignupPayload
11
11
  */
12
- export declare const CUSTOMER_LOGIN = "\n mutation CustomerLogin($input: CustomerAccessTokenCreateInput!) {\n customerLogin(input: $input) {\n customerAccessToken { ...CustomerAccessTokenFields }\n userErrors { ...UserErrorFields }\n }\n }\n \n fragment CustomerAccessTokenFields on CustomerAccessToken {\n accessToken\n expiresAt\n }\n\n \n fragment UserErrorFields on UserError {\n message\n field\n code\n }\n\n";
13
- export declare const CUSTOMER_LOGOUT = "\n mutation CustomerLogout {\n customerLogout {\n deletedAccessToken\n deletedCustomerAccessTokenId\n userErrors { ...UserErrorFields }\n }\n }\n \n fragment UserErrorFields on UserError {\n message\n field\n code\n }\n\n";
14
- export declare const CUSTOMER_REFRESH_TOKEN = "\n mutation CustomerRefreshToken {\n customerRefreshToken {\n customerAccessToken { ...CustomerAccessTokenFields }\n userErrors { ...UserErrorFields }\n }\n }\n \n fragment CustomerAccessTokenFields on CustomerAccessToken {\n accessToken\n expiresAt\n }\n\n \n fragment UserErrorFields on UserError {\n message\n field\n code\n }\n\n";
15
- export declare const CUSTOMER_SIGNUP = "\n mutation CustomerSignup($input: CustomerCreateInput!) {\n customerSignup(input: $input) {\n customer { ...CustomerFields }\n customerAccessToken { ...CustomerAccessTokenFields }\n userErrors { ...UserErrorFields }\n }\n }\n \n fragment CustomerFields on Customer {\n id\n email\n firstName\n lastName\n displayName\n phone\n emailVerified\n emailMarketingState\n defaultAddress {\n id\n streetLine1\n streetLine2\n city\n company\n country\n countryCode\n firstName\n lastName\n phone\n state\n stateCode\n postalCode\n isDefault\n }\n ordersCount\n totalSpent {\n amount\n currencyCode\n }\n createdAt\n updatedAt\n }\n\n \n fragment CustomerAccessTokenFields on CustomerAccessToken {\n accessToken\n expiresAt\n }\n\n \n fragment UserErrorFields on UserError {\n message\n field\n code\n }\n\n";
16
- export declare const CUSTOMER_QUERY = "\n query Customer {\n customer {\n ...CustomerFields\n }\n }\n \n fragment CustomerFields on Customer {\n id\n email\n firstName\n lastName\n displayName\n phone\n emailVerified\n emailMarketingState\n defaultAddress {\n id\n streetLine1\n streetLine2\n city\n company\n country\n countryCode\n firstName\n lastName\n phone\n state\n stateCode\n postalCode\n isDefault\n }\n ordersCount\n totalSpent {\n amount\n currencyCode\n }\n createdAt\n updatedAt\n }\n\n";
12
+ export declare const CUSTOMER_LOGIN: string;
13
+ export declare const CUSTOMER_LOGOUT: string;
14
+ export declare const CUSTOMER_REFRESH_TOKEN: string;
15
+ export declare const CUSTOMER_SIGNUP: string;
16
+ export declare const CUSTOMER_QUERY: string;
17
17
  //# sourceMappingURL=auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/core/operations/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA6DH,eAAO,MAAM,cAAc,maAS1B,CAAC;AAEF,eAAO,MAAM,eAAe,qQAS3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,yXASlC,CAAC;AAEF,eAAO,MAAM,eAAe,+8BAW3B,CAAC;AAMF,eAAO,MAAM,cAAc,+lBAO1B,CAAC"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/core/operations/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgEH,eAAO,MAAM,cAAc,QASzB,CAAC;AAEH,eAAO,MAAM,eAAe,QAS1B,CAAC;AAEH,eAAO,MAAM,sBAAsB,QASjC,CAAC;AAEH,eAAO,MAAM,eAAe,QAW1B,CAAC;AAMH,eAAO,MAAM,cAAc,QAOzB,CAAC"}
@@ -9,6 +9,7 @@
9
9
  * - customerRefreshToken → CustomerRefreshTokenPayload
10
10
  * - customerSignup(input: CustomerCreateInput!) → CustomerSignupPayload
11
11
  */
12
+ import { composeOperation } from './compose';
12
13
  // ---------------------------------------------------------------------------
13
14
  // Fragments
14
15
  // ---------------------------------------------------------------------------
@@ -33,8 +34,8 @@ const CUSTOMER_FRAGMENT = `
33
34
  lastName
34
35
  displayName
35
36
  phone
36
- emailVerified
37
- emailMarketingState
37
+ isEmailVerified
38
+ emailMarketing
38
39
  defaultAddress {
39
40
  id
40
41
  streetLine1
@@ -45,13 +46,14 @@ const CUSTOMER_FRAGMENT = `
45
46
  countryCode
46
47
  firstName
47
48
  lastName
49
+ name
48
50
  phone
49
51
  state
50
52
  stateCode
51
53
  postalCode
52
54
  isDefault
53
55
  }
54
- ordersCount
56
+ orderCount
55
57
  totalSpent {
56
58
  amount
57
59
  currencyCode
@@ -63,7 +65,7 @@ const CUSTOMER_FRAGMENT = `
63
65
  // ---------------------------------------------------------------------------
64
66
  // Mutations
65
67
  // ---------------------------------------------------------------------------
66
- export const CUSTOMER_LOGIN = `
68
+ export const CUSTOMER_LOGIN = composeOperation(`
67
69
  mutation CustomerLogin($input: CustomerAccessTokenCreateInput!) {
68
70
  customerLogin(input: $input) {
69
71
  customerAccessToken { ...CustomerAccessTokenFields }
@@ -72,8 +74,8 @@ export const CUSTOMER_LOGIN = `
72
74
  }
73
75
  ${CUSTOMER_ACCESS_TOKEN_FRAGMENT}
74
76
  ${USER_ERROR_FRAGMENT}
75
- `;
76
- export const CUSTOMER_LOGOUT = `
77
+ `);
78
+ export const CUSTOMER_LOGOUT = composeOperation(`
77
79
  mutation CustomerLogout {
78
80
  customerLogout {
79
81
  deletedAccessToken
@@ -82,8 +84,8 @@ export const CUSTOMER_LOGOUT = `
82
84
  }
83
85
  }
84
86
  ${USER_ERROR_FRAGMENT}
85
- `;
86
- export const CUSTOMER_REFRESH_TOKEN = `
87
+ `);
88
+ export const CUSTOMER_REFRESH_TOKEN = composeOperation(`
87
89
  mutation CustomerRefreshToken {
88
90
  customerRefreshToken {
89
91
  customerAccessToken { ...CustomerAccessTokenFields }
@@ -92,8 +94,8 @@ export const CUSTOMER_REFRESH_TOKEN = `
92
94
  }
93
95
  ${CUSTOMER_ACCESS_TOKEN_FRAGMENT}
94
96
  ${USER_ERROR_FRAGMENT}
95
- `;
96
- export const CUSTOMER_SIGNUP = `
97
+ `);
98
+ export const CUSTOMER_SIGNUP = composeOperation(`
97
99
  mutation CustomerSignup($input: CustomerCreateInput!) {
98
100
  customerSignup(input: $input) {
99
101
  customer { ...CustomerFields }
@@ -104,15 +106,15 @@ export const CUSTOMER_SIGNUP = `
104
106
  ${CUSTOMER_FRAGMENT}
105
107
  ${CUSTOMER_ACCESS_TOKEN_FRAGMENT}
106
108
  ${USER_ERROR_FRAGMENT}
107
- `;
109
+ `);
108
110
  // ---------------------------------------------------------------------------
109
111
  // Queries
110
112
  // ---------------------------------------------------------------------------
111
- export const CUSTOMER_QUERY = `
113
+ export const CUSTOMER_QUERY = composeOperation(`
112
114
  query Customer {
113
115
  customer {
114
116
  ...CustomerFields
115
117
  }
116
118
  }
117
119
  ${CUSTOMER_FRAGMENT}
118
- `;
120
+ `);
@@ -2,20 +2,47 @@
2
2
  * Cart GraphQL operations — manual query strings (no codegen).
3
3
  *
4
4
  * SSOT: packages/backend/src/commerce/storefront-graphql/operations/
5
- * - fragments.graphql (CartCost, CartLineCost, CartLine, Cart, etc.)
5
+ * - fragments.graphql (CartCost, CartLineCost, CartLine, Cart, Order, CartWarning, etc.)
6
6
  * - queries.graphql (Cart query)
7
- * - mutations.graphql (cartCreate, cartLinesAdd, etc.)
7
+ * - mutations.graphql (cartCreate, cartAddLines, etc.)
8
8
  *
9
9
  * Validate drift: pnpm test:contract (cart-operations-drift test)
10
10
  *
11
- * Cart mutations always return full Cart + userErrors.
11
+ * Cart mutations always return full Cart + userErrors + warnings (non-fatal hints).
12
+ * Drift detection: PreToolUse hook validuje strings przeciwko storefront-operations/schema.graphql.
12
13
  */
13
- export declare const CART_QUERY = "\n query Cart($id: ID!) {\n cart(id: $id) {\n ...Cart\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n";
14
- export declare const CART_CREATE = "\n mutation CartCreate($input: CartCreateInput) {\n cartCreate(input: $input) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
15
- export declare const CART_LINES_ADD = "\n mutation CartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
16
- export declare const CART_LINES_UPDATE = "\n mutation CartLinesUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
17
- export declare const CART_LINES_REMOVE = "\n mutation CartLinesRemove($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
18
- export declare const CART_DISCOUNT_CODES_UPDATE = "\n mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]!) {\n cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
19
- export declare const CART_NOTE_UPDATE = "\n mutation CartNoteUpdate($cartId: ID!, $note: String!) {\n cartNoteUpdate(cartId: $cartId, note: $note) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
20
- export declare const CART_BUYER_IDENTITY_UPDATE = "\n mutation CartBuyerIdentityUpdate($cartId: ID!, $buyerIdentity: CartBuyerIdentityInput!) {\n cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {\n cart { ...Cart }\n userErrors { ...UserError }\n }\n }\n \n fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost { ...CartCost }\n lines(first: 100) {\n edges {\n cursor\n node { ... on CartLine { ...CartLine } }\n }\n nodes { ... on CartLine { ...CartLine } }\n pageInfo { ...PageInfo }\n totalCount\n }\n buyerIdentity { ...CartBuyerIdentity }\n discountCodes { ...CartDiscountCode }\n discountAllocations { ...CartDiscountAllocation }\n note\n attributes { key value }\n createdAt\n updatedAt\n }\n \n fragment CartCost on CartCost {\n total { ...Money }\n subtotal { ...Money }\n totalTax { ...Money }\n totalDuty { ...Money }\n checkoutCharge { ...Money }\n }\n\n \n fragment CartLine on CartLine {\n id\n quantity\n variant { ...ProductVariant }\n cost { ...CartLineCost }\n attributes { key value }\n attributeSelections { ...AttributeSelection }\n productId\n productTitle\n productHandle\n productType\n }\n \n fragment CartLineCost on CartLineCost {\n pricePerUnit { ...Money }\n subtotal { ...Money }\n total { ...Money }\n compareAtPricePerUnit { ...Money }\n }\n\n \n fragment ProductVariant on ProductVariant {\n id\n title\n sku\n price { ...Money }\n compareAtPrice { ...Money }\n isAvailable\n availableStock\n image { ...ImageThumbnail }\n selectedOptions { ...SelectedOption }\n barcode\n weight { value unit }\n sortOrder\n }\n \n fragment Money on Money {\n amount\n currencyCode\n }\n\n \n fragment ImageThumbnail on Image {\n id\n url(transform: { maxWidth: 300 })\n altText\n width\n height\n thumbhash\n }\n\n \n fragment SelectedOption on SelectedOption {\n name\n value\n }\n\n\n \n fragment AttributeSelection on AttributeSelection {\n attributeDefinitionId\n attributeName\n type\n fillingMode\n billingMode\n optionId\n optionLabel\n optionIds\n textValue\n surchargeAmount\n surchargeType\n taxClassId\n linkedVariantId\n }\n\n\n \n fragment CartBuyerIdentity on CartBuyerIdentity {\n email\n phone\n countryCode\n }\n\n \n fragment CartDiscountCode on CartDiscountCode {\n code\n isApplicable\n }\n\n \n fragment CartDiscountAllocation on CartDiscountAllocation {\n discountCode\n amount { ...Money }\n }\n\n \n fragment PageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n\n \n fragment UserError on UserError {\n message\n code\n field\n }\n\n";
14
+ export declare const CART_QUERY: string;
15
+ export declare const CART_CREATE: string;
16
+ export declare const CART_ADD_LINES: string;
17
+ export declare const CART_UPDATE_LINES: string;
18
+ export declare const CART_REMOVE_LINES: string;
19
+ export declare const CART_DISCOUNT_CODES_UPDATE: string;
20
+ export declare const CART_UPDATE_NOTE: string;
21
+ export declare const CART_UPDATE_BUYER_IDENTITY: string;
22
+ export declare const CART_SET_SHIPPING_ADDRESS: string;
23
+ export declare const CART_SET_BILLING_ADDRESS: string;
24
+ export declare const CART_SELECT_SHIPPING_METHOD: string;
25
+ export declare const CART_SELECT_PAYMENT_METHOD: string;
26
+ export declare const CART_APPLY_GIFT_CARD: string;
27
+ export declare const CART_REMOVE_GIFT_CARD: string;
28
+ export declare const CART_UPDATE_GIFT_CARD_RECIPIENT: string;
29
+ /**
30
+ * cartComplete — returns the Order created from the cart (carrying
31
+ * `canCreatePayment` + `paymentMethodType` signals for post-completion payment
32
+ * flow decisions). The cart itself is NOT returned — after completion it is
33
+ * CONVERTED/locked, so the storefront drops its local cart and works with the
34
+ * Order. `order` is non-null on success. `paymentUrl` is intentionally NOT in
35
+ * the payload (Decision D4) — the storefront calls a separate `paymentCreate`
36
+ * mutation after checking `order.canCreatePayment`.
37
+ */
38
+ export declare const CART_COMPLETE: string;
39
+ /**
40
+ * cartValidateDiscountCode Query — read-only preview discount applicability
41
+ * (Decision D3). No cart side effects; storefront UI używa do inline feedback
42
+ * gdy klient wpisuje kod (przed wywołaniem cartDiscountCodesUpdate).
43
+ *
44
+ * Caching guidance: `fetchPolicy: 'network-only'` lub key zawierający
45
+ * `cart.subtotal` (discount eligibility może zależeć od minimum order amount).
46
+ */
47
+ export declare const CART_VALIDATE_DISCOUNT_CODE: string;
21
48
  //# sourceMappingURL=cart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../../src/core/operations/cart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAwLH,eAAO,MAAM,UAAU,iiFAOtB,CAAC;AAMF,eAAO,MAAM,WAAW,msFASvB,CAAC;AAEF,eAAO,MAAM,cAAc,wuFAS1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,ovFAS7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,yuFAS7B,CAAC;AAEF,eAAO,MAAM,0BAA0B,+wFAStC,CAAC;AAEF,eAAO,MAAM,gBAAgB,+tFAS5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,4xFAStC,CAAC"}
1
+ {"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../../src/core/operations/cart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA0RH,eAAO,MAAM,UAAU,QAOrB,CAAC;AAMH,eAAO,MAAM,WAAW,QAWtB,CAAC;AAEH,eAAO,MAAM,cAAc,QAWzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAW5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAW5B,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAWrC,CAAC;AAEH,eAAO,MAAM,gBAAgB,QAW3B,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAWrC,CAAC;AAMH,eAAO,MAAM,yBAAyB,QAWpC,CAAC;AAEH,eAAO,MAAM,wBAAwB,QAWnC,CAAC;AAEH,eAAO,MAAM,2BAA2B,QAWtC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAWrC,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAW/B,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAWhC,CAAC;AAEH,eAAO,MAAM,+BAA+B,QAW1C,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,QAWxB,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,QAoBtC,CAAC"}