@delopay/sdk 0.28.0 → 0.30.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/index.d.cts CHANGED
@@ -1333,6 +1333,7 @@ interface SwitchProfileRequest {
1333
1333
  interface InviteUsersRequest {
1334
1334
  email: string;
1335
1335
  role_id: string;
1336
+ profile_ids?: string[];
1336
1337
  }
1337
1338
  interface InviteUsersResponse {
1338
1339
  email: string;
@@ -1947,9 +1948,10 @@ declare class Authentication {
1947
1948
  create(params: AuthenticationCreateRequest): Promise<AuthenticationResponse>;
1948
1949
  checkEligibility(authId: string): Promise<AuthenticationResponse>;
1949
1950
  authenticate(authId: string, params: Record<string, unknown>): Promise<AuthenticationResponse>;
1950
- sync(authId: string, params?: Record<string, unknown>): Promise<AuthenticationResponse>;
1951
- /** Redirect after authentication. `POST /authentication/{authId}/redirect` */
1952
- redirect(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1951
+ /** Sync authentication status. `POST /authentication/{merchantId}/{authId}/sync` */
1952
+ sync(merchantId: string, authId: string, params?: Record<string, unknown>): Promise<AuthenticationResponse>;
1953
+ /** Redirect after authentication. `POST /authentication/{merchantId}/{authId}/redirect` */
1954
+ redirect(merchantId: string, authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1953
1955
  /** Enable authn methods token. `POST /authentication/{authId}/enabled-authn-methods-token` */
1954
1956
  enabledAuthnMethodsToken(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1955
1957
  /** Submit eligibility check. `POST /authentication/{authId}/eligibility-check` */
@@ -2380,7 +2382,7 @@ declare class PaymentLinks {
2380
2382
  list(params?: PaymentLinkListParams): Promise<PaymentLinkListResponse>;
2381
2383
  /** Initiate (render) a payment link page. `GET /payment-link/{merchantId}/{paymentId}` */
2382
2384
  initiate(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
2383
- /** Get payment link status. `GET /payment-linkstatus/{merchantId}/{paymentId}` */
2385
+ /** Get payment link status. `GET /payment-link/status/{merchantId}/{paymentId}` */
2384
2386
  status(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
2385
2387
  }
2386
2388
 
@@ -2676,10 +2678,10 @@ declare class Payouts {
2676
2678
  listByProfile(params?: PayoutListParams): Promise<PayoutListResponse>;
2677
2679
  /** List payouts by filter (POST body). `POST /payouts/list` */
2678
2680
  listByFilter(params: Record<string, unknown>): Promise<PayoutListResponse>;
2679
- /** Get payout filter options. `POST /payouts/filter` */
2680
- getFilters(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
2681
- /** Get payout filters (profile-scoped). `POST /payouts/profile/filter` */
2682
- getFiltersByProfile(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
2681
+ /** Get payout filter options. `GET /payouts/filter` */
2682
+ getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2683
+ /** Get payout filters (profile-scoped). `GET /payouts/profile/filter` */
2684
+ getFiltersByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2683
2685
  /** Get payout aggregates. `GET /payouts/aggregate` */
2684
2686
  aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2685
2687
  /** Get payout aggregates (profile-scoped). `GET /payouts/profile/aggregate` */
@@ -3268,8 +3270,10 @@ declare class Users {
3268
3270
  /** Select auth method. `POST /user/auth/select` */
3269
3271
  selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>>;
3270
3272
  /** List users in lineage. `GET /user/employees/list` */
3271
- listUsersInLineage(): Promise<Record<string, unknown>[]>;
3272
- /** Resend invite. `POST /user/employees/resend-invite` */
3273
+ listUsersInLineage(params?: {
3274
+ entity_type?: string;
3275
+ }): Promise<Record<string, unknown>[]>;
3276
+ /** Resend invite. `POST /user/resend-invite` */
3273
3277
  resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
3274
3278
  /**
3275
3279
  * Get the caller's parent permission groups + scopes.
@@ -3287,10 +3291,6 @@ declare class Users {
3287
3291
  listInvitableRoles(params?: ListInvitableRolesParams): Promise<Record<string, unknown>[]>;
3288
3292
  /** List updatable roles. `GET /user/role/list/update` */
3289
3293
  listUpdatableRoles(): Promise<Record<string, unknown>[]>;
3290
- /** Get permission info. `GET /user/permission-info` */
3291
- getPermissionInfo(): Promise<Record<string, unknown>>;
3292
- /** Get module list. `GET /user/module/list` */
3293
- getModuleList(): Promise<Record<string, unknown>[]>;
3294
3294
  /** Get parent list. `GET /user/parent/list` */
3295
3295
  getParentList(): Promise<Record<string, unknown>[]>;
3296
3296
  /** Create a role. `POST /user/role` */
package/dist/index.d.ts CHANGED
@@ -1333,6 +1333,7 @@ interface SwitchProfileRequest {
1333
1333
  interface InviteUsersRequest {
1334
1334
  email: string;
1335
1335
  role_id: string;
1336
+ profile_ids?: string[];
1336
1337
  }
1337
1338
  interface InviteUsersResponse {
1338
1339
  email: string;
@@ -1947,9 +1948,10 @@ declare class Authentication {
1947
1948
  create(params: AuthenticationCreateRequest): Promise<AuthenticationResponse>;
1948
1949
  checkEligibility(authId: string): Promise<AuthenticationResponse>;
1949
1950
  authenticate(authId: string, params: Record<string, unknown>): Promise<AuthenticationResponse>;
1950
- sync(authId: string, params?: Record<string, unknown>): Promise<AuthenticationResponse>;
1951
- /** Redirect after authentication. `POST /authentication/{authId}/redirect` */
1952
- redirect(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1951
+ /** Sync authentication status. `POST /authentication/{merchantId}/{authId}/sync` */
1952
+ sync(merchantId: string, authId: string, params?: Record<string, unknown>): Promise<AuthenticationResponse>;
1953
+ /** Redirect after authentication. `POST /authentication/{merchantId}/{authId}/redirect` */
1954
+ redirect(merchantId: string, authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1953
1955
  /** Enable authn methods token. `POST /authentication/{authId}/enabled-authn-methods-token` */
1954
1956
  enabledAuthnMethodsToken(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
1955
1957
  /** Submit eligibility check. `POST /authentication/{authId}/eligibility-check` */
@@ -2380,7 +2382,7 @@ declare class PaymentLinks {
2380
2382
  list(params?: PaymentLinkListParams): Promise<PaymentLinkListResponse>;
2381
2383
  /** Initiate (render) a payment link page. `GET /payment-link/{merchantId}/{paymentId}` */
2382
2384
  initiate(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
2383
- /** Get payment link status. `GET /payment-linkstatus/{merchantId}/{paymentId}` */
2385
+ /** Get payment link status. `GET /payment-link/status/{merchantId}/{paymentId}` */
2384
2386
  status(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
2385
2387
  }
2386
2388
 
@@ -2676,10 +2678,10 @@ declare class Payouts {
2676
2678
  listByProfile(params?: PayoutListParams): Promise<PayoutListResponse>;
2677
2679
  /** List payouts by filter (POST body). `POST /payouts/list` */
2678
2680
  listByFilter(params: Record<string, unknown>): Promise<PayoutListResponse>;
2679
- /** Get payout filter options. `POST /payouts/filter` */
2680
- getFilters(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
2681
- /** Get payout filters (profile-scoped). `POST /payouts/profile/filter` */
2682
- getFiltersByProfile(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
2681
+ /** Get payout filter options. `GET /payouts/filter` */
2682
+ getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2683
+ /** Get payout filters (profile-scoped). `GET /payouts/profile/filter` */
2684
+ getFiltersByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2683
2685
  /** Get payout aggregates. `GET /payouts/aggregate` */
2684
2686
  aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
2685
2687
  /** Get payout aggregates (profile-scoped). `GET /payouts/profile/aggregate` */
@@ -3268,8 +3270,10 @@ declare class Users {
3268
3270
  /** Select auth method. `POST /user/auth/select` */
3269
3271
  selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>>;
3270
3272
  /** List users in lineage. `GET /user/employees/list` */
3271
- listUsersInLineage(): Promise<Record<string, unknown>[]>;
3272
- /** Resend invite. `POST /user/employees/resend-invite` */
3273
+ listUsersInLineage(params?: {
3274
+ entity_type?: string;
3275
+ }): Promise<Record<string, unknown>[]>;
3276
+ /** Resend invite. `POST /user/resend-invite` */
3273
3277
  resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
3274
3278
  /**
3275
3279
  * Get the caller's parent permission groups + scopes.
@@ -3287,10 +3291,6 @@ declare class Users {
3287
3291
  listInvitableRoles(params?: ListInvitableRolesParams): Promise<Record<string, unknown>[]>;
3288
3292
  /** List updatable roles. `GET /user/role/list/update` */
3289
3293
  listUpdatableRoles(): Promise<Record<string, unknown>[]>;
3290
- /** Get permission info. `GET /user/permission-info` */
3291
- getPermissionInfo(): Promise<Record<string, unknown>>;
3292
- /** Get module list. `GET /user/module/list` */
3293
- getModuleList(): Promise<Record<string, unknown>[]>;
3294
3294
  /** Get parent list. `GET /user/parent/list` */
3295
3295
  getParentList(): Promise<Record<string, unknown>[]>;
3296
3296
  /** Create a role. `POST /user/role` */
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ import {
41
41
  shadowFor,
42
42
  surfacePadValue,
43
43
  verticalGapValue
44
- } from "./chunk-U6GMDSVQ.js";
44
+ } from "./chunk-INP6UXMJ.js";
45
45
  export {
46
46
  Analytics,
47
47
  AnalyticsDashboard,
package/dist/internal.cjs CHANGED
@@ -196,16 +196,21 @@ var Authentication = class {
196
196
  body: params
197
197
  });
198
198
  }
199
- async sync(authId, params) {
200
- return this.request("POST", `/authentication/${encodeURIComponent(authId)}/sync`, {
201
- body: params
202
- });
199
+ /** Sync authentication status. `POST /authentication/{merchantId}/{authId}/sync` */
200
+ async sync(merchantId, authId, params) {
201
+ return this.request(
202
+ "POST",
203
+ `/authentication/${encodeURIComponent(merchantId)}/${encodeURIComponent(authId)}/sync`,
204
+ { body: params }
205
+ );
203
206
  }
204
- /** Redirect after authentication. `POST /authentication/{authId}/redirect` */
205
- async redirect(authId, params) {
206
- return this.request("POST", `/authentication/${encodeURIComponent(authId)}/redirect`, {
207
- body: params
208
- });
207
+ /** Redirect after authentication. `POST /authentication/{merchantId}/{authId}/redirect` */
208
+ async redirect(merchantId, authId, params) {
209
+ return this.request(
210
+ "POST",
211
+ `/authentication/${encodeURIComponent(merchantId)}/${encodeURIComponent(authId)}/redirect`,
212
+ { body: params }
213
+ );
209
214
  }
210
215
  /** Enable authn methods token. `POST /authentication/{authId}/enabled-authn-methods-token` */
211
216
  async enabledAuthnMethodsToken(authId, params) {
@@ -842,11 +847,11 @@ var PaymentLinks = class {
842
847
  `/payment-link/${encodeURIComponent(merchantId)}/${encodeURIComponent(paymentId)}`
843
848
  );
844
849
  }
845
- /** Get payment link status. `GET /payment-linkstatus/{merchantId}/{paymentId}` */
850
+ /** Get payment link status. `GET /payment-link/status/{merchantId}/{paymentId}` */
846
851
  async status(merchantId, paymentId) {
847
852
  return this.request(
848
853
  "GET",
849
- `/payment-linkstatus/${encodeURIComponent(merchantId)}/${encodeURIComponent(paymentId)}`
854
+ `/payment-link/status/${encodeURIComponent(merchantId)}/${encodeURIComponent(paymentId)}`
850
855
  );
851
856
  }
852
857
  };
@@ -1319,13 +1324,13 @@ var Payouts = class {
1319
1324
  async listByFilter(params) {
1320
1325
  return this.request("POST", "/payouts/list", { body: params });
1321
1326
  }
1322
- /** Get payout filter options. `POST /payouts/filter` */
1327
+ /** Get payout filter options. `GET /payouts/filter` */
1323
1328
  async getFilters(params) {
1324
- return this.request("POST", "/payouts/filter", { body: params });
1329
+ return this.request("GET", "/payouts/filter", { query: params });
1325
1330
  }
1326
- /** Get payout filters (profile-scoped). `POST /payouts/profile/filter` */
1331
+ /** Get payout filters (profile-scoped). `GET /payouts/profile/filter` */
1327
1332
  async getFiltersByProfile(params) {
1328
- return this.request("POST", "/payouts/profile/filter", { body: params });
1333
+ return this.request("GET", "/payouts/profile/filter", { query: params });
1329
1334
  }
1330
1335
  /** Get payout aggregates. `GET /payouts/aggregate` */
1331
1336
  async aggregate(params) {
@@ -2099,7 +2104,7 @@ var Users = class {
2099
2104
  return this.request("POST", "/user/employees/invite", { body: params });
2100
2105
  }
2101
2106
  async acceptInvitation(params) {
2102
- return this.request("POST", "/user/invite/accept", { body: params });
2107
+ return this.request("POST", "/user/employees/invite/accept", { body: params });
2103
2108
  }
2104
2109
  /**
2105
2110
  * Accept an invitation via the email-link flow.
@@ -2223,12 +2228,14 @@ var Users = class {
2223
2228
  return this.request("POST", "/user/auth/select", { body: params });
2224
2229
  }
2225
2230
  /** List users in lineage. `GET /user/employees/list` */
2226
- async listUsersInLineage() {
2227
- return this.request("GET", "/user/employees/list");
2231
+ async listUsersInLineage(params) {
2232
+ return this.request("GET", "/user/employees/list", {
2233
+ query: params
2234
+ });
2228
2235
  }
2229
- /** Resend invite. `POST /user/employees/resend-invite` */
2236
+ /** Resend invite. `POST /user/resend-invite` */
2230
2237
  async resendInvite(params) {
2231
- return this.request("POST", "/user/employees/resend-invite", { body: params });
2238
+ return this.request("POST", "/user/resend-invite", { body: params });
2232
2239
  }
2233
2240
  /**
2234
2241
  * Get the caller's parent permission groups + scopes.
@@ -2257,14 +2264,6 @@ var Users = class {
2257
2264
  async listUpdatableRoles() {
2258
2265
  return this.request("GET", "/user/role/list/update");
2259
2266
  }
2260
- /** Get permission info. `GET /user/permission-info` */
2261
- async getPermissionInfo() {
2262
- return this.request("GET", "/user/permission-info");
2263
- }
2264
- /** Get module list. `GET /user/module/list` */
2265
- async getModuleList() {
2266
- return this.request("GET", "/user/module/list");
2267
- }
2268
2267
  /** Get parent list. `GET /user/parent/list` */
2269
2268
  async getParentList() {
2270
2269
  return this.request("GET", "/user/parent/list");
@@ -3665,22 +3664,22 @@ var Admin = class {
3665
3664
  return this.request("POST", "/admin/signin", { body: params });
3666
3665
  }
3667
3666
  async createInternalUser(params) {
3668
- return this.request("POST", "/admin/internal_signup", { body: params });
3667
+ return this.request("POST", "/admin/internal-signup", { body: params });
3669
3668
  }
3670
3669
  async createTenant(params) {
3671
- return this.request("POST", "/admin/tenant_signup", { body: params });
3670
+ return this.request("POST", "/admin/tenant-signup", { body: params });
3672
3671
  }
3673
3672
  /**
3674
3673
  * Create a new merchant admin user and merchant account atomically.
3675
3674
  *
3676
3675
  * This is the correct endpoint for bootstrapping the first admin user in a
3677
- * fresh deployment — `internal_signup`/`tenant_signup` both require
3676
+ * fresh deployment — `internal-signup`/`tenant-signup` both require
3678
3677
  * pre-existing merchant records that don't exist on a clean database.
3679
3678
  *
3680
- * `POST /admin/signup_with_merchant_id`
3679
+ * `POST /admin/signup-with-merchant-id`
3681
3680
  */
3682
3681
  async signupWithMerchantId(params) {
3683
- return this.request("POST", "/admin/signup_with_merchant_id", { body: params });
3682
+ return this.request("POST", "/admin/signup-with-merchant-id", { body: params });
3684
3683
  }
3685
3684
  /** Toggle public signup on/off. `POST /admin/settings/signup` */
3686
3685
  async setSignupSettings(params) {
@@ -3690,9 +3689,9 @@ var Admin = class {
3690
3689
  async getSignupSettings() {
3691
3690
  return this.request("GET", "/admin/settings/signup");
3692
3691
  }
3693
- /** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
3692
+ /** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard-merchant` */
3694
3693
  async onboardMerchant(params) {
3695
- return this.request("POST", "/admin/onboard_merchant", { body: params });
3694
+ return this.request("POST", "/admin/onboard-merchant", { body: params });
3696
3695
  }
3697
3696
  };
3698
3697
 
@@ -3829,13 +3828,13 @@ var CardIssuers = class {
3829
3828
  this.request = request;
3830
3829
  }
3831
3830
  async create(params) {
3832
- return this.request("POST", "/card_issuers", { body: params });
3831
+ return this.request("POST", "/card-issuers", { body: params });
3833
3832
  }
3834
3833
  async update(issuerId, params) {
3835
- return this.request("PUT", `/card_issuers/${encodeURIComponent(issuerId)}`, { body: params });
3834
+ return this.request("PUT", `/card-issuers/${encodeURIComponent(issuerId)}`, { body: params });
3836
3835
  }
3837
3836
  async list() {
3838
- return this.request("GET", "/card_issuers");
3837
+ return this.request("GET", "/card-issuers");
3839
3838
  }
3840
3839
  };
3841
3840
 
@@ -3873,22 +3872,22 @@ var ConnectorRestrictions = class {
3873
3872
  * everyone again, call `delete()`.
3874
3873
  */
3875
3874
  async upsert(body) {
3876
- return this.request("POST", "/admin/connector_restrictions", { body });
3875
+ return this.request("POST", "/admin/connector-restrictions", { body });
3877
3876
  }
3878
3877
  async list() {
3879
- return this.request("GET", "/admin/connector_restrictions");
3878
+ return this.request("GET", "/admin/connector-restrictions");
3880
3879
  }
3881
3880
  async retrieve(connectorName) {
3882
3881
  return this.request(
3883
3882
  "GET",
3884
- `/admin/connector_restrictions/${encodeURIComponent(connectorName)}`
3883
+ `/admin/connector-restrictions/${encodeURIComponent(connectorName)}`
3885
3884
  );
3886
3885
  }
3887
3886
  /** Removing the row makes the connector public again. */
3888
3887
  async delete(connectorName) {
3889
3888
  return this.request(
3890
3889
  "DELETE",
3891
- `/admin/connector_restrictions/${encodeURIComponent(connectorName)}`
3890
+ `/admin/connector-restrictions/${encodeURIComponent(connectorName)}`
3892
3891
  );
3893
3892
  }
3894
3893
  };