@apideck/unify 0.26.0 → 0.28.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 (142) hide show
  1. package/README.md +5 -5
  2. package/docs/sdks/companies/README.md +4 -4
  3. package/examples/README.md +26 -0
  4. package/examples/accountingTaxRatesList.example.ts +41 -0
  5. package/examples/package-lock.json +613 -0
  6. package/examples/package.json +18 -0
  7. package/funcs/crmCompaniesCreate.js +1 -1
  8. package/funcs/crmCompaniesCreate.js.map +1 -1
  9. package/funcs/crmCompaniesUpdate.js +1 -1
  10. package/funcs/crmCompaniesUpdate.js.map +1 -1
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +4 -4
  13. package/lib/config.js +4 -4
  14. package/models/components/bankaccount.d.ts +5 -0
  15. package/models/components/bankaccount.d.ts.map +1 -1
  16. package/models/components/bankaccount.js +2 -0
  17. package/models/components/bankaccount.js.map +1 -1
  18. package/models/components/bankaccount1.d.ts +123 -0
  19. package/models/components/bankaccount1.d.ts.map +1 -0
  20. package/models/components/bankaccount1.js +128 -0
  21. package/models/components/bankaccount1.js.map +1 -0
  22. package/models/components/{company.d.ts → company1.d.ts} +32 -32
  23. package/models/components/company1.d.ts.map +1 -0
  24. package/models/components/{company.js → company1.js} +37 -37
  25. package/models/components/company1.js.map +1 -0
  26. package/models/components/companyinfo.d.ts +5 -0
  27. package/models/components/companyinfo.d.ts.map +1 -1
  28. package/models/components/companyinfo.js +4 -0
  29. package/models/components/companyinfo.js.map +1 -1
  30. package/models/components/getcompaniesresponse.d.ts +3 -3
  31. package/models/components/getcompaniesresponse.d.ts.map +1 -1
  32. package/models/components/getcompaniesresponse.js +3 -3
  33. package/models/components/getcompaniesresponse.js.map +1 -1
  34. package/models/components/getcompanyresponse.d.ts +3 -3
  35. package/models/components/getcompanyresponse.d.ts.map +1 -1
  36. package/models/components/getcompanyresponse.js +3 -3
  37. package/models/components/getcompanyresponse.js.map +1 -1
  38. package/models/components/index.d.ts +2 -1
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +2 -1
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/ledgeraccount.d.ts +9 -9
  43. package/models/components/ledgeraccount.d.ts.map +1 -1
  44. package/models/components/ledgeraccount.js +19 -15
  45. package/models/components/ledgeraccount.js.map +1 -1
  46. package/models/components/ledgeraccountsfilter.d.ts +61 -0
  47. package/models/components/ledgeraccountsfilter.d.ts.map +1 -1
  48. package/models/components/ledgeraccountsfilter.js +33 -1
  49. package/models/components/ledgeraccountsfilter.js.map +1 -1
  50. package/models/components/supplier.d.ts +10 -0
  51. package/models/components/supplier.d.ts.map +1 -1
  52. package/models/components/supplier.js +4 -0
  53. package/models/components/supplier.js.map +1 -1
  54. package/models/errors/apierror.d.ts.map +1 -1
  55. package/models/errors/apierror.js +8 -2
  56. package/models/errors/apierror.js.map +1 -1
  57. package/models/errors/badrequestresponse.js +1 -1
  58. package/models/errors/badrequestresponse.js.map +1 -1
  59. package/models/errors/notfoundresponse.js +1 -1
  60. package/models/errors/notfoundresponse.js.map +1 -1
  61. package/models/errors/paymentrequiredresponse.js +1 -1
  62. package/models/errors/paymentrequiredresponse.js.map +1 -1
  63. package/models/errors/unauthorizedresponse.js +1 -1
  64. package/models/errors/unauthorizedresponse.js.map +1 -1
  65. package/models/errors/unprocessableresponse.js +1 -1
  66. package/models/errors/unprocessableresponse.js.map +1 -1
  67. package/models/operations/crmcompaniesadd.d.ts +2 -2
  68. package/models/operations/crmcompaniesadd.d.ts.map +1 -1
  69. package/models/operations/crmcompaniesadd.js +4 -4
  70. package/models/operations/crmcompaniesadd.js.map +1 -1
  71. package/models/operations/crmcompaniesupdate.d.ts +2 -2
  72. package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
  73. package/models/operations/crmcompaniesupdate.js +4 -4
  74. package/models/operations/crmcompaniesupdate.js.map +1 -1
  75. package/package.json +1 -1
  76. package/src/__tests__/activities.test.ts +360 -9
  77. package/src/__tests__/apideckcompanies.test.ts +373 -9
  78. package/src/__tests__/apideckdepartments.test.ts +181 -9
  79. package/src/__tests__/applicants.test.ts +473 -9
  80. package/src/__tests__/applications.test.ts +189 -9
  81. package/src/__tests__/billpayments.test.ts +367 -9
  82. package/src/__tests__/bills.test.ts +500 -9
  83. package/src/__tests__/collectionticketcomments.test.ts +183 -7
  84. package/src/__tests__/collectiontickets.test.ts +191 -7
  85. package/src/__tests__/companies.test.ts +538 -9
  86. package/src/__tests__/connections.test.ts +409 -5
  87. package/src/__tests__/connectionsettings.test.ts +410 -5
  88. package/src/__tests__/contacts.test.ts +466 -9
  89. package/src/__tests__/creditnotes.test.ts +758 -87
  90. package/src/__tests__/customers.test.ts +513 -9
  91. package/src/__tests__/customobjects.test.ts +150 -9
  92. package/src/__tests__/customobjectschemas.test.ts +321 -9
  93. package/src/__tests__/departments.test.ts +173 -9
  94. package/src/__tests__/drivegroups.test.ts +181 -9
  95. package/src/__tests__/drives.test.ts +179 -9
  96. package/src/__tests__/employees.test.ts +829 -94
  97. package/src/__tests__/expenses.test.ts +332 -9
  98. package/src/__tests__/files.test.ts +106 -5
  99. package/src/__tests__/folders.test.ts +296 -13
  100. package/src/__tests__/invoiceitems.test.ts +272 -9
  101. package/src/__tests__/invoices.test.ts +673 -67
  102. package/src/__tests__/journalentries.test.ts +490 -8
  103. package/src/__tests__/leads.test.ts +446 -9
  104. package/src/__tests__/ledgeraccounts.test.ts +237 -8
  105. package/src/__tests__/locations.test.ts +298 -9
  106. package/src/__tests__/messages.test.ts +195 -9
  107. package/src/__tests__/notes.test.ts +191 -9
  108. package/src/__tests__/opportunities.test.ts +218 -9
  109. package/src/__tests__/payments.test.ts +312 -9
  110. package/src/__tests__/pipelines.test.ts +194 -9
  111. package/src/__tests__/purchaseorders.test.ts +773 -104
  112. package/src/__tests__/sharedlinks.test.ts +183 -9
  113. package/src/__tests__/subsidiaries.test.ts +183 -9
  114. package/src/__tests__/suppliers.test.ts +505 -9
  115. package/src/__tests__/taxrates.test.ts +232 -9
  116. package/src/__tests__/timeoffrequests.test.ts +210 -9
  117. package/src/__tests__/trackingcategories.test.ts +187 -7
  118. package/src/__tests__/uploadsessions.test.ts +78 -5
  119. package/src/__tests__/users.test.ts +356 -9
  120. package/src/funcs/crmCompaniesCreate.ts +1 -1
  121. package/src/funcs/crmCompaniesUpdate.ts +1 -1
  122. package/src/lib/config.ts +4 -4
  123. package/src/models/components/bankaccount.ts +7 -0
  124. package/src/models/components/bankaccount1.ts +207 -0
  125. package/src/models/components/{company.ts → company1.ts} +131 -128
  126. package/src/models/components/companyinfo.ts +9 -0
  127. package/src/models/components/getcompaniesresponse.ts +9 -9
  128. package/src/models/components/getcompanyresponse.ts +9 -9
  129. package/src/models/components/index.ts +2 -1
  130. package/src/models/components/ledgeraccount.ts +25 -19
  131. package/src/models/components/ledgeraccountsfilter.ts +49 -0
  132. package/src/models/components/supplier.ts +14 -0
  133. package/src/models/errors/apierror.ts +8 -2
  134. package/src/models/errors/badrequestresponse.ts +1 -1
  135. package/src/models/errors/notfoundresponse.ts +1 -1
  136. package/src/models/errors/paymentrequiredresponse.ts +1 -1
  137. package/src/models/errors/unauthorizedresponse.ts +1 -1
  138. package/src/models/errors/unprocessableresponse.ts +1 -1
  139. package/src/models/operations/crmcompaniesadd.ts +6 -6
  140. package/src/models/operations/crmcompaniesupdate.ts +6 -6
  141. package/models/components/company.d.ts.map +0 -1
  142. package/models/components/company.js.map +0 -1
@@ -94,7 +94,7 @@ async function $do(
94
94
  return [parsed, { status: "invalid" }];
95
95
  }
96
96
  const payload = parsed.value;
97
- const body = encodeJSON("body", payload.Company, { explode: true });
97
+ const body = encodeJSON("body", payload.Company1, { explode: true });
98
98
 
99
99
  const path = pathToFunc("/crm/companies")();
100
100
 
@@ -94,7 +94,7 @@ async function $do(
94
94
  return [parsed, { status: "invalid" }];
95
95
  }
96
96
  const payload = parsed.value;
97
- const body = encodeJSON("body", payload.Company, { explode: true });
97
+ const body = encodeJSON("body", payload.Company1, { explode: true });
98
98
 
99
99
  const pathParams = {
100
100
  id: encodeSimple("id", payload.id, {
package/src/lib/config.ts CHANGED
@@ -67,8 +67,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
67
67
 
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
- openapiDocVersion: "10.18.0",
71
- sdkVersion: "0.26.0",
72
- genVersion: "2.632.2",
73
- userAgent: "speakeasy-sdk/typescript 0.26.0 2.632.2 10.18.0 @apideck/unify",
70
+ openapiDocVersion: "10.18.1",
71
+ sdkVersion: "0.28.0",
72
+ genVersion: "2.654.2",
73
+ userAgent: "speakeasy-sdk/typescript 0.28.0 2.654.2 10.18.1 @apideck/unify",
74
74
  } as const;
@@ -72,6 +72,10 @@ export type BankAccount = {
72
72
  * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
73
73
  */
74
74
  currency?: Currency | null | undefined;
75
+ /**
76
+ * Country code according to ISO 3166-1 alpha-2.
77
+ */
78
+ country?: string | null | undefined;
75
79
  };
76
80
 
77
81
  /** @internal */
@@ -110,6 +114,7 @@ export const BankAccount$inboundSchema: z.ZodType<
110
114
  branch_identifier: z.nullable(z.string()).optional(),
111
115
  bank_code: z.nullable(z.string()).optional(),
112
116
  currency: z.nullable(Currency$inboundSchema).optional(),
117
+ country: z.nullable(z.string()).optional(),
113
118
  }).transform((v) => {
114
119
  return remap$(v, {
115
120
  "bank_name": "bankName",
@@ -136,6 +141,7 @@ export type BankAccount$Outbound = {
136
141
  branch_identifier?: string | null | undefined;
137
142
  bank_code?: string | null | undefined;
138
143
  currency?: string | null | undefined;
144
+ country?: string | null | undefined;
139
145
  };
140
146
 
141
147
  /** @internal */
@@ -155,6 +161,7 @@ export const BankAccount$outboundSchema: z.ZodType<
155
161
  branchIdentifier: z.nullable(z.string()).optional(),
156
162
  bankCode: z.nullable(z.string()).optional(),
157
163
  currency: z.nullable(Currency$outboundSchema).optional(),
164
+ country: z.nullable(z.string()).optional(),
158
165
  }).transform((v) => {
159
166
  return remap$(v, {
160
167
  bankName: "bank_name",
@@ -0,0 +1,207 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Currency,
13
+ Currency$inboundSchema,
14
+ Currency$outboundSchema,
15
+ } from "./currency.js";
16
+
17
+ /**
18
+ * The type of bank account.
19
+ */
20
+ export const BankAccount1AccountType = {
21
+ BankAccount: "bank_account",
22
+ CreditCard: "credit_card",
23
+ Other: "other",
24
+ } as const;
25
+ /**
26
+ * The type of bank account.
27
+ */
28
+ export type BankAccount1AccountType = ClosedEnum<
29
+ typeof BankAccount1AccountType
30
+ >;
31
+
32
+ export type BankAccount1 = {
33
+ /**
34
+ * The name of the bank
35
+ */
36
+ bankName?: string | null | undefined;
37
+ /**
38
+ * A bank account number is a number that is tied to your bank account. If you have several bank accounts, such as personal, joint, business (and so on), each account will have a different account number.
39
+ */
40
+ accountNumber?: string | null | undefined;
41
+ /**
42
+ * The name which you used in opening your bank account.
43
+ */
44
+ accountName?: string | null | undefined;
45
+ /**
46
+ * The type of bank account.
47
+ */
48
+ accountType?: BankAccount1AccountType | null | undefined;
49
+ /**
50
+ * The International Bank Account Number (IBAN).
51
+ */
52
+ iban?: string | null | undefined;
53
+ /**
54
+ * The Bank Identifier Code (BIC).
55
+ */
56
+ bic?: string | null | undefined;
57
+ /**
58
+ * A routing number is a nine-digit code used to identify a financial institution in the United States.
59
+ */
60
+ routingNumber?: string | null | undefined;
61
+ /**
62
+ * A BSB is a 6 digit numeric code used for identifying the branch of an Australian or New Zealand bank or financial institution.
63
+ */
64
+ bsbNumber?: string | null | undefined;
65
+ /**
66
+ * A branch identifier is a unique identifier for a branch of a bank or financial institution.
67
+ */
68
+ branchIdentifier?: string | null | undefined;
69
+ /**
70
+ * A bank code is a code assigned by a central bank, a bank supervisory body or a Bankers Association in a country to all its licensed member banks or financial institutions.
71
+ */
72
+ bankCode?: string | null | undefined;
73
+ /**
74
+ * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
75
+ */
76
+ currency?: Currency | null | undefined;
77
+ /**
78
+ * Country code according to ISO 3166-1 alpha-2.
79
+ */
80
+ country?: string | null | undefined;
81
+ };
82
+
83
+ /** @internal */
84
+ export const BankAccount1AccountType$inboundSchema: z.ZodNativeEnum<
85
+ typeof BankAccount1AccountType
86
+ > = z.nativeEnum(BankAccount1AccountType);
87
+
88
+ /** @internal */
89
+ export const BankAccount1AccountType$outboundSchema: z.ZodNativeEnum<
90
+ typeof BankAccount1AccountType
91
+ > = BankAccount1AccountType$inboundSchema;
92
+
93
+ /**
94
+ * @internal
95
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
96
+ */
97
+ export namespace BankAccount1AccountType$ {
98
+ /** @deprecated use `BankAccount1AccountType$inboundSchema` instead. */
99
+ export const inboundSchema = BankAccount1AccountType$inboundSchema;
100
+ /** @deprecated use `BankAccount1AccountType$outboundSchema` instead. */
101
+ export const outboundSchema = BankAccount1AccountType$outboundSchema;
102
+ }
103
+
104
+ /** @internal */
105
+ export const BankAccount1$inboundSchema: z.ZodType<
106
+ BankAccount1,
107
+ z.ZodTypeDef,
108
+ unknown
109
+ > = z.object({
110
+ bank_name: z.nullable(z.string()).optional(),
111
+ account_number: z.nullable(z.string()).optional(),
112
+ account_name: z.nullable(z.string()).optional(),
113
+ account_type: z.nullable(BankAccount1AccountType$inboundSchema).optional(),
114
+ iban: z.nullable(z.string()).optional(),
115
+ bic: z.nullable(z.string()).optional(),
116
+ routing_number: z.nullable(z.string()).optional(),
117
+ bsb_number: z.nullable(z.string()).optional(),
118
+ branch_identifier: z.nullable(z.string()).optional(),
119
+ bank_code: z.nullable(z.string()).optional(),
120
+ currency: z.nullable(Currency$inboundSchema).optional(),
121
+ country: z.nullable(z.string()).optional(),
122
+ }).transform((v) => {
123
+ return remap$(v, {
124
+ "bank_name": "bankName",
125
+ "account_number": "accountNumber",
126
+ "account_name": "accountName",
127
+ "account_type": "accountType",
128
+ "routing_number": "routingNumber",
129
+ "bsb_number": "bsbNumber",
130
+ "branch_identifier": "branchIdentifier",
131
+ "bank_code": "bankCode",
132
+ });
133
+ });
134
+
135
+ /** @internal */
136
+ export type BankAccount1$Outbound = {
137
+ bank_name?: string | null | undefined;
138
+ account_number?: string | null | undefined;
139
+ account_name?: string | null | undefined;
140
+ account_type?: string | null | undefined;
141
+ iban?: string | null | undefined;
142
+ bic?: string | null | undefined;
143
+ routing_number?: string | null | undefined;
144
+ bsb_number?: string | null | undefined;
145
+ branch_identifier?: string | null | undefined;
146
+ bank_code?: string | null | undefined;
147
+ currency?: string | null | undefined;
148
+ country?: string | null | undefined;
149
+ };
150
+
151
+ /** @internal */
152
+ export const BankAccount1$outboundSchema: z.ZodType<
153
+ BankAccount1$Outbound,
154
+ z.ZodTypeDef,
155
+ BankAccount1
156
+ > = z.object({
157
+ bankName: z.nullable(z.string()).optional(),
158
+ accountNumber: z.nullable(z.string()).optional(),
159
+ accountName: z.nullable(z.string()).optional(),
160
+ accountType: z.nullable(BankAccount1AccountType$outboundSchema).optional(),
161
+ iban: z.nullable(z.string()).optional(),
162
+ bic: z.nullable(z.string()).optional(),
163
+ routingNumber: z.nullable(z.string()).optional(),
164
+ bsbNumber: z.nullable(z.string()).optional(),
165
+ branchIdentifier: z.nullable(z.string()).optional(),
166
+ bankCode: z.nullable(z.string()).optional(),
167
+ currency: z.nullable(Currency$outboundSchema).optional(),
168
+ country: z.nullable(z.string()).optional(),
169
+ }).transform((v) => {
170
+ return remap$(v, {
171
+ bankName: "bank_name",
172
+ accountNumber: "account_number",
173
+ accountName: "account_name",
174
+ accountType: "account_type",
175
+ routingNumber: "routing_number",
176
+ bsbNumber: "bsb_number",
177
+ branchIdentifier: "branch_identifier",
178
+ bankCode: "bank_code",
179
+ });
180
+ });
181
+
182
+ /**
183
+ * @internal
184
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
185
+ */
186
+ export namespace BankAccount1$ {
187
+ /** @deprecated use `BankAccount1$inboundSchema` instead. */
188
+ export const inboundSchema = BankAccount1$inboundSchema;
189
+ /** @deprecated use `BankAccount1$outboundSchema` instead. */
190
+ export const outboundSchema = BankAccount1$outboundSchema;
191
+ /** @deprecated use `BankAccount1$Outbound` instead. */
192
+ export type Outbound = BankAccount1$Outbound;
193
+ }
194
+
195
+ export function bankAccount1ToJSON(bankAccount1: BankAccount1): string {
196
+ return JSON.stringify(BankAccount1$outboundSchema.parse(bankAccount1));
197
+ }
198
+
199
+ export function bankAccount1FromJSON(
200
+ jsonString: string,
201
+ ): SafeParseResult<BankAccount1, SDKValidationError> {
202
+ return safeParse(
203
+ jsonString,
204
+ (x) => BankAccount1$inboundSchema.parse(JSON.parse(x)),
205
+ `Failed to parse 'BankAccount1' from JSON`,
206
+ );
207
+ }
@@ -15,11 +15,11 @@ import {
15
15
  Address$outboundSchema,
16
16
  } from "./address.js";
17
17
  import {
18
- BankAccount,
19
- BankAccount$inboundSchema,
20
- BankAccount$Outbound,
21
- BankAccount$outboundSchema,
22
- } from "./bankaccount.js";
18
+ BankAccount1,
19
+ BankAccount1$inboundSchema,
20
+ BankAccount1$Outbound,
21
+ BankAccount1$outboundSchema,
22
+ } from "./bankaccount1.js";
23
23
  import {
24
24
  Currency,
25
25
  Currency$inboundSchema,
@@ -67,7 +67,7 @@ export type CompanyRowType = {
67
67
  name?: string | null | undefined;
68
68
  };
69
69
 
70
- export type Company = {
70
+ export type Company1 = {
71
71
  /**
72
72
  * Unique identifier for the company
73
73
  */
@@ -156,7 +156,7 @@ export type Company = {
156
156
  * Parent ID
157
157
  */
158
158
  parentId?: string | null | undefined;
159
- bankAccounts?: Array<BankAccount> | undefined;
159
+ bankAccounts?: Array<BankAccount1> | undefined;
160
160
  websites?: Array<Website> | undefined;
161
161
  addresses?: Array<Address> | undefined;
162
162
  socialLinks?: Array<SocialLink> | undefined;
@@ -211,7 +211,7 @@ export type Company = {
211
211
  passThrough?: Array<PassThroughBody> | undefined;
212
212
  };
213
213
 
214
- export type CompanyInput = {
214
+ export type Company1Input = {
215
215
  /**
216
216
  * Name of the company
217
217
  */
@@ -288,7 +288,7 @@ export type CompanyInput = {
288
288
  * The last name of the person.
289
289
  */
290
290
  lastName?: string | null | undefined;
291
- bankAccounts?: Array<BankAccount> | undefined;
291
+ bankAccounts?: Array<BankAccount1> | undefined;
292
292
  websites?: Array<Website> | undefined;
293
293
  addresses?: Array<Address> | undefined;
294
294
  socialLinks?: Array<SocialLink> | undefined;
@@ -369,88 +369,91 @@ export function companyRowTypeFromJSON(
369
369
  }
370
370
 
371
371
  /** @internal */
372
- export const Company$inboundSchema: z.ZodType<Company, z.ZodTypeDef, unknown> =
373
- z.object({
374
- id: z.string().optional(),
375
- name: z.nullable(z.string()),
376
- interaction_count: z.nullable(z.number().int()).optional(),
377
- owner_id: z.nullable(z.string()).optional(),
378
- image: z.nullable(z.string()).optional(),
379
- description: z.nullable(z.string()).optional(),
380
- vat_number: z.nullable(z.string()).optional(),
381
- currency: z.nullable(Currency$inboundSchema).optional(),
382
- status: z.nullable(z.string()).optional(),
383
- fax: z.nullable(z.string()).optional(),
384
- annual_revenue: z.nullable(z.string()).optional(),
385
- number_of_employees: z.nullable(z.string()).optional(),
386
- industry: z.nullable(z.string()).optional(),
387
- ownership: z.nullable(z.string()).optional(),
388
- sales_tax_number: z.nullable(z.string()).optional(),
389
- payee_number: z.nullable(z.string()).optional(),
390
- abn_or_tfn: z.nullable(z.string()).optional(),
391
- abn_branch: z.nullable(z.string()).optional(),
392
- acn: z.nullable(z.string()).optional(),
393
- first_name: z.nullable(z.string()).optional(),
394
- last_name: z.nullable(z.string()).optional(),
395
- parent_id: z.nullable(z.string()).optional(),
396
- bank_accounts: z.array(BankAccount$inboundSchema).optional(),
397
- websites: z.array(Website$inboundSchema).optional(),
398
- addresses: z.array(Address$inboundSchema).optional(),
399
- social_links: z.array(SocialLink$inboundSchema).optional(),
400
- phone_numbers: z.array(PhoneNumber$inboundSchema).optional(),
401
- emails: z.array(Email$inboundSchema).optional(),
402
- row_type: z.lazy(() => CompanyRowType$inboundSchema).optional(),
403
- custom_fields: z.array(CustomField$inboundSchema).optional(),
404
- tags: z.nullable(z.array(z.string())).optional(),
405
- read_only: z.nullable(z.boolean()).optional(),
406
- last_activity_at: z.nullable(
407
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
408
- ).optional(),
409
- deleted: z.boolean().optional(),
410
- salutation: z.nullable(z.string()).optional(),
411
- birthday: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
412
- custom_mappings: z.nullable(z.record(z.any())).optional(),
413
- updated_by: z.nullable(z.string()).optional(),
414
- created_by: z.nullable(z.string()).optional(),
415
- updated_at: z.nullable(
416
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
417
- ).optional(),
418
- created_at: z.nullable(
419
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
420
- ).optional(),
421
- pass_through: z.array(PassThroughBody$inboundSchema).optional(),
422
- }).transform((v) => {
423
- return remap$(v, {
424
- "interaction_count": "interactionCount",
425
- "owner_id": "ownerId",
426
- "vat_number": "vatNumber",
427
- "annual_revenue": "annualRevenue",
428
- "number_of_employees": "numberOfEmployees",
429
- "sales_tax_number": "salesTaxNumber",
430
- "payee_number": "payeeNumber",
431
- "abn_or_tfn": "abnOrTfn",
432
- "abn_branch": "abnBranch",
433
- "first_name": "firstName",
434
- "last_name": "lastName",
435
- "parent_id": "parentId",
436
- "bank_accounts": "bankAccounts",
437
- "social_links": "socialLinks",
438
- "phone_numbers": "phoneNumbers",
439
- "row_type": "rowType",
440
- "custom_fields": "customFields",
441
- "read_only": "readOnly",
442
- "last_activity_at": "lastActivityAt",
443
- "custom_mappings": "customMappings",
444
- "updated_by": "updatedBy",
445
- "created_by": "createdBy",
446
- "updated_at": "updatedAt",
447
- "created_at": "createdAt",
448
- "pass_through": "passThrough",
449
- });
372
+ export const Company1$inboundSchema: z.ZodType<
373
+ Company1,
374
+ z.ZodTypeDef,
375
+ unknown
376
+ > = z.object({
377
+ id: z.string().optional(),
378
+ name: z.nullable(z.string()),
379
+ interaction_count: z.nullable(z.number().int()).optional(),
380
+ owner_id: z.nullable(z.string()).optional(),
381
+ image: z.nullable(z.string()).optional(),
382
+ description: z.nullable(z.string()).optional(),
383
+ vat_number: z.nullable(z.string()).optional(),
384
+ currency: z.nullable(Currency$inboundSchema).optional(),
385
+ status: z.nullable(z.string()).optional(),
386
+ fax: z.nullable(z.string()).optional(),
387
+ annual_revenue: z.nullable(z.string()).optional(),
388
+ number_of_employees: z.nullable(z.string()).optional(),
389
+ industry: z.nullable(z.string()).optional(),
390
+ ownership: z.nullable(z.string()).optional(),
391
+ sales_tax_number: z.nullable(z.string()).optional(),
392
+ payee_number: z.nullable(z.string()).optional(),
393
+ abn_or_tfn: z.nullable(z.string()).optional(),
394
+ abn_branch: z.nullable(z.string()).optional(),
395
+ acn: z.nullable(z.string()).optional(),
396
+ first_name: z.nullable(z.string()).optional(),
397
+ last_name: z.nullable(z.string()).optional(),
398
+ parent_id: z.nullable(z.string()).optional(),
399
+ bank_accounts: z.array(BankAccount1$inboundSchema).optional(),
400
+ websites: z.array(Website$inboundSchema).optional(),
401
+ addresses: z.array(Address$inboundSchema).optional(),
402
+ social_links: z.array(SocialLink$inboundSchema).optional(),
403
+ phone_numbers: z.array(PhoneNumber$inboundSchema).optional(),
404
+ emails: z.array(Email$inboundSchema).optional(),
405
+ row_type: z.lazy(() => CompanyRowType$inboundSchema).optional(),
406
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
407
+ tags: z.nullable(z.array(z.string())).optional(),
408
+ read_only: z.nullable(z.boolean()).optional(),
409
+ last_activity_at: z.nullable(
410
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
411
+ ).optional(),
412
+ deleted: z.boolean().optional(),
413
+ salutation: z.nullable(z.string()).optional(),
414
+ birthday: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
415
+ custom_mappings: z.nullable(z.record(z.any())).optional(),
416
+ updated_by: z.nullable(z.string()).optional(),
417
+ created_by: z.nullable(z.string()).optional(),
418
+ updated_at: z.nullable(
419
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
420
+ ).optional(),
421
+ created_at: z.nullable(
422
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
423
+ ).optional(),
424
+ pass_through: z.array(PassThroughBody$inboundSchema).optional(),
425
+ }).transform((v) => {
426
+ return remap$(v, {
427
+ "interaction_count": "interactionCount",
428
+ "owner_id": "ownerId",
429
+ "vat_number": "vatNumber",
430
+ "annual_revenue": "annualRevenue",
431
+ "number_of_employees": "numberOfEmployees",
432
+ "sales_tax_number": "salesTaxNumber",
433
+ "payee_number": "payeeNumber",
434
+ "abn_or_tfn": "abnOrTfn",
435
+ "abn_branch": "abnBranch",
436
+ "first_name": "firstName",
437
+ "last_name": "lastName",
438
+ "parent_id": "parentId",
439
+ "bank_accounts": "bankAccounts",
440
+ "social_links": "socialLinks",
441
+ "phone_numbers": "phoneNumbers",
442
+ "row_type": "rowType",
443
+ "custom_fields": "customFields",
444
+ "read_only": "readOnly",
445
+ "last_activity_at": "lastActivityAt",
446
+ "custom_mappings": "customMappings",
447
+ "updated_by": "updatedBy",
448
+ "created_by": "createdBy",
449
+ "updated_at": "updatedAt",
450
+ "created_at": "createdAt",
451
+ "pass_through": "passThrough",
450
452
  });
453
+ });
451
454
 
452
455
  /** @internal */
453
- export type Company$Outbound = {
456
+ export type Company1$Outbound = {
454
457
  id?: string | undefined;
455
458
  name: string | null;
456
459
  interaction_count?: number | null | undefined;
@@ -473,7 +476,7 @@ export type Company$Outbound = {
473
476
  first_name?: string | null | undefined;
474
477
  last_name?: string | null | undefined;
475
478
  parent_id?: string | null | undefined;
476
- bank_accounts?: Array<BankAccount$Outbound> | undefined;
479
+ bank_accounts?: Array<BankAccount1$Outbound> | undefined;
477
480
  websites?: Array<Website$Outbound> | undefined;
478
481
  addresses?: Array<Address$Outbound> | undefined;
479
482
  social_links?: Array<SocialLink$Outbound> | undefined;
@@ -496,10 +499,10 @@ export type Company$Outbound = {
496
499
  };
497
500
 
498
501
  /** @internal */
499
- export const Company$outboundSchema: z.ZodType<
500
- Company$Outbound,
502
+ export const Company1$outboundSchema: z.ZodType<
503
+ Company1$Outbound,
501
504
  z.ZodTypeDef,
502
- Company
505
+ Company1
503
506
  > = z.object({
504
507
  id: z.string().optional(),
505
508
  name: z.nullable(z.string()),
@@ -523,7 +526,7 @@ export const Company$outboundSchema: z.ZodType<
523
526
  firstName: z.nullable(z.string()).optional(),
524
527
  lastName: z.nullable(z.string()).optional(),
525
528
  parentId: z.nullable(z.string()).optional(),
526
- bankAccounts: z.array(BankAccount$outboundSchema).optional(),
529
+ bankAccounts: z.array(BankAccount1$outboundSchema).optional(),
527
530
  websites: z.array(Website$outboundSchema).optional(),
528
531
  addresses: z.array(Address$outboundSchema).optional(),
529
532
  socialLinks: z.array(SocialLink$outboundSchema).optional(),
@@ -579,32 +582,32 @@ export const Company$outboundSchema: z.ZodType<
579
582
  * @internal
580
583
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
581
584
  */
582
- export namespace Company$ {
583
- /** @deprecated use `Company$inboundSchema` instead. */
584
- export const inboundSchema = Company$inboundSchema;
585
- /** @deprecated use `Company$outboundSchema` instead. */
586
- export const outboundSchema = Company$outboundSchema;
587
- /** @deprecated use `Company$Outbound` instead. */
588
- export type Outbound = Company$Outbound;
585
+ export namespace Company1$ {
586
+ /** @deprecated use `Company1$inboundSchema` instead. */
587
+ export const inboundSchema = Company1$inboundSchema;
588
+ /** @deprecated use `Company1$outboundSchema` instead. */
589
+ export const outboundSchema = Company1$outboundSchema;
590
+ /** @deprecated use `Company1$Outbound` instead. */
591
+ export type Outbound = Company1$Outbound;
589
592
  }
590
593
 
591
- export function companyToJSON(company: Company): string {
592
- return JSON.stringify(Company$outboundSchema.parse(company));
594
+ export function company1ToJSON(company1: Company1): string {
595
+ return JSON.stringify(Company1$outboundSchema.parse(company1));
593
596
  }
594
597
 
595
- export function companyFromJSON(
598
+ export function company1FromJSON(
596
599
  jsonString: string,
597
- ): SafeParseResult<Company, SDKValidationError> {
600
+ ): SafeParseResult<Company1, SDKValidationError> {
598
601
  return safeParse(
599
602
  jsonString,
600
- (x) => Company$inboundSchema.parse(JSON.parse(x)),
601
- `Failed to parse 'Company' from JSON`,
603
+ (x) => Company1$inboundSchema.parse(JSON.parse(x)),
604
+ `Failed to parse 'Company1' from JSON`,
602
605
  );
603
606
  }
604
607
 
605
608
  /** @internal */
606
- export const CompanyInput$inboundSchema: z.ZodType<
607
- CompanyInput,
609
+ export const Company1Input$inboundSchema: z.ZodType<
610
+ Company1Input,
608
611
  z.ZodTypeDef,
609
612
  unknown
610
613
  > = z.object({
@@ -627,7 +630,7 @@ export const CompanyInput$inboundSchema: z.ZodType<
627
630
  acn: z.nullable(z.string()).optional(),
628
631
  first_name: z.nullable(z.string()).optional(),
629
632
  last_name: z.nullable(z.string()).optional(),
630
- bank_accounts: z.array(BankAccount$inboundSchema).optional(),
633
+ bank_accounts: z.array(BankAccount1$inboundSchema).optional(),
631
634
  websites: z.array(Website$inboundSchema).optional(),
632
635
  addresses: z.array(Address$inboundSchema).optional(),
633
636
  social_links: z.array(SocialLink$inboundSchema).optional(),
@@ -663,7 +666,7 @@ export const CompanyInput$inboundSchema: z.ZodType<
663
666
  });
664
667
 
665
668
  /** @internal */
666
- export type CompanyInput$Outbound = {
669
+ export type Company1Input$Outbound = {
667
670
  name: string | null;
668
671
  owner_id?: string | null | undefined;
669
672
  image?: string | null | undefined;
@@ -683,7 +686,7 @@ export type CompanyInput$Outbound = {
683
686
  acn?: string | null | undefined;
684
687
  first_name?: string | null | undefined;
685
688
  last_name?: string | null | undefined;
686
- bank_accounts?: Array<BankAccount$Outbound> | undefined;
689
+ bank_accounts?: Array<BankAccount1$Outbound> | undefined;
687
690
  websites?: Array<Website$Outbound> | undefined;
688
691
  addresses?: Array<Address$Outbound> | undefined;
689
692
  social_links?: Array<SocialLink$Outbound> | undefined;
@@ -699,10 +702,10 @@ export type CompanyInput$Outbound = {
699
702
  };
700
703
 
701
704
  /** @internal */
702
- export const CompanyInput$outboundSchema: z.ZodType<
703
- CompanyInput$Outbound,
705
+ export const Company1Input$outboundSchema: z.ZodType<
706
+ Company1Input$Outbound,
704
707
  z.ZodTypeDef,
705
- CompanyInput
708
+ Company1Input
706
709
  > = z.object({
707
710
  name: z.nullable(z.string()),
708
711
  ownerId: z.nullable(z.string()).optional(),
@@ -723,7 +726,7 @@ export const CompanyInput$outboundSchema: z.ZodType<
723
726
  acn: z.nullable(z.string()).optional(),
724
727
  firstName: z.nullable(z.string()).optional(),
725
728
  lastName: z.nullable(z.string()).optional(),
726
- bankAccounts: z.array(BankAccount$outboundSchema).optional(),
729
+ bankAccounts: z.array(BankAccount1$outboundSchema).optional(),
727
730
  websites: z.array(Website$outboundSchema).optional(),
728
731
  addresses: z.array(Address$outboundSchema).optional(),
729
732
  socialLinks: z.array(SocialLink$outboundSchema).optional(),
@@ -763,25 +766,25 @@ export const CompanyInput$outboundSchema: z.ZodType<
763
766
  * @internal
764
767
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
765
768
  */
766
- export namespace CompanyInput$ {
767
- /** @deprecated use `CompanyInput$inboundSchema` instead. */
768
- export const inboundSchema = CompanyInput$inboundSchema;
769
- /** @deprecated use `CompanyInput$outboundSchema` instead. */
770
- export const outboundSchema = CompanyInput$outboundSchema;
771
- /** @deprecated use `CompanyInput$Outbound` instead. */
772
- export type Outbound = CompanyInput$Outbound;
769
+ export namespace Company1Input$ {
770
+ /** @deprecated use `Company1Input$inboundSchema` instead. */
771
+ export const inboundSchema = Company1Input$inboundSchema;
772
+ /** @deprecated use `Company1Input$outboundSchema` instead. */
773
+ export const outboundSchema = Company1Input$outboundSchema;
774
+ /** @deprecated use `Company1Input$Outbound` instead. */
775
+ export type Outbound = Company1Input$Outbound;
773
776
  }
774
777
 
775
- export function companyInputToJSON(companyInput: CompanyInput): string {
776
- return JSON.stringify(CompanyInput$outboundSchema.parse(companyInput));
778
+ export function company1InputToJSON(company1Input: Company1Input): string {
779
+ return JSON.stringify(Company1Input$outboundSchema.parse(company1Input));
777
780
  }
778
781
 
779
- export function companyInputFromJSON(
782
+ export function company1InputFromJSON(
780
783
  jsonString: string,
781
- ): SafeParseResult<CompanyInput, SDKValidationError> {
784
+ ): SafeParseResult<Company1Input, SDKValidationError> {
782
785
  return safeParse(
783
786
  jsonString,
784
- (x) => CompanyInput$inboundSchema.parse(JSON.parse(x)),
785
- `Failed to parse 'CompanyInput' from JSON`,
787
+ (x) => Company1Input$inboundSchema.parse(JSON.parse(x)),
788
+ `Failed to parse 'Company1Input' from JSON`,
786
789
  );
787
790
  }