@wix/auto_sdk_loyalty_earning-rules 1.0.16 → 1.0.18
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.d.ts +35 -13
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +24 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +35 -13
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +24 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +4 -4
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +35 -13
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +24 -11
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +4 -4
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +35 -13
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +24 -11
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +4 -4
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { LoyaltyEarningRule, BulkCreateLoyaltyEarningRulesResponse, TypeWithLiterals, CreateCustomLoyaltyEarningRuleOptions, CreateCustomLoyaltyEarningRuleResponse, UpdateLoyaltyEarningRule, UpdateLoyaltyEarningRuleResponse, DeleteLoyaltyEarningRuleOptions, ListEarningRulesOptions, ListEarningRulesResponse, LoyaltyEarningRuleCreatedEnvelope, LoyaltyEarningRuleDeletedEnvelope, LoyaltyEarningRuleUpdatedEnvelope } from './index.typings.js';
|
|
3
3
|
export { ActionEvent, ApplicationError, Asset, BaseEventMetadata, BulkActionMetadata, BulkCreateLoyaltyEarningRulesRequest, BulkLoyaltyEarningRuleResult, CacheInvalidated, ConversionRate, ConversionRateConfig, CreateCustomLoyaltyEarningRuleRequest, CreateLoyaltyEarningRuleRequest, CreateLoyaltyEarningRuleResponse, CursorPaging, Cursors, CustomLoyaltyEarningRule, CustomLoyaltyEarningRuleTypeOneOf, DeleteAutomationEarningRuleRequest, DeleteAutomationEarningRuleResponse, DeleteContext, DeleteLoyaltyEarningRuleRequest, DeleteLoyaltyEarningRuleResponse, DeleteStatus, DomainEvent, DomainEventBodyOneOf, EarningRuleDisabled, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FixedAmount, FixedAmountConfig, GetLoyaltyEarningRuleRequest, GetLoyaltyEarningRuleResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateEarningRuleCacheRequest, InvalidateEarningRuleCacheResponse, ItemMetadata, ListEarningRulesInTierRequest, ListEarningRulesInTierResponse, ListEarningRulesRequest, LoyaltyEarningRuleTypeOneOf, LoyaltyEarningRuleTypeTag, LoyaltyEarningRuleTypeTagType, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Metadata, Namespace, NamespaceChanged, OdeditorAssigned, OdeditorUnassigned, PagingMetadataV2, PicassoAssigned, PicassoUnassigned, RestoreInfo, ServiceProvisioned, ServiceRemoved, SiteCreated, SiteCreatedContext, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, State, Status, StudioAssigned, StudioUnassigned, Type, UpdateLoyaltyEarningRuleRequest, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type LoyaltyEarningRuleNonNullablePaths = `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted`;
|
|
5
6
|
declare function createLoyaltyEarningRule$1(httpClient: HttpClient): CreateLoyaltyEarningRuleSignature;
|
|
6
7
|
interface CreateLoyaltyEarningRuleSignature {
|
|
7
8
|
/**
|
|
8
9
|
* Creates a non-automated earning rule.
|
|
9
10
|
*
|
|
10
11
|
* >**Note**: You can only create non-automated earning rules from a supported list.
|
|
11
|
-
* For the supported list of services, see the
|
|
12
|
+
* For the supported list of services, see the Introduction.
|
|
12
13
|
* @param - Earning rule to create.
|
|
13
14
|
* @returns Created earning rule.
|
|
14
15
|
*/
|
|
15
|
-
(earningRule: LoyaltyEarningRule): Promise<LoyaltyEarningRule
|
|
16
|
+
(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
|
|
16
17
|
}
|
|
17
18
|
declare function bulkCreateLoyaltyEarningRules$1(httpClient: HttpClient): BulkCreateLoyaltyEarningRulesSignature;
|
|
18
19
|
interface BulkCreateLoyaltyEarningRulesSignature {
|
|
@@ -20,29 +21,35 @@ interface BulkCreateLoyaltyEarningRulesSignature {
|
|
|
20
21
|
* Creates multiple non-automated earning rules.
|
|
21
22
|
*
|
|
22
23
|
* >**Note**: You can only create non-automated earning rules from a supported list.
|
|
23
|
-
* For the supported list of services, see the
|
|
24
|
+
* For the supported list of services, see the Introduction.
|
|
24
25
|
* @param - Earning rules to create.
|
|
25
26
|
*/
|
|
26
|
-
(earningRules: LoyaltyEarningRule[]): Promise<BulkCreateLoyaltyEarningRulesResponse
|
|
27
|
+
(earningRules: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>[]): Promise<NonNullablePaths<BulkCreateLoyaltyEarningRulesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
28
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `results.${number}.item.${P}`;
|
|
29
|
+
}[LoyaltyEarningRuleNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
27
30
|
}
|
|
28
31
|
declare function createCustomLoyaltyEarningRule$1(httpClient: HttpClient): CreateCustomLoyaltyEarningRuleSignature;
|
|
29
32
|
interface CreateCustomLoyaltyEarningRuleSignature {
|
|
30
33
|
/**
|
|
31
34
|
* Creates a custom automated earning rule.
|
|
32
35
|
*
|
|
33
|
-
* To learn more about the automated rules,
|
|
36
|
+
* To learn more about the automated rules, see the Introduction.
|
|
34
37
|
* @param - Type of the custom earning rule.
|
|
35
38
|
*/
|
|
36
|
-
(type: TypeWithLiterals, options?: CreateCustomLoyaltyEarningRuleOptions
|
|
39
|
+
(type: TypeWithLiterals, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, {
|
|
40
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
|
|
41
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
37
42
|
}
|
|
38
43
|
declare function getLoyaltyEarningRule$1(httpClient: HttpClient): GetLoyaltyEarningRuleSignature;
|
|
39
44
|
interface GetLoyaltyEarningRuleSignature {
|
|
40
45
|
/**
|
|
41
46
|
* Retrieves a specified non-automated earning rule.
|
|
47
|
+
*
|
|
48
|
+
* To retrieve both automated and non-automated earning rules, call List Earning Rules.
|
|
42
49
|
* @param - ID of the earning rule to retrieve.
|
|
43
50
|
* @returns Retrieved earning rule.
|
|
44
51
|
*/
|
|
45
|
-
(_id: string): Promise<LoyaltyEarningRule
|
|
52
|
+
(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
|
|
46
53
|
}
|
|
47
54
|
declare function updateLoyaltyEarningRule$1(httpClient: HttpClient): UpdateLoyaltyEarningRuleSignature;
|
|
48
55
|
interface UpdateLoyaltyEarningRuleSignature {
|
|
@@ -52,25 +59,38 @@ interface UpdateLoyaltyEarningRuleSignature {
|
|
|
52
59
|
* Supports partial updates.
|
|
53
60
|
*
|
|
54
61
|
* Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
|
|
55
|
-
* the current revision must be passed when updating the earning rule.
|
|
62
|
+
* the current `revision` must be passed when updating the earning rule.
|
|
56
63
|
* @param - Loyalty earning rule ID.
|
|
57
64
|
*/
|
|
58
|
-
(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<UpdateLoyaltyEarningRuleResponse
|
|
65
|
+
(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, {
|
|
66
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
|
|
67
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
59
68
|
}
|
|
60
69
|
declare function deleteLoyaltyEarningRule$1(httpClient: HttpClient): DeleteLoyaltyEarningRuleSignature;
|
|
61
70
|
interface DeleteLoyaltyEarningRuleSignature {
|
|
62
71
|
/**
|
|
63
72
|
* Deletes a non-automated earning rule.
|
|
73
|
+
*
|
|
74
|
+
* To delete an automated earning rule, call
|
|
75
|
+
* Delete Automation Earning Rule.
|
|
76
|
+
*
|
|
77
|
+
* To update an earning rule's status instead of deleting it, call
|
|
78
|
+
* Update Loyalty Earning Rule.
|
|
64
79
|
* @param - ID of the earning rule to delete.
|
|
65
80
|
*/
|
|
66
|
-
(_id: string, options?: DeleteLoyaltyEarningRuleOptions
|
|
81
|
+
(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
|
|
67
82
|
}
|
|
68
83
|
declare function deleteAutomationEarningRule$1(httpClient: HttpClient): DeleteAutomationEarningRuleSignature;
|
|
69
84
|
interface DeleteAutomationEarningRuleSignature {
|
|
70
85
|
/**
|
|
71
86
|
* Deletes a custom automated earning rule.
|
|
87
|
+
* Pre-installed automated rules can only be paused, not deleted.
|
|
88
|
+
*
|
|
89
|
+
* To update an earning rule's status instead of deleting it, call
|
|
90
|
+
* Update Loyalty Earning Rule.
|
|
72
91
|
*
|
|
73
|
-
*
|
|
92
|
+
* To delete a non-automated earning rule, call
|
|
93
|
+
* Delete Loyalty Earning Rule.
|
|
74
94
|
* @param - ID of the earning rule to delete.
|
|
75
95
|
*/
|
|
76
96
|
(_id: string): Promise<void>;
|
|
@@ -84,7 +104,9 @@ interface ListEarningRulesSignature {
|
|
|
84
104
|
*
|
|
85
105
|
* You can filter the results by `triggerAppId` or `triggerActivityType`.
|
|
86
106
|
*/
|
|
87
|
-
(options?: ListEarningRulesOptions
|
|
107
|
+
(options?: ListEarningRulesOptions): Promise<NonNullablePaths<ListEarningRulesResponse, {
|
|
108
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRules.${number}.${P}`;
|
|
109
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
88
110
|
}
|
|
89
111
|
declare const onLoyaltyEarningRuleCreated$1: EventDefinition<LoyaltyEarningRuleCreatedEnvelope, "wix.loyalty.v1.loyalty_earning_rule_created">;
|
|
90
112
|
declare const onLoyaltyEarningRuleDeleted$1: EventDefinition<LoyaltyEarningRuleDeletedEnvelope, "wix.loyalty.v1.loyalty_earning_rule_deleted">;
|