@wix/auto_sdk_loyalty_programs 1.0.24 → 1.0.25
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 +24 -9
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.mts +24 -9
- package/build/es/index.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -9
- package/build/internal/es/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
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 { GetLoyaltyProgramResponse, BulkGetLoyaltyProgramResponse, LoyaltyProgram, UpdateLoyaltyProgramResponse, ActivateLoyaltyProgramResponse, PauseLoyaltyProgramResponse, GetLoyaltyProgramPremiumFeaturesResponse, EnablePointsExpirationResponse, DisablePointsExpirationResponse, ProgramUpdatedEnvelope } from './index.typings.js';
|
|
3
3
|
export { ActionEvent, ActivateLoyaltyProgramRequest, Asset, AssignedFromFloatingReason, BaseEventMetadata, BooleanFeature, BulkGetLoyaltyProgramRequest, CancelRequestedReason, ContractSwitchedReason, DeleteContext, DeleteStatus, DisablePointsExpirationRequest, DomainEvent, DomainEventBodyOneOf, Empty, EnablePointsExpirationRequest, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Feature, FeatureCancelled, FeatureCancelledReasonOneOf, FeatureContext, FeatureDisabled, FeatureDisabledReasonOneOf, FeatureEnabled, FeatureEnabledReasonOneOf, FeatureEvent, FeatureEventEventOneOf, FeaturePeriod, FeatureQuantityInfoOneOf, FeatureUpdated, FeatureUpdatedPreviousQuantityInfoOneOf, FeatureUpdatedReasonOneOf, FocalPoint, GetLoyaltyProgramDescriptionRequest, GetLoyaltyProgramDescriptionResponse, GetLoyaltyProgramPremiumFeaturesRequest, GetLoyaltyProgramRequest, IdentificationData, IdentificationDataIdOneOf, LoyaltyProgramActivated, LoyaltyProgramDescriptionUpdated, ManualFeatureCreationReason, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigratedFromLegacyReason, Namespace, NamespaceChanged, NewFeatureReason, OdeditorAssigned, OdeditorUnassigned, PauseLoyaltyProgramRequest, PicassoAssigned, PicassoUnassigned, PointDefinition, PointsExpiration, PointsExpirationChanges, PointsExpirationConfigurationChanged, PointsExpirationDisabled, PointsExpirationEnabled, PremiumFeatures, ProgramInSite, ProgramStatus, QuotaFeature, QuotaInfo, ReassignedFromSiteReason, ReassignedToAnotherSiteReason, ReplacedByAnotherSubscriptionReason, RestoreInfo, ServiceProvisioned, ServiceRemoved, SiteCreated, SiteCreatedContext, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SocialMediaChannel, SocialMediaSettings, State, Status, StudioAssigned, StudioUnassigned, TransferredFromAnotherAccountReason, TransferredToAnotherAccountReason, Type, UnAssingedToFloatingReason, UpdateLoyaltyProgramDescriptionRequest, UpdateLoyaltyProgramDescriptionResponse, UpdateLoyaltyProgramRequest, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type ProgramNonNullablePaths = `status` | `pointsExpiration.status` | `pointsExpiration.monthsOfInactivity` | `pointsExpiration.expiringPointsPercentage` | `premiumFeatures.loyaltyProgram` | `premiumFeatures.tiers` | `premiumFeatures.pointsExpiration`;
|
|
5
6
|
declare function getLoyaltyProgram$1(httpClient: HttpClient): GetLoyaltyProgramSignature;
|
|
6
7
|
interface GetLoyaltyProgramSignature {
|
|
7
8
|
/**
|
|
@@ -9,7 +10,9 @@ interface GetLoyaltyProgramSignature {
|
|
|
9
10
|
*
|
|
10
11
|
* The `getLoyaltyProgram()` function returns a Promise that resolves to the site's loyalty program.
|
|
11
12
|
*/
|
|
12
|
-
(): Promise<GetLoyaltyProgramResponse
|
|
13
|
+
(): Promise<NonNullablePaths<GetLoyaltyProgramResponse, {
|
|
14
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
15
|
+
}[ProgramNonNullablePaths]>>;
|
|
13
16
|
}
|
|
14
17
|
declare function bulkGetLoyaltyProgram$1(httpClient: HttpClient): BulkGetLoyaltyProgramSignature;
|
|
15
18
|
interface BulkGetLoyaltyProgramSignature {
|
|
@@ -18,7 +21,9 @@ interface BulkGetLoyaltyProgramSignature {
|
|
|
18
21
|
*
|
|
19
22
|
* Must be called with user identity.
|
|
20
23
|
*/
|
|
21
|
-
(): Promise<BulkGetLoyaltyProgramResponse
|
|
24
|
+
(): Promise<NonNullablePaths<BulkGetLoyaltyProgramResponse, `programInSites` | `programInSites.${number}.metaSiteId` | {
|
|
25
|
+
[P in ProgramNonNullablePaths]: `programInSites.${number}.loyaltyProgram.${P}`;
|
|
26
|
+
}[ProgramNonNullablePaths]>>;
|
|
22
27
|
}
|
|
23
28
|
declare function updateLoyaltyProgram$1(httpClient: HttpClient): UpdateLoyaltyProgramSignature;
|
|
24
29
|
interface UpdateLoyaltyProgramSignature {
|
|
@@ -32,7 +37,9 @@ interface UpdateLoyaltyProgramSignature {
|
|
|
32
37
|
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
33
38
|
* @param - Loyalty program fields to update.
|
|
34
39
|
*/
|
|
35
|
-
(loyaltyProgram: LoyaltyProgram): Promise<UpdateLoyaltyProgramResponse
|
|
40
|
+
(loyaltyProgram: LoyaltyProgram): Promise<NonNullablePaths<UpdateLoyaltyProgramResponse, {
|
|
41
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
42
|
+
}[ProgramNonNullablePaths]>>;
|
|
36
43
|
}
|
|
37
44
|
declare function activateLoyaltyProgram$1(httpClient: HttpClient): ActivateLoyaltyProgramSignature;
|
|
38
45
|
interface ActivateLoyaltyProgramSignature {
|
|
@@ -53,35 +60,43 @@ interface ActivateLoyaltyProgramSignature {
|
|
|
53
60
|
*
|
|
54
61
|
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can activate a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
55
62
|
*/
|
|
56
|
-
(): Promise<ActivateLoyaltyProgramResponse
|
|
63
|
+
(): Promise<NonNullablePaths<ActivateLoyaltyProgramResponse, {
|
|
64
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
65
|
+
}[ProgramNonNullablePaths]>>;
|
|
57
66
|
}
|
|
58
67
|
declare function pauseLoyaltyProgram$1(httpClient: HttpClient): PauseLoyaltyProgramSignature;
|
|
59
68
|
interface PauseLoyaltyProgramSignature {
|
|
60
69
|
/**
|
|
61
70
|
* Changes the program status to `PAUSED`.
|
|
62
71
|
*/
|
|
63
|
-
(): Promise<PauseLoyaltyProgramResponse
|
|
72
|
+
(): Promise<NonNullablePaths<PauseLoyaltyProgramResponse, {
|
|
73
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
74
|
+
}[ProgramNonNullablePaths]>>;
|
|
64
75
|
}
|
|
65
76
|
declare function getLoyaltyProgramPremiumFeatures$1(httpClient: HttpClient): GetLoyaltyProgramPremiumFeaturesSignature;
|
|
66
77
|
interface GetLoyaltyProgramPremiumFeaturesSignature {
|
|
67
78
|
/**
|
|
68
79
|
* Retrieves information about the available loyalty program premium features.
|
|
69
80
|
*/
|
|
70
|
-
(): Promise<GetLoyaltyProgramPremiumFeaturesResponse
|
|
81
|
+
(): Promise<NonNullablePaths<GetLoyaltyProgramPremiumFeaturesResponse, `loyaltyProgram` | `tiers` | `pointsExpiration`>>;
|
|
71
82
|
}
|
|
72
83
|
declare function enablePointsExpiration$1(httpClient: HttpClient): EnablePointsExpirationSignature;
|
|
73
84
|
interface EnablePointsExpirationSignature {
|
|
74
85
|
/**
|
|
75
86
|
* Updates the `pointsExpiration` status to `ENABLED`.
|
|
76
87
|
*/
|
|
77
|
-
(): Promise<EnablePointsExpirationResponse
|
|
88
|
+
(): Promise<NonNullablePaths<EnablePointsExpirationResponse, {
|
|
89
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
90
|
+
}[ProgramNonNullablePaths]>>;
|
|
78
91
|
}
|
|
79
92
|
declare function disablePointsExpiration$1(httpClient: HttpClient): DisablePointsExpirationSignature;
|
|
80
93
|
interface DisablePointsExpirationSignature {
|
|
81
94
|
/**
|
|
82
95
|
* Updates the `pointsExpiration` status to `DISABLED`.
|
|
83
96
|
*/
|
|
84
|
-
(): Promise<DisablePointsExpirationResponse
|
|
97
|
+
(): Promise<NonNullablePaths<DisablePointsExpirationResponse, {
|
|
98
|
+
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
99
|
+
}[ProgramNonNullablePaths]>>;
|
|
85
100
|
}
|
|
86
101
|
declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.v1.program_updated">;
|
|
87
102
|
|