@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.
@@ -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
- if (response.status === 401) {
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-2ZY2CLJC.js.map
4153
+ //# sourceMappingURL=chunk-6GBHQKUX.js.map