@delopay/sdk 0.53.0 → 0.55.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
@@ -335,6 +335,12 @@ interface PaymentResponse {
335
335
  statement_descriptor_name?: string | null;
336
336
  /** Bank statement descriptor (suffix portion). */
337
337
  statement_descriptor_suffix?: string | null;
338
+ /**
339
+ * Whether this payment ran in test mode (against a sandbox/test connector).
340
+ * Set at confirm from the connector account's test mode; `null` for payments
341
+ * created but never confirmed against a connector.
342
+ */
343
+ test_mode?: boolean | null;
338
344
  [key: string]: unknown;
339
345
  }
340
346
  interface PaymentListParams {
@@ -2594,6 +2600,12 @@ interface AnalyticsScopeRequest {
2594
2600
  * back as empty arrays.
2595
2601
  */
2596
2602
  sections?: string | null;
2603
+ /**
2604
+ * Filter by test mode: `false` returns only live payments (the usual view
2605
+ * for real analytics), `true` only test/sandbox payments. Omit to include
2606
+ * both. Applies to the payment series/connectors; refunds are always included.
2607
+ */
2608
+ test_mode?: boolean | null;
2597
2609
  }
2598
2610
  /** One day of aggregated payment activity. Volumes are in USD major units. */
2599
2611
  interface AnalyticsDayBucket {
@@ -4168,7 +4180,18 @@ declare class Users {
4168
4180
  verifyRecoveryCode(params: Record<string, unknown>): Promise<AuthResponse>;
4169
4181
  sendPhoneOtp(params: PhoneOtpRequest): Promise<PhoneOtpResponse>;
4170
4182
  verifyPhoneOtp(params: PhoneOtpVerifyRequest): Promise<PhoneOtpVerifyResponse>;
4171
- listRoles(): Promise<Record<string, unknown>[]>;
4183
+ /**
4184
+ * List all roles visible to the caller (predefined + custom).
4185
+ *
4186
+ * `GET /user/role/list`. With `groups: true` the response is the
4187
+ * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
4188
+ * parent_groups: [{name, description, scopes}]}]`; without it, the
4189
+ * deprecated flat `groups` shape.
4190
+ */
4191
+ listRoles(params?: {
4192
+ groups?: boolean;
4193
+ entity_type?: string;
4194
+ }): Promise<Record<string, unknown>[]>;
4172
4195
  listUserRoles(params?: Record<string, unknown>): Promise<Record<string, unknown>[]>;
4173
4196
  updateUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
4174
4197
  deleteUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
@@ -4235,6 +4258,13 @@ declare class Users {
4235
4258
  getRoleById(roleId: string): Promise<Record<string, unknown>>;
4236
4259
  /** Update role by ID. `PUT /user/role/{roleId}` */
4237
4260
  updateRole(roleId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
4261
+ /**
4262
+ * Delete a custom role. Predefined roles and roles still assigned to
4263
+ * team members are rejected by the backend with a 400.
4264
+ *
4265
+ * `DELETE /user/role/{roleId}`
4266
+ */
4267
+ deleteRole(roleId: string): Promise<Record<string, unknown>>;
4238
4268
  }
4239
4269
 
4240
4270
  declare class Verification {
package/dist/index.d.ts CHANGED
@@ -335,6 +335,12 @@ interface PaymentResponse {
335
335
  statement_descriptor_name?: string | null;
336
336
  /** Bank statement descriptor (suffix portion). */
337
337
  statement_descriptor_suffix?: string | null;
338
+ /**
339
+ * Whether this payment ran in test mode (against a sandbox/test connector).
340
+ * Set at confirm from the connector account's test mode; `null` for payments
341
+ * created but never confirmed against a connector.
342
+ */
343
+ test_mode?: boolean | null;
338
344
  [key: string]: unknown;
339
345
  }
340
346
  interface PaymentListParams {
@@ -2594,6 +2600,12 @@ interface AnalyticsScopeRequest {
2594
2600
  * back as empty arrays.
2595
2601
  */
2596
2602
  sections?: string | null;
2603
+ /**
2604
+ * Filter by test mode: `false` returns only live payments (the usual view
2605
+ * for real analytics), `true` only test/sandbox payments. Omit to include
2606
+ * both. Applies to the payment series/connectors; refunds are always included.
2607
+ */
2608
+ test_mode?: boolean | null;
2597
2609
  }
2598
2610
  /** One day of aggregated payment activity. Volumes are in USD major units. */
2599
2611
  interface AnalyticsDayBucket {
@@ -4168,7 +4180,18 @@ declare class Users {
4168
4180
  verifyRecoveryCode(params: Record<string, unknown>): Promise<AuthResponse>;
4169
4181
  sendPhoneOtp(params: PhoneOtpRequest): Promise<PhoneOtpResponse>;
4170
4182
  verifyPhoneOtp(params: PhoneOtpVerifyRequest): Promise<PhoneOtpVerifyResponse>;
4171
- listRoles(): Promise<Record<string, unknown>[]>;
4183
+ /**
4184
+ * List all roles visible to the caller (predefined + custom).
4185
+ *
4186
+ * `GET /user/role/list`. With `groups: true` the response is the
4187
+ * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
4188
+ * parent_groups: [{name, description, scopes}]}]`; without it, the
4189
+ * deprecated flat `groups` shape.
4190
+ */
4191
+ listRoles(params?: {
4192
+ groups?: boolean;
4193
+ entity_type?: string;
4194
+ }): Promise<Record<string, unknown>[]>;
4172
4195
  listUserRoles(params?: Record<string, unknown>): Promise<Record<string, unknown>[]>;
4173
4196
  updateUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
4174
4197
  deleteUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
@@ -4235,6 +4258,13 @@ declare class Users {
4235
4258
  getRoleById(roleId: string): Promise<Record<string, unknown>>;
4236
4259
  /** Update role by ID. `PUT /user/role/{roleId}` */
4237
4260
  updateRole(roleId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
4261
+ /**
4262
+ * Delete a custom role. Predefined roles and roles still assigned to
4263
+ * team members are rejected by the backend with a 400.
4264
+ *
4265
+ * `DELETE /user/role/{roleId}`
4266
+ */
4267
+ deleteRole(roleId: string): Promise<Record<string, unknown>>;
4238
4268
  }
4239
4269
 
4240
4270
  declare class Verification {
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  shadowFor,
50
50
  surfacePadValue,
51
51
  verticalGapValue
52
- } from "./chunk-QH5ESES3.js";
52
+ } from "./chunk-G2TIZ4KS.js";
53
53
  export {
54
54
  Analytics,
55
55
  AnalyticsDashboard,
package/dist/internal.cjs CHANGED
@@ -2362,8 +2362,21 @@ var Users = class {
2362
2362
  async verifyPhoneOtp(params) {
2363
2363
  return this.request("POST", "/user/phone/verify-otp", { body: params });
2364
2364
  }
2365
- async listRoles() {
2366
- return this.request("GET", "/user/role/list");
2365
+ /**
2366
+ * List all roles visible to the caller (predefined + custom).
2367
+ *
2368
+ * `GET /user/role/list`. With `groups: true` the response is the
2369
+ * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
2370
+ * parent_groups: [{name, description, scopes}]}]`; without it, the
2371
+ * deprecated flat `groups` shape.
2372
+ */
2373
+ async listRoles(params) {
2374
+ if (params === void 0) {
2375
+ return this.request("GET", "/user/role/list");
2376
+ }
2377
+ return this.request("GET", "/user/role/list", {
2378
+ query: { groups: params.groups, entity_type: params.entity_type }
2379
+ });
2367
2380
  }
2368
2381
  async listUserRoles(params) {
2369
2382
  return this.request("POST", "/user/employees", { body: params });
@@ -2487,6 +2500,15 @@ var Users = class {
2487
2500
  async updateRole(roleId, params) {
2488
2501
  return this.request("PUT", `/user/role/${encodeURIComponent(roleId)}`, { body: params });
2489
2502
  }
2503
+ /**
2504
+ * Delete a custom role. Predefined roles and roles still assigned to
2505
+ * team members are rejected by the backend with a 400.
2506
+ *
2507
+ * `DELETE /user/role/{roleId}`
2508
+ */
2509
+ async deleteRole(roleId) {
2510
+ return this.request("DELETE", `/user/role/${encodeURIComponent(roleId)}`);
2511
+ }
2490
2512
  };
2491
2513
 
2492
2514
  // src/resources/verification.ts