@dakota-xyz/ts-sdk 1.1.0 → 1.3.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.mjs CHANGED
@@ -716,6 +716,36 @@ var CustomersResource = class extends BaseResource {
716
716
  });
717
717
  return response.data;
718
718
  }
719
+ /**
720
+ * Bulk-import customers from Sumsub share tokens.
721
+ *
722
+ * Exchanges one or more Sumsub share tokens for Dakota customers + applications.
723
+ * The response surfaces per-token results — individual tokens can fail while
724
+ * others succeed.
725
+ *
726
+ * @param data - Bulk-import request containing the share tokens to redeem
727
+ * @param options - Request options (e.g., custom idempotency key)
728
+ * @returns Bulk-import summary with per-token results
729
+ *
730
+ * @example
731
+ * ```typescript
732
+ * const result = await client.customers.bulkImportFromSumsubTokens({
733
+ * tokens: ['_act-sbx-jwt-...', '_act-sbx-jwt-...'],
734
+ * });
735
+ * console.log(`Imported ${result.succeeded}/${result.total}`);
736
+ * for (const r of result.results ?? []) {
737
+ * if (!r.success) console.error(r.name, r.error);
738
+ * }
739
+ * ```
740
+ */
741
+ async bulkImportFromSumsubTokens(data, options) {
742
+ return this.transport.request({
743
+ method: "POST",
744
+ path: "/customers/bulk-import-sumsub-tokens",
745
+ body: data,
746
+ idempotencyKey: options?.idempotencyKey
747
+ });
748
+ }
719
749
  };
720
750
 
721
751
  // src/client/resources/recipients.ts
@@ -1180,6 +1210,46 @@ var WalletsResource = class extends BaseResource {
1180
1210
  idempotencyKey: options?.idempotencyKey
1181
1211
  });
1182
1212
  }
1213
+ /**
1214
+ * Get a single wallet by ID.
1215
+ *
1216
+ * @param walletId - Wallet ID
1217
+ * @returns Wallet record (includes `customer_name` and `created_at`)
1218
+ *
1219
+ * @example
1220
+ * ```typescript
1221
+ * const wallet = await client.wallets.get(walletId);
1222
+ * console.log(wallet.address, wallet.customer_name);
1223
+ * ```
1224
+ */
1225
+ async get(walletId) {
1226
+ return this.transport.request({
1227
+ method: "GET",
1228
+ path: `/wallets/${walletId}`
1229
+ });
1230
+ }
1231
+ /**
1232
+ * Get policies attached to a wallet.
1233
+ *
1234
+ * Returns slim references (id + name) for the policies currently attached to the wallet.
1235
+ *
1236
+ * @param walletId - Wallet ID
1237
+ * @returns Array of attached policies
1238
+ *
1239
+ * @example
1240
+ * ```typescript
1241
+ * const policies = await client.wallets.getPolicies(walletId);
1242
+ * for (const policy of policies) {
1243
+ * console.log(policy.id, policy.name);
1244
+ * }
1245
+ * ```
1246
+ */
1247
+ async getPolicies(walletId) {
1248
+ return this.transport.request({
1249
+ method: "GET",
1250
+ path: `/wallets/${walletId}/policies`
1251
+ });
1252
+ }
1183
1253
  /**
1184
1254
  * Get wallet balances.
1185
1255
  *
@@ -1665,6 +1735,20 @@ var PoliciesResource = class extends BaseResource {
1665
1735
  path: `/policies/${policyId}/rules/${ruleId}`
1666
1736
  });
1667
1737
  }
1738
+ /**
1739
+ * Get wallets attached to a policy.
1740
+ *
1741
+ * Returns slim references (id + name + family) for the wallets the policy is currently attached to.
1742
+ *
1743
+ * @param policyId - Policy ID
1744
+ * @returns Array of attached wallets
1745
+ */
1746
+ async getWallets(policyId) {
1747
+ return this.transport.request({
1748
+ method: "GET",
1749
+ path: `/policies/${policyId}/wallets`
1750
+ });
1751
+ }
1668
1752
  /**
1669
1753
  * Attach a policy to a wallet.
1670
1754
  *
@@ -1756,6 +1840,20 @@ var SignerGroupsResource = class extends BaseResource {
1756
1840
  path: `/signer-groups/${signerGroupId}/signers/${signerId}`
1757
1841
  });
1758
1842
  }
1843
+ /**
1844
+ * Get wallets attached to a signer group.
1845
+ *
1846
+ * Returns slim references (id + name + family) for the wallets the signer group is currently attached to.
1847
+ *
1848
+ * @param signerGroupId - Signer group ID
1849
+ * @returns Array of attached wallets
1850
+ */
1851
+ async getWallets(signerGroupId) {
1852
+ return this.transport.request({
1853
+ method: "GET",
1854
+ path: `/signer-groups/${signerGroupId}/wallets`
1855
+ });
1856
+ }
1759
1857
  /**
1760
1858
  * Attach a signer group to a wallet.
1761
1859
  *
@@ -2402,6 +2500,27 @@ var SelfServeResource = class extends BaseResource {
2402
2500
  path: "/self-serve/credits/tiers"
2403
2501
  });
2404
2502
  }
2503
+ /**
2504
+ * Get the self-serve client's pricing config (fee schedule).
2505
+ *
2506
+ * Returns the caller's current `ClientPricingConfig` — transfer/ACH/wire/SEPA/SWIFT/KYC/KYB
2507
+ * fees plus the monthly minimum. Self-serve clients only.
2508
+ *
2509
+ * @returns The current pricing configuration
2510
+ *
2511
+ * @example
2512
+ * ```typescript
2513
+ * const pricing = await client.selfServe.getPricing();
2514
+ * console.log(`ACH fee: ${pricing.achFeeCents} cents`);
2515
+ * console.log(`Wire fee: ${pricing.wireFeeCents} cents`);
2516
+ * ```
2517
+ */
2518
+ async getPricing() {
2519
+ return this.transport.request({
2520
+ method: "GET",
2521
+ path: "/self-serve/credits/pricing"
2522
+ });
2523
+ }
2405
2524
  };
2406
2525
 
2407
2526
  // src/client/client.ts