@maesn/typescript-sdk 0.8.12 → 0.8.16
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 +6 -0
- package/esm/funcs/accounting-delete-item.d.ts +11 -0
- package/esm/funcs/accounting-delete-item.d.ts.map +1 -0
- package/esm/funcs/accounting-delete-item.js +81 -0
- package/esm/funcs/accounting-delete-item.js.map +1 -0
- package/esm/funcs/accounting-get-journal-entry.js +1 -0
- package/esm/funcs/accounting-get-journal-entry.js.map +1 -1
- package/esm/funcs/accounting-update-item.d.ts +11 -0
- package/esm/funcs/accounting-update-item.d.ts.map +1 -0
- package/esm/funcs/accounting-update-item.js +82 -0
- package/esm/funcs/accounting-update-item.js.map +1 -0
- package/esm/funcs/accounting-update-journal-entry.d.ts +11 -0
- package/esm/funcs/accounting-update-journal-entry.d.ts.map +1 -0
- package/esm/funcs/accounting-update-journal-entry.js +109 -0
- package/esm/funcs/accounting-update-journal-entry.js.map +1 -0
- package/esm/funcs/auth-create-end-user-account.js +5 -1
- package/esm/funcs/auth-create-end-user-account.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts +10 -9
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/lib/encodings.js +29 -13
- package/esm/lib/encodings.js.map +1 -1
- package/esm/models/account-response-dto.d.ts +10 -0
- package/esm/models/account-response-dto.d.ts.map +1 -1
- package/esm/models/account-response-dto.js +11 -0
- package/esm/models/account-response-dto.js.map +1 -1
- package/esm/models/bank-account-request-common-dto-v2.d.ts +2 -0
- package/esm/models/bank-account-request-common-dto-v2.d.ts.map +1 -1
- package/esm/models/bank-account-request-common-dto-v2.js +1 -0
- package/esm/models/bank-account-request-common-dto-v2.js.map +1 -1
- package/esm/models/bank-account-response-common-dto-v2.d.ts +15 -0
- package/esm/models/bank-account-response-common-dto-v2.d.ts.map +1 -0
- package/esm/models/bank-account-response-common-dto-v2.js +19 -0
- package/esm/models/bank-account-response-common-dto-v2.js.map +1 -0
- package/esm/models/booking-proposal-response-dto-v2.d.ts +1 -0
- package/esm/models/booking-proposal-response-dto-v2.d.ts.map +1 -1
- package/esm/models/booking-proposal-response-dto-v2.js +1 -0
- package/esm/models/booking-proposal-response-dto-v2.js.map +1 -1
- package/esm/models/contact-person-dto-v2.d.ts +2 -0
- package/esm/models/contact-person-dto-v2.d.ts.map +1 -1
- package/esm/models/contact-person-dto-v2.js +2 -0
- package/esm/models/contact-person-dto-v2.js.map +1 -1
- package/esm/models/contact-response-dto-v2.d.ts +5 -0
- package/esm/models/contact-response-dto-v2.d.ts.map +1 -1
- package/esm/models/contact-response-dto-v2.js +5 -0
- package/esm/models/contact-response-dto-v2.js.map +1 -1
- package/esm/models/create-account-request-dto.d.ts +3 -0
- package/esm/models/create-account-request-dto.d.ts.map +1 -1
- package/esm/models/create-account-request-dto.js +2 -0
- package/esm/models/create-account-request-dto.js.map +1 -1
- package/esm/models/create-contact-person-dto-v2.d.ts +4 -0
- package/esm/models/create-contact-person-dto-v2.d.ts.map +1 -1
- package/esm/models/create-contact-person-dto-v2.js +2 -0
- package/esm/models/create-contact-person-dto-v2.js.map +1 -1
- package/esm/models/create-contact-request-dto-v2.d.ts +9 -0
- package/esm/models/create-contact-request-dto-v2.d.ts.map +1 -1
- package/esm/models/create-contact-request-dto-v2.js +5 -0
- package/esm/models/create-contact-request-dto-v2.js.map +1 -1
- package/esm/models/create-journal-entry-request-dto.d.ts +2 -0
- package/esm/models/create-journal-entry-request-dto.d.ts.map +1 -1
- package/esm/models/create-journal-entry-request-dto.js +1 -0
- package/esm/models/create-journal-entry-request-dto.js.map +1 -1
- package/esm/models/create-offer-line-item-request-dto.d.ts +1 -0
- package/esm/models/create-offer-line-item-request-dto.d.ts.map +1 -1
- package/esm/models/create-offer-line-item-request-dto.js +1 -0
- package/esm/models/create-offer-line-item-request-dto.js.map +1 -1
- package/esm/models/create-offer-request-dto.d.ts +2 -0
- package/esm/models/create-offer-request-dto.d.ts.map +1 -1
- package/esm/models/create-offer-request-dto.js +1 -0
- package/esm/models/create-offer-request-dto.js.map +1 -1
- package/esm/models/create-sales-order-line-item-request-dto.d.ts +4 -0
- package/esm/models/create-sales-order-line-item-request-dto.d.ts.map +1 -1
- package/esm/models/create-sales-order-line-item-request-dto.js +2 -0
- package/esm/models/create-sales-order-line-item-request-dto.js.map +1 -1
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +2 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/journal-entry-response-dto.d.ts +2 -1
- package/esm/models/journal-entry-response-dto.d.ts.map +1 -1
- package/esm/models/journal-entry-response-dto.js +2 -1
- package/esm/models/journal-entry-response-dto.js.map +1 -1
- package/esm/models/offer-line-item-response-dto.d.ts +1 -0
- package/esm/models/offer-line-item-response-dto.d.ts.map +1 -1
- package/esm/models/offer-line-item-response-dto.js +1 -0
- package/esm/models/offer-line-item-response-dto.js.map +1 -1
- package/esm/models/offer-response-dto.d.ts +1 -0
- package/esm/models/offer-response-dto.d.ts.map +1 -1
- package/esm/models/offer-response-dto.js +1 -0
- package/esm/models/offer-response-dto.js.map +1 -1
- package/esm/models/operations/create-end-user-account.d.ts +5 -0
- package/esm/models/operations/create-end-user-account.d.ts.map +1 -1
- package/esm/models/operations/create-end-user-account.js +1 -0
- package/esm/models/operations/create-end-user-account.js.map +1 -1
- package/esm/models/operations/delete-item.d.ts +75 -0
- package/esm/models/operations/delete-item.d.ts.map +1 -0
- package/esm/models/operations/delete-item.js +57 -0
- package/esm/models/operations/delete-item.js.map +1 -0
- package/esm/models/operations/get-journal-entry.d.ts +5 -0
- package/esm/models/operations/get-journal-entry.d.ts.map +1 -1
- package/esm/models/operations/get-journal-entry.js +1 -0
- package/esm/models/operations/get-journal-entry.js.map +1 -1
- package/esm/models/operations/index.d.ts +3 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +3 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/update-item.d.ts +77 -0
- package/esm/models/operations/update-item.d.ts.map +1 -0
- package/esm/models/operations/update-item.js +58 -0
- package/esm/models/operations/update-item.js.map +1 -0
- package/esm/models/operations/update-journal-entry.d.ts +96 -0
- package/esm/models/operations/update-journal-entry.d.ts.map +1 -0
- package/esm/models/operations/update-journal-entry.js +83 -0
- package/esm/models/operations/update-journal-entry.js.map +1 -0
- package/esm/models/tax-rate-request-common-dto.d.ts +18 -0
- package/esm/models/tax-rate-request-common-dto.d.ts.map +1 -0
- package/esm/models/tax-rate-request-common-dto.js +15 -0
- package/esm/models/tax-rate-request-common-dto.js.map +1 -0
- package/esm/sdk/accounting.d.ts +3 -0
- package/esm/sdk/accounting.d.ts.map +1 -1
- package/esm/sdk/accounting.js +12 -0
- package/esm/sdk/accounting.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accounting-delete-item.ts +172 -0
- package/src/funcs/accounting-get-journal-entry.ts +1 -0
- package/src/funcs/accounting-update-item.ts +173 -0
- package/src/funcs/accounting-update-journal-entry.ts +226 -0
- package/src/funcs/auth-create-end-user-account.ts +6 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +58 -23
- package/src/models/account-response-dto.ts +32 -0
- package/src/models/bank-account-request-common-dto-v2.ts +3 -0
- package/src/models/bank-account-response-common-dto-v2.ts +41 -0
- package/src/models/booking-proposal-response-dto-v2.ts +2 -0
- package/src/models/contact-person-dto-v2.ts +4 -0
- package/src/models/contact-response-dto-v2.ts +14 -0
- package/src/models/create-account-request-dto.ts +8 -0
- package/src/models/create-contact-person-dto-v2.ts +6 -0
- package/src/models/create-contact-request-dto-v2.ts +19 -0
- package/src/models/create-journal-entry-request-dto.ts +3 -0
- package/src/models/create-offer-line-item-request-dto.ts +1 -0
- package/src/models/create-offer-request-dto.ts +3 -0
- package/src/models/create-sales-order-line-item-request-dto.ts +6 -0
- package/src/models/index.ts +2 -0
- package/src/models/journal-entry-response-dto.ts +4 -2
- package/src/models/offer-line-item-response-dto.ts +1 -0
- package/src/models/offer-response-dto.ts +2 -0
- package/src/models/operations/create-end-user-account.ts +6 -0
- package/src/models/operations/delete-item.ts +185 -0
- package/src/models/operations/get-journal-entry.ts +6 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/update-item.ts +188 -0
- package/src/models/operations/update-journal-entry.ts +261 -0
- package/src/models/tax-rate-request-common-dto.ts +39 -0
- package/src/sdk/accounting.ts +36 -0
|
@@ -0,0 +1,261 @@
|
|
|
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 { safeParse } from "../../lib/schemas.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 UpdateJournalEntryGlobals = {
|
|
14
|
+
apiKey?: string | undefined;
|
|
15
|
+
accountKey?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type UpdateJournalEntryFile = {
|
|
19
|
+
fileName: string;
|
|
20
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type UpdateJournalEntryRequestBody = {
|
|
24
|
+
files?: Array<UpdateJournalEntryFile> | undefined;
|
|
25
|
+
journalEntry?: models.CreateJournalEntryRequestDto | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type UpdateJournalEntryRequest = {
|
|
29
|
+
journalEntryId: string;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the company (required for multi-company target systems)
|
|
32
|
+
*/
|
|
33
|
+
companyId?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* API key
|
|
36
|
+
*/
|
|
37
|
+
apiKey?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Account key
|
|
40
|
+
*/
|
|
41
|
+
accountKey?: string | undefined;
|
|
42
|
+
body: UpdateJournalEntryRequestBody;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type UpdateJournalEntryPagination = {
|
|
46
|
+
total: number;
|
|
47
|
+
perPage: number;
|
|
48
|
+
currentPage: number;
|
|
49
|
+
totalPages: number;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type UpdateJournalEntryMeta = {
|
|
53
|
+
warnings?: Array<string> | null | undefined;
|
|
54
|
+
pagination?: UpdateJournalEntryPagination | null | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type UpdateJournalEntryErrors = {};
|
|
58
|
+
|
|
59
|
+
export type UpdateJournalEntryRawData = {};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Journal entry updated successfully
|
|
63
|
+
*/
|
|
64
|
+
export type UpdateJournalEntryResponse = {
|
|
65
|
+
meta?: UpdateJournalEntryMeta | null | undefined;
|
|
66
|
+
data: models.JournalEntryResponseDto;
|
|
67
|
+
errors: UpdateJournalEntryErrors | null;
|
|
68
|
+
rawData: UpdateJournalEntryRawData | null;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export type UpdateJournalEntryFile$Outbound = {
|
|
73
|
+
fileName: string;
|
|
74
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const UpdateJournalEntryFile$outboundSchema: z.ZodMiniType<
|
|
79
|
+
UpdateJournalEntryFile$Outbound,
|
|
80
|
+
UpdateJournalEntryFile
|
|
81
|
+
> = z.object({
|
|
82
|
+
fileName: z.string(),
|
|
83
|
+
content: z.union([
|
|
84
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
85
|
+
z.custom<Blob>(x => x instanceof Blob),
|
|
86
|
+
z.custom<ArrayBuffer>(x => x instanceof ArrayBuffer),
|
|
87
|
+
z.custom<Uint8Array>(x => x instanceof Uint8Array),
|
|
88
|
+
]),
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export function updateJournalEntryFileToJSON(
|
|
92
|
+
updateJournalEntryFile: UpdateJournalEntryFile,
|
|
93
|
+
): string {
|
|
94
|
+
return JSON.stringify(
|
|
95
|
+
UpdateJournalEntryFile$outboundSchema.parse(updateJournalEntryFile),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export type UpdateJournalEntryRequestBody$Outbound = {
|
|
101
|
+
files?: Array<UpdateJournalEntryFile$Outbound> | undefined;
|
|
102
|
+
journal_entry?: models.CreateJournalEntryRequestDto$Outbound | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const UpdateJournalEntryRequestBody$outboundSchema: z.ZodMiniType<
|
|
107
|
+
UpdateJournalEntryRequestBody$Outbound,
|
|
108
|
+
UpdateJournalEntryRequestBody
|
|
109
|
+
> = z.pipe(
|
|
110
|
+
z.object({
|
|
111
|
+
files: z.optional(
|
|
112
|
+
z.array(z.lazy(() => UpdateJournalEntryFile$outboundSchema)),
|
|
113
|
+
),
|
|
114
|
+
journalEntry: z.optional(
|
|
115
|
+
models.CreateJournalEntryRequestDto$outboundSchema,
|
|
116
|
+
),
|
|
117
|
+
}),
|
|
118
|
+
z.transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
journalEntry: "journal_entry",
|
|
121
|
+
});
|
|
122
|
+
}),
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
export function updateJournalEntryRequestBodyToJSON(
|
|
126
|
+
updateJournalEntryRequestBody: UpdateJournalEntryRequestBody,
|
|
127
|
+
): string {
|
|
128
|
+
return JSON.stringify(
|
|
129
|
+
UpdateJournalEntryRequestBody$outboundSchema.parse(
|
|
130
|
+
updateJournalEntryRequestBody,
|
|
131
|
+
),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export type UpdateJournalEntryRequest$Outbound = {
|
|
137
|
+
journalEntryId: string;
|
|
138
|
+
companyId?: string | undefined;
|
|
139
|
+
apiKey?: string | undefined;
|
|
140
|
+
accountKey?: string | undefined;
|
|
141
|
+
body: UpdateJournalEntryRequestBody$Outbound;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const UpdateJournalEntryRequest$outboundSchema: z.ZodMiniType<
|
|
146
|
+
UpdateJournalEntryRequest$Outbound,
|
|
147
|
+
UpdateJournalEntryRequest
|
|
148
|
+
> = z.object({
|
|
149
|
+
journalEntryId: z.string(),
|
|
150
|
+
companyId: z.optional(z.string()),
|
|
151
|
+
apiKey: z.optional(z.string()),
|
|
152
|
+
accountKey: z.optional(z.string()),
|
|
153
|
+
body: z.lazy(() => UpdateJournalEntryRequestBody$outboundSchema),
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
export function updateJournalEntryRequestToJSON(
|
|
157
|
+
updateJournalEntryRequest: UpdateJournalEntryRequest,
|
|
158
|
+
): string {
|
|
159
|
+
return JSON.stringify(
|
|
160
|
+
UpdateJournalEntryRequest$outboundSchema.parse(updateJournalEntryRequest),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const UpdateJournalEntryPagination$inboundSchema: z.ZodMiniType<
|
|
166
|
+
UpdateJournalEntryPagination,
|
|
167
|
+
unknown
|
|
168
|
+
> = z.object({
|
|
169
|
+
total: types.number(),
|
|
170
|
+
perPage: types.number(),
|
|
171
|
+
currentPage: types.number(),
|
|
172
|
+
totalPages: types.number(),
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export function updateJournalEntryPaginationFromJSON(
|
|
176
|
+
jsonString: string,
|
|
177
|
+
): SafeParseResult<UpdateJournalEntryPagination, SDKValidationError> {
|
|
178
|
+
return safeParse(
|
|
179
|
+
jsonString,
|
|
180
|
+
(x) => UpdateJournalEntryPagination$inboundSchema.parse(JSON.parse(x)),
|
|
181
|
+
`Failed to parse 'UpdateJournalEntryPagination' from JSON`,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export const UpdateJournalEntryMeta$inboundSchema: z.ZodMiniType<
|
|
187
|
+
UpdateJournalEntryMeta,
|
|
188
|
+
unknown
|
|
189
|
+
> = z.object({
|
|
190
|
+
warnings: z.optional(z.nullable(z.array(types.string()))),
|
|
191
|
+
pagination: z.optional(
|
|
192
|
+
z.nullable(z.lazy(() => UpdateJournalEntryPagination$inboundSchema)),
|
|
193
|
+
),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export function updateJournalEntryMetaFromJSON(
|
|
197
|
+
jsonString: string,
|
|
198
|
+
): SafeParseResult<UpdateJournalEntryMeta, SDKValidationError> {
|
|
199
|
+
return safeParse(
|
|
200
|
+
jsonString,
|
|
201
|
+
(x) => UpdateJournalEntryMeta$inboundSchema.parse(JSON.parse(x)),
|
|
202
|
+
`Failed to parse 'UpdateJournalEntryMeta' from JSON`,
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export const UpdateJournalEntryErrors$inboundSchema: z.ZodMiniType<
|
|
208
|
+
UpdateJournalEntryErrors,
|
|
209
|
+
unknown
|
|
210
|
+
> = z.object({});
|
|
211
|
+
|
|
212
|
+
export function updateJournalEntryErrorsFromJSON(
|
|
213
|
+
jsonString: string,
|
|
214
|
+
): SafeParseResult<UpdateJournalEntryErrors, SDKValidationError> {
|
|
215
|
+
return safeParse(
|
|
216
|
+
jsonString,
|
|
217
|
+
(x) => UpdateJournalEntryErrors$inboundSchema.parse(JSON.parse(x)),
|
|
218
|
+
`Failed to parse 'UpdateJournalEntryErrors' from JSON`,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const UpdateJournalEntryRawData$inboundSchema: z.ZodMiniType<
|
|
224
|
+
UpdateJournalEntryRawData,
|
|
225
|
+
unknown
|
|
226
|
+
> = z.object({});
|
|
227
|
+
|
|
228
|
+
export function updateJournalEntryRawDataFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<UpdateJournalEntryRawData, SDKValidationError> {
|
|
231
|
+
return safeParse(
|
|
232
|
+
jsonString,
|
|
233
|
+
(x) => UpdateJournalEntryRawData$inboundSchema.parse(JSON.parse(x)),
|
|
234
|
+
`Failed to parse 'UpdateJournalEntryRawData' from JSON`,
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const UpdateJournalEntryResponse$inboundSchema: z.ZodMiniType<
|
|
240
|
+
UpdateJournalEntryResponse,
|
|
241
|
+
unknown
|
|
242
|
+
> = z.object({
|
|
243
|
+
meta: z.optional(
|
|
244
|
+
z.nullable(z.lazy(() => UpdateJournalEntryMeta$inboundSchema)),
|
|
245
|
+
),
|
|
246
|
+
data: models.JournalEntryResponseDto$inboundSchema,
|
|
247
|
+
errors: types.nullable(z.lazy(() => UpdateJournalEntryErrors$inboundSchema)),
|
|
248
|
+
rawData: types.nullable(
|
|
249
|
+
z.lazy(() => UpdateJournalEntryRawData$inboundSchema),
|
|
250
|
+
),
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
export function updateJournalEntryResponseFromJSON(
|
|
254
|
+
jsonString: string,
|
|
255
|
+
): SafeParseResult<UpdateJournalEntryResponse, SDKValidationError> {
|
|
256
|
+
return safeParse(
|
|
257
|
+
jsonString,
|
|
258
|
+
(x) => UpdateJournalEntryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
259
|
+
`Failed to parse 'UpdateJournalEntryResponse' from JSON`,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 TaxRateRequestCommonDto = {
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
code?: string | undefined;
|
|
10
|
+
name?: string | undefined;
|
|
11
|
+
percentage?: number | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type TaxRateRequestCommonDto$Outbound = {
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
percentage?: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const TaxRateRequestCommonDto$outboundSchema: z.ZodMiniType<
|
|
24
|
+
TaxRateRequestCommonDto$Outbound,
|
|
25
|
+
TaxRateRequestCommonDto
|
|
26
|
+
> = z.object({
|
|
27
|
+
id: z.optional(z.string()),
|
|
28
|
+
code: z.optional(z.string()),
|
|
29
|
+
name: z.optional(z.string()),
|
|
30
|
+
percentage: z.optional(z.number()),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function taxRateRequestCommonDtoToJSON(
|
|
34
|
+
taxRateRequestCommonDto: TaxRateRequestCommonDto,
|
|
35
|
+
): string {
|
|
36
|
+
return JSON.stringify(
|
|
37
|
+
TaxRateRequestCommonDto$outboundSchema.parse(taxRateRequestCommonDto),
|
|
38
|
+
);
|
|
39
|
+
}
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { accountingCreateTransaction } from "../funcs/accounting-create-transact
|
|
|
33
33
|
import { accountingCreateVendorCredit } from "../funcs/accounting-create-vendor-credit.js";
|
|
34
34
|
import { accountingDeleteBill } from "../funcs/accounting-delete-bill.js";
|
|
35
35
|
import { accountingDeleteEventSubscriptions } from "../funcs/accounting-delete-event-subscriptions.js";
|
|
36
|
+
import { accountingDeleteItem } from "../funcs/accounting-delete-item.js";
|
|
36
37
|
import { accountingDeletePayment } from "../funcs/accounting-delete-payment.js";
|
|
37
38
|
import { accountingDeleteVendorCredit } from "../funcs/accounting-delete-vendor-credit.js";
|
|
38
39
|
import { accountingGetAccount } from "../funcs/accounting-get-account.js";
|
|
@@ -120,6 +121,8 @@ import { accountingPutContact } from "../funcs/accounting-put-contact.js";
|
|
|
120
121
|
import { accountingUpdateBillLineItem } from "../funcs/accounting-update-bill-line-item.js";
|
|
121
122
|
import { accountingUpdateBill } from "../funcs/accounting-update-bill.js";
|
|
122
123
|
import { accountingUpdateCustomer } from "../funcs/accounting-update-customer.js";
|
|
124
|
+
import { accountingUpdateItem } from "../funcs/accounting-update-item.js";
|
|
125
|
+
import { accountingUpdateJournalEntry } from "../funcs/accounting-update-journal-entry.js";
|
|
123
126
|
import { accountingUpdateSupplier } from "../funcs/accounting-update-supplier.js";
|
|
124
127
|
import { accountingUpdateVendorCredit } from "../funcs/accounting-update-vendor-credit.js";
|
|
125
128
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -579,6 +582,28 @@ export class Accounting extends ClientSDK {
|
|
|
579
582
|
));
|
|
580
583
|
}
|
|
581
584
|
|
|
585
|
+
async updateItem(
|
|
586
|
+
request: operations.UpdateItemRequest,
|
|
587
|
+
options?: RequestOptions,
|
|
588
|
+
): Promise<operations.UpdateItemResponse> {
|
|
589
|
+
return unwrapAsync(accountingUpdateItem(
|
|
590
|
+
this,
|
|
591
|
+
request,
|
|
592
|
+
options,
|
|
593
|
+
));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
async deleteItem(
|
|
597
|
+
request: operations.DeleteItemRequest,
|
|
598
|
+
options?: RequestOptions,
|
|
599
|
+
): Promise<operations.DeleteItemResponse> {
|
|
600
|
+
return unwrapAsync(accountingDeleteItem(
|
|
601
|
+
this,
|
|
602
|
+
request,
|
|
603
|
+
options,
|
|
604
|
+
));
|
|
605
|
+
}
|
|
606
|
+
|
|
582
607
|
async getLineItems(
|
|
583
608
|
request: operations.GetLineItemsRequest,
|
|
584
609
|
options?: RequestOptions,
|
|
@@ -678,6 +703,17 @@ export class Accounting extends ClientSDK {
|
|
|
678
703
|
));
|
|
679
704
|
}
|
|
680
705
|
|
|
706
|
+
async updateJournalEntry(
|
|
707
|
+
request: operations.UpdateJournalEntryRequest,
|
|
708
|
+
options?: RequestOptions,
|
|
709
|
+
): Promise<operations.UpdateJournalEntryResponse> {
|
|
710
|
+
return unwrapAsync(accountingUpdateJournalEntry(
|
|
711
|
+
this,
|
|
712
|
+
request,
|
|
713
|
+
options,
|
|
714
|
+
));
|
|
715
|
+
}
|
|
716
|
+
|
|
681
717
|
async createJournalEntries(
|
|
682
718
|
request: operations.CreateJournalEntriesRequest,
|
|
683
719
|
options?: RequestOptions,
|