@dalmore/api-contracts 0.0.0-dev.686830 → 0.0.0-dev.6d952b2

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.
Files changed (117) hide show
  1. package/common/constants.d.ts +43 -0
  2. package/common/constants.js +77 -0
  3. package/common/constants.js.map +1 -0
  4. package/common/helpers/index.d.ts +27 -0
  5. package/common/helpers/index.js +43 -0
  6. package/common/helpers/index.js.map +1 -1
  7. package/common/types/account-setting.types.d.ts +5 -0
  8. package/common/types/account.types.d.ts +6 -6
  9. package/common/types/account.types.js +3 -3
  10. package/common/types/account.types.js.map +1 -1
  11. package/common/types/activity.types.d.ts +1 -0
  12. package/common/types/activity.types.js +1 -0
  13. package/common/types/activity.types.js.map +1 -1
  14. package/common/types/attribution.types.d.ts +582 -0
  15. package/common/types/attribution.types.js +126 -0
  16. package/common/types/attribution.types.js.map +1 -0
  17. package/common/types/auth.types.d.ts +36 -0
  18. package/common/types/auth.types.js +3 -2
  19. package/common/types/auth.types.js.map +1 -1
  20. package/common/types/cap-table.types.d.ts +180 -0
  21. package/common/types/cap-table.types.js +35 -0
  22. package/common/types/cap-table.types.js.map +1 -1
  23. package/common/types/cart.types.d.ts +3 -0
  24. package/common/types/cart.types.js +1 -0
  25. package/common/types/cart.types.js.map +1 -1
  26. package/common/types/common.types.d.ts +42 -5
  27. package/common/types/common.types.js +24 -3
  28. package/common/types/common.types.js.map +1 -1
  29. package/common/types/comply-advantage-api.types.d.ts +12 -12
  30. package/common/types/csv.types.d.ts +3612 -0
  31. package/common/types/csv.types.js +290 -0
  32. package/common/types/csv.types.js.map +1 -0
  33. package/common/types/disbursement-transaction.types.d.ts +1 -1
  34. package/common/types/disbursement-transaction.types.js +1 -1
  35. package/common/types/disbursement-transaction.types.js.map +1 -1
  36. package/common/types/disbursements.types.d.ts +211 -19
  37. package/common/types/disbursements.types.js +42 -3
  38. package/common/types/disbursements.types.js.map +1 -1
  39. package/common/types/file.types.d.ts +3 -0
  40. package/common/types/file.types.js +3 -0
  41. package/common/types/file.types.js.map +1 -1
  42. package/common/types/index.d.ts +3 -2
  43. package/common/types/index.js +3 -2
  44. package/common/types/index.js.map +1 -1
  45. package/common/types/individuals.types.d.ts +395 -5
  46. package/common/types/individuals.types.js +11 -14
  47. package/common/types/individuals.types.js.map +1 -1
  48. package/common/types/investor-account.types.d.ts +1 -1
  49. package/common/types/investor-account.types.js +3 -2
  50. package/common/types/investor-account.types.js.map +1 -1
  51. package/common/types/investors-offering.types.d.ts +8 -0
  52. package/common/types/investors-offering.types.js +1 -0
  53. package/common/types/investors-offering.types.js.map +1 -1
  54. package/common/types/invite.types.d.ts +5 -2
  55. package/common/types/invite.types.js +2 -1
  56. package/common/types/invite.types.js.map +1 -1
  57. package/common/types/issuer-offering.types.d.ts +182 -12
  58. package/common/types/issuer-offering.types.js +32 -31
  59. package/common/types/issuer-offering.types.js.map +1 -1
  60. package/common/types/legal-entity.types.d.ts +39 -1
  61. package/common/types/legal-entity.types.js +8 -5
  62. package/common/types/legal-entity.types.js.map +1 -1
  63. package/common/types/mail-template.types.d.ts +85 -4
  64. package/common/types/mail-template.types.js +130 -0
  65. package/common/types/mail-template.types.js.map +1 -1
  66. package/common/types/notification.types.d.ts +1 -0
  67. package/common/types/notification.types.js +3 -0
  68. package/common/types/notification.types.js.map +1 -1
  69. package/common/types/offering-submission.types.js +1 -1
  70. package/common/types/offering.types.d.ts +42 -29
  71. package/common/types/offering.types.js +66 -18
  72. package/common/types/offering.types.js.map +1 -1
  73. package/common/types/payment-methods.types.d.ts +365 -0
  74. package/common/types/payment-methods.types.js +121 -0
  75. package/common/types/payment-methods.types.js.map +1 -1
  76. package/common/types/reports.types.d.ts +12 -12
  77. package/common/types/review.types.js +1 -1
  78. package/common/types/review.types.js.map +1 -1
  79. package/common/types/site.types.d.ts +12 -12
  80. package/common/types/state-machine.types.d.ts +3 -3
  81. package/common/types/state-machine.types.js +1 -1
  82. package/common/types/state-machine.types.js.map +1 -1
  83. package/common/types/task.types.d.ts +8 -0
  84. package/common/types/task.types.js +3 -0
  85. package/common/types/task.types.js.map +1 -1
  86. package/common/types/trade-line-item.types.d.ts +24 -0
  87. package/common/types/trade-line-item.types.js +3 -0
  88. package/common/types/trade-line-item.types.js.map +1 -1
  89. package/common/types/trade.types.d.ts +20 -14
  90. package/common/types/trade.types.js +17 -7
  91. package/common/types/trade.types.js.map +1 -1
  92. package/common/types/transaction.types.d.ts +24 -2
  93. package/common/types/transaction.types.js +26 -1
  94. package/common/types/transaction.types.js.map +1 -1
  95. package/common/types/user.types.d.ts +73 -95
  96. package/common/types/user.types.js +7 -26
  97. package/common/types/user.types.js.map +1 -1
  98. package/common/types/zapier.types.d.ts +126 -0
  99. package/common/types/zapier.types.js +247 -0
  100. package/common/types/zapier.types.js.map +1 -0
  101. package/contracts/clients/cart/index.d.ts +3 -0
  102. package/contracts/clients/csv/index.d.ts +1988 -0
  103. package/contracts/clients/csv/index.js +96 -0
  104. package/contracts/clients/csv/index.js.map +1 -0
  105. package/contracts/clients/index.d.ts +3942 -1061
  106. package/contracts/clients/index.js +8 -2
  107. package/contracts/clients/index.js.map +1 -1
  108. package/contracts/clients/individuals/index.d.ts +381 -5
  109. package/contracts/clients/legal-entities/index.d.ts +1 -1
  110. package/contracts/clients/offerings/index.d.ts +10 -5
  111. package/contracts/clients/review/index.d.ts +85 -0
  112. package/contracts/clients/review/index.js +27 -0
  113. package/contracts/clients/review/index.js.map +1 -0
  114. package/contracts/clients/webhooks/index.d.ts +506 -0
  115. package/contracts/clients/webhooks/index.js +118 -0
  116. package/contracts/clients/webhooks/index.js.map +1 -0
  117. package/package.json +1 -1
@@ -20,8 +20,6 @@ export * from './review.types.js';
20
20
  export * from './sms.types.js';
21
21
  export * from './trade.types.js';
22
22
  export * from './user.types.js';
23
- export * from './file.types.js';
24
- export * from './review.types.js';
25
23
  export * from './issuer-offering.types.js';
26
24
  export * from './covered-person.types.js';
27
25
  export * from './issuer.types.js';
@@ -30,6 +28,7 @@ export * from './page-revision.types.js';
30
28
  export * from './login-history.types.js';
31
29
  export * from './offering-submission.types.js';
32
30
  export * from './task.types.js';
31
+ export * from './transaction.types.js';
33
32
  export * from './secure-request.types.js';
34
33
  export * from './issuer-payment-method.types.js';
35
34
  export * from './site-settings.types.js';
@@ -47,6 +46,8 @@ export * from './reports.types.js';
47
46
  export * from './i-will-do-it-later.types.js';
48
47
  export * from './payment-methods.types.js';
49
48
  export * from './cap-table.types.js';
49
+ export * from './csv.types.js';
50
+ export * from './attribution.types.js';
50
51
  export var Versions;
51
52
  (function (Versions) {
52
53
  Versions["V1"] = "v1";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAElC,MAAM,CAAN,IAAY,QAEX;AAFD,WAAY,QAAQ;IAClB,qBAAS,CAAA;AACX,CAAC,EAFW,QAAQ,KAAR,QAAQ,QAEnB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AAEpC,MAAM,CAAN,IAAY,QAEX;AAFD,WAAY,QAAQ;IAClB,qBAAS,CAAA;AACX,CAAC,EAFW,QAAQ,KAAR,QAAQ,QAEnB"}
@@ -257,12 +257,12 @@ export declare const IndividualsIncludeQuery: z.ZodObject<{
257
257
  }>;
258
258
  export interface IndividualsIncludeQuery extends z.infer<typeof IndividualsIncludeQuery> {
259
259
  }
260
- export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.ZodObject<{
260
+ export declare const PostIndividualBaseObject: z.ZodObject<{
261
261
  lastName: z.ZodOptional<z.ZodString>;
262
262
  investorAccountId: z.ZodString;
263
263
  firstName: z.ZodOptional<z.ZodString>;
264
264
  dob: z.ZodOptional<z.ZodDate>;
265
- isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodBoolean>;
265
+ isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
266
266
  citizenship: z.ZodOptional<z.ZodNativeEnum<Readonly<Record<string, string>>>>;
267
267
  ssn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
268
268
  currencyCode: z.ZodOptional<z.ZodString>;
@@ -328,6 +328,67 @@ export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.
328
328
  currencyCode?: string | undefined;
329
329
  liquidNetWorth?: number | undefined;
330
330
  dob?: Date | undefined;
331
+ isUsCitizenOrGreenCardHolder?: unknown;
332
+ citizenship?: string | undefined;
333
+ ssn?: string | null | undefined;
334
+ investedInCrowdfunding?: number | undefined;
335
+ currentAnnualIncome?: number | undefined;
336
+ employerName?: string | null | undefined;
337
+ setupStep?: SetupStepType | undefined;
338
+ sourceOfIncome?: SourceOfIncome | null | undefined;
339
+ ownership?: number | undefined;
340
+ retirementAccountType?: RetirementAccountType | null | undefined;
341
+ custodianName?: string | null | undefined;
342
+ custodianAccountNumber?: string | null | undefined;
343
+ custodianRepresentativeName?: string | null | undefined;
344
+ custodianEmail?: string | null | undefined;
345
+ }>;
346
+ export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.ZodObject<{
347
+ lastName: z.ZodOptional<z.ZodString>;
348
+ investorAccountId: z.ZodString;
349
+ firstName: z.ZodOptional<z.ZodString>;
350
+ dob: z.ZodOptional<z.ZodDate>;
351
+ isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
352
+ citizenship: z.ZodOptional<z.ZodNativeEnum<Readonly<Record<string, string>>>>;
353
+ ssn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
354
+ currencyCode: z.ZodOptional<z.ZodString>;
355
+ email: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
356
+ role: z.ZodNativeEnum<typeof IndividualRole>;
357
+ phone: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, {
358
+ isOk: () => boolean;
359
+ isErr: () => boolean;
360
+ value?: any;
361
+ error?: any;
362
+ } | import("neverthrow").Ok<null, never>, string | null>, {
363
+ isOk: () => boolean;
364
+ isErr: () => boolean;
365
+ value?: any;
366
+ error?: any;
367
+ } | import("neverthrow").Ok<null, never>, string | null>, any, string | null>>;
368
+ ownership: z.ZodOptional<z.ZodNumber>;
369
+ setupStep: z.ZodOptional<z.ZodNativeEnum<typeof SetupStepType>>;
370
+ liquidNetWorth: z.ZodOptional<z.ZodNumber>;
371
+ currentAnnualIncome: z.ZodOptional<z.ZodNumber>;
372
+ sourceOfIncome: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof SourceOfIncome>>>;
373
+ employerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
+ investedInCrowdfunding: z.ZodOptional<z.ZodNumber>;
375
+ retirementAccountType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof RetirementAccountType>>>;
376
+ custodianName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
377
+ custodianAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
378
+ custodianRepresentativeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
+ custodianEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ tid: z.ZodOptional<z.ZodString>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ role: IndividualRole;
383
+ investorAccountId: string;
384
+ firstName?: string | undefined;
385
+ lastName?: string | undefined;
386
+ email?: string | undefined;
387
+ tid?: string | undefined;
388
+ phone?: any;
389
+ currencyCode?: string | undefined;
390
+ liquidNetWorth?: number | undefined;
391
+ dob?: Date | undefined;
331
392
  isUsCitizenOrGreenCardHolder?: boolean | undefined;
332
393
  citizenship?: string | undefined;
333
394
  ssn?: string | null | undefined;
@@ -342,6 +403,31 @@ export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.
342
403
  custodianAccountNumber?: string | null | undefined;
343
404
  custodianRepresentativeName?: string | null | undefined;
344
405
  custodianEmail?: string | null | undefined;
406
+ }, {
407
+ role: IndividualRole;
408
+ investorAccountId: string;
409
+ firstName?: string | undefined;
410
+ lastName?: string | undefined;
411
+ email?: string | undefined;
412
+ tid?: string | undefined;
413
+ phone?: string | null | undefined;
414
+ currencyCode?: string | undefined;
415
+ liquidNetWorth?: number | undefined;
416
+ dob?: Date | undefined;
417
+ isUsCitizenOrGreenCardHolder?: unknown;
418
+ citizenship?: string | undefined;
419
+ ssn?: string | null | undefined;
420
+ investedInCrowdfunding?: number | undefined;
421
+ currentAnnualIncome?: number | undefined;
422
+ employerName?: string | null | undefined;
423
+ setupStep?: SetupStepType | undefined;
424
+ sourceOfIncome?: SourceOfIncome | null | undefined;
425
+ ownership?: number | undefined;
426
+ retirementAccountType?: RetirementAccountType | null | undefined;
427
+ custodianName?: string | null | undefined;
428
+ custodianAccountNumber?: string | null | undefined;
429
+ custodianRepresentativeName?: string | null | undefined;
430
+ custodianEmail?: string | null | undefined;
345
431
  }>, z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
346
432
  address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
347
433
  address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -430,7 +516,7 @@ export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.
430
516
  currencyCode?: string | undefined;
431
517
  liquidNetWorth?: number | undefined;
432
518
  dob?: Date | undefined;
433
- isUsCitizenOrGreenCardHolder?: boolean | undefined;
519
+ isUsCitizenOrGreenCardHolder?: unknown;
434
520
  citizenship?: string | undefined;
435
521
  ssn?: string | null | undefined;
436
522
  investedInCrowdfunding?: number | undefined;
@@ -456,7 +542,7 @@ export declare const PostIndividualBodySchema: z.ZodEffects<z.ZodIntersection<z.
456
542
  zip?: string | null | undefined;
457
543
  }>;
458
544
  export type PostIndividualBodyType = z.infer<typeof PostIndividualBodySchema>;
459
- export declare const UpdateIndividualBodySchema: z.ZodIntersection<z.ZodObject<{
545
+ export declare const UpdateIndividualBaseObject: z.ZodObject<{
460
546
  lastName: z.ZodOptional<z.ZodString>;
461
547
  firstName: z.ZodOptional<z.ZodString>;
462
548
  kycFirstName: z.ZodOptional<z.ZodString>;
@@ -476,7 +562,7 @@ export declare const UpdateIndividualBodySchema: z.ZodIntersection<z.ZodObject<{
476
562
  } | import("neverthrow").Ok<null, never>, string | null>, any, string | null>>;
477
563
  email: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
478
564
  ownership: z.ZodOptional<z.ZodNumber>;
479
- isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodBoolean>;
565
+ isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
480
566
  citizenship: z.ZodOptional<z.ZodNativeEnum<Readonly<Record<string, string>>>>;
481
567
  ssn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
482
568
  kycDocumentType: z.ZodOptional<z.ZodNativeEnum<typeof KYCDocumentType>>;
@@ -554,6 +640,87 @@ export declare const UpdateIndividualBodySchema: z.ZodIntersection<z.ZodObject<{
554
640
  aicAccreditationType?: AicAccreditationType | undefined;
555
641
  aicQuestionnaire?: string | undefined;
556
642
  dob?: Date | undefined;
643
+ isUsCitizenOrGreenCardHolder?: unknown;
644
+ citizenship?: string | undefined;
645
+ ssn?: string | null | undefined;
646
+ investedInCrowdfunding?: number | undefined;
647
+ currentAnnualIncome?: number | undefined;
648
+ currentHouseholdIncome?: number | undefined;
649
+ householdNetWorth?: number | undefined;
650
+ employerName?: string | null | undefined;
651
+ setupStep?: SetupStepType | undefined;
652
+ sourceOfIncome?: SourceOfIncome | null | undefined;
653
+ ownership?: number | undefined;
654
+ retirementAccountType?: RetirementAccountType | null | undefined;
655
+ custodianName?: string | null | undefined;
656
+ custodianAccountNumber?: string | null | undefined;
657
+ custodianRepresentativeName?: string | null | undefined;
658
+ custodianEmail?: string | null | undefined;
659
+ accredited?: boolean | undefined;
660
+ }>;
661
+ export declare const UpdateIndividualBodySchema: z.ZodIntersection<z.ZodObject<{
662
+ lastName: z.ZodOptional<z.ZodString>;
663
+ firstName: z.ZodOptional<z.ZodString>;
664
+ kycFirstName: z.ZodOptional<z.ZodString>;
665
+ kycLastName: z.ZodOptional<z.ZodString>;
666
+ dob: z.ZodOptional<z.ZodDate>;
667
+ currencyCode: z.ZodOptional<z.ZodString>;
668
+ phone: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, {
669
+ isOk: () => boolean;
670
+ isErr: () => boolean;
671
+ value?: any;
672
+ error?: any;
673
+ } | import("neverthrow").Ok<null, never>, string | null>, {
674
+ isOk: () => boolean;
675
+ isErr: () => boolean;
676
+ value?: any;
677
+ error?: any;
678
+ } | import("neverthrow").Ok<null, never>, string | null>, any, string | null>>;
679
+ email: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
680
+ ownership: z.ZodOptional<z.ZodNumber>;
681
+ isUsCitizenOrGreenCardHolder: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
682
+ citizenship: z.ZodOptional<z.ZodNativeEnum<Readonly<Record<string, string>>>>;
683
+ ssn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
684
+ kycDocumentType: z.ZodOptional<z.ZodNativeEnum<typeof KYCDocumentType>>;
685
+ kycDocumentIssuer: z.ZodOptional<z.ZodString>;
686
+ kycExpirationDate: z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>;
687
+ kycIssuerDate: z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>;
688
+ kycDocumentNumber: z.ZodOptional<z.ZodString>;
689
+ householdNetWorth: z.ZodOptional<z.ZodNumber>;
690
+ liquidNetWorth: z.ZodOptional<z.ZodNumber>;
691
+ currentHouseholdIncome: z.ZodOptional<z.ZodNumber>;
692
+ currentAnnualIncome: z.ZodOptional<z.ZodNumber>;
693
+ investedInCrowdfunding: z.ZodOptional<z.ZodNumber>;
694
+ setupStep: z.ZodOptional<z.ZodNativeEnum<typeof SetupStepType>>;
695
+ employerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ sourceOfIncome: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof SourceOfIncome>>>;
697
+ aicQuestionnaire: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
698
+ kycProvider: z.ZodOptional<z.ZodString>;
699
+ aicAccreditationType: z.ZodOptional<z.ZodNativeEnum<typeof AicAccreditationType>>;
700
+ accredited: z.ZodOptional<z.ZodBoolean>;
701
+ retirementAccountType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof RetirementAccountType>>>;
702
+ custodianName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
703
+ custodianAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
704
+ custodianRepresentativeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
705
+ custodianEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
706
+ }, "strip", z.ZodTypeAny, {
707
+ firstName?: string | undefined;
708
+ lastName?: string | undefined;
709
+ email?: string | undefined;
710
+ phone?: any;
711
+ kycFirstName?: string | undefined;
712
+ kycLastName?: string | undefined;
713
+ kycDocumentType?: KYCDocumentType | undefined;
714
+ kycDocumentIssuer?: string | undefined;
715
+ kycProvider?: string | undefined;
716
+ currencyCode?: string | undefined;
717
+ kycDocumentNumber?: string | undefined;
718
+ kycIssuerDate?: string | undefined;
719
+ kycExpirationDate?: string | undefined;
720
+ liquidNetWorth?: number | undefined;
721
+ aicAccreditationType?: AicAccreditationType | undefined;
722
+ aicQuestionnaire?: string | undefined;
723
+ dob?: Date | undefined;
557
724
  isUsCitizenOrGreenCardHolder?: boolean | undefined;
558
725
  citizenship?: string | undefined;
559
726
  ssn?: string | null | undefined;
@@ -571,6 +738,41 @@ export declare const UpdateIndividualBodySchema: z.ZodIntersection<z.ZodObject<{
571
738
  custodianRepresentativeName?: string | null | undefined;
572
739
  custodianEmail?: string | null | undefined;
573
740
  accredited?: boolean | undefined;
741
+ }, {
742
+ firstName?: string | undefined;
743
+ lastName?: string | undefined;
744
+ email?: string | undefined;
745
+ phone?: string | null | undefined;
746
+ kycFirstName?: string | undefined;
747
+ kycLastName?: string | undefined;
748
+ kycDocumentType?: KYCDocumentType | undefined;
749
+ kycDocumentIssuer?: string | undefined;
750
+ kycProvider?: string | undefined;
751
+ currencyCode?: string | undefined;
752
+ kycDocumentNumber?: string | undefined;
753
+ kycIssuerDate?: Date | undefined;
754
+ kycExpirationDate?: Date | undefined;
755
+ liquidNetWorth?: number | undefined;
756
+ aicAccreditationType?: AicAccreditationType | undefined;
757
+ aicQuestionnaire?: string | undefined;
758
+ dob?: Date | undefined;
759
+ isUsCitizenOrGreenCardHolder?: unknown;
760
+ citizenship?: string | undefined;
761
+ ssn?: string | null | undefined;
762
+ investedInCrowdfunding?: number | undefined;
763
+ currentAnnualIncome?: number | undefined;
764
+ currentHouseholdIncome?: number | undefined;
765
+ householdNetWorth?: number | undefined;
766
+ employerName?: string | null | undefined;
767
+ setupStep?: SetupStepType | undefined;
768
+ sourceOfIncome?: SourceOfIncome | null | undefined;
769
+ ownership?: number | undefined;
770
+ retirementAccountType?: RetirementAccountType | null | undefined;
771
+ custodianName?: string | null | undefined;
772
+ custodianAccountNumber?: string | null | undefined;
773
+ custodianRepresentativeName?: string | null | undefined;
774
+ custodianEmail?: string | null | undefined;
775
+ accredited?: boolean | undefined;
574
776
  }>, z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
575
777
  address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
778
  address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1144,6 +1346,94 @@ export declare const IndividualResponseSchema: z.ZodObject<{
1144
1346
  financial?: boolean | undefined;
1145
1347
  } | undefined;
1146
1348
  }>>>;
1349
+ trustedContacts: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
1350
+ id: z.ZodString;
1351
+ __entity: z.ZodOptional<z.ZodString>;
1352
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
1353
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
1354
+ deletedAt: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
1355
+ } & {
1356
+ firstName: z.ZodNullable<z.ZodString>;
1357
+ lastName: z.ZodNullable<z.ZodString>;
1358
+ email: z.ZodNullable<z.ZodString>;
1359
+ phone: z.ZodNullable<z.ZodObject<{
1360
+ countryCallingCode: z.ZodString;
1361
+ country: z.ZodString;
1362
+ nationalNumber: z.ZodString;
1363
+ number: z.ZodString;
1364
+ formatNational: z.ZodString;
1365
+ formatInternational: z.ZodString;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ number: string;
1368
+ countryCallingCode: string;
1369
+ country: string;
1370
+ nationalNumber: string;
1371
+ formatNational: string;
1372
+ formatInternational: string;
1373
+ }, {
1374
+ number: string;
1375
+ countryCallingCode: string;
1376
+ country: string;
1377
+ nationalNumber: string;
1378
+ formatNational: string;
1379
+ formatInternational: string;
1380
+ }>>;
1381
+ address: z.ZodNullable<z.ZodString>;
1382
+ address2: z.ZodNullable<z.ZodString>;
1383
+ city: z.ZodNullable<z.ZodString>;
1384
+ state: z.ZodNullable<z.ZodString>;
1385
+ zip: z.ZodNullable<z.ZodString>;
1386
+ country: z.ZodNullable<z.ZodString>;
1387
+ relationship: z.ZodNativeEnum<typeof import("./common.types").TrustedContactRelationship>;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ id: string;
1390
+ createdAt: string | Date;
1391
+ updatedAt: string | Date;
1392
+ deletedAt: string | Date | null;
1393
+ country: string | null;
1394
+ firstName: string | null;
1395
+ lastName: string | null;
1396
+ email: string | null;
1397
+ phone: {
1398
+ number: string;
1399
+ countryCallingCode: string;
1400
+ country: string;
1401
+ nationalNumber: string;
1402
+ formatNational: string;
1403
+ formatInternational: string;
1404
+ } | null;
1405
+ state: string | null;
1406
+ address: string | null;
1407
+ city: string | null;
1408
+ zip: string | null;
1409
+ address2: string | null;
1410
+ relationship: import("./common.types").TrustedContactRelationship;
1411
+ __entity?: string | undefined;
1412
+ }, {
1413
+ id: string;
1414
+ createdAt: string | Date;
1415
+ updatedAt: string | Date;
1416
+ deletedAt: string | Date | null;
1417
+ country: string | null;
1418
+ firstName: string | null;
1419
+ lastName: string | null;
1420
+ email: string | null;
1421
+ phone: {
1422
+ number: string;
1423
+ countryCallingCode: string;
1424
+ country: string;
1425
+ nationalNumber: string;
1426
+ formatNational: string;
1427
+ formatInternational: string;
1428
+ } | null;
1429
+ state: string | null;
1430
+ address: string | null;
1431
+ city: string | null;
1432
+ zip: string | null;
1433
+ address2: string | null;
1434
+ relationship: import("./common.types").TrustedContactRelationship;
1435
+ __entity?: string | undefined;
1436
+ }>>, "many">>;
1147
1437
  }, "strip", z.ZodTypeAny, {
1148
1438
  id: string;
1149
1439
  createdAt: string | Date;
@@ -1279,6 +1569,31 @@ export declare const IndividualResponseSchema: z.ZodObject<{
1279
1569
  financial: boolean;
1280
1570
  } | undefined;
1281
1571
  } | undefined;
1572
+ trustedContacts?: {
1573
+ id: string;
1574
+ createdAt: string | Date;
1575
+ updatedAt: string | Date;
1576
+ deletedAt: string | Date | null;
1577
+ country: string | null;
1578
+ firstName: string | null;
1579
+ lastName: string | null;
1580
+ email: string | null;
1581
+ phone: {
1582
+ number: string;
1583
+ countryCallingCode: string;
1584
+ country: string;
1585
+ nationalNumber: string;
1586
+ formatNational: string;
1587
+ formatInternational: string;
1588
+ } | null;
1589
+ state: string | null;
1590
+ address: string | null;
1591
+ city: string | null;
1592
+ zip: string | null;
1593
+ address2: string | null;
1594
+ relationship: import("./common.types").TrustedContactRelationship;
1595
+ __entity?: string | undefined;
1596
+ }[] | undefined;
1282
1597
  }, {
1283
1598
  id: string;
1284
1599
  createdAt: string | Date;
@@ -1414,6 +1729,31 @@ export declare const IndividualResponseSchema: z.ZodObject<{
1414
1729
  financial?: boolean | undefined;
1415
1730
  } | undefined;
1416
1731
  } | undefined;
1732
+ trustedContacts?: {
1733
+ id: string;
1734
+ createdAt: string | Date;
1735
+ updatedAt: string | Date;
1736
+ deletedAt: string | Date | null;
1737
+ country: string | null;
1738
+ firstName: string | null;
1739
+ lastName: string | null;
1740
+ email: string | null;
1741
+ phone: {
1742
+ number: string;
1743
+ countryCallingCode: string;
1744
+ country: string;
1745
+ nationalNumber: string;
1746
+ formatNational: string;
1747
+ formatInternational: string;
1748
+ } | null;
1749
+ state: string | null;
1750
+ address: string | null;
1751
+ city: string | null;
1752
+ zip: string | null;
1753
+ address2: string | null;
1754
+ relationship: import("./common.types").TrustedContactRelationship;
1755
+ __entity?: string | undefined;
1756
+ }[] | undefined;
1417
1757
  }>>>;
1418
1758
  role: z.ZodNativeEnum<typeof IndividualRole>;
1419
1759
  firstName: z.ZodString;
@@ -1681,6 +2021,31 @@ export declare const IndividualResponseSchema: z.ZodObject<{
1681
2021
  financial: boolean;
1682
2022
  } | undefined;
1683
2023
  } | undefined;
2024
+ trustedContacts?: {
2025
+ id: string;
2026
+ createdAt: string | Date;
2027
+ updatedAt: string | Date;
2028
+ deletedAt: string | Date | null;
2029
+ country: string | null;
2030
+ firstName: string | null;
2031
+ lastName: string | null;
2032
+ email: string | null;
2033
+ phone: {
2034
+ number: string;
2035
+ countryCallingCode: string;
2036
+ country: string;
2037
+ nationalNumber: string;
2038
+ formatNational: string;
2039
+ formatInternational: string;
2040
+ } | null;
2041
+ state: string | null;
2042
+ address: string | null;
2043
+ city: string | null;
2044
+ zip: string | null;
2045
+ address2: string | null;
2046
+ relationship: import("./common.types").TrustedContactRelationship;
2047
+ __entity?: string | undefined;
2048
+ }[] | undefined;
1684
2049
  } | undefined;
1685
2050
  }, {
1686
2051
  id: string;
@@ -1894,6 +2259,31 @@ export declare const IndividualResponseSchema: z.ZodObject<{
1894
2259
  financial?: boolean | undefined;
1895
2260
  } | undefined;
1896
2261
  } | undefined;
2262
+ trustedContacts?: {
2263
+ id: string;
2264
+ createdAt: string | Date;
2265
+ updatedAt: string | Date;
2266
+ deletedAt: string | Date | null;
2267
+ country: string | null;
2268
+ firstName: string | null;
2269
+ lastName: string | null;
2270
+ email: string | null;
2271
+ phone: {
2272
+ number: string;
2273
+ countryCallingCode: string;
2274
+ country: string;
2275
+ nationalNumber: string;
2276
+ formatNational: string;
2277
+ formatInternational: string;
2278
+ } | null;
2279
+ state: string | null;
2280
+ address: string | null;
2281
+ city: string | null;
2282
+ zip: string | null;
2283
+ address2: string | null;
2284
+ relationship: import("./common.types").TrustedContactRelationship;
2285
+ __entity?: string | undefined;
2286
+ }[] | undefined;
1897
2287
  } | undefined;
1898
2288
  }>;
1899
2289
  export type IndividualResponseType = z.infer<typeof IndividualResponseSchema>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AccountZod, IPaginationMeta, KYCStatus, SanctionsStatus, AMLStatus, IraCheck, AicAccreditationType, KYCDocumentType, AicStatus, InvestorAccountType, SetupStatusType, SetupStepType, RetirementAccountType, EmploymentStatus, SourceOfIncome, AMLProvider, EmailSchema, } from './common.types.js';
2
+ import { AccountZod, IPaginationMeta, KYCStatus, SanctionsStatus, AMLStatus, IraCheck, AicAccreditationType, KYCDocumentType, AicStatus, InvestorAccountType, SetupStatusType, SetupStepType, RetirementAccountType, EmploymentStatus, SourceOfIncome, AMLProvider, EmailSchema, StringToBooleanSchema, } from './common.types.js';
3
3
  import { IBaseEntity } from './entity.types.js';
4
4
  import { IInvestorAccount } from './investor-account.types.js';
5
5
  import { extendZodWithOpenApi } from '@anatine/zod-openapi';
@@ -82,7 +82,7 @@ export const IIndividualZod = IBaseEntity.extend({
82
82
  kycStatus: z.nativeEnum(KYCStatus),
83
83
  kycFirstName: z.string().nullable(),
84
84
  kycLastName: z.string().nullable(),
85
- kycDocumentType: z.nativeEnum(KYCDocumentType),
85
+ kycDocumentType: z.nativeEnum(KYCDocumentType).nullable(),
86
86
  kycDocumentIssuer: z.string().nullable(),
87
87
  kycDocumentNumber: z.string().nullable(),
88
88
  kycIssuerDate: z.string().nullable(),
@@ -142,7 +142,7 @@ export const IIndividualZod = IBaseEntity.extend({
142
142
  lastName: z.string().nullable(),
143
143
  dob: z.coerce.date().nullable(),
144
144
  isUsCitizenOrGreenCardHolder: z.boolean(),
145
- citizenship: CountryEnumSchema.optional(),
145
+ citizenship: CountryEnumSchema.nullable().optional(),
146
146
  ssn: z.string().nullable(),
147
147
  lastFour: z.string().nullable(),
148
148
  address: z.string().nullable(),
@@ -240,13 +240,12 @@ export const IndividualsIncludeQuery = z.object({
240
240
  example: `${individualsInclude.options.join(',')}`,
241
241
  }),
242
242
  });
243
- export const PostIndividualBodySchema = z
244
- .object({
243
+ export const PostIndividualBaseObject = z.object({
245
244
  lastName: z.string().optional(),
246
245
  investorAccountId: z.string(),
247
246
  firstName: z.string().optional(),
248
247
  dob: z.coerce.date().optional(), // should be optional
249
- isUsCitizenOrGreenCardHolder: z.boolean().optional(),
248
+ isUsCitizenOrGreenCardHolder: StringToBooleanSchema.optional(),
250
249
  citizenship: CountryEnumSchema.optional(),
251
250
  ssn: z
252
251
  .string()
@@ -296,9 +295,8 @@ export const PostIndividualBodySchema = z
296
295
  custodianRepresentativeName: z.string().nullable().optional(),
297
296
  custodianEmail: z.string().email().nullable().optional(),
298
297
  tid: z.string().optional(),
299
- })
300
- .and(AddressSchema)
301
- .superRefine((data, ctx) => {
298
+ });
299
+ export const PostIndividualBodySchema = PostIndividualBaseObject.and(AddressSchema).superRefine((data, ctx) => {
302
300
  if (data.retirementAccountType === RetirementAccountType.CUSTODIAN_MANAGED) {
303
301
  if (!data.custodianName) {
304
302
  ctx.addIssue({
@@ -326,8 +324,7 @@ export const PostIndividualBodySchema = z
326
324
  }
327
325
  }
328
326
  });
329
- export const UpdateIndividualBodySchema = z
330
- .object({
327
+ export const UpdateIndividualBaseObject = z.object({
331
328
  lastName: z
332
329
  .string()
333
330
  .min(2, 'lastName is less than 2 characters')
@@ -360,7 +357,7 @@ export const UpdateIndividualBodySchema = z
360
357
  .min(0, 'Ownership is less than 0')
361
358
  .max(100, 'Ownership is more than 100')
362
359
  .optional(),
363
- isUsCitizenOrGreenCardHolder: z.boolean().optional(),
360
+ isUsCitizenOrGreenCardHolder: StringToBooleanSchema.optional(),
364
361
  citizenship: CountryEnumSchema.optional(),
365
362
  ssn: z
366
363
  .string()
@@ -437,8 +434,8 @@ export const UpdateIndividualBodySchema = z
437
434
  custodianAccountNumber: z.string().nullable().optional(),
438
435
  custodianRepresentativeName: z.string().nullable().optional(),
439
436
  custodianEmail: z.string().email().nullable().optional(),
440
- })
441
- .and(AddressSchema);
437
+ });
438
+ export const UpdateIndividualBodySchema = UpdateIndividualBaseObject.and(AddressSchema);
442
439
  export const IndividualResponseSchema = IBaseEntity.extend({
443
440
  tid: z.string().nullable(),
444
441
  accountId: z.string(),