@vindentech/api-client 0.3.0-next.0 → 0.3.0-next.2
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 +40 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +26 -5
- package/dist/client.js.map +1 -1
- package/dist/generated/_all.d.ts +19 -0
- package/dist/generated/_all.d.ts.map +1 -0
- package/dist/generated/_all.js +21 -0
- package/dist/generated/_all.js.map +1 -0
- 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/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/index.schemas.d.ts +587 -1
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +57 -0
- package/dist/generated/index.schemas.js.map +1 -1
- package/dist/generated/invoices/invoices.d.ts +74 -1
- package/dist/generated/invoices/invoices.d.ts.map +1 -1
- package/dist/generated/invoices/invoices.js +50 -0
- package/dist/generated/invoices/invoices.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Vinden Core API
|
|
5
|
+
* Core API for the Vinden Platform
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { CreateDiscountRuleDto, DiscountRuleDto, DiscountRulesControllerListDiscountRulesV1Params } from '../index.schemas.js';
|
|
9
|
+
/**
|
|
10
|
+
* @summary List discount rules (tenant-level configuration)
|
|
11
|
+
*/
|
|
12
|
+
export type discountRulesControllerListDiscountRulesV1Response200 = {
|
|
13
|
+
data: DiscountRuleDto[];
|
|
14
|
+
status: 200;
|
|
15
|
+
};
|
|
16
|
+
export type discountRulesControllerListDiscountRulesV1ResponseSuccess = (discountRulesControllerListDiscountRulesV1Response200) & {
|
|
17
|
+
headers: Headers;
|
|
18
|
+
};
|
|
19
|
+
export type discountRulesControllerListDiscountRulesV1Response = (discountRulesControllerListDiscountRulesV1ResponseSuccess);
|
|
20
|
+
export declare const getDiscountRulesControllerListDiscountRulesV1Url: (params?: DiscountRulesControllerListDiscountRulesV1Params) => string;
|
|
21
|
+
export declare const discountRulesControllerListDiscountRulesV1: (params?: DiscountRulesControllerListDiscountRulesV1Params, options?: RequestInit) => Promise<discountRulesControllerListDiscountRulesV1Response>;
|
|
22
|
+
/**
|
|
23
|
+
* @summary Create a discount rule (created as draft)
|
|
24
|
+
*/
|
|
25
|
+
export type discountRulesControllerCreateDiscountRuleV1Response201 = {
|
|
26
|
+
data: DiscountRuleDto;
|
|
27
|
+
status: 201;
|
|
28
|
+
};
|
|
29
|
+
export type discountRulesControllerCreateDiscountRuleV1ResponseSuccess = (discountRulesControllerCreateDiscountRuleV1Response201) & {
|
|
30
|
+
headers: Headers;
|
|
31
|
+
};
|
|
32
|
+
export type discountRulesControllerCreateDiscountRuleV1Response = (discountRulesControllerCreateDiscountRuleV1ResponseSuccess);
|
|
33
|
+
export declare const getDiscountRulesControllerCreateDiscountRuleV1Url: () => string;
|
|
34
|
+
export declare const discountRulesControllerCreateDiscountRuleV1: (createDiscountRuleDto: CreateDiscountRuleDto, options?: RequestInit) => Promise<discountRulesControllerCreateDiscountRuleV1Response>;
|
|
35
|
+
//# sourceMappingURL=discount-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-rules.d.ts","sourceRoot":"","sources":["../../../src/generated/discount-rules/discount-rules.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,gDAAgD,EACjD,MAAM,qBAAqB,CAAC;AAI7B;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG;IAClE,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,yDAAyD,GAAG,CAAC,qDAAqD,CAAC,GAAG;IAChI,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,MAAM,MAAM,kDAAkD,GAAG,CAAC,yDAAyD,CAAC,CAAA;AAE5H,eAAO,MAAM,gDAAgD,GAAI,SAAS,gDAAgD,WAazH,CAAA;AAED,eAAO,MAAM,0CAA0C,GAAU,SAAS,gDAAgD,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,kDAAkD,CAS3M,CAAA;AAGH;;GAEG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,eAAe,CAAA;IACrB,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,0DAA0D,GAAG,CAAC,sDAAsD,CAAC,GAAG;IAClI,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,MAAM,MAAM,mDAAmD,GAAG,CAAC,0DAA0D,CAAC,CAAA;AAE9H,eAAO,MAAM,iDAAiD,cAM7D,CAAA;AAED,eAAO,MAAM,2CAA2C,GAAU,uBAAuB,qBAAqB,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,mDAAmD,CAUhM,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { customFetch } from '../../mutator.js';
|
|
2
|
+
;
|
|
3
|
+
export const getDiscountRulesControllerListDiscountRulesV1Url = (params) => {
|
|
4
|
+
const normalizedParams = new URLSearchParams();
|
|
5
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
6
|
+
if (value !== undefined) {
|
|
7
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const stringifiedParams = normalizedParams.toString();
|
|
11
|
+
return stringifiedParams.length > 0 ? `/v1/billing/discount-rules?${stringifiedParams}` : `/v1/billing/discount-rules`;
|
|
12
|
+
};
|
|
13
|
+
export const discountRulesControllerListDiscountRulesV1 = async (params, options) => {
|
|
14
|
+
return customFetch(getDiscountRulesControllerListDiscountRulesV1Url(params), {
|
|
15
|
+
...options,
|
|
16
|
+
method: 'GET'
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
;
|
|
20
|
+
export const getDiscountRulesControllerCreateDiscountRuleV1Url = () => {
|
|
21
|
+
return `/v1/billing/discount-rules`;
|
|
22
|
+
};
|
|
23
|
+
export const discountRulesControllerCreateDiscountRuleV1 = async (createDiscountRuleDto, options) => {
|
|
24
|
+
return customFetch(getDiscountRulesControllerCreateDiscountRuleV1Url(), {
|
|
25
|
+
...options,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
28
|
+
body: JSON.stringify(createDiscountRuleDto)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=discount-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-rules.js","sourceRoot":"","sources":["../../../src/generated/discount-rules/discount-rules.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAa/C,CAAC;AAID,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAAC,MAAyD,EAAG,EAAE;IAC7H,MAAM,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/C,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAEpD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC1E,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,QAAQ,EAAE,CAAC;IAEtD,OAAO,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,8BAA8B,iBAAiB,EAAE,CAAC,CAAC,CAAC,4BAA4B,CAAA;AACxH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,0CAA0C,GAAG,KAAK,EAAE,MAAyD,EAAE,OAAqB,EAA+D,EAAE;IAEhN,OAAO,WAAW,CAAqD,gDAAgD,CAAC,MAAM,CAAC,EAC/H;QACE,GAAG,OAAO;QACV,MAAM,EAAE,KAAK;KAGd,CACF,CAAC;AAAA,CAAC,CAAA;AAcH,CAAC;AAID,MAAM,CAAC,MAAM,iDAAiD,GAAG,GAAG,EAAE;IAKpE,OAAO,4BAA4B,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,2CAA2C,GAAG,KAAK,EAAE,qBAA4C,EAAE,OAAqB,EAAgE,EAAE;IAErM,OAAO,WAAW,CAAsD,iDAAiD,EAAE,EAC3H;QACE,GAAG,OAAO;QACV,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QACpE,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,qBAAqB,CAAE;KAC1B,CACF,CAAC;AAAA,CAAC,CAAA"}
|
|
@@ -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,7 @@ 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
|
}
|
|
69
71
|
export interface StripeAccountDto {
|
|
@@ -349,6 +351,39 @@ export interface InvoiceDetailDto {
|
|
|
349
351
|
snapshotCorporateIdentityNumber: string | null;
|
|
350
352
|
rows: InvoiceRowDto[];
|
|
351
353
|
}
|
|
354
|
+
export interface VoidInvoiceDto {
|
|
355
|
+
/** Why the invoice is being voided (required, recorded on the row). */
|
|
356
|
+
voidReason: string;
|
|
357
|
+
}
|
|
358
|
+
export interface CreditNoteRowDto {
|
|
359
|
+
invoiceRowId: string;
|
|
360
|
+
/** Amount (excl. VAT, minor units, POSITIVE magnitude) to refund off this row. The service writes it as a negative credit-note row. */
|
|
361
|
+
refundAmountMinor: number;
|
|
362
|
+
}
|
|
363
|
+
export interface IssueCreditNoteDto {
|
|
364
|
+
/** Partial credit: the specific original rows + amounts to refund. Omit for a full credit (all rows negated). */
|
|
365
|
+
rows?: CreditNoteRowDto[];
|
|
366
|
+
/** Why the credit note is being issued (required; stored as correctionReason). */
|
|
367
|
+
reason: string;
|
|
368
|
+
}
|
|
369
|
+
export interface AdjustmentRowDto {
|
|
370
|
+
articleId: string;
|
|
371
|
+
/** Quantity (numeric, e.g. "1.0000"). */
|
|
372
|
+
quantity: string;
|
|
373
|
+
unitOfMeasureId: string;
|
|
374
|
+
/** Charge excl. VAT in minor units (POSITIVE). */
|
|
375
|
+
amountExVatMinor: number;
|
|
376
|
+
/** VAT rate (numeric, e.g. "25.0000"). */
|
|
377
|
+
vatRate: string;
|
|
378
|
+
/** @nullable */
|
|
379
|
+
freeText?: string | null;
|
|
380
|
+
}
|
|
381
|
+
export interface IssueAdjustmentDto {
|
|
382
|
+
/** The additional charge lines (≥1). */
|
|
383
|
+
rows: AdjustmentRowDto[];
|
|
384
|
+
/** Why the adjustment is being issued (required; stored as correctionReason). */
|
|
385
|
+
reason: string;
|
|
386
|
+
}
|
|
352
387
|
export interface ArticleDto {
|
|
353
388
|
articleId: string;
|
|
354
389
|
/** @nullable */
|
|
@@ -611,6 +646,458 @@ export interface SwitchTenantConfigProvidersDto {
|
|
|
611
646
|
defaultAccountingProvider?: SwitchTenantConfigProvidersDtoDefaultAccountingProvider;
|
|
612
647
|
defaultPaymentProvider?: SwitchTenantConfigProvidersDtoDefaultPaymentProvider;
|
|
613
648
|
}
|
|
649
|
+
/**
|
|
650
|
+
* Optional JSON conditions (e.g. {first_invoice:true}).
|
|
651
|
+
* @nullable
|
|
652
|
+
*/
|
|
653
|
+
export type DiscountRuleDtoConditions = {
|
|
654
|
+
[key: string]: unknown;
|
|
655
|
+
} | null;
|
|
656
|
+
export interface DiscountRuleDto {
|
|
657
|
+
discountRuleId: string;
|
|
658
|
+
tenantId: string;
|
|
659
|
+
/**
|
|
660
|
+
* Target organization, or null for tenant-wide.
|
|
661
|
+
* @nullable
|
|
662
|
+
*/
|
|
663
|
+
organizationId: string | null;
|
|
664
|
+
/**
|
|
665
|
+
* Target billing account, or null when not account-specific.
|
|
666
|
+
* @nullable
|
|
667
|
+
*/
|
|
668
|
+
billingAccountId: string | null;
|
|
669
|
+
/**
|
|
670
|
+
* Target price list, or null for any list.
|
|
671
|
+
* @nullable
|
|
672
|
+
*/
|
|
673
|
+
priceListId: string | null;
|
|
674
|
+
/**
|
|
675
|
+
* Target article, or null for any article.
|
|
676
|
+
* @nullable
|
|
677
|
+
*/
|
|
678
|
+
articleId: string | null;
|
|
679
|
+
/**
|
|
680
|
+
* Target binding plan, or null for any binding.
|
|
681
|
+
* @nullable
|
|
682
|
+
*/
|
|
683
|
+
bindingPlanId: string | null;
|
|
684
|
+
/** Rule type: binding_period / campaign / contract / start_fee_waiver / volume_tier / seasonal / account_specific. */
|
|
685
|
+
ruleType: string;
|
|
686
|
+
/** Discount type: percentage / fixed_amount / replacement_price. */
|
|
687
|
+
discountType: string;
|
|
688
|
+
/**
|
|
689
|
+
* Discount in basis points (1000 = 10.00%); set for percentage.
|
|
690
|
+
* @nullable
|
|
691
|
+
*/
|
|
692
|
+
discountPercentBps: number | null;
|
|
693
|
+
/**
|
|
694
|
+
* Fixed discount in minor units; set for fixed_amount.
|
|
695
|
+
* @nullable
|
|
696
|
+
*/
|
|
697
|
+
discountAmountMinor: number | null;
|
|
698
|
+
/**
|
|
699
|
+
* Replacement price in minor units; set for replacement_price.
|
|
700
|
+
* @nullable
|
|
701
|
+
*/
|
|
702
|
+
replacementPriceMinor: number | null;
|
|
703
|
+
/**
|
|
704
|
+
* ISO 4217 currency code; set for money discounts, null otherwise.
|
|
705
|
+
* @nullable
|
|
706
|
+
*/
|
|
707
|
+
currencyCode: string | null;
|
|
708
|
+
/**
|
|
709
|
+
* Optional JSON conditions (e.g. {first_invoice:true}).
|
|
710
|
+
* @nullable
|
|
711
|
+
*/
|
|
712
|
+
conditions: DiscountRuleDtoConditions;
|
|
713
|
+
/** Application priority (lower applies first). */
|
|
714
|
+
priority: number;
|
|
715
|
+
/** Whether the rule stacks with other discounts. */
|
|
716
|
+
stackable: boolean;
|
|
717
|
+
effectiveFrom: string;
|
|
718
|
+
/** @nullable */
|
|
719
|
+
effectiveUntil: string | null;
|
|
720
|
+
isActive: boolean;
|
|
721
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
722
|
+
lifecycleStatus: string;
|
|
723
|
+
createdAt: string;
|
|
724
|
+
updatedAt: string;
|
|
725
|
+
}
|
|
726
|
+
export type CreateDiscountRuleDtoRuleType = typeof CreateDiscountRuleDtoRuleType[keyof typeof CreateDiscountRuleDtoRuleType];
|
|
727
|
+
export declare const CreateDiscountRuleDtoRuleType: {
|
|
728
|
+
readonly binding_period: "binding_period";
|
|
729
|
+
readonly campaign: "campaign";
|
|
730
|
+
readonly contract: "contract";
|
|
731
|
+
readonly start_fee_waiver: "start_fee_waiver";
|
|
732
|
+
readonly volume_tier: "volume_tier";
|
|
733
|
+
readonly seasonal: "seasonal";
|
|
734
|
+
readonly account_specific: "account_specific";
|
|
735
|
+
};
|
|
736
|
+
export type CreateDiscountRuleDtoDiscountType = typeof CreateDiscountRuleDtoDiscountType[keyof typeof CreateDiscountRuleDtoDiscountType];
|
|
737
|
+
export declare const CreateDiscountRuleDtoDiscountType: {
|
|
738
|
+
readonly percentage: "percentage";
|
|
739
|
+
readonly fixed_amount: "fixed_amount";
|
|
740
|
+
readonly replacement_price: "replacement_price";
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* Optional JSON conditions.
|
|
744
|
+
*/
|
|
745
|
+
export type CreateDiscountRuleDtoConditions = {
|
|
746
|
+
[key: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
export interface CreateDiscountRuleDto {
|
|
749
|
+
ruleType: CreateDiscountRuleDtoRuleType;
|
|
750
|
+
discountType: CreateDiscountRuleDtoDiscountType;
|
|
751
|
+
/** Discount in basis points (1000 = 10.00%). Required iff discountType = percentage. */
|
|
752
|
+
discountPercentBps?: number;
|
|
753
|
+
/** Fixed discount in minor units. Required iff discountType = fixed_amount. */
|
|
754
|
+
discountAmountMinor?: number;
|
|
755
|
+
/** Replacement price in minor units. Required iff discountType = replacement_price. */
|
|
756
|
+
replacementPriceMinor?: number;
|
|
757
|
+
/** ISO 4217 currency code. Required for fixed_amount/replacement_price, omitted for percentage. */
|
|
758
|
+
currencyCode?: string;
|
|
759
|
+
organizationId?: string;
|
|
760
|
+
billingAccountId?: string;
|
|
761
|
+
priceListId?: string;
|
|
762
|
+
articleId?: string;
|
|
763
|
+
bindingPlanId?: string;
|
|
764
|
+
/** Optional JSON conditions. */
|
|
765
|
+
conditions?: CreateDiscountRuleDtoConditions;
|
|
766
|
+
/** Application priority (lower applies first). */
|
|
767
|
+
priority?: number;
|
|
768
|
+
stackable?: boolean;
|
|
769
|
+
effectiveFrom: string;
|
|
770
|
+
effectiveUntil?: string;
|
|
771
|
+
changeReason?: string;
|
|
772
|
+
}
|
|
773
|
+
export interface BindingPlanDto {
|
|
774
|
+
bindingPlanId: string;
|
|
775
|
+
tenantId: string;
|
|
776
|
+
code: string;
|
|
777
|
+
displayName: string;
|
|
778
|
+
/**
|
|
779
|
+
* Binding duration in months; null or 0 = flexible / no binding.
|
|
780
|
+
* @nullable
|
|
781
|
+
*/
|
|
782
|
+
durationMonths: number | null;
|
|
783
|
+
/** Whether the binding discount persists after the binding ends. */
|
|
784
|
+
discountPersistsAfterBinding: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* Post-binding discount mode (frozen_at_signed_rate / floats_with_current_rule) or null.
|
|
787
|
+
* @nullable
|
|
788
|
+
*/
|
|
789
|
+
persistentDiscountMode: string | null;
|
|
790
|
+
isDefault: boolean;
|
|
791
|
+
isActive: boolean;
|
|
792
|
+
/** Lifecycle status (draft / approved / ...). */
|
|
793
|
+
lifecycleStatus: string;
|
|
794
|
+
createdAt: string;
|
|
795
|
+
updatedAt: string;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Required when discountPersistsAfterBinding is true; omitted otherwise.
|
|
799
|
+
*/
|
|
800
|
+
export type CreateBindingPlanDtoPersistentDiscountMode = typeof CreateBindingPlanDtoPersistentDiscountMode[keyof typeof CreateBindingPlanDtoPersistentDiscountMode];
|
|
801
|
+
export declare const CreateBindingPlanDtoPersistentDiscountMode: {
|
|
802
|
+
readonly frozen_at_signed_rate: "frozen_at_signed_rate";
|
|
803
|
+
readonly floats_with_current_rule: "floats_with_current_rule";
|
|
804
|
+
};
|
|
805
|
+
export interface CreateBindingPlanDto {
|
|
806
|
+
code: string;
|
|
807
|
+
displayName: string;
|
|
808
|
+
/** Binding duration in months (0 = flexible / no binding). */
|
|
809
|
+
durationMonths?: number;
|
|
810
|
+
discountPersistsAfterBinding?: boolean;
|
|
811
|
+
/** Required when discountPersistsAfterBinding is true; omitted otherwise. */
|
|
812
|
+
persistentDiscountMode?: CreateBindingPlanDtoPersistentDiscountMode;
|
|
813
|
+
isDefault?: boolean;
|
|
814
|
+
changeReason?: string;
|
|
815
|
+
}
|
|
816
|
+
export interface AccountCreditDto {
|
|
817
|
+
accountCreditId: string;
|
|
818
|
+
tenantId: string;
|
|
819
|
+
organizationId: string;
|
|
820
|
+
billingAccountId: string;
|
|
821
|
+
/** Origin: signup_campaign / referral / manual / migration / sales_order / coupon_redemption / credit_note. */
|
|
822
|
+
source: string;
|
|
823
|
+
/**
|
|
824
|
+
* Free-text reference to the originating entity.
|
|
825
|
+
* @nullable
|
|
826
|
+
*/
|
|
827
|
+
sourceId: string | null;
|
|
828
|
+
/** Granted amount in minor units. */
|
|
829
|
+
originalAmountMinor: number;
|
|
830
|
+
/** Unspent balance in minor units (maintained by the consumption flow). */
|
|
831
|
+
remainingAmountMinor: number;
|
|
832
|
+
/** ISO 4217 currency code. */
|
|
833
|
+
currencyCode: string;
|
|
834
|
+
/**
|
|
835
|
+
* Restricting article, or null for any.
|
|
836
|
+
* @nullable
|
|
837
|
+
*/
|
|
838
|
+
appliesToArticleId: string | null;
|
|
839
|
+
/**
|
|
840
|
+
* Restricting article category, or null for any.
|
|
841
|
+
* @nullable
|
|
842
|
+
*/
|
|
843
|
+
appliesToArticleCategory: string | null;
|
|
844
|
+
/** @nullable */
|
|
845
|
+
startsAt: string | null;
|
|
846
|
+
/** @nullable */
|
|
847
|
+
expiresAt: string | null;
|
|
848
|
+
/** Status: active / consumed / expired / cancelled. */
|
|
849
|
+
status: string;
|
|
850
|
+
/** @nullable */
|
|
851
|
+
comment: string | null;
|
|
852
|
+
createdAt: string;
|
|
853
|
+
updatedAt: string;
|
|
854
|
+
}
|
|
855
|
+
export interface AccountCreditApplicationDto {
|
|
856
|
+
accountCreditApplicationId: string;
|
|
857
|
+
tenantId: string;
|
|
858
|
+
organizationId: string;
|
|
859
|
+
accountCreditId: string;
|
|
860
|
+
billingAccountId: string;
|
|
861
|
+
/** @nullable */
|
|
862
|
+
invoiceId: string | null;
|
|
863
|
+
/** @nullable */
|
|
864
|
+
invoiceRowId: string | null;
|
|
865
|
+
/** @nullable */
|
|
866
|
+
invoiceBasisRowId: string | null;
|
|
867
|
+
/** Amount drawn from the credit in minor units (>0). */
|
|
868
|
+
appliedAmountMinor: number;
|
|
869
|
+
appliedAt: string;
|
|
870
|
+
}
|
|
871
|
+
export type CreateAccountCreditDtoSource = typeof CreateAccountCreditDtoSource[keyof typeof CreateAccountCreditDtoSource];
|
|
872
|
+
export declare const CreateAccountCreditDtoSource: {
|
|
873
|
+
readonly signup_campaign: "signup_campaign";
|
|
874
|
+
readonly referral: "referral";
|
|
875
|
+
readonly manual: "manual";
|
|
876
|
+
readonly migration: "migration";
|
|
877
|
+
readonly sales_order: "sales_order";
|
|
878
|
+
readonly coupon_redemption: "coupon_redemption";
|
|
879
|
+
readonly credit_note: "credit_note";
|
|
880
|
+
};
|
|
881
|
+
export interface CreateAccountCreditDto {
|
|
882
|
+
organizationId: string;
|
|
883
|
+
billingAccountId: string;
|
|
884
|
+
source: CreateAccountCreditDtoSource;
|
|
885
|
+
/** Free-text reference to the originating entity (e.g. a credit note id). */
|
|
886
|
+
sourceId?: string;
|
|
887
|
+
/** Credit amount in minor units (>0). Sets remainingAmountMinor at creation (fully unspent). */
|
|
888
|
+
originalAmountMinor: number;
|
|
889
|
+
/** ISO 4217 currency code (must match the billing account's currency). */
|
|
890
|
+
currencyCode: string;
|
|
891
|
+
/** Restrict the credit to a single article, or null for any. */
|
|
892
|
+
appliesToArticleId?: string;
|
|
893
|
+
/** Restrict the credit to an article category, or null for any. */
|
|
894
|
+
appliesToArticleCategory?: string;
|
|
895
|
+
startsAt?: string;
|
|
896
|
+
expiresAt?: string;
|
|
897
|
+
/** Optional free-text note. */
|
|
898
|
+
comment?: string;
|
|
899
|
+
}
|
|
900
|
+
export interface CouponDto {
|
|
901
|
+
couponId: string;
|
|
902
|
+
tenantId: string;
|
|
903
|
+
code: string;
|
|
904
|
+
/** @nullable */
|
|
905
|
+
name: string | null;
|
|
906
|
+
/** @nullable */
|
|
907
|
+
description: string | null;
|
|
908
|
+
isActive: boolean;
|
|
909
|
+
/** @nullable */
|
|
910
|
+
startsAt: string | null;
|
|
911
|
+
/** @nullable */
|
|
912
|
+
expiresAt: string | null;
|
|
913
|
+
onlyNewCustomers: boolean;
|
|
914
|
+
/**
|
|
915
|
+
* Total redemption cap; null = unlimited.
|
|
916
|
+
* @nullable
|
|
917
|
+
*/
|
|
918
|
+
maxTotalRedemptions: number | null;
|
|
919
|
+
/** Per-billing-account redemption cap. */
|
|
920
|
+
maxRedemptionsPerBillingAccount: number;
|
|
921
|
+
/** Duration type: one_time / repeating_months / forever. */
|
|
922
|
+
durationType: string;
|
|
923
|
+
/**
|
|
924
|
+
* Months the discount repeats; set iff durationType = repeating_months.
|
|
925
|
+
* @nullable
|
|
926
|
+
*/
|
|
927
|
+
durationInMonths: number | null;
|
|
928
|
+
/** @nullable */
|
|
929
|
+
createdFrom: string | null;
|
|
930
|
+
/** Lifecycle status (draft / pending_approval / active / archived). */
|
|
931
|
+
lifecycleStatus: string;
|
|
932
|
+
createdAt: string;
|
|
933
|
+
updatedAt: string;
|
|
934
|
+
}
|
|
935
|
+
export interface CouponBenefitDto {
|
|
936
|
+
couponBenefitId: string;
|
|
937
|
+
couponId: string;
|
|
938
|
+
tenantId: string;
|
|
939
|
+
/** @nullable */
|
|
940
|
+
articleId: string | null;
|
|
941
|
+
/** @nullable */
|
|
942
|
+
articleCategory: string | null;
|
|
943
|
+
/** percentage / fixed_amount / replacement_price / grant_account_credit. */
|
|
944
|
+
benefitType: string;
|
|
945
|
+
/** @nullable */
|
|
946
|
+
discountPercentBps: number | null;
|
|
947
|
+
/** @nullable */
|
|
948
|
+
discountAmountMinor: number | null;
|
|
949
|
+
/** @nullable */
|
|
950
|
+
replacementPriceMinor: number | null;
|
|
951
|
+
/** @nullable */
|
|
952
|
+
grantCreditAmountMinor: number | null;
|
|
953
|
+
/** @nullable */
|
|
954
|
+
maxDiscountMinor: number | null;
|
|
955
|
+
/** @nullable */
|
|
956
|
+
currencyCode: string | null;
|
|
957
|
+
/** Application priority (lower applies first). */
|
|
958
|
+
priority: number;
|
|
959
|
+
createdAt: string;
|
|
960
|
+
}
|
|
961
|
+
export interface CouponDetailDto {
|
|
962
|
+
couponId: string;
|
|
963
|
+
tenantId: string;
|
|
964
|
+
code: string;
|
|
965
|
+
/** @nullable */
|
|
966
|
+
name: string | null;
|
|
967
|
+
/** @nullable */
|
|
968
|
+
description: string | null;
|
|
969
|
+
isActive: boolean;
|
|
970
|
+
/** @nullable */
|
|
971
|
+
startsAt: string | null;
|
|
972
|
+
/** @nullable */
|
|
973
|
+
expiresAt: string | null;
|
|
974
|
+
onlyNewCustomers: boolean;
|
|
975
|
+
/**
|
|
976
|
+
* Total redemption cap; null = unlimited.
|
|
977
|
+
* @nullable
|
|
978
|
+
*/
|
|
979
|
+
maxTotalRedemptions: number | null;
|
|
980
|
+
/** Per-billing-account redemption cap. */
|
|
981
|
+
maxRedemptionsPerBillingAccount: number;
|
|
982
|
+
/** Duration type: one_time / repeating_months / forever. */
|
|
983
|
+
durationType: string;
|
|
984
|
+
/**
|
|
985
|
+
* Months the discount repeats; set iff durationType = repeating_months.
|
|
986
|
+
* @nullable
|
|
987
|
+
*/
|
|
988
|
+
durationInMonths: number | null;
|
|
989
|
+
/** @nullable */
|
|
990
|
+
createdFrom: string | null;
|
|
991
|
+
/** Lifecycle status (draft / pending_approval / active / archived). */
|
|
992
|
+
lifecycleStatus: string;
|
|
993
|
+
createdAt: string;
|
|
994
|
+
updatedAt: string;
|
|
995
|
+
/** The coupon's benefits. */
|
|
996
|
+
benefits: CouponBenefitDto[];
|
|
997
|
+
}
|
|
998
|
+
export type CreateCouponDtoDurationType = typeof CreateCouponDtoDurationType[keyof typeof CreateCouponDtoDurationType];
|
|
999
|
+
export declare const CreateCouponDtoDurationType: {
|
|
1000
|
+
readonly one_time: "one_time";
|
|
1001
|
+
readonly repeating_months: "repeating_months";
|
|
1002
|
+
readonly forever: "forever";
|
|
1003
|
+
};
|
|
1004
|
+
export type CreateCouponDtoCreatedFrom = typeof CreateCouponDtoCreatedFrom[keyof typeof CreateCouponDtoCreatedFrom];
|
|
1005
|
+
export declare const CreateCouponDtoCreatedFrom: {
|
|
1006
|
+
readonly sales_order: "sales_order";
|
|
1007
|
+
readonly manual: "manual";
|
|
1008
|
+
readonly migration: "migration";
|
|
1009
|
+
};
|
|
1010
|
+
export interface CreateCouponDto {
|
|
1011
|
+
/** Unique coupon code within the tenant. */
|
|
1012
|
+
code: string;
|
|
1013
|
+
name?: string;
|
|
1014
|
+
description?: string;
|
|
1015
|
+
/** Whether the coupon is active (default true). */
|
|
1016
|
+
isActive?: boolean;
|
|
1017
|
+
startsAt?: string;
|
|
1018
|
+
expiresAt?: string;
|
|
1019
|
+
/** Restrict to new customers only (default false). */
|
|
1020
|
+
onlyNewCustomers?: boolean;
|
|
1021
|
+
/** Total redemption cap across all accounts; omit for unlimited. */
|
|
1022
|
+
maxTotalRedemptions?: number;
|
|
1023
|
+
/** Per-billing-account redemption cap (default 1). */
|
|
1024
|
+
maxRedemptionsPerBillingAccount?: number;
|
|
1025
|
+
durationType: CreateCouponDtoDurationType;
|
|
1026
|
+
/** Number of months the discount repeats. Required iff durationType = repeating_months. */
|
|
1027
|
+
durationInMonths?: number;
|
|
1028
|
+
createdFrom?: CreateCouponDtoCreatedFrom;
|
|
1029
|
+
/** Optional free-text note. */
|
|
1030
|
+
comment?: string;
|
|
1031
|
+
changeReason?: string;
|
|
1032
|
+
}
|
|
1033
|
+
export type CreateCouponBenefitDtoBenefitType = typeof CreateCouponBenefitDtoBenefitType[keyof typeof CreateCouponBenefitDtoBenefitType];
|
|
1034
|
+
export declare const CreateCouponBenefitDtoBenefitType: {
|
|
1035
|
+
readonly percentage: "percentage";
|
|
1036
|
+
readonly fixed_amount: "fixed_amount";
|
|
1037
|
+
readonly replacement_price: "replacement_price";
|
|
1038
|
+
readonly grant_account_credit: "grant_account_credit";
|
|
1039
|
+
};
|
|
1040
|
+
export interface CreateCouponBenefitDto {
|
|
1041
|
+
benefitType: CreateCouponBenefitDtoBenefitType;
|
|
1042
|
+
/** Target article. Required (with or instead of articleCategory) for discount-style benefits. */
|
|
1043
|
+
articleId?: string;
|
|
1044
|
+
/** Target article category. Alternative to articleId for discount-style benefits. */
|
|
1045
|
+
articleCategory?: string;
|
|
1046
|
+
/** Discount in basis points (1000 = 10.00%). Required iff benefitType = percentage. */
|
|
1047
|
+
discountPercentBps?: number;
|
|
1048
|
+
/** Fixed discount in minor units. Required iff benefitType = fixed_amount. */
|
|
1049
|
+
discountAmountMinor?: number;
|
|
1050
|
+
/** Replacement price in minor units. Required iff benefitType = replacement_price. */
|
|
1051
|
+
replacementPriceMinor?: number;
|
|
1052
|
+
/** Credit amount in minor units to grant on redemption. Required iff benefitType = grant_account_credit. */
|
|
1053
|
+
grantCreditAmountMinor?: number;
|
|
1054
|
+
/** Money cap on a percentage discount (minor units). Forces currencyCode to be set. */
|
|
1055
|
+
maxDiscountMinor?: number;
|
|
1056
|
+
/** ISO 4217 currency code. Required for fixed_amount/replacement_price/grant_account_credit and for a capped percentage; omitted for an uncapped percentage. */
|
|
1057
|
+
currencyCode?: string;
|
|
1058
|
+
/** Application priority (lower applies first); default 100. */
|
|
1059
|
+
priority?: number;
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* Redemption source (default manual).
|
|
1063
|
+
*/
|
|
1064
|
+
export type RedeemCouponDtoSource = typeof RedeemCouponDtoSource[keyof typeof RedeemCouponDtoSource];
|
|
1065
|
+
export declare const RedeemCouponDtoSource: {
|
|
1066
|
+
readonly manual: "manual";
|
|
1067
|
+
readonly checkout: "checkout";
|
|
1068
|
+
readonly sales_order: "sales_order";
|
|
1069
|
+
readonly migration: "migration";
|
|
1070
|
+
};
|
|
1071
|
+
export interface RedeemCouponDto {
|
|
1072
|
+
/** Billing account to redeem the coupon for. */
|
|
1073
|
+
billingAccountId: string;
|
|
1074
|
+
/** Redemption source (default manual). */
|
|
1075
|
+
source?: RedeemCouponDtoSource;
|
|
1076
|
+
/** Optional free-text note. */
|
|
1077
|
+
comment?: string;
|
|
1078
|
+
}
|
|
1079
|
+
export interface CouponRedemptionDto {
|
|
1080
|
+
couponRedemptionId: string;
|
|
1081
|
+
tenantId: string;
|
|
1082
|
+
organizationId: string;
|
|
1083
|
+
couponId: string;
|
|
1084
|
+
billingAccountId: string;
|
|
1085
|
+
/** @nullable */
|
|
1086
|
+
invoiceId: string | null;
|
|
1087
|
+
redeemedAt: string;
|
|
1088
|
+
/** Date the discount starts applying. */
|
|
1089
|
+
appliesFrom: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* Date the discount stops applying; null = forever.
|
|
1092
|
+
* @nullable
|
|
1093
|
+
*/
|
|
1094
|
+
appliesUntil: string | null;
|
|
1095
|
+
/** Redemption source (manual / checkout / sales_order / migration). */
|
|
1096
|
+
source: string;
|
|
1097
|
+
/** Status (active / consumed / expired / cancelled). */
|
|
1098
|
+
status: string;
|
|
1099
|
+
createdAt: string;
|
|
1100
|
+
}
|
|
614
1101
|
export interface StripeWebhookAckDto {
|
|
615
1102
|
/** Always true once the event was accepted. */
|
|
616
1103
|
received: boolean;
|
|
@@ -659,6 +1146,19 @@ export declare const InvoicesControllerListInvoicesV1Status: {
|
|
|
659
1146
|
readonly CANCELLED: "CANCELLED";
|
|
660
1147
|
readonly WRITTEN_OFF: "WRITTEN_OFF";
|
|
661
1148
|
};
|
|
1149
|
+
export type InvoicesControllerListCorrectionsV1Params = {
|
|
1150
|
+
/**
|
|
1151
|
+
* Max rows to return (1–100).
|
|
1152
|
+
* @minimum 1
|
|
1153
|
+
* @maximum 100
|
|
1154
|
+
*/
|
|
1155
|
+
limit?: number;
|
|
1156
|
+
/**
|
|
1157
|
+
* Rows to skip.
|
|
1158
|
+
* @minimum 0
|
|
1159
|
+
*/
|
|
1160
|
+
offset?: number;
|
|
1161
|
+
};
|
|
662
1162
|
export type ArticlesControllerListArticlesV1Params = {
|
|
663
1163
|
/**
|
|
664
1164
|
* Max rows to return (1–100).
|
|
@@ -698,4 +1198,90 @@ export type PriceListsControllerGetPriceListItemsV1Params = {
|
|
|
698
1198
|
*/
|
|
699
1199
|
offset?: number;
|
|
700
1200
|
};
|
|
1201
|
+
export type DiscountRulesControllerListDiscountRulesV1Params = {
|
|
1202
|
+
/**
|
|
1203
|
+
* Max rows to return (1–100).
|
|
1204
|
+
* @minimum 1
|
|
1205
|
+
* @maximum 100
|
|
1206
|
+
*/
|
|
1207
|
+
limit?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* Rows to skip.
|
|
1210
|
+
* @minimum 0
|
|
1211
|
+
*/
|
|
1212
|
+
offset?: number;
|
|
1213
|
+
};
|
|
1214
|
+
export type BindingPlansControllerListBindingPlansV1Params = {
|
|
1215
|
+
/**
|
|
1216
|
+
* Max rows to return (1–100).
|
|
1217
|
+
* @minimum 1
|
|
1218
|
+
* @maximum 100
|
|
1219
|
+
*/
|
|
1220
|
+
limit?: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* Rows to skip.
|
|
1223
|
+
* @minimum 0
|
|
1224
|
+
*/
|
|
1225
|
+
offset?: number;
|
|
1226
|
+
};
|
|
1227
|
+
export type AccountCreditsControllerListAccountCreditsV1Params = {
|
|
1228
|
+
/**
|
|
1229
|
+
* Max rows to return (1–100).
|
|
1230
|
+
* @minimum 1
|
|
1231
|
+
* @maximum 100
|
|
1232
|
+
*/
|
|
1233
|
+
limit?: number;
|
|
1234
|
+
/**
|
|
1235
|
+
* Rows to skip.
|
|
1236
|
+
* @minimum 0
|
|
1237
|
+
*/
|
|
1238
|
+
offset?: number;
|
|
1239
|
+
/**
|
|
1240
|
+
* Restrict the list to one billing account's credits.
|
|
1241
|
+
*/
|
|
1242
|
+
billingAccountId?: string;
|
|
1243
|
+
};
|
|
1244
|
+
export type AccountCreditsControllerListApplicationsV1Params = {
|
|
1245
|
+
/**
|
|
1246
|
+
* Max rows to return (1–100).
|
|
1247
|
+
* @minimum 1
|
|
1248
|
+
* @maximum 100
|
|
1249
|
+
*/
|
|
1250
|
+
limit?: number;
|
|
1251
|
+
/**
|
|
1252
|
+
* Rows to skip.
|
|
1253
|
+
* @minimum 0
|
|
1254
|
+
*/
|
|
1255
|
+
offset?: number;
|
|
1256
|
+
};
|
|
1257
|
+
export type CouponsControllerListCouponsV1Params = {
|
|
1258
|
+
/**
|
|
1259
|
+
* Max rows to return (1–100).
|
|
1260
|
+
* @minimum 1
|
|
1261
|
+
* @maximum 100
|
|
1262
|
+
*/
|
|
1263
|
+
limit?: number;
|
|
1264
|
+
/**
|
|
1265
|
+
* Rows to skip.
|
|
1266
|
+
* @minimum 0
|
|
1267
|
+
*/
|
|
1268
|
+
offset?: number;
|
|
1269
|
+
};
|
|
1270
|
+
export type CouponsControllerListRedemptionsV1Params = {
|
|
1271
|
+
/**
|
|
1272
|
+
* Max rows to return (1–100).
|
|
1273
|
+
* @minimum 1
|
|
1274
|
+
* @maximum 100
|
|
1275
|
+
*/
|
|
1276
|
+
limit?: number;
|
|
1277
|
+
/**
|
|
1278
|
+
* Rows to skip.
|
|
1279
|
+
* @minimum 0
|
|
1280
|
+
*/
|
|
1281
|
+
offset?: number;
|
|
1282
|
+
/**
|
|
1283
|
+
* Restrict the list to one billing account's redemptions.
|
|
1284
|
+
*/
|
|
1285
|
+
billingAccountId?: string;
|
|
1286
|
+
};
|
|
701
1287
|
//# sourceMappingURL=index.schemas.d.ts.map
|