@geins/types 0.7.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.
@@ -52,12 +52,18 @@ export declare enum GeinsEventType {
52
52
  SESSION_REFRESH = "SESSION_REFRESH",
53
53
  /** Session expired — refresh failed, user must re-authenticate */
54
54
  SESSION_EXPIRED = "SESSION_EXPIRED",
55
- /** Parent event for all favorites-related events */
56
- FAVORITES = "FAVORITES",
57
- /** Item added to favorites */
58
- FAVORITES_ADD = "FAVORITES_ADD",
59
- /** Item removed from favorites */
60
- FAVORITES_REMOVE = "FAVORITES_REMOVE",
61
- /** All favorites cleared */
62
- FAVORITES_CLEAR = "FAVORITES_CLEAR"
55
+ /** Parent event for all list-related events */
56
+ LIST = "LIST",
57
+ /** A new list was created */
58
+ LIST_CREATE = "LIST_CREATE",
59
+ /** A list was deleted */
60
+ LIST_DELETE = "LIST_DELETE",
61
+ /** A list was updated (renamed, reordered, etc.) */
62
+ LIST_UPDATE = "LIST_UPDATE",
63
+ /** An item was added to a list */
64
+ LIST_ADD_ITEM = "LIST_ADD_ITEM",
65
+ /** An item was removed from a list */
66
+ LIST_REMOVE_ITEM = "LIST_REMOVE_ITEM",
67
+ /** All items were cleared from a list */
68
+ LIST_CLEAR = "LIST_CLEAR"
63
69
  }
package/dist/index.cjs CHANGED
@@ -46,14 +46,20 @@ exports.GeinsEventType = void 0;
46
46
  GeinsEventType["SESSION_REFRESH"] = "SESSION_REFRESH";
47
47
  /** Session expired — refresh failed, user must re-authenticate */
48
48
  GeinsEventType["SESSION_EXPIRED"] = "SESSION_EXPIRED";
49
- /** Parent event for all favorites-related events */
50
- GeinsEventType["FAVORITES"] = "FAVORITES";
51
- /** Item added to favorites */
52
- GeinsEventType["FAVORITES_ADD"] = "FAVORITES_ADD";
53
- /** Item removed from favorites */
54
- GeinsEventType["FAVORITES_REMOVE"] = "FAVORITES_REMOVE";
55
- /** All favorites cleared */
56
- GeinsEventType["FAVORITES_CLEAR"] = "FAVORITES_CLEAR";
49
+ /** Parent event for all list-related events */
50
+ GeinsEventType["LIST"] = "LIST";
51
+ /** A new list was created */
52
+ GeinsEventType["LIST_CREATE"] = "LIST_CREATE";
53
+ /** A list was deleted */
54
+ GeinsEventType["LIST_DELETE"] = "LIST_DELETE";
55
+ /** A list was updated (renamed, reordered, etc.) */
56
+ GeinsEventType["LIST_UPDATE"] = "LIST_UPDATE";
57
+ /** An item was added to a list */
58
+ GeinsEventType["LIST_ADD_ITEM"] = "LIST_ADD_ITEM";
59
+ /** An item was removed from a list */
60
+ GeinsEventType["LIST_REMOVE_ITEM"] = "LIST_REMOVE_ITEM";
61
+ /** All items were cleared from a list */
62
+ GeinsEventType["LIST_CLEAR"] = "LIST_CLEAR";
57
63
  })(exports.GeinsEventType || (exports.GeinsEventType = {}));
58
64
 
59
65
  exports.CustomerType = void 0;
package/dist/index.esm.js CHANGED
@@ -44,14 +44,20 @@ var GeinsEventType;
44
44
  GeinsEventType["SESSION_REFRESH"] = "SESSION_REFRESH";
45
45
  /** Session expired — refresh failed, user must re-authenticate */
46
46
  GeinsEventType["SESSION_EXPIRED"] = "SESSION_EXPIRED";
47
- /** Parent event for all favorites-related events */
48
- GeinsEventType["FAVORITES"] = "FAVORITES";
49
- /** Item added to favorites */
50
- GeinsEventType["FAVORITES_ADD"] = "FAVORITES_ADD";
51
- /** Item removed from favorites */
52
- GeinsEventType["FAVORITES_REMOVE"] = "FAVORITES_REMOVE";
53
- /** All favorites cleared */
54
- GeinsEventType["FAVORITES_CLEAR"] = "FAVORITES_CLEAR";
47
+ /** Parent event for all list-related events */
48
+ GeinsEventType["LIST"] = "LIST";
49
+ /** A new list was created */
50
+ GeinsEventType["LIST_CREATE"] = "LIST_CREATE";
51
+ /** A list was deleted */
52
+ GeinsEventType["LIST_DELETE"] = "LIST_DELETE";
53
+ /** A list was updated (renamed, reordered, etc.) */
54
+ GeinsEventType["LIST_UPDATE"] = "LIST_UPDATE";
55
+ /** An item was added to a list */
56
+ GeinsEventType["LIST_ADD_ITEM"] = "LIST_ADD_ITEM";
57
+ /** An item was removed from a list */
58
+ GeinsEventType["LIST_REMOVE_ITEM"] = "LIST_REMOVE_ITEM";
59
+ /** All items were cleared from a list */
60
+ GeinsEventType["LIST_CLEAR"] = "LIST_CLEAR";
55
61
  })(GeinsEventType || (GeinsEventType = {}));
56
62
 
57
63
  var CustomerType;
@@ -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;
@@ -2,3 +2,4 @@ export * from './price';
2
2
  export * from './campaign';
3
3
  export * from './user';
4
4
  export * from './order';
5
+ export * from './requestContext';
@@ -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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geins/types",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",