@clicktap/state 0.13.19 → 0.14.1

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 (54) hide show
  1. package/auth/AuthProvider.d.ts +88 -184
  2. package/auth/actions/addError.d.ts +8 -0
  3. package/auth/actions/clearErrors.d.ts +5 -0
  4. package/auth/actions/index.d.ts +7 -0
  5. package/auth/actions/setAccessToken.d.ts +9 -0
  6. package/auth/actions/setIgnoreRefreshToken.d.ts +4 -0
  7. package/auth/actions/setUserContext.d.ts +9 -0
  8. package/auth/actions/unsetRefreshToken.d.ts +4 -0
  9. package/auth/actions/unsetUserContext.d.ts +8 -0
  10. package/auth/actors/authenticate.d.ts +16 -0
  11. package/auth/actors/index.d.ts +3 -0
  12. package/auth/actors/refreshAccessToken.d.ts +18 -0
  13. package/auth/actors/unauthenticate.d.ts +14 -0
  14. package/auth/auth.d.ts +45 -130
  15. package/auth/types.d.ts +42 -0
  16. package/helpers/request.d.ts +2 -0
  17. package/index.d.ts +2 -0
  18. package/index.js +33 -33
  19. package/index.mjs +1479 -1210
  20. package/package.json +2 -3
  21. package/quote/CheckoutProvider.d.ts +117 -0
  22. package/quote/QuoteProvider.d.ts +98 -97
  23. package/quote/checkout/actions/index.d.ts +1 -0
  24. package/quote/checkout/actions/nextStep.d.ts +8 -0
  25. package/quote/checkout/actors/index.d.ts +1 -0
  26. package/quote/checkout/actors/submitStepData.d.ts +19 -0
  27. package/quote/checkout/guards/index.d.ts +1 -0
  28. package/quote/checkout/guards/quoteExists.d.ts +10 -0
  29. package/quote/checkout/types.d.ts +36 -0
  30. package/quote/checkout.d.ts +32 -0
  31. package/quote/quote/actions/addItems.d.ts +211 -0
  32. package/quote/quote/actions/refresh.d.ts +210 -0
  33. package/quote/quote/actions/removeItems.d.ts +211 -0
  34. package/quote/quote/actions/updateItems.d.ts +211 -0
  35. package/quote/quote/types.d.ts +263 -0
  36. package/quote/quote.d.ts +34 -33
  37. package/quote/types.d.ts +1 -180
  38. package/toast/ToastProvider.d.ts +5 -81
  39. package/quote/actions/addItems.d.ts +0 -91
  40. package/quote/actions/refresh.d.ts +0 -90
  41. package/quote/actions/removeItems.d.ts +0 -91
  42. package/quote/actions/updateItems.d.ts +0 -91
  43. /package/quote/{actions → quote/actions}/index.d.ts +0 -0
  44. /package/quote/{actions → quote/actions}/notifyAddItems.d.ts +0 -0
  45. /package/quote/{actions → quote/actions}/notifyRemoveItems.d.ts +0 -0
  46. /package/quote/{actions → quote/actions}/notifyUpdateItems.d.ts +0 -0
  47. /package/quote/{actors → quote/actors}/addItems.d.ts +0 -0
  48. /package/quote/{actors → quote/actors}/index.d.ts +0 -0
  49. /package/quote/{actors → quote/actors}/refresh.d.ts +0 -0
  50. /package/quote/{actors → quote/actors}/removeItems.d.ts +0 -0
  51. /package/quote/{actors → quote/actors}/updateItems.d.ts +0 -0
  52. /package/quote/{guards → quote/guards}/canRefresh.d.ts +0 -0
  53. /package/quote/{guards → quote/guards}/hasItems.d.ts +0 -0
  54. /package/quote/{guards → quote/guards}/index.d.ts +0 -0
@@ -1,91 +0,0 @@
1
- import { QuoteMachineContext, QuoteMachineEvents } from '../types';
2
- export declare function removeItems({ context, event, }: {
3
- context: QuoteMachineContext;
4
- event: QuoteMachineEvents;
5
- }): QuoteMachineContext | {
6
- quote: {
7
- quote?: {
8
- id: string | null;
9
- locale: string | null;
10
- baseCurrency: string | null;
11
- currency: string | null;
12
- currencyConversionRate: number | null;
13
- dateCreated: Date | null;
14
- dateLastUpdated: Date | null;
15
- items: Record<string, any>[] | null;
16
- promotions: Record<string, any>[] | null;
17
- shippingAddresses: {
18
- available: Record<string, any>[];
19
- selected: string | null;
20
- } | null;
21
- totals: {
22
- discount: number;
23
- tax: number;
24
- shipping: number;
25
- shippingTax: number;
26
- subtotal: number;
27
- grandTotal: number;
28
- } | null;
29
- appliedPriceRules: Record<string, any>[] | null;
30
- appliedPromotions: Record<string, any>[] | null;
31
- shippingMethods: Record<string, any>[] | null;
32
- paymentMethods: Record<string, any>[] | null;
33
- storeCredit: Record<string, any>[] | null;
34
- rewards: Record<string, any>[] | null;
35
- giftCards: Record<string, any>[] | null;
36
- } | undefined;
37
- errors?: string[] | undefined;
38
- endpoints?: {
39
- client?: string | undefined;
40
- server?: string | undefined;
41
- } | undefined;
42
- graphql?: {
43
- refresh: {
44
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
45
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
46
- };
47
- addItems: {
48
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
49
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
50
- };
51
- removeItems: {
52
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
53
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
54
- };
55
- updateItems: {
56
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
57
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
58
- };
59
- } | undefined;
60
- id: string | null;
61
- locale: string | null;
62
- baseCurrency: string | null;
63
- currency: string | null;
64
- currencyConversionRate: number | null;
65
- dateCreated: Date | null;
66
- dateLastUpdated: Date | null;
67
- items: Record<string, any>[] | null;
68
- promotions: Record<string, any>[] | null;
69
- shippingAddresses: {
70
- available: Record<string, any>[];
71
- selected: string | null;
72
- } | null;
73
- totals: {
74
- discount: number;
75
- tax: number;
76
- shipping: number;
77
- shippingTax: number;
78
- subtotal: number;
79
- grandTotal: number;
80
- } | null;
81
- appliedPriceRules: Record<string, any>[] | null;
82
- appliedPromotions: Record<string, any>[] | null;
83
- shippingMethods: Record<string, any>[] | null;
84
- paymentMethods: Record<string, any>[] | null;
85
- storeCredit: Record<string, any>[] | null;
86
- rewards: Record<string, any>[] | null;
87
- giftCards: Record<string, any>[] | null;
88
- };
89
- itemsRemoved: Record<string, any>[] | null;
90
- };
91
- export default removeItems;
@@ -1,91 +0,0 @@
1
- import { QuoteMachineContext, QuoteMachineEvents } from '../types';
2
- export declare function updateItems({ context, event, }: {
3
- context: QuoteMachineContext;
4
- event: QuoteMachineEvents;
5
- }): QuoteMachineContext | {
6
- quote: {
7
- quote?: {
8
- id: string | null;
9
- locale: string | null;
10
- baseCurrency: string | null;
11
- currency: string | null;
12
- currencyConversionRate: number | null;
13
- dateCreated: Date | null;
14
- dateLastUpdated: Date | null;
15
- items: Record<string, any>[] | null;
16
- promotions: Record<string, any>[] | null;
17
- shippingAddresses: {
18
- available: Record<string, any>[];
19
- selected: string | null;
20
- } | null;
21
- totals: {
22
- discount: number;
23
- tax: number;
24
- shipping: number;
25
- shippingTax: number;
26
- subtotal: number;
27
- grandTotal: number;
28
- } | null;
29
- appliedPriceRules: Record<string, any>[] | null;
30
- appliedPromotions: Record<string, any>[] | null;
31
- shippingMethods: Record<string, any>[] | null;
32
- paymentMethods: Record<string, any>[] | null;
33
- storeCredit: Record<string, any>[] | null;
34
- rewards: Record<string, any>[] | null;
35
- giftCards: Record<string, any>[] | null;
36
- } | undefined;
37
- errors?: string[] | undefined;
38
- endpoints?: {
39
- client?: string | undefined;
40
- server?: string | undefined;
41
- } | undefined;
42
- graphql?: {
43
- refresh: {
44
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
45
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
46
- };
47
- addItems: {
48
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
49
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
50
- };
51
- removeItems: {
52
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
53
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
54
- };
55
- updateItems: {
56
- document: import("graphql-request").RequestDocument | import("@graphql-typed-document-node/core").TypedDocumentNode<unknown, {}>;
57
- requestHeaders?: import("graphql-request/build/esm/types").GraphQLClientRequestHeaders | undefined;
58
- };
59
- } | undefined;
60
- id: string | null;
61
- locale: string | null;
62
- baseCurrency: string | null;
63
- currency: string | null;
64
- currencyConversionRate: number | null;
65
- dateCreated: Date | null;
66
- dateLastUpdated: Date | null;
67
- items: Record<string, any>[] | null;
68
- promotions: Record<string, any>[] | null;
69
- shippingAddresses: {
70
- available: Record<string, any>[];
71
- selected: string | null;
72
- } | null;
73
- totals: {
74
- discount: number;
75
- tax: number;
76
- shipping: number;
77
- shippingTax: number;
78
- subtotal: number;
79
- grandTotal: number;
80
- } | null;
81
- appliedPriceRules: Record<string, any>[] | null;
82
- appliedPromotions: Record<string, any>[] | null;
83
- shippingMethods: Record<string, any>[] | null;
84
- paymentMethods: Record<string, any>[] | null;
85
- storeCredit: Record<string, any>[] | null;
86
- rewards: Record<string, any>[] | null;
87
- giftCards: Record<string, any>[] | null;
88
- };
89
- itemsUpdated: Record<string, any>[] | null;
90
- };
91
- export default updateItems;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes