@maesn/typescript-sdk 0.8.21 → 0.8.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +2 -0
  2. package/esm/funcs/accounting-create-booking-proposal-attachment.d.ts +11 -0
  3. package/esm/funcs/accounting-create-booking-proposal-attachment.d.ts.map +1 -0
  4. package/esm/funcs/accounting-create-booking-proposal-attachment.js +103 -0
  5. package/esm/funcs/accounting-create-booking-proposal-attachment.js.map +1 -0
  6. package/esm/funcs/auth-system-login-url.js +1 -0
  7. package/esm/funcs/auth-system-login-url.js.map +1 -1
  8. package/esm/lib/config.d.ts +3 -3
  9. package/esm/lib/config.js +3 -3
  10. package/esm/models/create-auth-webhook-request-dto.d.ts +2 -0
  11. package/esm/models/create-auth-webhook-request-dto.d.ts.map +1 -1
  12. package/esm/models/create-auth-webhook-request-dto.js +1 -0
  13. package/esm/models/create-auth-webhook-request-dto.js.map +1 -1
  14. package/esm/models/index.d.ts +1 -0
  15. package/esm/models/index.d.ts.map +1 -1
  16. package/esm/models/index.js +1 -0
  17. package/esm/models/index.js.map +1 -1
  18. package/esm/models/operations/create-booking-proposal-attachment.d.ts +109 -0
  19. package/esm/models/operations/create-booking-proposal-attachment.d.ts.map +1 -0
  20. package/esm/models/operations/create-booking-proposal-attachment.js +90 -0
  21. package/esm/models/operations/create-booking-proposal-attachment.js.map +1 -0
  22. package/esm/models/operations/index.d.ts +1 -0
  23. package/esm/models/operations/index.d.ts.map +1 -1
  24. package/esm/models/operations/index.js +1 -0
  25. package/esm/models/operations/index.js.map +1 -1
  26. package/esm/models/operations/system-login-url.d.ts +5 -0
  27. package/esm/models/operations/system-login-url.d.ts.map +1 -1
  28. package/esm/models/operations/system-login-url.js +1 -0
  29. package/esm/models/operations/system-login-url.js.map +1 -1
  30. package/esm/models/submission-page-localization-dto.d.ts +20 -0
  31. package/esm/models/submission-page-localization-dto.d.ts.map +1 -0
  32. package/esm/models/submission-page-localization-dto.js +16 -0
  33. package/esm/models/submission-page-localization-dto.js.map +1 -0
  34. package/esm/models/submission-page-style-dto.d.ts +3 -0
  35. package/esm/models/submission-page-style-dto.d.ts.map +1 -1
  36. package/esm/models/submission-page-style-dto.js +2 -0
  37. package/esm/models/submission-page-style-dto.js.map +1 -1
  38. package/esm/sdk/accounting.d.ts +1 -0
  39. package/esm/sdk/accounting.d.ts.map +1 -1
  40. package/esm/sdk/accounting.js +4 -0
  41. package/esm/sdk/accounting.js.map +1 -1
  42. package/esm/types/smart-union.d.ts.map +1 -1
  43. package/esm/types/smart-union.js +13 -8
  44. package/esm/types/smart-union.js.map +1 -1
  45. package/jsr.json +1 -1
  46. package/package.json +1 -1
  47. package/src/funcs/accounting-create-booking-proposal-attachment.ts +227 -0
  48. package/src/funcs/auth-system-login-url.ts +1 -0
  49. package/src/lib/config.ts +3 -3
  50. package/src/models/create-auth-webhook-request-dto.ts +3 -0
  51. package/src/models/index.ts +1 -0
  52. package/src/models/operations/create-booking-proposal-attachment.ts +297 -0
  53. package/src/models/operations/index.ts +1 -0
  54. package/src/models/operations/system-login-url.ts +6 -0
  55. package/src/models/submission-page-localization-dto.ts +44 -0
  56. package/src/models/submission-page-style-dto.ts +10 -0
  57. package/src/sdk/accounting.ts +12 -0
  58. package/src/types/smart-union.ts +17 -8
@@ -0,0 +1,227 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { MaesnCore } from "../core.js";
7
+ import {
8
+ appendForm,
9
+ encodeFormQuery,
10
+ encodeSimple,
11
+ normalizeBlob,
12
+ } from "../lib/encodings.js";
13
+ import {
14
+ bytesToBlob,
15
+ getContentTypeFromFileName,
16
+ readableStreamToArrayBuffer,
17
+ } from "../lib/files.js";
18
+ import { matchStatusCode } from "../lib/http.js";
19
+ import * as M from "../lib/matchers.js";
20
+ import { compactMap } from "../lib/primitives.js";
21
+ import { safeParse } from "../lib/schemas.js";
22
+ import { RequestOptions } from "../lib/sdks.js";
23
+ import { pathToFunc } from "../lib/url.js";
24
+ import {
25
+ ConnectionError,
26
+ InvalidRequestError,
27
+ RequestAbortedError,
28
+ RequestTimeoutError,
29
+ UnexpectedClientError,
30
+ } from "../models/errors/http-client-errors.js";
31
+ import { MaesnError } from "../models/errors/maesn-error.js";
32
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
33
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
34
+ import * as operations from "../models/operations/index.js";
35
+ import { APICall, APIPromise } from "../types/async.js";
36
+ import { isBlobLike } from "../types/blobs.js";
37
+ import { Result } from "../types/fp.js";
38
+ import { isReadableStream } from "../types/streams.js";
39
+
40
+ export function accountingCreateBookingProposalAttachment(
41
+ client: MaesnCore,
42
+ request: operations.CreateBookingProposalAttachmentRequest,
43
+ options?: RequestOptions,
44
+ ): APIPromise<
45
+ Result<
46
+ operations.CreateBookingProposalAttachmentResponse,
47
+ | MaesnError
48
+ | ResponseValidationError
49
+ | ConnectionError
50
+ | RequestAbortedError
51
+ | RequestTimeoutError
52
+ | InvalidRequestError
53
+ | UnexpectedClientError
54
+ | SDKValidationError
55
+ >
56
+ > {
57
+ return new APIPromise($do(
58
+ client,
59
+ request,
60
+ options,
61
+ ));
62
+ }
63
+
64
+ async function $do(
65
+ client: MaesnCore,
66
+ request: operations.CreateBookingProposalAttachmentRequest,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ [
70
+ Result<
71
+ operations.CreateBookingProposalAttachmentResponse,
72
+ | MaesnError
73
+ | ResponseValidationError
74
+ | ConnectionError
75
+ | RequestAbortedError
76
+ | RequestTimeoutError
77
+ | InvalidRequestError
78
+ | UnexpectedClientError
79
+ | SDKValidationError
80
+ >,
81
+ APICall,
82
+ ]
83
+ > {
84
+ const parsed = safeParse(
85
+ request,
86
+ (value) =>
87
+ z.parse(
88
+ operations.CreateBookingProposalAttachmentRequest$outboundSchema,
89
+ value,
90
+ ),
91
+ "Input validation failed",
92
+ );
93
+ if (!parsed.ok) {
94
+ return [parsed, { status: "invalid" }];
95
+ }
96
+ const payload = parsed.value;
97
+ const body = new FormData();
98
+
99
+ if (payload.body.documentType !== undefined) {
100
+ appendForm(body, "documentType", payload.body.documentType);
101
+ }
102
+ if (payload.body.file !== undefined) {
103
+ if (isBlobLike(payload.body.file)) {
104
+ const file = payload.body.file;
105
+ const blob = await normalizeBlob(file);
106
+ const name = "name" in file ? (file.name as string) : undefined;
107
+ appendForm(body, "file", blob, name);
108
+ } else if (isReadableStream(payload.body.file.content)) {
109
+ const buffer = await readableStreamToArrayBuffer(
110
+ payload.body.file.content,
111
+ );
112
+ const contentType = getContentTypeFromFileName(payload.body.file.fileName)
113
+ || "application/octet-stream";
114
+ appendForm(
115
+ body,
116
+ "file",
117
+ bytesToBlob(buffer, contentType),
118
+ payload.body.file.fileName,
119
+ );
120
+ } else {
121
+ const contentType = getContentTypeFromFileName(payload.body.file.fileName)
122
+ || "application/octet-stream";
123
+ appendForm(
124
+ body,
125
+ "file",
126
+ bytesToBlob(payload.body.file.content, contentType),
127
+ payload.body.file.fileName,
128
+ );
129
+ }
130
+ }
131
+
132
+ const pathParams = {
133
+ bookingProposalId: encodeSimple(
134
+ "bookingProposalId",
135
+ payload.bookingProposalId,
136
+ { explode: false, charEncoding: "percent" },
137
+ ),
138
+ };
139
+ const path = pathToFunc(
140
+ "/accounting/bookingProposals/{bookingProposalId}/attachments",
141
+ )(pathParams);
142
+
143
+ const query = encodeFormQuery({
144
+ "companyId": payload.companyId,
145
+ "environmentName": payload.environmentName,
146
+ });
147
+
148
+ const headers = new Headers(compactMap({
149
+ Accept: "application/json",
150
+ "X-ACCOUNT-KEY": encodeSimple(
151
+ "X-ACCOUNT-KEY",
152
+ payload.accountKey ?? client._options.accountKey,
153
+ { explode: false, charEncoding: "none" },
154
+ ),
155
+ "X-API-KEY": encodeSimple(
156
+ "X-API-KEY",
157
+ payload.apiKey ?? client._options.apiKey,
158
+ { explode: false, charEncoding: "none" },
159
+ ),
160
+ }));
161
+
162
+ const context = {
163
+ options: client._options,
164
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
165
+ operationID: "createBookingProposalAttachment",
166
+ oAuth2Scopes: null,
167
+
168
+ resolvedSecurity: null,
169
+
170
+ securitySource: null,
171
+ retryConfig: options?.retries
172
+ || client._options.retryConfig
173
+ || { strategy: "none" },
174
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
175
+ };
176
+
177
+ const requestRes = client._createRequest(context, {
178
+ method: "POST",
179
+ baseURL: options?.serverURL,
180
+ path: path,
181
+ headers: headers,
182
+ query: query,
183
+ body: body,
184
+ userAgent: client._options.userAgent,
185
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
186
+ }, options);
187
+ if (!requestRes.ok) {
188
+ return [requestRes, { status: "invalid" }];
189
+ }
190
+ const req = requestRes.value;
191
+
192
+ const doResult = await client._do(req, {
193
+ context,
194
+ isErrorStatusCode: (statusCode: number) =>
195
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
196
+ retryConfig: context.retryConfig,
197
+ retryCodes: context.retryCodes,
198
+ });
199
+ if (!doResult.ok) {
200
+ return [doResult, { status: "request-error", request: req }];
201
+ }
202
+ const response = doResult.value;
203
+
204
+ const [result] = await M.match<
205
+ operations.CreateBookingProposalAttachmentResponse,
206
+ | MaesnError
207
+ | ResponseValidationError
208
+ | ConnectionError
209
+ | RequestAbortedError
210
+ | RequestTimeoutError
211
+ | InvalidRequestError
212
+ | UnexpectedClientError
213
+ | SDKValidationError
214
+ >(
215
+ M.json(
216
+ 201,
217
+ operations.CreateBookingProposalAttachmentResponse$inboundSchema,
218
+ ),
219
+ M.fail("4XX"),
220
+ M.fail("5XX"),
221
+ )(response, req);
222
+ if (!result.ok) {
223
+ return [result, { status: "complete", request: req, response }];
224
+ }
225
+
226
+ return [result, { status: "complete", request: req, response }];
227
+ }
@@ -96,6 +96,7 @@ async function $do(
96
96
  "companyId": payload.companyId,
97
97
  "environmentSelection": payload.environmentSelection,
98
98
  "include_signature": payload.include_signature,
99
+ "locale": payload.locale,
99
100
  "tenantId": payload.tenantId,
100
101
  });
101
102
 
package/src/lib/config.ts CHANGED
@@ -51,8 +51,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
51
51
  export const SDK_METADATA = {
52
52
  language: "typescript",
53
53
  openapiDocVersion: "1.0",
54
- sdkVersion: "0.8.21",
55
- genVersion: "2.938.0",
54
+ sdkVersion: "0.8.23",
55
+ genVersion: "2.946.0",
56
56
  userAgent:
57
- "speakeasy-sdk/typescript 0.8.21 2.938.0 1.0 @maesn/typescript-sdk",
57
+ "speakeasy-sdk/typescript 0.8.23 2.946.0 1.0 @maesn/typescript-sdk",
58
58
  } as const;
@@ -11,6 +11,7 @@ export type CreateAuthWebhookRequestDto = {
11
11
  includeSignature?: boolean | undefined;
12
12
  tenantId?: string | undefined;
13
13
  webhookCallbackUrl?: string | undefined;
14
+ locale?: string | undefined;
14
15
  };
15
16
 
16
17
  /** @internal */
@@ -21,6 +22,7 @@ export type CreateAuthWebhookRequestDto$Outbound = {
21
22
  includeSignature?: boolean | undefined;
22
23
  tenantId?: string | undefined;
23
24
  webhookCallbackUrl?: string | undefined;
25
+ locale?: string | undefined;
24
26
  };
25
27
 
26
28
  /** @internal */
@@ -34,6 +36,7 @@ export const CreateAuthWebhookRequestDto$outboundSchema: z.ZodMiniType<
34
36
  includeSignature: z.optional(z.boolean()),
35
37
  tenantId: z.optional(z.string()),
36
38
  webhookCallbackUrl: z.optional(z.string()),
39
+ locale: z.optional(z.string()),
37
40
  });
38
41
 
39
42
  export function createAuthWebhookRequestDtoToJSON(
@@ -136,6 +136,7 @@ export * from "./purchase-order-line-item-response-dto.js";
136
136
  export * from "./purchase-order-response-dto.js";
137
137
  export * from "./sales-order-line-item-response-dto.js";
138
138
  export * from "./sales-order-response-dto.js";
139
+ export * from "./submission-page-localization-dto.js";
139
140
  export * from "./submission-page-style-dto.js";
140
141
  export * from "./subscription.js";
141
142
  export * from "./system-registration-dto.js";
@@ -0,0 +1,297 @@
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 { blobLikeSchema } from "../../types/blobs.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
11
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
12
+ import * as models from "../index.js";
13
+
14
+ export type CreateBookingProposalAttachmentGlobals = {
15
+ apiKey?: string | undefined;
16
+ accountKey?: string | undefined;
17
+ };
18
+
19
+ export type CreateBookingProposalAttachmentFile = {
20
+ fileName: string;
21
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
22
+ };
23
+
24
+ export const DocumentType = {
25
+ Bill: "BILL",
26
+ Invoice: "INVOICE",
27
+ } as const;
28
+ export type DocumentType = ClosedEnum<typeof DocumentType>;
29
+
30
+ export type CreateBookingProposalAttachmentRequestBody = {
31
+ file?: CreateBookingProposalAttachmentFile | Blob | undefined;
32
+ documentType?: DocumentType | undefined;
33
+ };
34
+
35
+ export type CreateBookingProposalAttachmentRequest = {
36
+ bookingProposalId: string;
37
+ /**
38
+ * ID of the company (required for multi-company target systems)
39
+ */
40
+ companyId?: string | undefined;
41
+ /**
42
+ * Environment name (required for multi-environment systems such as Business Central)
43
+ */
44
+ environmentName?: string | undefined;
45
+ /**
46
+ * API key
47
+ */
48
+ apiKey?: string | undefined;
49
+ /**
50
+ * Account key
51
+ */
52
+ accountKey?: string | undefined;
53
+ body: CreateBookingProposalAttachmentRequestBody;
54
+ };
55
+
56
+ export type CreateBookingProposalAttachmentPagination = {
57
+ total: number;
58
+ perPage: number;
59
+ currentPage: number;
60
+ totalPages: number;
61
+ };
62
+
63
+ export type CreateBookingProposalAttachmentMeta = {
64
+ warnings?: Array<string> | null | undefined;
65
+ pagination?: CreateBookingProposalAttachmentPagination | null | undefined;
66
+ };
67
+
68
+ export type CreateBookingProposalAttachmentErrors = {};
69
+
70
+ export type CreateBookingProposalAttachmentRawData = {};
71
+
72
+ /**
73
+ * Booking proposal attachment uploaded successfully
74
+ */
75
+ export type CreateBookingProposalAttachmentResponse = {
76
+ meta?: CreateBookingProposalAttachmentMeta | null | undefined;
77
+ data: models.DocumentResponseDto;
78
+ errors: CreateBookingProposalAttachmentErrors | null;
79
+ rawData: CreateBookingProposalAttachmentRawData | null;
80
+ };
81
+
82
+ /** @internal */
83
+ export type CreateBookingProposalAttachmentFile$Outbound = {
84
+ fileName: string;
85
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
86
+ };
87
+
88
+ /** @internal */
89
+ export const CreateBookingProposalAttachmentFile$outboundSchema: z.ZodMiniType<
90
+ CreateBookingProposalAttachmentFile$Outbound,
91
+ CreateBookingProposalAttachmentFile
92
+ > = z.object({
93
+ fileName: z.string(),
94
+ content: z.union([
95
+ z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
96
+ z.custom<Blob>(x => x instanceof Blob),
97
+ z.custom<ArrayBuffer>(x => x instanceof ArrayBuffer),
98
+ z.custom<Uint8Array>(x => x instanceof Uint8Array),
99
+ ]),
100
+ });
101
+
102
+ export function createBookingProposalAttachmentFileToJSON(
103
+ createBookingProposalAttachmentFile: CreateBookingProposalAttachmentFile,
104
+ ): string {
105
+ return JSON.stringify(
106
+ CreateBookingProposalAttachmentFile$outboundSchema.parse(
107
+ createBookingProposalAttachmentFile,
108
+ ),
109
+ );
110
+ }
111
+
112
+ /** @internal */
113
+ export const DocumentType$outboundSchema: z.ZodMiniEnum<typeof DocumentType> = z
114
+ .enum(DocumentType);
115
+
116
+ /** @internal */
117
+ export type CreateBookingProposalAttachmentRequestBody$Outbound = {
118
+ file?: CreateBookingProposalAttachmentFile$Outbound | Blob | undefined;
119
+ documentType?: string | undefined;
120
+ };
121
+
122
+ /** @internal */
123
+ export const CreateBookingProposalAttachmentRequestBody$outboundSchema:
124
+ z.ZodMiniType<
125
+ CreateBookingProposalAttachmentRequestBody$Outbound,
126
+ CreateBookingProposalAttachmentRequestBody
127
+ > = z.object({
128
+ file: z.optional(
129
+ z.union([
130
+ z.lazy(() => CreateBookingProposalAttachmentFile$outboundSchema),
131
+ blobLikeSchema,
132
+ ]),
133
+ ),
134
+ documentType: z.optional(DocumentType$outboundSchema),
135
+ });
136
+
137
+ export function createBookingProposalAttachmentRequestBodyToJSON(
138
+ createBookingProposalAttachmentRequestBody:
139
+ CreateBookingProposalAttachmentRequestBody,
140
+ ): string {
141
+ return JSON.stringify(
142
+ CreateBookingProposalAttachmentRequestBody$outboundSchema.parse(
143
+ createBookingProposalAttachmentRequestBody,
144
+ ),
145
+ );
146
+ }
147
+
148
+ /** @internal */
149
+ export type CreateBookingProposalAttachmentRequest$Outbound = {
150
+ bookingProposalId: string;
151
+ companyId?: string | undefined;
152
+ environmentName?: string | undefined;
153
+ apiKey?: string | undefined;
154
+ accountKey?: string | undefined;
155
+ body: CreateBookingProposalAttachmentRequestBody$Outbound;
156
+ };
157
+
158
+ /** @internal */
159
+ export const CreateBookingProposalAttachmentRequest$outboundSchema:
160
+ z.ZodMiniType<
161
+ CreateBookingProposalAttachmentRequest$Outbound,
162
+ CreateBookingProposalAttachmentRequest
163
+ > = z.object({
164
+ bookingProposalId: z.string(),
165
+ companyId: z.optional(z.string()),
166
+ environmentName: z.optional(z.string()),
167
+ apiKey: z.optional(z.string()),
168
+ accountKey: z.optional(z.string()),
169
+ body: z.lazy(() =>
170
+ CreateBookingProposalAttachmentRequestBody$outboundSchema
171
+ ),
172
+ });
173
+
174
+ export function createBookingProposalAttachmentRequestToJSON(
175
+ createBookingProposalAttachmentRequest:
176
+ CreateBookingProposalAttachmentRequest,
177
+ ): string {
178
+ return JSON.stringify(
179
+ CreateBookingProposalAttachmentRequest$outboundSchema.parse(
180
+ createBookingProposalAttachmentRequest,
181
+ ),
182
+ );
183
+ }
184
+
185
+ /** @internal */
186
+ export const CreateBookingProposalAttachmentPagination$inboundSchema:
187
+ z.ZodMiniType<CreateBookingProposalAttachmentPagination, unknown> = z.object({
188
+ total: types.number(),
189
+ perPage: types.number(),
190
+ currentPage: types.number(),
191
+ totalPages: types.number(),
192
+ });
193
+
194
+ export function createBookingProposalAttachmentPaginationFromJSON(
195
+ jsonString: string,
196
+ ): SafeParseResult<
197
+ CreateBookingProposalAttachmentPagination,
198
+ SDKValidationError
199
+ > {
200
+ return safeParse(
201
+ jsonString,
202
+ (x) =>
203
+ CreateBookingProposalAttachmentPagination$inboundSchema.parse(
204
+ JSON.parse(x),
205
+ ),
206
+ `Failed to parse 'CreateBookingProposalAttachmentPagination' from JSON`,
207
+ );
208
+ }
209
+
210
+ /** @internal */
211
+ export const CreateBookingProposalAttachmentMeta$inboundSchema: z.ZodMiniType<
212
+ CreateBookingProposalAttachmentMeta,
213
+ unknown
214
+ > = z.object({
215
+ warnings: z.optional(z.nullable(z.array(types.string()))),
216
+ pagination: z.optional(
217
+ z.nullable(z.lazy(() =>
218
+ CreateBookingProposalAttachmentPagination$inboundSchema
219
+ )),
220
+ ),
221
+ });
222
+
223
+ export function createBookingProposalAttachmentMetaFromJSON(
224
+ jsonString: string,
225
+ ): SafeParseResult<CreateBookingProposalAttachmentMeta, SDKValidationError> {
226
+ return safeParse(
227
+ jsonString,
228
+ (x) =>
229
+ CreateBookingProposalAttachmentMeta$inboundSchema.parse(JSON.parse(x)),
230
+ `Failed to parse 'CreateBookingProposalAttachmentMeta' from JSON`,
231
+ );
232
+ }
233
+
234
+ /** @internal */
235
+ export const CreateBookingProposalAttachmentErrors$inboundSchema: z.ZodMiniType<
236
+ CreateBookingProposalAttachmentErrors,
237
+ unknown
238
+ > = z.object({});
239
+
240
+ export function createBookingProposalAttachmentErrorsFromJSON(
241
+ jsonString: string,
242
+ ): SafeParseResult<CreateBookingProposalAttachmentErrors, SDKValidationError> {
243
+ return safeParse(
244
+ jsonString,
245
+ (x) =>
246
+ CreateBookingProposalAttachmentErrors$inboundSchema.parse(JSON.parse(x)),
247
+ `Failed to parse 'CreateBookingProposalAttachmentErrors' from JSON`,
248
+ );
249
+ }
250
+
251
+ /** @internal */
252
+ export const CreateBookingProposalAttachmentRawData$inboundSchema:
253
+ z.ZodMiniType<CreateBookingProposalAttachmentRawData, unknown> = z.object({});
254
+
255
+ export function createBookingProposalAttachmentRawDataFromJSON(
256
+ jsonString: string,
257
+ ): SafeParseResult<CreateBookingProposalAttachmentRawData, SDKValidationError> {
258
+ return safeParse(
259
+ jsonString,
260
+ (x) =>
261
+ CreateBookingProposalAttachmentRawData$inboundSchema.parse(JSON.parse(x)),
262
+ `Failed to parse 'CreateBookingProposalAttachmentRawData' from JSON`,
263
+ );
264
+ }
265
+
266
+ /** @internal */
267
+ export const CreateBookingProposalAttachmentResponse$inboundSchema:
268
+ z.ZodMiniType<CreateBookingProposalAttachmentResponse, unknown> = z.object({
269
+ meta: z.optional(
270
+ z.nullable(
271
+ z.lazy(() => CreateBookingProposalAttachmentMeta$inboundSchema),
272
+ ),
273
+ ),
274
+ data: models.DocumentResponseDto$inboundSchema,
275
+ errors: types.nullable(
276
+ z.lazy(() => CreateBookingProposalAttachmentErrors$inboundSchema),
277
+ ),
278
+ rawData: types.nullable(
279
+ z.lazy(() => CreateBookingProposalAttachmentRawData$inboundSchema),
280
+ ),
281
+ });
282
+
283
+ export function createBookingProposalAttachmentResponseFromJSON(
284
+ jsonString: string,
285
+ ): SafeParseResult<
286
+ CreateBookingProposalAttachmentResponse,
287
+ SDKValidationError
288
+ > {
289
+ return safeParse(
290
+ jsonString,
291
+ (x) =>
292
+ CreateBookingProposalAttachmentResponse$inboundSchema.parse(
293
+ JSON.parse(x),
294
+ ),
295
+ `Failed to parse 'CreateBookingProposalAttachmentResponse' from JSON`,
296
+ );
297
+ }
@@ -10,6 +10,7 @@ export * from "./create-bank-account.js";
10
10
  export * from "./create-bill-line-item.js";
11
11
  export * from "./create-bill.js";
12
12
  export * from "./create-booking-proposal-async.js";
13
+ export * from "./create-booking-proposal-attachment.js";
13
14
  export * from "./create-booking-proposal-v2.js";
14
15
  export * from "./create-booking-proposal.js";
15
16
  export * from "./create-contact-v2.js";
@@ -40,6 +40,10 @@ export type SystemLoginUrlRequest = {
40
40
  * When set to true, appends a signature as a query parameter to the redirect URL.
41
41
  */
42
42
  includeSignature?: boolean | undefined;
43
+ /**
44
+ * BCP-47 language tag (for example de or de-DE) the authentication pages should be shown in. Falls back to the texts configured without a locale.
45
+ */
46
+ locale?: string | undefined;
43
47
  /**
44
48
  * API key
45
49
  */
@@ -60,6 +64,7 @@ export type SystemLoginUrlRequest$Outbound = {
60
64
  baseUrl?: string | undefined;
61
65
  environmentSelection?: boolean | undefined;
62
66
  include_signature?: boolean | undefined;
67
+ locale?: string | undefined;
63
68
  apiKey?: string | undefined;
64
69
  accountKey?: string | undefined;
65
70
  };
@@ -78,6 +83,7 @@ export const SystemLoginUrlRequest$outboundSchema: z.ZodMiniType<
78
83
  baseUrl: z.optional(z.string()),
79
84
  environmentSelection: z.optional(z.boolean()),
80
85
  includeSignature: z.optional(z.boolean()),
86
+ locale: z.optional(z.string()),
81
87
  apiKey: z.optional(z.string()),
82
88
  accountKey: z.optional(z.string()),
83
89
  }),
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type SubmissionPageLocalizationDto = {
8
+ locale?: string | undefined;
9
+ titleText?: string | undefined;
10
+ freeText?: string | undefined;
11
+ submitButtonText?: string | undefined;
12
+ cancelButtonText?: string | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export type SubmissionPageLocalizationDto$Outbound = {
17
+ locale?: string | undefined;
18
+ titleText?: string | undefined;
19
+ freeText?: string | undefined;
20
+ submitButtonText?: string | undefined;
21
+ cancelButtonText?: string | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const SubmissionPageLocalizationDto$outboundSchema: z.ZodMiniType<
26
+ SubmissionPageLocalizationDto$Outbound,
27
+ SubmissionPageLocalizationDto
28
+ > = z.object({
29
+ locale: z.optional(z.string()),
30
+ titleText: z.optional(z.string()),
31
+ freeText: z.optional(z.string()),
32
+ submitButtonText: z.optional(z.string()),
33
+ cancelButtonText: z.optional(z.string()),
34
+ });
35
+
36
+ export function submissionPageLocalizationDtoToJSON(
37
+ submissionPageLocalizationDto: SubmissionPageLocalizationDto,
38
+ ): string {
39
+ return JSON.stringify(
40
+ SubmissionPageLocalizationDto$outboundSchema.parse(
41
+ submissionPageLocalizationDto,
42
+ ),
43
+ );
44
+ }
@@ -3,6 +3,11 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
+ import {
7
+ SubmissionPageLocalizationDto,
8
+ SubmissionPageLocalizationDto$Outbound,
9
+ SubmissionPageLocalizationDto$outboundSchema,
10
+ } from "./submission-page-localization-dto.js";
6
11
 
7
12
  export type SubmissionPageStyleDto = {
8
13
  logoSvg: string;
@@ -16,6 +21,7 @@ export type SubmissionPageStyleDto = {
16
21
  cancelButtonColor: string;
17
22
  cancelButtonTextColor: string;
18
23
  errorTextColor: string;
24
+ pageLocalizations?: Array<SubmissionPageLocalizationDto> | undefined;
19
25
  };
20
26
 
21
27
  /** @internal */
@@ -31,6 +37,7 @@ export type SubmissionPageStyleDto$Outbound = {
31
37
  cancelButtonColor: string;
32
38
  cancelButtonTextColor: string;
33
39
  errorTextColor: string;
40
+ pageLocalizations?: Array<SubmissionPageLocalizationDto$Outbound> | undefined;
34
41
  };
35
42
 
36
43
  /** @internal */
@@ -49,6 +56,9 @@ export const SubmissionPageStyleDto$outboundSchema: z.ZodMiniType<
49
56
  cancelButtonColor: z.string(),
50
57
  cancelButtonTextColor: z.string(),
51
58
  errorTextColor: z.string(),
59
+ pageLocalizations: z.optional(
60
+ z.array(SubmissionPageLocalizationDto$outboundSchema),
61
+ ),
52
62
  });
53
63
 
54
64
  export function submissionPageStyleDtoToJSON(