@revenexx/sdk 0.0.4 → 0.0.5
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/cjs/sdk.js +7445 -1584
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +7422 -1585
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +7445 -1584
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/address-type.ts +4 -0
- package/src/enums/cart-export-format.ts +4 -0
- package/src/enums/cart-io-apply-mode.ts +5 -0
- package/src/enums/cart-io-direction.ts +4 -0
- package/src/enums/cart-io-entity.ts +4 -0
- package/src/enums/cart-io-format.ts +4 -0
- package/src/enums/cart-item-type.ts +5 -0
- package/src/enums/channel-status.ts +4 -0
- package/src/enums/channel-type.ts +7 -0
- package/src/enums/contact-role.ts +6 -0
- package/src/enums/contact-status.ts +5 -0
- package/src/enums/location-type.ts +6 -0
- package/src/enums/market-status.ts +4 -0
- package/src/enums/order-comment-visibility.ts +4 -0
- package/src/enums/order-item-type.ts +5 -0
- package/src/enums/order-payment-status.ts +9 -0
- package/src/enums/organization-status.ts +4 -0
- package/src/enums/page-status.ts +5 -0
- package/src/enums/payment-fee-type.ts +5 -0
- package/src/enums/payment-method-kind.ts +4 -0
- package/src/enums/price-entry-type.ts +4 -0
- package/src/enums/price-list-status.ts +4 -0
- package/src/enums/shipping-method-matrix-basis.ts +6 -0
- package/src/enums/shipping-method-pricing-type.ts +5 -0
- package/src/index.ts +24 -0
- package/src/models.ts +4303 -941
- package/src/services/apps.ts +154 -154
- package/src/services/avatars.ts +57 -57
- package/src/services/carts.ts +739 -104
- package/src/services/channels.ts +147 -19
- package/src/services/customers.ts +801 -69
- package/src/services/greetings.ts +18 -18
- package/src/services/inventories.ts +620 -65
- package/src/services/locale.ts +16 -16
- package/src/services/markets.ts +373 -75
- package/src/services/messaging.ts +273 -273
- package/src/services/orders.ts +692 -137
- package/src/services/pages.ts +377 -157
- package/src/services/payments.ts +591 -64
- package/src/services/prices.ts +524 -59
- package/src/services/products.ts +1836 -272
- package/src/services/search.ts +24 -24
- package/src/services/shipping.ts +444 -59
- package/src/services/sites.ts +116 -116
- package/src/services/storage.ts +72 -72
- package/src/services/tokens.ts +14 -14
- package/types/enums/address-type.d.ts +4 -0
- package/types/enums/cart-export-format.d.ts +4 -0
- package/types/enums/cart-io-apply-mode.d.ts +5 -0
- package/types/enums/cart-io-direction.d.ts +4 -0
- package/types/enums/cart-io-entity.d.ts +4 -0
- package/types/enums/cart-io-format.d.ts +4 -0
- package/types/enums/cart-item-type.d.ts +5 -0
- package/types/enums/channel-status.d.ts +4 -0
- package/types/enums/channel-type.d.ts +7 -0
- package/types/enums/contact-role.d.ts +6 -0
- package/types/enums/contact-status.d.ts +5 -0
- package/types/enums/location-type.d.ts +6 -0
- package/types/enums/market-status.d.ts +4 -0
- package/types/enums/order-comment-visibility.d.ts +4 -0
- package/types/enums/order-item-type.d.ts +5 -0
- package/types/enums/order-payment-status.d.ts +9 -0
- package/types/enums/organization-status.d.ts +4 -0
- package/types/enums/page-status.d.ts +5 -0
- package/types/enums/payment-fee-type.d.ts +5 -0
- package/types/enums/payment-method-kind.d.ts +4 -0
- package/types/enums/price-entry-type.d.ts +4 -0
- package/types/enums/price-list-status.d.ts +4 -0
- package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
- package/types/enums/shipping-method-pricing-type.d.ts +5 -0
- package/types/index.d.ts +24 -0
- package/types/models.d.ts +4214 -970
- package/types/services/carts.d.ts +271 -12
- package/types/services/channels.d.ts +54 -2
- package/types/services/customers.d.ts +295 -12
- package/types/services/inventories.d.ts +225 -11
- package/types/services/markets.d.ts +123 -6
- package/types/services/orders.d.ts +238 -16
- package/types/services/pages.d.ts +95 -6
- package/types/services/payments.d.ts +221 -7
- package/types/services/prices.d.ts +198 -6
- package/types/services/products.d.ts +646 -32
- package/types/services/shipping.d.ts +165 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
+
import { PageStatus } from '../enums/page-status';
|
|
3
4
|
export declare class Pages {
|
|
4
5
|
client: Client;
|
|
5
6
|
constructor(client: Client);
|
|
@@ -320,20 +321,29 @@ export declare class Pages {
|
|
|
320
321
|
/**
|
|
321
322
|
*
|
|
322
323
|
* @param {string} params.pageId -
|
|
324
|
+
* @param {string} params.plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
|
|
325
|
+
* @param {string} params.langcode -
|
|
326
|
+
* @param {object} params.payload -
|
|
323
327
|
* @throws {RevenexxException}
|
|
324
328
|
* @returns {Promise<Models.MutationResponse>}
|
|
325
329
|
*/
|
|
326
330
|
pagesEditorMutate(params: {
|
|
327
331
|
pageId: string;
|
|
332
|
+
plugin: string;
|
|
333
|
+
langcode?: string;
|
|
334
|
+
payload?: object;
|
|
328
335
|
}): Promise<Models.MutationResponse>;
|
|
329
336
|
/**
|
|
330
337
|
*
|
|
331
338
|
* @param {string} pageId -
|
|
339
|
+
* @param {string} plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
|
|
340
|
+
* @param {string} langcode -
|
|
341
|
+
* @param {object} payload -
|
|
332
342
|
* @throws {RevenexxException}
|
|
333
343
|
* @returns {Promise<Models.MutationResponse>}
|
|
334
344
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
335
345
|
*/
|
|
336
|
-
pagesEditorMutate(pageId: string): Promise<Models.MutationResponse>;
|
|
346
|
+
pagesEditorMutate(pageId: string, plugin: string, langcode?: string, payload?: object): Promise<Models.MutationResponse>;
|
|
337
347
|
/**
|
|
338
348
|
*
|
|
339
349
|
* @param {string} params.pageId -
|
|
@@ -543,20 +553,29 @@ export declare class Pages {
|
|
|
543
553
|
/**
|
|
544
554
|
*
|
|
545
555
|
* @param {string} params.id -
|
|
556
|
+
* @param {string} params.bundle -
|
|
557
|
+
* @param {string} params.label -
|
|
558
|
+
* @param {object} params.tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
|
|
546
559
|
* @throws {RevenexxException}
|
|
547
560
|
* @returns {Promise<Models.LibraryItem>}
|
|
548
561
|
*/
|
|
549
562
|
pagesLibraryUpdate(params: {
|
|
550
563
|
id: string;
|
|
564
|
+
bundle?: string;
|
|
565
|
+
label?: string;
|
|
566
|
+
tree?: object;
|
|
551
567
|
}): Promise<Models.LibraryItem>;
|
|
552
568
|
/**
|
|
553
569
|
*
|
|
554
570
|
* @param {string} id -
|
|
571
|
+
* @param {string} bundle -
|
|
572
|
+
* @param {string} label -
|
|
573
|
+
* @param {object} tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
|
|
555
574
|
* @throws {RevenexxException}
|
|
556
575
|
* @returns {Promise<Models.LibraryItem>}
|
|
557
576
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
558
577
|
*/
|
|
559
|
-
pagesLibraryUpdate(id: string): Promise<Models.LibraryItem>;
|
|
578
|
+
pagesLibraryUpdate(id: string, bundle?: string, label?: string, tree?: object): Promise<Models.LibraryItem>;
|
|
560
579
|
/**
|
|
561
580
|
*
|
|
562
581
|
* @throws {RevenexxException}
|
|
@@ -565,10 +584,36 @@ export declare class Pages {
|
|
|
565
584
|
pagesPagesList(): Promise<{}>;
|
|
566
585
|
/**
|
|
567
586
|
*
|
|
587
|
+
* @param {string} params.title -
|
|
588
|
+
* @param {string} params.bundle -
|
|
589
|
+
* @param {object} params.hostOptions -
|
|
590
|
+
* @param {object} params.meta -
|
|
591
|
+
* @param {string} params.slug -
|
|
592
|
+
* @param {string} params.sourceLanguage -
|
|
593
|
+
* @throws {RevenexxException}
|
|
594
|
+
* @returns {Promise<Models.Page>}
|
|
595
|
+
*/
|
|
596
|
+
pagesPagesCreate(params: {
|
|
597
|
+
title: string;
|
|
598
|
+
bundle?: string;
|
|
599
|
+
hostOptions?: object;
|
|
600
|
+
meta?: object;
|
|
601
|
+
slug?: string;
|
|
602
|
+
sourceLanguage?: string;
|
|
603
|
+
}): Promise<Models.Page>;
|
|
604
|
+
/**
|
|
605
|
+
*
|
|
606
|
+
* @param {string} title -
|
|
607
|
+
* @param {string} bundle -
|
|
608
|
+
* @param {object} hostOptions -
|
|
609
|
+
* @param {object} meta -
|
|
610
|
+
* @param {string} slug -
|
|
611
|
+
* @param {string} sourceLanguage -
|
|
568
612
|
* @throws {RevenexxException}
|
|
569
613
|
* @returns {Promise<Models.Page>}
|
|
614
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
570
615
|
*/
|
|
571
|
-
pagesPagesCreate(): Promise<Models.Page>;
|
|
616
|
+
pagesPagesCreate(title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string): Promise<Models.Page>;
|
|
572
617
|
/**
|
|
573
618
|
*
|
|
574
619
|
* @param {string} params.id -
|
|
@@ -606,20 +651,35 @@ export declare class Pages {
|
|
|
606
651
|
/**
|
|
607
652
|
*
|
|
608
653
|
* @param {string} params.id -
|
|
654
|
+
* @param {string} params.bundle -
|
|
655
|
+
* @param {object} params.meta -
|
|
656
|
+
* @param {string} params.slug -
|
|
657
|
+
* @param {PageStatus} params.status -
|
|
658
|
+
* @param {string} params.title -
|
|
609
659
|
* @throws {RevenexxException}
|
|
610
660
|
* @returns {Promise<Models.Page>}
|
|
611
661
|
*/
|
|
612
662
|
pagesPagesUpdate(params: {
|
|
613
663
|
id: string;
|
|
664
|
+
bundle?: string;
|
|
665
|
+
meta?: object;
|
|
666
|
+
slug?: string;
|
|
667
|
+
status?: PageStatus;
|
|
668
|
+
title?: string;
|
|
614
669
|
}): Promise<Models.Page>;
|
|
615
670
|
/**
|
|
616
671
|
*
|
|
617
672
|
* @param {string} id -
|
|
673
|
+
* @param {string} bundle -
|
|
674
|
+
* @param {object} meta -
|
|
675
|
+
* @param {string} slug -
|
|
676
|
+
* @param {PageStatus} status -
|
|
677
|
+
* @param {string} title -
|
|
618
678
|
* @throws {RevenexxException}
|
|
619
679
|
* @returns {Promise<Models.Page>}
|
|
620
680
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
621
681
|
*/
|
|
622
|
-
pagesPagesUpdate(id: string): Promise<Models.Page>;
|
|
682
|
+
pagesPagesUpdate(id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string): Promise<Models.Page>;
|
|
623
683
|
/**
|
|
624
684
|
*
|
|
625
685
|
* @param {string} params.id -
|
|
@@ -639,10 +699,21 @@ export declare class Pages {
|
|
|
639
699
|
pagesPagesRevisions(id: string): Promise<{}>;
|
|
640
700
|
/**
|
|
641
701
|
*
|
|
702
|
+
* @param {object[]} params.pages -
|
|
642
703
|
* @throws {RevenexxException}
|
|
643
704
|
* @returns {Promise<{}>}
|
|
644
705
|
*/
|
|
645
|
-
pagesSeed(
|
|
706
|
+
pagesSeed(params?: {
|
|
707
|
+
pages?: object[];
|
|
708
|
+
}): Promise<{}>;
|
|
709
|
+
/**
|
|
710
|
+
*
|
|
711
|
+
* @param {object[]} pages -
|
|
712
|
+
* @throws {RevenexxException}
|
|
713
|
+
* @returns {Promise<{}>}
|
|
714
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
715
|
+
*/
|
|
716
|
+
pagesSeed(pages?: object[]): Promise<{}>;
|
|
646
717
|
/**
|
|
647
718
|
*
|
|
648
719
|
* @throws {RevenexxException}
|
|
@@ -686,18 +757,36 @@ export declare class Pages {
|
|
|
686
757
|
/**
|
|
687
758
|
*
|
|
688
759
|
* @param {string} params.id -
|
|
760
|
+
* @param {string} params.description -
|
|
761
|
+
* @param {string} params.fieldName -
|
|
762
|
+
* @param {boolean} params.isDefault -
|
|
763
|
+
* @param {string} params.label -
|
|
764
|
+
* @param {string} params.pageBundle -
|
|
765
|
+
* @param {object[]} params.tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
|
|
689
766
|
* @throws {RevenexxException}
|
|
690
767
|
* @returns {Promise<Models.Template>}
|
|
691
768
|
*/
|
|
692
769
|
pagesTemplatesUpdate(params: {
|
|
693
770
|
id: string;
|
|
771
|
+
description?: string;
|
|
772
|
+
fieldName?: string;
|
|
773
|
+
isDefault?: boolean;
|
|
774
|
+
label?: string;
|
|
775
|
+
pageBundle?: string;
|
|
776
|
+
tree?: object[];
|
|
694
777
|
}): Promise<Models.Template>;
|
|
695
778
|
/**
|
|
696
779
|
*
|
|
697
780
|
* @param {string} id -
|
|
781
|
+
* @param {string} description -
|
|
782
|
+
* @param {string} fieldName -
|
|
783
|
+
* @param {boolean} isDefault -
|
|
784
|
+
* @param {string} label -
|
|
785
|
+
* @param {string} pageBundle -
|
|
786
|
+
* @param {object[]} tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
|
|
698
787
|
* @throws {RevenexxException}
|
|
699
788
|
* @returns {Promise<Models.Template>}
|
|
700
789
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
701
790
|
*/
|
|
702
|
-
pagesTemplatesUpdate(id: string): Promise<Models.Template>;
|
|
791
|
+
pagesTemplatesUpdate(id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[]): Promise<Models.Template>;
|
|
703
792
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
+
import { PaymentFeeType } from '../enums/payment-fee-type';
|
|
4
|
+
import { PaymentMethodKind } from '../enums/payment-method-kind';
|
|
3
5
|
export declare class Payments {
|
|
4
6
|
client: Client;
|
|
5
7
|
constructor(client: Client);
|
|
@@ -11,10 +13,48 @@ export declare class Payments {
|
|
|
11
13
|
paymentsList(): Promise<{}>;
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
16
|
+
* @param {number} params.amount - Order amount — 0 is legal (free orders), negative is not.
|
|
17
|
+
* @param {string} params.methodCode - Code of a configured payment method.
|
|
18
|
+
* @param {string} params.cartId - The cart this payment pays for.
|
|
19
|
+
* @param {string} params.contactId - Paying customer contact.
|
|
20
|
+
* @param {string} params.country - Buyer ISO country code for the eligibility check.
|
|
21
|
+
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
22
|
+
* @param {string} params.idempotencyKey - Same key answers the same payment instead of a duplicate.
|
|
23
|
+
* @param {object} params.metadata - Free-form metadata.
|
|
24
|
+
* @param {string} params.orderRef - External order reference — also the webhook fallback key.
|
|
25
|
+
* @param {string} params.returnUrl - Where the PSP redirect flow returns the buyer to.
|
|
14
26
|
* @throws {RevenexxException}
|
|
15
27
|
* @returns {Promise<Models.Payment>}
|
|
16
28
|
*/
|
|
17
|
-
paymentsCreate(
|
|
29
|
+
paymentsCreate(params: {
|
|
30
|
+
amount: number;
|
|
31
|
+
methodCode: string;
|
|
32
|
+
cartId?: string;
|
|
33
|
+
contactId?: string;
|
|
34
|
+
country?: string;
|
|
35
|
+
currency?: string;
|
|
36
|
+
idempotencyKey?: string;
|
|
37
|
+
metadata?: object;
|
|
38
|
+
orderRef?: string;
|
|
39
|
+
returnUrl?: string;
|
|
40
|
+
}): Promise<Models.Payment>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @param {number} amount - Order amount — 0 is legal (free orders), negative is not.
|
|
44
|
+
* @param {string} methodCode - Code of a configured payment method.
|
|
45
|
+
* @param {string} cartId - The cart this payment pays for.
|
|
46
|
+
* @param {string} contactId - Paying customer contact.
|
|
47
|
+
* @param {string} country - Buyer ISO country code for the eligibility check.
|
|
48
|
+
* @param {string} currency - ISO 4217 code (default EUR).
|
|
49
|
+
* @param {string} idempotencyKey - Same key answers the same payment instead of a duplicate.
|
|
50
|
+
* @param {object} metadata - Free-form metadata.
|
|
51
|
+
* @param {string} orderRef - External order reference — also the webhook fallback key.
|
|
52
|
+
* @param {string} returnUrl - Where the PSP redirect flow returns the buyer to.
|
|
53
|
+
* @throws {RevenexxException}
|
|
54
|
+
* @returns {Promise<Models.Payment>}
|
|
55
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
56
|
+
*/
|
|
57
|
+
paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise<Models.Payment>;
|
|
18
58
|
/**
|
|
19
59
|
*
|
|
20
60
|
* @throws {RevenexxException}
|
|
@@ -23,10 +63,66 @@ export declare class Payments {
|
|
|
23
63
|
paymentsMethodsList(): Promise<{}>;
|
|
24
64
|
/**
|
|
25
65
|
*
|
|
66
|
+
* @param {string} params.code - Stable method code (unique per tenant, e.g. 'invoice', 'card').
|
|
67
|
+
* @param {string} params.name - Display name.
|
|
68
|
+
* @param {string[]} params.countries - Allowed ISO country codes — empty/omitted = unrestricted.
|
|
69
|
+
* @param {string} params.description -
|
|
70
|
+
* @param {boolean} params.enabled - Disabled methods are never eligible (default false).
|
|
71
|
+
* @param {number} params.feeAmount - Fixed amount or percent value, per fee_type (default 0).
|
|
72
|
+
* @param {string} params.feeCurrency - ISO 4217 code (default EUR).
|
|
73
|
+
* @param {PaymentFeeType} params.feeType - How 'fee_amount' applies (default 'none').
|
|
74
|
+
* @param {PaymentMethodKind} params.kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).
|
|
75
|
+
* @param {object} params.labels - Localized display names ({ de, en, … }).
|
|
76
|
+
* @param {number} params.maxOrderValue - Maximum order amount — omitted = no upper bound.
|
|
77
|
+
* @param {object} params.metadata - Free-form metadata.
|
|
78
|
+
* @param {number} params.minOrderValue - Minimum order amount — omitted = no lower bound.
|
|
79
|
+
* @param {number} params.position - Sort position in the checkout (default 0).
|
|
80
|
+
* @param {string} params.provider - PSP code from the catalog — only for kind 'psp'.
|
|
81
|
+
* @param {string} params.providerMethod - The provider's payment method id (e.g. 'card', 'paypal').
|
|
26
82
|
* @throws {RevenexxException}
|
|
27
83
|
* @returns {Promise<Models.PaymentMethod>}
|
|
28
84
|
*/
|
|
29
|
-
paymentsMethodsCreate(
|
|
85
|
+
paymentsMethodsCreate(params: {
|
|
86
|
+
code: string;
|
|
87
|
+
name: string;
|
|
88
|
+
countries?: string[];
|
|
89
|
+
description?: string;
|
|
90
|
+
enabled?: boolean;
|
|
91
|
+
feeAmount?: number;
|
|
92
|
+
feeCurrency?: string;
|
|
93
|
+
feeType?: PaymentFeeType;
|
|
94
|
+
kind?: PaymentMethodKind;
|
|
95
|
+
labels?: object;
|
|
96
|
+
maxOrderValue?: number;
|
|
97
|
+
metadata?: object;
|
|
98
|
+
minOrderValue?: number;
|
|
99
|
+
position?: number;
|
|
100
|
+
provider?: string;
|
|
101
|
+
providerMethod?: string;
|
|
102
|
+
}): Promise<Models.PaymentMethod>;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @param {string} code - Stable method code (unique per tenant, e.g. 'invoice', 'card').
|
|
106
|
+
* @param {string} name - Display name.
|
|
107
|
+
* @param {string[]} countries - Allowed ISO country codes — empty/omitted = unrestricted.
|
|
108
|
+
* @param {string} description -
|
|
109
|
+
* @param {boolean} enabled - Disabled methods are never eligible (default false).
|
|
110
|
+
* @param {number} feeAmount - Fixed amount or percent value, per fee_type (default 0).
|
|
111
|
+
* @param {string} feeCurrency - ISO 4217 code (default EUR).
|
|
112
|
+
* @param {PaymentFeeType} feeType - How 'fee_amount' applies (default 'none').
|
|
113
|
+
* @param {PaymentMethodKind} kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).
|
|
114
|
+
* @param {object} labels - Localized display names ({ de, en, … }).
|
|
115
|
+
* @param {number} maxOrderValue - Maximum order amount — omitted = no upper bound.
|
|
116
|
+
* @param {object} metadata - Free-form metadata.
|
|
117
|
+
* @param {number} minOrderValue - Minimum order amount — omitted = no lower bound.
|
|
118
|
+
* @param {number} position - Sort position in the checkout (default 0).
|
|
119
|
+
* @param {string} provider - PSP code from the catalog — only for kind 'psp'.
|
|
120
|
+
* @param {string} providerMethod - The provider's payment method id (e.g. 'card', 'paypal').
|
|
121
|
+
* @throws {RevenexxException}
|
|
122
|
+
* @returns {Promise<Models.PaymentMethod>}
|
|
123
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
|
+
*/
|
|
125
|
+
paymentsMethodsCreate(code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string): Promise<Models.PaymentMethod>;
|
|
30
126
|
/**
|
|
31
127
|
*
|
|
32
128
|
* @throws {RevenexxException}
|
|
@@ -35,10 +131,27 @@ export declare class Payments {
|
|
|
35
131
|
paymentsMethodsDefaults(): Promise<{}>;
|
|
36
132
|
/**
|
|
37
133
|
*
|
|
134
|
+
* @param {number} params.amount - Order amount the fees are computed against (default 0).
|
|
135
|
+
* @param {string} params.country - Buyer ISO country code — methods with country restrictions need it.
|
|
136
|
+
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
38
137
|
* @throws {RevenexxException}
|
|
39
138
|
* @returns {Promise<{}>}
|
|
40
139
|
*/
|
|
41
|
-
paymentsMethodsEligible(
|
|
140
|
+
paymentsMethodsEligible(params?: {
|
|
141
|
+
amount?: number;
|
|
142
|
+
country?: string;
|
|
143
|
+
currency?: string;
|
|
144
|
+
}): Promise<{}>;
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
* @param {number} amount - Order amount the fees are computed against (default 0).
|
|
148
|
+
* @param {string} country - Buyer ISO country code — methods with country restrictions need it.
|
|
149
|
+
* @param {string} currency - ISO 4217 code (default EUR).
|
|
150
|
+
* @throws {RevenexxException}
|
|
151
|
+
* @returns {Promise<{}>}
|
|
152
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
153
|
+
*/
|
|
154
|
+
paymentsMethodsEligible(amount?: number, country?: string, currency?: string): Promise<{}>;
|
|
42
155
|
/**
|
|
43
156
|
*
|
|
44
157
|
* @param {string} params.id -
|
|
@@ -76,20 +189,68 @@ export declare class Payments {
|
|
|
76
189
|
/**
|
|
77
190
|
*
|
|
78
191
|
* @param {string} params.id -
|
|
192
|
+
* @param {string} params.code - Stable method code (unique per tenant, e.g. 'invoice', 'card').
|
|
193
|
+
* @param {string[]} params.countries - Allowed ISO country codes — empty/omitted = unrestricted.
|
|
194
|
+
* @param {string} params.description -
|
|
195
|
+
* @param {boolean} params.enabled - Disabled methods are never eligible (default false).
|
|
196
|
+
* @param {number} params.feeAmount - Fixed amount or percent value, per fee_type (default 0).
|
|
197
|
+
* @param {string} params.feeCurrency - ISO 4217 code (default EUR).
|
|
198
|
+
* @param {PaymentFeeType} params.feeType - How 'fee_amount' applies (default 'none').
|
|
199
|
+
* @param {PaymentMethodKind} params.kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).
|
|
200
|
+
* @param {object} params.labels - Localized display names ({ de, en, … }).
|
|
201
|
+
* @param {number} params.maxOrderValue - Maximum order amount — omitted = no upper bound.
|
|
202
|
+
* @param {object} params.metadata - Free-form metadata.
|
|
203
|
+
* @param {number} params.minOrderValue - Minimum order amount — omitted = no lower bound.
|
|
204
|
+
* @param {string} params.name - Display name.
|
|
205
|
+
* @param {number} params.position - Sort position in the checkout (default 0).
|
|
206
|
+
* @param {string} params.provider - PSP code from the catalog — only for kind 'psp'.
|
|
207
|
+
* @param {string} params.providerMethod - The provider's payment method id (e.g. 'card', 'paypal').
|
|
79
208
|
* @throws {RevenexxException}
|
|
80
209
|
* @returns {Promise<Models.PaymentMethod>}
|
|
81
210
|
*/
|
|
82
211
|
paymentsMethodsUpdate(params: {
|
|
83
212
|
id: string;
|
|
213
|
+
code?: string;
|
|
214
|
+
countries?: string[];
|
|
215
|
+
description?: string;
|
|
216
|
+
enabled?: boolean;
|
|
217
|
+
feeAmount?: number;
|
|
218
|
+
feeCurrency?: string;
|
|
219
|
+
feeType?: PaymentFeeType;
|
|
220
|
+
kind?: PaymentMethodKind;
|
|
221
|
+
labels?: object;
|
|
222
|
+
maxOrderValue?: number;
|
|
223
|
+
metadata?: object;
|
|
224
|
+
minOrderValue?: number;
|
|
225
|
+
name?: string;
|
|
226
|
+
position?: number;
|
|
227
|
+
provider?: string;
|
|
228
|
+
providerMethod?: string;
|
|
84
229
|
}): Promise<Models.PaymentMethod>;
|
|
85
230
|
/**
|
|
86
231
|
*
|
|
87
232
|
* @param {string} id -
|
|
233
|
+
* @param {string} code - Stable method code (unique per tenant, e.g. 'invoice', 'card').
|
|
234
|
+
* @param {string[]} countries - Allowed ISO country codes — empty/omitted = unrestricted.
|
|
235
|
+
* @param {string} description -
|
|
236
|
+
* @param {boolean} enabled - Disabled methods are never eligible (default false).
|
|
237
|
+
* @param {number} feeAmount - Fixed amount or percent value, per fee_type (default 0).
|
|
238
|
+
* @param {string} feeCurrency - ISO 4217 code (default EUR).
|
|
239
|
+
* @param {PaymentFeeType} feeType - How 'fee_amount' applies (default 'none').
|
|
240
|
+
* @param {PaymentMethodKind} kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).
|
|
241
|
+
* @param {object} labels - Localized display names ({ de, en, … }).
|
|
242
|
+
* @param {number} maxOrderValue - Maximum order amount — omitted = no upper bound.
|
|
243
|
+
* @param {object} metadata - Free-form metadata.
|
|
244
|
+
* @param {number} minOrderValue - Minimum order amount — omitted = no lower bound.
|
|
245
|
+
* @param {string} name - Display name.
|
|
246
|
+
* @param {number} position - Sort position in the checkout (default 0).
|
|
247
|
+
* @param {string} provider - PSP code from the catalog — only for kind 'psp'.
|
|
248
|
+
* @param {string} providerMethod - The provider's payment method id (e.g. 'card', 'paypal').
|
|
88
249
|
* @throws {RevenexxException}
|
|
89
250
|
* @returns {Promise<Models.PaymentMethod>}
|
|
90
251
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
91
252
|
*/
|
|
92
|
-
paymentsMethodsUpdate(id: string): Promise<Models.PaymentMethod>;
|
|
253
|
+
paymentsMethodsUpdate(id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string): Promise<Models.PaymentMethod>;
|
|
93
254
|
/**
|
|
94
255
|
*
|
|
95
256
|
* @throws {RevenexxException}
|
|
@@ -98,10 +259,39 @@ export declare class Payments {
|
|
|
98
259
|
paymentsProvidersList(): Promise<{}>;
|
|
99
260
|
/**
|
|
100
261
|
*
|
|
262
|
+
* @param {string} params.provider - Provider code — must exist in the catalog (GET /payments/providers/catalog).
|
|
263
|
+
* @param {object} params.credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects.
|
|
264
|
+
* @param {boolean} params.enabled - Only enabled providers transact (default false).
|
|
265
|
+
* @param {string} params.name - Display name — defaults to the catalog label.
|
|
266
|
+
* @param {object} params.options - Free-form provider options.
|
|
267
|
+
* @param {boolean} params.testMode - Sandbox/test credentials (default true).
|
|
268
|
+
* @param {string} params.webhookSecret - Shared secret for PSP callback verification.
|
|
269
|
+
* @throws {RevenexxException}
|
|
270
|
+
* @returns {Promise<Models.PaymentProvider>}
|
|
271
|
+
*/
|
|
272
|
+
paymentsProvidersCreate(params: {
|
|
273
|
+
provider: string;
|
|
274
|
+
credentials?: object;
|
|
275
|
+
enabled?: boolean;
|
|
276
|
+
name?: string;
|
|
277
|
+
options?: object;
|
|
278
|
+
testMode?: boolean;
|
|
279
|
+
webhookSecret?: string;
|
|
280
|
+
}): Promise<Models.PaymentProvider>;
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* @param {string} provider - Provider code — must exist in the catalog (GET /payments/providers/catalog).
|
|
284
|
+
* @param {object} credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects.
|
|
285
|
+
* @param {boolean} enabled - Only enabled providers transact (default false).
|
|
286
|
+
* @param {string} name - Display name — defaults to the catalog label.
|
|
287
|
+
* @param {object} options - Free-form provider options.
|
|
288
|
+
* @param {boolean} testMode - Sandbox/test credentials (default true).
|
|
289
|
+
* @param {string} webhookSecret - Shared secret for PSP callback verification.
|
|
101
290
|
* @throws {RevenexxException}
|
|
102
291
|
* @returns {Promise<Models.PaymentProvider>}
|
|
292
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
103
293
|
*/
|
|
104
|
-
paymentsProvidersCreate(): Promise<Models.PaymentProvider>;
|
|
294
|
+
paymentsProvidersCreate(provider: string, credentials?: object, enabled?: boolean, name?: string, options?: object, testMode?: boolean, webhookSecret?: string): Promise<Models.PaymentProvider>;
|
|
105
295
|
/**
|
|
106
296
|
*
|
|
107
297
|
* @throws {RevenexxException}
|
|
@@ -145,39 +335,63 @@ export declare class Payments {
|
|
|
145
335
|
/**
|
|
146
336
|
*
|
|
147
337
|
* @param {string} params.id -
|
|
338
|
+
* @param {object} params.credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects.
|
|
339
|
+
* @param {boolean} params.enabled - Only enabled providers transact (default false).
|
|
340
|
+
* @param {string} params.name - Display name — defaults to the catalog label.
|
|
341
|
+
* @param {object} params.options - Free-form provider options.
|
|
342
|
+
* @param {string} params.provider - Provider code — must exist in the catalog (GET /payments/providers/catalog).
|
|
343
|
+
* @param {boolean} params.testMode - Sandbox/test credentials (default true).
|
|
344
|
+
* @param {string} params.webhookSecret - Shared secret for PSP callback verification.
|
|
148
345
|
* @throws {RevenexxException}
|
|
149
346
|
* @returns {Promise<Models.PaymentProvider>}
|
|
150
347
|
*/
|
|
151
348
|
paymentsProvidersUpdate(params: {
|
|
152
349
|
id: string;
|
|
350
|
+
credentials?: object;
|
|
351
|
+
enabled?: boolean;
|
|
352
|
+
name?: string;
|
|
353
|
+
options?: object;
|
|
354
|
+
provider?: string;
|
|
355
|
+
testMode?: boolean;
|
|
356
|
+
webhookSecret?: string;
|
|
153
357
|
}): Promise<Models.PaymentProvider>;
|
|
154
358
|
/**
|
|
155
359
|
*
|
|
156
360
|
* @param {string} id -
|
|
361
|
+
* @param {object} credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects.
|
|
362
|
+
* @param {boolean} enabled - Only enabled providers transact (default false).
|
|
363
|
+
* @param {string} name - Display name — defaults to the catalog label.
|
|
364
|
+
* @param {object} options - Free-form provider options.
|
|
365
|
+
* @param {string} provider - Provider code — must exist in the catalog (GET /payments/providers/catalog).
|
|
366
|
+
* @param {boolean} testMode - Sandbox/test credentials (default true).
|
|
367
|
+
* @param {string} webhookSecret - Shared secret for PSP callback verification.
|
|
157
368
|
* @throws {RevenexxException}
|
|
158
369
|
* @returns {Promise<Models.PaymentProvider>}
|
|
159
370
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
160
371
|
*/
|
|
161
|
-
paymentsProvidersUpdate(id: string): Promise<Models.PaymentProvider>;
|
|
372
|
+
paymentsProvidersUpdate(id: string, credentials?: object, enabled?: boolean, name?: string, options?: object, provider?: string, testMode?: boolean, webhookSecret?: string): Promise<Models.PaymentProvider>;
|
|
162
373
|
/**
|
|
163
374
|
* Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
|
|
164
375
|
*
|
|
165
376
|
* @param {string} params.provider -
|
|
377
|
+
* @param {object} params.data - Request body
|
|
166
378
|
* @throws {RevenexxException}
|
|
167
379
|
* @returns {Promise<{}>}
|
|
168
380
|
*/
|
|
169
381
|
paymentsWebhooksIngest(params: {
|
|
170
382
|
provider: string;
|
|
383
|
+
data: object;
|
|
171
384
|
}): Promise<{}>;
|
|
172
385
|
/**
|
|
173
386
|
* Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
|
|
174
387
|
*
|
|
175
388
|
* @param {string} provider -
|
|
389
|
+
* @param {object} data - Request body
|
|
176
390
|
* @throws {RevenexxException}
|
|
177
391
|
* @returns {Promise<{}>}
|
|
178
392
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
179
393
|
*/
|
|
180
|
-
paymentsWebhooksIngest(provider: string): Promise<{}>;
|
|
394
|
+
paymentsWebhooksIngest(provider: string, data: object): Promise<{}>;
|
|
181
395
|
/**
|
|
182
396
|
*
|
|
183
397
|
* @param {string} params.id -
|