@delopay/sdk 0.61.0 → 0.63.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.
@@ -1805,6 +1805,48 @@ var Routing = class {
1805
1805
  * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },
1806
1806
  * });
1807
1807
  * ```
1808
+ *
1809
+ * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.
1810
+ * Rules run top-down (first match wins); `defaultSelection` is the fallback.
1811
+ * Splits must sum to 100; `amount` conditions are in minor units.
1812
+ * ```typescript
1813
+ * const config = await delopay.routing.create({
1814
+ * name: 'Card split 90/10',
1815
+ * profile_id: 'pro_...',
1816
+ * algorithm: {
1817
+ * type: 'advanced',
1818
+ * data: {
1819
+ * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },
1820
+ * rules: [
1821
+ * {
1822
+ * name: 'cards',
1823
+ * connectorSelection: {
1824
+ * type: 'volume_split',
1825
+ * data: [
1826
+ * { connector: { connector: 'epayouts' }, split: 90 },
1827
+ * { connector: { connector: 'stripe' }, split: 10 },
1828
+ * ],
1829
+ * },
1830
+ * statements: [
1831
+ * {
1832
+ * condition: [
1833
+ * {
1834
+ * lhs: 'payment_method',
1835
+ * comparison: 'equal',
1836
+ * value: { type: 'enum_variant', value: 'card' },
1837
+ * metadata: {},
1838
+ * },
1839
+ * ],
1840
+ * },
1841
+ * ],
1842
+ * },
1843
+ * ],
1844
+ * metadata: {},
1845
+ * },
1846
+ * },
1847
+ * });
1848
+ * await delopay.routing.activate(config.id);
1849
+ * ```
1808
1850
  */
1809
1851
  async create(params) {
1810
1852
  return this.request("POST", "/routing", { body: params });
@@ -2340,6 +2382,23 @@ var Users = class {
2340
2382
  async addUser(params) {
2341
2383
  return this.request("POST", "/user/employees/add", { body: params });
2342
2384
  }
2385
+ /**
2386
+ * Impersonate one of your own team members — `POST /user/employees/impersonate`.
2387
+ *
2388
+ * Mints a session token **as** the given member, so the dashboard renders
2389
+ * exactly what they see (useful for support and role verification). The
2390
+ * caller needs the *Impersonation* permission, and the member's role must
2391
+ * rank **strictly below** the caller's (`Profile < Merchant < Organization`);
2392
+ * the server rejects self-impersonation, cross-merchant targets, and
2393
+ * equal/higher roles.
2394
+ *
2395
+ * The returned token is tab-scoped by design: open it in a fresh tab (e.g.
2396
+ * `/auth/impersonate?token=…`) rather than replacing the caller's own
2397
+ * session. No auth cookie is set on the response.
2398
+ */
2399
+ async impersonateEmployee(params) {
2400
+ return this.request("POST", "/user/employees/impersonate", { body: params });
2401
+ }
2343
2402
  async acceptInvitation(params) {
2344
2403
  return this.request("POST", "/user/employees/invite/accept", { body: params });
2345
2404
  }
@@ -4236,4 +4295,4 @@ export {
4236
4295
  applyBrandingVariables,
4237
4296
  shadowFor
4238
4297
  };
4239
- //# sourceMappingURL=chunk-ADPSXHH7.js.map
4298
+ //# sourceMappingURL=chunk-JCO4CHY7.js.map