@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
|
@@ -363,6 +363,22 @@ var Connectors = class {
|
|
|
363
363
|
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* Clone a connector into another shop (business profile) of the same
|
|
368
|
+
* merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`
|
|
369
|
+
*
|
|
370
|
+
* Credentials are copied server-side, re-encrypted under the same merchant
|
|
371
|
+
* key — the caller never handles them (list/retrieve mask credentials, so a
|
|
372
|
+
* client-side copy is impossible). Returns the newly created connector in
|
|
373
|
+
* the target shop.
|
|
374
|
+
*/
|
|
375
|
+
async clone(accountId, connectorId, params) {
|
|
376
|
+
return this.request(
|
|
377
|
+
"POST",
|
|
378
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,
|
|
379
|
+
{ body: params }
|
|
380
|
+
);
|
|
381
|
+
}
|
|
366
382
|
// --- Advanced operations (Task 4.8) ---
|
|
367
383
|
/** Verify connector credentials. `POST /account/connectors/verify` */
|
|
368
384
|
async verify(params) {
|
|
@@ -3161,7 +3177,8 @@ var Delopay = class {
|
|
|
3161
3177
|
const type = err.error_type ?? err.type ?? "";
|
|
3162
3178
|
const data = err.data && typeof err.data === "object" && !Array.isArray(err.data) ? err.data : void 0;
|
|
3163
3179
|
const truncatedRaw = truncateRawBody(rawBody);
|
|
3164
|
-
|
|
3180
|
+
const isConnectorPassthrough = type === "connector" || code.startsWith("CE_");
|
|
3181
|
+
if (response.status === 401 && !isConnectorPassthrough) {
|
|
3165
3182
|
throw new DelopayAuthenticationError(message, {
|
|
3166
3183
|
code,
|
|
3167
3184
|
type,
|
|
@@ -4133,4 +4150,4 @@ export {
|
|
|
4133
4150
|
applyBrandingVariables,
|
|
4134
4151
|
shadowFor
|
|
4135
4152
|
};
|
|
4136
|
-
//# sourceMappingURL=chunk-
|
|
4153
|
+
//# sourceMappingURL=chunk-6GBHQKUX.js.map
|