@apideck/unify 0.27.0 → 0.28.1
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/categories/README.md +12 -0
- 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/accountingCategoriesGet.d.ts.map +1 -1
- package/funcs/accountingCategoriesGet.js +4 -2
- package/funcs/accountingCategoriesGet.js.map +1 -1
- package/funcs/accountingCategoriesList.d.ts.map +1 -1
- package/funcs/accountingCategoriesList.js +4 -2
- package/funcs/accountingCategoriesList.js.map +1 -1
- 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/balancesheetfilter.d.ts +5 -0
- package/models/components/balancesheetfilter.d.ts.map +1 -1
- package/models/components/balancesheetfilter.js +4 -0
- package/models/components/balancesheetfilter.js.map +1 -1
- 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/categoriesfilter.d.ts +67 -0
- package/models/components/categoriesfilter.d.ts.map +1 -0
- package/models/components/categoriesfilter.js +82 -0
- package/models/components/categoriesfilter.js.map +1 -0
- package/models/components/category.d.ts +39 -0
- package/models/components/category.d.ts.map +1 -1
- package/models/components/category.js +26 -1
- package/models/components/category.js.map +1 -1
- 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/connection.d.ts +13 -13
- package/models/components/connection.d.ts.map +1 -1
- package/models/components/connection.js +16 -17
- package/models/components/connection.js.map +1 -1
- package/models/components/customfield.d.ts +37 -38
- package/models/components/customfield.d.ts.map +1 -1
- package/models/components/customfield.js +25 -54
- package/models/components/customfield.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 +3 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -1
- package/models/components/index.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +10 -0
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js +8 -0
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/profitandlossfilter.d.ts +5 -0
- package/models/components/profitandlossfilter.d.ts.map +1 -1
- package/models/components/profitandlossfilter.js +4 -0
- package/models/components/profitandlossfilter.js.map +1 -1
- package/models/components/simpleformfieldoption.d.ts +13 -13
- package/models/components/simpleformfieldoption.d.ts.map +1 -1
- package/models/components/simpleformfieldoption.js +16 -16
- package/models/components/simpleformfieldoption.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/accountingcategoriesall.d.ts +5 -0
- package/models/operations/accountingcategoriesall.d.ts.map +1 -1
- package/models/operations/accountingcategoriesall.js +2 -0
- package/models/operations/accountingcategoriesall.js.map +1 -1
- package/models/operations/accountingcategoriesone.d.ts +5 -0
- package/models/operations/accountingcategoriesone.d.ts.map +1 -1
- package/models/operations/accountingcategoriesone.js +2 -0
- package/models/operations/accountingcategoriesone.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 +2 -2
- package/src/__tests__/activities.test.ts +364 -13
- 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__/bankfeedaccounts.test.ts +4 -4
- package/src/__tests__/billpayments.test.ts +378 -20
- 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 +607 -78
- package/src/__tests__/connections.test.ts +409 -5
- package/src/__tests__/connectionsettings.test.ts +410 -5
- package/src/__tests__/contacts.test.ts +470 -13
- package/src/__tests__/creditnotes.test.ts +819 -148
- package/src/__tests__/customers.test.ts +517 -13
- 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 +338 -15
- 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 +695 -89
- package/src/__tests__/journalentries.test.ts +490 -8
- package/src/__tests__/leads.test.ts +450 -13
- package/src/__tests__/ledgeraccounts.test.ts +248 -19
- 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 +323 -20
- package/src/__tests__/pipelines.test.ts +194 -9
- package/src/__tests__/purchaseorders.test.ts +847 -178
- package/src/__tests__/sharedlinks.test.ts +183 -9
- package/src/__tests__/subsidiaries.test.ts +183 -9
- package/src/__tests__/suppliers.test.ts +509 -13
- package/src/__tests__/taxrates.test.ts +235 -12
- 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/accountingCategoriesGet.ts +15 -5
- package/src/funcs/accountingCategoriesList.ts +17 -7
- 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/balancesheetfilter.ts +9 -0
- package/src/models/components/bankaccount.ts +7 -0
- package/src/models/components/bankaccount1.ts +207 -0
- package/src/models/components/categoriesfilter.ts +104 -0
- package/src/models/components/category.ts +39 -0
- package/src/models/components/{company.ts → company1.ts} +131 -128
- package/src/models/components/companyinfo.ts +9 -0
- package/src/models/components/connection.ts +27 -20
- package/src/models/components/customfield.ts +51 -83
- package/src/models/components/getcompaniesresponse.ts +9 -9
- package/src/models/components/getcompanyresponse.ts +9 -9
- package/src/models/components/index.ts +3 -1
- package/src/models/components/invoicelineitem.ts +18 -0
- package/src/models/components/profitandlossfilter.ts +9 -0
- package/src/models/components/simpleformfieldoption.ts +21 -18
- 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/accountingcategoriesall.ts +7 -0
- package/src/models/operations/accountingcategoriesone.ts +7 -0
- 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
|
@@ -7,17 +7,14 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
export type Four = {};
|
|
10
|
+
export type Five = string | number | boolean | { [k: string]: any };
|
|
13
11
|
|
|
14
12
|
export type Value =
|
|
15
|
-
| Four
|
|
16
13
|
| string
|
|
17
14
|
| number
|
|
18
15
|
| boolean
|
|
19
|
-
|
|
|
20
|
-
| Array<
|
|
16
|
+
| { [k: string]: any }
|
|
17
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
21
18
|
|
|
22
19
|
export type CustomField = {
|
|
23
20
|
/**
|
|
@@ -33,111 +30,74 @@ export type CustomField = {
|
|
|
33
30
|
*/
|
|
34
31
|
description?: string | null | undefined;
|
|
35
32
|
value?:
|
|
36
|
-
| Four
|
|
37
33
|
| string
|
|
38
34
|
| number
|
|
39
35
|
| boolean
|
|
40
|
-
|
|
|
41
|
-
| Array<
|
|
36
|
+
| { [k: string]: any }
|
|
37
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
42
38
|
| null
|
|
43
39
|
| undefined;
|
|
44
40
|
};
|
|
45
41
|
|
|
46
42
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
export type Six$Outbound = {};
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six> = z
|
|
55
|
-
.object({});
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
-
*/
|
|
61
|
-
export namespace Six$ {
|
|
62
|
-
/** @deprecated use `Six$inboundSchema` instead. */
|
|
63
|
-
export const inboundSchema = Six$inboundSchema;
|
|
64
|
-
/** @deprecated use `Six$outboundSchema` instead. */
|
|
65
|
-
export const outboundSchema = Six$outboundSchema;
|
|
66
|
-
/** @deprecated use `Six$Outbound` instead. */
|
|
67
|
-
export type Outbound = Six$Outbound;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function sixToJSON(six: Six): string {
|
|
71
|
-
return JSON.stringify(Six$outboundSchema.parse(six));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function sixFromJSON(
|
|
75
|
-
jsonString: string,
|
|
76
|
-
): SafeParseResult<Six, SDKValidationError> {
|
|
77
|
-
return safeParse(
|
|
78
|
-
jsonString,
|
|
79
|
-
(x) => Six$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
-
`Failed to parse 'Six' from JSON`,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/** @internal */
|
|
85
|
-
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
86
|
-
.object({});
|
|
43
|
+
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
44
|
+
.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
87
45
|
|
|
88
46
|
/** @internal */
|
|
89
|
-
export type
|
|
47
|
+
export type Five$Outbound = string | number | boolean | { [k: string]: any };
|
|
90
48
|
|
|
91
49
|
/** @internal */
|
|
92
|
-
export const
|
|
93
|
-
z.
|
|
50
|
+
export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
|
|
51
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
94
52
|
|
|
95
53
|
/**
|
|
96
54
|
* @internal
|
|
97
55
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
56
|
*/
|
|
99
|
-
export namespace
|
|
100
|
-
/** @deprecated use `
|
|
101
|
-
export const inboundSchema =
|
|
102
|
-
/** @deprecated use `
|
|
103
|
-
export const outboundSchema =
|
|
104
|
-
/** @deprecated use `
|
|
105
|
-
export type Outbound =
|
|
57
|
+
export namespace Five$ {
|
|
58
|
+
/** @deprecated use `Five$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = Five$inboundSchema;
|
|
60
|
+
/** @deprecated use `Five$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = Five$outboundSchema;
|
|
62
|
+
/** @deprecated use `Five$Outbound` instead. */
|
|
63
|
+
export type Outbound = Five$Outbound;
|
|
106
64
|
}
|
|
107
65
|
|
|
108
|
-
export function
|
|
109
|
-
return JSON.stringify(
|
|
66
|
+
export function fiveToJSON(five: Five): string {
|
|
67
|
+
return JSON.stringify(Five$outboundSchema.parse(five));
|
|
110
68
|
}
|
|
111
69
|
|
|
112
|
-
export function
|
|
70
|
+
export function fiveFromJSON(
|
|
113
71
|
jsonString: string,
|
|
114
|
-
): SafeParseResult<
|
|
72
|
+
): SafeParseResult<Five, SDKValidationError> {
|
|
115
73
|
return safeParse(
|
|
116
74
|
jsonString,
|
|
117
|
-
(x) =>
|
|
118
|
-
`Failed to parse '
|
|
75
|
+
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'Five' from JSON`,
|
|
119
77
|
);
|
|
120
78
|
}
|
|
121
79
|
|
|
122
80
|
/** @internal */
|
|
123
81
|
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
124
82
|
.union([
|
|
125
|
-
z.lazy(() => Four$inboundSchema),
|
|
126
83
|
z.string(),
|
|
127
84
|
z.number(),
|
|
128
85
|
z.boolean(),
|
|
129
|
-
z.
|
|
130
|
-
z.array(
|
|
86
|
+
z.record(z.any()),
|
|
87
|
+
z.array(
|
|
88
|
+
z.nullable(
|
|
89
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
90
|
+
),
|
|
91
|
+
),
|
|
131
92
|
]);
|
|
132
93
|
|
|
133
94
|
/** @internal */
|
|
134
95
|
export type Value$Outbound =
|
|
135
|
-
| Four$Outbound
|
|
136
96
|
| string
|
|
137
97
|
| number
|
|
138
98
|
| boolean
|
|
139
|
-
|
|
|
140
|
-
| Array<
|
|
99
|
+
| { [k: string]: any }
|
|
100
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
141
101
|
|
|
142
102
|
/** @internal */
|
|
143
103
|
export const Value$outboundSchema: z.ZodType<
|
|
@@ -145,12 +105,15 @@ export const Value$outboundSchema: z.ZodType<
|
|
|
145
105
|
z.ZodTypeDef,
|
|
146
106
|
Value
|
|
147
107
|
> = z.union([
|
|
148
|
-
z.lazy(() => Four$outboundSchema),
|
|
149
108
|
z.string(),
|
|
150
109
|
z.number(),
|
|
151
110
|
z.boolean(),
|
|
152
|
-
z.
|
|
153
|
-
z.array(
|
|
111
|
+
z.record(z.any()),
|
|
112
|
+
z.array(
|
|
113
|
+
z.nullable(
|
|
114
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
115
|
+
),
|
|
116
|
+
),
|
|
154
117
|
]);
|
|
155
118
|
|
|
156
119
|
/**
|
|
@@ -191,12 +154,15 @@ export const CustomField$inboundSchema: z.ZodType<
|
|
|
191
154
|
description: z.nullable(z.string()).optional(),
|
|
192
155
|
value: z.nullable(
|
|
193
156
|
z.union([
|
|
194
|
-
z.lazy(() => Four$inboundSchema),
|
|
195
157
|
z.string(),
|
|
196
158
|
z.number(),
|
|
197
159
|
z.boolean(),
|
|
198
|
-
z.
|
|
199
|
-
z.array(
|
|
160
|
+
z.record(z.any()),
|
|
161
|
+
z.array(
|
|
162
|
+
z.nullable(
|
|
163
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
164
|
+
),
|
|
165
|
+
),
|
|
200
166
|
]),
|
|
201
167
|
).optional(),
|
|
202
168
|
});
|
|
@@ -207,12 +173,11 @@ export type CustomField$Outbound = {
|
|
|
207
173
|
name?: string | null | undefined;
|
|
208
174
|
description?: string | null | undefined;
|
|
209
175
|
value?:
|
|
210
|
-
| Four$Outbound
|
|
211
176
|
| string
|
|
212
177
|
| number
|
|
213
178
|
| boolean
|
|
214
|
-
|
|
|
215
|
-
| Array<
|
|
179
|
+
| { [k: string]: any }
|
|
180
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
216
181
|
| null
|
|
217
182
|
| undefined;
|
|
218
183
|
};
|
|
@@ -228,12 +193,15 @@ export const CustomField$outboundSchema: z.ZodType<
|
|
|
228
193
|
description: z.nullable(z.string()).optional(),
|
|
229
194
|
value: z.nullable(
|
|
230
195
|
z.union([
|
|
231
|
-
z.lazy(() => Four$outboundSchema),
|
|
232
196
|
z.string(),
|
|
233
197
|
z.number(),
|
|
234
198
|
z.boolean(),
|
|
235
|
-
z.
|
|
236
|
-
z.array(
|
|
199
|
+
z.record(z.any()),
|
|
200
|
+
z.array(
|
|
201
|
+
z.nullable(
|
|
202
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
203
|
+
),
|
|
204
|
+
),
|
|
237
205
|
]),
|
|
238
206
|
).optional(),
|
|
239
207
|
});
|
|
@@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
Company1,
|
|
12
|
+
Company1$inboundSchema,
|
|
13
|
+
Company1$Outbound,
|
|
14
|
+
Company1$outboundSchema,
|
|
15
|
+
} from "./company1.js";
|
|
16
16
|
import {
|
|
17
17
|
Links,
|
|
18
18
|
Links$inboundSchema,
|
|
@@ -50,7 +50,7 @@ export type GetCompaniesResponse = {
|
|
|
50
50
|
* Operation performed
|
|
51
51
|
*/
|
|
52
52
|
operation: string;
|
|
53
|
-
data: Array<
|
|
53
|
+
data: Array<Company1>;
|
|
54
54
|
/**
|
|
55
55
|
* Response metadata
|
|
56
56
|
*/
|
|
@@ -76,7 +76,7 @@ export const GetCompaniesResponse$inboundSchema: z.ZodType<
|
|
|
76
76
|
service: z.string(),
|
|
77
77
|
resource: z.string(),
|
|
78
78
|
operation: z.string(),
|
|
79
|
-
data: z.array(
|
|
79
|
+
data: z.array(Company1$inboundSchema),
|
|
80
80
|
meta: Meta$inboundSchema.optional(),
|
|
81
81
|
links: Links$inboundSchema.optional(),
|
|
82
82
|
_raw: z.nullable(z.record(z.any())).optional(),
|
|
@@ -94,7 +94,7 @@ export type GetCompaniesResponse$Outbound = {
|
|
|
94
94
|
service: string;
|
|
95
95
|
resource: string;
|
|
96
96
|
operation: string;
|
|
97
|
-
data: Array<
|
|
97
|
+
data: Array<Company1$Outbound>;
|
|
98
98
|
meta?: Meta$Outbound | undefined;
|
|
99
99
|
links?: Links$Outbound | undefined;
|
|
100
100
|
_raw?: { [k: string]: any } | null | undefined;
|
|
@@ -111,7 +111,7 @@ export const GetCompaniesResponse$outboundSchema: z.ZodType<
|
|
|
111
111
|
service: z.string(),
|
|
112
112
|
resource: z.string(),
|
|
113
113
|
operation: z.string(),
|
|
114
|
-
data: z.array(
|
|
114
|
+
data: z.array(Company1$outboundSchema),
|
|
115
115
|
meta: Meta$outboundSchema.optional(),
|
|
116
116
|
links: Links$outboundSchema.optional(),
|
|
117
117
|
raw: z.nullable(z.record(z.any())).optional(),
|
|
@@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
Company1,
|
|
12
|
+
Company1$inboundSchema,
|
|
13
|
+
Company1$Outbound,
|
|
14
|
+
Company1$outboundSchema,
|
|
15
|
+
} from "./company1.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Company
|
|
@@ -38,7 +38,7 @@ export type GetCompanyResponse = {
|
|
|
38
38
|
* Operation performed
|
|
39
39
|
*/
|
|
40
40
|
operation: string;
|
|
41
|
-
data:
|
|
41
|
+
data: Company1;
|
|
42
42
|
/**
|
|
43
43
|
* Raw response from the integration when raw=true query param is provided
|
|
44
44
|
*/
|
|
@@ -56,7 +56,7 @@ export const GetCompanyResponse$inboundSchema: z.ZodType<
|
|
|
56
56
|
service: z.string(),
|
|
57
57
|
resource: z.string(),
|
|
58
58
|
operation: z.string(),
|
|
59
|
-
data:
|
|
59
|
+
data: Company1$inboundSchema,
|
|
60
60
|
_raw: z.nullable(z.record(z.any())).optional(),
|
|
61
61
|
}).transform((v) => {
|
|
62
62
|
return remap$(v, {
|
|
@@ -72,7 +72,7 @@ export type GetCompanyResponse$Outbound = {
|
|
|
72
72
|
service: string;
|
|
73
73
|
resource: string;
|
|
74
74
|
operation: string;
|
|
75
|
-
data:
|
|
75
|
+
data: Company1$Outbound;
|
|
76
76
|
_raw?: { [k: string]: any } | null | undefined;
|
|
77
77
|
};
|
|
78
78
|
|
|
@@ -87,7 +87,7 @@ export const GetCompanyResponse$outboundSchema: z.ZodType<
|
|
|
87
87
|
service: z.string(),
|
|
88
88
|
resource: z.string(),
|
|
89
89
|
operation: z.string(),
|
|
90
|
-
data:
|
|
90
|
+
data: Company1$outboundSchema,
|
|
91
91
|
raw: z.nullable(z.record(z.any())).optional(),
|
|
92
92
|
}).transform((v) => {
|
|
93
93
|
return remap$(v, {
|
|
@@ -34,6 +34,7 @@ export * from "./balancebytransaction.js";
|
|
|
34
34
|
export * from "./balancesheet.js";
|
|
35
35
|
export * from "./balancesheetfilter.js";
|
|
36
36
|
export * from "./bankaccount.js";
|
|
37
|
+
export * from "./bankaccount1.js";
|
|
37
38
|
export * from "./bankfeedaccount.js";
|
|
38
39
|
export * from "./bankfeedstatement.js";
|
|
39
40
|
export * from "./benefit.js";
|
|
@@ -42,6 +43,7 @@ export * from "./billlineitem.js";
|
|
|
42
43
|
export * from "./billpayment.js";
|
|
43
44
|
export * from "./billsfilter.js";
|
|
44
45
|
export * from "./billssort.js";
|
|
46
|
+
export * from "./categoriesfilter.js";
|
|
45
47
|
export * from "./category.js";
|
|
46
48
|
export * from "./collection.js";
|
|
47
49
|
export * from "./collectionssort.js";
|
|
@@ -53,7 +55,7 @@ export * from "./collectionuser.js";
|
|
|
53
55
|
export * from "./commentssort.js";
|
|
54
56
|
export * from "./companiesfilter.js";
|
|
55
57
|
export * from "./companiessort.js";
|
|
56
|
-
export * from "./
|
|
58
|
+
export * from "./company1.js";
|
|
57
59
|
export * from "./companyinfo.js";
|
|
58
60
|
export * from "./compensation.js";
|
|
59
61
|
export * from "./connection.js";
|
|
@@ -114,6 +114,10 @@ export type InvoiceLineItem = {
|
|
|
114
114
|
* Discount amount applied to the line item when supported downstream.
|
|
115
115
|
*/
|
|
116
116
|
discountAmount?: number | null | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* ID of the category of the line item
|
|
119
|
+
*/
|
|
120
|
+
categoryId?: string | null | undefined;
|
|
117
121
|
/**
|
|
118
122
|
* The ID of the location
|
|
119
123
|
*/
|
|
@@ -199,6 +203,10 @@ export type InvoiceLineItemInput = {
|
|
|
199
203
|
* Discount amount applied to the line item when supported downstream.
|
|
200
204
|
*/
|
|
201
205
|
discountAmount?: number | null | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* ID of the category of the line item
|
|
208
|
+
*/
|
|
209
|
+
categoryId?: string | null | undefined;
|
|
202
210
|
/**
|
|
203
211
|
* The ID of the location
|
|
204
212
|
*/
|
|
@@ -261,6 +269,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
261
269
|
unit_of_measure: z.nullable(z.string()).optional(),
|
|
262
270
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
263
271
|
discount_amount: z.nullable(z.number()).optional(),
|
|
272
|
+
category_id: z.nullable(z.string()).optional(),
|
|
264
273
|
location_id: z.nullable(z.string()).optional(),
|
|
265
274
|
department_id: z.nullable(z.string()).optional(),
|
|
266
275
|
item: LinkedInvoiceItem$inboundSchema.optional(),
|
|
@@ -289,6 +298,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
289
298
|
"unit_of_measure": "unitOfMeasure",
|
|
290
299
|
"discount_percentage": "discountPercentage",
|
|
291
300
|
"discount_amount": "discountAmount",
|
|
301
|
+
"category_id": "categoryId",
|
|
292
302
|
"location_id": "locationId",
|
|
293
303
|
"department_id": "departmentId",
|
|
294
304
|
"tax_rate": "taxRate",
|
|
@@ -318,6 +328,7 @@ export type InvoiceLineItem$Outbound = {
|
|
|
318
328
|
unit_of_measure?: string | null | undefined;
|
|
319
329
|
discount_percentage?: number | null | undefined;
|
|
320
330
|
discount_amount?: number | null | undefined;
|
|
331
|
+
category_id?: string | null | undefined;
|
|
321
332
|
location_id?: string | null | undefined;
|
|
322
333
|
department_id?: string | null | undefined;
|
|
323
334
|
item?: LinkedInvoiceItem$Outbound | undefined;
|
|
@@ -354,6 +365,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
354
365
|
unitOfMeasure: z.nullable(z.string()).optional(),
|
|
355
366
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
356
367
|
discountAmount: z.nullable(z.number()).optional(),
|
|
368
|
+
categoryId: z.nullable(z.string()).optional(),
|
|
357
369
|
locationId: z.nullable(z.string()).optional(),
|
|
358
370
|
departmentId: z.nullable(z.string()).optional(),
|
|
359
371
|
item: LinkedInvoiceItem$outboundSchema.optional(),
|
|
@@ -378,6 +390,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
378
390
|
unitOfMeasure: "unit_of_measure",
|
|
379
391
|
discountPercentage: "discount_percentage",
|
|
380
392
|
discountAmount: "discount_amount",
|
|
393
|
+
categoryId: "category_id",
|
|
381
394
|
locationId: "location_id",
|
|
382
395
|
departmentId: "department_id",
|
|
383
396
|
taxRate: "tax_rate",
|
|
@@ -440,6 +453,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
440
453
|
unit_of_measure: z.nullable(z.string()).optional(),
|
|
441
454
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
442
455
|
discount_amount: z.nullable(z.number()).optional(),
|
|
456
|
+
category_id: z.nullable(z.string()).optional(),
|
|
443
457
|
location_id: z.nullable(z.string()).optional(),
|
|
444
458
|
department_id: z.nullable(z.string()).optional(),
|
|
445
459
|
item: LinkedInvoiceItem$inboundSchema.optional(),
|
|
@@ -460,6 +474,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
460
474
|
"unit_of_measure": "unitOfMeasure",
|
|
461
475
|
"discount_percentage": "discountPercentage",
|
|
462
476
|
"discount_amount": "discountAmount",
|
|
477
|
+
"category_id": "categoryId",
|
|
463
478
|
"location_id": "locationId",
|
|
464
479
|
"department_id": "departmentId",
|
|
465
480
|
"tax_rate": "taxRate",
|
|
@@ -485,6 +500,7 @@ export type InvoiceLineItemInput$Outbound = {
|
|
|
485
500
|
unit_of_measure?: string | null | undefined;
|
|
486
501
|
discount_percentage?: number | null | undefined;
|
|
487
502
|
discount_amount?: number | null | undefined;
|
|
503
|
+
category_id?: string | null | undefined;
|
|
488
504
|
location_id?: string | null | undefined;
|
|
489
505
|
department_id?: string | null | undefined;
|
|
490
506
|
item?: LinkedInvoiceItem$Outbound | undefined;
|
|
@@ -517,6 +533,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
517
533
|
unitOfMeasure: z.nullable(z.string()).optional(),
|
|
518
534
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
519
535
|
discountAmount: z.nullable(z.number()).optional(),
|
|
536
|
+
categoryId: z.nullable(z.string()).optional(),
|
|
520
537
|
locationId: z.nullable(z.string()).optional(),
|
|
521
538
|
departmentId: z.nullable(z.string()).optional(),
|
|
522
539
|
item: LinkedInvoiceItem$outboundSchema.optional(),
|
|
@@ -537,6 +554,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
537
554
|
unitOfMeasure: "unit_of_measure",
|
|
538
555
|
discountPercentage: "discount_percentage",
|
|
539
556
|
discountAmount: "discount_amount",
|
|
557
|
+
categoryId: "category_id",
|
|
540
558
|
locationId: "location_id",
|
|
541
559
|
departmentId: "department_id",
|
|
542
560
|
taxRate: "tax_rate",
|
|
@@ -21,6 +21,10 @@ export type ProfitAndLossFilter = {
|
|
|
21
21
|
* Filter by end date. If end date is given, start date is required.
|
|
22
22
|
*/
|
|
23
23
|
endDate?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Filter by location id
|
|
26
|
+
*/
|
|
27
|
+
locationId?: string | undefined;
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
/** @internal */
|
|
@@ -32,11 +36,13 @@ export const ProfitAndLossFilter$inboundSchema: z.ZodType<
|
|
|
32
36
|
customer_id: z.string().optional(),
|
|
33
37
|
start_date: z.string().optional(),
|
|
34
38
|
end_date: z.string().optional(),
|
|
39
|
+
location_id: z.string().optional(),
|
|
35
40
|
}).transform((v) => {
|
|
36
41
|
return remap$(v, {
|
|
37
42
|
"customer_id": "customerId",
|
|
38
43
|
"start_date": "startDate",
|
|
39
44
|
"end_date": "endDate",
|
|
45
|
+
"location_id": "locationId",
|
|
40
46
|
});
|
|
41
47
|
});
|
|
42
48
|
|
|
@@ -45,6 +51,7 @@ export type ProfitAndLossFilter$Outbound = {
|
|
|
45
51
|
customer_id?: string | undefined;
|
|
46
52
|
start_date?: string | undefined;
|
|
47
53
|
end_date?: string | undefined;
|
|
54
|
+
location_id?: string | undefined;
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
/** @internal */
|
|
@@ -56,11 +63,13 @@ export const ProfitAndLossFilter$outboundSchema: z.ZodType<
|
|
|
56
63
|
customerId: z.string().optional(),
|
|
57
64
|
startDate: z.string().optional(),
|
|
58
65
|
endDate: z.string().optional(),
|
|
66
|
+
locationId: z.string().optional(),
|
|
59
67
|
}).transform((v) => {
|
|
60
68
|
return remap$(v, {
|
|
61
69
|
customerId: "customer_id",
|
|
62
70
|
startDate: "start_date",
|
|
63
71
|
endDate: "end_date",
|
|
72
|
+
locationId: "location_id",
|
|
64
73
|
});
|
|
65
74
|
});
|
|
66
75
|
|
|
@@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type Value5 = string | number | number;
|
|
13
13
|
|
|
14
14
|
export type SimpleFormFieldOptionValue =
|
|
15
15
|
| string
|
|
@@ -36,40 +36,43 @@ export type SimpleFormFieldOption = {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/** @internal */
|
|
39
|
-
export const
|
|
39
|
+
export const Value5$inboundSchema: z.ZodType<Value5, z.ZodTypeDef, unknown> = z
|
|
40
40
|
.union([z.string(), z.number().int(), z.number()]);
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export type
|
|
43
|
+
export type Value5$Outbound = string | number | number;
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
|
-
export const
|
|
47
|
-
|
|
46
|
+
export const Value5$outboundSchema: z.ZodType<
|
|
47
|
+
Value5$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
Value5
|
|
50
|
+
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
53
|
* @internal
|
|
51
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
55
|
*/
|
|
53
|
-
export namespace
|
|
54
|
-
/** @deprecated use `
|
|
55
|
-
export const inboundSchema =
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const outboundSchema =
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export type Outbound =
|
|
56
|
+
export namespace Value5$ {
|
|
57
|
+
/** @deprecated use `Value5$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = Value5$inboundSchema;
|
|
59
|
+
/** @deprecated use `Value5$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = Value5$outboundSchema;
|
|
61
|
+
/** @deprecated use `Value5$Outbound` instead. */
|
|
62
|
+
export type Outbound = Value5$Outbound;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
|
-
export function
|
|
63
|
-
return JSON.stringify(
|
|
65
|
+
export function value5ToJSON(value5: Value5): string {
|
|
66
|
+
return JSON.stringify(Value5$outboundSchema.parse(value5));
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
export function
|
|
69
|
+
export function value5FromJSON(
|
|
67
70
|
jsonString: string,
|
|
68
|
-
): SafeParseResult<
|
|
71
|
+
): SafeParseResult<Value5, SDKValidationError> {
|
|
69
72
|
return safeParse(
|
|
70
73
|
jsonString,
|
|
71
|
-
(x) =>
|
|
72
|
-
`Failed to parse '
|
|
74
|
+
(x) => Value5$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'Value5' from JSON`,
|
|
73
76
|
);
|
|
74
77
|
}
|
|
75
78
|
|
|
@@ -169,6 +169,10 @@ export type Supplier = {
|
|
|
169
169
|
* Payment method used for the transaction, such as cash, credit card, bank transfer, or check
|
|
170
170
|
*/
|
|
171
171
|
paymentMethod?: string | null | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Terms of payment.
|
|
174
|
+
*/
|
|
175
|
+
terms?: string | null | undefined;
|
|
172
176
|
/**
|
|
173
177
|
* The channel through which the transaction is processed.
|
|
174
178
|
*/
|
|
@@ -274,6 +278,10 @@ export type SupplierInput = {
|
|
|
274
278
|
* Payment method used for the transaction, such as cash, credit card, bank transfer, or check
|
|
275
279
|
*/
|
|
276
280
|
paymentMethod?: string | null | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* Terms of payment.
|
|
283
|
+
*/
|
|
284
|
+
terms?: string | null | undefined;
|
|
277
285
|
/**
|
|
278
286
|
* The channel through which the transaction is processed.
|
|
279
287
|
*/
|
|
@@ -345,6 +353,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
345
353
|
account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
|
|
346
354
|
status: z.nullable(SupplierStatus$inboundSchema).optional(),
|
|
347
355
|
payment_method: z.nullable(z.string()).optional(),
|
|
356
|
+
terms: z.nullable(z.string()).optional(),
|
|
348
357
|
channel: z.nullable(z.string()).optional(),
|
|
349
358
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
350
359
|
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
@@ -414,6 +423,7 @@ export type Supplier$Outbound = {
|
|
|
414
423
|
account?: LinkedLedgerAccount$Outbound | null | undefined;
|
|
415
424
|
status?: string | null | undefined;
|
|
416
425
|
payment_method?: string | null | undefined;
|
|
426
|
+
terms?: string | null | undefined;
|
|
417
427
|
channel?: string | null | undefined;
|
|
418
428
|
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
419
429
|
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
@@ -457,6 +467,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
457
467
|
account: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
|
|
458
468
|
status: z.nullable(SupplierStatus$outboundSchema).optional(),
|
|
459
469
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
470
|
+
terms: z.nullable(z.string()).optional(),
|
|
460
471
|
channel: z.nullable(z.string()).optional(),
|
|
461
472
|
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
462
473
|
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
@@ -551,6 +562,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
551
562
|
account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(),
|
|
552
563
|
status: z.nullable(SupplierStatus$inboundSchema).optional(),
|
|
553
564
|
payment_method: z.nullable(z.string()).optional(),
|
|
565
|
+
terms: z.nullable(z.string()).optional(),
|
|
554
566
|
channel: z.nullable(z.string()).optional(),
|
|
555
567
|
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
556
568
|
row_version: z.nullable(z.string()).optional(),
|
|
@@ -603,6 +615,7 @@ export type SupplierInput$Outbound = {
|
|
|
603
615
|
account?: LinkedLedgerAccountInput$Outbound | null | undefined;
|
|
604
616
|
status?: string | null | undefined;
|
|
605
617
|
payment_method?: string | null | undefined;
|
|
618
|
+
terms?: string | null | undefined;
|
|
606
619
|
channel?: string | null | undefined;
|
|
607
620
|
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
608
621
|
row_version?: string | null | undefined;
|
|
@@ -639,6 +652,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
639
652
|
account: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(),
|
|
640
653
|
status: z.nullable(SupplierStatus$outboundSchema).optional(),
|
|
641
654
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
655
|
+
terms: z.nullable(z.string()).optional(),
|
|
642
656
|
channel: z.nullable(z.string()).optional(),
|
|
643
657
|
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
644
658
|
rowVersion: z.nullable(z.string()).optional(),
|
|
@@ -25,8 +25,14 @@ export class APIError extends ApideckError {
|
|
|
25
25
|
}`;
|
|
26
26
|
}
|
|
27
27
|
const body = httpMeta.body || `""`;
|
|
28
|
-
message += body.length > 100 ? "\n" : " ";
|
|
29
|
-
|
|
28
|
+
message += body.length > 100 ? "\n" : ". ";
|
|
29
|
+
let bodyDisplay = body;
|
|
30
|
+
if (body.length > 10000) {
|
|
31
|
+
const truncated = body.substring(0, 10000);
|
|
32
|
+
const remaining = body.length - 10000;
|
|
33
|
+
bodyDisplay = `${truncated}...and ${remaining} more chars`;
|
|
34
|
+
}
|
|
35
|
+
message += `Body: ${bodyDisplay}`;
|
|
30
36
|
message = message.trim();
|
|
31
37
|
super(message, httpMeta);
|
|
32
38
|
this.name = "APIError";
|
|
@@ -76,7 +76,7 @@ export class BadRequestResponse extends ApideckError {
|
|
|
76
76
|
err: BadRequestResponseData,
|
|
77
77
|
httpMeta: { response: Response; request: Request; body: string },
|
|
78
78
|
) {
|
|
79
|
-
const message = err.message ||
|
|
79
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
80
80
|
super(message, httpMeta);
|
|
81
81
|
this.data$ = err;
|
|
82
82
|
if (err.statusCode != null) this.statusCode = err.statusCode;
|
|
@@ -76,7 +76,7 @@ export class NotFoundResponse extends ApideckError {
|
|
|
76
76
|
err: NotFoundResponseData,
|
|
77
77
|
httpMeta: { response: Response; request: Request; body: string },
|
|
78
78
|
) {
|
|
79
|
-
const message = err.message ||
|
|
79
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
80
80
|
super(message, httpMeta);
|
|
81
81
|
this.data$ = err;
|
|
82
82
|
if (err.statusCode != null) this.statusCode = err.statusCode;
|