@vindentech/api-client 0.2.0 → 0.3.0-next.1
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/dist/generated/account-credits/account-credits.d.ts +68 -0
- package/dist/generated/account-credits/account-credits.d.ts.map +1 -0
- package/dist/generated/account-credits/account-credits.js +57 -0
- package/dist/generated/account-credits/account-credits.js.map +1 -0
- package/dist/generated/articles/articles.d.ts +61 -0
- package/dist/generated/articles/articles.d.ts.map +1 -0
- package/dist/generated/articles/articles.js +53 -0
- package/dist/generated/articles/articles.js.map +1 -0
- package/dist/generated/billing-accounts/billing-accounts.d.ts +61 -0
- package/dist/generated/billing-accounts/billing-accounts.d.ts.map +1 -0
- package/dist/generated/billing-accounts/billing-accounts.js +53 -0
- package/dist/generated/billing-accounts/billing-accounts.js.map +1 -0
- package/dist/generated/binding-plans/binding-plans.d.ts +35 -0
- package/dist/generated/binding-plans/binding-plans.d.ts.map +1 -0
- package/dist/generated/binding-plans/binding-plans.js +31 -0
- package/dist/generated/binding-plans/binding-plans.js.map +1 -0
- package/dist/generated/coupons/coupons.d.ts +101 -0
- package/dist/generated/coupons/coupons.d.ts.map +1 -0
- package/dist/generated/coupons/coupons.js +80 -0
- package/dist/generated/coupons/coupons.js.map +1 -0
- package/dist/generated/discount-rules/discount-rules.d.ts +35 -0
- package/dist/generated/discount-rules/discount-rules.d.ts.map +1 -0
- package/dist/generated/discount-rules/discount-rules.js +31 -0
- package/dist/generated/discount-rules/discount-rules.js.map +1 -0
- package/dist/generated/fortnox-o-auth/fortnox-o-auth.d.ts +23 -0
- package/dist/generated/fortnox-o-auth/fortnox-o-auth.d.ts.map +1 -0
- package/dist/generated/fortnox-o-auth/fortnox-o-auth.js +12 -0
- package/dist/generated/fortnox-o-auth/fortnox-o-auth.js.map +1 -0
- package/dist/generated/index.schemas.d.ts +1173 -1
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +109 -1
- package/dist/generated/index.schemas.js.map +1 -1
- package/dist/generated/integrations/integrations.d.ts +61 -0
- package/dist/generated/integrations/integrations.d.ts.map +1 -0
- package/dist/generated/integrations/integrations.js +46 -0
- package/dist/generated/integrations/integrations.js.map +1 -0
- package/dist/generated/invoices/invoices.d.ts +35 -0
- package/dist/generated/invoices/invoices.d.ts.map +1 -0
- package/dist/generated/invoices/invoices.js +29 -0
- package/dist/generated/invoices/invoices.js.map +1 -0
- package/dist/generated/price-lists/price-lists.d.ts +87 -0
- package/dist/generated/price-lists/price-lists.d.ts.map +1 -0
- package/dist/generated/price-lists/price-lists.js +82 -0
- package/dist/generated/price-lists/price-lists.js.map +1 -0
- package/dist/generated/provider-switch/provider-switch.d.ts +49 -0
- package/dist/generated/provider-switch/provider-switch.d.ts.map +1 -0
- package/dist/generated/provider-switch/provider-switch.js +24 -0
- package/dist/generated/provider-switch/provider-switch.js.map +1 -0
- package/dist/generated/stripe-webhook/stripe-webhook.d.ts +23 -0
- package/dist/generated/stripe-webhook/stripe-webhook.d.ts.map +1 -0
- package/dist/generated/stripe-webhook/stripe-webhook.js +12 -0
- package/dist/generated/stripe-webhook/stripe-webhook.js.map +1 -0
- package/dist/generated/subscription-configs/subscription-configs.d.ts +48 -0
- package/dist/generated/subscription-configs/subscription-configs.d.ts.map +1 -0
- package/dist/generated/subscription-configs/subscription-configs.js +36 -0
- package/dist/generated/subscription-configs/subscription-configs.js.map +1 -0
- package/dist/generated/tenant-config/tenant-config.d.ts +35 -0
- package/dist/generated/tenant-config/tenant-config.d.ts.map +1 -0
- package/dist/generated/tenant-config/tenant-config.js +24 -0
- package/dist/generated/tenant-config/tenant-config.js.map +1 -0
- package/package.json +5 -3
|
@@ -44,6 +44,8 @@ export interface OrderDto {
|
|
|
44
44
|
export interface MembershipDto {
|
|
45
45
|
organizationId: string;
|
|
46
46
|
role: string;
|
|
47
|
+
/** Fine-grained permissions (resource:action) granted by this org role — drives component visibility when this org is active */
|
|
48
|
+
capabilities: string[];
|
|
47
49
|
}
|
|
48
50
|
export interface MeResponseDto {
|
|
49
51
|
/** Keycloak subject identifier */
|
|
@@ -63,7 +65,1177 @@ export interface MeResponseDto {
|
|
|
63
65
|
/** @nullable */
|
|
64
66
|
displayName: string | null;
|
|
65
67
|
memberships: MembershipDto[];
|
|
66
|
-
/**
|
|
68
|
+
/** Cross-cutting permissions (resource:action) from platform/tenant-wide/warehouse/carrier roles for the active context — drives client-side component visibility. Org-scoped permissions are on each membership. */
|
|
67
69
|
capabilities: string[];
|
|
68
70
|
}
|
|
71
|
+
export interface StripeAccountDto {
|
|
72
|
+
stripeAccountId: string;
|
|
73
|
+
tenantId: string;
|
|
74
|
+
/** @nullable */
|
|
75
|
+
stripeProviderAccountId: string | null;
|
|
76
|
+
isTestMode: boolean;
|
|
77
|
+
isEnabled: boolean;
|
|
78
|
+
/** @nullable */
|
|
79
|
+
lastWebhookAt: string | null;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
}
|
|
83
|
+
export interface FortnoxAccountDto {
|
|
84
|
+
fortnoxAccountId: string;
|
|
85
|
+
tenantId: string;
|
|
86
|
+
/** @nullable */
|
|
87
|
+
fortnoxOrgId: string | null;
|
|
88
|
+
/** @nullable */
|
|
89
|
+
tokenExpiresAt: string | null;
|
|
90
|
+
syncEnabled: boolean;
|
|
91
|
+
/** @nullable */
|
|
92
|
+
lastSyncAt: string | null;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
}
|
|
96
|
+
export interface CreateFortnoxAccountDto {
|
|
97
|
+
/** Fortnox's organization identifier for this tenant. */
|
|
98
|
+
fortnoxOrgId?: string;
|
|
99
|
+
/** Fortnox OAuth access token. Stored encrypted at rest; never returned. */
|
|
100
|
+
accessToken: string;
|
|
101
|
+
/** Fortnox OAuth refresh token. Stored encrypted at rest; never returned. */
|
|
102
|
+
refreshToken?: string;
|
|
103
|
+
/** Access-token expiry, ISO-8601. */
|
|
104
|
+
tokenExpiresAt?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface CreateStripeAccountDto {
|
|
107
|
+
/** Stripe's 'acct_…' connected-account identifier. */
|
|
108
|
+
stripeProviderAccountId?: string;
|
|
109
|
+
/** Stripe secret API key (sk_live_* / sk_test_*). Stored encrypted at rest; never returned. */
|
|
110
|
+
apiKey: string;
|
|
111
|
+
/** Stripe webhook signing secret (whsec_*). Stored encrypted at rest; never returned. */
|
|
112
|
+
webhookSecret?: string;
|
|
113
|
+
/** Whether this account uses Stripe test mode (vs. live). */
|
|
114
|
+
isTestMode: boolean;
|
|
115
|
+
}
|
|
116
|
+
export type IntegrationAccountDtoProvider = typeof IntegrationAccountDtoProvider[keyof typeof IntegrationAccountDtoProvider];
|
|
117
|
+
export declare const IntegrationAccountDtoProvider: {
|
|
118
|
+
readonly stripe: "stripe";
|
|
119
|
+
readonly fortnox: "fortnox";
|
|
120
|
+
};
|
|
121
|
+
export interface IntegrationAccountDto {
|
|
122
|
+
provider: IntegrationAccountDtoProvider;
|
|
123
|
+
/** The provider account row's internal id. */
|
|
124
|
+
id: string;
|
|
125
|
+
tenantId: string;
|
|
126
|
+
/** Whether the integration is currently enabled (is_enabled / sync_enabled). */
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
}
|
|
131
|
+
export interface FortnoxAuthorizeUrlDto {
|
|
132
|
+
/** Fortnox OAuth authorize URL the SPA should redirect the browser to. Carries a signed, tenant-bound `state` parameter. */
|
|
133
|
+
authorizeUrl: string;
|
|
134
|
+
}
|
|
135
|
+
export interface BillingAccountDto {
|
|
136
|
+
billingAccountId: string;
|
|
137
|
+
tenantId: string;
|
|
138
|
+
organizationId: string;
|
|
139
|
+
/** @nullable */
|
|
140
|
+
email: string | null;
|
|
141
|
+
/** @nullable */
|
|
142
|
+
companyName: string | null;
|
|
143
|
+
/** Customer type enum (company / private). */
|
|
144
|
+
customerType: string;
|
|
145
|
+
/** @nullable */
|
|
146
|
+
firstName: string | null;
|
|
147
|
+
/** @nullable */
|
|
148
|
+
lastName: string | null;
|
|
149
|
+
/** @nullable */
|
|
150
|
+
corporateIdentityNumber: string | null;
|
|
151
|
+
/** @nullable */
|
|
152
|
+
invoiceEmail: string | null;
|
|
153
|
+
/** @nullable */
|
|
154
|
+
invoiceEmailCc: string | null;
|
|
155
|
+
/** @nullable */
|
|
156
|
+
invoiceEmailBcc: string | null;
|
|
157
|
+
/** @nullable */
|
|
158
|
+
invoiceAddressLine1: string | null;
|
|
159
|
+
/** @nullable */
|
|
160
|
+
invoiceAddressLine2: string | null;
|
|
161
|
+
/** @nullable */
|
|
162
|
+
invoiceZipCode: string | null;
|
|
163
|
+
/** @nullable */
|
|
164
|
+
invoiceCity: string | null;
|
|
165
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
166
|
+
countryCode: string;
|
|
167
|
+
/** ISO 4217 currency code. */
|
|
168
|
+
currencyCode: string;
|
|
169
|
+
languageCode: string;
|
|
170
|
+
/** Accounting provider enum. */
|
|
171
|
+
accountingProvider: string;
|
|
172
|
+
/** Payment provider enum. */
|
|
173
|
+
paymentProvider: string;
|
|
174
|
+
/** @nullable */
|
|
175
|
+
priceListId: string | null;
|
|
176
|
+
createdAt: string;
|
|
177
|
+
updatedAt: string;
|
|
178
|
+
}
|
|
179
|
+
export type CreateBillingAccountDtoCustomerType = typeof CreateBillingAccountDtoCustomerType[keyof typeof CreateBillingAccountDtoCustomerType];
|
|
180
|
+
export declare const CreateBillingAccountDtoCustomerType: {
|
|
181
|
+
readonly individual: "individual";
|
|
182
|
+
readonly sole_proprietor: "sole_proprietor";
|
|
183
|
+
readonly company: "company";
|
|
184
|
+
readonly nonprofit: "nonprofit";
|
|
185
|
+
readonly government: "government";
|
|
186
|
+
};
|
|
187
|
+
export interface CreateBillingAccountDto {
|
|
188
|
+
organizationId: string;
|
|
189
|
+
customerType: CreateBillingAccountDtoCustomerType;
|
|
190
|
+
email?: string;
|
|
191
|
+
companyName?: string;
|
|
192
|
+
firstName?: string;
|
|
193
|
+
lastName?: string;
|
|
194
|
+
personalIdentityNumber?: string;
|
|
195
|
+
corporateIdentityNumber?: string;
|
|
196
|
+
invoiceEmail?: string;
|
|
197
|
+
invoiceEmailCc?: string;
|
|
198
|
+
invoiceEmailBcc?: string;
|
|
199
|
+
invoiceAddressLine1?: string;
|
|
200
|
+
invoiceAddressLine2?: string;
|
|
201
|
+
invoiceZipCode?: string;
|
|
202
|
+
invoiceCity?: string;
|
|
203
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
204
|
+
countryCode?: string;
|
|
205
|
+
/** ISO 4217 currency code. */
|
|
206
|
+
currencyCode?: string;
|
|
207
|
+
languageCode?: string;
|
|
208
|
+
priceListId?: string;
|
|
209
|
+
}
|
|
210
|
+
export type UpdateBillingAccountDtoCustomerType = typeof UpdateBillingAccountDtoCustomerType[keyof typeof UpdateBillingAccountDtoCustomerType];
|
|
211
|
+
export declare const UpdateBillingAccountDtoCustomerType: {
|
|
212
|
+
readonly individual: "individual";
|
|
213
|
+
readonly sole_proprietor: "sole_proprietor";
|
|
214
|
+
readonly company: "company";
|
|
215
|
+
readonly nonprofit: "nonprofit";
|
|
216
|
+
readonly government: "government";
|
|
217
|
+
};
|
|
218
|
+
export interface UpdateBillingAccountDto {
|
|
219
|
+
customerType?: UpdateBillingAccountDtoCustomerType;
|
|
220
|
+
email?: string;
|
|
221
|
+
companyName?: string;
|
|
222
|
+
firstName?: string;
|
|
223
|
+
lastName?: string;
|
|
224
|
+
personalIdentityNumber?: string;
|
|
225
|
+
corporateIdentityNumber?: string;
|
|
226
|
+
invoiceEmail?: string;
|
|
227
|
+
invoiceEmailCc?: string;
|
|
228
|
+
invoiceEmailBcc?: string;
|
|
229
|
+
invoiceAddressLine1?: string;
|
|
230
|
+
invoiceAddressLine2?: string;
|
|
231
|
+
invoiceZipCode?: string;
|
|
232
|
+
invoiceCity?: string;
|
|
233
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
234
|
+
countryCode?: string;
|
|
235
|
+
/** ISO 4217 currency code. */
|
|
236
|
+
currencyCode?: string;
|
|
237
|
+
languageCode?: string;
|
|
238
|
+
priceListId?: string;
|
|
239
|
+
}
|
|
240
|
+
export interface InvoiceDto {
|
|
241
|
+
invoiceId: string;
|
|
242
|
+
tenantId: string;
|
|
243
|
+
organizationId: string;
|
|
244
|
+
billingAccountId: string;
|
|
245
|
+
invoiceDate: string;
|
|
246
|
+
/** @nullable */
|
|
247
|
+
invoiceDueDate: string | null;
|
|
248
|
+
/** Invoice status enum. */
|
|
249
|
+
invoiceStatus: string;
|
|
250
|
+
/** Invoice type enum. */
|
|
251
|
+
invoiceType: string;
|
|
252
|
+
isCredited: boolean;
|
|
253
|
+
/** Total in minor currency units. */
|
|
254
|
+
totalMinor: number;
|
|
255
|
+
/** VAT total in minor currency units. */
|
|
256
|
+
vatTotalMinor: number;
|
|
257
|
+
/** ISO 4217 currency code. */
|
|
258
|
+
currencyCode: string;
|
|
259
|
+
languageCode: string;
|
|
260
|
+
/** @nullable */
|
|
261
|
+
correctsInvoiceId: string | null;
|
|
262
|
+
/** @nullable */
|
|
263
|
+
correctionReason: string | null;
|
|
264
|
+
/** @nullable */
|
|
265
|
+
voidedAt: string | null;
|
|
266
|
+
/** @nullable */
|
|
267
|
+
voidReason: string | null;
|
|
268
|
+
/** @nullable */
|
|
269
|
+
sentAt: string | null;
|
|
270
|
+
/** @nullable */
|
|
271
|
+
paidAt: string | null;
|
|
272
|
+
/** @nullable */
|
|
273
|
+
snapshotCompanyName: string | null;
|
|
274
|
+
/** @nullable */
|
|
275
|
+
snapshotInvoiceEmail: string | null;
|
|
276
|
+
/** @nullable */
|
|
277
|
+
snapshotInvoiceAddressLine1: string | null;
|
|
278
|
+
/** @nullable */
|
|
279
|
+
snapshotInvoiceAddressLine2: string | null;
|
|
280
|
+
/** @nullable */
|
|
281
|
+
snapshotInvoiceZipCode: string | null;
|
|
282
|
+
/** @nullable */
|
|
283
|
+
snapshotInvoiceCity: string | null;
|
|
284
|
+
/** @nullable */
|
|
285
|
+
snapshotCorporateIdentityNumber: string | null;
|
|
286
|
+
}
|
|
287
|
+
export interface InvoiceRowDto {
|
|
288
|
+
invoiceRowId: string;
|
|
289
|
+
/** @nullable */
|
|
290
|
+
articleId: string | null;
|
|
291
|
+
/** Quantity (numeric). */
|
|
292
|
+
quantity: string;
|
|
293
|
+
/** @nullable */
|
|
294
|
+
unitOfMeasureId: string | null;
|
|
295
|
+
/** Amount excl. VAT in minor currency units. */
|
|
296
|
+
amountExVatMinor: number;
|
|
297
|
+
/** VAT amount in minor currency units. */
|
|
298
|
+
vatAmountMinor: number;
|
|
299
|
+
/** VAT rate (numeric, e.g. 25.0000). */
|
|
300
|
+
vatRate: string;
|
|
301
|
+
/** ISO 4217 currency code. */
|
|
302
|
+
currencyCode: string;
|
|
303
|
+
/** @nullable */
|
|
304
|
+
freeText: string | null;
|
|
305
|
+
}
|
|
306
|
+
export interface InvoiceDetailDto {
|
|
307
|
+
invoiceId: string;
|
|
308
|
+
tenantId: string;
|
|
309
|
+
organizationId: string;
|
|
310
|
+
billingAccountId: string;
|
|
311
|
+
invoiceDate: string;
|
|
312
|
+
/** @nullable */
|
|
313
|
+
invoiceDueDate: string | null;
|
|
314
|
+
/** Invoice status enum. */
|
|
315
|
+
invoiceStatus: string;
|
|
316
|
+
/** Invoice type enum. */
|
|
317
|
+
invoiceType: string;
|
|
318
|
+
isCredited: boolean;
|
|
319
|
+
/** Total in minor currency units. */
|
|
320
|
+
totalMinor: number;
|
|
321
|
+
/** VAT total in minor currency units. */
|
|
322
|
+
vatTotalMinor: number;
|
|
323
|
+
/** ISO 4217 currency code. */
|
|
324
|
+
currencyCode: string;
|
|
325
|
+
languageCode: string;
|
|
326
|
+
/** @nullable */
|
|
327
|
+
correctsInvoiceId: string | null;
|
|
328
|
+
/** @nullable */
|
|
329
|
+
correctionReason: string | null;
|
|
330
|
+
/** @nullable */
|
|
331
|
+
voidedAt: string | null;
|
|
332
|
+
/** @nullable */
|
|
333
|
+
voidReason: string | null;
|
|
334
|
+
/** @nullable */
|
|
335
|
+
sentAt: string | null;
|
|
336
|
+
/** @nullable */
|
|
337
|
+
paidAt: string | null;
|
|
338
|
+
/** @nullable */
|
|
339
|
+
snapshotCompanyName: string | null;
|
|
340
|
+
/** @nullable */
|
|
341
|
+
snapshotInvoiceEmail: string | null;
|
|
342
|
+
/** @nullable */
|
|
343
|
+
snapshotInvoiceAddressLine1: string | null;
|
|
344
|
+
/** @nullable */
|
|
345
|
+
snapshotInvoiceAddressLine2: string | null;
|
|
346
|
+
/** @nullable */
|
|
347
|
+
snapshotInvoiceZipCode: string | null;
|
|
348
|
+
/** @nullable */
|
|
349
|
+
snapshotInvoiceCity: string | null;
|
|
350
|
+
/** @nullable */
|
|
351
|
+
snapshotCorporateIdentityNumber: string | null;
|
|
352
|
+
rows: InvoiceRowDto[];
|
|
353
|
+
}
|
|
354
|
+
export interface ArticleDto {
|
|
355
|
+
articleId: string;
|
|
356
|
+
/** @nullable */
|
|
357
|
+
tenantId: string | null;
|
|
358
|
+
code: string;
|
|
359
|
+
name: string;
|
|
360
|
+
/** @nullable */
|
|
361
|
+
description: string | null;
|
|
362
|
+
/** @nullable */
|
|
363
|
+
unit: string | null;
|
|
364
|
+
/** @nullable */
|
|
365
|
+
articleCategory: string | null;
|
|
366
|
+
isMandatory: boolean;
|
|
367
|
+
/** Default VAT rate (numeric, e.g. 25.0000). */
|
|
368
|
+
vatRateDefault: string;
|
|
369
|
+
vatInclusiveDefault: boolean;
|
|
370
|
+
rutEligible: boolean;
|
|
371
|
+
isActive: boolean;
|
|
372
|
+
createdAt: string;
|
|
373
|
+
updatedAt: string;
|
|
374
|
+
}
|
|
375
|
+
export interface CreateArticleDto {
|
|
376
|
+
code: string;
|
|
377
|
+
name: string;
|
|
378
|
+
description?: string;
|
|
379
|
+
unit?: string;
|
|
380
|
+
articleCategory?: string;
|
|
381
|
+
isMandatory?: boolean;
|
|
382
|
+
vatInclusiveDefault?: boolean;
|
|
383
|
+
rutEligible?: boolean;
|
|
384
|
+
isActive?: boolean;
|
|
385
|
+
/** Default VAT rate (numeric column → string, e.g. 25.0000). */
|
|
386
|
+
vatRateDefault?: string;
|
|
387
|
+
}
|
|
388
|
+
export interface UpdateArticleDto {
|
|
389
|
+
code?: string;
|
|
390
|
+
name?: string;
|
|
391
|
+
description?: string;
|
|
392
|
+
unit?: string;
|
|
393
|
+
articleCategory?: string;
|
|
394
|
+
isMandatory?: boolean;
|
|
395
|
+
vatInclusiveDefault?: boolean;
|
|
396
|
+
rutEligible?: boolean;
|
|
397
|
+
isActive?: boolean;
|
|
398
|
+
/** Default VAT rate (numeric column → string, e.g. 25.0000). */
|
|
399
|
+
vatRateDefault?: string;
|
|
400
|
+
}
|
|
401
|
+
export interface PriceListDto {
|
|
402
|
+
priceListId: string;
|
|
403
|
+
tenantId: string;
|
|
404
|
+
name: string;
|
|
405
|
+
code: string;
|
|
406
|
+
/** @nullable */
|
|
407
|
+
description: string | null;
|
|
408
|
+
/** ISO 4217 currency code. */
|
|
409
|
+
currencyCode: string;
|
|
410
|
+
isDefault: boolean;
|
|
411
|
+
/** @nullable */
|
|
412
|
+
effectiveFrom: string | null;
|
|
413
|
+
/** @nullable */
|
|
414
|
+
effectiveUntil: string | null;
|
|
415
|
+
isActive: boolean;
|
|
416
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
417
|
+
lifecycleStatus: string;
|
|
418
|
+
createdAt: string;
|
|
419
|
+
updatedAt: string;
|
|
420
|
+
}
|
|
421
|
+
export interface PriceListItemDto {
|
|
422
|
+
priceListItemId: string;
|
|
423
|
+
priceListId: string;
|
|
424
|
+
tenantId: string;
|
|
425
|
+
articleId: string;
|
|
426
|
+
unitOfMeasureId: string;
|
|
427
|
+
/** Price excl. VAT in minor currency units. */
|
|
428
|
+
priceExVatMinor: number;
|
|
429
|
+
/**
|
|
430
|
+
* VAT rate override (numeric) or null.
|
|
431
|
+
* @nullable
|
|
432
|
+
*/
|
|
433
|
+
vatRateOverride: string | null;
|
|
434
|
+
/** Minimum quantity (numeric). */
|
|
435
|
+
minQuantity: string;
|
|
436
|
+
/**
|
|
437
|
+
* Maximum quantity (numeric) or null.
|
|
438
|
+
* @nullable
|
|
439
|
+
*/
|
|
440
|
+
maxQuantity: string | null;
|
|
441
|
+
effectiveFrom: string;
|
|
442
|
+
/** @nullable */
|
|
443
|
+
effectiveUntil: string | null;
|
|
444
|
+
isActive: boolean;
|
|
445
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
446
|
+
lifecycleStatus: string;
|
|
447
|
+
createdAt: string;
|
|
448
|
+
updatedAt: string;
|
|
449
|
+
}
|
|
450
|
+
export interface CreatePriceListDto {
|
|
451
|
+
name: string;
|
|
452
|
+
code: string;
|
|
453
|
+
/** ISO 4217 currency code (3 uppercase letters). */
|
|
454
|
+
currencyCode: string;
|
|
455
|
+
description?: string;
|
|
456
|
+
isDefault?: boolean;
|
|
457
|
+
effectiveFrom?: string;
|
|
458
|
+
effectiveUntil?: string;
|
|
459
|
+
changeReason?: string;
|
|
460
|
+
}
|
|
461
|
+
export interface UpdatePriceListDto {
|
|
462
|
+
name?: string;
|
|
463
|
+
code?: string;
|
|
464
|
+
description?: string;
|
|
465
|
+
isDefault?: boolean;
|
|
466
|
+
effectiveFrom?: string;
|
|
467
|
+
effectiveUntil?: string;
|
|
468
|
+
changeReason?: string;
|
|
469
|
+
}
|
|
470
|
+
export interface CreatePriceListItemDto {
|
|
471
|
+
articleId: string;
|
|
472
|
+
unitOfMeasureId: string;
|
|
473
|
+
/** Price excluding VAT in minor units (never negative). */
|
|
474
|
+
priceExVatMinor: number;
|
|
475
|
+
/** VAT rate override (numeric column → string, e.g. 25.0000). */
|
|
476
|
+
vatRateOverride?: string;
|
|
477
|
+
/** Minimum quantity (numeric column → string). */
|
|
478
|
+
minQuantity?: string;
|
|
479
|
+
/** Maximum quantity (numeric column → string). */
|
|
480
|
+
maxQuantity?: string;
|
|
481
|
+
effectiveFrom: string;
|
|
482
|
+
effectiveUntil?: string;
|
|
483
|
+
changeReason?: string;
|
|
484
|
+
}
|
|
485
|
+
export interface TenantBillingConfigDto {
|
|
486
|
+
tenantBillingConfigId: string;
|
|
487
|
+
tenantId: string;
|
|
488
|
+
/** Default accounting provider enum. */
|
|
489
|
+
defaultAccountingProvider: string;
|
|
490
|
+
/** Default payment provider enum. */
|
|
491
|
+
defaultPaymentProvider: string;
|
|
492
|
+
/** @nullable */
|
|
493
|
+
defaultPaymentMethodId: string | null;
|
|
494
|
+
/** @nullable */
|
|
495
|
+
defaultPaymentTermId: string | null;
|
|
496
|
+
/** @nullable */
|
|
497
|
+
defaultBillingFrequencyId: string | null;
|
|
498
|
+
autoChargeEnabled: boolean;
|
|
499
|
+
requiresPricingApproval: boolean;
|
|
500
|
+
createdAt: string;
|
|
501
|
+
updatedAt: string;
|
|
502
|
+
}
|
|
503
|
+
export interface UpdateTenantBillingConfigDto {
|
|
504
|
+
defaultPaymentMethodId?: string;
|
|
505
|
+
defaultPaymentTermId?: string;
|
|
506
|
+
defaultBillingFrequencyId?: string;
|
|
507
|
+
autoChargeEnabled?: boolean;
|
|
508
|
+
requiresPricingApproval?: boolean;
|
|
509
|
+
changeReason?: string;
|
|
510
|
+
}
|
|
511
|
+
export interface CustomerSubscriptionConfigDto {
|
|
512
|
+
customerSubscriptionConfigId: string;
|
|
513
|
+
tenantId: string;
|
|
514
|
+
organizationId: string;
|
|
515
|
+
billingAccountId: string;
|
|
516
|
+
/** @nullable */
|
|
517
|
+
paymentMethodId: string | null;
|
|
518
|
+
/** @nullable */
|
|
519
|
+
paymentTermId: string | null;
|
|
520
|
+
/** @nullable */
|
|
521
|
+
billingFrequencyId: string | null;
|
|
522
|
+
/** @nullable */
|
|
523
|
+
autoChargeEnabled: boolean | null;
|
|
524
|
+
/** @nullable */
|
|
525
|
+
bindingPlanId: string | null;
|
|
526
|
+
/**
|
|
527
|
+
* Engine-managed binding discount snapshot (basis points).
|
|
528
|
+
* @nullable
|
|
529
|
+
*/
|
|
530
|
+
bindingDiscountSnapshotBps: number | null;
|
|
531
|
+
/**
|
|
532
|
+
* Engine-managed binding discount snapshot timestamp.
|
|
533
|
+
* @nullable
|
|
534
|
+
*/
|
|
535
|
+
bindingDiscountSnapshotAt: string | null;
|
|
536
|
+
/** @nullable */
|
|
537
|
+
volume: number | null;
|
|
538
|
+
/** @nullable */
|
|
539
|
+
billableVolume: number | null;
|
|
540
|
+
/** @nullable */
|
|
541
|
+
bindingPeriodEnd: string | null;
|
|
542
|
+
/** @nullable */
|
|
543
|
+
bindingVolume: number | null;
|
|
544
|
+
/** @nullable */
|
|
545
|
+
currentPeriodStart: string | null;
|
|
546
|
+
/** @nullable */
|
|
547
|
+
currentPeriodEnd: string | null;
|
|
548
|
+
/** @nullable */
|
|
549
|
+
insuranceId: string | null;
|
|
550
|
+
createdAt: string;
|
|
551
|
+
updatedAt: string;
|
|
552
|
+
}
|
|
553
|
+
export interface CreateCustomerSubscriptionConfigDto {
|
|
554
|
+
billingAccountId: string;
|
|
555
|
+
paymentMethodId?: string;
|
|
556
|
+
paymentTermId?: string;
|
|
557
|
+
billingFrequencyId?: string;
|
|
558
|
+
bindingPlanId?: string;
|
|
559
|
+
autoChargeEnabled?: boolean;
|
|
560
|
+
/** Bigint volume (>= 0). */
|
|
561
|
+
volume?: number;
|
|
562
|
+
/** Bigint billable volume (>= 0). */
|
|
563
|
+
billableVolume?: number;
|
|
564
|
+
/** Bigint binding volume (>= 0). */
|
|
565
|
+
bindingVolume?: number;
|
|
566
|
+
bindingPeriodEnd?: string;
|
|
567
|
+
currentPeriodStart?: string;
|
|
568
|
+
currentPeriodEnd?: string;
|
|
569
|
+
insuranceId?: string;
|
|
570
|
+
}
|
|
571
|
+
export interface UpdateCustomerSubscriptionConfigDto {
|
|
572
|
+
paymentMethodId?: string;
|
|
573
|
+
paymentTermId?: string;
|
|
574
|
+
billingFrequencyId?: string;
|
|
575
|
+
bindingPlanId?: string;
|
|
576
|
+
autoChargeEnabled?: boolean;
|
|
577
|
+
/** Bigint volume (>= 0). */
|
|
578
|
+
volume?: number;
|
|
579
|
+
/** Bigint billable volume (>= 0). */
|
|
580
|
+
billableVolume?: number;
|
|
581
|
+
/** Bigint binding volume (>= 0). */
|
|
582
|
+
bindingVolume?: number;
|
|
583
|
+
bindingPeriodEnd?: string;
|
|
584
|
+
currentPeriodStart?: string;
|
|
585
|
+
currentPeriodEnd?: string;
|
|
586
|
+
insuranceId?: string;
|
|
587
|
+
}
|
|
588
|
+
export type SwitchAccountProvidersDtoAccountingProvider = typeof SwitchAccountProvidersDtoAccountingProvider[keyof typeof SwitchAccountProvidersDtoAccountingProvider];
|
|
589
|
+
export declare const SwitchAccountProvidersDtoAccountingProvider: {
|
|
590
|
+
readonly manual: "manual";
|
|
591
|
+
readonly fortnox: "fortnox";
|
|
592
|
+
};
|
|
593
|
+
export type SwitchAccountProvidersDtoPaymentProvider = typeof SwitchAccountProvidersDtoPaymentProvider[keyof typeof SwitchAccountProvidersDtoPaymentProvider];
|
|
594
|
+
export declare const SwitchAccountProvidersDtoPaymentProvider: {
|
|
595
|
+
readonly manual: "manual";
|
|
596
|
+
readonly stripe: "stripe";
|
|
597
|
+
};
|
|
598
|
+
export interface SwitchAccountProvidersDto {
|
|
599
|
+
accountingProvider?: SwitchAccountProvidersDtoAccountingProvider;
|
|
600
|
+
paymentProvider?: SwitchAccountProvidersDtoPaymentProvider;
|
|
601
|
+
}
|
|
602
|
+
export type SwitchTenantConfigProvidersDtoDefaultAccountingProvider = typeof SwitchTenantConfigProvidersDtoDefaultAccountingProvider[keyof typeof SwitchTenantConfigProvidersDtoDefaultAccountingProvider];
|
|
603
|
+
export declare const SwitchTenantConfigProvidersDtoDefaultAccountingProvider: {
|
|
604
|
+
readonly manual: "manual";
|
|
605
|
+
readonly fortnox: "fortnox";
|
|
606
|
+
};
|
|
607
|
+
export type SwitchTenantConfigProvidersDtoDefaultPaymentProvider = typeof SwitchTenantConfigProvidersDtoDefaultPaymentProvider[keyof typeof SwitchTenantConfigProvidersDtoDefaultPaymentProvider];
|
|
608
|
+
export declare const SwitchTenantConfigProvidersDtoDefaultPaymentProvider: {
|
|
609
|
+
readonly manual: "manual";
|
|
610
|
+
readonly stripe: "stripe";
|
|
611
|
+
};
|
|
612
|
+
export interface SwitchTenantConfigProvidersDto {
|
|
613
|
+
defaultAccountingProvider?: SwitchTenantConfigProvidersDtoDefaultAccountingProvider;
|
|
614
|
+
defaultPaymentProvider?: SwitchTenantConfigProvidersDtoDefaultPaymentProvider;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Optional JSON conditions (e.g. {first_invoice:true}).
|
|
618
|
+
* @nullable
|
|
619
|
+
*/
|
|
620
|
+
export type DiscountRuleDtoConditions = {
|
|
621
|
+
[key: string]: unknown;
|
|
622
|
+
} | null;
|
|
623
|
+
export interface DiscountRuleDto {
|
|
624
|
+
discountRuleId: string;
|
|
625
|
+
tenantId: string;
|
|
626
|
+
/**
|
|
627
|
+
* Target organization, or null for tenant-wide.
|
|
628
|
+
* @nullable
|
|
629
|
+
*/
|
|
630
|
+
organizationId: string | null;
|
|
631
|
+
/**
|
|
632
|
+
* Target billing account, or null when not account-specific.
|
|
633
|
+
* @nullable
|
|
634
|
+
*/
|
|
635
|
+
billingAccountId: string | null;
|
|
636
|
+
/**
|
|
637
|
+
* Target price list, or null for any list.
|
|
638
|
+
* @nullable
|
|
639
|
+
*/
|
|
640
|
+
priceListId: string | null;
|
|
641
|
+
/**
|
|
642
|
+
* Target article, or null for any article.
|
|
643
|
+
* @nullable
|
|
644
|
+
*/
|
|
645
|
+
articleId: string | null;
|
|
646
|
+
/**
|
|
647
|
+
* Target binding plan, or null for any binding.
|
|
648
|
+
* @nullable
|
|
649
|
+
*/
|
|
650
|
+
bindingPlanId: string | null;
|
|
651
|
+
/** Rule type: binding_period / campaign / contract / start_fee_waiver / volume_tier / seasonal / account_specific. */
|
|
652
|
+
ruleType: string;
|
|
653
|
+
/** Discount type: percentage / fixed_amount / replacement_price. */
|
|
654
|
+
discountType: string;
|
|
655
|
+
/**
|
|
656
|
+
* Discount in basis points (1000 = 10.00%); set for percentage.
|
|
657
|
+
* @nullable
|
|
658
|
+
*/
|
|
659
|
+
discountPercentBps: number | null;
|
|
660
|
+
/**
|
|
661
|
+
* Fixed discount in minor units; set for fixed_amount.
|
|
662
|
+
* @nullable
|
|
663
|
+
*/
|
|
664
|
+
discountAmountMinor: number | null;
|
|
665
|
+
/**
|
|
666
|
+
* Replacement price in minor units; set for replacement_price.
|
|
667
|
+
* @nullable
|
|
668
|
+
*/
|
|
669
|
+
replacementPriceMinor: number | null;
|
|
670
|
+
/**
|
|
671
|
+
* ISO 4217 currency code; set for money discounts, null otherwise.
|
|
672
|
+
* @nullable
|
|
673
|
+
*/
|
|
674
|
+
currencyCode: string | null;
|
|
675
|
+
/**
|
|
676
|
+
* Optional JSON conditions (e.g. {first_invoice:true}).
|
|
677
|
+
* @nullable
|
|
678
|
+
*/
|
|
679
|
+
conditions: DiscountRuleDtoConditions;
|
|
680
|
+
/** Application priority (lower applies first). */
|
|
681
|
+
priority: number;
|
|
682
|
+
/** Whether the rule stacks with other discounts. */
|
|
683
|
+
stackable: boolean;
|
|
684
|
+
effectiveFrom: string;
|
|
685
|
+
/** @nullable */
|
|
686
|
+
effectiveUntil: string | null;
|
|
687
|
+
isActive: boolean;
|
|
688
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
689
|
+
lifecycleStatus: string;
|
|
690
|
+
createdAt: string;
|
|
691
|
+
updatedAt: string;
|
|
692
|
+
}
|
|
693
|
+
export type CreateDiscountRuleDtoRuleType = typeof CreateDiscountRuleDtoRuleType[keyof typeof CreateDiscountRuleDtoRuleType];
|
|
694
|
+
export declare const CreateDiscountRuleDtoRuleType: {
|
|
695
|
+
readonly binding_period: "binding_period";
|
|
696
|
+
readonly campaign: "campaign";
|
|
697
|
+
readonly contract: "contract";
|
|
698
|
+
readonly start_fee_waiver: "start_fee_waiver";
|
|
699
|
+
readonly volume_tier: "volume_tier";
|
|
700
|
+
readonly seasonal: "seasonal";
|
|
701
|
+
readonly account_specific: "account_specific";
|
|
702
|
+
};
|
|
703
|
+
export type CreateDiscountRuleDtoDiscountType = typeof CreateDiscountRuleDtoDiscountType[keyof typeof CreateDiscountRuleDtoDiscountType];
|
|
704
|
+
export declare const CreateDiscountRuleDtoDiscountType: {
|
|
705
|
+
readonly percentage: "percentage";
|
|
706
|
+
readonly fixed_amount: "fixed_amount";
|
|
707
|
+
readonly replacement_price: "replacement_price";
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* Optional JSON conditions.
|
|
711
|
+
*/
|
|
712
|
+
export type CreateDiscountRuleDtoConditions = {
|
|
713
|
+
[key: string]: unknown;
|
|
714
|
+
};
|
|
715
|
+
export interface CreateDiscountRuleDto {
|
|
716
|
+
ruleType: CreateDiscountRuleDtoRuleType;
|
|
717
|
+
discountType: CreateDiscountRuleDtoDiscountType;
|
|
718
|
+
/** Discount in basis points (1000 = 10.00%). Required iff discountType = percentage. */
|
|
719
|
+
discountPercentBps?: number;
|
|
720
|
+
/** Fixed discount in minor units. Required iff discountType = fixed_amount. */
|
|
721
|
+
discountAmountMinor?: number;
|
|
722
|
+
/** Replacement price in minor units. Required iff discountType = replacement_price. */
|
|
723
|
+
replacementPriceMinor?: number;
|
|
724
|
+
/** ISO 4217 currency code. Required for fixed_amount/replacement_price, omitted for percentage. */
|
|
725
|
+
currencyCode?: string;
|
|
726
|
+
organizationId?: string;
|
|
727
|
+
billingAccountId?: string;
|
|
728
|
+
priceListId?: string;
|
|
729
|
+
articleId?: string;
|
|
730
|
+
bindingPlanId?: string;
|
|
731
|
+
/** Optional JSON conditions. */
|
|
732
|
+
conditions?: CreateDiscountRuleDtoConditions;
|
|
733
|
+
/** Application priority (lower applies first). */
|
|
734
|
+
priority?: number;
|
|
735
|
+
stackable?: boolean;
|
|
736
|
+
effectiveFrom: string;
|
|
737
|
+
effectiveUntil?: string;
|
|
738
|
+
changeReason?: string;
|
|
739
|
+
}
|
|
740
|
+
export interface BindingPlanDto {
|
|
741
|
+
bindingPlanId: string;
|
|
742
|
+
tenantId: string;
|
|
743
|
+
code: string;
|
|
744
|
+
displayName: string;
|
|
745
|
+
/**
|
|
746
|
+
* Binding duration in months; null or 0 = flexible / no binding.
|
|
747
|
+
* @nullable
|
|
748
|
+
*/
|
|
749
|
+
durationMonths: number | null;
|
|
750
|
+
/** Whether the binding discount persists after the binding ends. */
|
|
751
|
+
discountPersistsAfterBinding: boolean;
|
|
752
|
+
/**
|
|
753
|
+
* Post-binding discount mode (frozen_at_signed_rate / floats_with_current_rule) or null.
|
|
754
|
+
* @nullable
|
|
755
|
+
*/
|
|
756
|
+
persistentDiscountMode: string | null;
|
|
757
|
+
isDefault: boolean;
|
|
758
|
+
isActive: boolean;
|
|
759
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
760
|
+
lifecycleStatus: string;
|
|
761
|
+
createdAt: string;
|
|
762
|
+
updatedAt: string;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Required when discountPersistsAfterBinding is true; omitted otherwise.
|
|
766
|
+
*/
|
|
767
|
+
export type CreateBindingPlanDtoPersistentDiscountMode = typeof CreateBindingPlanDtoPersistentDiscountMode[keyof typeof CreateBindingPlanDtoPersistentDiscountMode];
|
|
768
|
+
export declare const CreateBindingPlanDtoPersistentDiscountMode: {
|
|
769
|
+
readonly frozen_at_signed_rate: "frozen_at_signed_rate";
|
|
770
|
+
readonly floats_with_current_rule: "floats_with_current_rule";
|
|
771
|
+
};
|
|
772
|
+
export interface CreateBindingPlanDto {
|
|
773
|
+
code: string;
|
|
774
|
+
displayName: string;
|
|
775
|
+
/** Binding duration in months (0 = flexible / no binding). */
|
|
776
|
+
durationMonths?: number;
|
|
777
|
+
discountPersistsAfterBinding?: boolean;
|
|
778
|
+
/** Required when discountPersistsAfterBinding is true; omitted otherwise. */
|
|
779
|
+
persistentDiscountMode?: CreateBindingPlanDtoPersistentDiscountMode;
|
|
780
|
+
isDefault?: boolean;
|
|
781
|
+
changeReason?: string;
|
|
782
|
+
}
|
|
783
|
+
export interface AccountCreditDto {
|
|
784
|
+
accountCreditId: string;
|
|
785
|
+
tenantId: string;
|
|
786
|
+
organizationId: string;
|
|
787
|
+
billingAccountId: string;
|
|
788
|
+
/** Origin: signup_campaign / referral / manual / migration / sales_order / coupon_redemption / credit_note. */
|
|
789
|
+
source: string;
|
|
790
|
+
/**
|
|
791
|
+
* Free-text reference to the originating entity.
|
|
792
|
+
* @nullable
|
|
793
|
+
*/
|
|
794
|
+
sourceId: string | null;
|
|
795
|
+
/** Granted amount in minor units. */
|
|
796
|
+
originalAmountMinor: number;
|
|
797
|
+
/** Unspent balance in minor units (maintained by the consumption flow). */
|
|
798
|
+
remainingAmountMinor: number;
|
|
799
|
+
/** ISO 4217 currency code. */
|
|
800
|
+
currencyCode: string;
|
|
801
|
+
/**
|
|
802
|
+
* Restricting article, or null for any.
|
|
803
|
+
* @nullable
|
|
804
|
+
*/
|
|
805
|
+
appliesToArticleId: string | null;
|
|
806
|
+
/**
|
|
807
|
+
* Restricting article category, or null for any.
|
|
808
|
+
* @nullable
|
|
809
|
+
*/
|
|
810
|
+
appliesToArticleCategory: string | null;
|
|
811
|
+
/** @nullable */
|
|
812
|
+
startsAt: string | null;
|
|
813
|
+
/** @nullable */
|
|
814
|
+
expiresAt: string | null;
|
|
815
|
+
/** Status: active / consumed / expired / cancelled. */
|
|
816
|
+
status: string;
|
|
817
|
+
/** @nullable */
|
|
818
|
+
comment: string | null;
|
|
819
|
+
createdAt: string;
|
|
820
|
+
updatedAt: string;
|
|
821
|
+
}
|
|
822
|
+
export interface AccountCreditApplicationDto {
|
|
823
|
+
accountCreditApplicationId: string;
|
|
824
|
+
tenantId: string;
|
|
825
|
+
organizationId: string;
|
|
826
|
+
accountCreditId: string;
|
|
827
|
+
billingAccountId: string;
|
|
828
|
+
/** @nullable */
|
|
829
|
+
invoiceId: string | null;
|
|
830
|
+
/** @nullable */
|
|
831
|
+
invoiceRowId: string | null;
|
|
832
|
+
/** @nullable */
|
|
833
|
+
invoiceBasisRowId: string | null;
|
|
834
|
+
/** Amount drawn from the credit in minor units (>0). */
|
|
835
|
+
appliedAmountMinor: number;
|
|
836
|
+
appliedAt: string;
|
|
837
|
+
}
|
|
838
|
+
export type CreateAccountCreditDtoSource = typeof CreateAccountCreditDtoSource[keyof typeof CreateAccountCreditDtoSource];
|
|
839
|
+
export declare const CreateAccountCreditDtoSource: {
|
|
840
|
+
readonly signup_campaign: "signup_campaign";
|
|
841
|
+
readonly referral: "referral";
|
|
842
|
+
readonly manual: "manual";
|
|
843
|
+
readonly migration: "migration";
|
|
844
|
+
readonly sales_order: "sales_order";
|
|
845
|
+
readonly coupon_redemption: "coupon_redemption";
|
|
846
|
+
readonly credit_note: "credit_note";
|
|
847
|
+
};
|
|
848
|
+
export interface CreateAccountCreditDto {
|
|
849
|
+
organizationId: string;
|
|
850
|
+
billingAccountId: string;
|
|
851
|
+
source: CreateAccountCreditDtoSource;
|
|
852
|
+
/** Free-text reference to the originating entity (e.g. a credit note id). */
|
|
853
|
+
sourceId?: string;
|
|
854
|
+
/** Credit amount in minor units (>0). Sets remainingAmountMinor at creation (fully unspent). */
|
|
855
|
+
originalAmountMinor: number;
|
|
856
|
+
/** ISO 4217 currency code (must match the billing account's currency). */
|
|
857
|
+
currencyCode: string;
|
|
858
|
+
/** Restrict the credit to a single article, or null for any. */
|
|
859
|
+
appliesToArticleId?: string;
|
|
860
|
+
/** Restrict the credit to an article category, or null for any. */
|
|
861
|
+
appliesToArticleCategory?: string;
|
|
862
|
+
startsAt?: string;
|
|
863
|
+
expiresAt?: string;
|
|
864
|
+
/** Optional free-text note. */
|
|
865
|
+
comment?: string;
|
|
866
|
+
}
|
|
867
|
+
export interface CouponDto {
|
|
868
|
+
couponId: string;
|
|
869
|
+
tenantId: string;
|
|
870
|
+
code: string;
|
|
871
|
+
/** @nullable */
|
|
872
|
+
name: string | null;
|
|
873
|
+
/** @nullable */
|
|
874
|
+
description: string | null;
|
|
875
|
+
isActive: boolean;
|
|
876
|
+
/** @nullable */
|
|
877
|
+
startsAt: string | null;
|
|
878
|
+
/** @nullable */
|
|
879
|
+
expiresAt: string | null;
|
|
880
|
+
onlyNewCustomers: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Total redemption cap; null = unlimited.
|
|
883
|
+
* @nullable
|
|
884
|
+
*/
|
|
885
|
+
maxTotalRedemptions: number | null;
|
|
886
|
+
/** Per-billing-account redemption cap. */
|
|
887
|
+
maxRedemptionsPerBillingAccount: number;
|
|
888
|
+
/** Duration type: one_time / repeating_months / forever. */
|
|
889
|
+
durationType: string;
|
|
890
|
+
/**
|
|
891
|
+
* Months the discount repeats; set iff durationType = repeating_months.
|
|
892
|
+
* @nullable
|
|
893
|
+
*/
|
|
894
|
+
durationInMonths: number | null;
|
|
895
|
+
/** @nullable */
|
|
896
|
+
createdFrom: string | null;
|
|
897
|
+
/** Lifecycle status (draft / pending_approval / active / archived). */
|
|
898
|
+
lifecycleStatus: string;
|
|
899
|
+
createdAt: string;
|
|
900
|
+
updatedAt: string;
|
|
901
|
+
}
|
|
902
|
+
export interface CouponBenefitDto {
|
|
903
|
+
couponBenefitId: string;
|
|
904
|
+
couponId: string;
|
|
905
|
+
tenantId: string;
|
|
906
|
+
/** @nullable */
|
|
907
|
+
articleId: string | null;
|
|
908
|
+
/** @nullable */
|
|
909
|
+
articleCategory: string | null;
|
|
910
|
+
/** percentage / fixed_amount / replacement_price / grant_account_credit. */
|
|
911
|
+
benefitType: string;
|
|
912
|
+
/** @nullable */
|
|
913
|
+
discountPercentBps: number | null;
|
|
914
|
+
/** @nullable */
|
|
915
|
+
discountAmountMinor: number | null;
|
|
916
|
+
/** @nullable */
|
|
917
|
+
replacementPriceMinor: number | null;
|
|
918
|
+
/** @nullable */
|
|
919
|
+
grantCreditAmountMinor: number | null;
|
|
920
|
+
/** @nullable */
|
|
921
|
+
maxDiscountMinor: number | null;
|
|
922
|
+
/** @nullable */
|
|
923
|
+
currencyCode: string | null;
|
|
924
|
+
/** Application priority (lower applies first). */
|
|
925
|
+
priority: number;
|
|
926
|
+
createdAt: string;
|
|
927
|
+
}
|
|
928
|
+
export interface CouponDetailDto {
|
|
929
|
+
couponId: string;
|
|
930
|
+
tenantId: string;
|
|
931
|
+
code: string;
|
|
932
|
+
/** @nullable */
|
|
933
|
+
name: string | null;
|
|
934
|
+
/** @nullable */
|
|
935
|
+
description: string | null;
|
|
936
|
+
isActive: boolean;
|
|
937
|
+
/** @nullable */
|
|
938
|
+
startsAt: string | null;
|
|
939
|
+
/** @nullable */
|
|
940
|
+
expiresAt: string | null;
|
|
941
|
+
onlyNewCustomers: boolean;
|
|
942
|
+
/**
|
|
943
|
+
* Total redemption cap; null = unlimited.
|
|
944
|
+
* @nullable
|
|
945
|
+
*/
|
|
946
|
+
maxTotalRedemptions: number | null;
|
|
947
|
+
/** Per-billing-account redemption cap. */
|
|
948
|
+
maxRedemptionsPerBillingAccount: number;
|
|
949
|
+
/** Duration type: one_time / repeating_months / forever. */
|
|
950
|
+
durationType: string;
|
|
951
|
+
/**
|
|
952
|
+
* Months the discount repeats; set iff durationType = repeating_months.
|
|
953
|
+
* @nullable
|
|
954
|
+
*/
|
|
955
|
+
durationInMonths: number | null;
|
|
956
|
+
/** @nullable */
|
|
957
|
+
createdFrom: string | null;
|
|
958
|
+
/** Lifecycle status (draft / pending_approval / active / archived). */
|
|
959
|
+
lifecycleStatus: string;
|
|
960
|
+
createdAt: string;
|
|
961
|
+
updatedAt: string;
|
|
962
|
+
/** The coupon's benefits. */
|
|
963
|
+
benefits: CouponBenefitDto[];
|
|
964
|
+
}
|
|
965
|
+
export type CreateCouponDtoDurationType = typeof CreateCouponDtoDurationType[keyof typeof CreateCouponDtoDurationType];
|
|
966
|
+
export declare const CreateCouponDtoDurationType: {
|
|
967
|
+
readonly one_time: "one_time";
|
|
968
|
+
readonly repeating_months: "repeating_months";
|
|
969
|
+
readonly forever: "forever";
|
|
970
|
+
};
|
|
971
|
+
export type CreateCouponDtoCreatedFrom = typeof CreateCouponDtoCreatedFrom[keyof typeof CreateCouponDtoCreatedFrom];
|
|
972
|
+
export declare const CreateCouponDtoCreatedFrom: {
|
|
973
|
+
readonly sales_order: "sales_order";
|
|
974
|
+
readonly manual: "manual";
|
|
975
|
+
readonly migration: "migration";
|
|
976
|
+
};
|
|
977
|
+
export interface CreateCouponDto {
|
|
978
|
+
/** Unique coupon code within the tenant. */
|
|
979
|
+
code: string;
|
|
980
|
+
name?: string;
|
|
981
|
+
description?: string;
|
|
982
|
+
/** Whether the coupon is active (default true). */
|
|
983
|
+
isActive?: boolean;
|
|
984
|
+
startsAt?: string;
|
|
985
|
+
expiresAt?: string;
|
|
986
|
+
/** Restrict to new customers only (default false). */
|
|
987
|
+
onlyNewCustomers?: boolean;
|
|
988
|
+
/** Total redemption cap across all accounts; omit for unlimited. */
|
|
989
|
+
maxTotalRedemptions?: number;
|
|
990
|
+
/** Per-billing-account redemption cap (default 1). */
|
|
991
|
+
maxRedemptionsPerBillingAccount?: number;
|
|
992
|
+
durationType: CreateCouponDtoDurationType;
|
|
993
|
+
/** Number of months the discount repeats. Required iff durationType = repeating_months. */
|
|
994
|
+
durationInMonths?: number;
|
|
995
|
+
createdFrom?: CreateCouponDtoCreatedFrom;
|
|
996
|
+
/** Optional free-text note. */
|
|
997
|
+
comment?: string;
|
|
998
|
+
changeReason?: string;
|
|
999
|
+
}
|
|
1000
|
+
export type CreateCouponBenefitDtoBenefitType = typeof CreateCouponBenefitDtoBenefitType[keyof typeof CreateCouponBenefitDtoBenefitType];
|
|
1001
|
+
export declare const CreateCouponBenefitDtoBenefitType: {
|
|
1002
|
+
readonly percentage: "percentage";
|
|
1003
|
+
readonly fixed_amount: "fixed_amount";
|
|
1004
|
+
readonly replacement_price: "replacement_price";
|
|
1005
|
+
readonly grant_account_credit: "grant_account_credit";
|
|
1006
|
+
};
|
|
1007
|
+
export interface CreateCouponBenefitDto {
|
|
1008
|
+
benefitType: CreateCouponBenefitDtoBenefitType;
|
|
1009
|
+
/** Target article. Required (with or instead of articleCategory) for discount-style benefits. */
|
|
1010
|
+
articleId?: string;
|
|
1011
|
+
/** Target article category. Alternative to articleId for discount-style benefits. */
|
|
1012
|
+
articleCategory?: string;
|
|
1013
|
+
/** Discount in basis points (1000 = 10.00%). Required iff benefitType = percentage. */
|
|
1014
|
+
discountPercentBps?: number;
|
|
1015
|
+
/** Fixed discount in minor units. Required iff benefitType = fixed_amount. */
|
|
1016
|
+
discountAmountMinor?: number;
|
|
1017
|
+
/** Replacement price in minor units. Required iff benefitType = replacement_price. */
|
|
1018
|
+
replacementPriceMinor?: number;
|
|
1019
|
+
/** Credit amount in minor units to grant on redemption. Required iff benefitType = grant_account_credit. */
|
|
1020
|
+
grantCreditAmountMinor?: number;
|
|
1021
|
+
/** Money cap on a percentage discount (minor units). Forces currencyCode to be set. */
|
|
1022
|
+
maxDiscountMinor?: number;
|
|
1023
|
+
/** ISO 4217 currency code. Required for fixed_amount/replacement_price/grant_account_credit and for a capped percentage; omitted for an uncapped percentage. */
|
|
1024
|
+
currencyCode?: string;
|
|
1025
|
+
/** Application priority (lower applies first); default 100. */
|
|
1026
|
+
priority?: number;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Redemption source (default manual).
|
|
1030
|
+
*/
|
|
1031
|
+
export type RedeemCouponDtoSource = typeof RedeemCouponDtoSource[keyof typeof RedeemCouponDtoSource];
|
|
1032
|
+
export declare const RedeemCouponDtoSource: {
|
|
1033
|
+
readonly manual: "manual";
|
|
1034
|
+
readonly checkout: "checkout";
|
|
1035
|
+
readonly sales_order: "sales_order";
|
|
1036
|
+
readonly migration: "migration";
|
|
1037
|
+
};
|
|
1038
|
+
export interface RedeemCouponDto {
|
|
1039
|
+
/** Billing account to redeem the coupon for. */
|
|
1040
|
+
billingAccountId: string;
|
|
1041
|
+
/** Redemption source (default manual). */
|
|
1042
|
+
source?: RedeemCouponDtoSource;
|
|
1043
|
+
/** Optional free-text note. */
|
|
1044
|
+
comment?: string;
|
|
1045
|
+
}
|
|
1046
|
+
export interface CouponRedemptionDto {
|
|
1047
|
+
couponRedemptionId: string;
|
|
1048
|
+
tenantId: string;
|
|
1049
|
+
organizationId: string;
|
|
1050
|
+
couponId: string;
|
|
1051
|
+
billingAccountId: string;
|
|
1052
|
+
/** @nullable */
|
|
1053
|
+
invoiceId: string | null;
|
|
1054
|
+
redeemedAt: string;
|
|
1055
|
+
/** Date the discount starts applying. */
|
|
1056
|
+
appliesFrom: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* Date the discount stops applying; null = forever.
|
|
1059
|
+
* @nullable
|
|
1060
|
+
*/
|
|
1061
|
+
appliesUntil: string | null;
|
|
1062
|
+
/** Redemption source (manual / checkout / sales_order / migration). */
|
|
1063
|
+
source: string;
|
|
1064
|
+
/** Status (active / consumed / expired / cancelled). */
|
|
1065
|
+
status: string;
|
|
1066
|
+
createdAt: string;
|
|
1067
|
+
}
|
|
1068
|
+
export interface StripeWebhookAckDto {
|
|
1069
|
+
/** Always true once the event was accepted. */
|
|
1070
|
+
received: boolean;
|
|
1071
|
+
/** True when this event was already received (idempotent no-op). Still a 200. */
|
|
1072
|
+
duplicate?: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
export type IntegrationsControllerGetByIdV1200 = StripeAccountDto | FortnoxAccountDto;
|
|
1075
|
+
export type BillingAccountsControllerListAccountsV1Params = {
|
|
1076
|
+
/**
|
|
1077
|
+
* Max rows to return (1–100).
|
|
1078
|
+
* @minimum 1
|
|
1079
|
+
* @maximum 100
|
|
1080
|
+
*/
|
|
1081
|
+
limit?: number;
|
|
1082
|
+
/**
|
|
1083
|
+
* Rows to skip.
|
|
1084
|
+
* @minimum 0
|
|
1085
|
+
*/
|
|
1086
|
+
offset?: number;
|
|
1087
|
+
};
|
|
1088
|
+
export type InvoicesControllerListInvoicesV1Params = {
|
|
1089
|
+
/**
|
|
1090
|
+
* Max rows to return (1–100).
|
|
1091
|
+
* @minimum 1
|
|
1092
|
+
* @maximum 100
|
|
1093
|
+
*/
|
|
1094
|
+
limit?: number;
|
|
1095
|
+
/**
|
|
1096
|
+
* Rows to skip.
|
|
1097
|
+
* @minimum 0
|
|
1098
|
+
*/
|
|
1099
|
+
offset?: number;
|
|
1100
|
+
/**
|
|
1101
|
+
* Filter invoices by status.
|
|
1102
|
+
*/
|
|
1103
|
+
status?: InvoicesControllerListInvoicesV1Status;
|
|
1104
|
+
};
|
|
1105
|
+
export type InvoicesControllerListInvoicesV1Status = typeof InvoicesControllerListInvoicesV1Status[keyof typeof InvoicesControllerListInvoicesV1Status];
|
|
1106
|
+
export declare const InvoicesControllerListInvoicesV1Status: {
|
|
1107
|
+
readonly CREATED: "CREATED";
|
|
1108
|
+
readonly READY: "READY";
|
|
1109
|
+
readonly SENT: "SENT";
|
|
1110
|
+
readonly PARTIALLY_PAID: "PARTIALLY_PAID";
|
|
1111
|
+
readonly PAID: "PAID";
|
|
1112
|
+
readonly OVERDUE: "OVERDUE";
|
|
1113
|
+
readonly CANCELLED: "CANCELLED";
|
|
1114
|
+
readonly WRITTEN_OFF: "WRITTEN_OFF";
|
|
1115
|
+
};
|
|
1116
|
+
export type ArticlesControllerListArticlesV1Params = {
|
|
1117
|
+
/**
|
|
1118
|
+
* Max rows to return (1–100).
|
|
1119
|
+
* @minimum 1
|
|
1120
|
+
* @maximum 100
|
|
1121
|
+
*/
|
|
1122
|
+
limit?: number;
|
|
1123
|
+
/**
|
|
1124
|
+
* Rows to skip.
|
|
1125
|
+
* @minimum 0
|
|
1126
|
+
*/
|
|
1127
|
+
offset?: number;
|
|
1128
|
+
};
|
|
1129
|
+
export type PriceListsControllerListPriceListsV1Params = {
|
|
1130
|
+
/**
|
|
1131
|
+
* Max rows to return (1–100).
|
|
1132
|
+
* @minimum 1
|
|
1133
|
+
* @maximum 100
|
|
1134
|
+
*/
|
|
1135
|
+
limit?: number;
|
|
1136
|
+
/**
|
|
1137
|
+
* Rows to skip.
|
|
1138
|
+
* @minimum 0
|
|
1139
|
+
*/
|
|
1140
|
+
offset?: number;
|
|
1141
|
+
};
|
|
1142
|
+
export type PriceListsControllerGetPriceListItemsV1Params = {
|
|
1143
|
+
/**
|
|
1144
|
+
* Max rows to return (1–100).
|
|
1145
|
+
* @minimum 1
|
|
1146
|
+
* @maximum 100
|
|
1147
|
+
*/
|
|
1148
|
+
limit?: number;
|
|
1149
|
+
/**
|
|
1150
|
+
* Rows to skip.
|
|
1151
|
+
* @minimum 0
|
|
1152
|
+
*/
|
|
1153
|
+
offset?: number;
|
|
1154
|
+
};
|
|
1155
|
+
export type DiscountRulesControllerListDiscountRulesV1Params = {
|
|
1156
|
+
/**
|
|
1157
|
+
* Max rows to return (1–100).
|
|
1158
|
+
* @minimum 1
|
|
1159
|
+
* @maximum 100
|
|
1160
|
+
*/
|
|
1161
|
+
limit?: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Rows to skip.
|
|
1164
|
+
* @minimum 0
|
|
1165
|
+
*/
|
|
1166
|
+
offset?: number;
|
|
1167
|
+
};
|
|
1168
|
+
export type BindingPlansControllerListBindingPlansV1Params = {
|
|
1169
|
+
/**
|
|
1170
|
+
* Max rows to return (1–100).
|
|
1171
|
+
* @minimum 1
|
|
1172
|
+
* @maximum 100
|
|
1173
|
+
*/
|
|
1174
|
+
limit?: number;
|
|
1175
|
+
/**
|
|
1176
|
+
* Rows to skip.
|
|
1177
|
+
* @minimum 0
|
|
1178
|
+
*/
|
|
1179
|
+
offset?: number;
|
|
1180
|
+
};
|
|
1181
|
+
export type AccountCreditsControllerListAccountCreditsV1Params = {
|
|
1182
|
+
/**
|
|
1183
|
+
* Max rows to return (1–100).
|
|
1184
|
+
* @minimum 1
|
|
1185
|
+
* @maximum 100
|
|
1186
|
+
*/
|
|
1187
|
+
limit?: number;
|
|
1188
|
+
/**
|
|
1189
|
+
* Rows to skip.
|
|
1190
|
+
* @minimum 0
|
|
1191
|
+
*/
|
|
1192
|
+
offset?: number;
|
|
1193
|
+
/**
|
|
1194
|
+
* Restrict the list to one billing account's credits.
|
|
1195
|
+
*/
|
|
1196
|
+
billingAccountId?: string;
|
|
1197
|
+
};
|
|
1198
|
+
export type AccountCreditsControllerListApplicationsV1Params = {
|
|
1199
|
+
/**
|
|
1200
|
+
* Max rows to return (1–100).
|
|
1201
|
+
* @minimum 1
|
|
1202
|
+
* @maximum 100
|
|
1203
|
+
*/
|
|
1204
|
+
limit?: number;
|
|
1205
|
+
/**
|
|
1206
|
+
* Rows to skip.
|
|
1207
|
+
* @minimum 0
|
|
1208
|
+
*/
|
|
1209
|
+
offset?: number;
|
|
1210
|
+
};
|
|
1211
|
+
export type CouponsControllerListCouponsV1Params = {
|
|
1212
|
+
/**
|
|
1213
|
+
* Max rows to return (1–100).
|
|
1214
|
+
* @minimum 1
|
|
1215
|
+
* @maximum 100
|
|
1216
|
+
*/
|
|
1217
|
+
limit?: number;
|
|
1218
|
+
/**
|
|
1219
|
+
* Rows to skip.
|
|
1220
|
+
* @minimum 0
|
|
1221
|
+
*/
|
|
1222
|
+
offset?: number;
|
|
1223
|
+
};
|
|
1224
|
+
export type CouponsControllerListRedemptionsV1Params = {
|
|
1225
|
+
/**
|
|
1226
|
+
* Max rows to return (1–100).
|
|
1227
|
+
* @minimum 1
|
|
1228
|
+
* @maximum 100
|
|
1229
|
+
*/
|
|
1230
|
+
limit?: number;
|
|
1231
|
+
/**
|
|
1232
|
+
* Rows to skip.
|
|
1233
|
+
* @minimum 0
|
|
1234
|
+
*/
|
|
1235
|
+
offset?: number;
|
|
1236
|
+
/**
|
|
1237
|
+
* Restrict the list to one billing account's redemptions.
|
|
1238
|
+
*/
|
|
1239
|
+
billingAccountId?: string;
|
|
1240
|
+
};
|
|
69
1241
|
//# sourceMappingURL=index.schemas.d.ts.map
|