@wix/auto_sdk_benefit-programs_balances 1.0.28 → 1.0.30
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/build/cjs/index.js +15 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +15 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +354 -1
- package/build/cjs/meta.js +92 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +15 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +15 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +354 -1
- package/build/es/meta.mjs +83 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +15 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +15 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +354 -1
- package/build/internal/cjs/meta.js +92 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +15 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +15 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +354 -1
- package/build/internal/es/meta.mjs +83 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/es/meta.d.mts
CHANGED
|
@@ -88,6 +88,18 @@ interface CommonIdentificationDataIdOneOf {
|
|
|
88
88
|
*/
|
|
89
89
|
wixUserId?: string;
|
|
90
90
|
}
|
|
91
|
+
declare enum IdentityType {
|
|
92
|
+
/** Unknown type. This value is not used. */
|
|
93
|
+
UNKNOWN = "UNKNOWN",
|
|
94
|
+
/** A site visitor who has not logged in. */
|
|
95
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
96
|
+
/** A logged-in site member. */
|
|
97
|
+
MEMBER = "MEMBER",
|
|
98
|
+
/** A Wix account holder, such as a site owner or contributor. */
|
|
99
|
+
WIX_USER = "WIX_USER"
|
|
100
|
+
}
|
|
101
|
+
/** @enumType */
|
|
102
|
+
type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
|
|
91
103
|
interface BalanceAmount {
|
|
92
104
|
/**
|
|
93
105
|
* number of available credits.
|
|
@@ -375,6 +387,27 @@ interface AdjustOptions {
|
|
|
375
387
|
/** Beneficiary of the associated pool. */
|
|
376
388
|
beneficiary?: CommonIdentificationData;
|
|
377
389
|
}
|
|
390
|
+
declare enum LimitRule {
|
|
391
|
+
/** Unknown limit rule */
|
|
392
|
+
UNKNOWN_LIMIT_RULE = "UNKNOWN_LIMIT_RULE",
|
|
393
|
+
/** If the limit is exceeded, the operation will fail */
|
|
394
|
+
FAIL = "FAIL",
|
|
395
|
+
/** If the limit is exceeded, the operation will succeed but the balance never goes beyond the provided limits. For balance that was already outside of provided limits, it will not be changed. */
|
|
396
|
+
SOFT_ENFORCE = "SOFT_ENFORCE",
|
|
397
|
+
/** If the limit is exceeded, the operation will succeed but the balance will be adjusted so that it satisfies the provided limits. If the resulting balance is below the lower_limit, it will be set to the lower_limit. If the resulting balance is above the upper_limit, it will be set to the upper_limit. */
|
|
398
|
+
HARD_ENFORCE = "HARD_ENFORCE"
|
|
399
|
+
}
|
|
400
|
+
/** @enumType */
|
|
401
|
+
type LimitRuleWithLiterals = LimitRule | 'UNKNOWN_LIMIT_RULE' | 'FAIL' | 'SOFT_ENFORCE' | 'HARD_ENFORCE';
|
|
402
|
+
declare enum BalanceType {
|
|
403
|
+
UNDEFINED = "UNDEFINED",
|
|
404
|
+
/** In a pool's balance. */
|
|
405
|
+
AVAILABLE = "AVAILABLE",
|
|
406
|
+
/** Outside a pool's balance. */
|
|
407
|
+
EXTERNAL = "EXTERNAL"
|
|
408
|
+
}
|
|
409
|
+
/** @enumType */
|
|
410
|
+
type BalanceTypeWithLiterals = BalanceType | 'UNDEFINED' | 'AVAILABLE' | 'EXTERNAL';
|
|
378
411
|
interface SetOptions {
|
|
379
412
|
/**
|
|
380
413
|
* Amount to set the balance's available credits to.
|
|
@@ -386,6 +419,15 @@ interface SetOptions {
|
|
|
386
419
|
/** Beneficiary of the associated pool. */
|
|
387
420
|
beneficiary?: CommonIdentificationData;
|
|
388
421
|
}
|
|
422
|
+
interface SetInitialOptions {
|
|
423
|
+
/**
|
|
424
|
+
* Set the available balance to the provided amount.
|
|
425
|
+
* @decimalValue options { maxScale:4 }
|
|
426
|
+
*/
|
|
427
|
+
value?: string;
|
|
428
|
+
/** Benefit pool owner associated with this balance. */
|
|
429
|
+
beneficiary?: CommonIdentificationData;
|
|
430
|
+
}
|
|
389
431
|
interface TransactionDetails {
|
|
390
432
|
/**
|
|
391
433
|
* Item associated with the transaction.
|
|
@@ -459,6 +501,115 @@ interface ChangeBalanceResponse {
|
|
|
459
501
|
*/
|
|
460
502
|
transactionId?: string | null;
|
|
461
503
|
}
|
|
504
|
+
interface BalanceExceededLimits {
|
|
505
|
+
/** Current balance */
|
|
506
|
+
balance?: BalanceAmount;
|
|
507
|
+
/**
|
|
508
|
+
* The requested amount
|
|
509
|
+
* @decimalValue options { maxScale:4 }
|
|
510
|
+
* @readonly
|
|
511
|
+
*/
|
|
512
|
+
requested?: string;
|
|
513
|
+
/**
|
|
514
|
+
* Lower limit
|
|
515
|
+
* @decimalValue options { maxScale:4 }
|
|
516
|
+
* @readonly
|
|
517
|
+
*/
|
|
518
|
+
lowerLimit?: string | null;
|
|
519
|
+
/**
|
|
520
|
+
* Upper limit
|
|
521
|
+
* @decimalValue options { maxScale:4 }
|
|
522
|
+
* @readonly
|
|
523
|
+
*/
|
|
524
|
+
upperLimit?: string | null;
|
|
525
|
+
/** Source balance type */
|
|
526
|
+
sourceBalanceType?: BalanceTypeWithLiterals;
|
|
527
|
+
/** Target balance type */
|
|
528
|
+
targetBalanceType?: BalanceTypeWithLiterals;
|
|
529
|
+
}
|
|
530
|
+
interface BulkChangeBalancesRequest {
|
|
531
|
+
/**
|
|
532
|
+
* List of balances to change.
|
|
533
|
+
* @minSize 1
|
|
534
|
+
* @maxSize 100
|
|
535
|
+
*/
|
|
536
|
+
requests?: ChangeBalanceRequest[];
|
|
537
|
+
/**
|
|
538
|
+
* Unique identifier, generated by the client.
|
|
539
|
+
* Used to recognize repeated attempts to make the same request.
|
|
540
|
+
* @maxLength 200
|
|
541
|
+
*/
|
|
542
|
+
idempotencyKey?: string;
|
|
543
|
+
/** Whether to return the full balance entities in the response. */
|
|
544
|
+
returnEntity?: boolean;
|
|
545
|
+
}
|
|
546
|
+
declare enum Type {
|
|
547
|
+
/** Unknown balance change type. */
|
|
548
|
+
UNKNOWN_OPERATION = "UNKNOWN_OPERATION"
|
|
549
|
+
}
|
|
550
|
+
/** @enumType */
|
|
551
|
+
type TypeWithLiterals = Type | 'UNKNOWN_OPERATION';
|
|
552
|
+
interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
553
|
+
/**
|
|
554
|
+
* ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
555
|
+
* @format GUID
|
|
556
|
+
*/
|
|
557
|
+
poolId?: string;
|
|
558
|
+
/** Identity changing the balance. */
|
|
559
|
+
instructingParty?: CommonIdentificationData;
|
|
560
|
+
/** Balance change type. */
|
|
561
|
+
type?: TypeWithLiterals;
|
|
562
|
+
/** Details to send to the transaction created from this balance change. */
|
|
563
|
+
transactionDetails?: TransactionDetails;
|
|
564
|
+
}
|
|
565
|
+
/** @oneof */
|
|
566
|
+
interface ChangeBalanceRequestOperationOneOf {
|
|
567
|
+
}
|
|
568
|
+
interface BulkChangeBalancesResponse {
|
|
569
|
+
/**
|
|
570
|
+
* Updated item and associated metadata.
|
|
571
|
+
* @minSize 1
|
|
572
|
+
* @maxSize 100
|
|
573
|
+
*/
|
|
574
|
+
results?: BulkChangeBalanceResult[];
|
|
575
|
+
/** Metadata. */
|
|
576
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
577
|
+
}
|
|
578
|
+
interface ItemMetadata {
|
|
579
|
+
/**
|
|
580
|
+
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
581
|
+
* @format GUID
|
|
582
|
+
*/
|
|
583
|
+
id?: string | null;
|
|
584
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
585
|
+
originalIndex?: number;
|
|
586
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
587
|
+
success?: boolean;
|
|
588
|
+
/** Details about the error in case of failure. */
|
|
589
|
+
error?: ApplicationError;
|
|
590
|
+
}
|
|
591
|
+
interface ApplicationError {
|
|
592
|
+
/** Error code. */
|
|
593
|
+
code?: string;
|
|
594
|
+
/** Description of the error. */
|
|
595
|
+
description?: string;
|
|
596
|
+
/** Data related to the error. */
|
|
597
|
+
data?: Record<string, any> | null;
|
|
598
|
+
}
|
|
599
|
+
interface BulkChangeBalanceResult {
|
|
600
|
+
/** Item metadata. */
|
|
601
|
+
itemMetadata?: ItemMetadata;
|
|
602
|
+
/** Updated item. */
|
|
603
|
+
balance?: Balance;
|
|
604
|
+
}
|
|
605
|
+
interface BulkActionMetadata {
|
|
606
|
+
/** Number of items that were successfully processed. */
|
|
607
|
+
totalSuccesses?: number;
|
|
608
|
+
/** Number of items that couldn't be processed. */
|
|
609
|
+
totalFailures?: number;
|
|
610
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
611
|
+
undetailedFailures?: number;
|
|
612
|
+
}
|
|
462
613
|
interface RevertBalanceChangeRequest {
|
|
463
614
|
/**
|
|
464
615
|
* ID of the transaction associated with the balance change to revert.
|
|
@@ -482,6 +633,208 @@ interface RevertBalanceChangeResponse {
|
|
|
482
633
|
*/
|
|
483
634
|
transactionId?: string | null;
|
|
484
635
|
}
|
|
636
|
+
interface ChangeAlreadyReverted {
|
|
637
|
+
/**
|
|
638
|
+
* The id of the transaction which was already reverted
|
|
639
|
+
* @format GUID
|
|
640
|
+
*/
|
|
641
|
+
originalTransactionId?: string;
|
|
642
|
+
/**
|
|
643
|
+
* The id of the transaction which reverted the original transaction
|
|
644
|
+
* @format GUID
|
|
645
|
+
*/
|
|
646
|
+
revertedTransactionId?: string;
|
|
647
|
+
}
|
|
648
|
+
interface NotEnoughBalance {
|
|
649
|
+
/** Current balance */
|
|
650
|
+
balance?: BalanceAmount;
|
|
651
|
+
/**
|
|
652
|
+
* The requested amount
|
|
653
|
+
* @decimalValue options { maxScale:4 }
|
|
654
|
+
* @readonly
|
|
655
|
+
*/
|
|
656
|
+
requested?: string;
|
|
657
|
+
}
|
|
658
|
+
interface GetTransactionReversibilityRequest {
|
|
659
|
+
/**
|
|
660
|
+
* Id of the transaction to get the reversibility
|
|
661
|
+
* @format GUID
|
|
662
|
+
*/
|
|
663
|
+
transactionId?: string;
|
|
664
|
+
}
|
|
665
|
+
interface GetTransactionReversibilityResponse {
|
|
666
|
+
/** The result of transaction reversibility validation */
|
|
667
|
+
transactionReversibility?: TransactionReversibilityWithLiterals;
|
|
668
|
+
}
|
|
669
|
+
/** Transaction reversibility results */
|
|
670
|
+
declare enum TransactionReversibility {
|
|
671
|
+
/** Transaction is allowed to be reverted */
|
|
672
|
+
TRANSACTION_IS_REVERSIBLE = "TRANSACTION_IS_REVERSIBLE",
|
|
673
|
+
/** Transaction isn't allowed to be reverted, because it was already reverted */
|
|
674
|
+
TRANSACTION_ALREADY_REVERSED = "TRANSACTION_ALREADY_REVERSED"
|
|
675
|
+
}
|
|
676
|
+
/** @enumType */
|
|
677
|
+
type TransactionReversibilityWithLiterals = TransactionReversibility | 'TRANSACTION_IS_REVERSIBLE' | 'TRANSACTION_ALREADY_REVERSED';
|
|
678
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
679
|
+
createdEvent?: EntityCreatedEvent;
|
|
680
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
681
|
+
deletedEvent?: EntityDeletedEvent;
|
|
682
|
+
actionEvent?: ActionEvent;
|
|
683
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
684
|
+
id?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
687
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
688
|
+
*/
|
|
689
|
+
entityFqdn?: string;
|
|
690
|
+
/**
|
|
691
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
692
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
693
|
+
*/
|
|
694
|
+
slug?: string;
|
|
695
|
+
/** ID of the entity associated with the event. */
|
|
696
|
+
entityId?: string;
|
|
697
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
698
|
+
eventTime?: Date | null;
|
|
699
|
+
/**
|
|
700
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
701
|
+
* (for example, GDPR).
|
|
702
|
+
*/
|
|
703
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
704
|
+
/** If present, indicates the action that triggered the event. */
|
|
705
|
+
originatedFrom?: string | null;
|
|
706
|
+
/**
|
|
707
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
708
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
709
|
+
*/
|
|
710
|
+
entityEventSequence?: string | null;
|
|
711
|
+
}
|
|
712
|
+
/** @oneof */
|
|
713
|
+
interface DomainEventBodyOneOf {
|
|
714
|
+
createdEvent?: EntityCreatedEvent;
|
|
715
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
716
|
+
deletedEvent?: EntityDeletedEvent;
|
|
717
|
+
actionEvent?: ActionEvent;
|
|
718
|
+
}
|
|
719
|
+
interface EntityCreatedEvent {
|
|
720
|
+
entityAsJson?: string;
|
|
721
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
722
|
+
restoreInfo?: RestoreInfo;
|
|
723
|
+
}
|
|
724
|
+
interface RestoreInfo {
|
|
725
|
+
deletedDate?: Date | null;
|
|
726
|
+
}
|
|
727
|
+
interface EntityUpdatedEvent {
|
|
728
|
+
/**
|
|
729
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
730
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
731
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
732
|
+
*/
|
|
733
|
+
currentEntityAsJson?: string;
|
|
734
|
+
}
|
|
735
|
+
interface EntityDeletedEvent {
|
|
736
|
+
/** Entity that was deleted. */
|
|
737
|
+
deletedEntityAsJson?: string | null;
|
|
738
|
+
}
|
|
739
|
+
interface ActionEvent {
|
|
740
|
+
bodyAsJson?: string;
|
|
741
|
+
}
|
|
742
|
+
interface MessageEnvelope {
|
|
743
|
+
/**
|
|
744
|
+
* App instance ID.
|
|
745
|
+
* @format GUID
|
|
746
|
+
*/
|
|
747
|
+
instanceId?: string | null;
|
|
748
|
+
/**
|
|
749
|
+
* Event type.
|
|
750
|
+
* @maxLength 150
|
|
751
|
+
*/
|
|
752
|
+
eventType?: string;
|
|
753
|
+
/** The identification type and identity data. */
|
|
754
|
+
identity?: IdentificationData;
|
|
755
|
+
/** Stringify payload. */
|
|
756
|
+
data?: string;
|
|
757
|
+
}
|
|
758
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
759
|
+
/**
|
|
760
|
+
* ID of a site visitor that has not logged in to the site.
|
|
761
|
+
* @format GUID
|
|
762
|
+
*/
|
|
763
|
+
anonymousVisitorId?: string;
|
|
764
|
+
/**
|
|
765
|
+
* ID of a site visitor that has logged in to the site.
|
|
766
|
+
* @format GUID
|
|
767
|
+
*/
|
|
768
|
+
memberId?: string;
|
|
769
|
+
/**
|
|
770
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
771
|
+
* @format GUID
|
|
772
|
+
*/
|
|
773
|
+
wixUserId?: string;
|
|
774
|
+
/**
|
|
775
|
+
* ID of an app.
|
|
776
|
+
* @format GUID
|
|
777
|
+
*/
|
|
778
|
+
appId?: string;
|
|
779
|
+
/** @readonly */
|
|
780
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
781
|
+
}
|
|
782
|
+
/** @oneof */
|
|
783
|
+
interface IdentificationDataIdOneOf {
|
|
784
|
+
/**
|
|
785
|
+
* ID of a site visitor that has not logged in to the site.
|
|
786
|
+
* @format GUID
|
|
787
|
+
*/
|
|
788
|
+
anonymousVisitorId?: string;
|
|
789
|
+
/**
|
|
790
|
+
* ID of a site visitor that has logged in to the site.
|
|
791
|
+
* @format GUID
|
|
792
|
+
*/
|
|
793
|
+
memberId?: string;
|
|
794
|
+
/**
|
|
795
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
796
|
+
* @format GUID
|
|
797
|
+
*/
|
|
798
|
+
wixUserId?: string;
|
|
799
|
+
/**
|
|
800
|
+
* ID of an app.
|
|
801
|
+
* @format GUID
|
|
802
|
+
*/
|
|
803
|
+
appId?: string;
|
|
804
|
+
}
|
|
805
|
+
declare enum WebhookIdentityType {
|
|
806
|
+
UNKNOWN = "UNKNOWN",
|
|
807
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
808
|
+
MEMBER = "MEMBER",
|
|
809
|
+
WIX_USER = "WIX_USER",
|
|
810
|
+
APP = "APP"
|
|
811
|
+
}
|
|
812
|
+
/** @enumType */
|
|
813
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
814
|
+
/** @docsIgnore */
|
|
815
|
+
type ChangeBalanceApplicationErrors = {
|
|
816
|
+
code?: 'ALREADY_EXECUTED';
|
|
817
|
+
description?: string;
|
|
818
|
+
data?: Record<string, any>;
|
|
819
|
+
} | {
|
|
820
|
+
code?: 'BALANCE_EXCEEDED_LIMITS';
|
|
821
|
+
description?: string;
|
|
822
|
+
data?: BalanceExceededLimits;
|
|
823
|
+
};
|
|
824
|
+
/** @docsIgnore */
|
|
825
|
+
type RevertBalanceChangeApplicationErrors = {
|
|
826
|
+
code?: 'CHANGE_ALREADY_REVERTED';
|
|
827
|
+
description?: string;
|
|
828
|
+
data?: ChangeAlreadyReverted;
|
|
829
|
+
} | {
|
|
830
|
+
code?: 'NOT_ENOUGH_BALANCE';
|
|
831
|
+
description?: string;
|
|
832
|
+
data?: NotEnoughBalance;
|
|
833
|
+
} | {
|
|
834
|
+
code?: 'TRANSACTION_NOT_FOUND';
|
|
835
|
+
description?: string;
|
|
836
|
+
data?: Record<string, any>;
|
|
837
|
+
};
|
|
485
838
|
|
|
486
839
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
487
840
|
getUrl: (context: any) => string;
|
|
@@ -505,4 +858,4 @@ declare function revertBalanceChange(): __PublicMethodMetaInfo<'POST', {
|
|
|
505
858
|
transactionId: string;
|
|
506
859
|
}, RevertBalanceChangeRequest$1, RevertBalanceChangeRequest, RevertBalanceChangeResponse$1, RevertBalanceChangeResponse>;
|
|
507
860
|
|
|
508
|
-
export { type __PublicMethodMetaInfo, changeBalance, getBalance, listBalances, queryBalances, revertBalanceChange };
|
|
861
|
+
export { type ActionEvent as ActionEventOriginal, type AdjustOptions as AdjustOptionsOriginal, type ApplicationError as ApplicationErrorOriginal, type BalanceAmount as BalanceAmountOriginal, type BalanceChangeBalanceRequestOperationOneOf as BalanceChangeBalanceRequestOperationOneOfOriginal, type BalanceChangeBalanceRequest as BalanceChangeBalanceRequestOriginal, type BalanceExceededLimits as BalanceExceededLimitsOriginal, type Balance as BalanceOriginal, BalanceType as BalanceTypeOriginal, type BalanceTypeWithLiterals as BalanceTypeWithLiteralsOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkChangeBalanceResult as BulkChangeBalanceResultOriginal, type BulkChangeBalancesRequest as BulkChangeBalancesRequestOriginal, type BulkChangeBalancesResponse as BulkChangeBalancesResponseOriginal, type ChangeAlreadyReverted as ChangeAlreadyRevertedOriginal, type ChangeBalanceApplicationErrors as ChangeBalanceApplicationErrorsOriginal, type ChangeBalanceRequestOperationOneOf as ChangeBalanceRequestOperationOneOfOriginal, type ChangeBalanceRequest as ChangeBalanceRequestOriginal, ChangeBalanceRequestType as ChangeBalanceRequestTypeOriginal, type ChangeBalanceRequestTypeWithLiterals as ChangeBalanceRequestTypeWithLiteralsOriginal, type ChangeBalanceResponse as ChangeBalanceResponseOriginal, type CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOfOriginal, type CommonIdentificationData as CommonIdentificationDataOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetBalanceRequest as GetBalanceRequestOriginal, type GetBalanceResponse as GetBalanceResponseOriginal, type GetTransactionReversibilityRequest as GetTransactionReversibilityRequestOriginal, type GetTransactionReversibilityResponse as GetTransactionReversibilityResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type ItemMetadata as ItemMetadataOriginal, type Item as ItemOriginal, LimitRule as LimitRuleOriginal, type LimitRuleWithLiterals as LimitRuleWithLiteralsOriginal, type ListBalancesRequest as ListBalancesRequestOriginal, type ListBalancesResponse as ListBalancesResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type NotEnoughBalance as NotEnoughBalanceOriginal, type PoolInfo as PoolInfoOriginal, PoolStatus as PoolStatusOriginal, type PoolStatusWithLiterals as PoolStatusWithLiteralsOriginal, type QueryBalancesRequest as QueryBalancesRequestOriginal, type QueryBalancesResponse as QueryBalancesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type RevertBalanceChangeApplicationErrors as RevertBalanceChangeApplicationErrorsOriginal, type RevertBalanceChangeRequest as RevertBalanceChangeRequestOriginal, type RevertBalanceChangeResponse as RevertBalanceChangeResponseOriginal, type RolloverConfigurationInfo as RolloverConfigurationInfoOriginal, type SetInitialOptions as SetInitialOptionsOriginal, type SetOptions as SetOptionsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TransactionDetails as TransactionDetailsOriginal, TransactionReversibility as TransactionReversibilityOriginal, type TransactionReversibilityWithLiterals as TransactionReversibilityWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, changeBalance, getBalance, listBalances, queryBalances, revertBalanceChange };
|
package/build/es/meta.mjs
CHANGED
|
@@ -133,6 +133,9 @@ function getBalance(payload) {
|
|
|
133
133
|
method: "GET",
|
|
134
134
|
methodFqn: "wix.benefit_programs.v1.balance.BalanceService.GetBalance",
|
|
135
135
|
packageName: PACKAGE_NAME,
|
|
136
|
+
migrationOptions: {
|
|
137
|
+
optInTransformResponse: true
|
|
138
|
+
},
|
|
136
139
|
url: resolveWixBenefitProgramsV1BalanceBalanceServiceUrl({
|
|
137
140
|
protoPath: "/v1/balances/{poolId}",
|
|
138
141
|
data: payload,
|
|
@@ -160,6 +163,9 @@ function listBalances(payload) {
|
|
|
160
163
|
method: "GET",
|
|
161
164
|
methodFqn: "wix.benefit_programs.v1.balance.BalanceService.ListBalances",
|
|
162
165
|
packageName: PACKAGE_NAME,
|
|
166
|
+
migrationOptions: {
|
|
167
|
+
optInTransformResponse: true
|
|
168
|
+
},
|
|
163
169
|
url: resolveWixBenefitProgramsV1BalanceBalanceServiceUrl({
|
|
164
170
|
protoPath: "/v1/balances",
|
|
165
171
|
data: payload,
|
|
@@ -187,6 +193,9 @@ function queryBalances(payload) {
|
|
|
187
193
|
method: "POST",
|
|
188
194
|
methodFqn: "wix.benefit_programs.v1.balance.BalanceService.QueryBalances",
|
|
189
195
|
packageName: PACKAGE_NAME,
|
|
196
|
+
migrationOptions: {
|
|
197
|
+
optInTransformResponse: true
|
|
198
|
+
},
|
|
190
199
|
url: resolveWixBenefitProgramsV1BalanceBalanceServiceUrl({
|
|
191
200
|
protoPath: "/v1/balances/query",
|
|
192
201
|
data: payload,
|
|
@@ -220,6 +229,9 @@ function changeBalance(payload) {
|
|
|
220
229
|
method: "POST",
|
|
221
230
|
methodFqn: "wix.benefit_programs.v1.balance.BalanceService.ChangeBalance",
|
|
222
231
|
packageName: PACKAGE_NAME,
|
|
232
|
+
migrationOptions: {
|
|
233
|
+
optInTransformResponse: true
|
|
234
|
+
},
|
|
223
235
|
url: resolveWixBenefitProgramsV1BalanceBalanceServiceUrl({
|
|
224
236
|
protoPath: "/v1/balances/{poolId}/change",
|
|
225
237
|
data: serializedData,
|
|
@@ -247,6 +259,9 @@ function revertBalanceChange(payload) {
|
|
|
247
259
|
method: "POST",
|
|
248
260
|
methodFqn: "wix.benefit_programs.v1.balance.BalanceService.RevertBalanceChange",
|
|
249
261
|
packageName: PACKAGE_NAME,
|
|
262
|
+
migrationOptions: {
|
|
263
|
+
optInTransformResponse: true
|
|
264
|
+
},
|
|
250
265
|
url: resolveWixBenefitProgramsV1BalanceBalanceServiceUrl({
|
|
251
266
|
protoPath: "/v1/balances/changes/{transactionId}/revert",
|
|
252
267
|
data: payload,
|
|
@@ -259,6 +274,65 @@ function revertBalanceChange(payload) {
|
|
|
259
274
|
return __revertBalanceChange;
|
|
260
275
|
}
|
|
261
276
|
|
|
277
|
+
// src/benefit-programs-v1-balance-balances.types.ts
|
|
278
|
+
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
279
|
+
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
280
|
+
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
281
|
+
IdentityType2["MEMBER"] = "MEMBER";
|
|
282
|
+
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
283
|
+
return IdentityType2;
|
|
284
|
+
})(IdentityType || {});
|
|
285
|
+
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
286
|
+
PoolStatus2["UNDEFINED"] = "UNDEFINED";
|
|
287
|
+
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
288
|
+
PoolStatus2["PAUSED"] = "PAUSED";
|
|
289
|
+
PoolStatus2["ENDED"] = "ENDED";
|
|
290
|
+
PoolStatus2["PROVISIONING"] = "PROVISIONING";
|
|
291
|
+
PoolStatus2["RENEWING"] = "RENEWING";
|
|
292
|
+
return PoolStatus2;
|
|
293
|
+
})(PoolStatus || {});
|
|
294
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
295
|
+
SortOrder2["ASC"] = "ASC";
|
|
296
|
+
SortOrder2["DESC"] = "DESC";
|
|
297
|
+
return SortOrder2;
|
|
298
|
+
})(SortOrder || {});
|
|
299
|
+
var ChangeBalanceRequestType = /* @__PURE__ */ ((ChangeBalanceRequestType2) => {
|
|
300
|
+
ChangeBalanceRequestType2["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
301
|
+
ChangeBalanceRequestType2["ADJUST"] = "ADJUST";
|
|
302
|
+
ChangeBalanceRequestType2["SET"] = "SET";
|
|
303
|
+
return ChangeBalanceRequestType2;
|
|
304
|
+
})(ChangeBalanceRequestType || {});
|
|
305
|
+
var LimitRule = /* @__PURE__ */ ((LimitRule2) => {
|
|
306
|
+
LimitRule2["UNKNOWN_LIMIT_RULE"] = "UNKNOWN_LIMIT_RULE";
|
|
307
|
+
LimitRule2["FAIL"] = "FAIL";
|
|
308
|
+
LimitRule2["SOFT_ENFORCE"] = "SOFT_ENFORCE";
|
|
309
|
+
LimitRule2["HARD_ENFORCE"] = "HARD_ENFORCE";
|
|
310
|
+
return LimitRule2;
|
|
311
|
+
})(LimitRule || {});
|
|
312
|
+
var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
|
|
313
|
+
BalanceType2["UNDEFINED"] = "UNDEFINED";
|
|
314
|
+
BalanceType2["AVAILABLE"] = "AVAILABLE";
|
|
315
|
+
BalanceType2["EXTERNAL"] = "EXTERNAL";
|
|
316
|
+
return BalanceType2;
|
|
317
|
+
})(BalanceType || {});
|
|
318
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
319
|
+
Type2["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
320
|
+
return Type2;
|
|
321
|
+
})(Type || {});
|
|
322
|
+
var TransactionReversibility = /* @__PURE__ */ ((TransactionReversibility2) => {
|
|
323
|
+
TransactionReversibility2["TRANSACTION_IS_REVERSIBLE"] = "TRANSACTION_IS_REVERSIBLE";
|
|
324
|
+
TransactionReversibility2["TRANSACTION_ALREADY_REVERSED"] = "TRANSACTION_ALREADY_REVERSED";
|
|
325
|
+
return TransactionReversibility2;
|
|
326
|
+
})(TransactionReversibility || {});
|
|
327
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
328
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
329
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
330
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
331
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
332
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
333
|
+
return WebhookIdentityType2;
|
|
334
|
+
})(WebhookIdentityType || {});
|
|
335
|
+
|
|
262
336
|
// src/benefit-programs-v1-balance-balances.meta.ts
|
|
263
337
|
function getBalance2() {
|
|
264
338
|
const payload = { poolId: ":poolId" };
|
|
@@ -351,6 +425,15 @@ function revertBalanceChange2() {
|
|
|
351
425
|
};
|
|
352
426
|
}
|
|
353
427
|
export {
|
|
428
|
+
BalanceType as BalanceTypeOriginal,
|
|
429
|
+
ChangeBalanceRequestType as ChangeBalanceRequestTypeOriginal,
|
|
430
|
+
IdentityType as IdentityTypeOriginal,
|
|
431
|
+
LimitRule as LimitRuleOriginal,
|
|
432
|
+
PoolStatus as PoolStatusOriginal,
|
|
433
|
+
SortOrder as SortOrderOriginal,
|
|
434
|
+
TransactionReversibility as TransactionReversibilityOriginal,
|
|
435
|
+
Type as TypeOriginal,
|
|
436
|
+
WebhookIdentityType as WebhookIdentityTypeOriginal,
|
|
354
437
|
changeBalance2 as changeBalance,
|
|
355
438
|
getBalance2 as getBalance,
|
|
356
439
|
listBalances2 as listBalances,
|