@delopay/sdk 0.58.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2ZY2CLJC.js → chunk-6GBHQKUX.js} +19 -2
- package/dist/chunk-6GBHQKUX.js.map +1 -0
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +18 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2ZY2CLJC.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -438,6 +438,22 @@ var Connectors = class {
|
|
|
438
438
|
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`
|
|
439
439
|
);
|
|
440
440
|
}
|
|
441
|
+
/**
|
|
442
|
+
* Clone a connector into another shop (business profile) of the same
|
|
443
|
+
* merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`
|
|
444
|
+
*
|
|
445
|
+
* Credentials are copied server-side, re-encrypted under the same merchant
|
|
446
|
+
* key — the caller never handles them (list/retrieve mask credentials, so a
|
|
447
|
+
* client-side copy is impossible). Returns the newly created connector in
|
|
448
|
+
* the target shop.
|
|
449
|
+
*/
|
|
450
|
+
async clone(accountId, connectorId, params) {
|
|
451
|
+
return this.request(
|
|
452
|
+
"POST",
|
|
453
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,
|
|
454
|
+
{ body: params }
|
|
455
|
+
);
|
|
456
|
+
}
|
|
441
457
|
// --- Advanced operations (Task 4.8) ---
|
|
442
458
|
/** Verify connector credentials. `POST /account/connectors/verify` */
|
|
443
459
|
async verify(params) {
|
|
@@ -3236,7 +3252,8 @@ var Delopay = class {
|
|
|
3236
3252
|
const type = err.error_type ?? err.type ?? "";
|
|
3237
3253
|
const data = err.data && typeof err.data === "object" && !Array.isArray(err.data) ? err.data : void 0;
|
|
3238
3254
|
const truncatedRaw = truncateRawBody(rawBody);
|
|
3239
|
-
|
|
3255
|
+
const isConnectorPassthrough = type === "connector" || code.startsWith("CE_");
|
|
3256
|
+
if (response.status === 401 && !isConnectorPassthrough) {
|
|
3240
3257
|
throw new DelopayAuthenticationError(message, {
|
|
3241
3258
|
code,
|
|
3242
3259
|
type,
|