@apideck/unify 0.27.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.
- package/README.md +5 -5
- package/docs/sdks/companies/README.md +4 -4
- package/examples/README.md +26 -0
- package/examples/accountingTaxRatesList.example.ts +41 -0
- package/examples/package-lock.json +613 -0
- package/examples/package.json +18 -0
- package/funcs/crmCompaniesCreate.js +1 -1
- package/funcs/crmCompaniesCreate.js.map +1 -1
- package/funcs/crmCompaniesUpdate.js +1 -1
- package/funcs/crmCompaniesUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/bankaccount.d.ts +5 -0
- package/models/components/bankaccount.d.ts.map +1 -1
- package/models/components/bankaccount.js +2 -0
- package/models/components/bankaccount.js.map +1 -1
- package/models/components/bankaccount1.d.ts +123 -0
- package/models/components/bankaccount1.d.ts.map +1 -0
- package/models/components/bankaccount1.js +128 -0
- package/models/components/bankaccount1.js.map +1 -0
- package/models/components/{company.d.ts → company1.d.ts} +32 -32
- package/models/components/company1.d.ts.map +1 -0
- package/models/components/{company.js → company1.js} +37 -37
- package/models/components/company1.js.map +1 -0
- package/models/components/companyinfo.d.ts +5 -0
- package/models/components/companyinfo.d.ts.map +1 -1
- package/models/components/companyinfo.js +4 -0
- package/models/components/companyinfo.js.map +1 -1
- package/models/components/getcompaniesresponse.d.ts +3 -3
- package/models/components/getcompaniesresponse.d.ts.map +1 -1
- package/models/components/getcompaniesresponse.js +3 -3
- package/models/components/getcompaniesresponse.js.map +1 -1
- package/models/components/getcompanyresponse.d.ts +3 -3
- package/models/components/getcompanyresponse.d.ts.map +1 -1
- package/models/components/getcompanyresponse.js +3 -3
- package/models/components/getcompanyresponse.js.map +1 -1
- package/models/components/index.d.ts +2 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -1
- package/models/components/index.js.map +1 -1
- package/models/components/supplier.d.ts +10 -0
- package/models/components/supplier.d.ts.map +1 -1
- package/models/components/supplier.js +4 -0
- package/models/components/supplier.js.map +1 -1
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +8 -2
- package/models/errors/apierror.js.map +1 -1
- package/models/errors/badrequestresponse.js +1 -1
- package/models/errors/badrequestresponse.js.map +1 -1
- package/models/errors/notfoundresponse.js +1 -1
- package/models/errors/notfoundresponse.js.map +1 -1
- package/models/errors/paymentrequiredresponse.js +1 -1
- package/models/errors/paymentrequiredresponse.js.map +1 -1
- package/models/errors/unauthorizedresponse.js +1 -1
- package/models/errors/unauthorizedresponse.js.map +1 -1
- package/models/errors/unprocessableresponse.js +1 -1
- package/models/errors/unprocessableresponse.js.map +1 -1
- package/models/operations/crmcompaniesadd.d.ts +2 -2
- package/models/operations/crmcompaniesadd.d.ts.map +1 -1
- package/models/operations/crmcompaniesadd.js +4 -4
- package/models/operations/crmcompaniesadd.js.map +1 -1
- package/models/operations/crmcompaniesupdate.d.ts +2 -2
- package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
- package/models/operations/crmcompaniesupdate.js +4 -4
- package/models/operations/crmcompaniesupdate.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/activities.test.ts +360 -9
- package/src/__tests__/apideckcompanies.test.ts +373 -9
- package/src/__tests__/apideckdepartments.test.ts +181 -9
- package/src/__tests__/applicants.test.ts +473 -9
- package/src/__tests__/applications.test.ts +189 -9
- package/src/__tests__/billpayments.test.ts +367 -9
- package/src/__tests__/bills.test.ts +500 -9
- package/src/__tests__/collectionticketcomments.test.ts +183 -7
- package/src/__tests__/collectiontickets.test.ts +191 -7
- package/src/__tests__/companies.test.ts +538 -9
- package/src/__tests__/connections.test.ts +409 -5
- package/src/__tests__/connectionsettings.test.ts +410 -5
- package/src/__tests__/contacts.test.ts +466 -9
- package/src/__tests__/creditnotes.test.ts +758 -87
- package/src/__tests__/customers.test.ts +513 -9
- package/src/__tests__/customobjects.test.ts +150 -9
- package/src/__tests__/customobjectschemas.test.ts +321 -9
- package/src/__tests__/departments.test.ts +173 -9
- package/src/__tests__/drivegroups.test.ts +181 -9
- package/src/__tests__/drives.test.ts +179 -9
- package/src/__tests__/employees.test.ts +829 -94
- package/src/__tests__/expenses.test.ts +332 -9
- package/src/__tests__/files.test.ts +106 -5
- package/src/__tests__/folders.test.ts +296 -13
- package/src/__tests__/invoiceitems.test.ts +272 -9
- package/src/__tests__/invoices.test.ts +673 -67
- package/src/__tests__/journalentries.test.ts +490 -8
- package/src/__tests__/leads.test.ts +446 -9
- package/src/__tests__/ledgeraccounts.test.ts +237 -8
- package/src/__tests__/locations.test.ts +298 -9
- package/src/__tests__/messages.test.ts +195 -9
- package/src/__tests__/notes.test.ts +191 -9
- package/src/__tests__/opportunities.test.ts +218 -9
- package/src/__tests__/payments.test.ts +312 -9
- package/src/__tests__/pipelines.test.ts +194 -9
- package/src/__tests__/purchaseorders.test.ts +773 -104
- package/src/__tests__/sharedlinks.test.ts +183 -9
- package/src/__tests__/subsidiaries.test.ts +183 -9
- package/src/__tests__/suppliers.test.ts +505 -9
- package/src/__tests__/taxrates.test.ts +232 -9
- package/src/__tests__/timeoffrequests.test.ts +210 -9
- package/src/__tests__/trackingcategories.test.ts +187 -7
- package/src/__tests__/uploadsessions.test.ts +78 -5
- package/src/__tests__/users.test.ts +356 -9
- package/src/funcs/crmCompaniesCreate.ts +1 -1
- package/src/funcs/crmCompaniesUpdate.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/models/components/bankaccount.ts +7 -0
- package/src/models/components/bankaccount1.ts +207 -0
- package/src/models/components/{company.ts → company1.ts} +131 -128
- package/src/models/components/companyinfo.ts +9 -0
- package/src/models/components/getcompaniesresponse.ts +9 -9
- package/src/models/components/getcompanyresponse.ts +9 -9
- package/src/models/components/index.ts +2 -1
- package/src/models/components/supplier.ts +14 -0
- package/src/models/errors/apierror.ts +8 -2
- package/src/models/errors/badrequestresponse.ts +1 -1
- package/src/models/errors/notfoundresponse.ts +1 -1
- package/src/models/errors/paymentrequiredresponse.ts +1 -1
- package/src/models/errors/unauthorizedresponse.ts +1 -1
- package/src/models/errors/unprocessableresponse.ts +1 -1
- package/src/models/operations/crmcompaniesadd.ts +6 -6
- package/src/models/operations/crmcompaniesupdate.ts +6 -6
- package/models/components/company.d.ts.map +0 -1
- 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.
|
|
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.
|
|
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.
|
|
71
|
-
sdkVersion: "0.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
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
|
|
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<
|
|
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
|
|
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<
|
|
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
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
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
|
|
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<
|
|
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
|
|
500
|
-
|
|
502
|
+
export const Company1$outboundSchema: z.ZodType<
|
|
503
|
+
Company1$Outbound,
|
|
501
504
|
z.ZodTypeDef,
|
|
502
|
-
|
|
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(
|
|
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
|
|
583
|
-
/** @deprecated use `
|
|
584
|
-
export const inboundSchema =
|
|
585
|
-
/** @deprecated use `
|
|
586
|
-
export const outboundSchema =
|
|
587
|
-
/** @deprecated use `
|
|
588
|
-
export type 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
|
|
592
|
-
return JSON.stringify(
|
|
594
|
+
export function company1ToJSON(company1: Company1): string {
|
|
595
|
+
return JSON.stringify(Company1$outboundSchema.parse(company1));
|
|
593
596
|
}
|
|
594
597
|
|
|
595
|
-
export function
|
|
598
|
+
export function company1FromJSON(
|
|
596
599
|
jsonString: string,
|
|
597
|
-
): SafeParseResult<
|
|
600
|
+
): SafeParseResult<Company1, SDKValidationError> {
|
|
598
601
|
return safeParse(
|
|
599
602
|
jsonString,
|
|
600
|
-
(x) =>
|
|
601
|
-
`Failed to parse '
|
|
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
|
|
607
|
-
|
|
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(
|
|
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
|
|
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<
|
|
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
|
|
703
|
-
|
|
705
|
+
export const Company1Input$outboundSchema: z.ZodType<
|
|
706
|
+
Company1Input$Outbound,
|
|
704
707
|
z.ZodTypeDef,
|
|
705
|
-
|
|
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(
|
|
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
|
|
767
|
-
/** @deprecated use `
|
|
768
|
-
export const inboundSchema =
|
|
769
|
-
/** @deprecated use `
|
|
770
|
-
export const outboundSchema =
|
|
771
|
-
/** @deprecated use `
|
|
772
|
-
export type 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
|
|
776
|
-
return JSON.stringify(
|
|
778
|
+
export function company1InputToJSON(company1Input: Company1Input): string {
|
|
779
|
+
return JSON.stringify(Company1Input$outboundSchema.parse(company1Input));
|
|
777
780
|
}
|
|
778
781
|
|
|
779
|
-
export function
|
|
782
|
+
export function company1InputFromJSON(
|
|
780
783
|
jsonString: string,
|
|
781
|
-
): SafeParseResult<
|
|
784
|
+
): SafeParseResult<Company1Input, SDKValidationError> {
|
|
782
785
|
return safeParse(
|
|
783
786
|
jsonString,
|
|
784
|
-
(x) =>
|
|
785
|
-
`Failed to parse '
|
|
787
|
+
(x) => Company1Input$inboundSchema.parse(JSON.parse(x)),
|
|
788
|
+
`Failed to parse 'Company1Input' from JSON`,
|
|
786
789
|
);
|
|
787
790
|
}
|