@sixtyninecommerce/client 0.4.1 → 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.
- package/dist/commerce/checkout.d.ts +2 -1
- package/dist/commerce/checkout.d.ts.map +1 -1
- package/dist/commerce/checkout.js +5 -1
- package/dist/commerce/checkout.js.map +1 -1
- package/dist/commerce/customer.d.ts +3 -1
- package/dist/commerce/customer.d.ts.map +1 -1
- package/dist/commerce/customer.js +13 -1
- package/dist/commerce/customer.js.map +1 -1
- package/dist/commerce/payments.d.ts +3 -1
- package/dist/commerce/payments.d.ts.map +1 -1
- package/dist/commerce/payments.js +9 -1
- package/dist/commerce/payments.js.map +1 -1
- package/dist/commerce/queries.d.ts +21 -12
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +96 -2
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/shipping.d.ts +3 -0
- package/dist/commerce/shipping.d.ts.map +1 -1
- package/dist/commerce/shipping.js +7 -3
- package/dist/commerce/shipping.js.map +1 -1
- package/dist/commerce/subscriptions.d.ts +16 -1
- package/dist/commerce/subscriptions.d.ts.map +1 -1
- package/dist/commerce/subscriptions.js +64 -4
- package/dist/commerce/subscriptions.js.map +1 -1
- package/dist/content/collections.d.ts +9 -0
- package/dist/content/collections.d.ts.map +1 -0
- package/dist/content/collections.js +39 -0
- package/dist/content/collections.js.map +1 -0
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +2 -0
- package/dist/content/index.js.map +1 -1
- package/dist/currency/exchange.d.ts +5 -1
- package/dist/currency/exchange.d.ts.map +1 -1
- package/dist/currency/exchange.js +25 -1
- package/dist/currency/exchange.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +159 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpClient } from '../core/http.js';
|
|
2
|
-
import type { AddressInput, CustomerInput, Order, PaymentInput, PaymentMethod, PickupLocation, PickupLocationSearchInput, 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,6 +7,7 @@ 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>;
|
|
12
13
|
findPickupLocations(input: PickupLocationSearchInput): Promise<PickupLocation[]>;
|
|
@@ -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,EACd,yBAAyB,EACzB,cAAc,EACf,MAAM,aAAa,CAAC;
|
|
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,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,KAAK,EACL,YAAY,EACZ,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,cAAc,EACf,MAAM,aAAa,CAAC;AA0CrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;+BAEjB,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;8BAK/B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;6BAO9B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;kCAOxB,OAAO,CAAC,cAAc,EAAE,CAAC;2BAOhC,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC;iCAOnB,OAAO,CAAC,aAAa,EAAE,CAAC;2BAY9B,OAAO,CAAC,6BAA6B,CAAC;oCAO7B,OAAO,CAAC,KAAK,CAAC;sBAK5B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;+BAYpB,yBAAyB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;mCAiBjD,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;+BAYnC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;EAOlE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutationError } from '../errors.js';
|
|
2
2
|
import { normalizePickupLocationInput, parseOptionalPickupLocation, parsePickupLocations, } from './pickup-location-parser.js';
|
|
3
|
-
import { 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
|
+
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';
|
|
4
4
|
function unwrapResult(data, field) {
|
|
5
5
|
const result = data[field];
|
|
6
6
|
if (!result) {
|
|
@@ -47,6 +47,10 @@ export function createCheckoutMethods(http) {
|
|
|
47
47
|
const data = await http.graphql(ELIGIBLE_PAYMENT_METHODS);
|
|
48
48
|
return data.eligiblePaymentMethods;
|
|
49
49
|
},
|
|
50
|
+
async getOrderConstraints() {
|
|
51
|
+
const data = await http.graphql(ACTIVE_CHANNEL_ORDER_CONSTRAINTS);
|
|
52
|
+
return data.activeChannelOrderConstraints;
|
|
53
|
+
},
|
|
50
54
|
async transitionToArrangingPayment() {
|
|
51
55
|
const data = await http.graphql(TRANSITION_TO_ARRANGING_PAYMENT);
|
|
52
56
|
return unwrapResult(data, 'transitionOrderToState');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAY7C,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC5B,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gCAAgC,EAChC,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,C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KAAK,CAAC,oBAAoB,CAAC,QAAwB;YACjD,MAAM,UAAU,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,gCAAgC,EAAE;gBACzF,QAAQ,EAAE,UAAU;aACrB,CAAC,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;QAC5D,CAAC;QAMD,KAAK,CAAC,uBAAuB;YAC3B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,4BAA4B,CAC7B,CAAC;YACF,OAAO,2BAA2B,CAAC,IAAI,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;
|
|
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,eAAe,EACf,kBAAkB,EAClB,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAqCrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;iBAI/B,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;oBAKnE,aAAa,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;cAKnD,OAAO,CAAC,IAAI,CAAC;yBAKpB,MAAM,aACF,MAAM,GAChB,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;sCAQN,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;oCASxB,MAAM,eAAe,MAAM,GAAG,OAAO,CAAC,IAAI,C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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;
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources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;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;
|
|
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;
|
|
1
|
+
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/commerce/payments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7C,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,OAAO;QACL,KAAK,CAAC,yBAAyB,CAAC,OAAwB;YACtD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,4BAA4B,EAC5B,SAAS,EACT,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,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"}
|
|
@@ -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";
|
|
@@ -23,12 +23,14 @@ export declare const PICKUP_LOCATIONS = "\n query PickupLocations($input: Picku
|
|
|
23
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
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";
|
|
25
25
|
export declare const CREATE_STRIPE_PAYMENT_INTENT = "\n mutation CreateStripePaymentIntent {\n createStripePaymentIntent\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 }\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";
|
|
27
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";
|
|
28
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";
|
|
29
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";
|
|
30
|
-
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";
|
|
31
|
-
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";
|
|
32
34
|
export declare const LOGOUT = "\n mutation Logout {\n logout { success }\n }\n";
|
|
33
35
|
export declare const UPDATE_CUSTOMER = "\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n id firstName lastName emailAddress phoneNumber\n }\n }\n";
|
|
34
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";
|
|
@@ -42,21 +44,28 @@ export declare const CREATE_ADDRESS = "\n mutation CreateAddress($input: Create
|
|
|
42
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";
|
|
43
45
|
export declare const DELETE_ADDRESS = "\n mutation DeleteAddress($id: ID!) {\n deleteCustomerAddress(id: $id) {\n success\n }\n }\n";
|
|
44
46
|
export declare const AVAILABLE_COUNTRIES = "\n query AvailableCountries {\n availableCountries {\n id code name\n }\n }\n";
|
|
45
|
-
export declare const ORDER_BY_CODE = "\n query OrderByCode($code: String!) {\n orderByCode(code: $code) {
|
|
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";
|
|
46
48
|
export declare const FAVORITE_VARIANT_IDS = "\n query FavoriteVariantIds {\n favoriteProductVariantIds\n }\n";
|
|
47
|
-
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";
|
|
48
50
|
export declare const TOGGLE_FAVORITE = "\n mutation ToggleFavorite($productVariantId: ID!) {\n toggleFavorite(productVariantId: $productVariantId)\n }\n";
|
|
49
51
|
export declare const REMOVE_FAVORITE = "\n mutation RemoveFavorite($productVariantId: ID!) {\n removeFavorite(productVariantId: $productVariantId)\n }\n";
|
|
50
|
-
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";
|
|
51
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";
|
|
52
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";
|
|
53
|
-
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";
|
|
54
56
|
export declare const GET_EXCHANGE_RATES = "\n query ExchangeRates {\n exchangeRates {\n baseCurrency targetCurrency rate inverseRate rateDate\n }\n }\n";
|
|
55
|
-
export declare const CONVERT_CURRENCY = "\n query ConvertCurrency($amount: String!, $from: String!, $to: String!) {\n convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {\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";
|
|
56
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";
|
|
57
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";
|
|
58
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";
|
|
59
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";
|
|
60
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";
|
|
61
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";
|
|
62
71
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,WAAW,khFAwDvB,CAAC;AAEF,eAAO,MAAM,i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TAIpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,+WAIhC,CAAC;AAEF,eAAO,MAAM,YAAY,67BAIxB,CAAC;AAEF,eAAO,MAAM,eAAe,yWAI3B,CAAC;AAOF,eAAO,MAAM,YAAY,kcA4BxB,CAAC;AAIF,eAAO,MAAM,gCAAgC,sMAS5C,CAAC;AAIF,eAAO,MAAM,iBAAiB,qMAM7B,CAAC;AAEF,eAAO,MAAM,cAAc,4IAM1B,CAAC"}
|
package/dist/commerce/queries.js
CHANGED
|
@@ -49,6 +49,7 @@ export const GET_PRODUCT = `
|
|
|
49
49
|
variants {
|
|
50
50
|
id name sku
|
|
51
51
|
price priceWithTax currencyCode stockLevel
|
|
52
|
+
stockOnHand stockAllocated saleable
|
|
52
53
|
priceListName retailPrice retailPriceWithTax
|
|
53
54
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
54
55
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -105,6 +106,7 @@ export const GET_PRODUCT_BY_ID = `
|
|
|
105
106
|
variants {
|
|
106
107
|
id name sku
|
|
107
108
|
price priceWithTax currencyCode stockLevel
|
|
109
|
+
stockOnHand stockAllocated saleable
|
|
108
110
|
priceListName retailPrice retailPriceWithTax
|
|
109
111
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
110
112
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -150,6 +152,7 @@ export const LIST_PRODUCTS = `
|
|
|
150
152
|
variants {
|
|
151
153
|
id name sku
|
|
152
154
|
price priceWithTax currencyCode stockLevel
|
|
155
|
+
stockOnHand stockAllocated saleable
|
|
153
156
|
priceListName retailPrice retailPriceWithTax
|
|
154
157
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
155
158
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -214,6 +217,7 @@ export const GET_COLLECTION = `
|
|
|
214
217
|
featuredAsset { source presets { m { url webpUrl } } }
|
|
215
218
|
}
|
|
216
219
|
price priceWithTax currencyCode stockLevel
|
|
220
|
+
stockOnHand stockAllocated saleable
|
|
217
221
|
priceListName retailPrice retailPriceWithTax
|
|
218
222
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
219
223
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -268,6 +272,12 @@ const ORDER_FIELDS = `
|
|
|
268
272
|
customer { id firstName lastName emailAddress }
|
|
269
273
|
couponCodes
|
|
270
274
|
`;
|
|
275
|
+
const ORDER_FULFILLMENTS_FRAGMENT = `
|
|
276
|
+
fulfillments {
|
|
277
|
+
id state method trackingCode createdAt updatedAt
|
|
278
|
+
lines { orderLineId quantity }
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
271
281
|
export const ACTIVE_ORDER = `
|
|
272
282
|
query ActiveOrder {
|
|
273
283
|
activeOrder { ${ORDER_FIELDS} }
|
|
@@ -460,6 +470,18 @@ export const MOLLIE_PAYMENT_METHODS = `
|
|
|
460
470
|
minimumAmount { value currency }
|
|
461
471
|
maximumAmount { value currency }
|
|
462
472
|
image { size1x size2x svg }
|
|
473
|
+
status
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
`;
|
|
477
|
+
export const ORDERED_MOLLIE_PAYMENT_METHODS = `
|
|
478
|
+
query OrderedMolliePaymentMethods($paymentMethodCode: String!) {
|
|
479
|
+
orderedMolliePaymentMethods(paymentMethodCode: $paymentMethodCode) {
|
|
480
|
+
id
|
|
481
|
+
code
|
|
482
|
+
description
|
|
483
|
+
imageUrl
|
|
484
|
+
status
|
|
463
485
|
}
|
|
464
486
|
}
|
|
465
487
|
`;
|
|
@@ -471,6 +493,15 @@ export const CREATE_MOLLIE_PAYMENT_INTENT = `
|
|
|
471
493
|
}
|
|
472
494
|
}
|
|
473
495
|
`;
|
|
496
|
+
export const SYNC_MOLLIE_PAYMENT_STATUS = `
|
|
497
|
+
mutation SyncMolliePaymentStatus($orderCode: String!) {
|
|
498
|
+
syncMolliePaymentStatus(orderCode: $orderCode) {
|
|
499
|
+
id
|
|
500
|
+
code
|
|
501
|
+
state
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
`;
|
|
474
505
|
export const LOGIN = `
|
|
475
506
|
mutation Login($email: String!, $password: String!) {
|
|
476
507
|
login(username: $email, password: $password) {
|
|
@@ -504,6 +535,7 @@ export const GET_CURRENT_CUSTOMER = `
|
|
|
504
535
|
items {
|
|
505
536
|
id code state totalWithTax createdAt
|
|
506
537
|
lines { id quantity productVariant { name } }
|
|
538
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
507
539
|
}
|
|
508
540
|
totalItems
|
|
509
541
|
}
|
|
@@ -517,6 +549,7 @@ export const GET_CUSTOMER_ORDERS = `
|
|
|
517
549
|
items {
|
|
518
550
|
id code state totalWithTax createdAt
|
|
519
551
|
lines { id quantity productVariant { name } }
|
|
552
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
520
553
|
}
|
|
521
554
|
totalItems
|
|
522
555
|
}
|
|
@@ -640,7 +673,10 @@ export const AVAILABLE_COUNTRIES = `
|
|
|
640
673
|
`;
|
|
641
674
|
export const ORDER_BY_CODE = `
|
|
642
675
|
query OrderByCode($code: String!) {
|
|
643
|
-
orderByCode(code: $code) {
|
|
676
|
+
orderByCode(code: $code) {
|
|
677
|
+
${ORDER_FIELDS}
|
|
678
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
679
|
+
}
|
|
644
680
|
}
|
|
645
681
|
`;
|
|
646
682
|
export const FAVORITE_VARIANT_IDS = `
|
|
@@ -658,6 +694,7 @@ export const MY_FAVORITES = `
|
|
|
658
694
|
productVariant {
|
|
659
695
|
id name sku
|
|
660
696
|
price priceWithTax currencyCode stockLevel
|
|
697
|
+
stockOnHand stockAllocated saleable
|
|
661
698
|
priceListName retailPrice retailPriceWithTax
|
|
662
699
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
663
700
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -700,6 +737,7 @@ const CHANNEL_CUSTOM_FIELDS_FRAGMENT = `
|
|
|
700
737
|
cdnDomain maintenanceMode
|
|
701
738
|
urlLocaleStrategy urlLocalePrefixDefault
|
|
702
739
|
twitterHandle defaultOgImageId llmsTxtEnabled
|
|
740
|
+
storefrontUrl quotesEnabled
|
|
703
741
|
}
|
|
704
742
|
`;
|
|
705
743
|
export const GET_ACTIVE_CHANNEL = `
|
|
@@ -762,6 +800,7 @@ export const GET_PRODUCT_RECOMMENDATIONS = `
|
|
|
762
800
|
variants {
|
|
763
801
|
id name sku
|
|
764
802
|
price priceWithTax currencyCode stockLevel
|
|
803
|
+
stockOnHand stockAllocated saleable
|
|
765
804
|
priceListName retailPrice retailPriceWithTax
|
|
766
805
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
767
806
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -778,10 +817,41 @@ export const GET_EXCHANGE_RATES = `
|
|
|
778
817
|
}
|
|
779
818
|
}
|
|
780
819
|
`;
|
|
820
|
+
const CONVERTED_AMOUNT_FIELDS = `
|
|
821
|
+
originalAmount originalCurrency convertedAmount targetCurrency rate rateDate
|
|
822
|
+
`;
|
|
781
823
|
export const CONVERT_CURRENCY = `
|
|
782
824
|
query ConvertCurrency($amount: String!, $from: String!, $to: String!) {
|
|
783
825
|
convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {
|
|
784
|
-
|
|
826
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
`;
|
|
830
|
+
export const GET_EXCHANGE_RATE = `
|
|
831
|
+
query ExchangeRate($targetCurrency: String!) {
|
|
832
|
+
exchangeRate(targetCurrency: $targetCurrency) {
|
|
833
|
+
baseCurrency targetCurrency rate inverseRate rateDate
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
`;
|
|
837
|
+
export const CONVERT_FROM_BASE = `
|
|
838
|
+
query ConvertFromBase($amount: String!, $targetCurrency: String!) {
|
|
839
|
+
convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {
|
|
840
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
`;
|
|
844
|
+
export const CONVERT_TO_BASE = `
|
|
845
|
+
query ConvertToBase($amount: String!, $sourceCurrency: String!) {
|
|
846
|
+
convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {
|
|
847
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
`;
|
|
851
|
+
export const CONVERT_TO_MULTIPLE = `
|
|
852
|
+
query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {
|
|
853
|
+
convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {
|
|
854
|
+
currency amount rate
|
|
785
855
|
}
|
|
786
856
|
}
|
|
787
857
|
`;
|
|
@@ -851,4 +921,28 @@ export const GET_BRANDING = `
|
|
|
851
921
|
}
|
|
852
922
|
}
|
|
853
923
|
`;
|
|
924
|
+
export const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = `
|
|
925
|
+
query ActiveChannelOrderConstraints {
|
|
926
|
+
activeChannelOrderConstraints {
|
|
927
|
+
minOrderAmountGross
|
|
928
|
+
fulfillmentMinOrderNet
|
|
929
|
+
currencyCode
|
|
930
|
+
customerIsExempt
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
`;
|
|
934
|
+
export const MY_ORDER_INVOICES = `
|
|
935
|
+
query MyOrderInvoices($orderCode: String!) {
|
|
936
|
+
myOrderInvoices(orderCode: $orderCode) {
|
|
937
|
+
id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
`;
|
|
941
|
+
export const MY_INVOICE_PDF = `
|
|
942
|
+
query MyInvoicePdf($invoiceId: ID!) {
|
|
943
|
+
myInvoicePdf(invoiceId: $invoiceId) {
|
|
944
|
+
base64 filename invoiceNumber
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
`;
|
|
854
948
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;CAU1B,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7B,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;CAgB9B,CAAC;AAOF,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BpB,CAAC;AAOF,MAAM,2BAA2B,GAAG;;;;;CAKnC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;oBAER,YAAY;;CAE/B,CAAC;AAEF,MAAM,CAAC,MAAM,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EC,YAAY;;CAEpC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;0CAEM,YAAY;;CAErD,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;6BAEC,YAAY;;CAExC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;;gDAEiB,YAAY;;CAE3D,CAAC;AAOF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B3B,CAAC;AAIF,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;CAS/C,CAAC;AAIF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;CAMhC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;CAM7B,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { HttpClient } from '../core/http.js';
|
|
2
2
|
import type { DeliveryOption, DeliveryOptionsInput, DropOffPoint, DropOffPointInput, ShipmentTrackingInfo } from '../types.js';
|
|
3
|
+
export declare const DROP_OFF_POINTS = "\n query MyparcelDropOffPoints($input: MyparcelDropOffPointInput!) {\n myparcelDropOffPoints(input: $input) {\n location_code\n location_name\n street\n number\n number_suffix\n postal_code\n city\n cc\n phone\n reference\n longitude\n latitude\n available_days\n cut_off_time\n carrier_id\n distance\n }\n }\n";
|
|
4
|
+
export declare const DELIVERY_OPTIONS = "\n query MyparcelDeliveryOptions($input: MyparcelDeliveryOptionsInput!) {\n myparcelDeliveryOptions(input: $input) {\n date\n time {\n start\n end\n price_comment\n price { amount currency }\n type\n }\n }\n }\n";
|
|
5
|
+
export declare const TRACK_SHIPMENT = "\n query MyparcelTrackShipment($barcode: String!, $postalCode: String!) {\n myparcelTrackShipment(barcode: $barcode, postalCode: $postalCode) {\n shipment_id\n status {\n current\n final\n }\n history {\n status\n time\n }\n barcode\n link_consumer_portal\n }\n }\n";
|
|
3
6
|
export declare function createShippingMethods(http: HttpClient): {
|
|
4
7
|
getDropOffPoints(input: DropOffPointInput): Promise<DropOffPoint[]>;
|
|
5
8
|
getDeliveryOptions(input: DeliveryOptionsInput): Promise<DeliveryOption[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,eAAe,mZAqB3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,kRAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,qVAgB1B,CAAC;AAqFF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;4BAEpB,iBAAiB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;8BAQzC,oBAAoB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;2BAQnD,MAAM,cAAc,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;EAQjG"}
|