@sparkrewards/sra-client 0.0.1

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.
Files changed (128) hide show
  1. package/LICENSE +201 -0
  2. package/dist-cjs/AppAPI.js +63 -0
  3. package/dist-cjs/AppAPIClient.js +43 -0
  4. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +35 -0
  5. package/dist-cjs/auth/httpAuthSchemeProvider.js +35 -0
  6. package/dist-cjs/commands/DeleteUserCommand.js +21 -0
  7. package/dist-cjs/commands/FavoritePlansCommand.js +21 -0
  8. package/dist-cjs/commands/FavoriteShopsCommand.js +21 -0
  9. package/dist-cjs/commands/GetShopCommand.js +21 -0
  10. package/dist-cjs/commands/GetShopPublicCommand.js +21 -0
  11. package/dist-cjs/commands/GetUserCommand.js +21 -0
  12. package/dist-cjs/commands/LikeOrgCommand.js +21 -0
  13. package/dist-cjs/commands/NearbyShopsCommand.js +21 -0
  14. package/dist-cjs/commands/NearbyShopsPublicCommand.js +21 -0
  15. package/dist-cjs/commands/NearestShopCommand.js +21 -0
  16. package/dist-cjs/commands/OnboardUserCommand.js +21 -0
  17. package/dist-cjs/commands/PinnedShopCommand.js +21 -0
  18. package/dist-cjs/commands/PinnedShopPublicCommand.js +21 -0
  19. package/dist-cjs/commands/PlanCommand.js +21 -0
  20. package/dist-cjs/commands/PlanPublicCommand.js +21 -0
  21. package/dist-cjs/commands/PlansCommand.js +21 -0
  22. package/dist-cjs/commands/PopularShopsCommand.js +21 -0
  23. package/dist-cjs/commands/PopularShopsPublicCommand.js +21 -0
  24. package/dist-cjs/commands/RadiusShopsCommand.js +21 -0
  25. package/dist-cjs/commands/RecordVisitCommand.js +21 -0
  26. package/dist-cjs/commands/RedeemFirstTimeRewardCommand.js +21 -0
  27. package/dist-cjs/commands/RedeemPointRewardCommand.js +21 -0
  28. package/dist-cjs/commands/RedeemVisitRewardCommand.js +21 -0
  29. package/dist-cjs/commands/SearchShopsPublicCommand.js +21 -0
  30. package/dist-cjs/commands/SearchSuggestionCommand.js +21 -0
  31. package/dist-cjs/commands/UpdateUserCommand.js +21 -0
  32. package/dist-cjs/commands/index.js +29 -0
  33. package/dist-cjs/extensionConfiguration.js +2 -0
  34. package/dist-cjs/index.js +10 -0
  35. package/dist-cjs/models/AppAPIServiceException.js +12 -0
  36. package/dist-cjs/models/index.js +4 -0
  37. package/dist-cjs/models/models_0.js +57 -0
  38. package/dist-cjs/protocols/Aws_restJson1.js +1073 -0
  39. package/dist-cjs/runtimeConfig.browser.js +32 -0
  40. package/dist-cjs/runtimeConfig.js +36 -0
  41. package/dist-cjs/runtimeConfig.native.js +15 -0
  42. package/dist-cjs/runtimeConfig.shared.js +23 -0
  43. package/dist-cjs/runtimeExtensions.js +22 -0
  44. package/dist-es/AppAPI.js +59 -0
  45. package/dist-es/AppAPIClient.js +39 -0
  46. package/dist-es/auth/httpAuthExtensionConfiguration.js +30 -0
  47. package/dist-es/auth/httpAuthSchemeProvider.js +29 -0
  48. package/dist-es/commands/DeleteUserCommand.js +17 -0
  49. package/dist-es/commands/FavoritePlansCommand.js +17 -0
  50. package/dist-es/commands/FavoriteShopsCommand.js +17 -0
  51. package/dist-es/commands/GetShopCommand.js +17 -0
  52. package/dist-es/commands/GetShopPublicCommand.js +17 -0
  53. package/dist-es/commands/GetUserCommand.js +17 -0
  54. package/dist-es/commands/LikeOrgCommand.js +17 -0
  55. package/dist-es/commands/NearbyShopsCommand.js +17 -0
  56. package/dist-es/commands/NearbyShopsPublicCommand.js +17 -0
  57. package/dist-es/commands/NearestShopCommand.js +17 -0
  58. package/dist-es/commands/OnboardUserCommand.js +17 -0
  59. package/dist-es/commands/PinnedShopCommand.js +17 -0
  60. package/dist-es/commands/PinnedShopPublicCommand.js +17 -0
  61. package/dist-es/commands/PlanCommand.js +17 -0
  62. package/dist-es/commands/PlanPublicCommand.js +17 -0
  63. package/dist-es/commands/PlansCommand.js +17 -0
  64. package/dist-es/commands/PopularShopsCommand.js +17 -0
  65. package/dist-es/commands/PopularShopsPublicCommand.js +17 -0
  66. package/dist-es/commands/RadiusShopsCommand.js +17 -0
  67. package/dist-es/commands/RecordVisitCommand.js +17 -0
  68. package/dist-es/commands/RedeemFirstTimeRewardCommand.js +17 -0
  69. package/dist-es/commands/RedeemPointRewardCommand.js +17 -0
  70. package/dist-es/commands/RedeemVisitRewardCommand.js +17 -0
  71. package/dist-es/commands/SearchShopsPublicCommand.js +17 -0
  72. package/dist-es/commands/SearchSuggestionCommand.js +17 -0
  73. package/dist-es/commands/UpdateUserCommand.js +17 -0
  74. package/dist-es/commands/index.js +26 -0
  75. package/dist-es/extensionConfiguration.js +1 -0
  76. package/dist-es/index.js +5 -0
  77. package/dist-es/models/AppAPIServiceException.js +8 -0
  78. package/dist-es/models/index.js +1 -0
  79. package/dist-es/models/models_0.js +50 -0
  80. package/dist-es/protocols/Aws_restJson1.js +1017 -0
  81. package/dist-es/runtimeConfig.browser.js +27 -0
  82. package/dist-es/runtimeConfig.js +31 -0
  83. package/dist-es/runtimeConfig.native.js +11 -0
  84. package/dist-es/runtimeConfig.shared.js +19 -0
  85. package/dist-es/runtimeExtensions.js +18 -0
  86. package/dist-types/AppAPI.d.ts +202 -0
  87. package/dist-types/AppAPIClient.d.ts +170 -0
  88. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +26 -0
  89. package/dist-types/auth/httpAuthSchemeProvider.d.ts +59 -0
  90. package/dist-types/commands/DeleteUserCommand.d.ts +65 -0
  91. package/dist-types/commands/FavoritePlansCommand.d.ts +119 -0
  92. package/dist-types/commands/FavoriteShopsCommand.d.ts +104 -0
  93. package/dist-types/commands/GetShopCommand.d.ts +100 -0
  94. package/dist-types/commands/GetShopPublicCommand.d.ts +100 -0
  95. package/dist-types/commands/GetUserCommand.d.ts +84 -0
  96. package/dist-types/commands/LikeOrgCommand.d.ts +68 -0
  97. package/dist-types/commands/NearbyShopsCommand.d.ts +104 -0
  98. package/dist-types/commands/NearbyShopsPublicCommand.d.ts +104 -0
  99. package/dist-types/commands/NearestShopCommand.d.ts +91 -0
  100. package/dist-types/commands/OnboardUserCommand.d.ts +84 -0
  101. package/dist-types/commands/PinnedShopCommand.d.ts +91 -0
  102. package/dist-types/commands/PinnedShopPublicCommand.d.ts +91 -0
  103. package/dist-types/commands/PlanCommand.d.ts +107 -0
  104. package/dist-types/commands/PlanPublicCommand.d.ts +107 -0
  105. package/dist-types/commands/PlansCommand.d.ts +119 -0
  106. package/dist-types/commands/PopularShopsCommand.d.ts +104 -0
  107. package/dist-types/commands/PopularShopsPublicCommand.d.ts +104 -0
  108. package/dist-types/commands/RadiusShopsCommand.d.ts +78 -0
  109. package/dist-types/commands/RecordVisitCommand.d.ts +75 -0
  110. package/dist-types/commands/RedeemFirstTimeRewardCommand.d.ts +68 -0
  111. package/dist-types/commands/RedeemPointRewardCommand.d.ts +71 -0
  112. package/dist-types/commands/RedeemVisitRewardCommand.d.ts +68 -0
  113. package/dist-types/commands/SearchShopsPublicCommand.d.ts +106 -0
  114. package/dist-types/commands/SearchSuggestionCommand.d.ts +78 -0
  115. package/dist-types/commands/UpdateUserCommand.d.ts +89 -0
  116. package/dist-types/commands/index.d.ts +26 -0
  117. package/dist-types/extensionConfiguration.d.ts +8 -0
  118. package/dist-types/index.d.ts +12 -0
  119. package/dist-types/models/AppAPIServiceException.d.ts +14 -0
  120. package/dist-types/models/index.d.ts +1 -0
  121. package/dist-types/models/models_0.d.ts +550 -0
  122. package/dist-types/protocols/Aws_restJson1.d.ts +236 -0
  123. package/dist-types/runtimeConfig.browser.d.ts +33 -0
  124. package/dist-types/runtimeConfig.d.ts +33 -0
  125. package/dist-types/runtimeConfig.native.d.ts +32 -0
  126. package/dist-types/runtimeConfig.shared.d.ts +16 -0
  127. package/dist-types/runtimeExtensions.d.ts +17 -0
  128. package/package.json +81 -0
@@ -0,0 +1,107 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { PlanGetInput, PlanOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PlanPublicCommand}.
14
+ */
15
+ export interface PlanPublicCommandInput extends PlanGetInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PlanPublicCommand}.
21
+ */
22
+ export interface PlanPublicCommandOutput extends PlanOutput, __MetadataBearer {
23
+ }
24
+ declare const PlanPublicCommand_base: {
25
+ new (input: PlanPublicCommandInput): import("@smithy/smithy-client").CommandImpl<PlanPublicCommandInput, PlanPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: PlanPublicCommandInput): import("@smithy/smithy-client").CommandImpl<PlanPublicCommandInput, PlanPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves the reward plan details for a specific organization, including visits, points for any user.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, PlanPublicCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, PlanPublicCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // PlanGetInput
38
+ * org_id: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new PlanPublicCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // PlanOutput
43
+ * // reward_plan: { // RewardPlan
44
+ * // visits: { // VisitRewardProps
45
+ * // tiers: { // TierMap // required
46
+ * // "<keys>": { // Tier
47
+ * // id: "STRING_VALUE", // required
48
+ * // rewards: [ // StringList // required
49
+ * // "STRING_VALUE",
50
+ * // ],
51
+ * // },
52
+ * // },
53
+ * // min_spend: Number("int"), // required
54
+ * // },
55
+ * // points: [ // PointsRewardOptionList
56
+ * // { // PointsRewardOption
57
+ * // id: "STRING_VALUE", // required
58
+ * // reward: "STRING_VALUE", // required
59
+ * // points: Number("int"), // required
60
+ * // },
61
+ * // ],
62
+ * // },
63
+ * // visits: Number("int"), // required
64
+ * // points: Number("int"), // required
65
+ * // redeemableRewards: [ // RewardList // required
66
+ * // { // Reward
67
+ * // reward_id: "STRING_VALUE",
68
+ * // id: "STRING_VALUE",
69
+ * // },
70
+ * // ],
71
+ * // min_spend: Number("int"),
72
+ * // visits_active: true || false, // required
73
+ * // points_active: true || false, // required
74
+ * // firstPlan: true || false, // required
75
+ * // id: "STRING_VALUE", // required
76
+ * // active: true || false, // required
77
+ * // organization_id: "STRING_VALUE",
78
+ * // name: "STRING_VALUE", // required
79
+ * // favorite: true || false, // required
80
+ * // first_time_reward: { // FirstTimeReward
81
+ * // active: true || false,
82
+ * // description: "STRING_VALUE",
83
+ * // },
84
+ * // };
85
+ *
86
+ * ```
87
+ *
88
+ * @param PlanPublicCommandInput - {@link PlanPublicCommandInput}
89
+ * @returns {@link PlanPublicCommandOutput}
90
+ * @see {@link PlanPublicCommandInput} for command's `input` shape.
91
+ * @see {@link PlanPublicCommandOutput} for command's `response` shape.
92
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
93
+ *
94
+ * @throws {@link ValidationException} (client fault)
95
+ * A standard error for input validation failures.
96
+ * This should be thrown by services when a member of the input structure
97
+ * falls outside of the modeled or documented constraints.
98
+ *
99
+ * @throws {@link RuntimeError} (server fault)
100
+ *
101
+ * @throws {@link AppAPIServiceException}
102
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
103
+ *
104
+ * @public
105
+ */
106
+ export declare class PlanPublicCommand extends PlanPublicCommand_base {
107
+ }
@@ -0,0 +1,119 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { PlansListInput, PlansOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PlansCommand}.
14
+ */
15
+ export interface PlansCommandInput extends PlansListInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PlansCommand}.
21
+ */
22
+ export interface PlansCommandOutput extends PlansOutput, __MetadataBearer {
23
+ }
24
+ declare const PlansCommand_base: {
25
+ new (input: PlansCommandInput): import("@smithy/smithy-client").CommandImpl<PlansCommandInput, PlansCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: PlansCommandInput): import("@smithy/smithy-client").CommandImpl<PlansCommandInput, PlansCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves a paginated list of all reward plans associated with the authenticated user, ordered by nearest shop location.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, PlansCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, PlansCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // PlansListInput
38
+ * page: Number("int"),
39
+ * limit: Number("int"),
40
+ * lat: Number("double"), // required
41
+ * lon: Number("double"), // required
42
+ * };
43
+ * const command = new PlansCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // PlansOutput
46
+ * // value: [ // GroupedPlanList // required
47
+ * // { // GroupedPlan
48
+ * // reward_plan: { // RewardPlan
49
+ * // visits: { // VisitRewardProps
50
+ * // tiers: { // TierMap // required
51
+ * // "<keys>": { // Tier
52
+ * // id: "STRING_VALUE", // required
53
+ * // rewards: [ // StringList // required
54
+ * // "STRING_VALUE",
55
+ * // ],
56
+ * // },
57
+ * // },
58
+ * // min_spend: Number("int"), // required
59
+ * // },
60
+ * // points: [ // PointsRewardOptionList
61
+ * // { // PointsRewardOption
62
+ * // id: "STRING_VALUE", // required
63
+ * // reward: "STRING_VALUE", // required
64
+ * // points: Number("int"), // required
65
+ * // },
66
+ * // ],
67
+ * // },
68
+ * // visits: Number("int"), // required
69
+ * // points: Number("int"), // required
70
+ * // redeemableRewards: [ // RewardList // required
71
+ * // { // Reward
72
+ * // reward_id: "STRING_VALUE",
73
+ * // id: "STRING_VALUE",
74
+ * // },
75
+ * // ],
76
+ * // visits_active: true || false, // required
77
+ * // points_active: true || false, // required
78
+ * // banner: "STRING_VALUE", // required
79
+ * // logo: "STRING_VALUE", // required
80
+ * // org_id: "STRING_VALUE", // required
81
+ * // shop_id: "STRING_VALUE", // required
82
+ * // name: "STRING_VALUE", // required
83
+ * // id: "STRING_VALUE", // required
84
+ * // active: true || false, // required
85
+ * // favorite: true || false, // required
86
+ * // num_redeemableRewards: Number("int"), // required
87
+ * // },
88
+ * // ],
89
+ * // count: Number("int"), // required
90
+ * // pagination: { // PaginationInfo
91
+ * // currentPage: Number("int"),
92
+ * // limit: Number("int"), // required
93
+ * // hasMore: true || false, // required
94
+ * // nextPage: Number("int"), // required
95
+ * // },
96
+ * // };
97
+ *
98
+ * ```
99
+ *
100
+ * @param PlansCommandInput - {@link PlansCommandInput}
101
+ * @returns {@link PlansCommandOutput}
102
+ * @see {@link PlansCommandInput} for command's `input` shape.
103
+ * @see {@link PlansCommandOutput} for command's `response` shape.
104
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
105
+ *
106
+ * @throws {@link ValidationException} (client fault)
107
+ * A standard error for input validation failures.
108
+ * This should be thrown by services when a member of the input structure
109
+ * falls outside of the modeled or documented constraints.
110
+ *
111
+ * @throws {@link RuntimeError} (server fault)
112
+ *
113
+ * @throws {@link AppAPIServiceException}
114
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
115
+ *
116
+ * @public
117
+ */
118
+ export declare class PlansCommand extends PlansCommand_base {
119
+ }
@@ -0,0 +1,104 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { ShopListInput, ShopListWithPaginationOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PopularShopsCommand}.
14
+ */
15
+ export interface PopularShopsCommandInput extends ShopListInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PopularShopsCommand}.
21
+ */
22
+ export interface PopularShopsCommandOutput extends ShopListWithPaginationOutput, __MetadataBearer {
23
+ }
24
+ declare const PopularShopsCommand_base: {
25
+ new (input: PopularShopsCommandInput): import("@smithy/smithy-client").CommandImpl<PopularShopsCommandInput, PopularShopsCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [PopularShopsCommandInput]): import("@smithy/smithy-client").CommandImpl<PopularShopsCommandInput, PopularShopsCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves a paginated list of popular shops ordered by distance from the provided location coordinates. Returns enriched shop data with organization information.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, PopularShopsCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, PopularShopsCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // ShopListInput
38
+ * lat: Number("double"),
39
+ * lon: Number("double"),
40
+ * page: Number("int"),
41
+ * filters: "STRING_VALUE",
42
+ * };
43
+ * const command = new PopularShopsCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // ShopListWithPaginationOutput
46
+ * // message: "STRING_VALUE",
47
+ * // value: [ // EnrichedShopList
48
+ * // { // EnrichedShop
49
+ * // shop_id: "STRING_VALUE", // required
50
+ * // org_id: "STRING_VALUE", // required
51
+ * // preview: "STRING_VALUE", // required
52
+ * // name: "STRING_VALUE", // required
53
+ * // distance: "STRING_VALUE", // required
54
+ * // favorite: true || false,
55
+ * // location: { // LocationDetails
56
+ * // address: "STRING_VALUE", // required
57
+ * // city: "STRING_VALUE", // required
58
+ * // state: "STRING_VALUE", // required
59
+ * // zipcode: "STRING_VALUE", // required
60
+ * // },
61
+ * // shop_hours: [ // ShopHoursList // required
62
+ * // { // ShopHoursItem
63
+ * // day: "STRING_VALUE", // required
64
+ * // open: "STRING_VALUE", // required
65
+ * // close: "STRING_VALUE", // required
66
+ * // },
67
+ * // ],
68
+ * // logo: "STRING_VALUE",
69
+ * // tags: [ // StringList // required
70
+ * // "STRING_VALUE",
71
+ * // ],
72
+ * // },
73
+ * // ],
74
+ * // count: Number("int"),
75
+ * // pagination: { // PaginationInfo
76
+ * // currentPage: Number("int"),
77
+ * // limit: Number("int"), // required
78
+ * // hasMore: true || false, // required
79
+ * // nextPage: Number("int"), // required
80
+ * // },
81
+ * // };
82
+ *
83
+ * ```
84
+ *
85
+ * @param PopularShopsCommandInput - {@link PopularShopsCommandInput}
86
+ * @returns {@link PopularShopsCommandOutput}
87
+ * @see {@link PopularShopsCommandInput} for command's `input` shape.
88
+ * @see {@link PopularShopsCommandOutput} for command's `response` shape.
89
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
90
+ *
91
+ * @throws {@link ValidationException} (client fault)
92
+ * A standard error for input validation failures.
93
+ * This should be thrown by services when a member of the input structure
94
+ * falls outside of the modeled or documented constraints.
95
+ *
96
+ * @throws {@link RuntimeError} (server fault)
97
+ *
98
+ * @throws {@link AppAPIServiceException}
99
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
100
+ *
101
+ * @public
102
+ */
103
+ export declare class PopularShopsCommand extends PopularShopsCommand_base {
104
+ }
@@ -0,0 +1,104 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { ShopListInput, ShopListWithPaginationOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PopularShopsPublicCommand}.
14
+ */
15
+ export interface PopularShopsPublicCommandInput extends ShopListInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PopularShopsPublicCommand}.
21
+ */
22
+ export interface PopularShopsPublicCommandOutput extends ShopListWithPaginationOutput, __MetadataBearer {
23
+ }
24
+ declare const PopularShopsPublicCommand_base: {
25
+ new (input: PopularShopsPublicCommandInput): import("@smithy/smithy-client").CommandImpl<PopularShopsPublicCommandInput, PopularShopsPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [PopularShopsPublicCommandInput]): import("@smithy/smithy-client").CommandImpl<PopularShopsPublicCommandInput, PopularShopsPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves a paginated list of popular shops ordered by distance from the provided location coordinates. Returns enriched shop data with organization information.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, PopularShopsPublicCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, PopularShopsPublicCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // ShopListInput
38
+ * lat: Number("double"),
39
+ * lon: Number("double"),
40
+ * page: Number("int"),
41
+ * filters: "STRING_VALUE",
42
+ * };
43
+ * const command = new PopularShopsPublicCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // ShopListWithPaginationOutput
46
+ * // message: "STRING_VALUE",
47
+ * // value: [ // EnrichedShopList
48
+ * // { // EnrichedShop
49
+ * // shop_id: "STRING_VALUE", // required
50
+ * // org_id: "STRING_VALUE", // required
51
+ * // preview: "STRING_VALUE", // required
52
+ * // name: "STRING_VALUE", // required
53
+ * // distance: "STRING_VALUE", // required
54
+ * // favorite: true || false,
55
+ * // location: { // LocationDetails
56
+ * // address: "STRING_VALUE", // required
57
+ * // city: "STRING_VALUE", // required
58
+ * // state: "STRING_VALUE", // required
59
+ * // zipcode: "STRING_VALUE", // required
60
+ * // },
61
+ * // shop_hours: [ // ShopHoursList // required
62
+ * // { // ShopHoursItem
63
+ * // day: "STRING_VALUE", // required
64
+ * // open: "STRING_VALUE", // required
65
+ * // close: "STRING_VALUE", // required
66
+ * // },
67
+ * // ],
68
+ * // logo: "STRING_VALUE",
69
+ * // tags: [ // StringList // required
70
+ * // "STRING_VALUE",
71
+ * // ],
72
+ * // },
73
+ * // ],
74
+ * // count: Number("int"),
75
+ * // pagination: { // PaginationInfo
76
+ * // currentPage: Number("int"),
77
+ * // limit: Number("int"), // required
78
+ * // hasMore: true || false, // required
79
+ * // nextPage: Number("int"), // required
80
+ * // },
81
+ * // };
82
+ *
83
+ * ```
84
+ *
85
+ * @param PopularShopsPublicCommandInput - {@link PopularShopsPublicCommandInput}
86
+ * @returns {@link PopularShopsPublicCommandOutput}
87
+ * @see {@link PopularShopsPublicCommandInput} for command's `input` shape.
88
+ * @see {@link PopularShopsPublicCommandOutput} for command's `response` shape.
89
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
90
+ *
91
+ * @throws {@link ValidationException} (client fault)
92
+ * A standard error for input validation failures.
93
+ * This should be thrown by services when a member of the input structure
94
+ * falls outside of the modeled or documented constraints.
95
+ *
96
+ * @throws {@link RuntimeError} (server fault)
97
+ *
98
+ * @throws {@link AppAPIServiceException}
99
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
100
+ *
101
+ * @public
102
+ */
103
+ export declare class PopularShopsPublicCommand extends PopularShopsPublicCommand_base {
104
+ }
@@ -0,0 +1,78 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { RadiusShopsOutput, ShopListInput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link RadiusShopsCommand}.
14
+ */
15
+ export interface RadiusShopsCommandInput extends ShopListInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RadiusShopsCommand}.
21
+ */
22
+ export interface RadiusShopsCommandOutput extends RadiusShopsOutput, __MetadataBearer {
23
+ }
24
+ declare const RadiusShopsCommand_base: {
25
+ new (input: RadiusShopsCommandInput): import("@smithy/smithy-client").CommandImpl<RadiusShopsCommandInput, RadiusShopsCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [RadiusShopsCommandInput]): import("@smithy/smithy-client").CommandImpl<RadiusShopsCommandInput, RadiusShopsCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves shops within a specified radius from the provided location coordinates. Returns enriched shop data with organization information.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, RadiusShopsCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, RadiusShopsCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // ShopListInput
38
+ * lat: Number("double"),
39
+ * lon: Number("double"),
40
+ * page: Number("int"),
41
+ * filters: "STRING_VALUE",
42
+ * };
43
+ * const command = new RadiusShopsCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // RadiusShopsOutput
46
+ * // message: "STRING_VALUE",
47
+ * // count: Number("int"),
48
+ * // value: [ // ShopLocationList
49
+ * // { // ShopLocation
50
+ * // id: "STRING_VALUE", // required
51
+ * // longitude: Number("double"), // required
52
+ * // latitude: Number("double"), // required
53
+ * // },
54
+ * // ],
55
+ * // };
56
+ *
57
+ * ```
58
+ *
59
+ * @param RadiusShopsCommandInput - {@link RadiusShopsCommandInput}
60
+ * @returns {@link RadiusShopsCommandOutput}
61
+ * @see {@link RadiusShopsCommandInput} for command's `input` shape.
62
+ * @see {@link RadiusShopsCommandOutput} for command's `response` shape.
63
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
64
+ *
65
+ * @throws {@link ValidationException} (client fault)
66
+ * A standard error for input validation failures.
67
+ * This should be thrown by services when a member of the input structure
68
+ * falls outside of the modeled or documented constraints.
69
+ *
70
+ * @throws {@link RuntimeError} (server fault)
71
+ *
72
+ * @throws {@link AppAPIServiceException}
73
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
74
+ *
75
+ * @public
76
+ */
77
+ export declare class RadiusShopsCommand extends RadiusShopsCommand_base {
78
+ }
@@ -0,0 +1,75 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { RecordVisitInput, RecordVisitOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link RecordVisitCommand}.
14
+ */
15
+ export interface RecordVisitCommandInput extends RecordVisitInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RecordVisitCommand}.
21
+ */
22
+ export interface RecordVisitCommandOutput extends RecordVisitOutput, __MetadataBearer {
23
+ }
24
+ declare const RecordVisitCommand_base: {
25
+ new (input: RecordVisitCommandInput): import("@smithy/smithy-client").CommandImpl<RecordVisitCommandInput, RecordVisitCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: RecordVisitCommandInput): import("@smithy/smithy-client").CommandImpl<RecordVisitCommandInput, RecordVisitCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Records a visit to a shop for the authenticated user. Updates visit counts, tracks spending, awards points, and triggers rewards when thresholds are met. Also handles first-time rewards and visit-based rewards.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, RecordVisitCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, RecordVisitCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // RecordVisitInput
38
+ * shop_id: "STRING_VALUE", // required
39
+ * timestamp: "STRING_VALUE", // required
40
+ * lat: Number("double"), // required
41
+ * lon: Number("double"), // required
42
+ * };
43
+ * const command = new RecordVisitCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // RecordVisitOutput
46
+ * // success: true || false, // required
47
+ * // message: "STRING_VALUE", // required
48
+ * // visitId: "STRING_VALUE", // required
49
+ * // reason: "STRING_VALUE",
50
+ * // };
51
+ *
52
+ * ```
53
+ *
54
+ * @param RecordVisitCommandInput - {@link RecordVisitCommandInput}
55
+ * @returns {@link RecordVisitCommandOutput}
56
+ * @see {@link RecordVisitCommandInput} for command's `input` shape.
57
+ * @see {@link RecordVisitCommandOutput} for command's `response` shape.
58
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
59
+ *
60
+ * @throws {@link ValidationException} (client fault)
61
+ * A standard error for input validation failures.
62
+ * This should be thrown by services when a member of the input structure
63
+ * falls outside of the modeled or documented constraints.
64
+ *
65
+ * @throws {@link RuntimeError} (server fault)
66
+ *
67
+ * @throws {@link InvalidOperationError} (client fault)
68
+ *
69
+ * @throws {@link AppAPIServiceException}
70
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
71
+ *
72
+ * @public
73
+ */
74
+ export declare class RecordVisitCommand extends RecordVisitCommand_base {
75
+ }
@@ -0,0 +1,68 @@
1
+ import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
2
+ import { RedeemFirstTimeRewardInput, RedeemRewardOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link RedeemFirstTimeRewardCommand}.
14
+ */
15
+ export interface RedeemFirstTimeRewardCommandInput extends RedeemFirstTimeRewardInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RedeemFirstTimeRewardCommand}.
21
+ */
22
+ export interface RedeemFirstTimeRewardCommandOutput extends RedeemRewardOutput, __MetadataBearer {
23
+ }
24
+ declare const RedeemFirstTimeRewardCommand_base: {
25
+ new (input: RedeemFirstTimeRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemFirstTimeRewardCommandInput, RedeemFirstTimeRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: RedeemFirstTimeRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemFirstTimeRewardCommandInput, RedeemFirstTimeRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Redeems a first-time reward for the authenticated user from a specific organization. This can only be redeemed once per user per organization.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AppAPIClient, RedeemFirstTimeRewardCommand } from "@sparkrewards/sra-client"; // ES Modules import
35
+ * // const { AppAPIClient, RedeemFirstTimeRewardCommand } = require("@sparkrewards/sra-client"); // CommonJS import
36
+ * const client = new AppAPIClient(config);
37
+ * const input = { // RedeemFirstTimeRewardInput
38
+ * org_id: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new RedeemFirstTimeRewardCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // RedeemRewardOutput
43
+ * // message: "STRING_VALUE", // required
44
+ * // redeemed: true || false, // required
45
+ * // };
46
+ *
47
+ * ```
48
+ *
49
+ * @param RedeemFirstTimeRewardCommandInput - {@link RedeemFirstTimeRewardCommandInput}
50
+ * @returns {@link RedeemFirstTimeRewardCommandOutput}
51
+ * @see {@link RedeemFirstTimeRewardCommandInput} for command's `input` shape.
52
+ * @see {@link RedeemFirstTimeRewardCommandOutput} for command's `response` shape.
53
+ * @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
54
+ *
55
+ * @throws {@link ValidationException} (client fault)
56
+ * A standard error for input validation failures.
57
+ * This should be thrown by services when a member of the input structure
58
+ * falls outside of the modeled or documented constraints.
59
+ *
60
+ * @throws {@link RuntimeError} (server fault)
61
+ *
62
+ * @throws {@link AppAPIServiceException}
63
+ * <p>Base exception class for all service exceptions from AppAPI service.</p>
64
+ *
65
+ * @public
66
+ */
67
+ export declare class RedeemFirstTimeRewardCommand extends RedeemFirstTimeRewardCommand_base {
68
+ }