@sixtyninecommerce/client 0.4.0 → 0.5.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 (44) hide show
  1. package/dist/commerce/checkout.d.ts +5 -1
  2. package/dist/commerce/checkout.d.ts.map +1 -1
  3. package/dist/commerce/checkout.js +23 -1
  4. package/dist/commerce/checkout.js.map +1 -1
  5. package/dist/commerce/customer.d.ts +3 -1
  6. package/dist/commerce/customer.d.ts.map +1 -1
  7. package/dist/commerce/customer.js +13 -1
  8. package/dist/commerce/customer.js.map +1 -1
  9. package/dist/commerce/payments.d.ts +3 -1
  10. package/dist/commerce/payments.d.ts.map +1 -1
  11. package/dist/commerce/payments.js +9 -1
  12. package/dist/commerce/payments.js.map +1 -1
  13. package/dist/commerce/pickup-location-parser.d.ts +6 -0
  14. package/dist/commerce/pickup-location-parser.d.ts.map +1 -0
  15. package/dist/commerce/pickup-location-parser.js +97 -0
  16. package/dist/commerce/pickup-location-parser.js.map +1 -0
  17. package/dist/commerce/queries.d.ts +24 -12
  18. package/dist/commerce/queries.d.ts.map +1 -1
  19. package/dist/commerce/queries.js +144 -2
  20. package/dist/commerce/queries.js.map +1 -1
  21. package/dist/commerce/shipping.d.ts +3 -0
  22. package/dist/commerce/shipping.d.ts.map +1 -1
  23. package/dist/commerce/shipping.js +7 -3
  24. package/dist/commerce/shipping.js.map +1 -1
  25. package/dist/commerce/subscriptions.d.ts +16 -1
  26. package/dist/commerce/subscriptions.d.ts.map +1 -1
  27. package/dist/commerce/subscriptions.js +64 -4
  28. package/dist/commerce/subscriptions.js.map +1 -1
  29. package/dist/content/collections.d.ts +9 -0
  30. package/dist/content/collections.d.ts.map +1 -0
  31. package/dist/content/collections.js +39 -0
  32. package/dist/content/collections.js.map +1 -0
  33. package/dist/content/index.d.ts.map +1 -1
  34. package/dist/content/index.js +2 -0
  35. package/dist/content/index.js.map +1 -1
  36. package/dist/currency/exchange.d.ts +5 -1
  37. package/dist/currency/exchange.d.ts.map +1 -1
  38. package/dist/currency/exchange.js +25 -1
  39. package/dist/currency/exchange.js.map +1 -1
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/types.d.ts +195 -3
  43. package/dist/types.d.ts.map +1 -1
  44. package/package.json +11 -9
@@ -1,5 +1,5 @@
1
1
  import type { HttpClient } from '../core/http.js';
2
- import type { AddressInput, CustomerInput, Order, PaymentInput, PaymentMethod, ShippingMethod } from '../types.js';
2
+ import type { ActiveChannelOrderConstraints, AddressInput, CustomerInput, Order, PaymentInput, PaymentMethod, PickupLocation, PickupLocationSearchInput, ShippingMethod } from '../types.js';
3
3
  export declare function createCheckoutMethods(http: HttpClient): {
4
4
  setCustomerForOrder(input: CustomerInput): Promise<Order>;
5
5
  setShippingAddress(input: AddressInput): Promise<Order>;
@@ -7,7 +7,11 @@ export declare function createCheckoutMethods(http: HttpClient): {
7
7
  getEligibleShippingMethods(): Promise<ShippingMethod[]>;
8
8
  setShippingMethod(ids: string[]): Promise<Order>;
9
9
  getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
10
+ getOrderConstraints(): Promise<ActiveChannelOrderConstraints>;
10
11
  transitionToArrangingPayment(): Promise<Order>;
11
12
  addPayment(input: PaymentInput): Promise<Order>;
13
+ findPickupLocations(input: PickupLocationSearchInput): Promise<PickupLocation[]>;
14
+ selectPickupLocation(location: PickupLocation): Promise<Order>;
15
+ getActivePickupLocation(): Promise<PickupLocation | null>;
12
16
  };
13
17
  //# sourceMappingURL=checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,KAAK,EACL,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,aAAa,CAAC;AAiCrB,wBAAgB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lE"}
@@ -1,5 +1,6 @@
1
1
  import { MutationError } from '../errors.js';
2
- import { ADD_PAYMENT, ELIGIBLE_PAYMENT_METHODS, ELIGIBLE_SHIPPING_METHODS, SET_BILLING_ADDRESS, SET_CUSTOMER, SET_SHIPPING_ADDRESS, SET_SHIPPING_METHOD, TRANSITION_TO_ARRANGING_PAYMENT, } from './queries.js';
2
+ import { normalizePickupLocationInput, parseOptionalPickupLocation, parsePickupLocations, } from './pickup-location-parser.js';
3
+ import { ACTIVE_CHANNEL_ORDER_CONSTRAINTS, ACTIVE_ORDER_PICKUP_LOCATION, ADD_PAYMENT, ELIGIBLE_PAYMENT_METHODS, ELIGIBLE_SHIPPING_METHODS, PICKUP_LOCATIONS, SET_ACTIVE_ORDER_PICKUP_LOCATION, SET_BILLING_ADDRESS, SET_CUSTOMER, SET_SHIPPING_ADDRESS, SET_SHIPPING_METHOD, TRANSITION_TO_ARRANGING_PAYMENT, } from './queries.js';
3
4
  function unwrapResult(data, field) {
4
5
  const result = data[field];
5
6
  if (!result) {
@@ -46,6 +47,10 @@ export function createCheckoutMethods(http) {
46
47
  const data = await http.graphql(ELIGIBLE_PAYMENT_METHODS);
47
48
  return data.eligiblePaymentMethods;
48
49
  },
50
+ async getOrderConstraints() {
51
+ const data = await http.graphql(ACTIVE_CHANNEL_ORDER_CONSTRAINTS);
52
+ return data.activeChannelOrderConstraints;
53
+ },
49
54
  async transitionToArrangingPayment() {
50
55
  const data = await http.graphql(TRANSITION_TO_ARRANGING_PAYMENT);
51
56
  return unwrapResult(data, 'transitionOrderToState');
@@ -54,6 +59,23 @@ export function createCheckoutMethods(http) {
54
59
  const data = await http.graphql(ADD_PAYMENT, { input });
55
60
  return unwrapResult(data, 'addPaymentToOrder');
56
61
  },
62
+ async findPickupLocations(input) {
63
+ const data = await http.graphql(PICKUP_LOCATIONS, {
64
+ input,
65
+ });
66
+ return parsePickupLocations(data.pickupLocations);
67
+ },
68
+ async selectPickupLocation(location) {
69
+ const normalized = normalizePickupLocationInput(location);
70
+ const data = await http.graphql(SET_ACTIVE_ORDER_PICKUP_LOCATION, {
71
+ location: normalized,
72
+ });
73
+ return unwrapResult(data, 'setActiveOrderPickupLocation');
74
+ },
75
+ async getActivePickupLocation() {
76
+ const data = await http.graphql(ACTIVE_ORDER_PICKUP_LOCATION);
77
+ return parseOptionalPickupLocation(data.activeOrderPickupLocation);
78
+ },
57
79
  };
58
80
  }
59
81
  //# sourceMappingURL=checkout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAS7C,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,cAAc,CAAC;AAEtB,SAAS,YAAY,CAAC,IAA6B,EAAE,KAAa;IAChE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAA4B,CAAC;IACtD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,aAAa,CAAC,eAAe,EAAE,kBAAkB,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;QAM1B,MAAM,eAAe,GACnB,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;YAC7E,CAAC,CAAC,MAAM,CAAC,eAAe;YACxB,CAAC,CAAC,IAAI,CAAC;QACX,MAAM,OAAO,GAAG,eAAe,IAAK,MAAM,CAAC,OAAkB,CAAC;QAC9D,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,SAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAA0B,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAA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,CAAC,yBAAyB,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { HttpClient } from '../core/http.js';
2
- import type { ActiveChannel, AddressInput, Country, Customer, CustomerAddress, Order, OrderListOptions, OrderSummary, PaginatedList, RegisterInput, ReorderSkipped, UpdateAddressInput, UpdateCustomerInput } from '../types.js';
2
+ import type { ActiveChannel, AddressInput, Country, Customer, CustomerAddress, CustomerInvoice, CustomerInvoicePdf, Order, OrderListOptions, OrderSummary, PaginatedList, RegisterInput, ReorderSkipped, UpdateAddressInput, UpdateCustomerInput } from '../types.js';
3
3
  export declare function createCustomerMethods(http: HttpClient): {
4
4
  login(email: string, password: string): Promise<{
5
5
  id: string;
@@ -30,6 +30,8 @@ export declare function createCustomerMethods(http: HttpClient): {
30
30
  deleteAddress(id: string): Promise<void>;
31
31
  getAvailableCountries(): Promise<Country[]>;
32
32
  getOrderByCode(code: string): Promise<Order>;
33
+ getMyOrderInvoices(orderCode: string): Promise<CustomerInvoice[]>;
34
+ getMyInvoicePdf(invoiceId: string): Promise<CustomerInvoicePdf>;
33
35
  reorder(orderCode: string): Promise<{
34
36
  order: Order;
35
37
  addedLines: number;
@@ -1 +1 @@
1
- {"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/commerce/customer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAmCrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;iBAI/B,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAA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,CAAC;yBAOvC,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;sBAOhD,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;6BAMf,OAAO,CAAC,OAAO,EAAE,CAAC;yBAKtB,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;kCASd,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;+BAatC,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;uBAexD,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC;wBAqCjD,OAAO,CAAC,aAAa,CAAC;EAKnD"}
@@ -1,5 +1,5 @@
1
1
  import { MutationError } from '../errors.js';
2
- import { ADD_TO_CART, AVAILABLE_COUNTRIES, CREATE_ADDRESS, DELETE_ADDRESS, GET_ACTIVE_CHANNEL, GET_CURRENT_CUSTOMER, GET_CUSTOMER_ORDERS, LOGIN, LOGOUT, ORDER_BY_CODE, REFRESH_VERIFICATION, REGISTER, REQUEST_EMAIL_UPDATE, REQUEST_PASSWORD_RESET, RESET_PASSWORD, UPDATE_ADDRESS, UPDATE_CUSTOMER, UPDATE_EMAIL, UPDATE_PASSWORD, VERIFY_ACCOUNT, } from './queries.js';
2
+ import { ADD_TO_CART, AVAILABLE_COUNTRIES, CREATE_ADDRESS, DELETE_ADDRESS, GET_ACTIVE_CHANNEL, GET_CURRENT_CUSTOMER, GET_CUSTOMER_ORDERS, LOGIN, LOGOUT, MY_INVOICE_PDF, MY_ORDER_INVOICES, ORDER_BY_CODE, REFRESH_VERIFICATION, REGISTER, REQUEST_EMAIL_UPDATE, REQUEST_PASSWORD_RESET, RESET_PASSWORD, UPDATE_ADDRESS, UPDATE_CUSTOMER, UPDATE_EMAIL, UPDATE_PASSWORD, VERIFY_ACCOUNT, } from './queries.js';
3
3
  function unwrapResult(data, field) {
4
4
  const result = data[field];
5
5
  if (!result) {
@@ -113,6 +113,18 @@ export function createCustomerMethods(http) {
113
113
  const data = await http.graphql(ORDER_BY_CODE, { code });
114
114
  return data.orderByCode;
115
115
  },
116
+ async getMyOrderInvoices(orderCode) {
117
+ const data = await http.graphql(MY_ORDER_INVOICES, {
118
+ orderCode,
119
+ });
120
+ return data.myOrderInvoices;
121
+ },
122
+ async getMyInvoicePdf(invoiceId) {
123
+ const data = await http.graphql(MY_INVOICE_PDF, {
124
+ invoiceId,
125
+ });
126
+ return data.myInvoicePdf;
127
+ },
116
128
  async reorder(orderCode) {
117
129
  const previous = await this.getOrderByCode(orderCode);
118
130
  const skipped = [];
@@ -1 +1 @@
1
- {"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/commerce/customer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAgB7C,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,SAAS,YAAY,CAAC,IAA6B,EAAE,KAAa;IAChE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAwC,CAAC;IAClE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,aAAa,CAAC,eAAe,EAAE,kBAAkB,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;QAC1B,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,SAAmB,EAAE,MAAM,CAAC,OAAiB,EAAE,MAAM,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAA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CAAC,SAAS,CAAC;wBACnC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;qBACtC,CAAC,CAAC;oBACH,SAAS;gBACX,CAAC;gBACD,WAAW,GAAG,MAA0B,CAAC;gBACzC,UAAU,IAAI,CAAC,CAAC;YAClB,CAAC;YAED,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,aAAa,CACrB,wBAAwB,EACxB,qCAAqC,SAAS,EAAE,EAChD,EAAE,OAAO,EAAE,CACZ,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;QACrD,CAAC;QAED,KAAK,CAAC,gBAAgB;YACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAmC,kBAAkB,CAAC,CAAC;YACtF,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { HttpClient } from '../core/http.js';
2
- import type { CreateMolliePaymentIntentInput, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodsInput, RequestOptions, StripePaymentIntentResult } from '../types.js';
2
+ import type { CreateMolliePaymentIntentInput, MollieOrderStatusResult, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodsInput, OrderedMollieMethod, RequestOptions, StripePaymentIntentResult } from '../types.js';
3
3
  export declare function createPaymentMethods(http: HttpClient): {
4
4
  createStripePaymentIntent(options?: RequestOptions): Promise<StripePaymentIntentResult>;
5
5
  getMolliePaymentMethods(input: MolliePaymentMethodsInput, options?: RequestOptions): Promise<MolliePaymentMethod[]>;
6
+ getOrderedMolliePaymentMethods(paymentMethodCode: string, options?: RequestOptions): Promise<OrderedMollieMethod[]>;
6
7
  createMolliePaymentIntent(input: CreateMolliePaymentIntentInput, options?: RequestOptions): Promise<MolliePaymentIntentResult>;
8
+ syncMolliePaymentStatus(orderCode: string, options?: RequestOptions): Promise<MollieOrderStatusResult | null>;
7
9
  };
8
10
  //# sourceMappingURL=payments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/commerce/payments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAOrB,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU;wCAEP,cAAc,GAAG,OAAO,CAAC,yBAAyB,CAAC;mCAiBpF,yBAAyB,YACtB,cAAc,GACvB,OAAO,CAAC,mBAAmB,EAAE,CAAC;qCAUxB,8BAA8B,YAC3B,cAAc,GACvB,OAAO,CAAC,yBAAyB,CAAC;EAcxC"}
1
+ {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/commerce/payments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EACV,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AASrB,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU;wCAEP,cAAc,GAAG,OAAO,CAAC,yBAAyB,CAAC;mCAiBpF,yBAAyB,YACtB,cAAc,GACvB,OAAO,CAAC,mBAAmB,EAAE,CAAC;sDAUZ,MAAM,YACf,cAAc,GACvB,OAAO,CAAC,mBAAmB,EAAE,CAAC;qCAUxB,8BAA8B,YAC3B,cAAc,GACvB,OAAO,CAAC,yBAAyB,CAAC;uCAexB,MAAM,YACP,cAAc,GACvB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;EAO7C"}
@@ -1,5 +1,5 @@
1
1
  import { MutationError } from '../errors.js';
2
- import { CREATE_MOLLIE_PAYMENT_INTENT, CREATE_STRIPE_PAYMENT_INTENT, MOLLIE_PAYMENT_METHODS, } from './queries.js';
2
+ import { CREATE_MOLLIE_PAYMENT_INTENT, CREATE_STRIPE_PAYMENT_INTENT, MOLLIE_PAYMENT_METHODS, ORDERED_MOLLIE_PAYMENT_METHODS, SYNC_MOLLIE_PAYMENT_STATUS, } from './queries.js';
3
3
  export function createPaymentMethods(http) {
4
4
  return {
5
5
  async createStripePaymentIntent(options) {
@@ -14,6 +14,10 @@ export function createPaymentMethods(http) {
14
14
  const data = await http.graphql(MOLLIE_PAYMENT_METHODS, { input }, options);
15
15
  return data.molliePaymentMethods;
16
16
  },
17
+ async getOrderedMolliePaymentMethods(paymentMethodCode, options) {
18
+ const data = await http.graphql(ORDERED_MOLLIE_PAYMENT_METHODS, { paymentMethodCode }, options);
19
+ return data.orderedMolliePaymentMethods;
20
+ },
17
21
  async createMolliePaymentIntent(input, options) {
18
22
  const data = await http.graphql(CREATE_MOLLIE_PAYMENT_INTENT, { input }, options);
19
23
  const result = data.createMolliePaymentIntent;
@@ -25,6 +29,10 @@ export function createPaymentMethods(http) {
25
29
  }
26
30
  return { url: result.url };
27
31
  },
32
+ async syncMolliePaymentStatus(orderCode, options) {
33
+ const data = await http.graphql(SYNC_MOLLIE_PAYMENT_STATUS, { orderCode }, options);
34
+ return data.syncMolliePaymentStatus;
35
+ },
28
36
  };
29
37
  }
30
38
  //# sourceMappingURL=payments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/commerce/payments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAS7C,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,OAAO;Q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AC;YACrD,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC;YAC9C,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,aAAa,CAAC,eAAe,EAAE,0CAA0C,CAAC,CAAC;YACvF,CAAC;YACD,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;gBAC1B,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,SAAmB,EAAE,MAAM,CAAC,OAAiB,EAAE,MAAM,CAAC,CAAC;YACxF,CAAC;YACD,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAa,EAAE,CAAC;QACvC,CAAC;QAED,KAAK,CAAC,uBAAuB,CAC3B,SAAiB,EACjB,OAAwB;YAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAE5B,0BAA0B,EAAE,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC,uBAAuB,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PickupLocation } from '../types.js';
2
+ export declare function parsePickupLocation(value: unknown): PickupLocation;
3
+ export declare function parsePickupLocations(value: unknown): PickupLocation[];
4
+ export declare function parseOptionalPickupLocation(value: unknown): PickupLocation | null;
5
+ export declare function normalizePickupLocationInput(value: unknown): PickupLocation;
6
+ //# sourceMappingURL=pickup-location-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pickup-location-parser.d.ts","sourceRoot":"","sources":["../../src/commerce/pickup-location-parser.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,aAAa,CAAC;AA4DrB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAiClE;AAOD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,CAIrE;AAGD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAGjF;AASD,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAE3E"}
@@ -0,0 +1,97 @@
1
+ import { StorefrontError } from '../errors.js';
2
+ function reject(field, message) {
3
+ throw new StorefrontError(`Invalid PickupLocation payload at "${field}": ${message}`, 'vendure');
4
+ }
5
+ function isPlainObject(value) {
6
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
7
+ }
8
+ function asNonEmptyString(value, field) {
9
+ if (typeof value !== 'string' || value.trim().length === 0) {
10
+ reject(field, 'expected non-empty string');
11
+ }
12
+ return value;
13
+ }
14
+ function asFiniteInteger(value, field, min, max) {
15
+ if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value)) {
16
+ reject(field, 'expected finite integer');
17
+ }
18
+ if (min !== undefined && value < min)
19
+ reject(field, `must be >= ${min}`);
20
+ if (max !== undefined && value > max)
21
+ reject(field, `must be <= ${max}`);
22
+ return value;
23
+ }
24
+ function parseAddress(value, field) {
25
+ if (!isPlainObject(value))
26
+ reject(field, 'expected object');
27
+ return {
28
+ streetLine1: asNonEmptyString(value.streetLine1, `${field}.streetLine1`),
29
+ number: asNonEmptyString(value.number, `${field}.number`),
30
+ postalCode: asNonEmptyString(value.postalCode, `${field}.postalCode`),
31
+ city: asNonEmptyString(value.city, `${field}.city`),
32
+ countryCode: asNonEmptyString(value.countryCode, `${field}.countryCode`),
33
+ ...(value.region !== undefined && value.region !== null
34
+ ? { region: asNonEmptyString(value.region, `${field}.region`) }
35
+ : {}),
36
+ };
37
+ }
38
+ const HHMM = /^[0-2]\d:[0-5]\d$/;
39
+ function parseOpeningHours(value, field) {
40
+ if (!isPlainObject(value))
41
+ reject(field, 'expected object');
42
+ const open = asNonEmptyString(value.open, `${field}.open`);
43
+ const close = asNonEmptyString(value.close, `${field}.close`);
44
+ if (!HHMM.test(open))
45
+ reject(`${field}.open`, 'expected HH:MM (24h)');
46
+ if (!HHMM.test(close))
47
+ reject(`${field}.close`, 'expected HH:MM (24h)');
48
+ return {
49
+ weekday: asFiniteInteger(value.weekday, `${field}.weekday`, 0, 6),
50
+ open,
51
+ close,
52
+ };
53
+ }
54
+ export function parsePickupLocation(value) {
55
+ if (!isPlainObject(value))
56
+ reject('pickupLocation', 'expected object');
57
+ const openingHoursRaw = value.openingHours;
58
+ if (openingHoursRaw !== undefined &&
59
+ openingHoursRaw !== null &&
60
+ !Array.isArray(openingHoursRaw)) {
61
+ reject('pickupLocation.openingHours', 'expected array when present');
62
+ }
63
+ const detailsRaw = value.details;
64
+ if (detailsRaw !== undefined && detailsRaw !== null && !isPlainObject(detailsRaw)) {
65
+ reject('pickupLocation.details', 'expected object when present');
66
+ }
67
+ const out = {
68
+ provider: asNonEmptyString(value.provider, 'pickupLocation.provider'),
69
+ carrier: asFiniteInteger(value.carrier, 'pickupLocation.carrier'),
70
+ locationCode: asNonEmptyString(value.locationCode, 'pickupLocation.locationCode'),
71
+ name: asNonEmptyString(value.name, 'pickupLocation.name'),
72
+ address: parseAddress(value.address, 'pickupLocation.address'),
73
+ };
74
+ if (Array.isArray(openingHoursRaw)) {
75
+ out.openingHours = openingHoursRaw.map((entry, idx) => parseOpeningHours(entry, `pickupLocation.openingHours[${idx}]`));
76
+ }
77
+ if (isPlainObject(detailsRaw)) {
78
+ out.details = detailsRaw;
79
+ }
80
+ return out;
81
+ }
82
+ export function parsePickupLocations(value) {
83
+ if (value === null || value === undefined)
84
+ return [];
85
+ if (!Array.isArray(value))
86
+ reject('pickupLocations', 'expected array');
87
+ return value.map((entry) => parsePickupLocation(entry));
88
+ }
89
+ export function parseOptionalPickupLocation(value) {
90
+ if (value === null || value === undefined)
91
+ return null;
92
+ return parsePickupLocation(value);
93
+ }
94
+ export function normalizePickupLocationInput(value) {
95
+ return parsePickupLocation(value);
96
+ }
97
+ //# sourceMappingURL=pickup-location-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pickup-location-parser.js","sourceRoot":"","sources":["../../src/commerce/p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CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,YAAY,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CACpD,iBAAiB,CAAC,KAAK,EAAE,+BAA+B,GAAG,GAAG,CAAC,CAChE,CAAC;IACJ,CAAC;IACD,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;QAI9B,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC;IAC3B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAOD,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACvE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1D,CAAC;AAGD,MAAM,UAAU,2BAA2B,CAAC,KAAc;IACxD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvD,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AASD,MAAM,UAAU,4BAA4B,CAAC,KAAc;IACzD,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC"}
@@ -1,9 +1,9 @@
1
- export declare const GET_PRODUCT = "\n query GetProduct($slug: String!) {\n product(slug: $slug) {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
2
- export declare const GET_PRODUCT_BY_ID = "\n query GetProductById($id: ID!) {\n product(id: $id) {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
3
- export declare const LIST_PRODUCTS = "\n query ListProducts($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
1
+ export declare const GET_PRODUCT = "\n query GetProduct($slug: String!) {\n product(slug: $slug) {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
2
+ export declare const GET_PRODUCT_BY_ID = "\n query GetProductById($id: ID!) {\n product(id: $id) {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
3
+ export declare const LIST_PRODUCTS = "\n query ListProducts($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
4
4
  export declare const LIST_FACETS = "\n query ListFacets {\n facets {\n items {\n id name code\n values { id name code }\n }\n totalItems\n }\n }\n";
5
5
  export declare const LIST_COLLECTIONS = "\n query ListCollections($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id name slug description\n breadcrumbs { id name slug }\n featuredAsset {\n source\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n parent { id name slug }\n children { id name slug }\n }\n totalItems\n }\n }\n";
6
- export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description\n featuredAsset {\n source\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n children { id name slug }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
6
+ export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description\n featuredAsset {\n source\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n children { id name slug }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
7
7
  export declare const SEARCH_PRODUCTS = "\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n items {\n productId productName slug description\n price { ... on SinglePrice { value } ... on PriceRange { min max } }\n priceWithTax { ... on SinglePrice { value } ... on PriceRange { min max } }\n currencyCode\n productAsset { preview focalPoint { x y } }\n collectionIds\n inStock\n }\n totalItems\n facetValues { facetValue { id name code facet { id name code } } count }\n }\n }\n";
8
8
  export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
9
9
  export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable order { id } }\n }\n }\n";
@@ -19,13 +19,18 @@ export declare const SET_SHIPPING_METHOD = "\n mutation SetShippingMethod($ids:
19
19
  export declare const ELIGIBLE_PAYMENT_METHODS = "\n query PaymentMethods {\n eligiblePaymentMethods {\n id name code description isEligible eligibilityMessage\n }\n }\n";
20
20
  export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { id state }\n ... on OrderStateTransitionError { errorCode message transitionError }\n }\n }\n";
21
21
  export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order { id code state totalWithTax }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError { errorCode message paymentErrorMessage }\n ... on PaymentDeclinedError { errorCode message paymentErrorMessage }\n ... on OrderStateTransitionError { errorCode message transitionError }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
22
+ export declare const PICKUP_LOCATIONS = "\n query PickupLocations($input: PickupLocationSearchInput!) {\n pickupLocations(input: $input) {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
23
+ export declare const ACTIVE_ORDER_PICKUP_LOCATION = "\n query ActiveOrderPickupLocation {\n activeOrderPickupLocation {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
24
+ export declare const SET_ACTIVE_ORDER_PICKUP_LOCATION = "\n mutation SetActiveOrderPickupLocation($location: StoredPickupLocationInput!) {\n setActiveOrderPickupLocation(location: $location) {\n __typename\n ... on Order {\n id code state\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
22
25
  export declare const CREATE_STRIPE_PAYMENT_INTENT = "\n mutation CreateStripePaymentIntent {\n createStripePaymentIntent\n }\n";
23
- export declare const MOLLIE_PAYMENT_METHODS = "\n query MolliePaymentMethods($input: MolliePaymentMethodsInput!) {\n molliePaymentMethods(input: $input) {\n id\n code\n description\n minimumAmount { value currency }\n maximumAmount { value currency }\n image { size1x size2x svg }\n }\n }\n";
26
+ export declare const MOLLIE_PAYMENT_METHODS = "\n query MolliePaymentMethods($input: MolliePaymentMethodsInput!) {\n molliePaymentMethods(input: $input) {\n id\n code\n description\n minimumAmount { value currency }\n maximumAmount { value currency }\n image { size1x size2x svg }\n status\n }\n }\n";
27
+ export declare const ORDERED_MOLLIE_PAYMENT_METHODS = "\n query OrderedMolliePaymentMethods($paymentMethodCode: String!) {\n orderedMolliePaymentMethods(paymentMethodCode: $paymentMethodCode) {\n id\n code\n description\n imageUrl\n status\n }\n }\n";
24
28
  export declare const CREATE_MOLLIE_PAYMENT_INTENT = "\n mutation CreateMolliePaymentIntent($input: MolliePaymentIntentInput!) {\n createMolliePaymentIntent(input: $input) {\n ... on MolliePaymentIntent { url }\n ... on MolliePaymentIntentError { errorCode message }\n }\n }\n";
29
+ export declare const SYNC_MOLLIE_PAYMENT_STATUS = "\n mutation SyncMolliePaymentStatus($orderCode: String!) {\n syncMolliePaymentStatus(orderCode: $orderCode) {\n id\n code\n state\n }\n }\n";
25
30
  export declare const LOGIN = "\n mutation Login($email: String!, $password: String!) {\n login(username: $email, password: $password) {\n ... on CurrentUser { id identifier }\n ... on InvalidCredentialsError { errorCode message authenticationError }\n ... on NotVerifiedError { errorCode message }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
26
31
  export declare const REGISTER = "\n mutation Register($input: RegisterCustomerInput!) {\n registerCustomerAccount(input: $input) {\n ... on Success { success }\n ... on MissingPasswordError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
27
- export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n id code state totalWithTax createdAt\n lines { id quantity productVariant { name } }\n }\n totalItems\n }\n }\n }\n";
28
- export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n id code state totalWithTax createdAt\n lines { id quantity productVariant { name } }\n }\n totalItems\n }\n }\n }\n";
32
+ export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n id code state totalWithTax createdAt\n lines { id quantity productVariant { name } }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n\n }\n totalItems\n }\n }\n }\n";
33
+ export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n id code state totalWithTax createdAt\n lines { id quantity productVariant { name } }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n\n }\n totalItems\n }\n }\n }\n";
29
34
  export declare const LOGOUT = "\n mutation Logout {\n logout { success }\n }\n";
30
35
  export declare const UPDATE_CUSTOMER = "\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n id firstName lastName emailAddress phoneNumber\n }\n }\n";
31
36
  export declare const UPDATE_PASSWORD = "\n mutation UpdatePassword($currentPassword: String!, $newPassword: String!) {\n updateCustomerPassword(currentPassword: $currentPassword, newPassword: $newPassword) {\n ... on Success { success }\n ... on InvalidCredentialsError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
@@ -39,21 +44,28 @@ export declare const CREATE_ADDRESS = "\n mutation CreateAddress($input: Create
39
44
  export declare const UPDATE_ADDRESS = "\n mutation UpdateAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n }\n";
40
45
  export declare const DELETE_ADDRESS = "\n mutation DeleteAddress($id: ID!) {\n deleteCustomerAddress(id: $id) {\n success\n }\n }\n";
41
46
  export declare const AVAILABLE_COUNTRIES = "\n query AvailableCountries {\n availableCountries {\n id code name\n }\n }\n";
42
- export declare const ORDER_BY_CODE = "\n query OrderByCode($code: String!) {\n orderByCode(code: $code) { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
47
+ export declare const ORDER_BY_CODE = "\n query OrderByCode($code: String!) {\n orderByCode(code: $code) {\n \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n\n }\n }\n";
43
48
  export declare const FAVORITE_VARIANT_IDS = "\n query FavoriteVariantIds {\n favoriteProductVariantIds\n }\n";
44
- export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
49
+ export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
45
50
  export declare const TOGGLE_FAVORITE = "\n mutation ToggleFavorite($productVariantId: ID!) {\n toggleFavorite(productVariantId: $productVariantId)\n }\n";
46
51
  export declare const REMOVE_FAVORITE = "\n mutation RemoveFavorite($productVariantId: ID!) {\n removeFavorite(productVariantId: $productVariantId)\n }\n";
47
- export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n }\n\n }\n }\n";
52
+ export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n }\n\n }\n }\n";
48
53
  export declare const PROPERTY_GROUPS = "\n query PropertyGroups {\n productPropertyGroups {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength allowedCollectionIds filterableFieldSlugs }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n }\n";
49
54
  export declare const PRODUCT_PROPERTIES = "\n query ProductProperties($productId: ID!) {\n productPropertyValues(productId: $productId) {\n group {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n values { id propertyId languageCode value }\n }\n }\n";
50
- export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
55
+ export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
51
56
  export declare const GET_EXCHANGE_RATES = "\n query ExchangeRates {\n exchangeRates {\n baseCurrency targetCurrency rate inverseRate rateDate\n }\n }\n";
52
- export declare const CONVERT_CURRENCY = "\n query ConvertCurrency($amount: String!, $from: String!, $to: String!) {\n convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {\n amount fromCurrency toCurrency rate result\n }\n }\n";
57
+ export declare const CONVERT_CURRENCY = "\n query ConvertCurrency($amount: String!, $from: String!, $to: String!) {\n convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
58
+ export declare const GET_EXCHANGE_RATE = "\n query ExchangeRate($targetCurrency: String!) {\n exchangeRate(targetCurrency: $targetCurrency) {\n baseCurrency targetCurrency rate inverseRate rateDate\n }\n }\n";
59
+ export declare const CONVERT_FROM_BASE = "\n query ConvertFromBase($amount: String!, $targetCurrency: String!) {\n convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
60
+ export declare const CONVERT_TO_BASE = "\n query ConvertToBase($amount: String!, $sourceCurrency: String!) {\n convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
61
+ export declare const CONVERT_TO_MULTIPLE = "\n query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {\n convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {\n currency amount rate\n }\n }\n";
53
62
  export declare const MY_QUOTES = "\n query MyQuotes($options: QuoteListOptions) {\n myQuotes(options: $options) {\n items { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n totalItems\n }\n }\n";
54
63
  export declare const MY_QUOTE = "\n query MyQuote($id: ID!) {\n myQuote(id: $id) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
55
64
  export declare const CREATE_QUOTE_REQUEST = "\n mutation CreateQuoteRequest($input: CreateQuoteRequestInput!) {\n createQuoteRequest(input: $input) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
56
65
  export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
57
66
  export declare const CANCEL_MY_QUOTE = "\n mutation CancelMyQuote($id: ID!, $reason: String) {\n cancelMyQuote(id: $id, reason: $reason) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
58
67
  export declare const GET_BRANDING = "\n query GetBranding($ids: [ID!]!) {\n activeChannel {\n id\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n }\n fontResources {\n id\n identifier\n kind\n family\n weights\n files {\n id\n source\n preview\n mimeType\n }\n }\n brandingAssets(ids: $ids) {\n id\n source\n preview\n mimeType\n }\n }\n";
68
+ export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
69
+ export declare const MY_ORDER_INVOICES = "\n query MyOrderInvoices($orderCode: String!) {\n myOrderInvoices(orderCode: $orderCode) {\n id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt\n }\n }\n";
70
+ export declare const MY_INVOICE_PDF = "\n query MyInvoicePdf($invoiceId: ID!) {\n myInvoicePdf(invoiceId: $invoiceId) {\n base64 filename invoiceNumber\n }\n }\n";
59
71
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAoCA,eAA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