@maesn/typescript-sdk 0.6.2 → 0.6.4
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 +4 -0
- package/esm/funcs/accounting-create-booking-proposal-async.d.ts +11 -0
- package/esm/funcs/accounting-create-booking-proposal-async.d.ts.map +1 -0
- package/esm/funcs/accounting-create-booking-proposal-async.js +111 -0
- package/esm/funcs/accounting-create-booking-proposal-async.js.map +1 -0
- package/esm/funcs/accounting-get-bills.js +1 -0
- package/esm/funcs/accounting-get-bills.js.map +1 -1
- package/esm/funcs/accounting-get-document-types.js +3 -0
- package/esm/funcs/accounting-get-document-types.js.map +1 -1
- package/esm/funcs/auth-system-login-url-post-auth.d.ts +11 -0
- package/esm/funcs/auth-system-login-url-post-auth.d.ts.map +1 -0
- package/esm/funcs/auth-system-login-url-post-auth.js +78 -0
- package/esm/funcs/auth-system-login-url-post-auth.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/create-auth-webhook-request-dto.d.ts +22 -0
- package/esm/models/create-auth-webhook-request-dto.d.ts.map +1 -0
- package/esm/models/create-auth-webhook-request-dto.js +17 -0
- package/esm/models/create-auth-webhook-request-dto.js.map +1 -0
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +1 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/operations/create-booking-proposal-async.d.ts +122 -0
- package/esm/models/operations/create-booking-proposal-async.d.ts.map +1 -0
- package/esm/models/operations/create-booking-proposal-async.js +96 -0
- package/esm/models/operations/create-booking-proposal-async.js.map +1 -0
- package/esm/models/operations/get-bills.d.ts +5 -0
- package/esm/models/operations/get-bills.d.ts.map +1 -1
- package/esm/models/operations/get-bills.js +1 -0
- package/esm/models/operations/get-bills.js.map +1 -1
- package/esm/models/operations/get-document-types.d.ts +20 -0
- package/esm/models/operations/get-document-types.d.ts.map +1 -1
- package/esm/models/operations/get-document-types.js +12 -0
- package/esm/models/operations/get-document-types.js.map +1 -1
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +2 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/system-login-url-post-auth.d.ts +29 -0
- package/esm/models/operations/system-login-url-post-auth.d.ts.map +1 -0
- package/esm/models/operations/system-login-url-post-auth.js +21 -0
- package/esm/models/operations/system-login-url-post-auth.js.map +1 -0
- package/esm/sdk/accounting.d.ts +1 -0
- package/esm/sdk/accounting.d.ts.map +1 -1
- package/esm/sdk/accounting.js +4 -0
- package/esm/sdk/accounting.js.map +1 -1
- package/esm/sdk/auth.d.ts +1 -0
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +4 -0
- package/esm/sdk/auth.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accounting-create-booking-proposal-async.ts +233 -0
- package/src/funcs/accounting-get-bills.ts +1 -0
- package/src/funcs/accounting-get-document-types.ts +3 -0
- package/src/funcs/auth-system-login-url-post-auth.ts +169 -0
- package/src/lib/config.ts +3 -3
- package/src/models/create-auth-webhook-request-dto.ts +47 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/create-booking-proposal-async.ts +327 -0
- package/src/models/operations/get-bills.ts +6 -0
- package/src/models/operations/get-document-types.ts +27 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/system-login-url-post-auth.ts +61 -0
- package/src/sdk/accounting.ts +12 -0
- package/src/sdk/auth.ts +12 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type CreateBookingProposalAsyncGlobals = {
|
|
14
|
+
apiKey?: string | undefined;
|
|
15
|
+
accountKey?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type CreateBookingProposalAsyncFile = {
|
|
19
|
+
fileName: string;
|
|
20
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const CreateBookingProposalAsyncBookingType = {
|
|
24
|
+
Invoice: "INVOICE",
|
|
25
|
+
Bill: "BILL",
|
|
26
|
+
CreditNote: "CREDIT_NOTE",
|
|
27
|
+
VendorCredit: "VENDOR_CREDIT",
|
|
28
|
+
} as const;
|
|
29
|
+
export type CreateBookingProposalAsyncBookingType = ClosedEnum<
|
|
30
|
+
typeof CreateBookingProposalAsyncBookingType
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export type CreateBookingProposalAsyncFolderManagement = {
|
|
34
|
+
category?: string | undefined;
|
|
35
|
+
folder?: string | undefined;
|
|
36
|
+
register?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type CreateBookingProposalAsyncRequestBody = {
|
|
40
|
+
files?: Array<CreateBookingProposalAsyncFile> | undefined;
|
|
41
|
+
bookingType?: CreateBookingProposalAsyncBookingType | undefined;
|
|
42
|
+
bookingProposal?: models.CreateBookingProposalRequestDtoV2 | undefined;
|
|
43
|
+
folderManagement?: CreateBookingProposalAsyncFolderManagement | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type CreateBookingProposalAsyncRequest = {
|
|
47
|
+
/**
|
|
48
|
+
* ID of the company (required for multi-company target systems)
|
|
49
|
+
*/
|
|
50
|
+
companyId?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* API key
|
|
53
|
+
*/
|
|
54
|
+
apiKey?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Account key
|
|
57
|
+
*/
|
|
58
|
+
accountKey?: string | undefined;
|
|
59
|
+
body: CreateBookingProposalAsyncRequestBody;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type CreateBookingProposalAsyncPagination = {
|
|
63
|
+
total: number;
|
|
64
|
+
perPage: number;
|
|
65
|
+
currentPage: number;
|
|
66
|
+
totalPages: number;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type CreateBookingProposalAsyncMeta = {
|
|
70
|
+
warnings?: Array<string> | null | undefined;
|
|
71
|
+
pagination?: CreateBookingProposalAsyncPagination | null | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type CreateBookingProposalAsyncErrors = {};
|
|
75
|
+
|
|
76
|
+
export type CreateBookingProposalAsyncRawData = {};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Booking proposal queued successfully. Processed asynchronously and returns 202 with taskId.
|
|
80
|
+
*/
|
|
81
|
+
export type CreateBookingProposalAsyncResponse = {
|
|
82
|
+
meta?: CreateBookingProposalAsyncMeta | null | undefined;
|
|
83
|
+
data: models.TaskIdResponseDto;
|
|
84
|
+
errors: CreateBookingProposalAsyncErrors | null;
|
|
85
|
+
rawData: CreateBookingProposalAsyncRawData | null;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type CreateBookingProposalAsyncFile$Outbound = {
|
|
90
|
+
fileName: string;
|
|
91
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const CreateBookingProposalAsyncFile$outboundSchema: z.ZodMiniType<
|
|
96
|
+
CreateBookingProposalAsyncFile$Outbound,
|
|
97
|
+
CreateBookingProposalAsyncFile
|
|
98
|
+
> = z.object({
|
|
99
|
+
fileName: z.string(),
|
|
100
|
+
content: z.union([
|
|
101
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
102
|
+
z.custom<Blob>(x => x instanceof Blob),
|
|
103
|
+
z.custom<ArrayBuffer>(x => x instanceof ArrayBuffer),
|
|
104
|
+
z.custom<Uint8Array>(x => x instanceof Uint8Array),
|
|
105
|
+
]),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export function createBookingProposalAsyncFileToJSON(
|
|
109
|
+
createBookingProposalAsyncFile: CreateBookingProposalAsyncFile,
|
|
110
|
+
): string {
|
|
111
|
+
return JSON.stringify(
|
|
112
|
+
CreateBookingProposalAsyncFile$outboundSchema.parse(
|
|
113
|
+
createBookingProposalAsyncFile,
|
|
114
|
+
),
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const CreateBookingProposalAsyncBookingType$outboundSchema:
|
|
120
|
+
z.ZodMiniEnum<typeof CreateBookingProposalAsyncBookingType> = z.enum(
|
|
121
|
+
CreateBookingProposalAsyncBookingType,
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export type CreateBookingProposalAsyncFolderManagement$Outbound = {
|
|
126
|
+
category?: string | undefined;
|
|
127
|
+
folder?: string | undefined;
|
|
128
|
+
register?: string | undefined;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export const CreateBookingProposalAsyncFolderManagement$outboundSchema:
|
|
133
|
+
z.ZodMiniType<
|
|
134
|
+
CreateBookingProposalAsyncFolderManagement$Outbound,
|
|
135
|
+
CreateBookingProposalAsyncFolderManagement
|
|
136
|
+
> = z.object({
|
|
137
|
+
category: z.optional(z.string()),
|
|
138
|
+
folder: z.optional(z.string()),
|
|
139
|
+
register: z.optional(z.string()),
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export function createBookingProposalAsyncFolderManagementToJSON(
|
|
143
|
+
createBookingProposalAsyncFolderManagement:
|
|
144
|
+
CreateBookingProposalAsyncFolderManagement,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(
|
|
147
|
+
CreateBookingProposalAsyncFolderManagement$outboundSchema.parse(
|
|
148
|
+
createBookingProposalAsyncFolderManagement,
|
|
149
|
+
),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export type CreateBookingProposalAsyncRequestBody$Outbound = {
|
|
155
|
+
files?: Array<CreateBookingProposalAsyncFile$Outbound> | undefined;
|
|
156
|
+
bookingType?: string | undefined;
|
|
157
|
+
bookingProposal?:
|
|
158
|
+
| models.CreateBookingProposalRequestDtoV2$Outbound
|
|
159
|
+
| undefined;
|
|
160
|
+
folderManagement?:
|
|
161
|
+
| CreateBookingProposalAsyncFolderManagement$Outbound
|
|
162
|
+
| undefined;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const CreateBookingProposalAsyncRequestBody$outboundSchema:
|
|
167
|
+
z.ZodMiniType<
|
|
168
|
+
CreateBookingProposalAsyncRequestBody$Outbound,
|
|
169
|
+
CreateBookingProposalAsyncRequestBody
|
|
170
|
+
> = z.object({
|
|
171
|
+
files: z.optional(
|
|
172
|
+
z.array(z.lazy(() => CreateBookingProposalAsyncFile$outboundSchema)),
|
|
173
|
+
),
|
|
174
|
+
bookingType: z.optional(
|
|
175
|
+
CreateBookingProposalAsyncBookingType$outboundSchema,
|
|
176
|
+
),
|
|
177
|
+
bookingProposal: z.optional(
|
|
178
|
+
models.CreateBookingProposalRequestDtoV2$outboundSchema,
|
|
179
|
+
),
|
|
180
|
+
folderManagement: z.optional(
|
|
181
|
+
z.lazy(() => CreateBookingProposalAsyncFolderManagement$outboundSchema),
|
|
182
|
+
),
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export function createBookingProposalAsyncRequestBodyToJSON(
|
|
186
|
+
createBookingProposalAsyncRequestBody: CreateBookingProposalAsyncRequestBody,
|
|
187
|
+
): string {
|
|
188
|
+
return JSON.stringify(
|
|
189
|
+
CreateBookingProposalAsyncRequestBody$outboundSchema.parse(
|
|
190
|
+
createBookingProposalAsyncRequestBody,
|
|
191
|
+
),
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export type CreateBookingProposalAsyncRequest$Outbound = {
|
|
197
|
+
companyId?: string | undefined;
|
|
198
|
+
apiKey?: string | undefined;
|
|
199
|
+
accountKey?: string | undefined;
|
|
200
|
+
body: CreateBookingProposalAsyncRequestBody$Outbound;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const CreateBookingProposalAsyncRequest$outboundSchema: z.ZodMiniType<
|
|
205
|
+
CreateBookingProposalAsyncRequest$Outbound,
|
|
206
|
+
CreateBookingProposalAsyncRequest
|
|
207
|
+
> = z.object({
|
|
208
|
+
companyId: z.optional(z.string()),
|
|
209
|
+
apiKey: z.optional(z.string()),
|
|
210
|
+
accountKey: z.optional(z.string()),
|
|
211
|
+
body: z.lazy(() => CreateBookingProposalAsyncRequestBody$outboundSchema),
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
export function createBookingProposalAsyncRequestToJSON(
|
|
215
|
+
createBookingProposalAsyncRequest: CreateBookingProposalAsyncRequest,
|
|
216
|
+
): string {
|
|
217
|
+
return JSON.stringify(
|
|
218
|
+
CreateBookingProposalAsyncRequest$outboundSchema.parse(
|
|
219
|
+
createBookingProposalAsyncRequest,
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** @internal */
|
|
225
|
+
export const CreateBookingProposalAsyncPagination$inboundSchema: z.ZodMiniType<
|
|
226
|
+
CreateBookingProposalAsyncPagination,
|
|
227
|
+
unknown
|
|
228
|
+
> = z.object({
|
|
229
|
+
total: types.number(),
|
|
230
|
+
perPage: types.number(),
|
|
231
|
+
currentPage: types.number(),
|
|
232
|
+
totalPages: types.number(),
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
export function createBookingProposalAsyncPaginationFromJSON(
|
|
236
|
+
jsonString: string,
|
|
237
|
+
): SafeParseResult<CreateBookingProposalAsyncPagination, SDKValidationError> {
|
|
238
|
+
return safeParse(
|
|
239
|
+
jsonString,
|
|
240
|
+
(x) =>
|
|
241
|
+
CreateBookingProposalAsyncPagination$inboundSchema.parse(JSON.parse(x)),
|
|
242
|
+
`Failed to parse 'CreateBookingProposalAsyncPagination' from JSON`,
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
export const CreateBookingProposalAsyncMeta$inboundSchema: z.ZodMiniType<
|
|
248
|
+
CreateBookingProposalAsyncMeta,
|
|
249
|
+
unknown
|
|
250
|
+
> = z.object({
|
|
251
|
+
warnings: z.optional(z.nullable(z.array(types.string()))),
|
|
252
|
+
pagination: z.optional(
|
|
253
|
+
z.nullable(
|
|
254
|
+
z.lazy(() => CreateBookingProposalAsyncPagination$inboundSchema),
|
|
255
|
+
),
|
|
256
|
+
),
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
export function createBookingProposalAsyncMetaFromJSON(
|
|
260
|
+
jsonString: string,
|
|
261
|
+
): SafeParseResult<CreateBookingProposalAsyncMeta, SDKValidationError> {
|
|
262
|
+
return safeParse(
|
|
263
|
+
jsonString,
|
|
264
|
+
(x) => CreateBookingProposalAsyncMeta$inboundSchema.parse(JSON.parse(x)),
|
|
265
|
+
`Failed to parse 'CreateBookingProposalAsyncMeta' from JSON`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** @internal */
|
|
270
|
+
export const CreateBookingProposalAsyncErrors$inboundSchema: z.ZodMiniType<
|
|
271
|
+
CreateBookingProposalAsyncErrors,
|
|
272
|
+
unknown
|
|
273
|
+
> = z.object({});
|
|
274
|
+
|
|
275
|
+
export function createBookingProposalAsyncErrorsFromJSON(
|
|
276
|
+
jsonString: string,
|
|
277
|
+
): SafeParseResult<CreateBookingProposalAsyncErrors, SDKValidationError> {
|
|
278
|
+
return safeParse(
|
|
279
|
+
jsonString,
|
|
280
|
+
(x) => CreateBookingProposalAsyncErrors$inboundSchema.parse(JSON.parse(x)),
|
|
281
|
+
`Failed to parse 'CreateBookingProposalAsyncErrors' from JSON`,
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export const CreateBookingProposalAsyncRawData$inboundSchema: z.ZodMiniType<
|
|
287
|
+
CreateBookingProposalAsyncRawData,
|
|
288
|
+
unknown
|
|
289
|
+
> = z.object({});
|
|
290
|
+
|
|
291
|
+
export function createBookingProposalAsyncRawDataFromJSON(
|
|
292
|
+
jsonString: string,
|
|
293
|
+
): SafeParseResult<CreateBookingProposalAsyncRawData, SDKValidationError> {
|
|
294
|
+
return safeParse(
|
|
295
|
+
jsonString,
|
|
296
|
+
(x) => CreateBookingProposalAsyncRawData$inboundSchema.parse(JSON.parse(x)),
|
|
297
|
+
`Failed to parse 'CreateBookingProposalAsyncRawData' from JSON`,
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** @internal */
|
|
302
|
+
export const CreateBookingProposalAsyncResponse$inboundSchema: z.ZodMiniType<
|
|
303
|
+
CreateBookingProposalAsyncResponse,
|
|
304
|
+
unknown
|
|
305
|
+
> = z.object({
|
|
306
|
+
meta: z.optional(
|
|
307
|
+
z.nullable(z.lazy(() => CreateBookingProposalAsyncMeta$inboundSchema)),
|
|
308
|
+
),
|
|
309
|
+
data: models.TaskIdResponseDto$inboundSchema,
|
|
310
|
+
errors: types.nullable(
|
|
311
|
+
z.lazy(() => CreateBookingProposalAsyncErrors$inboundSchema),
|
|
312
|
+
),
|
|
313
|
+
rawData: types.nullable(
|
|
314
|
+
z.lazy(() => CreateBookingProposalAsyncRawData$inboundSchema),
|
|
315
|
+
),
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
export function createBookingProposalAsyncResponseFromJSON(
|
|
319
|
+
jsonString: string,
|
|
320
|
+
): SafeParseResult<CreateBookingProposalAsyncResponse, SDKValidationError> {
|
|
321
|
+
return safeParse(
|
|
322
|
+
jsonString,
|
|
323
|
+
(x) =>
|
|
324
|
+
CreateBookingProposalAsyncResponse$inboundSchema.parse(JSON.parse(x)),
|
|
325
|
+
`Failed to parse 'CreateBookingProposalAsyncResponse' from JSON`,
|
|
326
|
+
);
|
|
327
|
+
}
|
|
@@ -126,6 +126,10 @@ export type GetBillsRequest = {
|
|
|
126
126
|
* Sort direction for the ordered results
|
|
127
127
|
*/
|
|
128
128
|
orderDir?: GetBillsOrderDir | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* ISO 8601 timestamp; only records with bill date after the provided value are returned
|
|
131
|
+
*/
|
|
132
|
+
billDateFrom?: string | undefined;
|
|
129
133
|
/**
|
|
130
134
|
* API key
|
|
131
135
|
*/
|
|
@@ -198,6 +202,7 @@ export type GetBillsRequest$Outbound = {
|
|
|
198
202
|
rawData?: boolean | undefined;
|
|
199
203
|
orderField?: string | undefined;
|
|
200
204
|
orderDir?: string | undefined;
|
|
205
|
+
billDateFrom?: string | undefined;
|
|
201
206
|
apiKey?: string | undefined;
|
|
202
207
|
accountKey?: string | undefined;
|
|
203
208
|
};
|
|
@@ -217,6 +222,7 @@ export const GetBillsRequest$outboundSchema: z.ZodMiniType<
|
|
|
217
222
|
rawData: z.optional(z.boolean()),
|
|
218
223
|
orderField: z.optional(GetBillsOrderField$outboundSchema),
|
|
219
224
|
orderDir: z.optional(GetBillsOrderDir$outboundSchema),
|
|
225
|
+
billDateFrom: z.optional(z.string()),
|
|
220
226
|
apiKey: z.optional(z.string()),
|
|
221
227
|
accountKey: z.optional(z.string()),
|
|
222
228
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as types from "../../types/primitives.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
@@ -14,11 +15,26 @@ export type GetDocumentTypesGlobals = {
|
|
|
14
15
|
accountKey?: string | undefined;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
export const GetDocumentTypesLimit = {
|
|
19
|
+
Five: 5,
|
|
20
|
+
Ten: 10,
|
|
21
|
+
Twenty: 20,
|
|
22
|
+
Fifty: 50,
|
|
23
|
+
OneHundred: 100,
|
|
24
|
+
} as const;
|
|
25
|
+
export type GetDocumentTypesLimit = ClosedEnum<typeof GetDocumentTypesLimit>;
|
|
26
|
+
|
|
17
27
|
export type GetDocumentTypesRequest = {
|
|
28
|
+
page?: number | undefined;
|
|
29
|
+
limit?: GetDocumentTypesLimit | undefined;
|
|
18
30
|
/**
|
|
19
31
|
* ID of the company (required for multi-company target systems)
|
|
20
32
|
*/
|
|
21
33
|
companyId?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* When true, returns the unprocessed response from the upstream target system
|
|
36
|
+
*/
|
|
37
|
+
rawData?: boolean | undefined;
|
|
22
38
|
/**
|
|
23
39
|
* API key
|
|
24
40
|
*/
|
|
@@ -55,9 +71,17 @@ export type GetDocumentTypesResponse = {
|
|
|
55
71
|
rawData: GetDocumentTypesRawData | null;
|
|
56
72
|
};
|
|
57
73
|
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const GetDocumentTypesLimit$outboundSchema: z.ZodMiniEnum<
|
|
76
|
+
typeof GetDocumentTypesLimit
|
|
77
|
+
> = z.enum(GetDocumentTypesLimit);
|
|
78
|
+
|
|
58
79
|
/** @internal */
|
|
59
80
|
export type GetDocumentTypesRequest$Outbound = {
|
|
81
|
+
page?: number | undefined;
|
|
82
|
+
limit?: number | undefined;
|
|
60
83
|
companyId?: string | undefined;
|
|
84
|
+
rawData?: boolean | undefined;
|
|
61
85
|
apiKey?: string | undefined;
|
|
62
86
|
accountKey?: string | undefined;
|
|
63
87
|
};
|
|
@@ -67,7 +91,10 @@ export const GetDocumentTypesRequest$outboundSchema: z.ZodMiniType<
|
|
|
67
91
|
GetDocumentTypesRequest$Outbound,
|
|
68
92
|
GetDocumentTypesRequest
|
|
69
93
|
> = z.object({
|
|
94
|
+
page: z.optional(z.number()),
|
|
95
|
+
limit: z.optional(GetDocumentTypesLimit$outboundSchema),
|
|
70
96
|
companyId: z.optional(z.string()),
|
|
97
|
+
rawData: z.optional(z.boolean()),
|
|
71
98
|
apiKey: z.optional(z.string()),
|
|
72
99
|
accountKey: z.optional(z.string()),
|
|
73
100
|
});
|
|
@@ -9,6 +9,7 @@ export * from "./create-account.js";
|
|
|
9
9
|
export * from "./create-bank-account.js";
|
|
10
10
|
export * from "./create-bill-line-item.js";
|
|
11
11
|
export * from "./create-bill.js";
|
|
12
|
+
export * from "./create-booking-proposal-async.js";
|
|
12
13
|
export * from "./create-booking-proposal-v2.js";
|
|
13
14
|
export * from "./create-booking-proposal.js";
|
|
14
15
|
export * from "./create-contact-v2.js";
|
|
@@ -144,6 +145,7 @@ export * from "./post-file-async.js";
|
|
|
144
145
|
export * from "./post-file.js";
|
|
145
146
|
export * from "./put-contact-v2.js";
|
|
146
147
|
export * from "./put-contact.js";
|
|
148
|
+
export * from "./system-login-url-post-auth.js";
|
|
147
149
|
export * from "./system-login-url.js";
|
|
148
150
|
export * from "./system-registration.js";
|
|
149
151
|
export * from "./update-bill-line-item.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type SystemLoginUrlPostAuthGlobals = {
|
|
10
|
+
apiKey?: string | undefined;
|
|
11
|
+
accountKey?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type SystemLoginUrlPostAuthRequest = {
|
|
15
|
+
targetSystem: string;
|
|
16
|
+
/**
|
|
17
|
+
* API key
|
|
18
|
+
*/
|
|
19
|
+
apiKey?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Account key
|
|
22
|
+
*/
|
|
23
|
+
accountKey?: string | undefined;
|
|
24
|
+
body: models.CreateAuthWebhookRequestDto;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type SystemLoginUrlPostAuthRequest$Outbound = {
|
|
29
|
+
TARGET_SYSTEM: string;
|
|
30
|
+
apiKey?: string | undefined;
|
|
31
|
+
accountKey?: string | undefined;
|
|
32
|
+
body: models.CreateAuthWebhookRequestDto$Outbound;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const SystemLoginUrlPostAuthRequest$outboundSchema: z.ZodMiniType<
|
|
37
|
+
SystemLoginUrlPostAuthRequest$Outbound,
|
|
38
|
+
SystemLoginUrlPostAuthRequest
|
|
39
|
+
> = z.pipe(
|
|
40
|
+
z.object({
|
|
41
|
+
targetSystem: z.string(),
|
|
42
|
+
apiKey: z.optional(z.string()),
|
|
43
|
+
accountKey: z.optional(z.string()),
|
|
44
|
+
body: models.CreateAuthWebhookRequestDto$outboundSchema,
|
|
45
|
+
}),
|
|
46
|
+
z.transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
targetSystem: "TARGET_SYSTEM",
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export function systemLoginUrlPostAuthRequestToJSON(
|
|
54
|
+
systemLoginUrlPostAuthRequest: SystemLoginUrlPostAuthRequest,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
SystemLoginUrlPostAuthRequest$outboundSchema.parse(
|
|
58
|
+
systemLoginUrlPostAuthRequest,
|
|
59
|
+
),
|
|
60
|
+
);
|
|
61
|
+
}
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { accountingCreateAccount } from "../funcs/accounting-create-account.js";
|
|
|
6
6
|
import { accountingCreateBankAccount } from "../funcs/accounting-create-bank-account.js";
|
|
7
7
|
import { accountingCreateBillLineItem } from "../funcs/accounting-create-bill-line-item.js";
|
|
8
8
|
import { accountingCreateBill } from "../funcs/accounting-create-bill.js";
|
|
9
|
+
import { accountingCreateBookingProposalAsync } from "../funcs/accounting-create-booking-proposal-async.js";
|
|
9
10
|
import { accountingCreateBookingProposal } from "../funcs/accounting-create-booking-proposal.js";
|
|
10
11
|
import { accountingCreateContact } from "../funcs/accounting-create-contact.js";
|
|
11
12
|
import { accountingCreateContactsV1 } from "../funcs/accounting-create-contacts-v1.js";
|
|
@@ -1363,4 +1364,15 @@ export class Accounting extends ClientSDK {
|
|
|
1363
1364
|
options,
|
|
1364
1365
|
));
|
|
1365
1366
|
}
|
|
1367
|
+
|
|
1368
|
+
async createBookingProposalAsync(
|
|
1369
|
+
request: operations.CreateBookingProposalAsyncRequest,
|
|
1370
|
+
options?: RequestOptions,
|
|
1371
|
+
): Promise<operations.CreateBookingProposalAsyncResponse> {
|
|
1372
|
+
return unwrapAsync(accountingCreateBookingProposalAsync(
|
|
1373
|
+
this,
|
|
1374
|
+
request,
|
|
1375
|
+
options,
|
|
1376
|
+
));
|
|
1377
|
+
}
|
|
1366
1378
|
}
|
package/src/sdk/auth.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { authCreateEndUserAccount } from "../funcs/auth-create-end-user-account.js";
|
|
6
6
|
import { authGetCompanies } from "../funcs/auth-get-companies.js";
|
|
7
7
|
import { authGetEnvironments } from "../funcs/auth-get-environments.js";
|
|
8
|
+
import { authSystemLoginUrlPostAuth } from "../funcs/auth-system-login-url-post-auth.js";
|
|
8
9
|
import { authSystemLoginUrl } from "../funcs/auth-system-login-url.js";
|
|
9
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
11
|
import * as operations from "../models/operations/index.js";
|
|
@@ -44,6 +45,17 @@ export class Auth extends ClientSDK {
|
|
|
44
45
|
));
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
async systemLoginUrlPostAuth(
|
|
49
|
+
request: operations.SystemLoginUrlPostAuthRequest,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): Promise<string> {
|
|
52
|
+
return unwrapAsync(authSystemLoginUrlPostAuth(
|
|
53
|
+
this,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
47
59
|
async createEndUserAccount(
|
|
48
60
|
request: operations.CreateEndUserAccountRequest,
|
|
49
61
|
options?: RequestOptions,
|