@apideck/unify 0.13.1 → 0.13.3

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 (166) hide show
  1. package/README.md +0 -13
  2. package/docs/sdks/ageddebtors/README.md +2 -0
  3. package/docs/sdks/pipelines/README.md +0 -542
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/models/components/ageddebtors.d.ts +3 -3
  7. package/models/components/ageddebtors.d.ts.map +1 -1
  8. package/models/components/ageddebtors.js +5 -3
  9. package/models/components/ageddebtors.js.map +1 -1
  10. package/models/components/agedreportfilter.d.ts +5 -0
  11. package/models/components/agedreportfilter.d.ts.map +1 -1
  12. package/models/components/agedreportfilter.js +4 -0
  13. package/models/components/agedreportfilter.js.map +1 -1
  14. package/models/components/balancebyperiod.d.ts +6 -6
  15. package/models/components/balancebyperiod.d.ts.map +1 -1
  16. package/models/components/balancebyperiod.js +6 -4
  17. package/models/components/balancebyperiod.js.map +1 -1
  18. package/models/components/balancebytransaction.d.ts +8 -3
  19. package/models/components/balancebytransaction.d.ts.map +1 -1
  20. package/models/components/balancebytransaction.js +5 -1
  21. package/models/components/balancebytransaction.js.map +1 -1
  22. package/models/components/bill.d.ts +5 -0
  23. package/models/components/bill.d.ts.map +1 -1
  24. package/models/components/bill.js +9 -0
  25. package/models/components/bill.js.map +1 -1
  26. package/models/components/index.d.ts +1 -8
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +1 -8
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/ledgeraccount.d.ts +5 -0
  31. package/models/components/ledgeraccount.d.ts.map +1 -1
  32. package/models/components/ledgeraccount.js +9 -0
  33. package/models/components/ledgeraccount.js.map +1 -1
  34. package/models/components/outstandingbalancebycurrency.d.ts +5 -0
  35. package/models/components/outstandingbalancebycurrency.d.ts.map +1 -1
  36. package/models/components/outstandingbalancebycurrency.js +4 -0
  37. package/models/components/outstandingbalancebycurrency.js.map +1 -1
  38. package/models/components/outstandingbalancebycustomer.d.ts +40 -0
  39. package/models/components/outstandingbalancebycustomer.d.ts.map +1 -0
  40. package/models/components/{outstandingbalance.js → outstandingbalancebycustomer.js} +17 -17
  41. package/models/components/outstandingbalancebycustomer.js.map +1 -0
  42. package/models/components/supplier.d.ts +5 -0
  43. package/models/components/supplier.d.ts.map +1 -1
  44. package/models/components/supplier.js +9 -0
  45. package/models/components/supplier.js.map +1 -1
  46. package/models/operations/index.d.ts +0 -5
  47. package/models/operations/index.d.ts.map +1 -1
  48. package/models/operations/index.js +0 -5
  49. package/models/operations/index.js.map +1 -1
  50. package/package.json +1 -1
  51. package/sdk/accounting.d.ts +0 -3
  52. package/sdk/accounting.d.ts.map +1 -1
  53. package/sdk/accounting.js +0 -4
  54. package/sdk/accounting.js.map +1 -1
  55. package/sdk/pipelines.d.ts +0 -28
  56. package/sdk/pipelines.d.ts.map +1 -1
  57. package/sdk/pipelines.js +0 -41
  58. package/sdk/pipelines.js.map +1 -1
  59. package/src/lib/config.ts +2 -2
  60. package/src/models/components/ageddebtors.ts +13 -9
  61. package/src/models/components/agedreportfilter.ts +9 -0
  62. package/src/models/components/balancebyperiod.ts +12 -10
  63. package/src/models/components/balancebytransaction.ts +10 -1
  64. package/src/models/components/bill.ts +18 -0
  65. package/src/models/components/index.ts +1 -8
  66. package/src/models/components/ledgeraccount.ts +18 -0
  67. package/src/models/components/outstandingbalancebycurrency.ts +9 -0
  68. package/src/models/components/{outstandingbalance.ts → outstandingbalancebycustomer.ts} +25 -23
  69. package/src/models/components/supplier.ts +18 -0
  70. package/src/models/operations/index.ts +0 -5
  71. package/src/sdk/accounting.ts +0 -6
  72. package/src/sdk/pipelines.ts +0 -73
  73. package/docs/sdks/agedcreditors/README.md +0 -113
  74. package/funcs/accountingAgedCreditorsGet.d.ts +0 -16
  75. package/funcs/accountingAgedCreditorsGet.d.ts.map +0 -1
  76. package/funcs/accountingAgedCreditorsGet.js +0 -122
  77. package/funcs/accountingAgedCreditorsGet.js.map +0 -1
  78. package/funcs/crmPipelinesCreate.d.ts +0 -16
  79. package/funcs/crmPipelinesCreate.d.ts.map +0 -1
  80. package/funcs/crmPipelinesCreate.js +0 -121
  81. package/funcs/crmPipelinesCreate.js.map +0 -1
  82. package/funcs/crmPipelinesDelete.d.ts +0 -16
  83. package/funcs/crmPipelinesDelete.d.ts.map +0 -1
  84. package/funcs/crmPipelinesDelete.js +0 -126
  85. package/funcs/crmPipelinesDelete.js.map +0 -1
  86. package/funcs/crmPipelinesGet.d.ts +0 -16
  87. package/funcs/crmPipelinesGet.d.ts.map +0 -1
  88. package/funcs/crmPipelinesGet.js +0 -127
  89. package/funcs/crmPipelinesGet.js.map +0 -1
  90. package/funcs/crmPipelinesUpdate.d.ts +0 -16
  91. package/funcs/crmPipelinesUpdate.d.ts.map +0 -1
  92. package/funcs/crmPipelinesUpdate.js +0 -127
  93. package/funcs/crmPipelinesUpdate.js.map +0 -1
  94. package/models/components/agedcreditors.d.ts +0 -51
  95. package/models/components/agedcreditors.d.ts.map +0 -1
  96. package/models/components/agedcreditors.js +0 -86
  97. package/models/components/agedcreditors.js.map +0 -1
  98. package/models/components/createpipelineresponse.d.ts +0 -58
  99. package/models/components/createpipelineresponse.d.ts.map +0 -1
  100. package/models/components/createpipelineresponse.js +0 -79
  101. package/models/components/createpipelineresponse.js.map +0 -1
  102. package/models/components/deletepipelineresponse.d.ts +0 -58
  103. package/models/components/deletepipelineresponse.d.ts.map +0 -1
  104. package/models/components/deletepipelineresponse.js +0 -79
  105. package/models/components/deletepipelineresponse.js.map +0 -1
  106. package/models/components/getagedcreditorsresponse.d.ts +0 -58
  107. package/models/components/getagedcreditorsresponse.d.ts.map +0 -1
  108. package/models/components/getagedcreditorsresponse.js +0 -79
  109. package/models/components/getagedcreditorsresponse.js.map +0 -1
  110. package/models/components/getpipelineresponse.d.ts +0 -58
  111. package/models/components/getpipelineresponse.d.ts.map +0 -1
  112. package/models/components/getpipelineresponse.js +0 -79
  113. package/models/components/getpipelineresponse.js.map +0 -1
  114. package/models/components/outstandingbalance.d.ts +0 -40
  115. package/models/components/outstandingbalance.d.ts.map +0 -1
  116. package/models/components/outstandingbalance.js.map +0 -1
  117. package/models/components/pipelineinput.d.ts +0 -117
  118. package/models/components/pipelineinput.d.ts.map +0 -1
  119. package/models/components/pipelineinput.js +0 -133
  120. package/models/components/pipelineinput.js.map +0 -1
  121. package/models/components/updatepipelineresponse.d.ts +0 -58
  122. package/models/components/updatepipelineresponse.d.ts.map +0 -1
  123. package/models/components/updatepipelineresponse.js +0 -79
  124. package/models/components/updatepipelineresponse.js.map +0 -1
  125. package/models/operations/accountingagedcreditorsone.d.ts +0 -125
  126. package/models/operations/accountingagedcreditorsone.d.ts.map +0 -1
  127. package/models/operations/accountingagedcreditorsone.js +0 -153
  128. package/models/operations/accountingagedcreditorsone.js.map +0 -1
  129. package/models/operations/crmpipelinesadd.d.ts +0 -108
  130. package/models/operations/crmpipelinesadd.d.ts.map +0 -1
  131. package/models/operations/crmpipelinesadd.js +0 -149
  132. package/models/operations/crmpipelinesadd.js.map +0 -1
  133. package/models/operations/crmpipelinesdelete.d.ts +0 -111
  134. package/models/operations/crmpipelinesdelete.d.ts.map +0 -1
  135. package/models/operations/crmpipelinesdelete.js +0 -141
  136. package/models/operations/crmpipelinesdelete.js.map +0 -1
  137. package/models/operations/crmpipelinesone.d.ts +0 -116
  138. package/models/operations/crmpipelinesone.d.ts.map +0 -1
  139. package/models/operations/crmpipelinesone.js +0 -141
  140. package/models/operations/crmpipelinesone.js.map +0 -1
  141. package/models/operations/crmpipelinesupdate.d.ts +0 -113
  142. package/models/operations/crmpipelinesupdate.d.ts.map +0 -1
  143. package/models/operations/crmpipelinesupdate.js +0 -151
  144. package/models/operations/crmpipelinesupdate.js.map +0 -1
  145. package/sdk/agedcreditors.d.ts +0 -12
  146. package/sdk/agedcreditors.d.ts.map +0 -1
  147. package/sdk/agedcreditors.js +0 -22
  148. package/sdk/agedcreditors.js.map +0 -1
  149. package/src/funcs/accountingAgedCreditorsGet.ts +0 -193
  150. package/src/funcs/crmPipelinesCreate.ts +0 -179
  151. package/src/funcs/crmPipelinesDelete.ts +0 -185
  152. package/src/funcs/crmPipelinesGet.ts +0 -186
  153. package/src/funcs/crmPipelinesUpdate.ts +0 -186
  154. package/src/models/components/agedcreditors.ts +0 -116
  155. package/src/models/components/createpipelineresponse.ts +0 -119
  156. package/src/models/components/deletepipelineresponse.ts +0 -119
  157. package/src/models/components/getagedcreditorsresponse.ts +0 -119
  158. package/src/models/components/getpipelineresponse.ts +0 -119
  159. package/src/models/components/pipelineinput.ts +0 -233
  160. package/src/models/components/updatepipelineresponse.ts +0 -119
  161. package/src/models/operations/accountingagedcreditorsone.ts +0 -277
  162. package/src/models/operations/crmpipelinesadd.ts +0 -250
  163. package/src/models/operations/crmpipelinesdelete.ts +0 -245
  164. package/src/models/operations/crmpipelinesone.ts +0 -248
  165. package/src/models/operations/crmpipelinesupdate.ts +0 -257
  166. package/src/sdk/agedcreditors.ts +0 -27
@@ -9,11 +9,11 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { RFCDate } from "../../types/rfcdate.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
  import {
12
- OutstandingBalance,
13
- OutstandingBalance$inboundSchema,
14
- OutstandingBalance$Outbound,
15
- OutstandingBalance$outboundSchema,
16
- } from "./outstandingbalance.js";
12
+ OutstandingBalanceByCustomer,
13
+ OutstandingBalanceByCustomer$inboundSchema,
14
+ OutstandingBalanceByCustomer$Outbound,
15
+ OutstandingBalanceByCustomer$outboundSchema,
16
+ } from "./outstandingbalancebycustomer.js";
17
17
 
18
18
  export type AgedDebtors = {
19
19
  /**
@@ -32,7 +32,7 @@ export type AgedDebtors = {
32
32
  * Length of each aging period in days.
33
33
  */
34
34
  periodLength?: number | undefined;
35
- outstandingBalances?: Array<OutstandingBalance> | undefined;
35
+ outstandingBalances?: Array<OutstandingBalanceByCustomer> | undefined;
36
36
  };
37
37
 
38
38
  /** @internal */
@@ -47,7 +47,8 @@ export const AgedDebtors$inboundSchema: z.ZodType<
47
47
  report_as_of_date: z.string().transform(v => new RFCDate(v)).optional(),
48
48
  period_count: z.number().int().default(4),
49
49
  period_length: z.number().int().default(30),
50
- outstanding_balances: z.array(OutstandingBalance$inboundSchema).optional(),
50
+ outstanding_balances: z.array(OutstandingBalanceByCustomer$inboundSchema)
51
+ .optional(),
51
52
  }).transform((v) => {
52
53
  return remap$(v, {
53
54
  "report_generated_at": "reportGeneratedAt",
@@ -64,7 +65,9 @@ export type AgedDebtors$Outbound = {
64
65
  report_as_of_date?: string | undefined;
65
66
  period_count: number;
66
67
  period_length: number;
67
- outstanding_balances?: Array<OutstandingBalance$Outbound> | undefined;
68
+ outstanding_balances?:
69
+ | Array<OutstandingBalanceByCustomer$Outbound>
70
+ | undefined;
68
71
  };
69
72
 
70
73
  /** @internal */
@@ -77,7 +80,8 @@ export const AgedDebtors$outboundSchema: z.ZodType<
77
80
  reportAsOfDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
78
81
  periodCount: z.number().int().default(4),
79
82
  periodLength: z.number().int().default(30),
80
- outstandingBalances: z.array(OutstandingBalance$outboundSchema).optional(),
83
+ outstandingBalances: z.array(OutstandingBalanceByCustomer$outboundSchema)
84
+ .optional(),
81
85
  }).transform((v) => {
82
86
  return remap$(v, {
83
87
  reportGeneratedAt: "report_generated_at",
@@ -13,6 +13,10 @@ export type AgedReportFilter = {
13
13
  * Filter by customer id
14
14
  */
15
15
  customerId?: string | undefined;
16
+ /**
17
+ * Filter by supplier id
18
+ */
19
+ supplierId?: string | undefined;
16
20
  /**
17
21
  * The cutoff date for considering transactions
18
22
  */
@@ -34,12 +38,14 @@ export const AgedReportFilter$inboundSchema: z.ZodType<
34
38
  unknown
35
39
  > = z.object({
36
40
  customer_id: z.string().optional(),
41
+ supplier_id: z.string().optional(),
37
42
  report_as_of_date: z.string().optional(),
38
43
  period_count: z.number().int().optional(),
39
44
  period_length: z.number().int().optional(),
40
45
  }).transform((v) => {
41
46
  return remap$(v, {
42
47
  "customer_id": "customerId",
48
+ "supplier_id": "supplierId",
43
49
  "report_as_of_date": "reportAsOfDate",
44
50
  "period_count": "periodCount",
45
51
  "period_length": "periodLength",
@@ -49,6 +55,7 @@ export const AgedReportFilter$inboundSchema: z.ZodType<
49
55
  /** @internal */
50
56
  export type AgedReportFilter$Outbound = {
51
57
  customer_id?: string | undefined;
58
+ supplier_id?: string | undefined;
52
59
  report_as_of_date?: string | undefined;
53
60
  period_count?: number | undefined;
54
61
  period_length?: number | undefined;
@@ -61,12 +68,14 @@ export const AgedReportFilter$outboundSchema: z.ZodType<
61
68
  AgedReportFilter
62
69
  > = z.object({
63
70
  customerId: z.string().optional(),
71
+ supplierId: z.string().optional(),
64
72
  reportAsOfDate: z.string().optional(),
65
73
  periodCount: z.number().int().optional(),
66
74
  periodLength: z.number().int().optional(),
67
75
  }).transform((v) => {
68
76
  return remap$(v, {
69
77
  customerId: "customer_id",
78
+ supplierId: "supplier_id",
70
79
  reportAsOfDate: "report_as_of_date",
71
80
  periodCount: "period_count",
72
81
  periodLength: "period_length",
@@ -17,13 +17,13 @@ import {
17
17
 
18
18
  export type BalanceByPeriod = {
19
19
  /**
20
- * Start date of the period.
20
+ * The starting date of the period. If not provided, it represents the oldest period, where all transactions due before the specified `end_date` are included.
21
21
  */
22
- startDate?: RFCDate | undefined;
22
+ startDate?: RFCDate | null | undefined;
23
23
  /**
24
- * End date of the period.
24
+ * The ending date of the period. If not provided, it represents an open-ended period starting from the `start_date`, typically capturing future-dated transactions that are not yet aged.
25
25
  */
26
- endDate?: RFCDate | undefined;
26
+ endDate?: RFCDate | null | undefined;
27
27
  /**
28
28
  * Total amount of the period.
29
29
  */
@@ -37,8 +37,8 @@ export const BalanceByPeriod$inboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  unknown
39
39
  > = z.object({
40
- start_date: z.string().transform(v => new RFCDate(v)).optional(),
41
- end_date: z.string().transform(v => new RFCDate(v)).optional(),
40
+ start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
41
+ end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
42
42
  total_amount: z.number().optional(),
43
43
  balances_by_transaction: z.array(BalanceByTransaction$inboundSchema)
44
44
  .optional(),
@@ -53,8 +53,8 @@ export const BalanceByPeriod$inboundSchema: z.ZodType<
53
53
 
54
54
  /** @internal */
55
55
  export type BalanceByPeriod$Outbound = {
56
- start_date?: string | undefined;
57
- end_date?: string | undefined;
56
+ start_date?: string | null | undefined;
57
+ end_date?: string | null | undefined;
58
58
  total_amount?: number | undefined;
59
59
  balances_by_transaction?: Array<BalanceByTransaction$Outbound> | undefined;
60
60
  };
@@ -65,8 +65,10 @@ export const BalanceByPeriod$outboundSchema: z.ZodType<
65
65
  z.ZodTypeDef,
66
66
  BalanceByPeriod
67
67
  > = z.object({
68
- startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
69
- endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
68
+ startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
69
+ .optional(),
70
+ endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
71
+ .optional(),
70
72
  totalAmount: z.number().optional(),
71
73
  balancesByTransaction: z.array(BalanceByTransaction$outboundSchema)
72
74
  .optional(),
@@ -18,7 +18,7 @@ export const TransactionType = {
18
18
  CreditNote: "credit_note",
19
19
  Bill: "bill",
20
20
  Payment: "payment",
21
- BillPayment: "bill-payment",
21
+ BillPayment: "bill_payment",
22
22
  } as const;
23
23
  /**
24
24
  * Type of the transaction.
@@ -50,6 +50,10 @@ export type BalanceByTransaction = {
50
50
  * Outstanding balance of the transaction.
51
51
  */
52
52
  outstandingBalance?: number | undefined;
53
+ /**
54
+ * Transaction number of the transaction.
55
+ */
56
+ transactionNumber?: string | undefined;
53
57
  };
54
58
 
55
59
  /** @internal */
@@ -85,6 +89,7 @@ export const BalanceByTransaction$inboundSchema: z.ZodType<
85
89
  due_date: z.string().transform(v => new RFCDate(v)).optional(),
86
90
  original_amount: z.number().optional(),
87
91
  outstanding_balance: z.number().optional(),
92
+ transaction_number: z.string().optional(),
88
93
  }).transform((v) => {
89
94
  return remap$(v, {
90
95
  "transaction_id": "transactionId",
@@ -93,6 +98,7 @@ export const BalanceByTransaction$inboundSchema: z.ZodType<
93
98
  "due_date": "dueDate",
94
99
  "original_amount": "originalAmount",
95
100
  "outstanding_balance": "outstandingBalance",
101
+ "transaction_number": "transactionNumber",
96
102
  });
97
103
  });
98
104
 
@@ -104,6 +110,7 @@ export type BalanceByTransaction$Outbound = {
104
110
  due_date?: string | undefined;
105
111
  original_amount?: number | undefined;
106
112
  outstanding_balance?: number | undefined;
113
+ transaction_number?: string | undefined;
107
114
  };
108
115
 
109
116
  /** @internal */
@@ -119,6 +126,7 @@ export const BalanceByTransaction$outboundSchema: z.ZodType<
119
126
  dueDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
120
127
  originalAmount: z.number().optional(),
121
128
  outstandingBalance: z.number().optional(),
129
+ transactionNumber: z.string().optional(),
122
130
  }).transform((v) => {
123
131
  return remap$(v, {
124
132
  transactionId: "transaction_id",
@@ -127,6 +135,7 @@ export const BalanceByTransaction$outboundSchema: z.ZodType<
127
135
  dueDate: "due_date",
128
136
  originalAmount: "original_amount",
129
137
  outstandingBalance: "outstanding_balance",
138
+ transactionNumber: "transaction_number",
130
139
  });
131
140
  });
132
141
 
@@ -30,6 +30,12 @@ import {
30
30
  Currency$inboundSchema,
31
31
  Currency$outboundSchema,
32
32
  } from "./currency.js";
33
+ import {
34
+ CustomField,
35
+ CustomField$inboundSchema,
36
+ CustomField$Outbound,
37
+ CustomField$outboundSchema,
38
+ } from "./customfield.js";
33
39
  import {
34
40
  CustomMappings,
35
41
  CustomMappings$inboundSchema,
@@ -224,6 +230,7 @@ export type Bill = {
224
230
  * 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.
225
231
  */
226
232
  rowVersion?: string | null | undefined;
233
+ customFields?: Array<CustomField> | undefined;
227
234
  /**
228
235
  * When custom mappings are configured on the resource, the result is included here.
229
236
  */
@@ -347,6 +354,7 @@ export type BillInput = {
347
354
  * 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.
348
355
  */
349
356
  rowVersion?: string | null | undefined;
357
+ customFields?: Array<CustomField> | undefined;
350
358
  /**
351
359
  * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
352
360
  */
@@ -421,6 +429,7 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
421
429
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
422
430
  ).optional(),
423
431
  row_version: z.nullable(z.string()).optional(),
432
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
424
433
  custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
425
434
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
426
435
  accounting_period: z.nullable(z.string()).optional(),
@@ -450,6 +459,7 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
450
459
  "updated_at": "updatedAt",
451
460
  "created_at": "createdAt",
452
461
  "row_version": "rowVersion",
462
+ "custom_fields": "customFields",
453
463
  "custom_mappings": "customMappings",
454
464
  "pass_through": "passThrough",
455
465
  "accounting_period": "accountingPeriod",
@@ -497,6 +507,7 @@ export type Bill$Outbound = {
497
507
  updated_at?: string | null | undefined;
498
508
  created_at?: string | null | undefined;
499
509
  row_version?: string | null | undefined;
510
+ custom_fields?: Array<CustomField$Outbound> | undefined;
500
511
  custom_mappings?: CustomMappings$Outbound | null | undefined;
501
512
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
502
513
  accounting_period?: string | null | undefined;
@@ -544,6 +555,7 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
544
555
  updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
545
556
  createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
546
557
  rowVersion: z.nullable(z.string()).optional(),
558
+ customFields: z.array(CustomField$outboundSchema).optional(),
547
559
  customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
548
560
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
549
561
  accountingPeriod: z.nullable(z.string()).optional(),
@@ -573,6 +585,7 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
573
585
  updatedAt: "updated_at",
574
586
  createdAt: "created_at",
575
587
  rowVersion: "row_version",
588
+ customFields: "custom_fields",
576
589
  customMappings: "custom_mappings",
577
590
  passThrough: "pass_through",
578
591
  accountingPeriod: "accounting_period",
@@ -643,6 +656,7 @@ export const BillInput$inboundSchema: z.ZodType<
643
656
  tracking_categories: z.nullable(z.array(LinkedTrackingCategory$inboundSchema))
644
657
  .optional(),
645
658
  row_version: z.nullable(z.string()).optional(),
659
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
646
660
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
647
661
  accounting_period: z.nullable(z.string()).optional(),
648
662
  }).transform((v) => {
@@ -666,6 +680,7 @@ export const BillInput$inboundSchema: z.ZodType<
666
680
  "discount_percentage": "discountPercentage",
667
681
  "tracking_categories": "trackingCategories",
668
682
  "row_version": "rowVersion",
683
+ "custom_fields": "customFields",
669
684
  "pass_through": "passThrough",
670
685
  "accounting_period": "accountingPeriod",
671
686
  });
@@ -706,6 +721,7 @@ export type BillInput$Outbound = {
706
721
  | null
707
722
  | undefined;
708
723
  row_version?: string | null | undefined;
724
+ custom_fields?: Array<CustomField$Outbound> | undefined;
709
725
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
710
726
  accounting_period?: string | null | undefined;
711
727
  };
@@ -748,6 +764,7 @@ export const BillInput$outboundSchema: z.ZodType<
748
764
  trackingCategories: z.nullable(z.array(LinkedTrackingCategory$outboundSchema))
749
765
  .optional(),
750
766
  rowVersion: z.nullable(z.string()).optional(),
767
+ customFields: z.array(CustomField$outboundSchema).optional(),
751
768
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
752
769
  accountingPeriod: z.nullable(z.string()).optional(),
753
770
  }).transform((v) => {
@@ -771,6 +788,7 @@ export const BillInput$outboundSchema: z.ZodType<
771
788
  discountPercentage: "discount_percentage",
772
789
  trackingCategories: "tracking_categories",
773
790
  rowVersion: "row_version",
791
+ customFields: "custom_fields",
774
792
  passThrough: "pass_through",
775
793
  accountingPeriod: "accounting_period",
776
794
  });
@@ -11,7 +11,6 @@ export * from "./activitiessort.js";
11
11
  export * from "./activity.js";
12
12
  export * from "./activityattendee.js";
13
13
  export * from "./address.js";
14
- export * from "./agedcreditors.js";
15
14
  export * from "./ageddebtors.js";
16
15
  export * from "./agedreportfilter.js";
17
16
  export * from "./allocation.js";
@@ -105,7 +104,6 @@ export * from "./createmessageresponse.js";
105
104
  export * from "./createnoteresponse.js";
106
105
  export * from "./createopportunityresponse.js";
107
106
  export * from "./createpaymentresponse.js";
108
- export * from "./createpipelineresponse.js";
109
107
  export * from "./createpurchaseorderresponse.js";
110
108
  export * from "./createsessionresponse.js";
111
109
  export * from "./createsharedlinkresponse.js";
@@ -163,7 +161,6 @@ export * from "./deletemessageresponse.js";
163
161
  export * from "./deletenoteresponse.js";
164
162
  export * from "./deleteopportunityresponse.js";
165
163
  export * from "./deletepaymentresponse.js";
166
- export * from "./deletepipelineresponse.js";
167
164
  export * from "./deletepurchaseorderresponse.js";
168
165
  export * from "./deletesharedlinkresponse.js";
169
166
  export * from "./deletesubsidiaryresponse.js";
@@ -224,7 +221,6 @@ export * from "./getaccountinglocationresponse.js";
224
221
  export * from "./getaccountinglocationsresponse.js";
225
222
  export * from "./getactivitiesresponse.js";
226
223
  export * from "./getactivityresponse.js";
227
- export * from "./getagedcreditorsresponse.js";
228
224
  export * from "./getageddebtorsresponse.js";
229
225
  export * from "./getapiresourcecoverageresponse.js";
230
226
  export * from "./getapiresourceresponse.js";
@@ -311,7 +307,6 @@ export * from "./getpaymentresponse.js";
311
307
  export * from "./getpaymentsresponse.js";
312
308
  export * from "./getpayrollresponse.js";
313
309
  export * from "./getpayrollsresponse.js";
314
- export * from "./getpipelineresponse.js";
315
310
  export * from "./getpipelinesresponse.js";
316
311
  export * from "./getproductresponse.js";
317
312
  export * from "./getproductsresponse.js";
@@ -393,8 +388,8 @@ export * from "./opportunitiessort.js";
393
388
  export * from "./opportunity.js";
394
389
  export * from "./opportunityinput.js";
395
390
  export * from "./orderssort.js";
396
- export * from "./outstandingbalance.js";
397
391
  export * from "./outstandingbalancebycurrency.js";
392
+ export * from "./outstandingbalancebycustomer.js";
398
393
  export * from "./owner.js";
399
394
  export * from "./paginationcoverage.js";
400
395
  export * from "./passthroughbody.js";
@@ -413,7 +408,6 @@ export * from "./person.js";
413
408
  export * from "./personinput.js";
414
409
  export * from "./phonenumber.js";
415
410
  export * from "./pipeline.js";
416
- export * from "./pipelineinput.js";
417
411
  export * from "./profitandloss.js";
418
412
  export * from "./profitandlossfilter.js";
419
413
  export * from "./purchaseorder.js";
@@ -486,7 +480,6 @@ export * from "./updatemessageresponse.js";
486
480
  export * from "./updatenoteresponse.js";
487
481
  export * from "./updateopportunityresponse.js";
488
482
  export * from "./updatepaymentresponse.js";
489
- export * from "./updatepipelineresponse.js";
490
483
  export * from "./updatepurchaseorderresponse.js";
491
484
  export * from "./updatesharedlinkresponse.js";
492
485
  export * from "./updatesubsidiaryresponse.js";
@@ -20,6 +20,12 @@ import {
20
20
  Currency$inboundSchema,
21
21
  Currency$outboundSchema,
22
22
  } from "./currency.js";
23
+ import {
24
+ CustomField,
25
+ CustomField$inboundSchema,
26
+ CustomField$Outbound,
27
+ CustomField$outboundSchema,
28
+ } from "./customfield.js";
23
29
  import {
24
30
  CustomMappings,
25
31
  CustomMappings$inboundSchema,
@@ -248,6 +254,7 @@ export type LedgerAccount = {
248
254
  * When custom mappings are configured on the resource, the result is included here.
249
255
  */
250
256
  customMappings?: CustomMappings | null | undefined;
257
+ customFields?: Array<CustomField> | undefined;
251
258
  /**
252
259
  * 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.
253
260
  */
@@ -357,6 +364,7 @@ export type LedgerAccountInput = {
357
364
  * The subsidiaries the account belongs to.
358
365
  */
359
366
  subsidiaries?: Array<LedgerAccountSubsidiaries> | undefined;
367
+ customFields?: Array<CustomField> | undefined;
360
368
  /**
361
369
  * 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.
362
370
  */
@@ -698,6 +706,7 @@ export const LedgerAccount$inboundSchema: z.ZodType<
698
706
  subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$inboundSchema))
699
707
  .optional(),
700
708
  custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
709
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
701
710
  row_version: z.nullable(z.string()).optional(),
702
711
  updated_by: z.nullable(z.string()).optional(),
703
712
  created_by: z.nullable(z.string()).optional(),
@@ -724,6 +733,7 @@ export const LedgerAccount$inboundSchema: z.ZodType<
724
733
  "sub_accounts": "subAccounts",
725
734
  "last_reconciliation_date": "lastReconciliationDate",
726
735
  "custom_mappings": "customMappings",
736
+ "custom_fields": "customFields",
727
737
  "row_version": "rowVersion",
728
738
  "updated_by": "updatedBy",
729
739
  "created_by": "createdBy",
@@ -762,6 +772,7 @@ export type LedgerAccount$Outbound = {
762
772
  last_reconciliation_date?: string | null | undefined;
763
773
  subsidiaries?: Array<LedgerAccountSubsidiaries$Outbound> | undefined;
764
774
  custom_mappings?: CustomMappings$Outbound | null | undefined;
775
+ custom_fields?: Array<CustomField$Outbound> | undefined;
765
776
  row_version?: string | null | undefined;
766
777
  updated_by?: string | null | undefined;
767
778
  created_by?: string | null | undefined;
@@ -806,6 +817,7 @@ export const LedgerAccount$outboundSchema: z.ZodType<
806
817
  subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$outboundSchema))
807
818
  .optional(),
808
819
  customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
820
+ customFields: z.array(CustomField$outboundSchema).optional(),
809
821
  rowVersion: z.nullable(z.string()).optional(),
810
822
  updatedBy: z.nullable(z.string()).optional(),
811
823
  createdBy: z.nullable(z.string()).optional(),
@@ -828,6 +840,7 @@ export const LedgerAccount$outboundSchema: z.ZodType<
828
840
  subAccounts: "sub_accounts",
829
841
  lastReconciliationDate: "last_reconciliation_date",
830
842
  customMappings: "custom_mappings",
843
+ customFields: "custom_fields",
831
844
  rowVersion: "row_version",
832
845
  updatedBy: "updated_by",
833
846
  createdBy: "created_by",
@@ -896,6 +909,7 @@ export const LedgerAccountInput$inboundSchema: z.ZodType<
896
909
  ).optional(),
897
910
  subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$inboundSchema))
898
911
  .optional(),
912
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
899
913
  row_version: z.nullable(z.string()).optional(),
900
914
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
901
915
  }).transform((v) => {
@@ -912,6 +926,7 @@ export const LedgerAccountInput$inboundSchema: z.ZodType<
912
926
  "parent_account": "parentAccount",
913
927
  "sub_account": "subAccount",
914
928
  "last_reconciliation_date": "lastReconciliationDate",
929
+ "custom_fields": "customFields",
915
930
  "row_version": "rowVersion",
916
931
  "pass_through": "passThrough",
917
932
  });
@@ -942,6 +957,7 @@ export type LedgerAccountInput$Outbound = {
942
957
  sub_account?: boolean | null | undefined;
943
958
  last_reconciliation_date?: string | null | undefined;
944
959
  subsidiaries?: Array<LedgerAccountSubsidiaries$Outbound> | undefined;
960
+ custom_fields?: Array<CustomField$Outbound> | undefined;
945
961
  row_version?: string | null | undefined;
946
962
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
947
963
  };
@@ -978,6 +994,7 @@ export const LedgerAccountInput$outboundSchema: z.ZodType<
978
994
  ).optional(),
979
995
  subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$outboundSchema))
980
996
  .optional(),
997
+ customFields: z.array(CustomField$outboundSchema).optional(),
981
998
  rowVersion: z.nullable(z.string()).optional(),
982
999
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
983
1000
  }).transform((v) => {
@@ -994,6 +1011,7 @@ export const LedgerAccountInput$outboundSchema: z.ZodType<
994
1011
  parentAccount: "parent_account",
995
1012
  subAccount: "sub_account",
996
1013
  lastReconciliationDate: "last_reconciliation_date",
1014
+ customFields: "custom_fields",
997
1015
  rowVersion: "row_version",
998
1016
  passThrough: "pass_through",
999
1017
  });
@@ -24,6 +24,10 @@ export type OutstandingBalanceByCurrency = {
24
24
  * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
25
25
  */
26
26
  currency?: Currency | null | undefined;
27
+ /**
28
+ * Total amount of the outstanding balance.
29
+ */
30
+ totalAmount?: number | undefined;
27
31
  balancesByPeriod?: Array<BalanceByPeriod> | undefined;
28
32
  };
29
33
 
@@ -34,9 +38,11 @@ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
34
38
  unknown
35
39
  > = z.object({
36
40
  currency: z.nullable(Currency$inboundSchema).optional(),
41
+ total_amount: z.number().optional(),
37
42
  balances_by_period: z.array(BalanceByPeriod$inboundSchema).optional(),
38
43
  }).transform((v) => {
39
44
  return remap$(v, {
45
+ "total_amount": "totalAmount",
40
46
  "balances_by_period": "balancesByPeriod",
41
47
  });
42
48
  });
@@ -44,6 +50,7 @@ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
44
50
  /** @internal */
45
51
  export type OutstandingBalanceByCurrency$Outbound = {
46
52
  currency?: string | null | undefined;
53
+ total_amount?: number | undefined;
47
54
  balances_by_period?: Array<BalanceByPeriod$Outbound> | undefined;
48
55
  };
49
56
 
@@ -54,9 +61,11 @@ export const OutstandingBalanceByCurrency$outboundSchema: z.ZodType<
54
61
  OutstandingBalanceByCurrency
55
62
  > = z.object({
56
63
  currency: z.nullable(Currency$outboundSchema).optional(),
64
+ totalAmount: z.number().optional(),
57
65
  balancesByPeriod: z.array(BalanceByPeriod$outboundSchema).optional(),
58
66
  }).transform((v) => {
59
67
  return remap$(v, {
68
+ totalAmount: "total_amount",
60
69
  balancesByPeriod: "balances_by_period",
61
70
  });
62
71
  });
@@ -14,13 +14,13 @@ import {
14
14
  OutstandingBalanceByCurrency$outboundSchema,
15
15
  } from "./outstandingbalancebycurrency.js";
16
16
 
17
- export type OutstandingBalance = {
17
+ export type OutstandingBalanceByCustomer = {
18
18
  /**
19
- * Unique identifier for the customer or supplier.
19
+ * Unique identifier for the customer.
20
20
  */
21
21
  customerId?: string | undefined;
22
22
  /**
23
- * Full name of the customer or supplier.
23
+ * Full name of the customer.
24
24
  */
25
25
  customerName?: string | undefined;
26
26
  outstandingBalancesByCurrency?:
@@ -29,8 +29,8 @@ export type OutstandingBalance = {
29
29
  };
30
30
 
31
31
  /** @internal */
32
- export const OutstandingBalance$inboundSchema: z.ZodType<
33
- OutstandingBalance,
32
+ export const OutstandingBalanceByCustomer$inboundSchema: z.ZodType<
33
+ OutstandingBalanceByCustomer,
34
34
  z.ZodTypeDef,
35
35
  unknown
36
36
  > = z.object({
@@ -48,7 +48,7 @@ export const OutstandingBalance$inboundSchema: z.ZodType<
48
48
  });
49
49
 
50
50
  /** @internal */
51
- export type OutstandingBalance$Outbound = {
51
+ export type OutstandingBalanceByCustomer$Outbound = {
52
52
  customer_id?: string | undefined;
53
53
  customer_name?: string | undefined;
54
54
  outstanding_balances_by_currency?:
@@ -57,10 +57,10 @@ export type OutstandingBalance$Outbound = {
57
57
  };
58
58
 
59
59
  /** @internal */
60
- export const OutstandingBalance$outboundSchema: z.ZodType<
61
- OutstandingBalance$Outbound,
60
+ export const OutstandingBalanceByCustomer$outboundSchema: z.ZodType<
61
+ OutstandingBalanceByCustomer$Outbound,
62
62
  z.ZodTypeDef,
63
- OutstandingBalance
63
+ OutstandingBalanceByCustomer
64
64
  > = z.object({
65
65
  customerId: z.string().optional(),
66
66
  customerName: z.string().optional(),
@@ -79,29 +79,31 @@ export const OutstandingBalance$outboundSchema: z.ZodType<
79
79
  * @internal
80
80
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
81
  */
82
- export namespace OutstandingBalance$ {
83
- /** @deprecated use `OutstandingBalance$inboundSchema` instead. */
84
- export const inboundSchema = OutstandingBalance$inboundSchema;
85
- /** @deprecated use `OutstandingBalance$outboundSchema` instead. */
86
- export const outboundSchema = OutstandingBalance$outboundSchema;
87
- /** @deprecated use `OutstandingBalance$Outbound` instead. */
88
- export type Outbound = OutstandingBalance$Outbound;
82
+ export namespace OutstandingBalanceByCustomer$ {
83
+ /** @deprecated use `OutstandingBalanceByCustomer$inboundSchema` instead. */
84
+ export const inboundSchema = OutstandingBalanceByCustomer$inboundSchema;
85
+ /** @deprecated use `OutstandingBalanceByCustomer$outboundSchema` instead. */
86
+ export const outboundSchema = OutstandingBalanceByCustomer$outboundSchema;
87
+ /** @deprecated use `OutstandingBalanceByCustomer$Outbound` instead. */
88
+ export type Outbound = OutstandingBalanceByCustomer$Outbound;
89
89
  }
90
90
 
91
- export function outstandingBalanceToJSON(
92
- outstandingBalance: OutstandingBalance,
91
+ export function outstandingBalanceByCustomerToJSON(
92
+ outstandingBalanceByCustomer: OutstandingBalanceByCustomer,
93
93
  ): string {
94
94
  return JSON.stringify(
95
- OutstandingBalance$outboundSchema.parse(outstandingBalance),
95
+ OutstandingBalanceByCustomer$outboundSchema.parse(
96
+ outstandingBalanceByCustomer,
97
+ ),
96
98
  );
97
99
  }
98
100
 
99
- export function outstandingBalanceFromJSON(
101
+ export function outstandingBalanceByCustomerFromJSON(
100
102
  jsonString: string,
101
- ): SafeParseResult<OutstandingBalance, SDKValidationError> {
103
+ ): SafeParseResult<OutstandingBalanceByCustomer, SDKValidationError> {
102
104
  return safeParse(
103
105
  jsonString,
104
- (x) => OutstandingBalance$inboundSchema.parse(JSON.parse(x)),
105
- `Failed to parse 'OutstandingBalance' from JSON`,
106
+ (x) => OutstandingBalanceByCustomer$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'OutstandingBalanceByCustomer' from JSON`,
106
108
  );
107
109
  }