@apideck/unify 0.32.0 → 0.33.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.
Files changed (64) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +4 -4
  4. package/lib/config.js +4 -4
  5. package/lib/config.js.map +1 -1
  6. package/models/components/billsfilter.d.ts +40 -0
  7. package/models/components/billsfilter.d.ts.map +1 -1
  8. package/models/components/billsfilter.js +26 -1
  9. package/models/components/billsfilter.js.map +1 -1
  10. package/models/components/category.d.ts +5 -0
  11. package/models/components/category.d.ts.map +1 -1
  12. package/models/components/category.js +4 -0
  13. package/models/components/category.js.map +1 -1
  14. package/models/components/connection.d.ts +54 -2
  15. package/models/components/connection.d.ts.map +1 -1
  16. package/models/components/connection.js +40 -5
  17. package/models/components/connection.js.map +1 -1
  18. package/models/components/ecommerceorder.d.ts +3 -0
  19. package/models/components/ecommerceorder.d.ts.map +1 -1
  20. package/models/components/ecommerceorder.js +1 -0
  21. package/models/components/ecommerceorder.js.map +1 -1
  22. package/models/components/invoiceitem.d.ts +10 -0
  23. package/models/components/invoiceitem.d.ts.map +1 -1
  24. package/models/components/invoiceitem.js +8 -0
  25. package/models/components/invoiceitem.js.map +1 -1
  26. package/models/components/journalentry.d.ts +10 -0
  27. package/models/components/journalentry.d.ts.map +1 -1
  28. package/models/components/journalentry.js +8 -0
  29. package/models/components/journalentry.js.map +1 -1
  30. package/models/components/purchaseorder.d.ts +10 -0
  31. package/models/components/purchaseorder.d.ts.map +1 -1
  32. package/models/components/purchaseorder.js +8 -0
  33. package/models/components/purchaseorder.js.map +1 -1
  34. package/models/components/subsidiary.d.ts +10 -0
  35. package/models/components/subsidiary.d.ts.map +1 -1
  36. package/models/components/subsidiary.js +8 -0
  37. package/models/components/subsidiary.js.map +1 -1
  38. package/models/components/taxrate.d.ts +10 -0
  39. package/models/components/taxrate.d.ts.map +1 -1
  40. package/models/components/taxrate.js +8 -0
  41. package/models/components/taxrate.js.map +1 -1
  42. package/models/components/webhookeventtype.d.ts +9 -0
  43. package/models/components/webhookeventtype.d.ts.map +1 -1
  44. package/models/components/webhookeventtype.js +3 -0
  45. package/models/components/webhookeventtype.js.map +1 -1
  46. package/models/errors/unauthorizedresponse.d.ts +156 -15
  47. package/models/errors/unauthorizedresponse.d.ts.map +1 -1
  48. package/models/errors/unauthorizedresponse.js +144 -5
  49. package/models/errors/unauthorizedresponse.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/__tests__/connections.test.ts +7 -7
  52. package/src/__tests__/connectionsettings.test.ts +2 -2
  53. package/src/lib/config.ts +4 -4
  54. package/src/models/components/billsfilter.ts +42 -0
  55. package/src/models/components/category.ts +9 -0
  56. package/src/models/components/connection.ts +64 -6
  57. package/src/models/components/ecommerceorder.ts +1 -0
  58. package/src/models/components/invoiceitem.ts +18 -0
  59. package/src/models/components/journalentry.ts +18 -0
  60. package/src/models/components/purchaseorder.ts +18 -0
  61. package/src/models/components/subsidiary.ts +18 -0
  62. package/src/models/components/taxrate.ts +18 -0
  63. package/src/models/components/webhookeventtype.ts +3 -0
  64. package/src/models/errors/unauthorizedresponse.ts +302 -10
@@ -5,13 +5,52 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
 
12
+ /**
13
+ * Filter by bill status
14
+ */
15
+ export const BillsFilterStatus = {
16
+ Paid: "paid",
17
+ Unpaid: "unpaid",
18
+ PartiallyPaid: "partially_paid",
19
+ } as const;
20
+ /**
21
+ * Filter by bill status
22
+ */
23
+ export type BillsFilterStatus = ClosedEnum<typeof BillsFilterStatus>;
24
+
11
25
  export type BillsFilter = {
12
26
  updatedSince?: Date | undefined;
27
+ /**
28
+ * Filter by bill status
29
+ */
30
+ status?: BillsFilterStatus | undefined;
13
31
  };
14
32
 
33
+ /** @internal */
34
+ export const BillsFilterStatus$inboundSchema: z.ZodNativeEnum<
35
+ typeof BillsFilterStatus
36
+ > = z.nativeEnum(BillsFilterStatus);
37
+
38
+ /** @internal */
39
+ export const BillsFilterStatus$outboundSchema: z.ZodNativeEnum<
40
+ typeof BillsFilterStatus
41
+ > = BillsFilterStatus$inboundSchema;
42
+
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ export namespace BillsFilterStatus$ {
48
+ /** @deprecated use `BillsFilterStatus$inboundSchema` instead. */
49
+ export const inboundSchema = BillsFilterStatus$inboundSchema;
50
+ /** @deprecated use `BillsFilterStatus$outboundSchema` instead. */
51
+ export const outboundSchema = BillsFilterStatus$outboundSchema;
52
+ }
53
+
15
54
  /** @internal */
16
55
  export const BillsFilter$inboundSchema: z.ZodType<
17
56
  BillsFilter,
@@ -21,6 +60,7 @@ export const BillsFilter$inboundSchema: z.ZodType<
21
60
  updated_since: z.string().datetime({ offset: true }).transform(v =>
22
61
  new Date(v)
23
62
  ).optional(),
63
+ status: BillsFilterStatus$inboundSchema.optional(),
24
64
  }).transform((v) => {
25
65
  return remap$(v, {
26
66
  "updated_since": "updatedSince",
@@ -30,6 +70,7 @@ export const BillsFilter$inboundSchema: z.ZodType<
30
70
  /** @internal */
31
71
  export type BillsFilter$Outbound = {
32
72
  updated_since?: string | undefined;
73
+ status?: string | undefined;
33
74
  };
34
75
 
35
76
  /** @internal */
@@ -39,6 +80,7 @@ export const BillsFilter$outboundSchema: z.ZodType<
39
80
  BillsFilter
40
81
  > = z.object({
41
82
  updatedSince: z.date().transform(v => v.toISOString()).optional(),
83
+ status: BillsFilterStatus$outboundSchema.optional(),
42
84
  }).transform((v) => {
43
85
  return remap$(v, {
44
86
  updatedSince: "updated_since",
@@ -50,6 +50,10 @@ export type Category = {
50
50
  * The name of the category.
51
51
  */
52
52
  name?: string | undefined;
53
+ /**
54
+ * Display ID of the category
55
+ */
56
+ displayId?: string | null | undefined;
53
57
  /**
54
58
  * The type of the category.
55
59
  */
@@ -136,6 +140,7 @@ export const Category$inboundSchema: z.ZodType<
136
140
  > = z.object({
137
141
  id: z.string().optional(),
138
142
  name: z.string().optional(),
143
+ display_id: z.nullable(z.string()).optional(),
139
144
  type: CategoryType$inboundSchema.optional(),
140
145
  status: CategoryStatus$inboundSchema.optional(),
141
146
  custom_mappings: z.nullable(z.record(z.any())).optional(),
@@ -151,6 +156,7 @@ export const Category$inboundSchema: z.ZodType<
151
156
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
152
157
  }).transform((v) => {
153
158
  return remap$(v, {
159
+ "display_id": "displayId",
154
160
  "custom_mappings": "customMappings",
155
161
  "row_version": "rowVersion",
156
162
  "updated_by": "updatedBy",
@@ -165,6 +171,7 @@ export const Category$inboundSchema: z.ZodType<
165
171
  export type Category$Outbound = {
166
172
  id?: string | undefined;
167
173
  name?: string | undefined;
174
+ display_id?: string | null | undefined;
168
175
  type?: string | undefined;
169
176
  status?: string | undefined;
170
177
  custom_mappings?: { [k: string]: any } | null | undefined;
@@ -184,6 +191,7 @@ export const Category$outboundSchema: z.ZodType<
184
191
  > = z.object({
185
192
  id: z.string().optional(),
186
193
  name: z.string().optional(),
194
+ displayId: z.nullable(z.string()).optional(),
187
195
  type: CategoryType$outboundSchema.optional(),
188
196
  status: CategoryStatus$outboundSchema.optional(),
189
197
  customMappings: z.nullable(z.record(z.any())).optional(),
@@ -195,6 +203,7 @@ export const Category$outboundSchema: z.ZodType<
195
203
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
196
204
  }).transform((v) => {
197
205
  return remap$(v, {
206
+ displayId: "display_id",
198
207
  customMappings: "custom_mappings",
199
208
  rowVersion: "row_version",
200
209
  updatedBy: "updated_by",
@@ -134,6 +134,20 @@ export type Configuration = {
134
134
  defaults?: Array<Defaults> | undefined;
135
135
  };
136
136
 
137
+ /**
138
+ * Operational health status of the connection
139
+ */
140
+ export const Health = {
141
+ MissingSettings: "missing_settings",
142
+ NeedsAuth: "needs_auth",
143
+ PendingRefresh: "pending_refresh",
144
+ Ok: "ok",
145
+ } as const;
146
+ /**
147
+ * Operational health status of the connection
148
+ */
149
+ export type Health = ClosedEnum<typeof Health>;
150
+
137
151
  export type Connection = {
138
152
  /**
139
153
  * The unique identifier of the connection.
@@ -223,7 +237,6 @@ export type Connection = {
223
237
  * Whether the connector has a guide available in the developer docs or not (https://docs.apideck.com/connectors/{service_id}/docs/consumer+connection).
224
238
  */
225
239
  hasGuide?: boolean | undefined;
226
- createdAt?: number | undefined;
227
240
  /**
228
241
  * List of custom mappings configured for this connection
229
242
  */
@@ -238,6 +251,19 @@ export type Connection = {
238
251
  consents?: Array<ConsentRecord> | undefined;
239
252
  latestConsent?: ConsentRecord | undefined;
240
253
  applicationDataScopes?: DataScopes | undefined;
254
+ /**
255
+ * Operational health status of the connection
256
+ */
257
+ health?: Health | undefined;
258
+ /**
259
+ * Unix timestamp in milliseconds when credentials will be deleted if token refresh continues to fail. A value of 0 indicates no active retention window (connection is healthy or not using OAuth token refresh).
260
+ */
261
+ credentialsExpireAt?: number | undefined;
262
+ /**
263
+ * Unix timestamp in milliseconds of the last failed token refresh attempt. A value of 0 indicates no recent failures. This field is used internally to enforce cooldown periods between retry attempts.
264
+ */
265
+ lastRefreshFailedAt?: number | undefined;
266
+ createdAt?: number | undefined;
241
267
  updatedAt?: number | null | undefined;
242
268
  };
243
269
 
@@ -565,6 +591,25 @@ export function configurationFromJSON(
565
591
  );
566
592
  }
567
593
 
594
+ /** @internal */
595
+ export const Health$inboundSchema: z.ZodNativeEnum<typeof Health> = z
596
+ .nativeEnum(Health);
597
+
598
+ /** @internal */
599
+ export const Health$outboundSchema: z.ZodNativeEnum<typeof Health> =
600
+ Health$inboundSchema;
601
+
602
+ /**
603
+ * @internal
604
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
605
+ */
606
+ export namespace Health$ {
607
+ /** @deprecated use `Health$inboundSchema` instead. */
608
+ export const inboundSchema = Health$inboundSchema;
609
+ /** @deprecated use `Health$outboundSchema` instead. */
610
+ export const outboundSchema = Health$outboundSchema;
611
+ }
612
+
568
613
  /** @internal */
569
614
  export const Connection$inboundSchema: z.ZodType<
570
615
  Connection,
@@ -599,12 +644,15 @@ export const Connection$inboundSchema: z.ZodType<
599
644
  settings_required_for_authorization: z.array(z.string()).optional(),
600
645
  subscriptions: z.array(WebhookSubscription$inboundSchema).optional(),
601
646
  has_guide: z.boolean().optional(),
602
- created_at: z.number().optional(),
603
647
  custom_mappings: z.array(CustomMapping$inboundSchema).optional(),
604
648
  consent_state: ConsentState$inboundSchema.optional(),
605
649
  consents: z.array(ConsentRecord$inboundSchema).optional(),
606
650
  latest_consent: ConsentRecord$inboundSchema.optional(),
607
651
  application_data_scopes: DataScopes$inboundSchema.optional(),
652
+ health: Health$inboundSchema.optional(),
653
+ credentials_expire_at: z.number().optional(),
654
+ last_refresh_failed_at: z.number().optional(),
655
+ created_at: z.number().optional(),
608
656
  updated_at: z.nullable(z.number()).optional(),
609
657
  }).transform((v) => {
610
658
  return remap$(v, {
@@ -624,11 +672,13 @@ export const Connection$inboundSchema: z.ZodType<
624
672
  "schema_support": "schemaSupport",
625
673
  "settings_required_for_authorization": "settingsRequiredForAuthorization",
626
674
  "has_guide": "hasGuide",
627
- "created_at": "createdAt",
628
675
  "custom_mappings": "customMappings",
629
676
  "consent_state": "consentState",
630
677
  "latest_consent": "latestConsent",
631
678
  "application_data_scopes": "applicationDataScopes",
679
+ "credentials_expire_at": "credentialsExpireAt",
680
+ "last_refresh_failed_at": "lastRefreshFailedAt",
681
+ "created_at": "createdAt",
632
682
  "updated_at": "updatedAt",
633
683
  });
634
684
  });
@@ -663,12 +713,15 @@ export type Connection$Outbound = {
663
713
  settings_required_for_authorization?: Array<string> | undefined;
664
714
  subscriptions?: Array<WebhookSubscription$Outbound> | undefined;
665
715
  has_guide?: boolean | undefined;
666
- created_at?: number | undefined;
667
716
  custom_mappings?: Array<CustomMapping$Outbound> | undefined;
668
717
  consent_state?: string | undefined;
669
718
  consents?: Array<ConsentRecord$Outbound> | undefined;
670
719
  latest_consent?: ConsentRecord$Outbound | undefined;
671
720
  application_data_scopes?: DataScopes$Outbound | undefined;
721
+ health?: string | undefined;
722
+ credentials_expire_at?: number | undefined;
723
+ last_refresh_failed_at?: number | undefined;
724
+ created_at?: number | undefined;
672
725
  updated_at?: number | null | undefined;
673
726
  };
674
727
 
@@ -706,12 +759,15 @@ export const Connection$outboundSchema: z.ZodType<
706
759
  settingsRequiredForAuthorization: z.array(z.string()).optional(),
707
760
  subscriptions: z.array(WebhookSubscription$outboundSchema).optional(),
708
761
  hasGuide: z.boolean().optional(),
709
- createdAt: z.number().optional(),
710
762
  customMappings: z.array(CustomMapping$outboundSchema).optional(),
711
763
  consentState: ConsentState$outboundSchema.optional(),
712
764
  consents: z.array(ConsentRecord$outboundSchema).optional(),
713
765
  latestConsent: ConsentRecord$outboundSchema.optional(),
714
766
  applicationDataScopes: DataScopes$outboundSchema.optional(),
767
+ health: Health$outboundSchema.optional(),
768
+ credentialsExpireAt: z.number().optional(),
769
+ lastRefreshFailedAt: z.number().optional(),
770
+ createdAt: z.number().optional(),
715
771
  updatedAt: z.nullable(z.number()).optional(),
716
772
  }).transform((v) => {
717
773
  return remap$(v, {
@@ -731,11 +787,13 @@ export const Connection$outboundSchema: z.ZodType<
731
787
  schemaSupport: "schema_support",
732
788
  settingsRequiredForAuthorization: "settings_required_for_authorization",
733
789
  hasGuide: "has_guide",
734
- createdAt: "created_at",
735
790
  customMappings: "custom_mappings",
736
791
  consentState: "consent_state",
737
792
  latestConsent: "latest_consent",
738
793
  applicationDataScopes: "application_data_scopes",
794
+ credentialsExpireAt: "credentials_expire_at",
795
+ lastRefreshFailedAt: "last_refresh_failed_at",
796
+ createdAt: "created_at",
739
797
  updatedAt: "updated_at",
740
798
  });
741
799
  });
@@ -66,6 +66,7 @@ export const EcommerceOrderPaymentStatus = {
66
66
  Refunded: "refunded",
67
67
  Voided: "voided",
68
68
  Unknown: "unknown",
69
+ PartiallyRefunded: "partially_refunded",
69
70
  } as const;
70
71
  /**
71
72
  * Current payment status of the order.
@@ -111,6 +111,10 @@ export type InvoiceItem = {
111
111
  * A short description of the item
112
112
  */
113
113
  description?: string | null | undefined;
114
+ /**
115
+ * Display ID of the item
116
+ */
117
+ displayId?: string | null | undefined;
114
118
  /**
115
119
  * User defined item code
116
120
  */
@@ -240,6 +244,10 @@ export type InvoiceItemInput = {
240
244
  * A short description of the item
241
245
  */
242
246
  description?: string | null | undefined;
247
+ /**
248
+ * Display ID of the item
249
+ */
250
+ displayId?: string | null | undefined;
243
251
  /**
244
252
  * User defined item code
245
253
  */
@@ -492,6 +500,7 @@ export const InvoiceItem$inboundSchema: z.ZodType<
492
500
  id: z.string().optional(),
493
501
  name: z.nullable(z.string()).optional(),
494
502
  description: z.nullable(z.string()).optional(),
503
+ display_id: z.nullable(z.string()).optional(),
495
504
  code: z.nullable(z.string()).optional(),
496
505
  sold: z.nullable(z.boolean()).optional(),
497
506
  purchased: z.nullable(z.boolean()).optional(),
@@ -531,6 +540,7 @@ export const InvoiceItem$inboundSchema: z.ZodType<
531
540
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
532
541
  }).transform((v) => {
533
542
  return remap$(v, {
543
+ "display_id": "displayId",
534
544
  "inventory_date": "inventoryDate",
535
545
  "sales_details": "salesDetails",
536
546
  "purchase_details": "purchaseDetails",
@@ -559,6 +569,7 @@ export type InvoiceItem$Outbound = {
559
569
  id?: string | undefined;
560
570
  name?: string | null | undefined;
561
571
  description?: string | null | undefined;
572
+ display_id?: string | null | undefined;
562
573
  code?: string | null | undefined;
563
574
  sold?: boolean | null | undefined;
564
575
  purchased?: boolean | null | undefined;
@@ -605,6 +616,7 @@ export const InvoiceItem$outboundSchema: z.ZodType<
605
616
  id: z.string().optional(),
606
617
  name: z.nullable(z.string()).optional(),
607
618
  description: z.nullable(z.string()).optional(),
619
+ displayId: z.nullable(z.string()).optional(),
608
620
  code: z.nullable(z.string()).optional(),
609
621
  sold: z.nullable(z.boolean()).optional(),
610
622
  purchased: z.nullable(z.boolean()).optional(),
@@ -640,6 +652,7 @@ export const InvoiceItem$outboundSchema: z.ZodType<
640
652
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
641
653
  }).transform((v) => {
642
654
  return remap$(v, {
655
+ displayId: "display_id",
643
656
  inventoryDate: "inventory_date",
644
657
  salesDetails: "sales_details",
645
658
  purchaseDetails: "purchase_details",
@@ -852,6 +865,7 @@ export const InvoiceItemInput$inboundSchema: z.ZodType<
852
865
  > = z.object({
853
866
  name: z.nullable(z.string()).optional(),
854
867
  description: z.nullable(z.string()).optional(),
868
+ display_id: z.nullable(z.string()).optional(),
855
869
  code: z.nullable(z.string()).optional(),
856
870
  sold: z.nullable(z.boolean()).optional(),
857
871
  purchased: z.nullable(z.boolean()).optional(),
@@ -884,6 +898,7 @@ export const InvoiceItemInput$inboundSchema: z.ZodType<
884
898
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
885
899
  }).transform((v) => {
886
900
  return remap$(v, {
901
+ "display_id": "displayId",
887
902
  "inventory_date": "inventoryDate",
888
903
  "sales_details": "salesDetails",
889
904
  "purchase_details": "purchaseDetails",
@@ -906,6 +921,7 @@ export const InvoiceItemInput$inboundSchema: z.ZodType<
906
921
  export type InvoiceItemInput$Outbound = {
907
922
  name?: string | null | undefined;
908
923
  description?: string | null | undefined;
924
+ display_id?: string | null | undefined;
909
925
  code?: string | null | undefined;
910
926
  sold?: boolean | null | undefined;
911
927
  purchased?: boolean | null | undefined;
@@ -946,6 +962,7 @@ export const InvoiceItemInput$outboundSchema: z.ZodType<
946
962
  > = z.object({
947
963
  name: z.nullable(z.string()).optional(),
948
964
  description: z.nullable(z.string()).optional(),
965
+ displayId: z.nullable(z.string()).optional(),
949
966
  code: z.nullable(z.string()).optional(),
950
967
  sold: z.nullable(z.boolean()).optional(),
951
968
  purchased: z.nullable(z.boolean()).optional(),
@@ -978,6 +995,7 @@ export const InvoiceItemInput$outboundSchema: z.ZodType<
978
995
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
979
996
  }).transform((v) => {
980
997
  return remap$(v, {
998
+ displayId: "display_id",
981
999
  inventoryDate: "inventory_date",
982
1000
  salesDetails: "sales_details",
983
1001
  purchaseDetails: "purchase_details",
@@ -69,6 +69,10 @@ export type JournalEntry = {
69
69
  * The third-party API ID of original entity
70
70
  */
71
71
  downstreamId?: string | null | undefined;
72
+ /**
73
+ * Display ID of the journal entry
74
+ */
75
+ displayId?: string | null | undefined;
72
76
  /**
73
77
  * Journal entry title
74
78
  */
@@ -169,6 +173,10 @@ export type JournalEntry = {
169
173
  };
170
174
 
171
175
  export type JournalEntryInput = {
176
+ /**
177
+ * Display ID of the journal entry
178
+ */
179
+ displayId?: string | null | undefined;
172
180
  /**
173
181
  * Journal entry title
174
182
  */
@@ -277,6 +285,7 @@ export const JournalEntry$inboundSchema: z.ZodType<
277
285
  > = z.object({
278
286
  id: z.string().optional(),
279
287
  downstream_id: z.nullable(z.string()).optional(),
288
+ display_id: z.nullable(z.string()).optional(),
280
289
  title: z.nullable(z.string()).optional(),
281
290
  currency_rate: z.nullable(z.number()).optional(),
282
291
  currency: z.nullable(Currency$inboundSchema).optional(),
@@ -312,6 +321,7 @@ export const JournalEntry$inboundSchema: z.ZodType<
312
321
  }).transform((v) => {
313
322
  return remap$(v, {
314
323
  "downstream_id": "downstreamId",
324
+ "display_id": "displayId",
315
325
  "currency_rate": "currencyRate",
316
326
  "company_id": "companyId",
317
327
  "line_items": "lineItems",
@@ -339,6 +349,7 @@ export const JournalEntry$inboundSchema: z.ZodType<
339
349
  export type JournalEntry$Outbound = {
340
350
  id?: string | undefined;
341
351
  downstream_id?: string | null | undefined;
352
+ display_id?: string | null | undefined;
342
353
  title?: string | null | undefined;
343
354
  currency_rate?: number | null | undefined;
344
355
  currency?: string | null | undefined;
@@ -377,6 +388,7 @@ export const JournalEntry$outboundSchema: z.ZodType<
377
388
  > = z.object({
378
389
  id: z.string().optional(),
379
390
  downstreamId: z.nullable(z.string()).optional(),
391
+ displayId: z.nullable(z.string()).optional(),
380
392
  title: z.nullable(z.string()).optional(),
381
393
  currencyRate: z.nullable(z.number()).optional(),
382
394
  currency: z.nullable(Currency$outboundSchema).optional(),
@@ -407,6 +419,7 @@ export const JournalEntry$outboundSchema: z.ZodType<
407
419
  }).transform((v) => {
408
420
  return remap$(v, {
409
421
  downstreamId: "downstream_id",
422
+ displayId: "display_id",
410
423
  currencyRate: "currency_rate",
411
424
  companyId: "company_id",
412
425
  lineItems: "line_items",
@@ -463,6 +476,7 @@ export const JournalEntryInput$inboundSchema: z.ZodType<
463
476
  z.ZodTypeDef,
464
477
  unknown
465
478
  > = z.object({
479
+ display_id: z.nullable(z.string()).optional(),
466
480
  title: z.nullable(z.string()).optional(),
467
481
  currency_rate: z.nullable(z.number()).optional(),
468
482
  currency: z.nullable(Currency$inboundSchema).optional(),
@@ -488,6 +502,7 @@ export const JournalEntryInput$inboundSchema: z.ZodType<
488
502
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
489
503
  }).transform((v) => {
490
504
  return remap$(v, {
505
+ "display_id": "displayId",
491
506
  "currency_rate": "currencyRate",
492
507
  "company_id": "companyId",
493
508
  "line_items": "lineItems",
@@ -508,6 +523,7 @@ export const JournalEntryInput$inboundSchema: z.ZodType<
508
523
 
509
524
  /** @internal */
510
525
  export type JournalEntryInput$Outbound = {
526
+ display_id?: string | null | undefined;
511
527
  title?: string | null | undefined;
512
528
  currency_rate?: number | null | undefined;
513
529
  currency?: string | null | undefined;
@@ -539,6 +555,7 @@ export const JournalEntryInput$outboundSchema: z.ZodType<
539
555
  z.ZodTypeDef,
540
556
  JournalEntryInput
541
557
  > = z.object({
558
+ displayId: z.nullable(z.string()).optional(),
542
559
  title: z.nullable(z.string()).optional(),
543
560
  currencyRate: z.nullable(z.number()).optional(),
544
561
  currency: z.nullable(Currency$outboundSchema).optional(),
@@ -563,6 +580,7 @@ export const JournalEntryInput$outboundSchema: z.ZodType<
563
580
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
564
581
  }).transform((v) => {
565
582
  return remap$(v, {
583
+ displayId: "display_id",
566
584
  currencyRate: "currency_rate",
567
585
  companyId: "company_id",
568
586
  lineItems: "line_items",
@@ -114,6 +114,10 @@ export type PurchaseOrder = {
114
114
  * The third-party API ID of original entity
115
115
  */
116
116
  downstreamId?: string | null | undefined;
117
+ /**
118
+ * Display ID of the purchase order
119
+ */
120
+ displayId?: string | null | undefined;
117
121
  /**
118
122
  * A PO Number uniquely identifies a purchase order and is generally defined by the buyer.
119
123
  */
@@ -272,6 +276,10 @@ export type PurchaseOrder = {
272
276
  };
273
277
 
274
278
  export type PurchaseOrderInput = {
279
+ /**
280
+ * Display ID of the purchase order
281
+ */
282
+ displayId?: string | null | undefined;
275
283
  /**
276
284
  * A PO Number uniquely identifies a purchase order and is generally defined by the buyer.
277
285
  */
@@ -459,6 +467,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
459
467
  > = z.object({
460
468
  id: z.string().optional(),
461
469
  downstream_id: z.nullable(z.string()).optional(),
470
+ display_id: z.nullable(z.string()).optional(),
462
471
  po_number: z.nullable(z.string()).optional(),
463
472
  reference: z.nullable(z.string()).optional(),
464
473
  supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
@@ -515,6 +524,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
515
524
  }).transform((v) => {
516
525
  return remap$(v, {
517
526
  "downstream_id": "downstreamId",
527
+ "display_id": "displayId",
518
528
  "po_number": "poNumber",
519
529
  "subsidiary_id": "subsidiaryId",
520
530
  "company_id": "companyId",
@@ -557,6 +567,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
557
567
  export type PurchaseOrder$Outbound = {
558
568
  id?: string | undefined;
559
569
  downstream_id?: string | null | undefined;
570
+ display_id?: string | null | undefined;
560
571
  po_number?: string | null | undefined;
561
572
  reference?: string | null | undefined;
562
573
  supplier?: LinkedSupplier$Outbound | null | undefined;
@@ -614,6 +625,7 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
614
625
  > = z.object({
615
626
  id: z.string().optional(),
616
627
  downstreamId: z.nullable(z.string()).optional(),
628
+ displayId: z.nullable(z.string()).optional(),
617
629
  poNumber: z.nullable(z.string()).optional(),
618
630
  reference: z.nullable(z.string()).optional(),
619
631
  supplier: z.nullable(LinkedSupplier$outboundSchema).optional(),
@@ -669,6 +681,7 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
669
681
  }).transform((v) => {
670
682
  return remap$(v, {
671
683
  downstreamId: "downstream_id",
684
+ displayId: "display_id",
672
685
  poNumber: "po_number",
673
686
  subsidiaryId: "subsidiary_id",
674
687
  companyId: "company_id",
@@ -740,6 +753,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
740
753
  z.ZodTypeDef,
741
754
  unknown
742
755
  > = z.object({
756
+ display_id: z.nullable(z.string()).optional(),
743
757
  po_number: z.nullable(z.string()).optional(),
744
758
  reference: z.nullable(z.string()).optional(),
745
759
  supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(),
@@ -786,6 +800,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
786
800
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
787
801
  }).transform((v) => {
788
802
  return remap$(v, {
803
+ "display_id": "displayId",
789
804
  "po_number": "poNumber",
790
805
  "subsidiary_id": "subsidiaryId",
791
806
  "company_id": "companyId",
@@ -821,6 +836,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
821
836
 
822
837
  /** @internal */
823
838
  export type PurchaseOrderInput$Outbound = {
839
+ display_id?: string | null | undefined;
824
840
  po_number?: string | null | undefined;
825
841
  reference?: string | null | undefined;
826
842
  supplier?: LinkedSupplierInput$Outbound | null | undefined;
@@ -871,6 +887,7 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
871
887
  z.ZodTypeDef,
872
888
  PurchaseOrderInput
873
889
  > = z.object({
890
+ displayId: z.nullable(z.string()).optional(),
874
891
  poNumber: z.nullable(z.string()).optional(),
875
892
  reference: z.nullable(z.string()).optional(),
876
893
  supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
@@ -920,6 +937,7 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
920
937
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
921
938
  }).transform((v) => {
922
939
  return remap$(v, {
940
+ displayId: "display_id",
923
941
  poNumber: "po_number",
924
942
  subsidiaryId: "subsidiary_id",
925
943
  companyId: "company_id",
@@ -45,6 +45,10 @@ export type Subsidiary = {
45
45
  * The name of the company.
46
46
  */
47
47
  name?: string | null | undefined;
48
+ /**
49
+ * Display ID of the subsidiary
50
+ */
51
+ displayId?: string | null | undefined;
48
52
  /**
49
53
  * Based on the status some functionality is enabled or disabled.
50
54
  */
@@ -92,6 +96,10 @@ export type SubsidiaryInput = {
92
96
  * The name of the company.
93
97
  */
94
98
  name?: string | null | undefined;
99
+ /**
100
+ * Display ID of the subsidiary
101
+ */
102
+ displayId?: string | null | undefined;
95
103
  /**
96
104
  * Based on the status some functionality is enabled or disabled.
97
105
  */
@@ -140,6 +148,7 @@ export const Subsidiary$inboundSchema: z.ZodType<
140
148
  id: z.string().optional(),
141
149
  parent_id: z.nullable(z.string()).optional(),
142
150
  name: z.nullable(z.string()).optional(),
151
+ display_id: z.nullable(z.string()).optional(),
143
152
  status: SubsidiaryStatus$inboundSchema.optional(),
144
153
  currencies: z.nullable(z.array(z.nullable(Currency$inboundSchema)))
145
154
  .optional(),
@@ -157,6 +166,7 @@ export const Subsidiary$inboundSchema: z.ZodType<
157
166
  }).transform((v) => {
158
167
  return remap$(v, {
159
168
  "parent_id": "parentId",
169
+ "display_id": "displayId",
160
170
  "custom_mappings": "customMappings",
161
171
  "row_version": "rowVersion",
162
172
  "updated_by": "updatedBy",
@@ -172,6 +182,7 @@ export type Subsidiary$Outbound = {
172
182
  id?: string | undefined;
173
183
  parent_id?: string | null | undefined;
174
184
  name?: string | null | undefined;
185
+ display_id?: string | null | undefined;
175
186
  status?: string | undefined;
176
187
  currencies?: Array<string | null> | null | undefined;
177
188
  custom_mappings?: { [k: string]: any } | null | undefined;
@@ -192,6 +203,7 @@ export const Subsidiary$outboundSchema: z.ZodType<
192
203
  id: z.string().optional(),
193
204
  parentId: z.nullable(z.string()).optional(),
194
205
  name: z.nullable(z.string()).optional(),
206
+ displayId: z.nullable(z.string()).optional(),
195
207
  status: SubsidiaryStatus$outboundSchema.optional(),
196
208
  currencies: z.nullable(z.array(z.nullable(Currency$outboundSchema)))
197
209
  .optional(),
@@ -205,6 +217,7 @@ export const Subsidiary$outboundSchema: z.ZodType<
205
217
  }).transform((v) => {
206
218
  return remap$(v, {
207
219
  parentId: "parent_id",
220
+ displayId: "display_id",
208
221
  customMappings: "custom_mappings",
209
222
  rowVersion: "row_version",
210
223
  updatedBy: "updated_by",
@@ -250,6 +263,7 @@ export const SubsidiaryInput$inboundSchema: z.ZodType<
250
263
  > = z.object({
251
264
  parent_id: z.nullable(z.string()).optional(),
252
265
  name: z.nullable(z.string()).optional(),
266
+ display_id: z.nullable(z.string()).optional(),
253
267
  status: SubsidiaryStatus$inboundSchema.optional(),
254
268
  currencies: z.nullable(z.array(z.nullable(Currency$inboundSchema)))
255
269
  .optional(),
@@ -258,6 +272,7 @@ export const SubsidiaryInput$inboundSchema: z.ZodType<
258
272
  }).transform((v) => {
259
273
  return remap$(v, {
260
274
  "parent_id": "parentId",
275
+ "display_id": "displayId",
261
276
  "row_version": "rowVersion",
262
277
  "pass_through": "passThrough",
263
278
  });
@@ -267,6 +282,7 @@ export const SubsidiaryInput$inboundSchema: z.ZodType<
267
282
  export type SubsidiaryInput$Outbound = {
268
283
  parent_id?: string | null | undefined;
269
284
  name?: string | null | undefined;
285
+ display_id?: string | null | undefined;
270
286
  status?: string | undefined;
271
287
  currencies?: Array<string | null> | null | undefined;
272
288
  row_version?: string | null | undefined;
@@ -281,6 +297,7 @@ export const SubsidiaryInput$outboundSchema: z.ZodType<
281
297
  > = z.object({
282
298
  parentId: z.nullable(z.string()).optional(),
283
299
  name: z.nullable(z.string()).optional(),
300
+ displayId: z.nullable(z.string()).optional(),
284
301
  status: SubsidiaryStatus$outboundSchema.optional(),
285
302
  currencies: z.nullable(z.array(z.nullable(Currency$outboundSchema)))
286
303
  .optional(),
@@ -289,6 +306,7 @@ export const SubsidiaryInput$outboundSchema: z.ZodType<
289
306
  }).transform((v) => {
290
307
  return remap$(v, {
291
308
  parentId: "parent_id",
309
+ displayId: "display_id",
292
310
  rowVersion: "row_version",
293
311
  passThrough: "pass_through",
294
312
  });