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