@wix/auto_sdk_loyalty_programs 1.0.25 → 1.0.27

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.
@@ -1,9 +1,8 @@
1
1
  import { NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  /**
4
- * A loyalty program allows sites to maintain customer reward accounts. Site owners can create a
5
- * loyalty program to increase customer retention. Read more about the loyalty program in
6
- * [this overview](https://support.wix.com/en/article/wix-loyalty-program-an-overview).
4
+ * A loyalty program allows sites to maintain customer reward accounts. Wix users can create a
5
+ * loyalty program to increase customer retention. Read more about the [loyalty program](https://support.wix.com/en/article/wix-loyalty-program-an-overview).
7
6
  */
8
7
  interface LoyaltyProgram {
9
8
  /**
@@ -12,10 +11,11 @@ interface LoyaltyProgram {
12
11
  * @maxLength 50
13
12
  */
14
13
  name?: string | null;
15
- /** Information about the program's collectible entity. */
14
+ /** Details about the program's collectible unit. */
16
15
  pointDefinition?: PointDefinition;
17
16
  /**
18
- * Program status. Customers can only earn or redeem points while the program is `ACTIVE`.
17
+ * Program status.
18
+ * Customers can only earn or redeem points while the program is `"ACTIVE"`.
19
19
  *
20
20
  * Default: `"DRAFT"`
21
21
  * @readonly
@@ -43,11 +43,11 @@ interface PointDefinition {
43
43
  /**
44
44
  * Display name for the program's collectible unit.
45
45
  *
46
- * It's recommended to use a plural, for example `Stars`.
46
+ * It's recommended to use a plural, for example `"Stars"`.
47
47
  *
48
48
  * In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances.
49
49
  *
50
- * Default: `Points`.
50
+ * Default: `"Points"`.
51
51
  * @maxLength 20
52
52
  */
53
53
  customName?: string | null;
@@ -67,11 +67,15 @@ interface FocalPoint {
67
67
  declare enum ProgramStatus {
68
68
  /** Unknown program status. */
69
69
  UNKNOWN = "UNKNOWN",
70
- /** Program was created but is not enabled yet. */
70
+ /** Program is in draft mode. Customers can't earn or redeem points. */
71
71
  DRAFT = "DRAFT",
72
- /** Program is active. */
72
+ /** Program is active. Customers can earn and redeem points. */
73
73
  ACTIVE = "ACTIVE",
74
- /** Program was manually disabled by the user. This action can be reverted, meaning the user can set it to be active again. */
74
+ /**
75
+ * Program is paused. Customers can't earn or redeem points while the program is paused.
76
+ *
77
+ * Set the program to `"ACTIVE"` to resume earning and redeeming points.
78
+ */
75
79
  PAUSED = "PAUSED"
76
80
  }
77
81
  /** @enumType */
@@ -1371,9 +1375,7 @@ interface ProgramUpdatedEnvelope {
1371
1375
  declare function onProgramUpdated(handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>): void;
1372
1376
  type ProgramNonNullablePaths = `status` | `pointsExpiration.status` | `pointsExpiration.monthsOfInactivity` | `pointsExpiration.expiringPointsPercentage` | `premiumFeatures.loyaltyProgram` | `premiumFeatures.tiers` | `premiumFeatures.pointsExpiration`;
1373
1377
  /**
1374
- * Retrieves the site's loyalty program.
1375
- *
1376
- * The `getLoyaltyProgram()` function returns a Promise that resolves to the site's loyalty program.
1378
+ * Retrieves the loyalty program.
1377
1379
  * @public
1378
1380
  * @permissionId LOYALTY.READ_PROGRAM
1379
1381
  * @applicableIdentity APP
@@ -1395,13 +1397,10 @@ declare function bulkGetLoyaltyProgram(): Promise<NonNullablePaths<BulkGetLoyalt
1395
1397
  [P in ProgramNonNullablePaths]: `programInSites.${number}.loyaltyProgram.${P}`;
1396
1398
  }[ProgramNonNullablePaths]>>;
1397
1399
  /**
1398
- * Updates the site's loyalty program.
1399
- *
1400
- * The `updateLoyaltyProgram()` function returns a Promise that resolves when the loyalty program is updated.
1401
- *
1402
- * With the `updateLoyaltyProgram()` function you can update the name of the loyalty program and the details of the collectible points unit. To activate the loyalty program use the [`activateLoyaltyProgram()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/programs/activate-loyalty-program) function.
1400
+ * Updates a site's loyalty program.
1403
1401
  *
1404
- * >**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.
1402
+ * This method updates the name of the loyalty program and the details of the collectible points unit.
1403
+ * To activate the loyalty program, call Activate Loyalty Program.
1405
1404
  * @param loyaltyProgram - Loyalty program fields to update.
1406
1405
  * @public
1407
1406
  * @requiredField loyaltyProgram
@@ -1415,19 +1414,13 @@ declare function updateLoyaltyProgram(loyaltyProgram: LoyaltyProgram): Promise<N
1415
1414
  /**
1416
1415
  * Activates a loyalty program.
1417
1416
  *
1418
- * The `activateLoyaltyProgram()` function returns a Promise that resolves when the status of the loyalty program is successfully changed to `"ACTIVE"`.
1417
+ * Initially, when a loyalty program is installed, the status is set to `"DRAFT"`.
1418
+ * You can change the program's status to `"ACTIVE"` with this method or through the [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/).
1419
+ * A site's customers can only earn or redeem points while the program is `"ACTIVE"`.
1419
1420
  *
1420
- * Before you begin, a Wix Loyalty Program must first be installed through your [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/) or through the [Wix App Market](https://www.wix.com/app-market/loyalty). Initially when a loyalty program is installed, the status is set to `"DRAFT"`. You can change the program's status to `"ACTIVE"` with this function or through your [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/). A site's customers can only earn or redeem points while the program status is `"ACTIVE"`.
1421
+ * This method only updates the status of a loyalty program. To make other updates to the program, call Update Loyalty Program.
1421
1422
  *
1422
- * This function updates only the status of a loyalty program, to make other updates to the program, use the [`updateLoyaltyProgram()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/programs/update-loyalty-program) function.
1423
- *
1424
- * To temporarily pause your loyalty program you must follow three steps:
1425
- * 1. Remove all [`earnPoints()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/accounts/earn-points) functions and switch off all the "Earn Points" and "Rewards" toggles in the [Loyalty Program dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Open%20Loyalty%20Program&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/loyalty-accounts/).
1426
- * 1. Hide the loyalty page from your site.
1427
- * 1. Delete the My Rewards page from the Member pages.
1428
- * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.
1429
- *
1430
- * >**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.
1423
+ * To temporarily pause your loyalty program, call Pause Loyalty Program and see [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.
1431
1424
  * @public
1432
1425
  * @permissionId LOYALTY.MANAGE_PROGRAM
1433
1426
  * @applicableIdentity APP
@@ -1437,7 +1430,9 @@ declare function activateLoyaltyProgram(): Promise<NonNullablePaths<ActivateLoya
1437
1430
  [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
1438
1431
  }[ProgramNonNullablePaths]>>;
1439
1432
  /**
1440
- * Changes the program status to `PAUSED`.
1433
+ * Changes the program status to `"PAUSED"`.
1434
+ *
1435
+ * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.
1441
1436
  * @public
1442
1437
  * @permissionId LOYALTY.MANAGE_PROGRAM
1443
1438
  * @applicableIdentity APP
@@ -1456,7 +1451,7 @@ declare function pauseLoyaltyProgram(): Promise<NonNullablePaths<PauseLoyaltyPro
1456
1451
  */
1457
1452
  declare function getLoyaltyProgramPremiumFeatures(): Promise<NonNullablePaths<GetLoyaltyProgramPremiumFeaturesResponse, `loyaltyProgram` | `tiers` | `pointsExpiration`>>;
1458
1453
  /**
1459
- * Updates the `pointsExpiration` status to `ENABLED`.
1454
+ * Updates the `pointsExpiration` status to `"ENABLED"`.
1460
1455
  * @public
1461
1456
  * @permissionId LOYALTY.MANAGE_PROGRAM
1462
1457
  * @applicableIdentity APP
@@ -1466,7 +1461,7 @@ declare function enablePointsExpiration(): Promise<NonNullablePaths<EnablePoints
1466
1461
  [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
1467
1462
  }[ProgramNonNullablePaths]>>;
1468
1463
  /**
1469
- * Updates the `pointsExpiration` status to `DISABLED`.
1464
+ * Updates the `pointsExpiration` status to `"DISABLED"`.
1470
1465
  * @public
1471
1466
  * @permissionId LOYALTY.MANAGE_PROGRAM
1472
1467
  * @applicableIdentity APP