@apideck/unify 0.19.0 → 0.20.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/docs/sdks/connections/README.md +190 -42
- package/docs/sdks/connectionsettings/README.md +190 -42
- package/docs/sdks/customers/README.md +2 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +2 -8
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +4 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -1
- package/lib/security.js.map +1 -1
- package/models/components/address.d.ts +8 -8
- package/models/components/address.d.ts.map +1 -1
- package/models/components/address.js +13 -14
- package/models/components/address.js.map +1 -1
- package/models/components/balancesheetfilter.d.ts +2 -0
- package/models/components/balancesheetfilter.d.ts.map +1 -1
- package/models/components/balancesheetfilter.js.map +1 -1
- package/models/components/bill.d.ts +10 -0
- package/models/components/bill.d.ts.map +1 -1
- package/models/components/bill.js +8 -0
- package/models/components/bill.js.map +1 -1
- package/models/components/billpayment.d.ts +2 -2
- package/models/components/connectionimportdata.d.ts +15 -15
- package/models/components/connectionimportdata.d.ts.map +1 -1
- package/models/components/connectionimportdata.js +18 -19
- package/models/components/connectionimportdata.js.map +1 -1
- package/models/components/consumerconnection.d.ts +6 -26
- package/models/components/consumerconnection.d.ts.map +1 -1
- package/models/components/consumerconnection.js +3 -26
- package/models/components/consumerconnection.js.map +1 -1
- package/models/components/contact.d.ts +9 -9
- package/models/components/contact.d.ts.map +1 -1
- package/models/components/contact.js +16 -15
- package/models/components/contact.js.map +1 -1
- package/models/components/customersfilter.d.ts +5 -0
- package/models/components/customersfilter.d.ts.map +1 -1
- package/models/components/customersfilter.js +4 -0
- package/models/components/customersfilter.js.map +1 -1
- package/models/components/employee.d.ts +5 -0
- package/models/components/employee.d.ts.map +1 -1
- package/models/components/employee.js +4 -0
- package/models/components/employee.js.map +1 -1
- package/models/components/employeesfilter.d.ts +5 -0
- package/models/components/employeesfilter.d.ts.map +1 -1
- package/models/components/employeesfilter.js +2 -0
- package/models/components/employeesfilter.js.map +1 -1
- package/models/components/formfieldoption.d.ts +10 -2
- package/models/components/formfieldoption.d.ts.map +1 -1
- package/models/components/formfieldoption.js +12 -4
- package/models/components/formfieldoption.js.map +1 -1
- package/models/components/formfieldoptiongroup.d.ts +29 -4
- package/models/components/formfieldoptiongroup.d.ts.map +1 -1
- package/models/components/formfieldoptiongroup.js +34 -5
- package/models/components/formfieldoptiongroup.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/payment.d.ts +1 -1
- package/models/components/paymentinput.d.ts +1 -1
- package/models/components/profitandloss.d.ts +256 -56
- package/models/components/profitandloss.d.ts.map +1 -1
- package/models/components/profitandloss.js +158 -62
- package/models/components/profitandloss.js.map +1 -1
- package/models/components/profitandlossindicator.d.ts +32 -0
- package/models/components/profitandlossindicator.d.ts.map +1 -0
- package/models/components/profitandlossindicator.js +59 -0
- package/models/components/profitandlossindicator.js.map +1 -0
- package/models/components/profitandlosstype.d.ts +34 -0
- package/models/components/profitandlosstype.d.ts.map +1 -0
- package/models/components/profitandlosstype.js +53 -0
- package/models/components/profitandlosstype.js.map +1 -0
- package/models/components/simpleformfieldoption.d.ts +27 -2
- package/models/components/simpleformfieldoption.d.ts.map +1 -1
- package/models/components/simpleformfieldoption.js +33 -3
- package/models/components/simpleformfieldoption.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/sdks.ts +2 -7
- package/src/lib/security.ts +11 -3
- package/src/models/components/address.ts +15 -14
- package/src/models/components/balancesheetfilter.ts +2 -0
- package/src/models/components/bill.ts +18 -0
- package/src/models/components/billpayment.ts +2 -2
- package/src/models/components/connectionimportdata.ts +24 -33
- package/src/models/components/consumerconnection.ts +4 -53
- package/src/models/components/contact.ts +17 -18
- package/src/models/components/customersfilter.ts +9 -0
- package/src/models/components/employee.ts +9 -0
- package/src/models/components/employeesfilter.ts +7 -0
- package/src/models/components/formfieldoption.ts +25 -7
- package/src/models/components/formfieldoptiongroup.ts +50 -8
- package/src/models/components/index.ts +2 -0
- package/src/models/components/payment.ts +1 -1
- package/src/models/components/paymentinput.ts +1 -1
- package/src/models/components/profitandloss.ts +407 -101
- package/src/models/components/profitandlossindicator.ts +69 -0
- package/src/models/components/profitandlosstype.ts +39 -0
- package/src/models/components/simpleformfieldoption.ts +42 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ProfitAndLossIndicator = {
|
|
11
|
+
/**
|
|
12
|
+
* The total amount of the transaction or record
|
|
13
|
+
*/
|
|
14
|
+
total: number | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ProfitAndLossIndicator$inboundSchema: z.ZodType<
|
|
19
|
+
ProfitAndLossIndicator,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
total: z.nullable(z.number()),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ProfitAndLossIndicator$Outbound = {
|
|
28
|
+
total: number | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ProfitAndLossIndicator$outboundSchema: z.ZodType<
|
|
33
|
+
ProfitAndLossIndicator$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
ProfitAndLossIndicator
|
|
36
|
+
> = z.object({
|
|
37
|
+
total: z.nullable(z.number()),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace ProfitAndLossIndicator$ {
|
|
45
|
+
/** @deprecated use `ProfitAndLossIndicator$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = ProfitAndLossIndicator$inboundSchema;
|
|
47
|
+
/** @deprecated use `ProfitAndLossIndicator$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = ProfitAndLossIndicator$outboundSchema;
|
|
49
|
+
/** @deprecated use `ProfitAndLossIndicator$Outbound` instead. */
|
|
50
|
+
export type Outbound = ProfitAndLossIndicator$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function profitAndLossIndicatorToJSON(
|
|
54
|
+
profitAndLossIndicator: ProfitAndLossIndicator,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
ProfitAndLossIndicator$outboundSchema.parse(profitAndLossIndicator),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function profitAndLossIndicatorFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<ProfitAndLossIndicator, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => ProfitAndLossIndicator$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'ProfitAndLossIndicator' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The type of profit and loss
|
|
10
|
+
*/
|
|
11
|
+
export const ProfitAndLossType = {
|
|
12
|
+
Section: "Section",
|
|
13
|
+
Record: "Record",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* The type of profit and loss
|
|
17
|
+
*/
|
|
18
|
+
export type ProfitAndLossType = ClosedEnum<typeof ProfitAndLossType>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ProfitAndLossType$inboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof ProfitAndLossType
|
|
23
|
+
> = z.nativeEnum(ProfitAndLossType);
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ProfitAndLossType$outboundSchema: z.ZodNativeEnum<
|
|
27
|
+
typeof ProfitAndLossType
|
|
28
|
+
> = ProfitAndLossType$inboundSchema;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
33
|
+
*/
|
|
34
|
+
export namespace ProfitAndLossType$ {
|
|
35
|
+
/** @deprecated use `ProfitAndLossType$inboundSchema` instead. */
|
|
36
|
+
export const inboundSchema = ProfitAndLossType$inboundSchema;
|
|
37
|
+
/** @deprecated use `ProfitAndLossType$outboundSchema` instead. */
|
|
38
|
+
export const outboundSchema = ProfitAndLossType$outboundSchema;
|
|
39
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
|
|
@@ -16,8 +18,13 @@ export type SimpleFormFieldOptionValue =
|
|
|
16
18
|
| boolean
|
|
17
19
|
| Array<string | number | number>;
|
|
18
20
|
|
|
21
|
+
export const OptionType = {
|
|
22
|
+
Simple: "simple",
|
|
23
|
+
} as const;
|
|
24
|
+
export type OptionType = ClosedEnum<typeof OptionType>;
|
|
25
|
+
|
|
19
26
|
export type SimpleFormFieldOption = {
|
|
20
|
-
label
|
|
27
|
+
label: string;
|
|
21
28
|
value?:
|
|
22
29
|
| string
|
|
23
30
|
| number
|
|
@@ -25,6 +32,7 @@ export type SimpleFormFieldOption = {
|
|
|
25
32
|
| boolean
|
|
26
33
|
| Array<string | number | number>
|
|
27
34
|
| undefined;
|
|
35
|
+
optionType: OptionType;
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
/** @internal */
|
|
@@ -130,13 +138,32 @@ export function simpleFormFieldOptionValueFromJSON(
|
|
|
130
138
|
);
|
|
131
139
|
}
|
|
132
140
|
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const OptionType$inboundSchema: z.ZodNativeEnum<typeof OptionType> = z
|
|
143
|
+
.nativeEnum(OptionType);
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const OptionType$outboundSchema: z.ZodNativeEnum<typeof OptionType> =
|
|
147
|
+
OptionType$inboundSchema;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
152
|
+
*/
|
|
153
|
+
export namespace OptionType$ {
|
|
154
|
+
/** @deprecated use `OptionType$inboundSchema` instead. */
|
|
155
|
+
export const inboundSchema = OptionType$inboundSchema;
|
|
156
|
+
/** @deprecated use `OptionType$outboundSchema` instead. */
|
|
157
|
+
export const outboundSchema = OptionType$outboundSchema;
|
|
158
|
+
}
|
|
159
|
+
|
|
133
160
|
/** @internal */
|
|
134
161
|
export const SimpleFormFieldOption$inboundSchema: z.ZodType<
|
|
135
162
|
SimpleFormFieldOption,
|
|
136
163
|
z.ZodTypeDef,
|
|
137
164
|
unknown
|
|
138
165
|
> = z.object({
|
|
139
|
-
label: z.string()
|
|
166
|
+
label: z.string(),
|
|
140
167
|
value: z.union([
|
|
141
168
|
z.string(),
|
|
142
169
|
z.number().int(),
|
|
@@ -144,11 +171,16 @@ export const SimpleFormFieldOption$inboundSchema: z.ZodType<
|
|
|
144
171
|
z.boolean(),
|
|
145
172
|
z.array(z.union([z.string(), z.number().int(), z.number()])),
|
|
146
173
|
]).optional(),
|
|
174
|
+
option_type: OptionType$inboundSchema,
|
|
175
|
+
}).transform((v) => {
|
|
176
|
+
return remap$(v, {
|
|
177
|
+
"option_type": "optionType",
|
|
178
|
+
});
|
|
147
179
|
});
|
|
148
180
|
|
|
149
181
|
/** @internal */
|
|
150
182
|
export type SimpleFormFieldOption$Outbound = {
|
|
151
|
-
label
|
|
183
|
+
label: string;
|
|
152
184
|
value?:
|
|
153
185
|
| string
|
|
154
186
|
| number
|
|
@@ -156,6 +188,7 @@ export type SimpleFormFieldOption$Outbound = {
|
|
|
156
188
|
| boolean
|
|
157
189
|
| Array<string | number | number>
|
|
158
190
|
| undefined;
|
|
191
|
+
option_type: string;
|
|
159
192
|
};
|
|
160
193
|
|
|
161
194
|
/** @internal */
|
|
@@ -164,7 +197,7 @@ export const SimpleFormFieldOption$outboundSchema: z.ZodType<
|
|
|
164
197
|
z.ZodTypeDef,
|
|
165
198
|
SimpleFormFieldOption
|
|
166
199
|
> = z.object({
|
|
167
|
-
label: z.string()
|
|
200
|
+
label: z.string(),
|
|
168
201
|
value: z.union([
|
|
169
202
|
z.string(),
|
|
170
203
|
z.number().int(),
|
|
@@ -172,6 +205,11 @@ export const SimpleFormFieldOption$outboundSchema: z.ZodType<
|
|
|
172
205
|
z.boolean(),
|
|
173
206
|
z.array(z.union([z.string(), z.number().int(), z.number()])),
|
|
174
207
|
]).optional(),
|
|
208
|
+
optionType: OptionType$outboundSchema,
|
|
209
|
+
}).transform((v) => {
|
|
210
|
+
return remap$(v, {
|
|
211
|
+
optionType: "option_type",
|
|
212
|
+
});
|
|
175
213
|
});
|
|
176
214
|
|
|
177
215
|
/**
|