@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.
- package/LICENSE +201 -0
- package/dist-cjs/AppAPI.js +63 -0
- package/dist-cjs/AppAPIClient.js +43 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +35 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +35 -0
- package/dist-cjs/commands/DeleteUserCommand.js +21 -0
- package/dist-cjs/commands/FavoritePlansCommand.js +21 -0
- package/dist-cjs/commands/FavoriteShopsCommand.js +21 -0
- package/dist-cjs/commands/GetShopCommand.js +21 -0
- package/dist-cjs/commands/GetShopPublicCommand.js +21 -0
- package/dist-cjs/commands/GetUserCommand.js +21 -0
- package/dist-cjs/commands/LikeOrgCommand.js +21 -0
- package/dist-cjs/commands/NearbyShopsCommand.js +21 -0
- package/dist-cjs/commands/NearbyShopsPublicCommand.js +21 -0
- package/dist-cjs/commands/NearestShopCommand.js +21 -0
- package/dist-cjs/commands/OnboardUserCommand.js +21 -0
- package/dist-cjs/commands/PinnedShopCommand.js +21 -0
- package/dist-cjs/commands/PinnedShopPublicCommand.js +21 -0
- package/dist-cjs/commands/PlanCommand.js +21 -0
- package/dist-cjs/commands/PlanPublicCommand.js +21 -0
- package/dist-cjs/commands/PlansCommand.js +21 -0
- package/dist-cjs/commands/PopularShopsCommand.js +21 -0
- package/dist-cjs/commands/PopularShopsPublicCommand.js +21 -0
- package/dist-cjs/commands/RadiusShopsCommand.js +21 -0
- package/dist-cjs/commands/RecordVisitCommand.js +21 -0
- package/dist-cjs/commands/RedeemFirstTimeRewardCommand.js +21 -0
- package/dist-cjs/commands/RedeemPointRewardCommand.js +21 -0
- package/dist-cjs/commands/RedeemVisitRewardCommand.js +21 -0
- package/dist-cjs/commands/SearchShopsPublicCommand.js +21 -0
- package/dist-cjs/commands/SearchSuggestionCommand.js +21 -0
- package/dist-cjs/commands/UpdateUserCommand.js +21 -0
- package/dist-cjs/commands/index.js +29 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/AppAPIServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +57 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1073 -0
- package/dist-cjs/runtimeConfig.browser.js +32 -0
- package/dist-cjs/runtimeConfig.js +36 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +23 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/AppAPI.js +59 -0
- package/dist-es/AppAPIClient.js +39 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +30 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +29 -0
- package/dist-es/commands/DeleteUserCommand.js +17 -0
- package/dist-es/commands/FavoritePlansCommand.js +17 -0
- package/dist-es/commands/FavoriteShopsCommand.js +17 -0
- package/dist-es/commands/GetShopCommand.js +17 -0
- package/dist-es/commands/GetShopPublicCommand.js +17 -0
- package/dist-es/commands/GetUserCommand.js +17 -0
- package/dist-es/commands/LikeOrgCommand.js +17 -0
- package/dist-es/commands/NearbyShopsCommand.js +17 -0
- package/dist-es/commands/NearbyShopsPublicCommand.js +17 -0
- package/dist-es/commands/NearestShopCommand.js +17 -0
- package/dist-es/commands/OnboardUserCommand.js +17 -0
- package/dist-es/commands/PinnedShopCommand.js +17 -0
- package/dist-es/commands/PinnedShopPublicCommand.js +17 -0
- package/dist-es/commands/PlanCommand.js +17 -0
- package/dist-es/commands/PlanPublicCommand.js +17 -0
- package/dist-es/commands/PlansCommand.js +17 -0
- package/dist-es/commands/PopularShopsCommand.js +17 -0
- package/dist-es/commands/PopularShopsPublicCommand.js +17 -0
- package/dist-es/commands/RadiusShopsCommand.js +17 -0
- package/dist-es/commands/RecordVisitCommand.js +17 -0
- package/dist-es/commands/RedeemFirstTimeRewardCommand.js +17 -0
- package/dist-es/commands/RedeemPointRewardCommand.js +17 -0
- package/dist-es/commands/RedeemVisitRewardCommand.js +17 -0
- package/dist-es/commands/SearchShopsPublicCommand.js +17 -0
- package/dist-es/commands/SearchSuggestionCommand.js +17 -0
- package/dist-es/commands/UpdateUserCommand.js +17 -0
- package/dist-es/commands/index.js +26 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/AppAPIServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +50 -0
- package/dist-es/protocols/Aws_restJson1.js +1017 -0
- package/dist-es/runtimeConfig.browser.js +27 -0
- package/dist-es/runtimeConfig.js +31 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +19 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/AppAPI.d.ts +202 -0
- package/dist-types/AppAPIClient.d.ts +170 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +26 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +59 -0
- package/dist-types/commands/DeleteUserCommand.d.ts +65 -0
- package/dist-types/commands/FavoritePlansCommand.d.ts +119 -0
- package/dist-types/commands/FavoriteShopsCommand.d.ts +104 -0
- package/dist-types/commands/GetShopCommand.d.ts +100 -0
- package/dist-types/commands/GetShopPublicCommand.d.ts +100 -0
- package/dist-types/commands/GetUserCommand.d.ts +84 -0
- package/dist-types/commands/LikeOrgCommand.d.ts +68 -0
- package/dist-types/commands/NearbyShopsCommand.d.ts +104 -0
- package/dist-types/commands/NearbyShopsPublicCommand.d.ts +104 -0
- package/dist-types/commands/NearestShopCommand.d.ts +91 -0
- package/dist-types/commands/OnboardUserCommand.d.ts +84 -0
- package/dist-types/commands/PinnedShopCommand.d.ts +91 -0
- package/dist-types/commands/PinnedShopPublicCommand.d.ts +91 -0
- package/dist-types/commands/PlanCommand.d.ts +107 -0
- package/dist-types/commands/PlanPublicCommand.d.ts +107 -0
- package/dist-types/commands/PlansCommand.d.ts +119 -0
- package/dist-types/commands/PopularShopsCommand.d.ts +104 -0
- package/dist-types/commands/PopularShopsPublicCommand.d.ts +104 -0
- package/dist-types/commands/RadiusShopsCommand.d.ts +78 -0
- package/dist-types/commands/RecordVisitCommand.d.ts +75 -0
- package/dist-types/commands/RedeemFirstTimeRewardCommand.d.ts +68 -0
- package/dist-types/commands/RedeemPointRewardCommand.d.ts +71 -0
- package/dist-types/commands/RedeemVisitRewardCommand.d.ts +68 -0
- package/dist-types/commands/SearchShopsPublicCommand.d.ts +106 -0
- package/dist-types/commands/SearchSuggestionCommand.d.ts +78 -0
- package/dist-types/commands/UpdateUserCommand.d.ts +89 -0
- package/dist-types/commands/index.d.ts +26 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +12 -0
- package/dist-types/models/AppAPIServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +550 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +236 -0
- package/dist-types/runtimeConfig.browser.d.ts +33 -0
- package/dist-types/runtimeConfig.d.ts +33 -0
- package/dist-types/runtimeConfig.native.d.ts +32 -0
- package/dist-types/runtimeConfig.shared.d.ts +16 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/package.json +81 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
|
|
2
|
+
import { RedeemPointRewardInput, RedeemPointRewardOutput } 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 RedeemPointRewardCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface RedeemPointRewardCommandInput extends RedeemPointRewardInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link RedeemPointRewardCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface RedeemPointRewardCommandOutput extends RedeemPointRewardOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const RedeemPointRewardCommand_base: {
|
|
25
|
+
new (input: RedeemPointRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemPointRewardCommandInput, RedeemPointRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: RedeemPointRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemPointRewardCommandInput, RedeemPointRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Redeems a point-based reward for the authenticated user using accumulated points. The required points are deducted from the user's total points balance.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AppAPIClient, RedeemPointRewardCommand } from "@sparkrewards/sra-client"; // ES Modules import
|
|
35
|
+
* // const { AppAPIClient, RedeemPointRewardCommand } = require("@sparkrewards/sra-client"); // CommonJS import
|
|
36
|
+
* const client = new AppAPIClient(config);
|
|
37
|
+
* const input = { // RedeemPointRewardInput
|
|
38
|
+
* org_id: "STRING_VALUE", // required
|
|
39
|
+
* reward_id: "STRING_VALUE", // required
|
|
40
|
+
* };
|
|
41
|
+
* const command = new RedeemPointRewardCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // { // RedeemPointRewardOutput
|
|
44
|
+
* // message: "STRING_VALUE", // required
|
|
45
|
+
* // redeemed: true || false, // required
|
|
46
|
+
* // pointsUsed: Number("int"), // required
|
|
47
|
+
* // remainingPoints: Number("int"), // required
|
|
48
|
+
* // };
|
|
49
|
+
*
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param RedeemPointRewardCommandInput - {@link RedeemPointRewardCommandInput}
|
|
53
|
+
* @returns {@link RedeemPointRewardCommandOutput}
|
|
54
|
+
* @see {@link RedeemPointRewardCommandInput} for command's `input` shape.
|
|
55
|
+
* @see {@link RedeemPointRewardCommandOutput} for command's `response` shape.
|
|
56
|
+
* @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link ValidationException} (client fault)
|
|
59
|
+
* A standard error for input validation failures.
|
|
60
|
+
* This should be thrown by services when a member of the input structure
|
|
61
|
+
* falls outside of the modeled or documented constraints.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link RuntimeError} (server fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link AppAPIServiceException}
|
|
66
|
+
* <p>Base exception class for all service exceptions from AppAPI service.</p>
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare class RedeemPointRewardCommand extends RedeemPointRewardCommand_base {
|
|
71
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
|
|
2
|
+
import { RedeemRewardOutput, RedeemVisitRewardInput } 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 RedeemVisitRewardCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface RedeemVisitRewardCommandInput extends RedeemVisitRewardInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link RedeemVisitRewardCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface RedeemVisitRewardCommandOutput extends RedeemRewardOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const RedeemVisitRewardCommand_base: {
|
|
25
|
+
new (input: RedeemVisitRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemVisitRewardCommandInput, RedeemVisitRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: RedeemVisitRewardCommandInput): import("@smithy/smithy-client").CommandImpl<RedeemVisitRewardCommandInput, RedeemVisitRewardCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Redeems a visit-based reward for the authenticated user. This reward is earned after completing the required number of visits for a reward plan.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AppAPIClient, RedeemVisitRewardCommand } from "@sparkrewards/sra-client"; // ES Modules import
|
|
35
|
+
* // const { AppAPIClient, RedeemVisitRewardCommand } = require("@sparkrewards/sra-client"); // CommonJS import
|
|
36
|
+
* const client = new AppAPIClient(config);
|
|
37
|
+
* const input = { // RedeemVisitRewardInput
|
|
38
|
+
* reward_id: "STRING_VALUE", // required
|
|
39
|
+
* };
|
|
40
|
+
* const command = new RedeemVisitRewardCommand(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 RedeemVisitRewardCommandInput - {@link RedeemVisitRewardCommandInput}
|
|
50
|
+
* @returns {@link RedeemVisitRewardCommandOutput}
|
|
51
|
+
* @see {@link RedeemVisitRewardCommandInput} for command's `input` shape.
|
|
52
|
+
* @see {@link RedeemVisitRewardCommandOutput} 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 RedeemVisitRewardCommand extends RedeemVisitRewardCommand_base {
|
|
68
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
|
|
2
|
+
import { SearchShopsInput, 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 SearchShopsPublicCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface SearchShopsPublicCommandInput extends SearchShopsInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link SearchShopsPublicCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchShopsPublicCommandOutput extends ShopListWithPaginationOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const SearchShopsPublicCommand_base: {
|
|
25
|
+
new (input: SearchShopsPublicCommandInput): import("@smithy/smithy-client").CommandImpl<SearchShopsPublicCommandInput, SearchShopsPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: SearchShopsPublicCommandInput): import("@smithy/smithy-client").CommandImpl<SearchShopsPublicCommandInput, SearchShopsPublicCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves a paginated list of shops based on the provided search query. 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, SearchShopsPublicCommand } from "@sparkrewards/sra-client"; // ES Modules import
|
|
35
|
+
* // const { AppAPIClient, SearchShopsPublicCommand } = require("@sparkrewards/sra-client"); // CommonJS import
|
|
36
|
+
* const client = new AppAPIClient(config);
|
|
37
|
+
* const input = { // SearchShopsInput
|
|
38
|
+
* q: "STRING_VALUE", // required
|
|
39
|
+
* limit: Number("int"),
|
|
40
|
+
* lat: Number("double"),
|
|
41
|
+
* lon: Number("double"),
|
|
42
|
+
* page: Number("int"),
|
|
43
|
+
* filters: "STRING_VALUE",
|
|
44
|
+
* };
|
|
45
|
+
* const command = new SearchShopsPublicCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // ShopListWithPaginationOutput
|
|
48
|
+
* // message: "STRING_VALUE",
|
|
49
|
+
* // value: [ // EnrichedShopList
|
|
50
|
+
* // { // EnrichedShop
|
|
51
|
+
* // shop_id: "STRING_VALUE", // required
|
|
52
|
+
* // org_id: "STRING_VALUE", // required
|
|
53
|
+
* // preview: "STRING_VALUE", // required
|
|
54
|
+
* // name: "STRING_VALUE", // required
|
|
55
|
+
* // distance: "STRING_VALUE", // required
|
|
56
|
+
* // favorite: true || false,
|
|
57
|
+
* // location: { // LocationDetails
|
|
58
|
+
* // address: "STRING_VALUE", // required
|
|
59
|
+
* // city: "STRING_VALUE", // required
|
|
60
|
+
* // state: "STRING_VALUE", // required
|
|
61
|
+
* // zipcode: "STRING_VALUE", // required
|
|
62
|
+
* // },
|
|
63
|
+
* // shop_hours: [ // ShopHoursList // required
|
|
64
|
+
* // { // ShopHoursItem
|
|
65
|
+
* // day: "STRING_VALUE", // required
|
|
66
|
+
* // open: "STRING_VALUE", // required
|
|
67
|
+
* // close: "STRING_VALUE", // required
|
|
68
|
+
* // },
|
|
69
|
+
* // ],
|
|
70
|
+
* // logo: "STRING_VALUE",
|
|
71
|
+
* // tags: [ // StringList // required
|
|
72
|
+
* // "STRING_VALUE",
|
|
73
|
+
* // ],
|
|
74
|
+
* // },
|
|
75
|
+
* // ],
|
|
76
|
+
* // count: Number("int"),
|
|
77
|
+
* // pagination: { // PaginationInfo
|
|
78
|
+
* // currentPage: Number("int"),
|
|
79
|
+
* // limit: Number("int"), // required
|
|
80
|
+
* // hasMore: true || false, // required
|
|
81
|
+
* // nextPage: Number("int"), // required
|
|
82
|
+
* // },
|
|
83
|
+
* // };
|
|
84
|
+
*
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @param SearchShopsPublicCommandInput - {@link SearchShopsPublicCommandInput}
|
|
88
|
+
* @returns {@link SearchShopsPublicCommandOutput}
|
|
89
|
+
* @see {@link SearchShopsPublicCommandInput} for command's `input` shape.
|
|
90
|
+
* @see {@link SearchShopsPublicCommandOutput} for command's `response` shape.
|
|
91
|
+
* @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link ValidationException} (client fault)
|
|
94
|
+
* A standard error for input validation failures.
|
|
95
|
+
* This should be thrown by services when a member of the input structure
|
|
96
|
+
* falls outside of the modeled or documented constraints.
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link RuntimeError} (server fault)
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link AppAPIServiceException}
|
|
101
|
+
* <p>Base exception class for all service exceptions from AppAPI service.</p>
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export declare class SearchShopsPublicCommand extends SearchShopsPublicCommand_base {
|
|
106
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
|
|
2
|
+
import { SearchSuggestionInput, SearchSuggestionOutput } 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 SearchSuggestionCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface SearchSuggestionCommandInput extends SearchSuggestionInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link SearchSuggestionCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchSuggestionCommandOutput extends SearchSuggestionOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const SearchSuggestionCommand_base: {
|
|
25
|
+
new (input: SearchSuggestionCommandInput): import("@smithy/smithy-client").CommandImpl<SearchSuggestionCommandInput, SearchSuggestionCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: SearchSuggestionCommandInput): import("@smithy/smithy-client").CommandImpl<SearchSuggestionCommandInput, SearchSuggestionCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves search suggestions for shops based on the provided search query. Returns matching shop and organization names.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AppAPIClient, SearchSuggestionCommand } from "@sparkrewards/sra-client"; // ES Modules import
|
|
35
|
+
* // const { AppAPIClient, SearchSuggestionCommand } = require("@sparkrewards/sra-client"); // CommonJS import
|
|
36
|
+
* const client = new AppAPIClient(config);
|
|
37
|
+
* const input = { // SearchSuggestionInput
|
|
38
|
+
* q: "STRING_VALUE", // required
|
|
39
|
+
* limit: Number("int"),
|
|
40
|
+
* lat: Number("double"),
|
|
41
|
+
* lon: Number("double"),
|
|
42
|
+
* };
|
|
43
|
+
* const command = new SearchSuggestionCommand(input);
|
|
44
|
+
* const response = await client.send(command);
|
|
45
|
+
* // { // SearchSuggestionOutput
|
|
46
|
+
* // value: [ // SearchSuggestionList
|
|
47
|
+
* // { // SearchSuggestionItem
|
|
48
|
+
* // shop_id: "STRING_VALUE", // required
|
|
49
|
+
* // organization_id: "STRING_VALUE", // required
|
|
50
|
+
* // search_name: "STRING_VALUE", // required
|
|
51
|
+
* // favorite: true || false, // required
|
|
52
|
+
* // distance: Number("double"), // required
|
|
53
|
+
* // },
|
|
54
|
+
* // ],
|
|
55
|
+
* // };
|
|
56
|
+
*
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param SearchSuggestionCommandInput - {@link SearchSuggestionCommandInput}
|
|
60
|
+
* @returns {@link SearchSuggestionCommandOutput}
|
|
61
|
+
* @see {@link SearchSuggestionCommandInput} for command's `input` shape.
|
|
62
|
+
* @see {@link SearchSuggestionCommandOutput} 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 SearchSuggestionCommand extends SearchSuggestionCommand_base {
|
|
78
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppAPIClient";
|
|
2
|
+
import { UpdateUserInput, UpdateUserOutput } 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 UpdateUserCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface UpdateUserCommandInput extends UpdateUserInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link UpdateUserCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateUserCommandOutput extends UpdateUserOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const UpdateUserCommand_base: {
|
|
25
|
+
new (input: UpdateUserCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateUserCommandInput, UpdateUserCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [UpdateUserCommandInput]): import("@smithy/smithy-client").CommandImpl<UpdateUserCommandInput, UpdateUserCommandOutput, AppAPIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Updates the authenticated user's profile information, including personal details and preferences. Only provided fields will be updated.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AppAPIClient, UpdateUserCommand } from "@sparkrewards/sra-client"; // ES Modules import
|
|
35
|
+
* // const { AppAPIClient, UpdateUserCommand } = require("@sparkrewards/sra-client"); // CommonJS import
|
|
36
|
+
* const client = new AppAPIClient(config);
|
|
37
|
+
* const input = { // UpdateUserInput
|
|
38
|
+
* fullname: { // UserFullnameUpdate
|
|
39
|
+
* firstName: "STRING_VALUE",
|
|
40
|
+
* lastName: "STRING_VALUE",
|
|
41
|
+
* },
|
|
42
|
+
* };
|
|
43
|
+
* const command = new UpdateUserCommand(input);
|
|
44
|
+
* const response = await client.send(command);
|
|
45
|
+
* // { // UpdateUserOutput
|
|
46
|
+
* // message: "STRING_VALUE",
|
|
47
|
+
* // user: { // User
|
|
48
|
+
* // id: "STRING_VALUE", // required
|
|
49
|
+
* // email: "STRING_VALUE", // required
|
|
50
|
+
* // birthdate: "STRING_VALUE", // required
|
|
51
|
+
* // fullname: { // UserFullname
|
|
52
|
+
* // firstName: "STRING_VALUE",
|
|
53
|
+
* // lastName: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
55
|
+
* // date_created: "STRING_VALUE", // required
|
|
56
|
+
* // newAccount: true || false, // required
|
|
57
|
+
* // preferences: { // UserPreferences
|
|
58
|
+
* // lightMode: true || false,
|
|
59
|
+
* // },
|
|
60
|
+
* // total_visits: Number("int"), // required
|
|
61
|
+
* // total_points: Number("int"), // required
|
|
62
|
+
* // total_rewards: Number("int"), // required
|
|
63
|
+
* // fraud_count: Number("int"),
|
|
64
|
+
* // num_redeemableRewards: Number("int"),
|
|
65
|
+
* // },
|
|
66
|
+
* // };
|
|
67
|
+
*
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @param UpdateUserCommandInput - {@link UpdateUserCommandInput}
|
|
71
|
+
* @returns {@link UpdateUserCommandOutput}
|
|
72
|
+
* @see {@link UpdateUserCommandInput} for command's `input` shape.
|
|
73
|
+
* @see {@link UpdateUserCommandOutput} for command's `response` shape.
|
|
74
|
+
* @see {@link AppAPIClientResolvedConfig | config} for AppAPIClient's `config` shape.
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link ValidationException} (client fault)
|
|
77
|
+
* A standard error for input validation failures.
|
|
78
|
+
* This should be thrown by services when a member of the input structure
|
|
79
|
+
* falls outside of the modeled or documented constraints.
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link RuntimeError} (server fault)
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link AppAPIServiceException}
|
|
84
|
+
* <p>Base exception class for all service exceptions from AppAPI service.</p>
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
export declare class UpdateUserCommand extends UpdateUserCommand_base {
|
|
89
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./DeleteUserCommand";
|
|
2
|
+
export * from "./FavoritePlansCommand";
|
|
3
|
+
export * from "./FavoriteShopsCommand";
|
|
4
|
+
export * from "./GetShopCommand";
|
|
5
|
+
export * from "./GetShopPublicCommand";
|
|
6
|
+
export * from "./GetUserCommand";
|
|
7
|
+
export * from "./LikeOrgCommand";
|
|
8
|
+
export * from "./NearbyShopsCommand";
|
|
9
|
+
export * from "./NearbyShopsPublicCommand";
|
|
10
|
+
export * from "./NearestShopCommand";
|
|
11
|
+
export * from "./OnboardUserCommand";
|
|
12
|
+
export * from "./PinnedShopCommand";
|
|
13
|
+
export * from "./PinnedShopPublicCommand";
|
|
14
|
+
export * from "./PlanCommand";
|
|
15
|
+
export * from "./PlanPublicCommand";
|
|
16
|
+
export * from "./PlansCommand";
|
|
17
|
+
export * from "./PopularShopsCommand";
|
|
18
|
+
export * from "./PopularShopsPublicCommand";
|
|
19
|
+
export * from "./RadiusShopsCommand";
|
|
20
|
+
export * from "./RecordVisitCommand";
|
|
21
|
+
export * from "./RedeemFirstTimeRewardCommand";
|
|
22
|
+
export * from "./RedeemPointRewardCommand";
|
|
23
|
+
export * from "./RedeemVisitRewardCommand";
|
|
24
|
+
export * from "./SearchShopsPublicCommand";
|
|
25
|
+
export * from "./SearchSuggestionCommand";
|
|
26
|
+
export * from "./UpdateUserCommand";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
2
|
+
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
|
+
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface AppAPIExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, HttpAuthExtensionConfiguration {
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spark Rewards APP API Service
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from "./AppAPIClient";
|
|
7
|
+
export * from "./AppAPI";
|
|
8
|
+
export type { RuntimeExtension } from "./runtimeExtensions";
|
|
9
|
+
export type { AppAPIExtensionConfiguration } from "./extensionConfiguration";
|
|
10
|
+
export * from "./commands";
|
|
11
|
+
export * from "./models";
|
|
12
|
+
export { AppAPIServiceException } from "./models/AppAPIServiceException";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
|
|
2
|
+
export type { __ServiceExceptionOptions };
|
|
3
|
+
export { __ServiceException };
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*
|
|
7
|
+
* Base exception class for all service exceptions from AppAPI service.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AppAPIServiceException extends __ServiceException {
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(options: __ServiceExceptionOptions);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|