@dakota-xyz/ts-sdk 3.0.0 → 3.4.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.
@@ -12,6 +12,7 @@ declare enum WebhookEventType {
12
12
  UserUpdated = "user.updated",
13
13
  UserDeleted = "user.deleted",
14
14
  ApiKeyCreated = "api_key.created",
15
+ ApiKeyUpdated = "api_key.updated",
15
16
  ApiKeyDeleted = "api_key.deleted",
16
17
  CustomerCreated = "customer.created",
17
18
  CustomerUpdated = "customer.updated",
@@ -26,10 +27,40 @@ declare enum WebhookEventType {
26
27
  * payload is {@link CustomerCapabilityStatusUpdatedData}.
27
28
  */
28
29
  CustomerCapabilityStatusUpdated = "customer.capability_status.updated",
30
+ /**
31
+ * Emitted when a reviewer opens a request for information (RFI) against a
32
+ * customer's application. The payload is {@link CustomerRfiRequestedData}:
33
+ * what is still owed, but deliberately NOT the resubmission link.
34
+ */
35
+ CustomerRfiRequested = "customer.rfi.requested",
36
+ /**
37
+ * Emitted when the requested information arrives and the application
38
+ * returns to review. The payload is {@link CustomerRfiRespondedData}.
39
+ */
40
+ CustomerRfiResponded = "customer.rfi.responded",
41
+ /**
42
+ * Emitted when an onboarding application is withdrawn — by the applicant,
43
+ * or by the client on their behalf. Withdrawal is terminal. The payload is
44
+ * {@link CustomerApplicationWithdrawnData}.
45
+ */
46
+ CustomerApplicationWithdrawn = "customer.application.withdrawn",
29
47
  /** Payload is {@link FeePayoutDestinationUpdatedData}. */
30
48
  FeePayoutDestinationUpdated = "fee_payout_destination.updated",
31
49
  /** Payload is an empty object. */
32
50
  FeePayoutDestinationDeleted = "fee_payout_destination.deleted",
51
+ /**
52
+ * Emitted when a client sets or replaces the wallet their RD marketing fee
53
+ * is sent to. The payload is {@link RdPayoutDestinationUpdatedData}.
54
+ */
55
+ RdPayoutDestinationUpdated = "rd_payout_destination.updated",
56
+ /**
57
+ * Emitted when a client sets or replaces the wallet ONE non-RD deployment's
58
+ * payouts are sent to. The payload is
59
+ * {@link DeploymentPayoutDestinationUpdatedData}, which names the
60
+ * deployment — RD keeps its own event, so a subscriber to that one is never
61
+ * handed another deployment's wallet as RD's.
62
+ */
63
+ DeploymentPayoutDestinationUpdated = "deployment_payout_destination.updated",
33
64
  AutoAccountCreated = "auto_account.created",
34
65
  AutoAccountUpdated = "auto_account.updated",
35
66
  AutoAccountDeleted = "auto_account.deleted",
@@ -51,7 +82,17 @@ declare enum WebhookEventType {
51
82
  TargetDeleted = "target.deleted",
52
83
  ExceptionCreated = "exception.created",
53
84
  ExceptionCleared = "exception.cleared",
85
+ /**
86
+ * @deprecated The platform no longer defines or emits this event, and it is
87
+ * gone from the public `EventType` enum. Kept only so existing handler
88
+ * registrations keep compiling; it will be removed in the next major.
89
+ */
54
90
  BvnkOnboardingCreated = "bvnk.onboarding.created",
91
+ /**
92
+ * @deprecated The platform no longer defines or emits this event, and it is
93
+ * gone from the public `EventType` enum. Kept only so existing handler
94
+ * registrations keep compiling; it will be removed in the next major.
95
+ */
55
96
  BvnkOnboardingUpdated = "bvnk.onboarding.updated",
56
97
  WalletCreated = "wallet.created",
57
98
  WalletUpdated = "wallet.updated",
@@ -68,6 +109,26 @@ declare enum WebhookEventType {
68
109
  * {@link ScheduledPaymentFailedData}.
69
110
  */
70
111
  ScheduledPaymentFailed = "scheduled_payment.failed",
112
+ /**
113
+ * Emitted each time a deposit enters held: Dakota kept funds it could not
114
+ * process (for example below the account's minimum deposit, or over its
115
+ * `max_transactions` cap) and created no transaction, so no `transaction.*`
116
+ * event reports it. The same `deposit_id` can get it more than once (a
117
+ * failed return, an undone manual resolution), so upsert on `deposit_id`.
118
+ * The payload carries the deposit, its `reason`, `fee_to_cover`,
119
+ * `minimum_deposit` and `held_at`.
120
+ */
121
+ DepositHeld = "deposit.held",
122
+ /**
123
+ * Emitted each time a held deposit's funds are back with the sender,
124
+ * normally once. Every deposit that gets it also gets a
125
+ * {@link WebhookEventType.DepositHeld} queued no later than it, which can
126
+ * still arrive after it: delivery order is not guaranteed, so order a
127
+ * deposit's events by `held_at` and `returned_at`. The payload carries the deposit,
128
+ * `return_transaction_hash`, `return_fee`, `return_automatic` and
129
+ * `returned_at`.
130
+ */
131
+ DepositReturned = "deposit.returned",
71
132
  /** @deprecated Use TransactionAutoCreated or TransactionOneOffCreated */
72
133
  TransactionCreated = "transaction.created",
73
134
  /** @deprecated Use TransactionAutoUpdated or TransactionOneOffUpdated */
@@ -185,6 +246,102 @@ interface CustomerCapabilityStatusUpdatedData {
185
246
  status: string;
186
247
  requirements: CapabilityRequirement[];
187
248
  }
249
+ /**
250
+ * Who a document in an RFI belongs to. `id` is set only for an individual;
251
+ * the business and EDD entities are unique per application, so the kind
252
+ * alone locates them.
253
+ */
254
+ interface RfiRequirementEntity {
255
+ /** 'business' | 'individual' | 'edd' */
256
+ kind: string;
257
+ /** The associated individual's id. Present only when `kind` is 'individual'. */
258
+ id?: string;
259
+ }
260
+ /**
261
+ * One thing a customer must supply to resolve a request for information.
262
+ *
263
+ * Switch on `type`:
264
+ * - `'document'` — exactly one of `document_type` (a specific kind of
265
+ * document) or `purpose` (a compliance requirement several document types
266
+ * could satisfy) is set. `status` says whether something is already on file
267
+ * (`'on_file'` means replace it; `'missing'` means send it for the first
268
+ * time).
269
+ * - `'field'` — `path` names the application field to correct.
270
+ * - `'question'` — `key` and `prompt` carry a reviewer's free-text question.
271
+ * When `require_document` is true the answer MUST come with an upload; a
272
+ * text-only answer leaves the RFI unresolved.
273
+ */
274
+ interface RfiRequirement {
275
+ /** 'document' | 'field' | 'question' */
276
+ type: string;
277
+ /** Document requirement: a specific document type (mutually exclusive with `purpose`). */
278
+ document_type?: string;
279
+ /** Document requirement: a compliance purpose (mutually exclusive with `document_type`). */
280
+ purpose?: string;
281
+ /** Document requirement: whose document it is. Omitted when the party is not known. */
282
+ entity?: RfiRequirementEntity;
283
+ /** Document requirement: 'missing' | 'on_file'. */
284
+ status?: string;
285
+ /** Field requirement: the application field path, e.g. 'business.business_description'. */
286
+ path?: string;
287
+ /** Question requirement: the question's stable key. */
288
+ key?: string;
289
+ /** Question requirement: the reviewer's prompt. */
290
+ prompt?: string;
291
+ /** Question requirement: the answer must be accompanied by an upload. */
292
+ require_document?: boolean;
293
+ }
294
+ /**
295
+ * Event payload for {@link WebhookEventType.CustomerRfiRequested}
296
+ * ('customer.rfi.requested').
297
+ *
298
+ * The client that onboarded the customer owns the relationship, so this event
299
+ * is how it learns the customer is blocked and what is still owed.
300
+ *
301
+ * The resubmission link is intentionally ABSENT: it embeds an access token,
302
+ * and a webhook body comes to rest in logs, traces and retry buffers where a
303
+ * credential must not. Read the link from the customer resource over your own
304
+ * authenticated channel.
305
+ *
306
+ * `message_id` is the correlation handle: dedupe redeliveries on it, pair a
307
+ * later `customer.rfi.responded` with the request it answers, and tell a
308
+ * re-notification from a genuinely new request. Omitted when the platform
309
+ * did not record one.
310
+ */
311
+ interface CustomerRfiRequestedData {
312
+ customer_id: string;
313
+ application_id: string;
314
+ /** The RFI thread message this request was sent as. */
315
+ message_id?: string;
316
+ /** Unix seconds. */
317
+ requested_at: number;
318
+ requirements: RfiRequirement[];
319
+ }
320
+ /**
321
+ * Event payload for {@link WebhookEventType.CustomerRfiResponded}
322
+ * ('customer.rfi.responded'): the requested information arrived and the
323
+ * application is back in review. Use it to stop chasing your customer.
324
+ *
325
+ * There is no `rfi.resolved` event: an RFI ends in a decision, which
326
+ * `customer.kyb_status.updated` already reports.
327
+ */
328
+ interface CustomerRfiRespondedData {
329
+ customer_id: string;
330
+ application_id: string;
331
+ /** Unix seconds. */
332
+ responded_at: number;
333
+ }
334
+ /**
335
+ * Event payload for {@link WebhookEventType.CustomerApplicationWithdrawn}
336
+ * ('customer.application.withdrawn'). Withdrawal is terminal: onboarding the
337
+ * customer again requires a new application.
338
+ */
339
+ interface CustomerApplicationWithdrawnData {
340
+ customer_id: string;
341
+ application_id: string;
342
+ /** Why it was withdrawn. Omitted when no reason was recorded. */
343
+ reason?: string;
344
+ }
188
345
  /**
189
346
  * Fee Payout Destination Updated event data.
190
347
  */
@@ -192,6 +349,25 @@ interface FeePayoutDestinationUpdatedData {
192
349
  /** The destination kind — 'usdc_wallet' (developer-fee payouts are crypto-only) */
193
350
  type: string;
194
351
  }
352
+ /**
353
+ * Event payload for {@link WebhookEventType.RdPayoutDestinationUpdated}
354
+ * ('rd_payout_destination.updated').
355
+ *
356
+ * A destination has no history of its own — a PUT replaces the row — so this
357
+ * event is the only record that it changed, which is why it carries the
358
+ * address, what it replaced, and who did it.
359
+ */
360
+ interface RdPayoutDestinationUpdatedData {
361
+ /** The EVM address on Base the fee is now sent to. */
362
+ wallet_address: string;
363
+ /** The address it replaced. Empty string on a first registration. */
364
+ previous_address: string;
365
+ /**
366
+ * The EMAIL of the dashboard user who made the change — personal data, so
367
+ * treat a logged payload accordingly. Empty string when not attributable.
368
+ */
369
+ updated_by: string;
370
+ }
195
371
  /**
196
372
  * Event payload for {@link WebhookEventType.ScheduledPaymentFailed}
197
373
  * ('scheduled_payment.failed'), emitted when a scheduled payment flips to the
@@ -341,7 +517,7 @@ interface WebhookHeaders {
341
517
  * import { WebhookHandler, WebhookEventType } from 'dakota-ts-sdk/webhook';
342
518
  *
343
519
  * const handler = new WebhookHandler({
344
- * publicKey: process.env.WEBHOOK_PUBLIC_KEY!,
520
+ * publicKey: process.env.DAKOTA_WEBHOOK_PUBLIC_KEY!,
345
521
  * });
346
522
  *
347
523
  * // Register event handlers. The resource lives under event.data.object.
@@ -533,7 +709,7 @@ declare function validateTimestamp(timestampStr: string, toleranceSeconds: numbe
533
709
  * requestBody,
534
710
  * request.headers['x-webhook-signature'],
535
711
  * request.headers['x-webhook-timestamp'],
536
- * process.env.WEBHOOK_PUBLIC_KEY
712
+ * process.env.DAKOTA_WEBHOOK_PUBLIC_KEY
537
713
  * );
538
714
  * ```
539
715
  */
@@ -546,4 +722,4 @@ declare function verifySignature(payload: Uint8Array | string, signatureB64: str
546
722
  */
547
723
  declare function verifySignatureSync(payload: Uint8Array | string, signatureB64: string, timestampStr: string, publicKeyHex: string, toleranceSeconds?: number): void;
548
724
 
549
- export { type CapabilityRequirement, type CustomerCapabilityStatusUpdatedData, type CustomerDeletedData, DEFAULT_TIMESTAMP_TOLERANCE, type FeePayoutDestinationUpdatedData, type IdempotencyStore, type KybApplicationSubmittedData, type KybLinkData, MemoryIdempotencyStore, SIGNATURE_HEADER, type ScheduledPaymentFailedData, SignatureVerificationError, TIMESTAMP_HEADER, type WebhookEvent, type WebhookEventData, type WebhookEventHandler, type WebhookEventRequest, WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookHeaders, matchesEventType, parseEvent, parsePublicKey, parseSignature, validateTimestamp, verifySignature, verifySignatureSync };
725
+ export { type CapabilityRequirement, type CustomerApplicationWithdrawnData, type CustomerCapabilityStatusUpdatedData, type CustomerDeletedData, type CustomerRfiRequestedData, type CustomerRfiRespondedData, DEFAULT_TIMESTAMP_TOLERANCE, type FeePayoutDestinationUpdatedData, type IdempotencyStore, type KybApplicationSubmittedData, type KybLinkData, MemoryIdempotencyStore, type RdPayoutDestinationUpdatedData, type RfiRequirement, type RfiRequirementEntity, SIGNATURE_HEADER, type ScheduledPaymentFailedData, SignatureVerificationError, TIMESTAMP_HEADER, type WebhookEvent, type WebhookEventData, type WebhookEventHandler, type WebhookEventRequest, WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookHeaders, matchesEventType, parseEvent, parsePublicKey, parseSignature, validateTimestamp, verifySignature, verifySignatureSync };
@@ -12,6 +12,7 @@ declare enum WebhookEventType {
12
12
  UserUpdated = "user.updated",
13
13
  UserDeleted = "user.deleted",
14
14
  ApiKeyCreated = "api_key.created",
15
+ ApiKeyUpdated = "api_key.updated",
15
16
  ApiKeyDeleted = "api_key.deleted",
16
17
  CustomerCreated = "customer.created",
17
18
  CustomerUpdated = "customer.updated",
@@ -26,10 +27,40 @@ declare enum WebhookEventType {
26
27
  * payload is {@link CustomerCapabilityStatusUpdatedData}.
27
28
  */
28
29
  CustomerCapabilityStatusUpdated = "customer.capability_status.updated",
30
+ /**
31
+ * Emitted when a reviewer opens a request for information (RFI) against a
32
+ * customer's application. The payload is {@link CustomerRfiRequestedData}:
33
+ * what is still owed, but deliberately NOT the resubmission link.
34
+ */
35
+ CustomerRfiRequested = "customer.rfi.requested",
36
+ /**
37
+ * Emitted when the requested information arrives and the application
38
+ * returns to review. The payload is {@link CustomerRfiRespondedData}.
39
+ */
40
+ CustomerRfiResponded = "customer.rfi.responded",
41
+ /**
42
+ * Emitted when an onboarding application is withdrawn — by the applicant,
43
+ * or by the client on their behalf. Withdrawal is terminal. The payload is
44
+ * {@link CustomerApplicationWithdrawnData}.
45
+ */
46
+ CustomerApplicationWithdrawn = "customer.application.withdrawn",
29
47
  /** Payload is {@link FeePayoutDestinationUpdatedData}. */
30
48
  FeePayoutDestinationUpdated = "fee_payout_destination.updated",
31
49
  /** Payload is an empty object. */
32
50
  FeePayoutDestinationDeleted = "fee_payout_destination.deleted",
51
+ /**
52
+ * Emitted when a client sets or replaces the wallet their RD marketing fee
53
+ * is sent to. The payload is {@link RdPayoutDestinationUpdatedData}.
54
+ */
55
+ RdPayoutDestinationUpdated = "rd_payout_destination.updated",
56
+ /**
57
+ * Emitted when a client sets or replaces the wallet ONE non-RD deployment's
58
+ * payouts are sent to. The payload is
59
+ * {@link DeploymentPayoutDestinationUpdatedData}, which names the
60
+ * deployment — RD keeps its own event, so a subscriber to that one is never
61
+ * handed another deployment's wallet as RD's.
62
+ */
63
+ DeploymentPayoutDestinationUpdated = "deployment_payout_destination.updated",
33
64
  AutoAccountCreated = "auto_account.created",
34
65
  AutoAccountUpdated = "auto_account.updated",
35
66
  AutoAccountDeleted = "auto_account.deleted",
@@ -51,7 +82,17 @@ declare enum WebhookEventType {
51
82
  TargetDeleted = "target.deleted",
52
83
  ExceptionCreated = "exception.created",
53
84
  ExceptionCleared = "exception.cleared",
85
+ /**
86
+ * @deprecated The platform no longer defines or emits this event, and it is
87
+ * gone from the public `EventType` enum. Kept only so existing handler
88
+ * registrations keep compiling; it will be removed in the next major.
89
+ */
54
90
  BvnkOnboardingCreated = "bvnk.onboarding.created",
91
+ /**
92
+ * @deprecated The platform no longer defines or emits this event, and it is
93
+ * gone from the public `EventType` enum. Kept only so existing handler
94
+ * registrations keep compiling; it will be removed in the next major.
95
+ */
55
96
  BvnkOnboardingUpdated = "bvnk.onboarding.updated",
56
97
  WalletCreated = "wallet.created",
57
98
  WalletUpdated = "wallet.updated",
@@ -68,6 +109,26 @@ declare enum WebhookEventType {
68
109
  * {@link ScheduledPaymentFailedData}.
69
110
  */
70
111
  ScheduledPaymentFailed = "scheduled_payment.failed",
112
+ /**
113
+ * Emitted each time a deposit enters held: Dakota kept funds it could not
114
+ * process (for example below the account's minimum deposit, or over its
115
+ * `max_transactions` cap) and created no transaction, so no `transaction.*`
116
+ * event reports it. The same `deposit_id` can get it more than once (a
117
+ * failed return, an undone manual resolution), so upsert on `deposit_id`.
118
+ * The payload carries the deposit, its `reason`, `fee_to_cover`,
119
+ * `minimum_deposit` and `held_at`.
120
+ */
121
+ DepositHeld = "deposit.held",
122
+ /**
123
+ * Emitted each time a held deposit's funds are back with the sender,
124
+ * normally once. Every deposit that gets it also gets a
125
+ * {@link WebhookEventType.DepositHeld} queued no later than it, which can
126
+ * still arrive after it: delivery order is not guaranteed, so order a
127
+ * deposit's events by `held_at` and `returned_at`. The payload carries the deposit,
128
+ * `return_transaction_hash`, `return_fee`, `return_automatic` and
129
+ * `returned_at`.
130
+ */
131
+ DepositReturned = "deposit.returned",
71
132
  /** @deprecated Use TransactionAutoCreated or TransactionOneOffCreated */
72
133
  TransactionCreated = "transaction.created",
73
134
  /** @deprecated Use TransactionAutoUpdated or TransactionOneOffUpdated */
@@ -185,6 +246,102 @@ interface CustomerCapabilityStatusUpdatedData {
185
246
  status: string;
186
247
  requirements: CapabilityRequirement[];
187
248
  }
249
+ /**
250
+ * Who a document in an RFI belongs to. `id` is set only for an individual;
251
+ * the business and EDD entities are unique per application, so the kind
252
+ * alone locates them.
253
+ */
254
+ interface RfiRequirementEntity {
255
+ /** 'business' | 'individual' | 'edd' */
256
+ kind: string;
257
+ /** The associated individual's id. Present only when `kind` is 'individual'. */
258
+ id?: string;
259
+ }
260
+ /**
261
+ * One thing a customer must supply to resolve a request for information.
262
+ *
263
+ * Switch on `type`:
264
+ * - `'document'` — exactly one of `document_type` (a specific kind of
265
+ * document) or `purpose` (a compliance requirement several document types
266
+ * could satisfy) is set. `status` says whether something is already on file
267
+ * (`'on_file'` means replace it; `'missing'` means send it for the first
268
+ * time).
269
+ * - `'field'` — `path` names the application field to correct.
270
+ * - `'question'` — `key` and `prompt` carry a reviewer's free-text question.
271
+ * When `require_document` is true the answer MUST come with an upload; a
272
+ * text-only answer leaves the RFI unresolved.
273
+ */
274
+ interface RfiRequirement {
275
+ /** 'document' | 'field' | 'question' */
276
+ type: string;
277
+ /** Document requirement: a specific document type (mutually exclusive with `purpose`). */
278
+ document_type?: string;
279
+ /** Document requirement: a compliance purpose (mutually exclusive with `document_type`). */
280
+ purpose?: string;
281
+ /** Document requirement: whose document it is. Omitted when the party is not known. */
282
+ entity?: RfiRequirementEntity;
283
+ /** Document requirement: 'missing' | 'on_file'. */
284
+ status?: string;
285
+ /** Field requirement: the application field path, e.g. 'business.business_description'. */
286
+ path?: string;
287
+ /** Question requirement: the question's stable key. */
288
+ key?: string;
289
+ /** Question requirement: the reviewer's prompt. */
290
+ prompt?: string;
291
+ /** Question requirement: the answer must be accompanied by an upload. */
292
+ require_document?: boolean;
293
+ }
294
+ /**
295
+ * Event payload for {@link WebhookEventType.CustomerRfiRequested}
296
+ * ('customer.rfi.requested').
297
+ *
298
+ * The client that onboarded the customer owns the relationship, so this event
299
+ * is how it learns the customer is blocked and what is still owed.
300
+ *
301
+ * The resubmission link is intentionally ABSENT: it embeds an access token,
302
+ * and a webhook body comes to rest in logs, traces and retry buffers where a
303
+ * credential must not. Read the link from the customer resource over your own
304
+ * authenticated channel.
305
+ *
306
+ * `message_id` is the correlation handle: dedupe redeliveries on it, pair a
307
+ * later `customer.rfi.responded` with the request it answers, and tell a
308
+ * re-notification from a genuinely new request. Omitted when the platform
309
+ * did not record one.
310
+ */
311
+ interface CustomerRfiRequestedData {
312
+ customer_id: string;
313
+ application_id: string;
314
+ /** The RFI thread message this request was sent as. */
315
+ message_id?: string;
316
+ /** Unix seconds. */
317
+ requested_at: number;
318
+ requirements: RfiRequirement[];
319
+ }
320
+ /**
321
+ * Event payload for {@link WebhookEventType.CustomerRfiResponded}
322
+ * ('customer.rfi.responded'): the requested information arrived and the
323
+ * application is back in review. Use it to stop chasing your customer.
324
+ *
325
+ * There is no `rfi.resolved` event: an RFI ends in a decision, which
326
+ * `customer.kyb_status.updated` already reports.
327
+ */
328
+ interface CustomerRfiRespondedData {
329
+ customer_id: string;
330
+ application_id: string;
331
+ /** Unix seconds. */
332
+ responded_at: number;
333
+ }
334
+ /**
335
+ * Event payload for {@link WebhookEventType.CustomerApplicationWithdrawn}
336
+ * ('customer.application.withdrawn'). Withdrawal is terminal: onboarding the
337
+ * customer again requires a new application.
338
+ */
339
+ interface CustomerApplicationWithdrawnData {
340
+ customer_id: string;
341
+ application_id: string;
342
+ /** Why it was withdrawn. Omitted when no reason was recorded. */
343
+ reason?: string;
344
+ }
188
345
  /**
189
346
  * Fee Payout Destination Updated event data.
190
347
  */
@@ -192,6 +349,25 @@ interface FeePayoutDestinationUpdatedData {
192
349
  /** The destination kind — 'usdc_wallet' (developer-fee payouts are crypto-only) */
193
350
  type: string;
194
351
  }
352
+ /**
353
+ * Event payload for {@link WebhookEventType.RdPayoutDestinationUpdated}
354
+ * ('rd_payout_destination.updated').
355
+ *
356
+ * A destination has no history of its own — a PUT replaces the row — so this
357
+ * event is the only record that it changed, which is why it carries the
358
+ * address, what it replaced, and who did it.
359
+ */
360
+ interface RdPayoutDestinationUpdatedData {
361
+ /** The EVM address on Base the fee is now sent to. */
362
+ wallet_address: string;
363
+ /** The address it replaced. Empty string on a first registration. */
364
+ previous_address: string;
365
+ /**
366
+ * The EMAIL of the dashboard user who made the change — personal data, so
367
+ * treat a logged payload accordingly. Empty string when not attributable.
368
+ */
369
+ updated_by: string;
370
+ }
195
371
  /**
196
372
  * Event payload for {@link WebhookEventType.ScheduledPaymentFailed}
197
373
  * ('scheduled_payment.failed'), emitted when a scheduled payment flips to the
@@ -341,7 +517,7 @@ interface WebhookHeaders {
341
517
  * import { WebhookHandler, WebhookEventType } from 'dakota-ts-sdk/webhook';
342
518
  *
343
519
  * const handler = new WebhookHandler({
344
- * publicKey: process.env.WEBHOOK_PUBLIC_KEY!,
520
+ * publicKey: process.env.DAKOTA_WEBHOOK_PUBLIC_KEY!,
345
521
  * });
346
522
  *
347
523
  * // Register event handlers. The resource lives under event.data.object.
@@ -533,7 +709,7 @@ declare function validateTimestamp(timestampStr: string, toleranceSeconds: numbe
533
709
  * requestBody,
534
710
  * request.headers['x-webhook-signature'],
535
711
  * request.headers['x-webhook-timestamp'],
536
- * process.env.WEBHOOK_PUBLIC_KEY
712
+ * process.env.DAKOTA_WEBHOOK_PUBLIC_KEY
537
713
  * );
538
714
  * ```
539
715
  */
@@ -546,4 +722,4 @@ declare function verifySignature(payload: Uint8Array | string, signatureB64: str
546
722
  */
547
723
  declare function verifySignatureSync(payload: Uint8Array | string, signatureB64: string, timestampStr: string, publicKeyHex: string, toleranceSeconds?: number): void;
548
724
 
549
- export { type CapabilityRequirement, type CustomerCapabilityStatusUpdatedData, type CustomerDeletedData, DEFAULT_TIMESTAMP_TOLERANCE, type FeePayoutDestinationUpdatedData, type IdempotencyStore, type KybApplicationSubmittedData, type KybLinkData, MemoryIdempotencyStore, SIGNATURE_HEADER, type ScheduledPaymentFailedData, SignatureVerificationError, TIMESTAMP_HEADER, type WebhookEvent, type WebhookEventData, type WebhookEventHandler, type WebhookEventRequest, WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookHeaders, matchesEventType, parseEvent, parsePublicKey, parseSignature, validateTimestamp, verifySignature, verifySignatureSync };
725
+ export { type CapabilityRequirement, type CustomerApplicationWithdrawnData, type CustomerCapabilityStatusUpdatedData, type CustomerDeletedData, type CustomerRfiRequestedData, type CustomerRfiRespondedData, DEFAULT_TIMESTAMP_TOLERANCE, type FeePayoutDestinationUpdatedData, type IdempotencyStore, type KybApplicationSubmittedData, type KybLinkData, MemoryIdempotencyStore, type RdPayoutDestinationUpdatedData, type RfiRequirement, type RfiRequirementEntity, SIGNATURE_HEADER, type ScheduledPaymentFailedData, SignatureVerificationError, TIMESTAMP_HEADER, type WebhookEvent, type WebhookEventData, type WebhookEventHandler, type WebhookEventRequest, WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookHeaders, matchesEventType, parseEvent, parsePublicKey, parseSignature, validateTimestamp, verifySignature, verifySignatureSync };
@@ -548,6 +548,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
548
548
  WebhookEventType2["UserUpdated"] = "user.updated";
549
549
  WebhookEventType2["UserDeleted"] = "user.deleted";
550
550
  WebhookEventType2["ApiKeyCreated"] = "api_key.created";
551
+ WebhookEventType2["ApiKeyUpdated"] = "api_key.updated";
551
552
  WebhookEventType2["ApiKeyDeleted"] = "api_key.deleted";
552
553
  WebhookEventType2["CustomerCreated"] = "customer.created";
553
554
  WebhookEventType2["CustomerUpdated"] = "customer.updated";
@@ -558,8 +559,13 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
558
559
  WebhookEventType2["CustomerKybStatusUpdated"] = "customer.kyb_status.updated";
559
560
  WebhookEventType2["CustomerKybApplicationSubmitted"] = "customer.kyb_application.submitted";
560
561
  WebhookEventType2["CustomerCapabilityStatusUpdated"] = "customer.capability_status.updated";
562
+ WebhookEventType2["CustomerRfiRequested"] = "customer.rfi.requested";
563
+ WebhookEventType2["CustomerRfiResponded"] = "customer.rfi.responded";
564
+ WebhookEventType2["CustomerApplicationWithdrawn"] = "customer.application.withdrawn";
561
565
  WebhookEventType2["FeePayoutDestinationUpdated"] = "fee_payout_destination.updated";
562
566
  WebhookEventType2["FeePayoutDestinationDeleted"] = "fee_payout_destination.deleted";
567
+ WebhookEventType2["RdPayoutDestinationUpdated"] = "rd_payout_destination.updated";
568
+ WebhookEventType2["DeploymentPayoutDestinationUpdated"] = "deployment_payout_destination.updated";
563
569
  WebhookEventType2["AutoAccountCreated"] = "auto_account.created";
564
570
  WebhookEventType2["AutoAccountUpdated"] = "auto_account.updated";
565
571
  WebhookEventType2["AutoAccountDeleted"] = "auto_account.deleted";
@@ -589,6 +595,8 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
589
595
  WebhookEventType2["WalletTransactionUpdated"] = "wallet.transaction.updated";
590
596
  WebhookEventType2["WalletDeposit"] = "wallet.deposit";
591
597
  WebhookEventType2["ScheduledPaymentFailed"] = "scheduled_payment.failed";
598
+ WebhookEventType2["DepositHeld"] = "deposit.held";
599
+ WebhookEventType2["DepositReturned"] = "deposit.returned";
592
600
  WebhookEventType2["TransactionCreated"] = "transaction.created";
593
601
  WebhookEventType2["TransactionUpdated"] = "transaction.updated";
594
602
  WebhookEventType2["TransactionCompleted"] = "transaction.completed";