@cimplify/sdk 0.106.2 → 0.107.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.
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{catalogue-CVKH9faR.d.mts → catalogue-AmW4XjaN.d.ts} +45 -38
- package/dist/{catalogue-ChBjPPME.d.ts → catalogue-rWd71Xi-.d.mts} +45 -38
- package/dist/{chunk-AVXA4F6G.js → chunk-ANT574FD.js} +29 -0
- package/dist/{chunk-BCLGREHS.js → chunk-CEML2737.js} +245 -219
- package/dist/{chunk-NYDVVNZI.mjs → chunk-JRGK3NXR.mjs} +1 -1
- package/dist/{chunk-NJYR6GGM.mjs → chunk-KG3WT4PR.mjs} +29 -1
- package/dist/{chunk-4VTFTLH7.mjs → chunk-NZMU7UUA.mjs} +3 -3
- package/dist/{chunk-B7JH5D3J.js → chunk-ONII7K3T.js} +262 -303
- package/dist/{chunk-T3MXI7JD.mjs → chunk-OTPLI3JY.mjs} +87 -128
- package/dist/{chunk-LJAZ7H4I.mjs → chunk-T4OU77DM.mjs} +108 -83
- package/dist/{chunk-7O2BBPDM.js → chunk-THSYGWUA.js} +70 -70
- package/dist/{chunk-NJK3THWT.js → chunk-UVRPC2P7.js} +90 -62
- package/dist/{chunk-UYFTOIFW.js → chunk-V32BCG7M.js} +6 -6
- package/dist/{chunk-L4XKIMUO.mjs → chunk-XBL3TMPC.mjs} +31 -3
- package/dist/{client-BfKFK7cn.d.mts → client-DlTJ2hUM.d.mts} +2 -2
- package/dist/{client-DoczTJbs.d.ts → client-ni-CfOSO.d.ts} +2 -2
- package/dist/{checkout-XoV4HNg2.d.mts → elements-BF1Y4aOi.d.mts} +575 -502
- package/dist/{checkout-XoV4HNg2.d.ts → elements-BF1Y4aOi.d.ts} +575 -502
- package/dist/{index-DweR60Cv.d.ts → index-CZ0bJm6k.d.ts} +2 -2
- package/dist/{index-DRMBo26v.d.mts → index-DML_W635.d.mts} +2 -2
- package/dist/{index-Dn6xCpDe.d.ts → index-DU7vffby.d.ts} +2 -2
- package/dist/{index-DEUorPUO.d.mts → index-DopYJKDL.d.mts} +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +159 -151
- package/dist/index.mjs +5 -5
- package/dist/mock/cli.mjs +33 -2
- package/dist/mock/library.js +33 -2
- package/dist/mock/library.mjs +33 -2
- package/dist/mock/msw.js +33 -2
- package/dist/mock/msw.mjs +33 -2
- package/dist/{price-De-sxcuj.d.ts → price-B5t2mpsE.d.ts} +1 -1
- package/dist/{price-CUGIYRtD.d.mts → price-DI_U5oXU.d.mts} +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +154 -154
- package/dist/react.mjs +7 -7
- package/dist/{server-7soMMUgP.d.ts → server-BItJAUTD.d.ts} +1 -1
- package/dist/{server-DDEJ7e9s.d.mts → server-Dq70vD7z.d.mts} +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +5 -5
- package/dist/testing/suite.d.ts +5 -5
- package/dist/testing/suite.js +26 -26
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +118 -118
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +32 -32
- package/dist/utils.mjs +2 -2
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as AuthService, y as BusinessService, J as CartOperations, K as CatalogueQueries, _ as CheckoutOperations, _ as CheckoutService, a0 as CimplifyElement, a1 as CimplifyElements, ao as FetchQuoteInput, ax as FxService, aB as GetProductsOptions, aE as InventoryService, aI as LinkService, aM as LiteService, bb as OrderQueries, bs as PriceQuote, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, bH as RefreshQuoteInput, bI as RefreshQuoteResult, c6 as SchedulingService,
|
|
2
|
-
export {
|
|
3
|
-
export { g as generateIdempotencyKey } from './index-
|
|
1
|
+
export { j as AuthService, y as BusinessService, J as CartOperations, K as CatalogueQueries, _ as CheckoutOperations, _ as CheckoutService, a0 as CimplifyElement, a1 as CimplifyElements, ao as FetchQuoteInput, ax as FxService, aB as GetProductsOptions, aE as InventoryService, aI as LinkService, aM as LiteService, bb as OrderQueries, bs as PriceQuote, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, bH as RefreshQuoteInput, bI as RefreshQuoteResult, c6 as SchedulingService, cM as createElements } from './catalogue-rWd71Xi-.mjs';
|
|
2
|
+
export { bR as ELEMENT_TYPES, bT as EVENT_TYPES, bW as ElementEventType, bX as ElementOptions, bY as ElementType, c1 as ElementsCheckoutData, c2 as ElementsCheckoutResult, c4 as ElementsOptions, ch as IframeToParentMessage, cz as MESSAGE_TYPES, dg as ParentToIframeMessage } from './elements-BF1Y4aOi.mjs';
|
|
3
|
+
export { g as generateIdempotencyKey } from './index-DopYJKDL.mjs';
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as AuthService, y as BusinessService, J as CartOperations, K as CatalogueQueries, _ as CheckoutOperations, _ as CheckoutService, a0 as CimplifyElement, a1 as CimplifyElements, ao as FetchQuoteInput, ax as FxService, aB as GetProductsOptions, aE as InventoryService, aI as LinkService, aM as LiteService, bb as OrderQueries, bs as PriceQuote, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, bH as RefreshQuoteInput, bI as RefreshQuoteResult, c6 as SchedulingService,
|
|
2
|
-
export {
|
|
3
|
-
export { g as generateIdempotencyKey } from './index-
|
|
1
|
+
export { j as AuthService, y as BusinessService, J as CartOperations, K as CatalogueQueries, _ as CheckoutOperations, _ as CheckoutService, a0 as CimplifyElement, a1 as CimplifyElements, ao as FetchQuoteInput, ax as FxService, aB as GetProductsOptions, aE as InventoryService, aI as LinkService, aM as LiteService, bb as OrderQueries, bs as PriceQuote, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, bH as RefreshQuoteInput, bI as RefreshQuoteResult, c6 as SchedulingService, cM as createElements } from './catalogue-AmW4XjaN.js';
|
|
2
|
+
export { bR as ELEMENT_TYPES, bT as EVENT_TYPES, bW as ElementEventType, bX as ElementOptions, bY as ElementType, c1 as ElementsCheckoutData, c2 as ElementsCheckoutResult, c4 as ElementsOptions, ch as IframeToParentMessage, cz as MESSAGE_TYPES, dg as ParentToIframeMessage } from './elements-BF1Y4aOi.js';
|
|
3
|
+
export { g as generateIdempotencyKey } from './index-DU7vffby.js';
|
package/dist/advanced.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkONII7K3T_js = require('./chunk-ONII7K3T.js');
|
|
4
4
|
require('./chunk-EV2EVOYS.js');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-V32BCG7M.js');
|
|
6
|
+
require('./chunk-ANT574FD.js');
|
|
7
7
|
require('./chunk-OWW5GUSB.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "AuthService", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkONII7K3T_js.AuthService; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "BusinessService", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkONII7K3T_js.BusinessService; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "CartOperations", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkONII7K3T_js.CartOperations; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "CatalogueQueries", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkONII7K3T_js.CatalogueQueries; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "CheckoutOperations", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkONII7K3T_js.CheckoutService; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "CheckoutService", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkONII7K3T_js.CheckoutService; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "CimplifyElement", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkONII7K3T_js.CimplifyElement; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "CimplifyElements", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkONII7K3T_js.CimplifyElements; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "ELEMENT_TYPES", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkONII7K3T_js.ELEMENT_TYPES; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "EVENT_TYPES", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkONII7K3T_js.EVENT_TYPES; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "FxService", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkONII7K3T_js.FxService; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "InventoryService", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkONII7K3T_js.InventoryService; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "LinkService", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkONII7K3T_js.LinkService; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "LiteService", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkONII7K3T_js.LiteService; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "MESSAGE_TYPES", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkONII7K3T_js.MESSAGE_TYPES; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "OrderQueries", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkONII7K3T_js.OrderQueries; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "SchedulingService", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkONII7K3T_js.SchedulingService; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "createElements", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkONII7K3T_js.createElements; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "generateIdempotencyKey", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkONII7K3T_js.generateIdempotencyKey; }
|
|
86
86
|
});
|
package/dist/advanced.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-
|
|
1
|
+
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-OTPLI3JY.mjs';
|
|
2
2
|
import './chunk-33VCYWVL.mjs';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-JRGK3NXR.mjs';
|
|
4
|
+
import './chunk-KG3WT4PR.mjs';
|
|
5
5
|
import './chunk-3G6RQLXK.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CimplifyError,
|
|
1
|
+
import { c as CimplifyError, a$ as ClaimedCustomer, al as Cart, eM as UICart, ap as CartItem, bD as DestinationQuoteInput, bB as DestinationQuote, au as CartSummary, t as AddToCartInput, ar as CartMutationResult, eT as UpdateCartItemInput, bH as DiscountDetails, cI as Money, a as ChosenPrice, C as CurrencyCode, cr as LineConfiguration, cM as NextAction, ab as CHECKOUT_NEXT_ACTION, c9 as ErrorCode, aC as CheckoutCollectionOptions, aI as CheckoutFormData, aU as CheckoutResult, dn as PaymentMethod, ci as InitializePaymentResult, eA as SubmitAuthorizationInput, dy as PaymentStatusResponse, aG as CheckoutCustomerInfo, dJ as ProcessAndResolveOptions, dL as ProcessCheckoutResult, i as ConfirmPurchaseIntentRequest, bi as ConfirmPurchaseIntentResponse, d8 as PURCHASE_INTENT_RESOLVE_STATUS, e0 as PurchaseIntentActionResponse, c$ as PURCHASE_INTENT_ACTION_DECISION, eB as SubmitPurchaseIntentActionRequest, d0 as PURCHASE_INTENT_CONFIRM_STATUS, e7 as PurchaseIntentResolution, cD as MintPurchaseIntentRequest, ee as PurchaseIntentView, dC as PreparePurchaseIntentRequest, e_ as VariantDetails, e$ as VariantDetailsDTO, n as AddOnDetails, q as AddOnOptionDetails, o as AddOnGroupDetails, a0 as BundleSelectionData, bf as CompositeSelectionData, bq as CustomerInputValue, em as RequestOtpInput, en as RequestOtpResult$1, f4 as VerifyOtpInput, H as AuthResponse, cv as LinkStatusResult, cs as LinkData, bp as CustomerAddress, bs as CustomerMobileMoney, br as CustomerLinkPreferences, bo as Customer, c8 as EnrollmentData, ct as LinkEnrollResult, c6 as EnrollAndLinkOrderInput, c7 as EnrollAndLinkOrderResult, bk as CreateAddressInput, eS as UpdateAddressInput, bl as CreateMobileMoneyInput, cu as LinkSession, ep as RevokeSessionResult, eo as RevokeAllSessionsResult, fh as components, et as SchedulingMode, D as DurationUnit, P as Product, eC as Subscription, eG as SubscriptionWithDetails, c4 as ElementsOptions, bY as ElementType, bX as ElementOptions, bW as ElementEventType, bV as ElementEventHandler, ay as CheckoutCartData, dg as ParentToIframeMessage, ch as IframeToParentMessage, J as AuthenticatedData, c1 as ElementsCheckoutData, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, l as AbortablePromise, w as AddressInfo, dp as PaymentMethodInfo, bZ as ElementsAuthContactType, b as Category, s as AddOnWithOptions, de as Pagination, e as ProductWithDetails, dX as ProductVariant, eU as VariantAxis, eV as VariantAxisSelection, m as AddOn, d as Collection, a3 as BundleSummary, V as Bundle, b8 as Composite, b6 as ComponentSelectionInput, bd as CompositePriceResult, S as SaleInfo, dU as ProductTaxonomy, eL as TaxonomyWithChildren, c5 as EligiblePlansQuery, dP as ProductBillingPlan, dV as ProductTimeProfile, dO as ProductAvailabilityNow, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, eI as TagsResponse, bm as CustomAttributeDefinition, bn as CustomAttributeValue, dZ as PropertyFacet, eK as TaxonomyAttributeTemplate, cm as KnowledgeArticle } from './elements-BF1Y4aOi.js';
|
|
2
2
|
|
|
3
3
|
interface RequestContext {
|
|
4
4
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -75,8 +75,9 @@ interface TokenChangedEvent {
|
|
|
75
75
|
}
|
|
76
76
|
interface SessionClaimedEvent {
|
|
77
77
|
sessionToken: string;
|
|
78
|
-
threadId: string | null;
|
|
79
78
|
customerName: string;
|
|
79
|
+
customer: ClaimedCustomer | null;
|
|
80
|
+
cart: Cart | null;
|
|
80
81
|
}
|
|
81
82
|
declare const MUTATION_ERROR: "mutation:error";
|
|
82
83
|
declare const OUTBOX_REPLAY_SUCCESS: "outbox:replay-success";
|
|
@@ -1718,6 +1719,7 @@ declare class ActivityService {
|
|
|
1718
1719
|
/** Records a page view now and on every route change; returns a stop fn. */
|
|
1719
1720
|
autoTrackPageViews(): () => void;
|
|
1720
1721
|
private sendEvents;
|
|
1722
|
+
private hasStorefrontIdentity;
|
|
1721
1723
|
private postEvents;
|
|
1722
1724
|
private bootstrapSession;
|
|
1723
1725
|
private captureGeneration;
|
|
@@ -1936,17 +1938,6 @@ interface ChatConversationResponse {
|
|
|
1936
1938
|
conversation: ChatConversation;
|
|
1937
1939
|
messages: ChatMessage[];
|
|
1938
1940
|
}
|
|
1939
|
-
interface ClaimConversationResult {
|
|
1940
|
-
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
1941
|
-
session_token: string;
|
|
1942
|
-
/** The account's canonical direct Chat thread for this business. */
|
|
1943
|
-
thread: ChatConversation;
|
|
1944
|
-
customer_name: string;
|
|
1945
|
-
/** Per-envelope, PII-minimal WhatsApp history claim outcomes. */
|
|
1946
|
-
external_claims: ExternalChatClaimAttempt[];
|
|
1947
|
-
/** Candidate discovery failed; retry `claimExternalChats()` later. */
|
|
1948
|
-
external_claims_unavailable: boolean;
|
|
1949
|
-
}
|
|
1950
1941
|
type ExternalChatClaimDisposition = "claimed" | "replayed" | "conflict" | "contact_unverified" | "business_unavailable" | "history_empty" | "history_oversize" | "failed";
|
|
1951
1942
|
interface ExternalChatClaimAttempt {
|
|
1952
1943
|
status: ExternalChatClaimDisposition;
|
|
@@ -1974,26 +1965,7 @@ interface IdempotencyOption$1 {
|
|
|
1974
1965
|
}
|
|
1975
1966
|
declare class SupportService {
|
|
1976
1967
|
private client;
|
|
1977
|
-
private claimInFlight;
|
|
1978
|
-
private claimInFlightToken;
|
|
1979
|
-
private lastClaimedAccessToken;
|
|
1980
|
-
private claimedName;
|
|
1981
1968
|
constructor(client: CimplifyClient);
|
|
1982
|
-
/** The verified customer this session's conversation was claimed for, null while anonymous. */
|
|
1983
|
-
get claimedCustomerName(): string | null;
|
|
1984
|
-
/**
|
|
1985
|
-
* Claim the anonymous session for the verified Link identity: the server
|
|
1986
|
-
* verifies the access token, rotates the session token (adopted here, so
|
|
1987
|
-
* every subsequent request rides the bound session), folds the guest cart
|
|
1988
|
-
* in, and opens or reuses the account's canonical direct Chat thread.
|
|
1989
|
-
*
|
|
1990
|
-
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
1991
|
-
* token already claimed by this instance short-circuits without a network
|
|
1992
|
-
* round trip. A session already bound to another Link account is rejected
|
|
1993
|
-
* rather than transferring that account's cart. Emits `session:claimed` on
|
|
1994
|
-
* the client's event channel.
|
|
1995
|
-
*/
|
|
1996
|
-
claimConversation(): Promise<Result<ClaimConversationResult, CimplifyError>>;
|
|
1997
1969
|
/**
|
|
1998
1970
|
* Retry verified external-history discovery for the current storefront.
|
|
1999
1971
|
* Launch scope is intentionally WhatsApp-only because it is the registered
|
|
@@ -2036,6 +2008,40 @@ declare class SupportService {
|
|
|
2036
2008
|
requestHuman(opts?: IdempotencyOption$1): Promise<Result<ChatHandoffResponse, CimplifyError>>;
|
|
2037
2009
|
}
|
|
2038
2010
|
|
|
2011
|
+
interface ClaimSessionResult {
|
|
2012
|
+
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
2013
|
+
session_token: string;
|
|
2014
|
+
customer: ClaimedCustomer;
|
|
2015
|
+
/** The shopper's cart under the bound session, folded and priced for them. */
|
|
2016
|
+
cart: Cart | null;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
declare class SessionService {
|
|
2020
|
+
private client;
|
|
2021
|
+
private claimInFlight;
|
|
2022
|
+
private claimInFlightToken;
|
|
2023
|
+
private lastClaimedAccessToken;
|
|
2024
|
+
private claimedName;
|
|
2025
|
+
constructor(client: CimplifyClient);
|
|
2026
|
+
/** The verified customer this session is bound to, null while anonymous. */
|
|
2027
|
+
get claimedCustomerName(): string | null;
|
|
2028
|
+
/** Adopt a session another holder already bound for this bearer. */
|
|
2029
|
+
adopt(accessToken: string, session: SessionClaimedEvent): void;
|
|
2030
|
+
/**
|
|
2031
|
+
* Bind the anonymous session to the verified Link identity in one server
|
|
2032
|
+
* transaction: verify the bearer, rotate the session token (adopted here),
|
|
2033
|
+
* fold the guest cart under the customer and re-price it. A repeat for the
|
|
2034
|
+
* same account and session returns the same session.
|
|
2035
|
+
*
|
|
2036
|
+
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
2037
|
+
* token already claimed by this instance short-circuits without a network
|
|
2038
|
+
* round trip. A session already bound to another Link account is rejected
|
|
2039
|
+
* rather than transferring that account's cart. Emits `session:claimed` on
|
|
2040
|
+
* the client's event channel.
|
|
2041
|
+
*/
|
|
2042
|
+
claim(): Promise<Result<ClaimSessionResult, CimplifyError>>;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2039
2045
|
declare class CimplifyElements {
|
|
2040
2046
|
private client;
|
|
2041
2047
|
private businessId;
|
|
@@ -2050,7 +2056,6 @@ declare class CimplifyElements {
|
|
|
2050
2056
|
private paymentData;
|
|
2051
2057
|
private checkoutInProgress;
|
|
2052
2058
|
private authInProgress;
|
|
2053
|
-
private authEstablishmentInProgress;
|
|
2054
2059
|
private authGeneration;
|
|
2055
2060
|
private activeCheckoutAbort;
|
|
2056
2061
|
private boundHandleMessage;
|
|
@@ -2058,7 +2063,8 @@ declare class CimplifyElements {
|
|
|
2058
2063
|
private debug;
|
|
2059
2064
|
constructor(client: CimplifyClient, businessId?: string, options?: ElementsOptions);
|
|
2060
2065
|
private stopSessionSync;
|
|
2061
|
-
|
|
2066
|
+
_syncHostSession(element?: CimplifyElement): void;
|
|
2067
|
+
private identityCustomer;
|
|
2062
2068
|
create(type: ElementType, options?: ElementOptions): CimplifyElement;
|
|
2063
2069
|
getElement(type: ElementType): CimplifyElement | undefined;
|
|
2064
2070
|
_removeElement(type: ElementType, instance: CimplifyElement): void;
|
|
@@ -2081,8 +2087,7 @@ declare class CimplifyElements {
|
|
|
2081
2087
|
private clearClaimedAuthorityAfterRestoreFailure;
|
|
2082
2088
|
private restoreSession;
|
|
2083
2089
|
private applyAccessToken;
|
|
2084
|
-
private
|
|
2085
|
-
private broadcastAccessToken;
|
|
2090
|
+
private adoptEstablishedSession;
|
|
2086
2091
|
private broadcastClearedSession;
|
|
2087
2092
|
private startEmbeddedAuth;
|
|
2088
2093
|
private handleMessage;
|
|
@@ -2249,6 +2254,7 @@ declare class CimplifyClient {
|
|
|
2249
2254
|
private _activity?;
|
|
2250
2255
|
private _delivery?;
|
|
2251
2256
|
private _support?;
|
|
2257
|
+
private _session?;
|
|
2252
2258
|
constructor(config?: CimplifyConfig);
|
|
2253
2259
|
private stopPageViewTracking;
|
|
2254
2260
|
stopTrackingPageViews(): void;
|
|
@@ -2269,7 +2275,7 @@ declare class CimplifyClient {
|
|
|
2269
2275
|
* merchant auth flows, never by the raw token setter. Global Link clients
|
|
2270
2276
|
* have no storefront tenant and therefore activate without this step.
|
|
2271
2277
|
*/
|
|
2272
|
-
|
|
2278
|
+
autoClaimSession(): void;
|
|
2273
2279
|
/**
|
|
2274
2280
|
* Adopt a server-rotated session token (claim flow). The old token stays
|
|
2275
2281
|
* in flight-safe use until the next request; the storage swap makes the
|
|
@@ -2347,6 +2353,7 @@ declare class CimplifyClient {
|
|
|
2347
2353
|
get activity(): ActivityService;
|
|
2348
2354
|
get delivery(): DeliveryService;
|
|
2349
2355
|
get support(): SupportService;
|
|
2356
|
+
get session(): SessionService;
|
|
2350
2357
|
buildWsUrl(path: string): string;
|
|
2351
2358
|
elements(businessId?: string, options?: ElementsOptions): CimplifyElements;
|
|
2352
2359
|
}
|
|
@@ -2549,4 +2556,4 @@ declare class CatalogueQueries {
|
|
|
2549
2556
|
getKnowledgeArticles(): Promise<Result<KnowledgeArticle[], CimplifyError>>;
|
|
2550
2557
|
}
|
|
2551
2558
|
|
|
2552
|
-
export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type
|
|
2559
|
+
export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type ClaimExternalChatsResult as a2, type ClaimSessionResult as a3, type ContentType as a4, type CustomerBooking as a5, type CustomerBookingServiceItem as a6, type CustomerServicePreferences as a7, type DayAvailability as a8, type DeliveryFeeDetails as a9, type GetOrdersOptions as aA, type GetProductsOptions as aB, type GroupOrderInfo as aC, HostedPurchaseIntentService as aD, InventoryService as aE, type LifecyclePhase as aF, type LineItem as aG, type LineType as aH, LinkService as aI, type LiteBootstrap as aJ, type LiteDayHours as aK, type LiteHoursRange as aL, LiteService as aM, type Location as aN, type LocationBooking as aO, type LocationTaxBehavior as aP, type LocationTaxOverrides as aQ, type LocationTimeProfile as aR, type LocationWithDetails as aS, type ObservabilityHooks as aT, type Ok as aU, type Order as aV, type OrderCustomerInfo as aW, type OrderDiscountInfo as aX, type OrderFilter as aY, type OrderFulfillmentSummary as aZ, type OrderGroup as a_, type DeliveryFeeResponse as aa, type DeliveryFeeStatus as ab, type DeliveryOption as ac, type DeliveryOptionsQuery as ad, type DeliveryOptionsResponse as ae, DeliveryService as af, type DepositResult as ag, type DismissMessageResponse as ah, type EnrichedOrder as ai, type EnrichedOrderItem as aj, type Err as ak, type ExternalChatClaimAttempt as al, type ExternalChatClaimDisposition as am, type FeeBearerType as an, type FetchQuoteInput as ao, type FulfillmentLink as ap, type FulfillmentStatus as aq, type FulfillmentSummaryDTO as ar, type FulfillmentType as as, type FxQuote as at, type FxQuoteRequest as au, type FxQuoteStatus as av, type FxRateResponse as aw, FxService as ax, type GetAvailableSlotsInput as ay, type GetDeliveryOptionsParams as az, type Result as b, type ResourceAssignment as b$, type OrderGroupPayment as b0, type OrderGroupPaymentState as b1, type OrderGroupPaymentStatus as b2, type OrderGroupPaymentSummary as b3, type OrderGroupStatus as b4, type OrderHistory as b5, type OrderLineState as b6, type OrderLineStatus as b7, type OrderLocationInfo as b8, type OrderPaymentEvent as b9, PurchaseIntentService as bA, type PurchaseIntentTransport as bB, type QuoteBundleSelectionInput as bC, type QuoteCompositeSelectionInput as bD, type QuoteDynamicBuckets as bE, type QuoteStatus as bF, type QuoteUiMessage as bG, type RefreshQuoteInput as bH, type RefreshQuoteResult as bI, type RefundOrderInput as bJ, type RelatedCandidate as bK, type RelatedProduct as bL, type RelatedProductsEnrichment as bM, type RelationType as bN, type ReminderMethod as bO, type ReminderSettings as bP, type ReorderResult as bQ, type RequestContext as bR, type RequestErrorEvent as bS, type RequestOptions as bT, type RequestRetryPolicy as bU, type RequestSource as bV, type RequestStartEvent as bW, type RequestSuccessEvent as bX, type RescheduleBookingInput as bY, type RescheduleBookingResult as bZ, type RescheduleHistoryRecord as b_, type OrderPricingView as ba, OrderQueries as bb, type OrderSplitDetail as bc, type OrderStaffInfo as bd, type OrderStatus as be, type OrderTimestampsDTO as bf, type Origin as bg, type OriginActor as bh, type OriginChannel as bi, type OtpResult as bj, PAYMENT_AUTHORIZATION_OUTCOME_STATUS as bk, PAYMENT_AUTHORIZATION_PROVIDER as bl, PURCHASE_INTENT_ROUTE as bm, PaymentAuthorizationAdapterRegistry as bn, type PaymentInfoDTO as bo, type PaymentState as bp, type PlaceDetailsResponse as bq, PlacesService as br, type PriceQuote as bs, type PricingOverrides as bt, type ProviderResolutionSource as bu, type PurchaseIntentActionDecision as bv, type PurchaseIntentRequestOptions as bw, type PurchaseIntentResolveOptions as bx, type PurchaseIntentResolveStatus as by, PurchaseIntentResolver as bz, type PaymentAuthorizationContext as c, type ResourceInfo as c0, type RetryEvent as c1, type Room as c2, SESSION_CHANGE_SOURCE as c3, type SchedulingMetadata as c4, type SchedulingResult as c5, SchedulingService as c6, type SenderType as c7, type Service as c8, type ServiceAvailabilityParams as c9, type TimeSlot as cA, type TrackCategoryViewOptions as cB, type TrackProductViewOptions as cC, type UpdateOrderStatusInput as cD, type UpdateProfileInput as cE, type UploadInitResponse as cF, type UploadResult as cG, UploadService as cH, combine as cI, combineObject as cJ, createCimplifyClient as cK, createDefaultPaymentAuthorizationAdapterRegistry as cL, createElements as cM, err as cN, flatMap as cO, fromPromise as cP, getOrElse as cQ, isErr as cR, isOk as cS, mapError as cT, mapResult as cU, ok as cV, toNullable as cW, tryCatch as cX, unwrap as cY, type ServiceAvailabilityResult as ca, type ServiceCharge as cb, type ServiceNotes as cc, type ServiceScheduleRequest as cd, type ServiceStatus as ce, type SessionActivityData as cf, type SessionChangeEvent as cg, type SessionChangeSource as ch, type SessionMessage as ci, SessionService as cj, type SlotResourceInfo as ck, type SlotStaffInfo as cl, type Staff as cm, type StaffAssignment as cn, type StaffRole as co, type StaffScheduleItem as cp, type StockLevel as cq, type StockStatus as cr, type StoreCreditBalance as cs, StoreCreditQueries as ct, type StorefrontBootstrap as cu, SubscriptionService as cv, SupportService as cw, type Table as cx, type TimeRange as cy, type TimeRanges as cz, type PaymentAuthorizationOutcome as d, type ChatReplyCard as e, type ActivityRecommendationsResponse as f, ActivityService as g, type ActivityStateResponse as h, type AmountToPay as i, AuthService as j, type AuthStatus as k, type AuthorizeCardPopupOptions as l, type AutocompletePrediction as m, type AutocompleteResponse as n, type AvailabilityResult as o, type AvailableSlot as p, type BookingModificationType as q, type BookingStatus as r, type BookingWithDetails as s, type BufferTimes as t, type Business as u, type BusinessDetailsDTO as v, type BusinessHours as w, type BusinessPreferences as x, BusinessService as y, type BusinessSettings as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CimplifyError,
|
|
1
|
+
import { c as CimplifyError, a$ as ClaimedCustomer, al as Cart, eM as UICart, ap as CartItem, bD as DestinationQuoteInput, bB as DestinationQuote, au as CartSummary, t as AddToCartInput, ar as CartMutationResult, eT as UpdateCartItemInput, bH as DiscountDetails, cI as Money, a as ChosenPrice, C as CurrencyCode, cr as LineConfiguration, cM as NextAction, ab as CHECKOUT_NEXT_ACTION, c9 as ErrorCode, aC as CheckoutCollectionOptions, aI as CheckoutFormData, aU as CheckoutResult, dn as PaymentMethod, ci as InitializePaymentResult, eA as SubmitAuthorizationInput, dy as PaymentStatusResponse, aG as CheckoutCustomerInfo, dJ as ProcessAndResolveOptions, dL as ProcessCheckoutResult, i as ConfirmPurchaseIntentRequest, bi as ConfirmPurchaseIntentResponse, d8 as PURCHASE_INTENT_RESOLVE_STATUS, e0 as PurchaseIntentActionResponse, c$ as PURCHASE_INTENT_ACTION_DECISION, eB as SubmitPurchaseIntentActionRequest, d0 as PURCHASE_INTENT_CONFIRM_STATUS, e7 as PurchaseIntentResolution, cD as MintPurchaseIntentRequest, ee as PurchaseIntentView, dC as PreparePurchaseIntentRequest, e_ as VariantDetails, e$ as VariantDetailsDTO, n as AddOnDetails, q as AddOnOptionDetails, o as AddOnGroupDetails, a0 as BundleSelectionData, bf as CompositeSelectionData, bq as CustomerInputValue, em as RequestOtpInput, en as RequestOtpResult$1, f4 as VerifyOtpInput, H as AuthResponse, cv as LinkStatusResult, cs as LinkData, bp as CustomerAddress, bs as CustomerMobileMoney, br as CustomerLinkPreferences, bo as Customer, c8 as EnrollmentData, ct as LinkEnrollResult, c6 as EnrollAndLinkOrderInput, c7 as EnrollAndLinkOrderResult, bk as CreateAddressInput, eS as UpdateAddressInput, bl as CreateMobileMoneyInput, cu as LinkSession, ep as RevokeSessionResult, eo as RevokeAllSessionsResult, fh as components, et as SchedulingMode, D as DurationUnit, P as Product, eC as Subscription, eG as SubscriptionWithDetails, c4 as ElementsOptions, bY as ElementType, bX as ElementOptions, bW as ElementEventType, bV as ElementEventHandler, ay as CheckoutCartData, dg as ParentToIframeMessage, ch as IframeToParentMessage, J as AuthenticatedData, c1 as ElementsCheckoutData, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, l as AbortablePromise, w as AddressInfo, dp as PaymentMethodInfo, bZ as ElementsAuthContactType, b as Category, s as AddOnWithOptions, de as Pagination, e as ProductWithDetails, dX as ProductVariant, eU as VariantAxis, eV as VariantAxisSelection, m as AddOn, d as Collection, a3 as BundleSummary, V as Bundle, b8 as Composite, b6 as ComponentSelectionInput, bd as CompositePriceResult, S as SaleInfo, dU as ProductTaxonomy, eL as TaxonomyWithChildren, c5 as EligiblePlansQuery, dP as ProductBillingPlan, dV as ProductTimeProfile, dO as ProductAvailabilityNow, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, eI as TagsResponse, bm as CustomAttributeDefinition, bn as CustomAttributeValue, dZ as PropertyFacet, eK as TaxonomyAttributeTemplate, cm as KnowledgeArticle } from './elements-BF1Y4aOi.mjs';
|
|
2
2
|
|
|
3
3
|
interface RequestContext {
|
|
4
4
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -75,8 +75,9 @@ interface TokenChangedEvent {
|
|
|
75
75
|
}
|
|
76
76
|
interface SessionClaimedEvent {
|
|
77
77
|
sessionToken: string;
|
|
78
|
-
threadId: string | null;
|
|
79
78
|
customerName: string;
|
|
79
|
+
customer: ClaimedCustomer | null;
|
|
80
|
+
cart: Cart | null;
|
|
80
81
|
}
|
|
81
82
|
declare const MUTATION_ERROR: "mutation:error";
|
|
82
83
|
declare const OUTBOX_REPLAY_SUCCESS: "outbox:replay-success";
|
|
@@ -1718,6 +1719,7 @@ declare class ActivityService {
|
|
|
1718
1719
|
/** Records a page view now and on every route change; returns a stop fn. */
|
|
1719
1720
|
autoTrackPageViews(): () => void;
|
|
1720
1721
|
private sendEvents;
|
|
1722
|
+
private hasStorefrontIdentity;
|
|
1721
1723
|
private postEvents;
|
|
1722
1724
|
private bootstrapSession;
|
|
1723
1725
|
private captureGeneration;
|
|
@@ -1936,17 +1938,6 @@ interface ChatConversationResponse {
|
|
|
1936
1938
|
conversation: ChatConversation;
|
|
1937
1939
|
messages: ChatMessage[];
|
|
1938
1940
|
}
|
|
1939
|
-
interface ClaimConversationResult {
|
|
1940
|
-
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
1941
|
-
session_token: string;
|
|
1942
|
-
/** The account's canonical direct Chat thread for this business. */
|
|
1943
|
-
thread: ChatConversation;
|
|
1944
|
-
customer_name: string;
|
|
1945
|
-
/** Per-envelope, PII-minimal WhatsApp history claim outcomes. */
|
|
1946
|
-
external_claims: ExternalChatClaimAttempt[];
|
|
1947
|
-
/** Candidate discovery failed; retry `claimExternalChats()` later. */
|
|
1948
|
-
external_claims_unavailable: boolean;
|
|
1949
|
-
}
|
|
1950
1941
|
type ExternalChatClaimDisposition = "claimed" | "replayed" | "conflict" | "contact_unverified" | "business_unavailable" | "history_empty" | "history_oversize" | "failed";
|
|
1951
1942
|
interface ExternalChatClaimAttempt {
|
|
1952
1943
|
status: ExternalChatClaimDisposition;
|
|
@@ -1974,26 +1965,7 @@ interface IdempotencyOption$1 {
|
|
|
1974
1965
|
}
|
|
1975
1966
|
declare class SupportService {
|
|
1976
1967
|
private client;
|
|
1977
|
-
private claimInFlight;
|
|
1978
|
-
private claimInFlightToken;
|
|
1979
|
-
private lastClaimedAccessToken;
|
|
1980
|
-
private claimedName;
|
|
1981
1968
|
constructor(client: CimplifyClient);
|
|
1982
|
-
/** The verified customer this session's conversation was claimed for, null while anonymous. */
|
|
1983
|
-
get claimedCustomerName(): string | null;
|
|
1984
|
-
/**
|
|
1985
|
-
* Claim the anonymous session for the verified Link identity: the server
|
|
1986
|
-
* verifies the access token, rotates the session token (adopted here, so
|
|
1987
|
-
* every subsequent request rides the bound session), folds the guest cart
|
|
1988
|
-
* in, and opens or reuses the account's canonical direct Chat thread.
|
|
1989
|
-
*
|
|
1990
|
-
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
1991
|
-
* token already claimed by this instance short-circuits without a network
|
|
1992
|
-
* round trip. A session already bound to another Link account is rejected
|
|
1993
|
-
* rather than transferring that account's cart. Emits `session:claimed` on
|
|
1994
|
-
* the client's event channel.
|
|
1995
|
-
*/
|
|
1996
|
-
claimConversation(): Promise<Result<ClaimConversationResult, CimplifyError>>;
|
|
1997
1969
|
/**
|
|
1998
1970
|
* Retry verified external-history discovery for the current storefront.
|
|
1999
1971
|
* Launch scope is intentionally WhatsApp-only because it is the registered
|
|
@@ -2036,6 +2008,40 @@ declare class SupportService {
|
|
|
2036
2008
|
requestHuman(opts?: IdempotencyOption$1): Promise<Result<ChatHandoffResponse, CimplifyError>>;
|
|
2037
2009
|
}
|
|
2038
2010
|
|
|
2011
|
+
interface ClaimSessionResult {
|
|
2012
|
+
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
2013
|
+
session_token: string;
|
|
2014
|
+
customer: ClaimedCustomer;
|
|
2015
|
+
/** The shopper's cart under the bound session, folded and priced for them. */
|
|
2016
|
+
cart: Cart | null;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
declare class SessionService {
|
|
2020
|
+
private client;
|
|
2021
|
+
private claimInFlight;
|
|
2022
|
+
private claimInFlightToken;
|
|
2023
|
+
private lastClaimedAccessToken;
|
|
2024
|
+
private claimedName;
|
|
2025
|
+
constructor(client: CimplifyClient);
|
|
2026
|
+
/** The verified customer this session is bound to, null while anonymous. */
|
|
2027
|
+
get claimedCustomerName(): string | null;
|
|
2028
|
+
/** Adopt a session another holder already bound for this bearer. */
|
|
2029
|
+
adopt(accessToken: string, session: SessionClaimedEvent): void;
|
|
2030
|
+
/**
|
|
2031
|
+
* Bind the anonymous session to the verified Link identity in one server
|
|
2032
|
+
* transaction: verify the bearer, rotate the session token (adopted here),
|
|
2033
|
+
* fold the guest cart under the customer and re-price it. A repeat for the
|
|
2034
|
+
* same account and session returns the same session.
|
|
2035
|
+
*
|
|
2036
|
+
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
2037
|
+
* token already claimed by this instance short-circuits without a network
|
|
2038
|
+
* round trip. A session already bound to another Link account is rejected
|
|
2039
|
+
* rather than transferring that account's cart. Emits `session:claimed` on
|
|
2040
|
+
* the client's event channel.
|
|
2041
|
+
*/
|
|
2042
|
+
claim(): Promise<Result<ClaimSessionResult, CimplifyError>>;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2039
2045
|
declare class CimplifyElements {
|
|
2040
2046
|
private client;
|
|
2041
2047
|
private businessId;
|
|
@@ -2050,7 +2056,6 @@ declare class CimplifyElements {
|
|
|
2050
2056
|
private paymentData;
|
|
2051
2057
|
private checkoutInProgress;
|
|
2052
2058
|
private authInProgress;
|
|
2053
|
-
private authEstablishmentInProgress;
|
|
2054
2059
|
private authGeneration;
|
|
2055
2060
|
private activeCheckoutAbort;
|
|
2056
2061
|
private boundHandleMessage;
|
|
@@ -2058,7 +2063,8 @@ declare class CimplifyElements {
|
|
|
2058
2063
|
private debug;
|
|
2059
2064
|
constructor(client: CimplifyClient, businessId?: string, options?: ElementsOptions);
|
|
2060
2065
|
private stopSessionSync;
|
|
2061
|
-
|
|
2066
|
+
_syncHostSession(element?: CimplifyElement): void;
|
|
2067
|
+
private identityCustomer;
|
|
2062
2068
|
create(type: ElementType, options?: ElementOptions): CimplifyElement;
|
|
2063
2069
|
getElement(type: ElementType): CimplifyElement | undefined;
|
|
2064
2070
|
_removeElement(type: ElementType, instance: CimplifyElement): void;
|
|
@@ -2081,8 +2087,7 @@ declare class CimplifyElements {
|
|
|
2081
2087
|
private clearClaimedAuthorityAfterRestoreFailure;
|
|
2082
2088
|
private restoreSession;
|
|
2083
2089
|
private applyAccessToken;
|
|
2084
|
-
private
|
|
2085
|
-
private broadcastAccessToken;
|
|
2090
|
+
private adoptEstablishedSession;
|
|
2086
2091
|
private broadcastClearedSession;
|
|
2087
2092
|
private startEmbeddedAuth;
|
|
2088
2093
|
private handleMessage;
|
|
@@ -2249,6 +2254,7 @@ declare class CimplifyClient {
|
|
|
2249
2254
|
private _activity?;
|
|
2250
2255
|
private _delivery?;
|
|
2251
2256
|
private _support?;
|
|
2257
|
+
private _session?;
|
|
2252
2258
|
constructor(config?: CimplifyConfig);
|
|
2253
2259
|
private stopPageViewTracking;
|
|
2254
2260
|
stopTrackingPageViews(): void;
|
|
@@ -2269,7 +2275,7 @@ declare class CimplifyClient {
|
|
|
2269
2275
|
* merchant auth flows, never by the raw token setter. Global Link clients
|
|
2270
2276
|
* have no storefront tenant and therefore activate without this step.
|
|
2271
2277
|
*/
|
|
2272
|
-
|
|
2278
|
+
autoClaimSession(): void;
|
|
2273
2279
|
/**
|
|
2274
2280
|
* Adopt a server-rotated session token (claim flow). The old token stays
|
|
2275
2281
|
* in flight-safe use until the next request; the storage swap makes the
|
|
@@ -2347,6 +2353,7 @@ declare class CimplifyClient {
|
|
|
2347
2353
|
get activity(): ActivityService;
|
|
2348
2354
|
get delivery(): DeliveryService;
|
|
2349
2355
|
get support(): SupportService;
|
|
2356
|
+
get session(): SessionService;
|
|
2350
2357
|
buildWsUrl(path: string): string;
|
|
2351
2358
|
elements(businessId?: string, options?: ElementsOptions): CimplifyElements;
|
|
2352
2359
|
}
|
|
@@ -2549,4 +2556,4 @@ declare class CatalogueQueries {
|
|
|
2549
2556
|
getKnowledgeArticles(): Promise<Result<KnowledgeArticle[], CimplifyError>>;
|
|
2550
2557
|
}
|
|
2551
2558
|
|
|
2552
|
-
export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type
|
|
2559
|
+
export { type CimplifyConfig as $, type ActivityRecommendation as A, type Booking as B, CimplifyClient as C, type BusinessWithLocations as D, type CancelBookingInput as E, type CancelBookingResult as F, type CancelOrderInput as G, type CancellationPolicy as H, type CardPopupAction as I, CartOperations as J, CatalogueQueries as K, type CatalogueResult as L, type CatalogueSnapshot as M, type CategoryInfo as N, type ChatAttachment as O, type PaymentAuthorizationAdapter as P, type ChatConversation as Q, type ReadRequestOptions as R, type ChatConversationResponse as S, type ChatMessage as T, type ChatReplyContext as U, type ChatUploadAttachment as V, type ChatWidgetStarter as W, type CheckSlotAvailabilityInput as X, type CheckSlotAvailabilityResult as Y, type CheckoutInput as Z, CheckoutService as _, type CacheOptions as a, type OrderGroupDetails as a$, CimplifyElement as a0, CimplifyElements as a1, type ClaimExternalChatsResult as a2, type ClaimSessionResult as a3, type ContentType as a4, type CustomerBooking as a5, type CustomerBookingServiceItem as a6, type CustomerServicePreferences as a7, type DayAvailability as a8, type DeliveryFeeDetails as a9, type GetOrdersOptions as aA, type GetProductsOptions as aB, type GroupOrderInfo as aC, HostedPurchaseIntentService as aD, InventoryService as aE, type LifecyclePhase as aF, type LineItem as aG, type LineType as aH, LinkService as aI, type LiteBootstrap as aJ, type LiteDayHours as aK, type LiteHoursRange as aL, LiteService as aM, type Location as aN, type LocationBooking as aO, type LocationTaxBehavior as aP, type LocationTaxOverrides as aQ, type LocationTimeProfile as aR, type LocationWithDetails as aS, type ObservabilityHooks as aT, type Ok as aU, type Order as aV, type OrderCustomerInfo as aW, type OrderDiscountInfo as aX, type OrderFilter as aY, type OrderFulfillmentSummary as aZ, type OrderGroup as a_, type DeliveryFeeResponse as aa, type DeliveryFeeStatus as ab, type DeliveryOption as ac, type DeliveryOptionsQuery as ad, type DeliveryOptionsResponse as ae, DeliveryService as af, type DepositResult as ag, type DismissMessageResponse as ah, type EnrichedOrder as ai, type EnrichedOrderItem as aj, type Err as ak, type ExternalChatClaimAttempt as al, type ExternalChatClaimDisposition as am, type FeeBearerType as an, type FetchQuoteInput as ao, type FulfillmentLink as ap, type FulfillmentStatus as aq, type FulfillmentSummaryDTO as ar, type FulfillmentType as as, type FxQuote as at, type FxQuoteRequest as au, type FxQuoteStatus as av, type FxRateResponse as aw, FxService as ax, type GetAvailableSlotsInput as ay, type GetDeliveryOptionsParams as az, type Result as b, type ResourceAssignment as b$, type OrderGroupPayment as b0, type OrderGroupPaymentState as b1, type OrderGroupPaymentStatus as b2, type OrderGroupPaymentSummary as b3, type OrderGroupStatus as b4, type OrderHistory as b5, type OrderLineState as b6, type OrderLineStatus as b7, type OrderLocationInfo as b8, type OrderPaymentEvent as b9, PurchaseIntentService as bA, type PurchaseIntentTransport as bB, type QuoteBundleSelectionInput as bC, type QuoteCompositeSelectionInput as bD, type QuoteDynamicBuckets as bE, type QuoteStatus as bF, type QuoteUiMessage as bG, type RefreshQuoteInput as bH, type RefreshQuoteResult as bI, type RefundOrderInput as bJ, type RelatedCandidate as bK, type RelatedProduct as bL, type RelatedProductsEnrichment as bM, type RelationType as bN, type ReminderMethod as bO, type ReminderSettings as bP, type ReorderResult as bQ, type RequestContext as bR, type RequestErrorEvent as bS, type RequestOptions as bT, type RequestRetryPolicy as bU, type RequestSource as bV, type RequestStartEvent as bW, type RequestSuccessEvent as bX, type RescheduleBookingInput as bY, type RescheduleBookingResult as bZ, type RescheduleHistoryRecord as b_, type OrderPricingView as ba, OrderQueries as bb, type OrderSplitDetail as bc, type OrderStaffInfo as bd, type OrderStatus as be, type OrderTimestampsDTO as bf, type Origin as bg, type OriginActor as bh, type OriginChannel as bi, type OtpResult as bj, PAYMENT_AUTHORIZATION_OUTCOME_STATUS as bk, PAYMENT_AUTHORIZATION_PROVIDER as bl, PURCHASE_INTENT_ROUTE as bm, PaymentAuthorizationAdapterRegistry as bn, type PaymentInfoDTO as bo, type PaymentState as bp, type PlaceDetailsResponse as bq, PlacesService as br, type PriceQuote as bs, type PricingOverrides as bt, type ProviderResolutionSource as bu, type PurchaseIntentActionDecision as bv, type PurchaseIntentRequestOptions as bw, type PurchaseIntentResolveOptions as bx, type PurchaseIntentResolveStatus as by, PurchaseIntentResolver as bz, type PaymentAuthorizationContext as c, type ResourceInfo as c0, type RetryEvent as c1, type Room as c2, SESSION_CHANGE_SOURCE as c3, type SchedulingMetadata as c4, type SchedulingResult as c5, SchedulingService as c6, type SenderType as c7, type Service as c8, type ServiceAvailabilityParams as c9, type TimeSlot as cA, type TrackCategoryViewOptions as cB, type TrackProductViewOptions as cC, type UpdateOrderStatusInput as cD, type UpdateProfileInput as cE, type UploadInitResponse as cF, type UploadResult as cG, UploadService as cH, combine as cI, combineObject as cJ, createCimplifyClient as cK, createDefaultPaymentAuthorizationAdapterRegistry as cL, createElements as cM, err as cN, flatMap as cO, fromPromise as cP, getOrElse as cQ, isErr as cR, isOk as cS, mapError as cT, mapResult as cU, ok as cV, toNullable as cW, tryCatch as cX, unwrap as cY, type ServiceAvailabilityResult as ca, type ServiceCharge as cb, type ServiceNotes as cc, type ServiceScheduleRequest as cd, type ServiceStatus as ce, type SessionActivityData as cf, type SessionChangeEvent as cg, type SessionChangeSource as ch, type SessionMessage as ci, SessionService as cj, type SlotResourceInfo as ck, type SlotStaffInfo as cl, type Staff as cm, type StaffAssignment as cn, type StaffRole as co, type StaffScheduleItem as cp, type StockLevel as cq, type StockStatus as cr, type StoreCreditBalance as cs, StoreCreditQueries as ct, type StorefrontBootstrap as cu, SubscriptionService as cv, SupportService as cw, type Table as cx, type TimeRange as cy, type TimeRanges as cz, type PaymentAuthorizationOutcome as d, type ChatReplyCard as e, type ActivityRecommendationsResponse as f, ActivityService as g, type ActivityStateResponse as h, type AmountToPay as i, AuthService as j, type AuthStatus as k, type AuthorizeCardPopupOptions as l, type AutocompletePrediction as m, type AutocompleteResponse as n, type AvailabilityResult as o, type AvailableSlot as p, type BookingModificationType as q, type BookingStatus as r, type BookingWithDetails as s, type BufferTimes as t, type Business as u, type BusinessDetailsDTO as v, type BusinessHours as w, type BusinessPreferences as x, BusinessService as y, type BusinessSettings as z };
|
|
@@ -500,6 +500,34 @@ var PURCHASE_INTENT_ERROR_CODE = {
|
|
|
500
500
|
OFFER_ENDED: "OFFER_ENDED",
|
|
501
501
|
SOURCE_UNAVAILABLE: "SOURCE_UNAVAILABLE"
|
|
502
502
|
};
|
|
503
|
+
var SOURCE_REFUSAL = {
|
|
504
|
+
INVALID_IDENTIFIER: "invalid_identifier",
|
|
505
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
506
|
+
CART_CONVERTED: "cart_converted",
|
|
507
|
+
CART_EXPIRED: "cart_expired",
|
|
508
|
+
CART_CURRENCY_MISSING: "cart_currency_missing",
|
|
509
|
+
CART_CHANGED: "cart_changed",
|
|
510
|
+
SELLER_MISMATCH: "seller_mismatch",
|
|
511
|
+
BUYER_MISMATCH: "buyer_mismatch",
|
|
512
|
+
ATTRIBUTION_MISMATCH: "attribution_mismatch",
|
|
513
|
+
EVIDENCE_MISMATCH: "evidence_mismatch",
|
|
514
|
+
LINES_MISMATCH: "lines_mismatch",
|
|
515
|
+
LINE_SHAPE_INVALID: "line_shape_invalid",
|
|
516
|
+
SOURCE_NOT_FOUND: "source_not_found",
|
|
517
|
+
SOURCE_KIND_MISMATCH: "source_kind_mismatch",
|
|
518
|
+
SURFACE_MISMATCH: "surface_mismatch",
|
|
519
|
+
PRODUCT_SELECTION_MISSING: "product_selection_missing",
|
|
520
|
+
SOCIAL_HANDOFF_INVALID: "social_handoff_invalid",
|
|
521
|
+
STAFF_AUTHORITY_MISSING: "staff_authority_missing",
|
|
522
|
+
TERMS_MISSING: "terms_missing",
|
|
523
|
+
TERMS_WINDOW_ELAPSED: "terms_window_elapsed",
|
|
524
|
+
COMMERCIAL_AUTHORITY_STALE: "commercial_authority_stale",
|
|
525
|
+
MISSING_LOCATION: "missing_location",
|
|
526
|
+
MISSING_SELLER_ORIGIN: "missing_seller_origin",
|
|
527
|
+
DELIVERY_COUNTRY_MISSING: "delivery_country_missing",
|
|
528
|
+
VOUCHER_SCOPE_MISMATCH: "voucher_scope_mismatch",
|
|
529
|
+
TRANSACTION_MISMATCH: "transaction_mismatch"
|
|
530
|
+
};
|
|
503
531
|
|
|
504
532
|
exports.CHECKOUT_COMPLIANCE_LANE = CHECKOUT_COMPLIANCE_LANE;
|
|
505
533
|
exports.CHECKOUT_COMPLIANCE_REASON = CHECKOUT_COMPLIANCE_REASON;
|
|
@@ -537,6 +565,7 @@ exports.PURCHASE_INTENT_SOURCE_KIND = PURCHASE_INTENT_SOURCE_KIND;
|
|
|
537
565
|
exports.PURCHASE_INTENT_STATUS = PURCHASE_INTENT_STATUS;
|
|
538
566
|
exports.PURCHASE_SURFACE = PURCHASE_SURFACE;
|
|
539
567
|
exports.PURCHASING_PRINCIPAL_KIND = PURCHASING_PRINCIPAL_KIND;
|
|
568
|
+
exports.SOURCE_REFUSAL = SOURCE_REFUSAL;
|
|
540
569
|
exports.ZERO = ZERO;
|
|
541
570
|
exports.currencyCode = currencyCode;
|
|
542
571
|
exports.enrichError = enrichError;
|