@maesn/typescript-sdk 0.8.24 → 0.8.26

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 -0
  2. package/esm/funcs/accounting-get-currencies.d.ts +11 -0
  3. package/esm/funcs/accounting-get-currencies.d.ts.map +1 -0
  4. package/esm/funcs/accounting-get-currencies.js +89 -0
  5. package/esm/funcs/accounting-get-currencies.js.map +1 -0
  6. package/esm/funcs/accounting-get-reason-codes.d.ts +11 -0
  7. package/esm/funcs/accounting-get-reason-codes.d.ts.map +1 -0
  8. package/esm/funcs/accounting-get-reason-codes.js +89 -0
  9. package/esm/funcs/accounting-get-reason-codes.js.map +1 -0
  10. package/esm/lib/config.d.ts +3 -3
  11. package/esm/lib/config.js +3 -3
  12. package/esm/models/credit-note-response-dto.d.ts +1 -0
  13. package/esm/models/credit-note-response-dto.d.ts.map +1 -1
  14. package/esm/models/credit-note-response-dto.js +1 -0
  15. package/esm/models/credit-note-response-dto.js.map +1 -1
  16. package/esm/models/currency-response-dto.d.ts +15 -0
  17. package/esm/models/currency-response-dto.d.ts.map +1 -0
  18. package/esm/models/currency-response-dto.js +19 -0
  19. package/esm/models/currency-response-dto.js.map +1 -0
  20. package/esm/models/index.d.ts +2 -0
  21. package/esm/models/index.d.ts.map +1 -1
  22. package/esm/models/index.js +2 -0
  23. package/esm/models/index.js.map +1 -1
  24. package/esm/models/operations/get-currencies.d.ts +98 -0
  25. package/esm/models/operations/get-currencies.d.ts.map +1 -0
  26. package/esm/models/operations/get-currencies.js +69 -0
  27. package/esm/models/operations/get-currencies.js.map +1 -0
  28. package/esm/models/operations/get-reason-codes.d.ts +98 -0
  29. package/esm/models/operations/get-reason-codes.d.ts.map +1 -0
  30. package/esm/models/operations/get-reason-codes.js +69 -0
  31. package/esm/models/operations/get-reason-codes.js.map +1 -0
  32. package/esm/models/operations/index.d.ts +2 -0
  33. package/esm/models/operations/index.d.ts.map +1 -1
  34. package/esm/models/operations/index.js +2 -0
  35. package/esm/models/operations/index.js.map +1 -1
  36. package/esm/models/payment-term-response-dto.d.ts +2 -0
  37. package/esm/models/payment-term-response-dto.d.ts.map +1 -1
  38. package/esm/models/payment-term-response-dto.js +2 -0
  39. package/esm/models/payment-term-response-dto.js.map +1 -1
  40. package/esm/models/reason-code-response-dto.d.ts +12 -0
  41. package/esm/models/reason-code-response-dto.d.ts.map +1 -0
  42. package/esm/models/reason-code-response-dto.js +16 -0
  43. package/esm/models/reason-code-response-dto.js.map +1 -0
  44. package/esm/sdk/accounting.d.ts +2 -0
  45. package/esm/sdk/accounting.d.ts.map +1 -1
  46. package/esm/sdk/accounting.js +8 -0
  47. package/esm/sdk/accounting.js.map +1 -1
  48. package/jsr.json +1 -1
  49. package/package.json +1 -1
  50. package/src/funcs/accounting-get-currencies.ts +184 -0
  51. package/src/funcs/accounting-get-reason-codes.ts +184 -0
  52. package/src/lib/config.ts +3 -3
  53. package/src/models/credit-note-response-dto.ts +2 -0
  54. package/src/models/currency-response-dto.ts +41 -0
  55. package/src/models/index.ts +2 -0
  56. package/src/models/operations/get-currencies.ts +215 -0
  57. package/src/models/operations/get-reason-codes.ts +215 -0
  58. package/src/models/operations/index.ts +2 -0
  59. package/src/models/payment-term-response-dto.ts +4 -0
  60. package/src/models/reason-code-response-dto.ts +35 -0
  61. package/src/sdk/accounting.ts +24 -0
@@ -0,0 +1,215 @@
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 GetCurrenciesGlobals = {
14
+ apiKey?: string | undefined;
15
+ accountKey?: string | undefined;
16
+ };
17
+
18
+ export const GetCurrenciesLimit = {
19
+ Five: 5,
20
+ Ten: 10,
21
+ Twenty: 20,
22
+ Fifty: 50,
23
+ OneHundred: 100,
24
+ } as const;
25
+ export type GetCurrenciesLimit = ClosedEnum<typeof GetCurrenciesLimit>;
26
+
27
+ export type GetCurrenciesRequest = {
28
+ page?: number | undefined;
29
+ limit?: GetCurrenciesLimit | undefined;
30
+ /**
31
+ * ISO 8601 timestamp; only records modified after this date are returned
32
+ */
33
+ lastModifiedAt?: string | undefined;
34
+ /**
35
+ * Environment name (required for multi-environment systems such as Business Central)
36
+ */
37
+ environmentName?: string | undefined;
38
+ /**
39
+ * ID of the company (required for multi-company target systems)
40
+ */
41
+ companyId?: string | undefined;
42
+ /**
43
+ * When true, returns the unprocessed response from the upstream target system
44
+ */
45
+ rawData?: boolean | undefined;
46
+ /**
47
+ * API key
48
+ */
49
+ apiKey?: string | undefined;
50
+ /**
51
+ * Account key
52
+ */
53
+ accountKey?: string | undefined;
54
+ };
55
+
56
+ export type GetCurrenciesPagination = {
57
+ total: number;
58
+ perPage: number;
59
+ currentPage: number;
60
+ totalPages: number;
61
+ };
62
+
63
+ export type GetCurrenciesMeta = {
64
+ warnings?: Array<string> | null | undefined;
65
+ pagination?: GetCurrenciesPagination | null | undefined;
66
+ };
67
+
68
+ export type GetCurrenciesErrors = {};
69
+
70
+ export type GetCurrenciesRawData = {};
71
+
72
+ /**
73
+ * List of currencies for the authenticated end user's connected target system
74
+ */
75
+ export type GetCurrenciesResponse = {
76
+ meta?: GetCurrenciesMeta | null | undefined;
77
+ data: Array<models.CurrencyResponseDto>;
78
+ errors: GetCurrenciesErrors | null;
79
+ rawData: GetCurrenciesRawData | null;
80
+ };
81
+
82
+ /** @internal */
83
+ export const GetCurrenciesLimit$outboundSchema: z.ZodMiniEnum<
84
+ typeof GetCurrenciesLimit
85
+ > = z.enum(GetCurrenciesLimit);
86
+
87
+ /** @internal */
88
+ export type GetCurrenciesRequest$Outbound = {
89
+ page?: number | undefined;
90
+ limit?: number | undefined;
91
+ lastModifiedAt?: string | undefined;
92
+ environmentName?: string | undefined;
93
+ companyId?: string | undefined;
94
+ rawData?: boolean | undefined;
95
+ apiKey?: string | undefined;
96
+ accountKey?: string | undefined;
97
+ };
98
+
99
+ /** @internal */
100
+ export const GetCurrenciesRequest$outboundSchema: z.ZodMiniType<
101
+ GetCurrenciesRequest$Outbound,
102
+ GetCurrenciesRequest
103
+ > = z.object({
104
+ page: z.optional(z.number()),
105
+ limit: z.optional(GetCurrenciesLimit$outboundSchema),
106
+ lastModifiedAt: z.optional(z.string()),
107
+ environmentName: z.optional(z.string()),
108
+ companyId: z.optional(z.string()),
109
+ rawData: z.optional(z.boolean()),
110
+ apiKey: z.optional(z.string()),
111
+ accountKey: z.optional(z.string()),
112
+ });
113
+
114
+ export function getCurrenciesRequestToJSON(
115
+ getCurrenciesRequest: GetCurrenciesRequest,
116
+ ): string {
117
+ return JSON.stringify(
118
+ GetCurrenciesRequest$outboundSchema.parse(getCurrenciesRequest),
119
+ );
120
+ }
121
+
122
+ /** @internal */
123
+ export const GetCurrenciesPagination$inboundSchema: z.ZodMiniType<
124
+ GetCurrenciesPagination,
125
+ unknown
126
+ > = z.object({
127
+ total: types.number(),
128
+ perPage: types.number(),
129
+ currentPage: types.number(),
130
+ totalPages: types.number(),
131
+ });
132
+
133
+ export function getCurrenciesPaginationFromJSON(
134
+ jsonString: string,
135
+ ): SafeParseResult<GetCurrenciesPagination, SDKValidationError> {
136
+ return safeParse(
137
+ jsonString,
138
+ (x) => GetCurrenciesPagination$inboundSchema.parse(JSON.parse(x)),
139
+ `Failed to parse 'GetCurrenciesPagination' from JSON`,
140
+ );
141
+ }
142
+
143
+ /** @internal */
144
+ export const GetCurrenciesMeta$inboundSchema: z.ZodMiniType<
145
+ GetCurrenciesMeta,
146
+ unknown
147
+ > = z.object({
148
+ warnings: z.optional(z.nullable(z.array(types.string()))),
149
+ pagination: z.optional(
150
+ z.nullable(z.lazy(() => GetCurrenciesPagination$inboundSchema)),
151
+ ),
152
+ });
153
+
154
+ export function getCurrenciesMetaFromJSON(
155
+ jsonString: string,
156
+ ): SafeParseResult<GetCurrenciesMeta, SDKValidationError> {
157
+ return safeParse(
158
+ jsonString,
159
+ (x) => GetCurrenciesMeta$inboundSchema.parse(JSON.parse(x)),
160
+ `Failed to parse 'GetCurrenciesMeta' from JSON`,
161
+ );
162
+ }
163
+
164
+ /** @internal */
165
+ export const GetCurrenciesErrors$inboundSchema: z.ZodMiniType<
166
+ GetCurrenciesErrors,
167
+ unknown
168
+ > = z.object({});
169
+
170
+ export function getCurrenciesErrorsFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<GetCurrenciesErrors, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => GetCurrenciesErrors$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'GetCurrenciesErrors' from JSON`,
177
+ );
178
+ }
179
+
180
+ /** @internal */
181
+ export const GetCurrenciesRawData$inboundSchema: z.ZodMiniType<
182
+ GetCurrenciesRawData,
183
+ unknown
184
+ > = z.object({});
185
+
186
+ export function getCurrenciesRawDataFromJSON(
187
+ jsonString: string,
188
+ ): SafeParseResult<GetCurrenciesRawData, SDKValidationError> {
189
+ return safeParse(
190
+ jsonString,
191
+ (x) => GetCurrenciesRawData$inboundSchema.parse(JSON.parse(x)),
192
+ `Failed to parse 'GetCurrenciesRawData' from JSON`,
193
+ );
194
+ }
195
+
196
+ /** @internal */
197
+ export const GetCurrenciesResponse$inboundSchema: z.ZodMiniType<
198
+ GetCurrenciesResponse,
199
+ unknown
200
+ > = z.object({
201
+ meta: z.optional(z.nullable(z.lazy(() => GetCurrenciesMeta$inboundSchema))),
202
+ data: z.array(models.CurrencyResponseDto$inboundSchema),
203
+ errors: types.nullable(z.lazy(() => GetCurrenciesErrors$inboundSchema)),
204
+ rawData: types.nullable(z.lazy(() => GetCurrenciesRawData$inboundSchema)),
205
+ });
206
+
207
+ export function getCurrenciesResponseFromJSON(
208
+ jsonString: string,
209
+ ): SafeParseResult<GetCurrenciesResponse, SDKValidationError> {
210
+ return safeParse(
211
+ jsonString,
212
+ (x) => GetCurrenciesResponse$inboundSchema.parse(JSON.parse(x)),
213
+ `Failed to parse 'GetCurrenciesResponse' from JSON`,
214
+ );
215
+ }
@@ -0,0 +1,215 @@
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 GetReasonCodesGlobals = {
14
+ apiKey?: string | undefined;
15
+ accountKey?: string | undefined;
16
+ };
17
+
18
+ export const GetReasonCodesLimit = {
19
+ Five: 5,
20
+ Ten: 10,
21
+ Twenty: 20,
22
+ Fifty: 50,
23
+ OneHundred: 100,
24
+ } as const;
25
+ export type GetReasonCodesLimit = ClosedEnum<typeof GetReasonCodesLimit>;
26
+
27
+ export type GetReasonCodesRequest = {
28
+ page?: number | undefined;
29
+ limit?: GetReasonCodesLimit | undefined;
30
+ /**
31
+ * ISO 8601 timestamp; only records modified after this date are returned
32
+ */
33
+ lastModifiedAt?: string | undefined;
34
+ /**
35
+ * Environment name (required for multi-environment systems such as Business Central)
36
+ */
37
+ environmentName?: string | undefined;
38
+ /**
39
+ * ID of the company (required for multi-company target systems)
40
+ */
41
+ companyId?: string | undefined;
42
+ /**
43
+ * When true, returns the unprocessed response from the upstream target system
44
+ */
45
+ rawData?: boolean | undefined;
46
+ /**
47
+ * API key
48
+ */
49
+ apiKey?: string | undefined;
50
+ /**
51
+ * Account key
52
+ */
53
+ accountKey?: string | undefined;
54
+ };
55
+
56
+ export type GetReasonCodesPagination = {
57
+ total: number;
58
+ perPage: number;
59
+ currentPage: number;
60
+ totalPages: number;
61
+ };
62
+
63
+ export type GetReasonCodesMeta = {
64
+ warnings?: Array<string> | null | undefined;
65
+ pagination?: GetReasonCodesPagination | null | undefined;
66
+ };
67
+
68
+ export type GetReasonCodesErrors = {};
69
+
70
+ export type GetReasonCodesRawData = {};
71
+
72
+ /**
73
+ * List of reason codes for the authenticated end user's connected target system
74
+ */
75
+ export type GetReasonCodesResponse = {
76
+ meta?: GetReasonCodesMeta | null | undefined;
77
+ data: Array<models.ReasonCodeResponseDto>;
78
+ errors: GetReasonCodesErrors | null;
79
+ rawData: GetReasonCodesRawData | null;
80
+ };
81
+
82
+ /** @internal */
83
+ export const GetReasonCodesLimit$outboundSchema: z.ZodMiniEnum<
84
+ typeof GetReasonCodesLimit
85
+ > = z.enum(GetReasonCodesLimit);
86
+
87
+ /** @internal */
88
+ export type GetReasonCodesRequest$Outbound = {
89
+ page?: number | undefined;
90
+ limit?: number | undefined;
91
+ lastModifiedAt?: string | undefined;
92
+ environmentName?: string | undefined;
93
+ companyId?: string | undefined;
94
+ rawData?: boolean | undefined;
95
+ apiKey?: string | undefined;
96
+ accountKey?: string | undefined;
97
+ };
98
+
99
+ /** @internal */
100
+ export const GetReasonCodesRequest$outboundSchema: z.ZodMiniType<
101
+ GetReasonCodesRequest$Outbound,
102
+ GetReasonCodesRequest
103
+ > = z.object({
104
+ page: z.optional(z.number()),
105
+ limit: z.optional(GetReasonCodesLimit$outboundSchema),
106
+ lastModifiedAt: z.optional(z.string()),
107
+ environmentName: z.optional(z.string()),
108
+ companyId: z.optional(z.string()),
109
+ rawData: z.optional(z.boolean()),
110
+ apiKey: z.optional(z.string()),
111
+ accountKey: z.optional(z.string()),
112
+ });
113
+
114
+ export function getReasonCodesRequestToJSON(
115
+ getReasonCodesRequest: GetReasonCodesRequest,
116
+ ): string {
117
+ return JSON.stringify(
118
+ GetReasonCodesRequest$outboundSchema.parse(getReasonCodesRequest),
119
+ );
120
+ }
121
+
122
+ /** @internal */
123
+ export const GetReasonCodesPagination$inboundSchema: z.ZodMiniType<
124
+ GetReasonCodesPagination,
125
+ unknown
126
+ > = z.object({
127
+ total: types.number(),
128
+ perPage: types.number(),
129
+ currentPage: types.number(),
130
+ totalPages: types.number(),
131
+ });
132
+
133
+ export function getReasonCodesPaginationFromJSON(
134
+ jsonString: string,
135
+ ): SafeParseResult<GetReasonCodesPagination, SDKValidationError> {
136
+ return safeParse(
137
+ jsonString,
138
+ (x) => GetReasonCodesPagination$inboundSchema.parse(JSON.parse(x)),
139
+ `Failed to parse 'GetReasonCodesPagination' from JSON`,
140
+ );
141
+ }
142
+
143
+ /** @internal */
144
+ export const GetReasonCodesMeta$inboundSchema: z.ZodMiniType<
145
+ GetReasonCodesMeta,
146
+ unknown
147
+ > = z.object({
148
+ warnings: z.optional(z.nullable(z.array(types.string()))),
149
+ pagination: z.optional(
150
+ z.nullable(z.lazy(() => GetReasonCodesPagination$inboundSchema)),
151
+ ),
152
+ });
153
+
154
+ export function getReasonCodesMetaFromJSON(
155
+ jsonString: string,
156
+ ): SafeParseResult<GetReasonCodesMeta, SDKValidationError> {
157
+ return safeParse(
158
+ jsonString,
159
+ (x) => GetReasonCodesMeta$inboundSchema.parse(JSON.parse(x)),
160
+ `Failed to parse 'GetReasonCodesMeta' from JSON`,
161
+ );
162
+ }
163
+
164
+ /** @internal */
165
+ export const GetReasonCodesErrors$inboundSchema: z.ZodMiniType<
166
+ GetReasonCodesErrors,
167
+ unknown
168
+ > = z.object({});
169
+
170
+ export function getReasonCodesErrorsFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<GetReasonCodesErrors, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => GetReasonCodesErrors$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'GetReasonCodesErrors' from JSON`,
177
+ );
178
+ }
179
+
180
+ /** @internal */
181
+ export const GetReasonCodesRawData$inboundSchema: z.ZodMiniType<
182
+ GetReasonCodesRawData,
183
+ unknown
184
+ > = z.object({});
185
+
186
+ export function getReasonCodesRawDataFromJSON(
187
+ jsonString: string,
188
+ ): SafeParseResult<GetReasonCodesRawData, SDKValidationError> {
189
+ return safeParse(
190
+ jsonString,
191
+ (x) => GetReasonCodesRawData$inboundSchema.parse(JSON.parse(x)),
192
+ `Failed to parse 'GetReasonCodesRawData' from JSON`,
193
+ );
194
+ }
195
+
196
+ /** @internal */
197
+ export const GetReasonCodesResponse$inboundSchema: z.ZodMiniType<
198
+ GetReasonCodesResponse,
199
+ unknown
200
+ > = z.object({
201
+ meta: z.optional(z.nullable(z.lazy(() => GetReasonCodesMeta$inboundSchema))),
202
+ data: z.array(models.ReasonCodeResponseDto$inboundSchema),
203
+ errors: types.nullable(z.lazy(() => GetReasonCodesErrors$inboundSchema)),
204
+ rawData: types.nullable(z.lazy(() => GetReasonCodesRawData$inboundSchema)),
205
+ });
206
+
207
+ export function getReasonCodesResponseFromJSON(
208
+ jsonString: string,
209
+ ): SafeParseResult<GetReasonCodesResponse, SDKValidationError> {
210
+ return safeParse(
211
+ jsonString,
212
+ (x) => GetReasonCodesResponse$inboundSchema.parse(JSON.parse(x)),
213
+ `Failed to parse 'GetReasonCodesResponse' from JSON`,
214
+ );
215
+ }
@@ -74,6 +74,7 @@ export * from "./get-contacts.js";
74
74
  export * from "./get-credit-note-documents.js";
75
75
  export * from "./get-credit-note.js";
76
76
  export * from "./get-credit-notes.js";
77
+ export * from "./get-currencies.js";
77
78
  export * from "./get-customer.js";
78
79
  export * from "./get-customers.js";
79
80
  export * from "./get-dimensions-by-dimension-v2.js";
@@ -124,6 +125,7 @@ export * from "./get-purchase-order-line-item.js";
124
125
  export * from "./get-purchase-order-line-items.js";
125
126
  export * from "./get-purchase-order.js";
126
127
  export * from "./get-purchase-orders.js";
128
+ export * from "./get-reason-codes.js";
127
129
  export * from "./get-registered-systems-masked.js";
128
130
  export * from "./get-registered-systems.js";
129
131
  export * from "./get-sales-order-lines.js";
@@ -36,12 +36,14 @@ export type PaymentTermResponseDto = {
36
36
  description: string | null;
37
37
  discountDays: number | null;
38
38
  discountDays2: number | null;
39
+ discountDaysCalculation: string | null;
39
40
  discountPercentage: number | null;
40
41
  discountPercentage2: number | null;
41
42
  discountPeriods: Array<DiscountPeriodResponse> | null;
42
43
  dueType: PaymentTermResponseDtoDueType | null;
43
44
  name: string | null;
44
45
  paymentDays: number | null;
46
+ paymentDaysCalculation: string | null;
45
47
  paymentMethod: PaymentMethod | null;
46
48
  updatedDate: string | null;
47
49
  };
@@ -66,6 +68,7 @@ export const PaymentTermResponseDto$inboundSchema: z.ZodMiniType<
66
68
  description: types.nullable(types.string()),
67
69
  discountDays: types.nullable(types.number()),
68
70
  discountDays2: types.nullable(types.number()),
71
+ discountDaysCalculation: types.nullable(types.string()),
69
72
  discountPercentage: types.nullable(types.number()),
70
73
  discountPercentage2: types.nullable(types.number()),
71
74
  discountPeriods: types.nullable(
@@ -74,6 +77,7 @@ export const PaymentTermResponseDto$inboundSchema: z.ZodMiniType<
74
77
  dueType: types.nullable(PaymentTermResponseDtoDueType$inboundSchema),
75
78
  name: types.nullable(types.string()),
76
79
  paymentDays: types.nullable(types.number()),
80
+ paymentDaysCalculation: types.nullable(types.string()),
77
81
  paymentMethod: types.nullable(PaymentMethod$inboundSchema),
78
82
  updatedDate: types.nullable(types.string()),
79
83
  });
@@ -0,0 +1,35 @@
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 { Result as SafeParseResult } from "../types/fp.js";
8
+ import * as types from "../types/primitives.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+
11
+ export type ReasonCodeResponseDto = {
12
+ id: string | null;
13
+ code: string | null;
14
+ description: string | null;
15
+ };
16
+
17
+ /** @internal */
18
+ export const ReasonCodeResponseDto$inboundSchema: z.ZodMiniType<
19
+ ReasonCodeResponseDto,
20
+ unknown
21
+ > = z.object({
22
+ id: types.nullable(types.string()),
23
+ code: types.nullable(types.string()),
24
+ description: types.nullable(types.string()),
25
+ });
26
+
27
+ export function reasonCodeResponseDtoFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<ReasonCodeResponseDto, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => ReasonCodeResponseDto$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'ReasonCodeResponseDto' from JSON`,
34
+ );
35
+ }
@@ -56,6 +56,7 @@ import { accountingGetContacts } from "../funcs/accounting-get-contacts.js";
56
56
  import { accountingGetCreditNoteDocuments } from "../funcs/accounting-get-credit-note-documents.js";
57
57
  import { accountingGetCreditNote } from "../funcs/accounting-get-credit-note.js";
58
58
  import { accountingGetCreditNotes } from "../funcs/accounting-get-credit-notes.js";
59
+ import { accountingGetCurrencies } from "../funcs/accounting-get-currencies.js";
59
60
  import { accountingGetCustomer } from "../funcs/accounting-get-customer.js";
60
61
  import { accountingGetCustomers } from "../funcs/accounting-get-customers.js";
61
62
  import { accountingGetDimensionsByDimension } from "../funcs/accounting-get-dimensions-by-dimension.js";
@@ -102,6 +103,7 @@ import { accountingGetPurchaseOrderLineItem } from "../funcs/accounting-get-purc
102
103
  import { accountingGetPurchaseOrderLineItems } from "../funcs/accounting-get-purchase-order-line-items.js";
103
104
  import { accountingGetPurchaseOrder } from "../funcs/accounting-get-purchase-order.js";
104
105
  import { accountingGetPurchaseOrders } from "../funcs/accounting-get-purchase-orders.js";
106
+ import { accountingGetReasonCodes } from "../funcs/accounting-get-reason-codes.js";
105
107
  import { accountingGetSalesOrderLines } from "../funcs/accounting-get-sales-order-lines.js";
106
108
  import { accountingGetSalesOrder } from "../funcs/accounting-get-sales-order.js";
107
109
  import { accountingGetSalesOrders } from "../funcs/accounting-get-sales-orders.js";
@@ -1531,4 +1533,26 @@ export class Accounting extends ClientSDK {
1531
1533
  options,
1532
1534
  ));
1533
1535
  }
1536
+
1537
+ async getCurrencies(
1538
+ request?: operations.GetCurrenciesRequest | undefined,
1539
+ options?: RequestOptions,
1540
+ ): Promise<operations.GetCurrenciesResponse> {
1541
+ return unwrapAsync(accountingGetCurrencies(
1542
+ this,
1543
+ request,
1544
+ options,
1545
+ ));
1546
+ }
1547
+
1548
+ async getReasonCodes(
1549
+ request?: operations.GetReasonCodesRequest | undefined,
1550
+ options?: RequestOptions,
1551
+ ): Promise<operations.GetReasonCodesResponse> {
1552
+ return unwrapAsync(accountingGetReasonCodes(
1553
+ this,
1554
+ request,
1555
+ options,
1556
+ ));
1557
+ }
1534
1558
  }