@maesn/typescript-sdk 0.8.6 → 0.8.8

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 (61) hide show
  1. package/README.md +4 -2
  2. package/esm/funcs/accounting-create-payment.js +1 -0
  3. package/esm/funcs/accounting-create-payment.js.map +1 -1
  4. package/esm/funcs/{accounting-v2-get-dimensions-by-dimension.d.ts → accounting-get-dimensions-by-dimension.d.ts} +2 -2
  5. package/esm/funcs/accounting-get-dimensions-by-dimension.d.ts.map +1 -0
  6. package/esm/funcs/{accounting-v2-get-dimensions-by-dimension.js → accounting-get-dimensions-by-dimension.js} +3 -3
  7. package/esm/funcs/accounting-get-dimensions-by-dimension.js.map +1 -0
  8. package/esm/funcs/accounting-v2-get-dimensions-by-dimension-v2.d.ts +11 -0
  9. package/esm/funcs/accounting-v2-get-dimensions-by-dimension-v2.d.ts.map +1 -0
  10. package/esm/funcs/accounting-v2-get-dimensions-by-dimension-v2.js +95 -0
  11. package/esm/funcs/accounting-v2-get-dimensions-by-dimension-v2.js.map +1 -0
  12. package/esm/lib/config.d.ts +3 -3
  13. package/esm/lib/config.js +3 -3
  14. package/esm/models/create-journal-entry-request-dto.d.ts +10 -0
  15. package/esm/models/create-journal-entry-request-dto.d.ts.map +1 -1
  16. package/esm/models/create-journal-entry-request-dto.js +8 -0
  17. package/esm/models/create-journal-entry-request-dto.js.map +1 -1
  18. package/esm/models/fiscal-year-response-dto.d.ts +10 -10
  19. package/esm/models/fiscal-year-response-dto.d.ts.map +1 -1
  20. package/esm/models/fiscal-year-response-dto.js +10 -10
  21. package/esm/models/fiscal-year-response-dto.js.map +1 -1
  22. package/esm/models/journal-entry-response-dto.d.ts +9 -0
  23. package/esm/models/journal-entry-response-dto.d.ts.map +1 -1
  24. package/esm/models/journal-entry-response-dto.js +8 -0
  25. package/esm/models/journal-entry-response-dto.js.map +1 -1
  26. package/esm/models/operations/create-payment.d.ts +5 -0
  27. package/esm/models/operations/create-payment.d.ts.map +1 -1
  28. package/esm/models/operations/create-payment.js +1 -0
  29. package/esm/models/operations/create-payment.js.map +1 -1
  30. package/esm/models/operations/get-dimensions-by-dimension-v2.d.ts +100 -0
  31. package/esm/models/operations/get-dimensions-by-dimension-v2.d.ts.map +1 -0
  32. package/esm/models/operations/get-dimensions-by-dimension-v2.js +70 -0
  33. package/esm/models/operations/get-dimensions-by-dimension-v2.js.map +1 -0
  34. package/esm/models/operations/index.d.ts +1 -0
  35. package/esm/models/operations/index.d.ts.map +1 -1
  36. package/esm/models/operations/index.js +1 -0
  37. package/esm/models/operations/index.js.map +1 -1
  38. package/esm/sdk/accounting-v2.d.ts +1 -1
  39. package/esm/sdk/accounting-v2.d.ts.map +1 -1
  40. package/esm/sdk/accounting-v2.js +3 -3
  41. package/esm/sdk/accounting-v2.js.map +1 -1
  42. package/esm/sdk/accounting.d.ts +1 -0
  43. package/esm/sdk/accounting.d.ts.map +1 -1
  44. package/esm/sdk/accounting.js +4 -0
  45. package/esm/sdk/accounting.js.map +1 -1
  46. package/jsr.json +1 -1
  47. package/package.json +1 -1
  48. package/src/funcs/accounting-create-payment.ts +1 -0
  49. package/src/funcs/{accounting-v2-get-dimensions-by-dimension.ts → accounting-get-dimensions-by-dimension.ts} +2 -2
  50. package/src/funcs/accounting-v2-get-dimensions-by-dimension-v2.ts +190 -0
  51. package/src/lib/config.ts +3 -3
  52. package/src/models/create-journal-entry-request-dto.ts +18 -0
  53. package/src/models/fiscal-year-response-dto.ts +22 -20
  54. package/src/models/journal-entry-response-dto.ts +16 -0
  55. package/src/models/operations/create-payment.ts +6 -0
  56. package/src/models/operations/get-dimensions-by-dimension-v2.ts +232 -0
  57. package/src/models/operations/index.ts +1 -0
  58. package/src/sdk/accounting-v2.ts +5 -5
  59. package/src/sdk/accounting.ts +12 -0
  60. package/esm/funcs/accounting-v2-get-dimensions-by-dimension.d.ts.map +0 -1
  61. package/esm/funcs/accounting-v2-get-dimensions-by-dimension.js.map +0 -1
@@ -0,0 +1,190 @@
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 { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/http-client-errors.js";
21
+ import { MaesnError } from "../models/errors/maesn-error.js";
22
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
23
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ export function accountingV2GetDimensionsByDimensionV2(
29
+ client: MaesnCore,
30
+ request: operations.GetDimensionsByDimensionV2Request,
31
+ options?: RequestOptions,
32
+ ): APIPromise<
33
+ Result<
34
+ operations.GetDimensionsByDimensionV2Response,
35
+ | MaesnError
36
+ | ResponseValidationError
37
+ | ConnectionError
38
+ | RequestAbortedError
39
+ | RequestTimeoutError
40
+ | InvalidRequestError
41
+ | UnexpectedClientError
42
+ | SDKValidationError
43
+ >
44
+ > {
45
+ return new APIPromise($do(
46
+ client,
47
+ request,
48
+ options,
49
+ ));
50
+ }
51
+
52
+ async function $do(
53
+ client: MaesnCore,
54
+ request: operations.GetDimensionsByDimensionV2Request,
55
+ options?: RequestOptions,
56
+ ): Promise<
57
+ [
58
+ Result<
59
+ operations.GetDimensionsByDimensionV2Response,
60
+ | MaesnError
61
+ | ResponseValidationError
62
+ | ConnectionError
63
+ | RequestAbortedError
64
+ | RequestTimeoutError
65
+ | InvalidRequestError
66
+ | UnexpectedClientError
67
+ | SDKValidationError
68
+ >,
69
+ APICall,
70
+ ]
71
+ > {
72
+ const parsed = safeParse(
73
+ request,
74
+ (value) =>
75
+ z.parse(
76
+ operations.GetDimensionsByDimensionV2Request$outboundSchema,
77
+ value,
78
+ ),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed.ok) {
82
+ return [parsed, { status: "invalid" }];
83
+ }
84
+ const payload = parsed.value;
85
+ const body = null;
86
+
87
+ const pathParams = {
88
+ dimension: encodeSimple("dimension", payload.dimension, {
89
+ explode: false,
90
+ charEncoding: "percent",
91
+ }),
92
+ };
93
+ const path = pathToFunc("/accounting/v2/dimensions/{dimension}")(pathParams);
94
+
95
+ const query = encodeFormQuery({
96
+ "companyId": payload.companyId,
97
+ "environmentName": payload.environmentName,
98
+ "lastModifiedAt": payload.lastModifiedAt,
99
+ "limit": payload.limit,
100
+ "page": payload.page,
101
+ "rawData": payload.rawData,
102
+ });
103
+
104
+ const headers = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ "X-ACCOUNT-KEY": encodeSimple(
107
+ "X-ACCOUNT-KEY",
108
+ payload.accountKey ?? client._options.accountKey,
109
+ { explode: false, charEncoding: "none" },
110
+ ),
111
+ "X-API-KEY": encodeSimple(
112
+ "X-API-KEY",
113
+ payload.apiKey ?? client._options.apiKey,
114
+ { explode: false, charEncoding: "none" },
115
+ ),
116
+ }));
117
+
118
+ const context = {
119
+ options: client._options,
120
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
121
+ operationID: "getDimensionsByDimensionV2",
122
+ oAuth2Scopes: null,
123
+
124
+ resolvedSecurity: null,
125
+
126
+ securitySource: null,
127
+ retryConfig: options?.retries
128
+ || client._options.retryConfig
129
+ || {
130
+ strategy: "backoff",
131
+ backoff: {
132
+ initialInterval: 500,
133
+ maxInterval: 60000,
134
+ exponent: 1.5,
135
+ maxElapsedTime: 3600000,
136
+ },
137
+ retryConnectionErrors: true,
138
+ }
139
+ || { strategy: "none" },
140
+ retryCodes: options?.retryCodes || ["5XX"],
141
+ };
142
+
143
+ const requestRes = client._createRequest(context, {
144
+ method: "GET",
145
+ baseURL: options?.serverURL,
146
+ path: path,
147
+ headers: headers,
148
+ query: query,
149
+ body: body,
150
+ userAgent: client._options.userAgent,
151
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
152
+ }, options);
153
+ if (!requestRes.ok) {
154
+ return [requestRes, { status: "invalid" }];
155
+ }
156
+ const req = requestRes.value;
157
+
158
+ const doResult = await client._do(req, {
159
+ context,
160
+ isErrorStatusCode: (statusCode: number) =>
161
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
162
+ retryConfig: context.retryConfig,
163
+ retryCodes: context.retryCodes,
164
+ });
165
+ if (!doResult.ok) {
166
+ return [doResult, { status: "request-error", request: req }];
167
+ }
168
+ const response = doResult.value;
169
+
170
+ const [result] = await M.match<
171
+ operations.GetDimensionsByDimensionV2Response,
172
+ | MaesnError
173
+ | ResponseValidationError
174
+ | ConnectionError
175
+ | RequestAbortedError
176
+ | RequestTimeoutError
177
+ | InvalidRequestError
178
+ | UnexpectedClientError
179
+ | SDKValidationError
180
+ >(
181
+ M.json(200, operations.GetDimensionsByDimensionV2Response$inboundSchema),
182
+ M.fail("4XX"),
183
+ M.fail("5XX"),
184
+ )(response, req);
185
+ if (!result.ok) {
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
188
+
189
+ return [result, { status: "complete", request: req, response }];
190
+ }
package/src/lib/config.ts CHANGED
@@ -51,7 +51,7 @@ 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.6",
55
- genVersion: "2.912.1",
56
- userAgent: "speakeasy-sdk/typescript 0.8.6 2.912.1 1.0 @maesn/typescript-sdk",
54
+ sdkVersion: "0.8.8",
55
+ genVersion: "2.914.0",
56
+ userAgent: "speakeasy-sdk/typescript 0.8.8 2.914.0 1.0 @maesn/typescript-sdk",
57
57
  } as const;
@@ -185,6 +185,15 @@ export type CreateJournalEntryRequestDtoDebitCreditIndicator = ClosedEnum<
185
185
  typeof CreateJournalEntryRequestDtoDebitCreditIndicator
186
186
  >;
187
187
 
188
+ export const CreateJournalEntryRequestDtoRecordType = {
189
+ Standard: "STANDARD",
190
+ Closing: "CLOSING",
191
+ Opening: "OPENING",
192
+ } as const;
193
+ export type CreateJournalEntryRequestDtoRecordType = ClosedEnum<
194
+ typeof CreateJournalEntryRequestDtoRecordType
195
+ >;
196
+
188
197
  export type CreateJournalEntryRequestDto = {
189
198
  accountId?: string | undefined;
190
199
  accountingPeriodId?: string | undefined;
@@ -203,6 +212,7 @@ export type CreateJournalEntryRequestDto = {
203
212
  journalLineItems?: Array<CreateJournalLineItem> | undefined;
204
213
  journalType?: string | undefined;
205
214
  number?: string | undefined;
215
+ recordType?: CreateJournalEntryRequestDtoRecordType | undefined;
206
216
  taxAssignmentDate?: string | undefined;
207
217
  transactionDate?: string | undefined;
208
218
  };
@@ -217,6 +227,12 @@ export const CreateJournalEntryRequestDtoDebitCreditIndicator$outboundSchema:
217
227
  z.ZodMiniEnum<typeof CreateJournalEntryRequestDtoDebitCreditIndicator> = z
218
228
  .enum(CreateJournalEntryRequestDtoDebitCreditIndicator);
219
229
 
230
+ /** @internal */
231
+ export const CreateJournalEntryRequestDtoRecordType$outboundSchema:
232
+ z.ZodMiniEnum<typeof CreateJournalEntryRequestDtoRecordType> = z.enum(
233
+ CreateJournalEntryRequestDtoRecordType,
234
+ );
235
+
220
236
  /** @internal */
221
237
  export type CreateJournalEntryRequestDto$Outbound = {
222
238
  accountId?: string | undefined;
@@ -234,6 +250,7 @@ export type CreateJournalEntryRequestDto$Outbound = {
234
250
  journalLineItems?: Array<CreateJournalLineItem$Outbound> | undefined;
235
251
  journalType?: string | undefined;
236
252
  number?: string | undefined;
253
+ recordType?: string | undefined;
237
254
  taxAssignmentDate?: string | undefined;
238
255
  transactionDate?: string | undefined;
239
256
  };
@@ -260,6 +277,7 @@ export const CreateJournalEntryRequestDto$outboundSchema: z.ZodMiniType<
260
277
  journalLineItems: z.optional(z.array(CreateJournalLineItem$outboundSchema)),
261
278
  journalType: z.optional(z.string()),
262
279
  number: z.optional(z.string()),
280
+ recordType: z.optional(CreateJournalEntryRequestDtoRecordType$outboundSchema),
263
281
  taxAssignmentDate: z.optional(z.string()),
264
282
  transactionDate: z.optional(z.string()),
265
283
  });
@@ -36,16 +36,16 @@ export type FiscalYearResponseDtoStatus = ClosedEnum<
36
36
  >;
37
37
 
38
38
  export type FiscalYearResponseDto = {
39
- id: string;
40
- accountNumberLength: number;
41
- availableLedgers: Array<AvailableLedger>;
42
- chartOfAccount: FiscalYearResponseDtoChartOfAccount;
43
- createdDate: string;
44
- description: string;
45
- endDate: string;
46
- startDate: string;
47
- status: FiscalYearResponseDtoStatus;
48
- updatedDate: string;
39
+ id: string | null;
40
+ accountNumberLength: number | null;
41
+ availableLedgers: Array<AvailableLedger> | null;
42
+ chartOfAccount: FiscalYearResponseDtoChartOfAccount | null;
43
+ createdDate: string | null;
44
+ description: string | null;
45
+ endDate: string | null;
46
+ startDate: string | null;
47
+ status: FiscalYearResponseDtoStatus | null;
48
+ updatedDate: string | null;
49
49
  };
50
50
 
51
51
  /** @internal */
@@ -68,16 +68,18 @@ export const FiscalYearResponseDto$inboundSchema: z.ZodMiniType<
68
68
  FiscalYearResponseDto,
69
69
  unknown
70
70
  > = z.object({
71
- id: types.string(),
72
- accountNumberLength: types.number(),
73
- availableLedgers: z.array(AvailableLedger$inboundSchema),
74
- chartOfAccount: FiscalYearResponseDtoChartOfAccount$inboundSchema,
75
- createdDate: types.string(),
76
- description: types.string(),
77
- endDate: types.string(),
78
- startDate: types.string(),
79
- status: FiscalYearResponseDtoStatus$inboundSchema,
80
- updatedDate: types.string(),
71
+ id: types.nullable(types.string()),
72
+ accountNumberLength: types.nullable(types.number()),
73
+ availableLedgers: types.nullable(z.array(AvailableLedger$inboundSchema)),
74
+ chartOfAccount: types.nullable(
75
+ FiscalYearResponseDtoChartOfAccount$inboundSchema,
76
+ ),
77
+ createdDate: types.nullable(types.string()),
78
+ description: types.nullable(types.string()),
79
+ endDate: types.nullable(types.string()),
80
+ startDate: types.nullable(types.string()),
81
+ status: types.nullable(FiscalYearResponseDtoStatus$inboundSchema),
82
+ updatedDate: types.nullable(types.string()),
81
83
  });
82
84
 
83
85
  export function fiscalYearResponseDtoFromJSON(
@@ -201,6 +201,15 @@ export type JournalEntryResponseDtoDebitCreditIndicator = ClosedEnum<
201
201
  typeof JournalEntryResponseDtoDebitCreditIndicator
202
202
  >;
203
203
 
204
+ export const JournalEntryResponseDtoRecordType = {
205
+ Standard: "STANDARD",
206
+ Closing: "CLOSING",
207
+ Opening: "OPENING",
208
+ } as const;
209
+ export type JournalEntryResponseDtoRecordType = ClosedEnum<
210
+ typeof JournalEntryResponseDtoRecordType
211
+ >;
212
+
204
213
  export type JournalEntryResponseDto = {
205
214
  id: string | null;
206
215
  accountId: string | null;
@@ -223,6 +232,7 @@ export type JournalEntryResponseDto = {
223
232
  journalLineItems: Array<JournalLineItem> | null;
224
233
  journalType: string | null;
225
234
  number: string | null;
235
+ recordType: JournalEntryResponseDtoRecordType | null;
226
236
  taxAssignmentDate?: string | null | undefined;
227
237
  transactionDate: string | null;
228
238
  updatedDate: string | null;
@@ -263,6 +273,11 @@ export const JournalEntryResponseDtoDebitCreditIndicator$inboundSchema:
263
273
  JournalEntryResponseDtoDebitCreditIndicator,
264
274
  );
265
275
 
276
+ /** @internal */
277
+ export const JournalEntryResponseDtoRecordType$inboundSchema: z.ZodMiniEnum<
278
+ typeof JournalEntryResponseDtoRecordType
279
+ > = z.enum(JournalEntryResponseDtoRecordType);
280
+
266
281
  /** @internal */
267
282
  export const JournalEntryResponseDto$inboundSchema: z.ZodMiniType<
268
283
  JournalEntryResponseDto,
@@ -290,6 +305,7 @@ export const JournalEntryResponseDto$inboundSchema: z.ZodMiniType<
290
305
  journalLineItems: types.nullable(z.array(JournalLineItem$inboundSchema)),
291
306
  journalType: types.nullable(types.string()),
292
307
  number: types.nullable(types.string()),
308
+ recordType: types.nullable(JournalEntryResponseDtoRecordType$inboundSchema),
293
309
  taxAssignmentDate: z.optional(z.nullable(types.string())),
294
310
  transactionDate: types.nullable(types.string()),
295
311
  updatedDate: types.nullable(types.string()),
@@ -19,6 +19,10 @@ export type CreatePaymentRequest = {
19
19
  * ID of the company (required for multi-company target systems)
20
20
  */
21
21
  companyId?: string | undefined;
22
+ /**
23
+ * Environment name (required for multi-environment systems such as Business Central)
24
+ */
25
+ environmentName?: string | undefined;
22
26
  /**
23
27
  * API key
24
28
  */
@@ -59,6 +63,7 @@ export type CreatePaymentResponse = {
59
63
  /** @internal */
60
64
  export type CreatePaymentRequest$Outbound = {
61
65
  companyId?: string | undefined;
66
+ environmentName?: string | undefined;
62
67
  apiKey?: string | undefined;
63
68
  accountKey?: string | undefined;
64
69
  body: models.CreatePaymentRequestDto$Outbound;
@@ -70,6 +75,7 @@ export const CreatePaymentRequest$outboundSchema: z.ZodMiniType<
70
75
  CreatePaymentRequest
71
76
  > = z.object({
72
77
  companyId: z.optional(z.string()),
78
+ environmentName: z.optional(z.string()),
73
79
  apiKey: z.optional(z.string()),
74
80
  accountKey: z.optional(z.string()),
75
81
  body: models.CreatePaymentRequestDto$outboundSchema,
@@ -0,0 +1,232 @@
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 GetDimensionsByDimensionV2Globals = {
14
+ apiKey?: string | undefined;
15
+ accountKey?: string | undefined;
16
+ };
17
+
18
+ export const GetDimensionsByDimensionV2Limit = {
19
+ Five: 5,
20
+ Ten: 10,
21
+ Twenty: 20,
22
+ Fifty: 50,
23
+ OneHundred: 100,
24
+ } as const;
25
+ export type GetDimensionsByDimensionV2Limit = ClosedEnum<
26
+ typeof GetDimensionsByDimensionV2Limit
27
+ >;
28
+
29
+ export type GetDimensionsByDimensionV2Request = {
30
+ dimension: string;
31
+ page?: number | undefined;
32
+ limit?: GetDimensionsByDimensionV2Limit | undefined;
33
+ /**
34
+ * ISO 8601 timestamp; only records modified after this date are returned
35
+ */
36
+ lastModifiedAt?: string | undefined;
37
+ /**
38
+ * Environment name (required for multi-environment systems such as Business Central)
39
+ */
40
+ environmentName?: string | undefined;
41
+ /**
42
+ * ID of the company (required for multi-company target systems)
43
+ */
44
+ companyId?: string | undefined;
45
+ /**
46
+ * When true, returns the unprocessed response from the upstream target system
47
+ */
48
+ rawData?: boolean | undefined;
49
+ /**
50
+ * API key
51
+ */
52
+ apiKey?: string | undefined;
53
+ /**
54
+ * Account key
55
+ */
56
+ accountKey?: string | undefined;
57
+ };
58
+
59
+ export type GetDimensionsByDimensionV2Pagination = {
60
+ total: number;
61
+ perPage: number;
62
+ currentPage: number;
63
+ totalPages: number;
64
+ };
65
+
66
+ export type GetDimensionsByDimensionV2Meta = {
67
+ warnings?: Array<string> | null | undefined;
68
+ pagination?: GetDimensionsByDimensionV2Pagination | null | undefined;
69
+ };
70
+
71
+ export type GetDimensionsByDimensionV2Errors = {};
72
+
73
+ export type GetDimensionsByDimensionV2RawData = {};
74
+
75
+ /**
76
+ * List of dimension values for the authenticated end user's connected target system
77
+ */
78
+ export type GetDimensionsByDimensionV2Response = {
79
+ meta?: GetDimensionsByDimensionV2Meta | null | undefined;
80
+ data: Array<models.DimensionMetaResponseDto>;
81
+ errors: GetDimensionsByDimensionV2Errors | null;
82
+ rawData: GetDimensionsByDimensionV2RawData | null;
83
+ };
84
+
85
+ /** @internal */
86
+ export const GetDimensionsByDimensionV2Limit$outboundSchema: z.ZodMiniEnum<
87
+ typeof GetDimensionsByDimensionV2Limit
88
+ > = z.enum(GetDimensionsByDimensionV2Limit);
89
+
90
+ /** @internal */
91
+ export type GetDimensionsByDimensionV2Request$Outbound = {
92
+ dimension: string;
93
+ page?: number | undefined;
94
+ limit?: number | undefined;
95
+ lastModifiedAt?: string | undefined;
96
+ environmentName?: string | undefined;
97
+ companyId?: string | undefined;
98
+ rawData?: boolean | undefined;
99
+ apiKey?: string | undefined;
100
+ accountKey?: string | undefined;
101
+ };
102
+
103
+ /** @internal */
104
+ export const GetDimensionsByDimensionV2Request$outboundSchema: z.ZodMiniType<
105
+ GetDimensionsByDimensionV2Request$Outbound,
106
+ GetDimensionsByDimensionV2Request
107
+ > = z.object({
108
+ dimension: z.string(),
109
+ page: z.optional(z.number()),
110
+ limit: z.optional(GetDimensionsByDimensionV2Limit$outboundSchema),
111
+ lastModifiedAt: z.optional(z.string()),
112
+ environmentName: z.optional(z.string()),
113
+ companyId: z.optional(z.string()),
114
+ rawData: z.optional(z.boolean()),
115
+ apiKey: z.optional(z.string()),
116
+ accountKey: z.optional(z.string()),
117
+ });
118
+
119
+ export function getDimensionsByDimensionV2RequestToJSON(
120
+ getDimensionsByDimensionV2Request: GetDimensionsByDimensionV2Request,
121
+ ): string {
122
+ return JSON.stringify(
123
+ GetDimensionsByDimensionV2Request$outboundSchema.parse(
124
+ getDimensionsByDimensionV2Request,
125
+ ),
126
+ );
127
+ }
128
+
129
+ /** @internal */
130
+ export const GetDimensionsByDimensionV2Pagination$inboundSchema: z.ZodMiniType<
131
+ GetDimensionsByDimensionV2Pagination,
132
+ unknown
133
+ > = z.object({
134
+ total: types.number(),
135
+ perPage: types.number(),
136
+ currentPage: types.number(),
137
+ totalPages: types.number(),
138
+ });
139
+
140
+ export function getDimensionsByDimensionV2PaginationFromJSON(
141
+ jsonString: string,
142
+ ): SafeParseResult<GetDimensionsByDimensionV2Pagination, SDKValidationError> {
143
+ return safeParse(
144
+ jsonString,
145
+ (x) =>
146
+ GetDimensionsByDimensionV2Pagination$inboundSchema.parse(JSON.parse(x)),
147
+ `Failed to parse 'GetDimensionsByDimensionV2Pagination' from JSON`,
148
+ );
149
+ }
150
+
151
+ /** @internal */
152
+ export const GetDimensionsByDimensionV2Meta$inboundSchema: z.ZodMiniType<
153
+ GetDimensionsByDimensionV2Meta,
154
+ unknown
155
+ > = z.object({
156
+ warnings: z.optional(z.nullable(z.array(types.string()))),
157
+ pagination: z.optional(
158
+ z.nullable(
159
+ z.lazy(() => GetDimensionsByDimensionV2Pagination$inboundSchema),
160
+ ),
161
+ ),
162
+ });
163
+
164
+ export function getDimensionsByDimensionV2MetaFromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<GetDimensionsByDimensionV2Meta, SDKValidationError> {
167
+ return safeParse(
168
+ jsonString,
169
+ (x) => GetDimensionsByDimensionV2Meta$inboundSchema.parse(JSON.parse(x)),
170
+ `Failed to parse 'GetDimensionsByDimensionV2Meta' from JSON`,
171
+ );
172
+ }
173
+
174
+ /** @internal */
175
+ export const GetDimensionsByDimensionV2Errors$inboundSchema: z.ZodMiniType<
176
+ GetDimensionsByDimensionV2Errors,
177
+ unknown
178
+ > = z.object({});
179
+
180
+ export function getDimensionsByDimensionV2ErrorsFromJSON(
181
+ jsonString: string,
182
+ ): SafeParseResult<GetDimensionsByDimensionV2Errors, SDKValidationError> {
183
+ return safeParse(
184
+ jsonString,
185
+ (x) => GetDimensionsByDimensionV2Errors$inboundSchema.parse(JSON.parse(x)),
186
+ `Failed to parse 'GetDimensionsByDimensionV2Errors' from JSON`,
187
+ );
188
+ }
189
+
190
+ /** @internal */
191
+ export const GetDimensionsByDimensionV2RawData$inboundSchema: z.ZodMiniType<
192
+ GetDimensionsByDimensionV2RawData,
193
+ unknown
194
+ > = z.object({});
195
+
196
+ export function getDimensionsByDimensionV2RawDataFromJSON(
197
+ jsonString: string,
198
+ ): SafeParseResult<GetDimensionsByDimensionV2RawData, SDKValidationError> {
199
+ return safeParse(
200
+ jsonString,
201
+ (x) => GetDimensionsByDimensionV2RawData$inboundSchema.parse(JSON.parse(x)),
202
+ `Failed to parse 'GetDimensionsByDimensionV2RawData' from JSON`,
203
+ );
204
+ }
205
+
206
+ /** @internal */
207
+ export const GetDimensionsByDimensionV2Response$inboundSchema: z.ZodMiniType<
208
+ GetDimensionsByDimensionV2Response,
209
+ unknown
210
+ > = z.object({
211
+ meta: z.optional(
212
+ z.nullable(z.lazy(() => GetDimensionsByDimensionV2Meta$inboundSchema)),
213
+ ),
214
+ data: z.array(models.DimensionMetaResponseDto$inboundSchema),
215
+ errors: types.nullable(
216
+ z.lazy(() => GetDimensionsByDimensionV2Errors$inboundSchema),
217
+ ),
218
+ rawData: types.nullable(
219
+ z.lazy(() => GetDimensionsByDimensionV2RawData$inboundSchema),
220
+ ),
221
+ });
222
+
223
+ export function getDimensionsByDimensionV2ResponseFromJSON(
224
+ jsonString: string,
225
+ ): SafeParseResult<GetDimensionsByDimensionV2Response, SDKValidationError> {
226
+ return safeParse(
227
+ jsonString,
228
+ (x) =>
229
+ GetDimensionsByDimensionV2Response$inboundSchema.parse(JSON.parse(x)),
230
+ `Failed to parse 'GetDimensionsByDimensionV2Response' from JSON`,
231
+ );
232
+ }
@@ -73,6 +73,7 @@ export * from "./get-credit-note.js";
73
73
  export * from "./get-credit-notes.js";
74
74
  export * from "./get-customer.js";
75
75
  export * from "./get-customers.js";
76
+ export * from "./get-dimensions-by-dimension-v2.js";
76
77
  export * from "./get-dimensions-by-dimension.js";
77
78
  export * from "./get-dimensions-v2.js";
78
79
  export * from "./get-dimensions.js";
@@ -6,7 +6,7 @@ import { accountingV2CreateBookingProposalV2 } from "../funcs/accounting-v2-crea
6
6
  import { accountingV2CreateContactV2 } from "../funcs/accounting-v2-create-contact-v2.js";
7
7
  import { accountingV2GetContactV2 } from "../funcs/accounting-v2-get-contact-v2.js";
8
8
  import { accountingV2GetContactsV2 } from "../funcs/accounting-v2-get-contacts-v2.js";
9
- import { accountingV2GetDimensionsByDimension } from "../funcs/accounting-v2-get-dimensions-by-dimension.js";
9
+ import { accountingV2GetDimensionsByDimensionV2 } from "../funcs/accounting-v2-get-dimensions-by-dimension-v2.js";
10
10
  import { accountingV2GetDimensionsV2 } from "../funcs/accounting-v2-get-dimensions-v2.js";
11
11
  import { accountingV2PatchContactV2 } from "../funcs/accounting-v2-patch-contact-v2.js";
12
12
  import { accountingV2PutContactV2 } from "../funcs/accounting-v2-put-contact-v2.js";
@@ -92,11 +92,11 @@ export class AccountingV2 extends ClientSDK {
92
92
  ));
93
93
  }
94
94
 
95
- async getDimensionsByDimension(
96
- request: operations.GetDimensionsByDimensionRequest,
95
+ async getDimensionsByDimensionV2(
96
+ request: operations.GetDimensionsByDimensionV2Request,
97
97
  options?: RequestOptions,
98
- ): Promise<operations.GetDimensionsByDimensionResponse> {
99
- return unwrapAsync(accountingV2GetDimensionsByDimension(
98
+ ): Promise<operations.GetDimensionsByDimensionV2Response> {
99
+ return unwrapAsync(accountingV2GetDimensionsByDimensionV2(
100
100
  this,
101
101
  request,
102
102
  options,
@@ -55,6 +55,7 @@ import { accountingGetCreditNote } from "../funcs/accounting-get-credit-note.js"
55
55
  import { accountingGetCreditNotes } from "../funcs/accounting-get-credit-notes.js";
56
56
  import { accountingGetCustomer } from "../funcs/accounting-get-customer.js";
57
57
  import { accountingGetCustomers } from "../funcs/accounting-get-customers.js";
58
+ import { accountingGetDimensionsByDimension } from "../funcs/accounting-get-dimensions-by-dimension.js";
58
59
  import { accountingGetDimensions } from "../funcs/accounting-get-dimensions.js";
59
60
  import { accountingGetDocumentExtensions } from "../funcs/accounting-get-document-extensions.js";
60
61
  import { accountingGetDocumentTypes } from "../funcs/accounting-get-document-types.js";
@@ -204,6 +205,17 @@ export class Accounting extends ClientSDK {
204
205
  ));
205
206
  }
206
207
 
208
+ async getDimensionsByDimension(
209
+ request: operations.GetDimensionsByDimensionRequest,
210
+ options?: RequestOptions,
211
+ ): Promise<operations.GetDimensionsByDimensionResponse> {
212
+ return unwrapAsync(accountingGetDimensionsByDimension(
213
+ this,
214
+ request,
215
+ options,
216
+ ));
217
+ }
218
+
207
219
  async createTransaction(
208
220
  request: operations.CreateTransactionRequest,
209
221
  options?: RequestOptions,
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-v2-get-dimensions-by-dimension.d.ts","sourceRoot":"","sources":["../../src/funcs/accounting-v2-get-dimensions-by-dimension.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,CAAC,+BAA+B,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,gCAAgC,EACzC,UAAU,GACV,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-v2-get-dimensions-by-dimension.js","sourceRoot":"","sources":["../../src/funcs/accounting-v2-get-dimensions-by-dimension.ts"],"names":[],"mappings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