@apideck/unify 0.29.2 → 0.29.4

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 (101) hide show
  1. package/docs/sdks/quotes/README.md +4 -0
  2. package/examples/accountingTaxRatesList.example.ts +1 -1
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +4 -4
  6. package/lib/config.js +4 -4
  7. package/lib/security.d.ts.map +1 -1
  8. package/lib/security.js.map +1 -1
  9. package/models/components/applicant.d.ts +74 -0
  10. package/models/components/applicant.d.ts.map +1 -1
  11. package/models/components/applicant.js +46 -1
  12. package/models/components/applicant.js.map +1 -1
  13. package/models/components/bill.d.ts +114 -2
  14. package/models/components/bill.d.ts.map +1 -1
  15. package/models/components/bill.js +87 -1
  16. package/models/components/bill.js.map +1 -1
  17. package/models/components/billlineitem.d.ts +91 -0
  18. package/models/components/billlineitem.d.ts.map +1 -1
  19. package/models/components/billlineitem.js +61 -0
  20. package/models/components/billlineitem.js.map +1 -1
  21. package/models/components/billpayment.d.ts +2 -2
  22. package/models/components/creditnote.d.ts +12 -2
  23. package/models/components/creditnote.d.ts.map +1 -1
  24. package/models/components/creditnote.js +8 -0
  25. package/models/components/creditnote.js.map +1 -1
  26. package/models/components/customer.d.ts +2 -2
  27. package/models/components/expense.d.ts +2 -2
  28. package/models/components/index.d.ts +2 -0
  29. package/models/components/index.d.ts.map +1 -1
  30. package/models/components/index.js +2 -0
  31. package/models/components/index.js.map +1 -1
  32. package/models/components/invoice.d.ts +22 -2
  33. package/models/components/invoice.d.ts.map +1 -1
  34. package/models/components/invoice.js +16 -0
  35. package/models/components/invoice.js.map +1 -1
  36. package/models/components/invoicelineitem.d.ts +7 -50
  37. package/models/components/invoicelineitem.d.ts.map +1 -1
  38. package/models/components/invoicelineitem.js +6 -37
  39. package/models/components/invoicelineitem.js.map +1 -1
  40. package/models/components/jobstatus.d.ts +3 -0
  41. package/models/components/jobstatus.d.ts.map +1 -1
  42. package/models/components/jobstatus.js +1 -0
  43. package/models/components/jobstatus.js.map +1 -1
  44. package/models/components/journalentry.d.ts +2 -2
  45. package/models/components/linkedattachment.d.ts +57 -0
  46. package/models/components/linkedattachment.d.ts.map +1 -0
  47. package/models/components/linkedattachment.js +90 -0
  48. package/models/components/linkedattachment.js.map +1 -0
  49. package/models/components/linkedworktag.d.ts +37 -0
  50. package/models/components/linkedworktag.d.ts.map +1 -0
  51. package/models/components/linkedworktag.js +71 -0
  52. package/models/components/linkedworktag.js.map +1 -0
  53. package/models/components/payment.d.ts +1 -1
  54. package/models/components/paymentinput.d.ts +1 -1
  55. package/models/components/phonenumber.d.ts +3 -0
  56. package/models/components/phonenumber.d.ts.map +1 -1
  57. package/models/components/phonenumber.js +1 -0
  58. package/models/components/phonenumber.js.map +1 -1
  59. package/models/components/purchaseorder.d.ts +21 -11
  60. package/models/components/purchaseorder.d.ts.map +1 -1
  61. package/models/components/purchaseorder.js +27 -15
  62. package/models/components/purchaseorder.js.map +1 -1
  63. package/models/components/quote.d.ts +12 -2
  64. package/models/components/quote.d.ts.map +1 -1
  65. package/models/components/quote.js +8 -0
  66. package/models/components/quote.js.map +1 -1
  67. package/models/components/subsidiary.d.ts +11 -0
  68. package/models/components/subsidiary.d.ts.map +1 -1
  69. package/models/components/subsidiary.js +9 -0
  70. package/models/components/subsidiary.js.map +1 -1
  71. package/models/components/supplier.d.ts +2 -2
  72. package/models/components/webhookeventtype.d.ts +3 -0
  73. package/models/components/webhookeventtype.d.ts.map +1 -1
  74. package/models/components/webhookeventtype.js +1 -0
  75. package/models/components/webhookeventtype.js.map +1 -1
  76. package/package.json +1 -1
  77. package/src/__tests__/quotes.test.ts +3 -0
  78. package/src/lib/config.ts +4 -4
  79. package/src/lib/security.ts +4 -1
  80. package/src/models/components/applicant.ts +90 -0
  81. package/src/models/components/bill.ts +178 -2
  82. package/src/models/components/billlineitem.ts +156 -0
  83. package/src/models/components/billpayment.ts +2 -2
  84. package/src/models/components/creditnote.ts +20 -2
  85. package/src/models/components/customer.ts +2 -2
  86. package/src/models/components/expense.ts +2 -2
  87. package/src/models/components/index.ts +2 -0
  88. package/src/models/components/invoice.ts +38 -2
  89. package/src/models/components/invoicelineitem.ts +16 -60
  90. package/src/models/components/jobstatus.ts +1 -0
  91. package/src/models/components/journalentry.ts +2 -2
  92. package/src/models/components/linkedattachment.ts +115 -0
  93. package/src/models/components/linkedworktag.ts +72 -0
  94. package/src/models/components/payment.ts +1 -1
  95. package/src/models/components/paymentinput.ts +1 -1
  96. package/src/models/components/phonenumber.ts +1 -0
  97. package/src/models/components/purchaseorder.ts +45 -21
  98. package/src/models/components/quote.ts +20 -2
  99. package/src/models/components/subsidiary.ts +23 -0
  100. package/src/models/components/supplier.ts +2 -2
  101. package/src/models/components/webhookeventtype.ts +1 -0
@@ -105,9 +105,13 @@ export type Quote = {
105
105
  */
106
106
  salesOrderId?: string | null | undefined;
107
107
  /**
108
- * The company or subsidiary id the transaction belongs to
108
+ * The company ID the transaction belongs to
109
109
  */
110
110
  companyId?: string | null | undefined;
111
+ /**
112
+ * The ID of the department
113
+ */
114
+ departmentId?: string | null | undefined;
111
115
  /**
112
116
  * The unique identifier for the linked project.
113
117
  */
@@ -228,9 +232,13 @@ export type QuoteInput = {
228
232
  */
229
233
  salesOrderId?: string | null | undefined;
230
234
  /**
231
- * The company or subsidiary id the transaction belongs to
235
+ * The company ID the transaction belongs to
232
236
  */
233
237
  companyId?: string | null | undefined;
238
+ /**
239
+ * The ID of the department
240
+ */
241
+ departmentId?: string | null | undefined;
234
242
  /**
235
243
  * The unique identifier for the linked project.
236
244
  */
@@ -350,6 +358,7 @@ export const Quote$inboundSchema: z.ZodType<Quote, z.ZodTypeDef, unknown> = z
350
358
  invoice_id: z.string().optional(),
351
359
  sales_order_id: z.nullable(z.string()).optional(),
352
360
  company_id: z.nullable(z.string()).optional(),
361
+ department_id: z.nullable(z.string()).optional(),
353
362
  project_id: z.string().optional(),
354
363
  quote_date: z.nullable(z.string().transform(v => new RFCDate(v)))
355
364
  .optional(),
@@ -393,6 +402,7 @@ export const Quote$inboundSchema: z.ZodType<Quote, z.ZodTypeDef, unknown> = z
393
402
  "invoice_id": "invoiceId",
394
403
  "sales_order_id": "salesOrderId",
395
404
  "company_id": "companyId",
405
+ "department_id": "departmentId",
396
406
  "project_id": "projectId",
397
407
  "quote_date": "quoteDate",
398
408
  "expiry_date": "expiryDate",
@@ -429,6 +439,7 @@ export type Quote$Outbound = {
429
439
  invoice_id?: string | undefined;
430
440
  sales_order_id?: string | null | undefined;
431
441
  company_id?: string | null | undefined;
442
+ department_id?: string | null | undefined;
432
443
  project_id?: string | undefined;
433
444
  quote_date?: string | null | undefined;
434
445
  expiry_date?: string | null | undefined;
@@ -476,6 +487,7 @@ export const Quote$outboundSchema: z.ZodType<
476
487
  invoiceId: z.string().optional(),
477
488
  salesOrderId: z.nullable(z.string()).optional(),
478
489
  companyId: z.nullable(z.string()).optional(),
490
+ departmentId: z.nullable(z.string()).optional(),
479
491
  projectId: z.string().optional(),
480
492
  quoteDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
481
493
  .optional(),
@@ -515,6 +527,7 @@ export const Quote$outboundSchema: z.ZodType<
515
527
  invoiceId: "invoice_id",
516
528
  salesOrderId: "sales_order_id",
517
529
  companyId: "company_id",
530
+ departmentId: "department_id",
518
531
  projectId: "project_id",
519
532
  quoteDate: "quote_date",
520
533
  expiryDate: "expiry_date",
@@ -579,6 +592,7 @@ export const QuoteInput$inboundSchema: z.ZodType<
579
592
  customer: z.nullable(LinkedCustomerInput$inboundSchema).optional(),
580
593
  sales_order_id: z.nullable(z.string()).optional(),
581
594
  company_id: z.nullable(z.string()).optional(),
595
+ department_id: z.nullable(z.string()).optional(),
582
596
  project_id: z.string().optional(),
583
597
  quote_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
584
598
  expiry_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
@@ -610,6 +624,7 @@ export const QuoteInput$inboundSchema: z.ZodType<
610
624
  return remap$(v, {
611
625
  "sales_order_id": "salesOrderId",
612
626
  "company_id": "companyId",
627
+ "department_id": "departmentId",
613
628
  "project_id": "projectId",
614
629
  "quote_date": "quoteDate",
615
630
  "expiry_date": "expiryDate",
@@ -639,6 +654,7 @@ export type QuoteInput$Outbound = {
639
654
  customer?: LinkedCustomerInput$Outbound | null | undefined;
640
655
  sales_order_id?: string | null | undefined;
641
656
  company_id?: string | null | undefined;
657
+ department_id?: string | null | undefined;
642
658
  project_id?: string | undefined;
643
659
  quote_date?: string | null | undefined;
644
660
  expiry_date?: string | null | undefined;
@@ -679,6 +695,7 @@ export const QuoteInput$outboundSchema: z.ZodType<
679
695
  customer: z.nullable(LinkedCustomerInput$outboundSchema).optional(),
680
696
  salesOrderId: z.nullable(z.string()).optional(),
681
697
  companyId: z.nullable(z.string()).optional(),
698
+ departmentId: z.nullable(z.string()).optional(),
682
699
  projectId: z.string().optional(),
683
700
  quoteDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
684
701
  .optional(),
@@ -712,6 +729,7 @@ export const QuoteInput$outboundSchema: z.ZodType<
712
729
  return remap$(v, {
713
730
  salesOrderId: "sales_order_id",
714
731
  companyId: "company_id",
732
+ departmentId: "department_id",
715
733
  projectId: "project_id",
716
734
  quoteDate: "quote_date",
717
735
  expiryDate: "expiry_date",
@@ -8,6 +8,11 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Currency,
13
+ Currency$inboundSchema,
14
+ Currency$outboundSchema,
15
+ } from "./currency.js";
11
16
  import {
12
17
  PassThroughBody,
13
18
  PassThroughBody$inboundSchema,
@@ -44,6 +49,10 @@ export type Subsidiary = {
44
49
  * Based on the status some functionality is enabled or disabled.
45
50
  */
46
51
  status?: SubsidiaryStatus | undefined;
52
+ /**
53
+ * List of currencies supported by this subsidiary
54
+ */
55
+ currencies?: Array<Currency | null> | null | undefined;
47
56
  /**
48
57
  * When custom mappings are configured on the resource, the result is included here.
49
58
  */
@@ -87,6 +96,10 @@ export type SubsidiaryInput = {
87
96
  * Based on the status some functionality is enabled or disabled.
88
97
  */
89
98
  status?: SubsidiaryStatus | undefined;
99
+ /**
100
+ * List of currencies supported by this subsidiary
101
+ */
102
+ currencies?: Array<Currency | null> | null | undefined;
90
103
  /**
91
104
  * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
92
105
  */
@@ -128,6 +141,8 @@ export const Subsidiary$inboundSchema: z.ZodType<
128
141
  parent_id: z.nullable(z.string()).optional(),
129
142
  name: z.nullable(z.string()).optional(),
130
143
  status: SubsidiaryStatus$inboundSchema.optional(),
144
+ currencies: z.nullable(z.array(z.nullable(Currency$inboundSchema)))
145
+ .optional(),
131
146
  custom_mappings: z.nullable(z.record(z.any())).optional(),
132
147
  row_version: z.nullable(z.string()).optional(),
133
148
  updated_by: z.nullable(z.string()).optional(),
@@ -158,6 +173,7 @@ export type Subsidiary$Outbound = {
158
173
  parent_id?: string | null | undefined;
159
174
  name?: string | null | undefined;
160
175
  status?: string | undefined;
176
+ currencies?: Array<string | null> | null | undefined;
161
177
  custom_mappings?: { [k: string]: any } | null | undefined;
162
178
  row_version?: string | null | undefined;
163
179
  updated_by?: string | null | undefined;
@@ -177,6 +193,8 @@ export const Subsidiary$outboundSchema: z.ZodType<
177
193
  parentId: z.nullable(z.string()).optional(),
178
194
  name: z.nullable(z.string()).optional(),
179
195
  status: SubsidiaryStatus$outboundSchema.optional(),
196
+ currencies: z.nullable(z.array(z.nullable(Currency$outboundSchema)))
197
+ .optional(),
180
198
  customMappings: z.nullable(z.record(z.any())).optional(),
181
199
  rowVersion: z.nullable(z.string()).optional(),
182
200
  updatedBy: z.nullable(z.string()).optional(),
@@ -233,6 +251,8 @@ export const SubsidiaryInput$inboundSchema: z.ZodType<
233
251
  parent_id: z.nullable(z.string()).optional(),
234
252
  name: z.nullable(z.string()).optional(),
235
253
  status: SubsidiaryStatus$inboundSchema.optional(),
254
+ currencies: z.nullable(z.array(z.nullable(Currency$inboundSchema)))
255
+ .optional(),
236
256
  row_version: z.nullable(z.string()).optional(),
237
257
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
238
258
  }).transform((v) => {
@@ -248,6 +268,7 @@ export type SubsidiaryInput$Outbound = {
248
268
  parent_id?: string | null | undefined;
249
269
  name?: string | null | undefined;
250
270
  status?: string | undefined;
271
+ currencies?: Array<string | null> | null | undefined;
251
272
  row_version?: string | null | undefined;
252
273
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
253
274
  };
@@ -261,6 +282,8 @@ export const SubsidiaryInput$outboundSchema: z.ZodType<
261
282
  parentId: z.nullable(z.string()).optional(),
262
283
  name: z.nullable(z.string()).optional(),
263
284
  status: SubsidiaryStatus$outboundSchema.optional(),
285
+ currencies: z.nullable(z.array(z.nullable(Currency$outboundSchema)))
286
+ .optional(),
264
287
  rowVersion: z.nullable(z.string()).optional(),
265
288
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
266
289
  }).transform((v) => {
@@ -117,7 +117,7 @@ export type Supplier = {
117
117
  */
118
118
  companyName?: string | null | undefined;
119
119
  /**
120
- * The company or subsidiary id the transaction belongs to
120
+ * The company ID the transaction belongs to
121
121
  */
122
122
  companyId?: string | null | undefined;
123
123
  /**
@@ -226,7 +226,7 @@ export type SupplierInput = {
226
226
  */
227
227
  companyName?: string | null | undefined;
228
228
  /**
229
- * The company or subsidiary id the transaction belongs to
229
+ * The company ID the transaction belongs to
230
230
  */
231
231
  companyId?: string | null | undefined;
232
232
  /**
@@ -105,6 +105,7 @@ export const WebhookEventType = {
105
105
  FileStorageFileCreated: "file-storage.file.created",
106
106
  FileStorageFileUpdated: "file-storage.file.updated",
107
107
  FileStorageFileDeleted: "file-storage.file.deleted",
108
+ FileStorageDriveUpdated: "file-storage.drive.updated",
108
109
  IssueTrackingTicketCreated: "issue-tracking.ticket.created",
109
110
  IssueTrackingTicketUpdated: "issue-tracking.ticket.updated",
110
111
  IssueTrackingTicketDeleted: "issue-tracking.ticket.deleted",