@geins/types 0.8.0 → 0.9.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/oms/checkout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomerType, GeinsSettings } from '../common';
|
|
2
2
|
import type { GeinsUserType } from '../generated';
|
|
3
3
|
import type { CartType } from '../oms/cart';
|
|
4
|
-
import type { AddressType, CheckoutRedirectsType, PaymentOptionType, ShippingOptionType } from '../shared';
|
|
4
|
+
import type { AddressType, CheckoutRedirectsType, PaymentOptionType, ShippingOptionType, RequestContext } from '../shared';
|
|
5
5
|
declare enum CheckoutStatus {
|
|
6
6
|
OK = "OK",
|
|
7
7
|
CUSTOMER_BLACKLISTED = "CUSTOMER_BLACKLISTED"
|
|
@@ -54,15 +54,18 @@ export type GetCheckoutOptions = {
|
|
|
54
54
|
shippingMethodId?: number;
|
|
55
55
|
checkoutOptions?: CheckoutInputType;
|
|
56
56
|
checkoutMarketId?: number;
|
|
57
|
+
requestContext?: RequestContext;
|
|
57
58
|
};
|
|
58
59
|
export type ValidateOrderConditionsArgs = {
|
|
59
60
|
cartId: string;
|
|
60
61
|
email?: string;
|
|
62
|
+
requestContext?: RequestContext;
|
|
61
63
|
};
|
|
62
64
|
export type CreateOrderOptions = {
|
|
63
65
|
cartId?: string;
|
|
64
66
|
checkoutOptions: CheckoutInputType;
|
|
65
67
|
checkoutMarketId?: string;
|
|
68
|
+
requestContext?: RequestContext;
|
|
66
69
|
};
|
|
67
70
|
export type CheckoutType = {
|
|
68
71
|
email?: string;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional per-request overrides for locale and market context.
|
|
3
|
+
*
|
|
4
|
+
* When passed to service methods, these fields take precedence over the
|
|
5
|
+
* SDK-level settings configured in GeinsSettings. This allows a single SDK
|
|
6
|
+
* instance to serve requests targeting different locales or markets without
|
|
7
|
+
* reinitialisation.
|
|
8
|
+
*/
|
|
9
|
+
export type RequestContext = {
|
|
10
|
+
/** BCP-47 language tag to use instead of the SDK-level locale (e.g. "sv-SE"). */
|
|
11
|
+
languageId?: string;
|
|
12
|
+
/** Market identifier to use instead of the SDK-level market (e.g. "se"). */
|
|
13
|
+
marketId?: string;
|
|
14
|
+
/** Channel identifier to use instead of the derived channelId (e.g. "channel|tld"). */
|
|
15
|
+
channelId?: string;
|
|
16
|
+
};
|