@payment-kit-js/vanilla 0.1.0-alpha.6 → 0.1.0-alpha.7
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/{connect-card-EaOlRbPS.d.mts → connect-card-C582hcWw.d.mts} +1 -3
- package/dist/connect-card-C582hcWw.d.mts.map +1 -0
- package/dist/{connect-tunnel-x-Ce423Pa2.d.mts → connect-tunnel-x-rLA6I_EO.d.mts} +1 -54
- package/dist/connect-tunnel-x-rLA6I_EO.d.mts.map +1 -0
- package/dist/index.d.mts +3 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/payment-methods/card.d.mts +3 -5
- package/dist/payment-methods/card.d.mts.map +1 -1
- package/dist/payment-methods/google-pay.d.mts +4 -6
- package/dist/payment-methods/google-pay.d.mts.map +1 -1
- package/dist/payment-methods/next-action-handlers.d.mts +0 -2
- package/dist/payment-methods/next-action-handlers.d.mts.map +1 -1
- package/dist/payment-methods/paypal.d.mts +3 -5
- package/dist/payment-methods/paypal.d.mts.map +1 -1
- package/dist/payment-methods/stripe-google-pay-adapter.d.mts +1 -1
- package/dist/penpal/connect-card.d.mts +1 -3
- package/dist/penpal/connect-tunnel-x.d.mts +1 -2
- package/dist/{stripe-google-pay-adapter-CkV5HWI-.d.mts → stripe-google-pay-adapter-DUUB46SG.d.mts} +1 -1
- package/dist/{stripe-google-pay-adapter-CkV5HWI-.d.mts.map → stripe-google-pay-adapter-DUUB46SG.d.mts.map} +1 -1
- package/dist/{types-6mOKdjCh.d.mts → types-DrQ2i820.d.mts} +3 -3
- package/dist/{types-6mOKdjCh.d.mts.map → types-DrQ2i820.d.mts.map} +1 -1
- package/package.json +2 -2
- package/dist/cardsetupintent-D2gBMj3e.d.mts +0 -35
- package/dist/cardsetupintent-D2gBMj3e.d.mts.map +0 -1
- package/dist/connect-card-EaOlRbPS.d.mts.map +0 -1
- package/dist/connect-tunnel-x-Ce423Pa2.d.mts.map +0 -1
- package/dist/publiccardcheckoutresponse-wxFCeVdO.d.mts +0 -40
- package/dist/publiccardcheckoutresponse-wxFCeVdO.d.mts.map +0 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { t as CardSetupIntent } from "./cardsetupintent-D2gBMj3e.mjs";
|
|
2
|
-
import { t as PublicCardCheckoutResponse } from "./publiccardcheckoutresponse-wxFCeVdO.mjs";
|
|
3
1
|
import { Connection } from "penpal";
|
|
4
2
|
|
|
5
3
|
//#region src/penpal/connect-card.d.ts
|
|
@@ -22,4 +20,4 @@ declare const connectToCardIframe: (iframe: HTMLIFrameElement, methods: CardPare
|
|
|
22
20
|
declare const connectToCardParent: (methods: CardIFrameMethods) => Connection<CardParentMethods>;
|
|
23
21
|
//#endregion
|
|
24
22
|
export { ParentConnection as a, IFrameConnection as i, CardInputType as n, connectToCardIframe as o, CheckoutResponse as r, connectToCardParent as s, CardErrorCode as t };
|
|
25
|
-
//# sourceMappingURL=connect-card-
|
|
23
|
+
//# sourceMappingURL=connect-card-C582hcWw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-card-C582hcWw.d.mts","names":[],"sources":["../src/penpal/connect-card.ts"],"sourcesContent":[],"mappings":";;;KAIK,iBAAA;EAAA,QAAA,EAAA,CAAA,iBAAiB,EAAA,MAAA,EAAA,GACqB,OADrB,CAC6B,eAD7B,GAAA;IAC6B,KAAA,EAA2B,aAA3B;EAA2B,CAAA,CAAA;EAAnC,UAAA,EAAA,GAAA,GACvB,OADuB,CACf,aADe,GAAA,SAAA,CAAA;CACf;KAGvB,iBAAA,GAHe;EAAO,QAAA,EAAA,GAAA,GAAA,IAAA;EAGtB,aAAA,EAAA,CAAA,SAAiB,EAAA,OAAA,EAAA,GAAA,IAAA;AAKtB,CAAA;AAEY,KAFA,aAAA,GAEa,UAAA,GAAA,UAAA,GAAA,UAAA;AAOb,KAPA,aAAA,GAOgB,SAAc,GAAA,UAAA,GAAA,eAAD,GAAA,sBAAA,GAAA,wBAAA;AAE7B,KAFA,gBAAA,GAAmB,UAEW,CAFA,iBAEX,CAAA;AAEnB,KAFA,gBAAA,GAAmB,UAEA,CAFW,iBAEX,CAAA;AAElB,KAFD,gBAAA,GAAmB,0BAI9B;AAF2C,cAA/B,mBAA+B,EAAA,CAAA,MAAA,EAAA,iBAAA,EAAA,OAAA,EAA4B,iBAA5B,EAAA,GAA6C,UAA7C,CAA6C,iBAA7C,CAAA;AAA4B,cAI3D,mBAJ2D,EAAA,CAAA,OAAA,EAI3B,iBAJ2B,EAAA,GAIV,UAJU,CAIV,iBAJU,CAAA"}
|
|
@@ -1,58 +1,5 @@
|
|
|
1
|
-
import { t as CardSetupIntent } from "./cardsetupintent-D2gBMj3e.mjs";
|
|
2
1
|
import { Connection } from "penpal";
|
|
3
2
|
|
|
4
|
-
//#region ../../packages/sdk/esm/models/createcardsetupintentres.d.ts
|
|
5
|
-
type CreateCardSetupIntentRes = {
|
|
6
|
-
/**
|
|
7
|
-
* The ID of the card setup intent
|
|
8
|
-
*/
|
|
9
|
-
cardSetupIntentId: string;
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region ../../packages/sdk/esm/lib/retries.d.ts
|
|
13
|
-
type BackoffStrategy = {
|
|
14
|
-
initialInterval: number;
|
|
15
|
-
maxInterval: number;
|
|
16
|
-
exponent: number;
|
|
17
|
-
maxElapsedTime: number;
|
|
18
|
-
};
|
|
19
|
-
type RetryConfig = {
|
|
20
|
-
strategy: "none";
|
|
21
|
-
} | {
|
|
22
|
-
strategy: "backoff";
|
|
23
|
-
backoff?: BackoffStrategy;
|
|
24
|
-
retryConnectionErrors?: boolean;
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region ../../packages/sdk/esm/lib/sdks.d.ts
|
|
28
|
-
type RequestOptions = {
|
|
29
|
-
/**
|
|
30
|
-
* Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If
|
|
31
|
-
* `fetchOptions.signal` is set then it will take precedence over this option.
|
|
32
|
-
*/
|
|
33
|
-
timeoutMs?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Set or override a retry policy on HTTP calls.
|
|
36
|
-
*/
|
|
37
|
-
retries?: RetryConfig;
|
|
38
|
-
/**
|
|
39
|
-
* Specifies the status codes which should be retried using the given retry policy.
|
|
40
|
-
*/
|
|
41
|
-
retryCodes?: string[];
|
|
42
|
-
/**
|
|
43
|
-
* Overrides the base server URL that will be used by an operation.
|
|
44
|
-
*/
|
|
45
|
-
serverURL?: string | URL;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated `fetchOptions` has been flattened into `RequestOptions`.
|
|
48
|
-
*
|
|
49
|
-
* Sets various request options on the `fetch` call made by an SDK method.
|
|
50
|
-
*
|
|
51
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
|
|
52
|
-
*/
|
|
53
|
-
fetchOptions?: Omit<RequestInit, "method" | "body">;
|
|
54
|
-
} & Omit<RequestInit, "method" | "body">;
|
|
55
|
-
//#endregion
|
|
56
3
|
//#region src/penpal/connect-tunnel-x.d.ts
|
|
57
4
|
type TunnelXIFrameMethods = {
|
|
58
5
|
startPayment: () => void;
|
|
@@ -89,4 +36,4 @@ declare class TunnelXManager {
|
|
|
89
36
|
}
|
|
90
37
|
//#endregion
|
|
91
38
|
export { connectToTunnelXParent as a, connectToTunnelXIframe as i, TunnelXManager as n, TunnelXParentConnection as r, TunnelXIFrameConnection as t };
|
|
92
|
-
//# sourceMappingURL=connect-tunnel-x-
|
|
39
|
+
//# sourceMappingURL=connect-tunnel-x-rLA6I_EO.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-tunnel-x-rLA6I_EO.d.mts","names":[],"sources":["../src/penpal/connect-tunnel-x.ts"],"sourcesContent":[],"mappings":";;;AAEyC,KAMpC,oBAAA,GAAoB;EAGE,YAAA,EAAA,GAAA,GAAA,IAAA;EAA2B,cAAA,EAAA,GAAA,GAAA,IAAA;EAEO,cAAA,EAAA,CAAA,MAAA,EAFlC,MAEkC,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,GAFP,OAEO,CAAA,OAAA,CAAA;EAAR,kBAAA,EAAA,GAAA,GAAA,IAAA;EACK,kBAAA,EAAA,CAAA,iBAAA,EAAA,MAAA,EAAA,GADL,OACK,CADG,eACH,CAAA;EAAR,qBAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,GAAA,OAAA,CAAQ,wBAAR,CAAA;EACqB,mBAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,cAAA,EAAA,GAAmB,OAAnB,CAAA,OAAA,CAAA;CAAmB;KAGrF,oBAAA,GAAuB,MAHqE,CAAA,MAAA,EAAA,KAAA,CAAA;AAG5F,KAEO,uBAAA,GAA0B,UAFJ,CAEe,oBAFf,CAAA;AAEtB,KAEA,uBAAA,GAA0B,UAFW,CAEA,oBAFX,CAAA;AAE1B,cAEC,sBAFoC,EAAA,CAAA,MAAA,EAEF,iBAFT,EAAA,OAAU,EAE2B,oBAF3B,EAAA,GAE+C,UAF/C,CAE+C,oBAF/C,CAAA;AAEnC,cAIA,sBAFZ,EAAA,CAAA,OAAA,EAE+C,oBAF/C,EAAA,GAEmE,UAFnE,CAEmE,oBAFnE,CAAA;;;;;KAUI,oBAAA,GAZ0F;EAIlF,CAAA,UAAA,EAAA,MAAA,CAAA,EAAA,CAAA,MAEZ,EAAA,OAAA,EAAA,OAAA,CAAA,EAOmD,cAPnD,EAAA,GAOsE,OAPtE,CAAA,OAAA,CAAA;CAF+C;AAAoB,cAYvD,cAAA,CAZuD;EAAA,QAAA,UAAA;EAAA,QAAA,EAcjD,oBAdiD;EAQ/D,OAAA,0BAAoB,EAC2B,CAAA,UAAA,EAOK,uBAPqB,EAAA,GAOE,OAPF,CAOE,cAPF,CAAA;EAGjE,QAAA,WAAc,CAAA;EAER;;;;EAiBM,IAAA,eAAA,CAAA,CAAA,EAAA,oBAAA;EAAoB,OAAA,CAAA,CAAA,EAAA,IAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./connect-tunnel-x-
|
|
3
|
-
import "./
|
|
4
|
-
import "./connect-card-EaOlRbPS.mjs";
|
|
5
|
-
import { n as PaymentKitFields, t as PaymentKit$1 } from "./types-6mOKdjCh.mjs";
|
|
1
|
+
import "./connect-card-C582hcWw.mjs";
|
|
2
|
+
import "./connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
|
+
import { n as PaymentKitFields, t as PaymentKit$1 } from "./types-DrQ2i820.mjs";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
8
6
|
declare const PaymentKit: PaymentKit$1;
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;cAwBM,YAAY"}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { n as connectToTunnelXIframe } from "./connect-tunnel-x-BhVAej5Q.mjs";
|
|
|
3
3
|
import { r as createCheckoutIFrame } from "./utils-h0dxplHy.mjs";
|
|
4
4
|
|
|
5
5
|
//#region package.json
|
|
6
|
-
var version = "0.1.0-alpha.
|
|
6
|
+
var version = "0.1.0-alpha.7";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/index.ts
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["PaymentKit: PaymentKitType","PACKAGE_VERSION","externalFuncsMapByPm: ExternalFuncsMapByPm<PaymentMethods>","submit: PaymentKitReturnType[\"submit\"]"],"sources":["../package.json","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@payment-kit-js/vanilla\",\n \"version\": \"0.1.0-alpha.
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["PaymentKit: PaymentKitType","PACKAGE_VERSION","externalFuncsMapByPm: ExternalFuncsMapByPm<PaymentMethods>","submit: PaymentKitReturnType[\"submit\"]"],"sources":["../package.json","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@payment-kit-js/vanilla\",\n \"version\": \"0.1.0-alpha.7\",\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.mts\",\n \"module\": \"./dist/index.mjs\",\n \"exports\": {\n \".\": \"./dist/index.mjs\",\n \"./payment-methods/card\": \"./dist/payment-methods/card.mjs\",\n \"./payment-methods/google-pay\": \"./dist/payment-methods/google-pay.mjs\",\n \"./payment-methods/next-action-handlers\": \"./dist/payment-methods/next-action-handlers.mjs\",\n \"./payment-methods/paypal\": \"./dist/payment-methods/paypal.mjs\",\n \"./payment-methods/stripe-google-pay-adapter\": \"./dist/payment-methods/stripe-google-pay-adapter.mjs\",\n \"./penpal/connect-card\": \"./dist/penpal/connect-card.mjs\",\n \"./penpal/connect-tunnel-x\": \"./dist/penpal/connect-tunnel-x.mjs\",\n \"./package.json\": \"./package.json\"\n },\n \"license\": \"MIT\",\n \"description\": \"Vanilla package for PaymentKit\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"dev\": \"yarn tsdown --watch ./src\",\n \"build\": \"yarn tsdown\"\n },\n \"packageManager\": \"yarn@4.10.3\",\n \"dependencies\": {\n \"@stripe/stripe-js\": \"^5.5.0\",\n \"penpal\": \"^7.0.4\",\n \"valibot\": \"^1.1.0\"\n },\n \"devDependencies\": {\n \"@pkg/sdk\": \"workspace:*\",\n \"@pkg/tsconfig\": \"workspace:*\",\n \"tsdown\": \"^0.15.10\",\n \"typescript\": \"^5.9.3\"\n },\n \"stableVersion\": \"0.1.0-alpha.6\"\n}\n","import { version as PACKAGE_VERSION } from \"../package.json\";\nimport { connectToTunnelXIframe } from \"./penpal/connect-tunnel-x\";\nimport type { ExternalFuncsMapByPm, PaymentKitFields, PaymentKit as PaymentKitType } from \"./types\";\nimport { createCheckoutIFrame } from \"./utils\";\n\ntype PaymentKitReturnType = ReturnType<PaymentKitType>;\n\nconst createTunnelXConnection = (baseUrl: string, apiBaseUrl: string, token: string) => {\n const iframe = createCheckoutIFrame(\"tunnel-x\", baseUrl, {\n checkout_token: token,\n api_base_url: apiBaseUrl,\n });\n document.body.appendChild(iframe);\n\n const connection = connectToTunnelXIframe(iframe, {});\n\n const unmount = () => {\n connection.destroy();\n document.body.removeChild(iframe);\n };\n\n return { unmount, connection };\n};\n\nconst PaymentKit: PaymentKitType = ({ baseUrl, apiBaseUrl, secureToken, paymentMethods }) => {\n type PaymentMethods = typeof paymentMethods;\n\n // Log version for debugging\n console.log(`[PaymentKit] v${PACKAGE_VERSION} initialized`);\n\n const { connection: tunnelXConnection, unmount: unmountTunnelX } = createTunnelXConnection(\n baseUrl,\n apiBaseUrl,\n secureToken,\n );\n\n const paymentKitStates = {\n baseUrl,\n apiBaseUrl,\n secureToken,\n tunnelXConnection,\n };\n\n const pmInstances = paymentMethods.map((paymentMethod) => paymentMethod(paymentKitStates));\n\n const externalFuncsMapByPm: ExternalFuncsMapByPm<PaymentMethods> = pmInstances.reduce(\n (acc, { name, externalFuncs }) => {\n // @ts-expect-error - typecase this better in future\n acc[name] = externalFuncs;\n return acc;\n },\n {} as ExternalFuncsMapByPm<PaymentMethods>,\n );\n\n const submit: PaymentKitReturnType[\"submit\"] = ({\n paymentMethod: paymentMethodName,\n fields,\n options,\n onSuccess,\n onError,\n }) => {\n const paymentMethod = pmInstances.find(({ name }) => name === paymentMethodName);\n if (!paymentMethod) {\n onError({ root: \"payment_method_not_found\" });\n return;\n }\n paymentMethod.internalFuncs\n .submitPayment(fields, options)\n .then(({ data, errors }) => {\n errors ? onError(errors) : onSuccess(data);\n })\n .catch((e) => {\n console.error(\"PaymentKit:submit:catch\", e);\n\n // Try to extract error message from response\n if (e?.response?.data) {\n onError(e.response.data);\n } else if (e?.message) {\n onError({ root: e.message });\n } else {\n onError({ root: \"unknown_error\" });\n }\n });\n };\n\n const cleanup = () => {\n // Clean up all payment method instances\n for (const pm of pmInstances) {\n if (pm.internalFuncs.cleanup) {\n pm.internalFuncs.cleanup();\n }\n }\n unmountTunnelX();\n };\n\n return {\n submit,\n cleanup,\n ...externalFuncsMapByPm,\n };\n};\n\nexport type { PaymentKitFields };\n\nexport default PaymentKit;\n"],"mappings":";;;;;cAEa;;;;ACKb,MAAM,2BAA2B,SAAiB,YAAoB,UAAkB;CACtF,MAAM,SAAS,qBAAqB,YAAY,SAAS;EACvD,gBAAgB;EAChB,cAAc;EACf,CAAC;AACF,UAAS,KAAK,YAAY,OAAO;CAEjC,MAAM,aAAa,uBAAuB,QAAQ,EAAE,CAAC;CAErD,MAAM,gBAAgB;AACpB,aAAW,SAAS;AACpB,WAAS,KAAK,YAAY,OAAO;;AAGnC,QAAO;EAAE;EAAS;EAAY;;AAGhC,MAAMA,cAA8B,EAAE,SAAS,YAAY,aAAa,qBAAqB;AAI3F,SAAQ,IAAI,iBAAiBC,QAAgB,cAAc;CAE3D,MAAM,EAAE,YAAY,mBAAmB,SAAS,mBAAmB,wBACjE,SACA,YACA,YACD;CAED,MAAM,mBAAmB;EACvB;EACA;EACA;EACA;EACD;CAED,MAAM,cAAc,eAAe,KAAK,kBAAkB,cAAc,iBAAiB,CAAC;CAE1F,MAAMC,uBAA6D,YAAY,QAC5E,KAAK,EAAE,MAAM,oBAAoB;AAEhC,MAAI,QAAQ;AACZ,SAAO;IAET,EAAE,CACH;CAED,MAAMC,UAA0C,EAC9C,eAAe,mBACf,QACA,SACA,WACA,cACI;EACJ,MAAM,gBAAgB,YAAY,MAAM,EAAE,WAAW,SAAS,kBAAkB;AAChF,MAAI,CAAC,eAAe;AAClB,WAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC7C;;AAEF,gBAAc,cACX,cAAc,QAAQ,QAAQ,CAC9B,MAAM,EAAE,MAAM,aAAa;AAC1B,YAAS,QAAQ,OAAO,GAAG,UAAU,KAAK;IAC1C,CACD,OAAO,MAAM;AACZ,WAAQ,MAAM,2BAA2B,EAAE;AAG3C,OAAI,GAAG,UAAU,KACf,SAAQ,EAAE,SAAS,KAAK;YACf,GAAG,QACZ,SAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;OAE5B,SAAQ,EAAE,MAAM,iBAAiB,CAAC;IAEpC;;CAGN,MAAM,gBAAgB;AAEpB,OAAK,MAAM,MAAM,YACf,KAAI,GAAG,cAAc,QACnB,IAAG,cAAc,SAAS;AAG9B,kBAAgB;;AAGlB,QAAO;EACL;EACA;EACA,GAAG;EACJ;;AAKH,kBAAe"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../connect-tunnel-x-
|
|
3
|
-
import "../
|
|
4
|
-
import { n as CardInputType$1, o as connectToCardIframe, r as CheckoutResponse$1 } from "../connect-card-EaOlRbPS.mjs";
|
|
5
|
-
import { r as PaymentMethod } from "../types-6mOKdjCh.mjs";
|
|
1
|
+
import { n as CardInputType$1, o as connectToCardIframe, r as CheckoutResponse$1 } from "../connect-card-C582hcWw.mjs";
|
|
2
|
+
import "../connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
|
+
import { r as PaymentMethod } from "../types-DrQ2i820.mjs";
|
|
6
4
|
|
|
7
5
|
//#region src/payment-methods/card.d.ts
|
|
8
6
|
type CardInputType = CardInputType$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.mts","names":[],"sources":["../../src/payment-methods/card.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card.d.mts","names":[],"sources":["../../src/payment-methods/card.ts"],"sourcesContent":[],"mappings":";;;;;KAQY,aAAA,GAAgB;KAChB,gBAAA,GAAmB;KAgD1B,oBAAA,GAAuB,QAAQ,kBAAkB;UAC5C;AAlDV,CAAA;AACA,cAgQM,iBAhQsB,EAuDsC,aAvDb,CAAA;EAgDhD,aAAA,EAAA,CAAA,IAAA,EAOW,eAPS,EAAA,OAAA,EAOqB,oBAPrB,EAAA,GAAA;IAA6B,KAAA,EAAA,CAAA,cAAA,EAAA,MAAA,EAAA,GAAA;MAAlB,OAAA,EAAA,GAAA,GAAA,IAAA;IAAR,CAAA;EAClB,CAAA;CAAM,EAAA,MAAA,CAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../connect-tunnel-x-
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import { r as PaymentMethod } from "../types-6mOKdjCh.mjs";
|
|
6
|
-
import { n as GooglePayMockScenario } from "../stripe-google-pay-adapter-CkV5HWI-.mjs";
|
|
1
|
+
import "../connect-card-C582hcWw.mjs";
|
|
2
|
+
import "../connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
|
+
import { r as PaymentMethod } from "../types-DrQ2i820.mjs";
|
|
4
|
+
import { n as GooglePayMockScenario } from "../stripe-google-pay-adapter-DUUB46SG.mjs";
|
|
7
5
|
|
|
8
6
|
//#region src/payment-methods/google-pay.d.ts
|
|
9
7
|
type GooglePayCustomerInfo = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-pay.d.mts","names":[],"sources":["../../src/payment-methods/google-pay.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-pay.d.mts","names":[],"sources":["../../src/payment-methods/google-pay.ts"],"sourcesContent":[],"mappings":";;;;;;KAKY,qBAAA;;;;KAKA,qBAAA;EALA,YAAA,EAAA,MAAA;EAKA,aAAA,EAEK,qBAAA;EASL,cAAA,EAAA;IASA,SAAA,CAAA,EAAA,MAAA;IAOA,WAAA,CAAA,EAAA;MA8MN,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OASJ;;;;;;;;KAvOU,sBAAA;;;;;;;;KASA,wBAAA;;;;;;KAOA,sBAAA;;gBAEI;iBACC;;cA2MX,wBASJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-action-handlers.d.mts","names":[],"sources":["../../src/payment-methods/next-action-handlers.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"next-action-handlers.d.mts","names":[],"sources":["../../src/payment-methods/next-action-handlers.ts"],"sourcesContent":[],"mappings":";;;;;KA6CY,gBAAA;;;;;;;;;;;;;cAgCC,+BACC,YAAY,8CACvB,QAAQ"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../connect-tunnel-x-
|
|
3
|
-
import "../
|
|
4
|
-
import "../connect-card-EaOlRbPS.mjs";
|
|
5
|
-
import { r as PaymentMethod } from "../types-6mOKdjCh.mjs";
|
|
1
|
+
import "../connect-card-C582hcWw.mjs";
|
|
2
|
+
import "../connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
|
+
import { r as PaymentMethod } from "../types-DrQ2i820.mjs";
|
|
6
4
|
|
|
7
5
|
//#region src/payment-methods/paypal.d.ts
|
|
8
6
|
type PayPalCustomerInfo = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paypal.d.mts","names":[],"sources":["../../src/payment-methods/paypal.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paypal.d.mts","names":[],"sources":["../../src/payment-methods/paypal.ts"],"sourcesContent":[],"mappings":";;;;;KAIY,kBAAA;;;;KAKA,kBAAA;EALA,YAAA,EAAA,MAAA;EAKA,aAAA,EAEK,kBAAA;EAQL,cAAA,EAAA;IAMA,SAAA,CAAA,EAAA,MAAA;IAOA,WAAA,CAAA,EAAA;MAOA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAmB,OAAA;IA0JzB,CAAA;;;;;;KA9KM,mBAAA;;;;;KAMA,oBAAA;;;;;;KAOA,sBAAA;;;;;;KAOA,mBAAA;;gBAEI;;cAwJV,qBAqBJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as StripeGooglePayAdapter, i as ShowPaymentSheetResult, n as GooglePayMockScenario, r as PaymentRequestConfig, t as ConfirmResult } from "../stripe-google-pay-adapter-
|
|
1
|
+
import { a as StripeGooglePayAdapter, i as ShowPaymentSheetResult, n as GooglePayMockScenario, r as PaymentRequestConfig, t as ConfirmResult } from "../stripe-google-pay-adapter-DUUB46SG.mjs";
|
|
2
2
|
export { ConfirmResult, GooglePayMockScenario, PaymentRequestConfig, ShowPaymentSheetResult, StripeGooglePayAdapter };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../publiccardcheckoutresponse-wxFCeVdO.mjs";
|
|
3
|
-
import { a as ParentConnection, i as IFrameConnection, n as CardInputType, o as connectToCardIframe, r as CheckoutResponse, s as connectToCardParent, t as CardErrorCode } from "../connect-card-EaOlRbPS.mjs";
|
|
1
|
+
import { a as ParentConnection, i as IFrameConnection, n as CardInputType, o as connectToCardIframe, r as CheckoutResponse, s as connectToCardParent, t as CardErrorCode } from "../connect-card-C582hcWw.mjs";
|
|
4
2
|
export { CardErrorCode, CardInputType, CheckoutResponse, IFrameConnection, ParentConnection, connectToCardIframe, connectToCardParent };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { a as connectToTunnelXParent, i as connectToTunnelXIframe, n as TunnelXManager, r as TunnelXParentConnection, t as TunnelXIFrameConnection } from "../connect-tunnel-x-Ce423Pa2.mjs";
|
|
1
|
+
import { a as connectToTunnelXParent, i as connectToTunnelXIframe, n as TunnelXManager, r as TunnelXParentConnection, t as TunnelXIFrameConnection } from "../connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
2
|
export { TunnelXIFrameConnection, TunnelXManager, TunnelXParentConnection, connectToTunnelXIframe, connectToTunnelXParent };
|
package/dist/{stripe-google-pay-adapter-CkV5HWI-.d.mts → stripe-google-pay-adapter-DUUB46SG.d.mts}
RENAMED
|
@@ -51,4 +51,4 @@ declare class StripeGooglePayAdapter {
|
|
|
51
51
|
}
|
|
52
52
|
//#endregion
|
|
53
53
|
export { StripeGooglePayAdapter as a, ShowPaymentSheetResult as i, GooglePayMockScenario as n, PaymentRequestConfig as r, ConfirmResult as t };
|
|
54
|
-
//# sourceMappingURL=stripe-google-pay-adapter-
|
|
54
|
+
//# sourceMappingURL=stripe-google-pay-adapter-DUUB46SG.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-google-pay-adapter-
|
|
1
|
+
{"version":3,"file":"stripe-google-pay-adapter-DUUB46SG.d.mts","names":[],"sources":["../src/payment-methods/stripe-google-pay-adapter.ts"],"sourcesContent":[],"mappings":";;;;;IAAqH,MAAA,CAAA,EAKxG,iBALwG;EAAA;;AAKvF,UAIb,oBAAA,CAJa;EAAA,OAAA,EAAA,MAAA;EAIb,QAAA,EAAA,MAAA;EAQL,KAAA,EAAA;IAKA,KAAA,EAAA,MAAa;IAEb,MAAA,EAAA,MAAA;EAMC,CAAA;EAKgB,gBAAA,EAAA,OAAA;EA0BE,iBAAA,EAAA,OAAA;;AAyCK,KArFxB,sBAAA,GAqFwB;EAAR,OAAA,EAAA,IAAA;EAqDqD,eAAA,EAAA,MAAA;EAAR,QAAA,EAAA,CAAA,MAAA,EAAA,SAAA,GAAA,MAAA,EAAA,GAAA,IAAA;CAAO,GAAA;;;;;;;KArIpE,aAAA;;;;;;aAEA,qBAAA;;;;;cAMC,sBAAA;;;;6BAKgB;;+BA0BE;oBAmBL;sBAsBE,QAAQ;mEAqDqC,QAAQ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as CardErrorCode } from "./connect-card-C582hcWw.mjs";
|
|
2
|
+
import { t as TunnelXIFrameConnection } from "./connect-tunnel-x-rLA6I_EO.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/types.d.ts
|
|
5
5
|
type FormFieldNames = "customer_name" | "customer_email" | "customer_country" | "customer_zip_code";
|
|
@@ -61,4 +61,4 @@ type PaymentMethod<TExternalFuncs = unknown, TName = string> = (paymentKitStates
|
|
|
61
61
|
type ExternalFuncsMapByPm<T extends readonly PaymentMethod<unknown>[]> = { [K in T[number] as ReturnType<K>["name"]]: ReturnType<K>["externalFuncs"] };
|
|
62
62
|
//#endregion
|
|
63
63
|
export { PaymentKitFields as n, PaymentMethod as r, PaymentKit as t };
|
|
64
|
-
//# sourceMappingURL=types-
|
|
64
|
+
//# sourceMappingURL=types-DrQ2i820.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-DrQ2i820.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;KAGK,cAAA;KAEO,cAAA;AAFP,KAIO,cAAA,GAJO;EAEP,aAAA,EAAA,CAAA,MAAc,EAId,gBAJc,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,GAMnB,OANmB,CAAA;IAEd,IAAA,EAAA;MAEA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;IAEkF,CAAA;IAAvF,MAAA,CAAA,EAAA,KAAA;EAAO,CAAA,GAAA;IAIF,IAAA,CAAA,EAAA,KAAU;IAAuB,MAAA,EAJiD,gBAIjD;EAK3B,CAAA,CAAA;EACS,OAAA,CAAA,EAAA,GAAA,GAAA,IAAA;CAArB;AAC4B,KAPtB,UAAA,GAOsB,CAAA,UAAA,SAPW,aAOX,CAAA,OAAA,CAAA,EAAA,CAAA,CAAA,OAAA,EAAA;EAAxB,OAAA,EAAA,MAAA;EAAuB,UAAA,EAAA,MAAA;EAI5B,WAAA,EAAA,MAAA;EAA2C,cAAA,EAN9B,CAM8B;CACT,EAAA,GANjC,oBAMiC,CANZ,CAMY,CAAA,GAAA;EAArB,MAAA,EALR,uBAKQ,CALgB,CAKhB,CAAA;EAER,OAAA,EAAA,GAAA,GAAA,IAAA;CACO;KAJZ,uBAMc,CAAA,UAAA,SAN6B,aAM7B,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,CAAA,UAAA,MALD,oBAKC,CALoB,CAKpB,CAAA,CAAA,CAAA,OAAA,EAAA;EAAgB,MAAA,EAHzB,gBAGyB;EAIvB,aAAA,EANK,CAML;EAOA,OAAA,CAAA,EAAA,OAAA;EAEC,OAAA,EAAA,CAAA,KAAA,EAbM,gBAaN,EAAA,GAAA,IAAA;EACA,SAAA,EAAA,CAAA,IAAA,EAAA;IACA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAOC,CAAA,EAAA,GAAA,IAAA;CAAkB,EAAA,GAAA,IAAA;AAAc,KAlBlC,gBAAA,GAkBkC;EAElC,OAAA,EAAA,MAAA;EAEA,UAAA,EAAA,MAAa;EAAgE,WAAA,EAAA,MAAA;EACjF,iBAAA,EAnBa,uBAmBb;CACS;AACA,KAlBL,gBAAA,GAkBK;EAAc,IAAA,CAAA,EAAA,MAAA;EAGnB,QAAA,CAAA,EAnBC,aAmBmB;EAAoB,QAAA,CAAA,EAlBvC,aAkBuC;EAC5C,QAAA,CAAA,EAlBK,aAkBL;EAAwB,MAAA,CAAA,EAAA,MAAA;EAAX,UAAA,CAAA,EAAA,MAAA;EAAmC,YAAA,CAAA,EAAA,MAAA;EAAX,MAAA,CAAA,EAAA,MAAA;EAAU,QAAA,CAAA,EAAA,MAAA;;cAXzC,kBAAkB;KAEpB,gBAAA,aAA6B;KAE7B,6EAA6E;QACjF;iBACS;iBACA;;KAGL,wCAAwC,oCAC5C,aAAa,WAAW,aAAa,WAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payment-kit-js/vanilla",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"types": "./dist/index.d.mts",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"valibot": "^1.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@pkg/sdk": "0.10.
|
|
34
|
+
"@pkg/sdk": "0.10.23",
|
|
35
35
|
"@pkg/tsconfig": "0.0.0",
|
|
36
36
|
"tsdown": "^0.15.10",
|
|
37
37
|
"typescript": "^5.9.3"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//#region ../../packages/sdk/esm/models/cardsetupintent.d.ts
|
|
2
|
-
|
|
3
|
-
type CardSetupIntent = {
|
|
4
|
-
/**
|
|
5
|
-
* Card setup intent identifier
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Whether all card details have been collected
|
|
10
|
-
*/
|
|
11
|
-
isCardAllSet: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Whether card PAN is set
|
|
14
|
-
*/
|
|
15
|
-
isCardPanSet: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Whether card expiry is set
|
|
18
|
-
*/
|
|
19
|
-
isCardExpSet: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether card CVC is set
|
|
22
|
-
*/
|
|
23
|
-
isCardCvcSet: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* When the card setup intent was created
|
|
26
|
-
*/
|
|
27
|
-
createdAt: Date;
|
|
28
|
-
/**
|
|
29
|
-
* When the card setup intent was last updated
|
|
30
|
-
*/
|
|
31
|
-
updatedAt: Date;
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { CardSetupIntent as t };
|
|
35
|
-
//# sourceMappingURL=cardsetupintent-D2gBMj3e.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cardsetupintent-D2gBMj3e.d.mts","names":["z","Result","SafeParseResult","SDKValidationError","CardSetupIntent","Date","CardSetupIntent$inboundSchema","ZodTypeDef","ZodType","cardSetupIntentFromJSON"],"sources":["../../../packages/sdk/esm/models/cardsetupintent.d.ts"],"sourcesContent":["import * as z from \"zod/v3\";\nimport { Result as SafeParseResult } from \"../types/fp.js\";\nimport { SDKValidationError } from \"./errors/sdkvalidationerror.js\";\nexport type CardSetupIntent = {\n /**\n * Card setup intent identifier\n */\n id: string;\n /**\n * Whether all card details have been collected\n */\n isCardAllSet: boolean;\n /**\n * Whether card PAN is set\n */\n isCardPanSet: boolean;\n /**\n * Whether card expiry is set\n */\n isCardExpSet: boolean;\n /**\n * Whether card CVC is set\n */\n isCardCvcSet: boolean;\n /**\n * When the card setup intent was created\n */\n createdAt: Date;\n /**\n * When the card setup intent was last updated\n */\n updatedAt: Date;\n};\n/** @internal */\nexport declare const CardSetupIntent$inboundSchema: z.ZodType<CardSetupIntent, z.ZodTypeDef, unknown>;\nexport declare function cardSetupIntentFromJSON(jsonString: string): SafeParseResult<CardSetupIntent, SDKValidationError>;\n//# sourceMappingURL=cardsetupintent.d.ts.map"],"mappings":";;KAGYI,eAAAA;;;;;;;;;;;;;;;;;;;;;;;;aAwBGC;;;;aAIAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-card-EaOlRbPS.d.mts","names":[],"sources":["../src/penpal/connect-card.ts"],"sourcesContent":[],"mappings":";;;;;KAIK,iBAAA;2CACsC,QAAQ;WAA2B;EADzE,CAAA,CAAA;EAC8C,UAAA,EAAA,GAAA,GAC/B,OAD+B,CACvB,aADuB,GAAA,SAAA,CAAA;CAA2B;KAIzE,iBAAA,GAJsC;EACf,QAAA,EAAA,GAAA,GAAA,IAAA;EAAR,aAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,GAAA,IAAA;CAAO;AAGtB,KAKO,aAAA,GALU,UAAA,GAAA,UAAA,GAAA,UAAA;AAKV,KAEA,aAAA,GAFa,SAAA,GAAA,UAAA,GAAA,eAAA,GAAA,sBAAA,GAAA,wBAAA;AAEb,KAOA,gBAAA,GAAmB,UAPN,CAOiB,iBAPjB,CAAA;AAOb,KAEA,gBAAA,GAAmB,UAFW,CAEA,iBAFX,CAAA;AAEnB,KAEA,gBAAA,GAAmB,0BAFA;AAEnB,cAEC,mBAFkB,EAAA,CAAA,MAAA,EAEa,iBAFa,EAAA,OAAA,EAEe,iBAFf,EAAA,GAEgC,UAFhC,CAEgC,iBAFhC,CAAA;AAE5C,cAIA,mBAFZ,EAAA,CAAA,OAAA,EAE4C,iBAF5C,EAAA,GAE6D,UAF7D,CAE6D,iBAF7D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-tunnel-x-Ce423Pa2.d.mts","names":["z","Result","SafeParseResult","SDKValidationError","CreateCardSetupIntentRes","CreateCardSetupIntentRes$inboundSchema","ZodTypeDef","ZodType","createCardSetupIntentResFromJSON","BackoffStrategy","RetryConfig","PermanentError","Error","TemporaryError","Response","retry","Promise","SDKHooks","HookContext","ConnectionError","InvalidRequestError","RequestAbortedError","RequestTimeoutError","UnexpectedClientError","Result","SDKOptions","RetryConfig","SecurityState","RequestOptions","URL","RequestInit","Omit","RequestConfig","HeadersInit","ClientSDK","Request","Response","Promise"],"sources":["../../../packages/sdk/esm/models/createcardsetupintentres.d.ts","../../../packages/sdk/esm/lib/retries.d.ts","../../../packages/sdk/esm/lib/sdks.d.ts","../src/penpal/connect-tunnel-x.ts"],"sourcesContent":["import * as z from \"zod/v3\";\nimport { Result as SafeParseResult } from \"../types/fp.js\";\nimport { SDKValidationError } from \"./errors/sdkvalidationerror.js\";\nexport type CreateCardSetupIntentRes = {\n /**\n * The ID of the card setup intent\n */\n cardSetupIntentId: string;\n};\n/** @internal */\nexport declare const CreateCardSetupIntentRes$inboundSchema: z.ZodType<CreateCardSetupIntentRes, z.ZodTypeDef, unknown>;\nexport declare function createCardSetupIntentResFromJSON(jsonString: string): SafeParseResult<CreateCardSetupIntentRes, SDKValidationError>;\n//# sourceMappingURL=createcardsetupintentres.d.ts.map","export type BackoffStrategy = {\n initialInterval: number;\n maxInterval: number;\n exponent: number;\n maxElapsedTime: number;\n};\nexport type RetryConfig = {\n strategy: \"none\";\n} | {\n strategy: \"backoff\";\n backoff?: BackoffStrategy;\n retryConnectionErrors?: boolean;\n};\n/**\n * PermanentError is an error that is not recoverable. Throwing this error will\n * cause a retry loop to terminate.\n */\nexport declare class PermanentError extends Error {\n /** The underlying cause of the error. */\n readonly cause: unknown;\n constructor(message: string, options?: {\n cause?: unknown;\n });\n}\n/**\n * TemporaryError is an error is used to signal that an HTTP request can be\n * retried as part of a retry loop. If retry attempts are exhausted and this\n * error is thrown, the response will be returned to the caller.\n */\nexport declare class TemporaryError extends Error {\n response: Response;\n constructor(message: string, response: Response);\n}\nexport declare function retry(fetchFn: () => Promise<Response>, options: {\n config: RetryConfig;\n statusCodes: string[];\n}): Promise<Response>;\n//# sourceMappingURL=retries.d.ts.map","import { SDKHooks } from \"../hooks/hooks.js\";\nimport { HookContext } from \"../hooks/types.js\";\nimport { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from \"../models/errors/httpclienterrors.js\";\nimport { Result } from \"../types/fp.js\";\nimport { SDKOptions } from \"./config.js\";\nimport { RetryConfig } from \"./retries.js\";\nimport { SecurityState } from \"./security.js\";\nexport type RequestOptions = {\n /**\n * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If\n * `fetchOptions.signal` is set then it will take precedence over this option.\n */\n timeoutMs?: number;\n /**\n * Set or override a retry policy on HTTP calls.\n */\n retries?: RetryConfig;\n /**\n * Specifies the status codes which should be retried using the given retry policy.\n */\n retryCodes?: string[];\n /**\n * Overrides the base server URL that will be used by an operation.\n */\n serverURL?: string | URL;\n /**\n * @deprecated `fetchOptions` has been flattened into `RequestOptions`.\n *\n * Sets various request options on the `fetch` call made by an SDK method.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}\n */\n fetchOptions?: Omit<RequestInit, \"method\" | \"body\">;\n} & Omit<RequestInit, \"method\" | \"body\">;\ntype RequestConfig = {\n method: string;\n path: string;\n baseURL?: string | URL | undefined;\n query?: string;\n body?: RequestInit[\"body\"];\n headers?: HeadersInit;\n security?: SecurityState | null;\n uaHeader?: string;\n userAgent?: string | undefined;\n timeoutMs?: number;\n};\nexport declare class ClientSDK {\n #private;\n readonly _baseURL: URL | null;\n readonly _options: SDKOptions & {\n hooks?: SDKHooks;\n };\n constructor(options: SDKOptions);\n _createRequest(context: HookContext, conf: RequestConfig, options?: RequestOptions): Result<Request, InvalidRequestError | UnexpectedClientError>;\n _do(request: Request, options: {\n context: HookContext;\n errorCodes: number | string | (number | string)[];\n retryConfig: RetryConfig;\n retryCodes: string[];\n }): Promise<Result<Response, RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError>>;\n}\nexport {};\n//# sourceMappingURL=sdks.d.ts.map"],"mappings":";;;;KAGYI,wBAAAA;EAAAA;;;;ACHZ,CAAA;;;KAAYK,eAAAA;;;;EDGAL,cAAAA,EAAAA,MAAAA;;KCGAM,WAAAA;;AANZ,CAAA,GAAYD;EAMAC,QAAAA,EAAAA,SAAW;YAITD;;;;;KCHFmB,cAAAA;EDPAnB;AAMZ;;;;ECCYmB;;;EAyBYE,OAAAA,CAAAA,EAhBVJ,WAgBUI;EAALC;;;EACX,UAAA,CAAA,EAAA,MAAA,EAAA;;;;ECzBH,SAAA,CAAA,EAAA,MAAA,GDgBoBF,GChBA;EAGE;;;;;;;EAI+D,YAAA,CAAA,EDiBvEE,ICjBuE,CDiBlED,WCjBkE,EAAA,QAAA,GAAA,MAAA,CAAA;CAAO,GDkB7FC,IClB6F,CDkBxFD,WClBwF,EAAA,QAAA,GAAA,MAAA,CAAA;;;KAP5F,oBAAA;EHLO1B,YAAAA,EAAAA,GAAAA,GAAAA,IAAAA;;2BGQe,2BAA2B;;EFX1CK,kBAAe,EAAA,CAAA,iBAAA,EAAA,MAAA,EAAA,GEa0B,OFb1B,CEakC,eFblC,CAAA;EAMfC,qBAAW,EAAA,CAAA,WAITD,EAAAA,MAAe,EAAA,GEIqB,OFJrB,CEI6B,wBFJ7B,CAAA;uEEK0C,mBAAmB;;KAGrF,oBAAA,GAAuB;ADXhBmB,KCaA,uBAAA,GAA0B,UDbZ,CCauB,oBDbvB,CAAA;AASZF,KCMF,uBAAA,GAA0B,UDNxBA,CCMmC,oBDNnCA,CAAAA;AAQWG,cCAZ,sBDAYA,EAAAA,CAAAA,MAAAA,ECAsB,iBDAtBA,EAAAA,OAAAA,ECAkD,oBDAlDA,EAAAA,GCAsE,UDAtEA,CCAsE,oBDAtEA,CAAAA;AAQDC,cCJX,sBDIWA,EAAAA,CAAAA,OAAAA,ECJwB,oBDIxBA,EAAAA,GCJ4C,UDI5CA,CCJ4C,oBDI5CA,CAAAA;;;;;KCInB,oBAAA;oDAC+C,mBAAmB;;AA7BlE,cAgCQ,cAAA,CAhCY;EAGE,QAAA,UAAA;EAA2B,QAAA,EA+BnC,oBA/BmC;EAEO,OAAA,0BAAA,EAAA,CAAA,UAAA,EA+BJ,uBA/BI,EAAA,GA+BmB,OA/BnB,CA+BmB,cA/BnB,CAAA;EAAR,QAAA,WAAA,CAAA;EACK;;;;EACuC,IAAA,eAAA,CAAA,CAAA,EA4CxE,oBA5CwE;EAG5F,OAAA,CAAA,CAAA,EAAA,IAAA;AAEL"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//#region ../../packages/sdk/esm/models/stripe3dsaction.d.ts
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Stripe 3DS authentication via Stripe.js SDK.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
*
|
|
8
|
-
* Frontend should use stripe.confirmCardPayment(client_secret) to display
|
|
9
|
-
* the 3DS authentication modal.
|
|
10
|
-
*/
|
|
11
|
-
type Stripe3dsAction = {
|
|
12
|
-
type: "stripe_3ds";
|
|
13
|
-
/**
|
|
14
|
-
* PaymentIntent client secret
|
|
15
|
-
*/
|
|
16
|
-
clientSecret: string;
|
|
17
|
-
/**
|
|
18
|
-
* Stripe publishable key
|
|
19
|
-
*/
|
|
20
|
-
stripePk: string;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../packages/sdk/esm/models/publiccardcheckoutresponse.d.ts
|
|
24
|
-
/**
|
|
25
|
-
* Public response model for card checkout - uses external IDs only.
|
|
26
|
-
*/
|
|
27
|
-
type PublicCardCheckoutResponse = {
|
|
28
|
-
id: string;
|
|
29
|
-
checkoutAttemptId: string;
|
|
30
|
-
checkoutSessionId: string;
|
|
31
|
-
paymentIntentId: string;
|
|
32
|
-
subscriptionId?: string | null | undefined;
|
|
33
|
-
invoiceId?: string | null | undefined;
|
|
34
|
-
state: string;
|
|
35
|
-
errorMessage?: string | null | undefined;
|
|
36
|
-
nextAction?: Stripe3dsAction | null | undefined;
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { PublicCardCheckoutResponse as t };
|
|
40
|
-
//# sourceMappingURL=publiccardcheckoutresponse-wxFCeVdO.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publiccardcheckoutresponse-wxFCeVdO.d.mts","names":["z","Result","SafeParseResult","SDKValidationError","Stripe3dsAction","Stripe3dsAction$inboundSchema","ZodTypeDef","ZodType","stripe3dsActionFromJSON","z","Result","SafeParseResult","SDKValidationError","Stripe3dsAction","NextAction","PublicCardCheckoutResponse","NextAction$inboundSchema","ZodTypeDef","ZodType","nextActionFromJSON","PublicCardCheckoutResponse$inboundSchema","publicCardCheckoutResponseFromJSON"],"sources":["../../../packages/sdk/esm/models/stripe3dsaction.d.ts","../../../packages/sdk/esm/models/publiccardcheckoutresponse.d.ts"],"sourcesContent":["import * as z from \"zod/v3\";\nimport { Result as SafeParseResult } from \"../types/fp.js\";\nimport { SDKValidationError } from \"./errors/sdkvalidationerror.js\";\n/**\n * Stripe 3DS authentication via Stripe.js SDK.\n *\n * @remarks\n *\n * Frontend should use stripe.confirmCardPayment(client_secret) to display\n * the 3DS authentication modal.\n */\nexport type Stripe3dsAction = {\n type: \"stripe_3ds\";\n /**\n * PaymentIntent client secret\n */\n clientSecret: string;\n /**\n * Stripe publishable key\n */\n stripePk: string;\n};\n/** @internal */\nexport declare const Stripe3dsAction$inboundSchema: z.ZodType<Stripe3dsAction, z.ZodTypeDef, unknown>;\nexport declare function stripe3dsActionFromJSON(jsonString: string): SafeParseResult<Stripe3dsAction, SDKValidationError>;\n//# sourceMappingURL=stripe3dsaction.d.ts.map","import * as z from \"zod/v3\";\nimport { Result as SafeParseResult } from \"../types/fp.js\";\nimport { SDKValidationError } from \"./errors/sdkvalidationerror.js\";\nimport { Stripe3dsAction } from \"./stripe3dsaction.js\";\nexport type NextAction = Stripe3dsAction;\n/**\n * Public response model for card checkout - uses external IDs only.\n */\nexport type PublicCardCheckoutResponse = {\n id: string;\n checkoutAttemptId: string;\n checkoutSessionId: string;\n paymentIntentId: string;\n subscriptionId?: string | null | undefined;\n invoiceId?: string | null | undefined;\n state: string;\n errorMessage?: string | null | undefined;\n nextAction?: Stripe3dsAction | null | undefined;\n};\n/** @internal */\nexport declare const NextAction$inboundSchema: z.ZodType<NextAction, z.ZodTypeDef, unknown>;\nexport declare function nextActionFromJSON(jsonString: string): SafeParseResult<NextAction, SDKValidationError>;\n/** @internal */\nexport declare const PublicCardCheckoutResponse$inboundSchema: z.ZodType<PublicCardCheckoutResponse, z.ZodTypeDef, unknown>;\nexport declare function publicCardCheckoutResponseFromJSON(jsonString: string): SafeParseResult<PublicCardCheckoutResponse, SDKValidationError>;\n//# sourceMappingURL=publiccardcheckoutresponse.d.ts.map"],"mappings":";;;;ACQA;;;;;;KDGYI,eAAAA;;;;;;;;;;;;;ACHZ;;;KAAYW,0BAAAA;;;;;;;;;eASKF"}
|