@zkp2p/sdk 0.8.0 → 0.8.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/index.cjs +16 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +16 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -46604,7 +46604,8 @@ async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails,
|
|
|
46604
46604
|
url: `${withApiBase(baseApiUrl)}${endpoint}`,
|
|
46605
46605
|
method: "POST",
|
|
46606
46606
|
body,
|
|
46607
|
-
timeoutMs: opts?.timeoutMs
|
|
46607
|
+
timeoutMs: opts?.timeoutMs,
|
|
46608
|
+
authorizationToken: opts?.authorizationToken
|
|
46608
46609
|
});
|
|
46609
46610
|
}
|
|
46610
46611
|
async function apiGetSellerCredentialStatus(processorName, payeeDetails, baseApiUrl, timeoutMs) {
|
|
@@ -50678,6 +50679,18 @@ var Zkp2pClient = class {
|
|
|
50678
50679
|
opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
|
|
50679
50680
|
);
|
|
50680
50681
|
const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
|
|
50682
|
+
const getUploadOptions = async () => {
|
|
50683
|
+
let authorizationToken;
|
|
50684
|
+
try {
|
|
50685
|
+
authorizationToken = await this.resolveAuthorizationToken();
|
|
50686
|
+
} catch {
|
|
50687
|
+
authorizationToken = void 0;
|
|
50688
|
+
}
|
|
50689
|
+
return {
|
|
50690
|
+
timeoutMs,
|
|
50691
|
+
...authorizationToken ? { authorizationToken } : {}
|
|
50692
|
+
};
|
|
50693
|
+
};
|
|
50681
50694
|
if (params.platform === "paypal") {
|
|
50682
50695
|
return apiUploadGoogleOAuthSellerCredential(
|
|
50683
50696
|
"paypal",
|
|
@@ -50688,9 +50701,7 @@ var Zkp2pClient = class {
|
|
|
50688
50701
|
redirectUri: params.redirectUri
|
|
50689
50702
|
},
|
|
50690
50703
|
baseApiUrl,
|
|
50691
|
-
|
|
50692
|
-
timeoutMs
|
|
50693
|
-
}
|
|
50704
|
+
await getUploadOptions()
|
|
50694
50705
|
);
|
|
50695
50706
|
}
|
|
50696
50707
|
if (params.platform === "venmo") {
|
|
@@ -50703,9 +50714,7 @@ var Zkp2pClient = class {
|
|
|
50703
50714
|
redirectUri: params.redirectUri
|
|
50704
50715
|
},
|
|
50705
50716
|
baseApiUrl,
|
|
50706
|
-
|
|
50707
|
-
timeoutMs
|
|
50708
|
-
}
|
|
50717
|
+
await getUploadOptions()
|
|
50709
50718
|
);
|
|
50710
50719
|
}
|
|
50711
50720
|
throw new exports.ValidationError(
|