@sparkrewards/sra-sdk 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/index.js +8 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +1901 -0
- package/dist-cjs/openapi.js +7 -0
- package/dist-cjs/openapi.json +2864 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2939 -0
- package/dist-cjs/server/AppAPIService.js +371 -0
- package/dist-cjs/server/index.js +5 -0
- package/dist-cjs/server/operations/DeleteUser.js +121 -0
- package/dist-cjs/server/operations/FavoritePlans.js +125 -0
- package/dist-cjs/server/operations/FavoriteShops.js +122 -0
- package/dist-cjs/server/operations/GetShop.js +126 -0
- package/dist-cjs/server/operations/GetShopPublic.js +127 -0
- package/dist-cjs/server/operations/GetUser.js +121 -0
- package/dist-cjs/server/operations/LikeOrg.js +124 -0
- package/dist-cjs/server/operations/NearbyShops.js +121 -0
- package/dist-cjs/server/operations/NearbyShopsPublic.js +122 -0
- package/dist-cjs/server/operations/NearestShop.js +126 -0
- package/dist-cjs/server/operations/OnboardUser.js +122 -0
- package/dist-cjs/server/operations/PinnedShop.js +126 -0
- package/dist-cjs/server/operations/PinnedShopPublic.js +127 -0
- package/dist-cjs/server/operations/Plan.js +123 -0
- package/dist-cjs/server/operations/PlanPublic.js +124 -0
- package/dist-cjs/server/operations/Plans.js +124 -0
- package/dist-cjs/server/operations/PopularShops.js +122 -0
- package/dist-cjs/server/operations/PopularShopsPublic.js +123 -0
- package/dist-cjs/server/operations/RadiusShops.js +123 -0
- package/dist-cjs/server/operations/RecordVisit.js +129 -0
- package/dist-cjs/server/operations/RedeemFirstTimeReward.js +125 -0
- package/dist-cjs/server/operations/RedeemPointReward.js +126 -0
- package/dist-cjs/server/operations/RedeemVisitReward.js +125 -0
- package/dist-cjs/server/operations/SearchShopsPublic.js +125 -0
- package/dist-cjs/server/operations/SearchSuggestion.js +126 -0
- package/dist-cjs/server/operations/UpdateUser.js +121 -0
- package/dist-cjs/server/operations/index.js +29 -0
- package/dist-es/index.js +4 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +1893 -0
- package/dist-es/openapi.js +3 -0
- package/dist-es/openapi.json +2864 -0
- package/dist-es/protocols/Aws_restJson1.js +2878 -0
- package/dist-es/server/AppAPIService.js +366 -0
- package/dist-es/server/index.js +2 -0
- package/dist-es/server/operations/DeleteUser.js +115 -0
- package/dist-es/server/operations/FavoritePlans.js +119 -0
- package/dist-es/server/operations/FavoriteShops.js +116 -0
- package/dist-es/server/operations/GetShop.js +120 -0
- package/dist-es/server/operations/GetShopPublic.js +121 -0
- package/dist-es/server/operations/GetUser.js +115 -0
- package/dist-es/server/operations/LikeOrg.js +118 -0
- package/dist-es/server/operations/NearbyShops.js +115 -0
- package/dist-es/server/operations/NearbyShopsPublic.js +116 -0
- package/dist-es/server/operations/NearestShop.js +120 -0
- package/dist-es/server/operations/OnboardUser.js +116 -0
- package/dist-es/server/operations/PinnedShop.js +120 -0
- package/dist-es/server/operations/PinnedShopPublic.js +121 -0
- package/dist-es/server/operations/Plan.js +117 -0
- package/dist-es/server/operations/PlanPublic.js +118 -0
- package/dist-es/server/operations/Plans.js +118 -0
- package/dist-es/server/operations/PopularShops.js +116 -0
- package/dist-es/server/operations/PopularShopsPublic.js +117 -0
- package/dist-es/server/operations/RadiusShops.js +117 -0
- package/dist-es/server/operations/RecordVisit.js +123 -0
- package/dist-es/server/operations/RedeemFirstTimeReward.js +119 -0
- package/dist-es/server/operations/RedeemPointReward.js +120 -0
- package/dist-es/server/operations/RedeemVisitReward.js +119 -0
- package/dist-es/server/operations/SearchShopsPublic.js +119 -0
- package/dist-es/server/operations/SearchSuggestion.js +120 -0
- package/dist-es/server/operations/UpdateUser.js +115 -0
- package/dist-es/server/operations/index.js +26 -0
- package/dist-types/index.d.ts +9 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +832 -0
- package/dist-types/openapi.d.ts +7 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +87 -0
- package/dist-types/server/AppAPIService.d.ts +76 -0
- package/dist-types/server/index.d.ts +2 -0
- package/dist-types/server/operations/DeleteUser.d.ts +41 -0
- package/dist-types/server/operations/FavoritePlans.d.ts +41 -0
- package/dist-types/server/operations/FavoriteShops.d.ts +41 -0
- package/dist-types/server/operations/GetShop.d.ts +41 -0
- package/dist-types/server/operations/GetShopPublic.d.ts +41 -0
- package/dist-types/server/operations/GetUser.d.ts +41 -0
- package/dist-types/server/operations/LikeOrg.d.ts +41 -0
- package/dist-types/server/operations/NearbyShops.d.ts +41 -0
- package/dist-types/server/operations/NearbyShopsPublic.d.ts +41 -0
- package/dist-types/server/operations/NearestShop.d.ts +41 -0
- package/dist-types/server/operations/OnboardUser.d.ts +41 -0
- package/dist-types/server/operations/PinnedShop.d.ts +41 -0
- package/dist-types/server/operations/PinnedShopPublic.d.ts +41 -0
- package/dist-types/server/operations/Plan.d.ts +41 -0
- package/dist-types/server/operations/PlanPublic.d.ts +41 -0
- package/dist-types/server/operations/Plans.d.ts +41 -0
- package/dist-types/server/operations/PopularShops.d.ts +41 -0
- package/dist-types/server/operations/PopularShopsPublic.d.ts +41 -0
- package/dist-types/server/operations/RadiusShops.d.ts +41 -0
- package/dist-types/server/operations/RecordVisit.d.ts +41 -0
- package/dist-types/server/operations/RedeemFirstTimeReward.d.ts +41 -0
- package/dist-types/server/operations/RedeemPointReward.d.ts +41 -0
- package/dist-types/server/operations/RedeemVisitReward.d.ts +41 -0
- package/dist-types/server/operations/SearchShopsPublic.d.ts +41 -0
- package/dist-types/server/operations/SearchSuggestion.d.ts +41 -0
- package/dist-types/server/operations/UpdateUser.d.ts +41 -0
- package/dist-types/server/operations/index.d.ts +26 -0
- package/package.json +66 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RuntimeError, SearchSuggestionInput, SearchSuggestionOutput, ValidationException } from "../../models/models_0";
|
|
2
|
+
import { AppAPIService } from "../AppAPIService";
|
|
3
|
+
import { ServerSerdeContext, Mux as __Mux, Operation as __Operation, OperationSerializer as __OperationSerializer, ServerSerdeContext as __ServerSerdeContext, ServiceHandler as __ServiceHandler, SmithyFrameworkException as __SmithyFrameworkException, ValidationCustomizer as __ValidationCustomizer, ValidationFailure as __ValidationFailure } from "@aws-smithy/server-common";
|
|
4
|
+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
5
|
+
export type SearchSuggestion<Context> = __Operation<SearchSuggestionServerInput, SearchSuggestionServerOutput, Context>;
|
|
6
|
+
export interface SearchSuggestionServerInput extends SearchSuggestionInput {
|
|
7
|
+
}
|
|
8
|
+
export declare namespace SearchSuggestionServerInput {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
const validate: (obj: Parameters<typeof SearchSuggestionInput.validate>[0]) => __ValidationFailure[];
|
|
13
|
+
}
|
|
14
|
+
export interface SearchSuggestionServerOutput extends SearchSuggestionOutput {
|
|
15
|
+
}
|
|
16
|
+
export type SearchSuggestionErrors = ValidationException | RuntimeError;
|
|
17
|
+
export declare class SearchSuggestionSerializer implements __OperationSerializer<AppAPIService<any>, "SearchSuggestion", SearchSuggestionErrors> {
|
|
18
|
+
serialize: (input: SearchSuggestionServerOutput, ctx: ServerSerdeContext) => Promise<__HttpResponse>;
|
|
19
|
+
deserialize: (output: __HttpRequest, context: import("@smithy/types").SerdeContext) => Promise<SearchSuggestionServerInput>;
|
|
20
|
+
isOperationError(error: any): error is SearchSuggestionErrors;
|
|
21
|
+
serializeError(error: SearchSuggestionErrors, ctx: ServerSerdeContext): Promise<__HttpResponse>;
|
|
22
|
+
}
|
|
23
|
+
export declare const getSearchSuggestionHandler: <Context>(operation: __Operation<SearchSuggestionServerInput, SearchSuggestionServerOutput, Context>) => __ServiceHandler<Context, __HttpRequest, __HttpResponse>;
|
|
24
|
+
export declare class SearchSuggestionHandler<Context> implements __ServiceHandler<Context> {
|
|
25
|
+
private readonly operation;
|
|
26
|
+
private readonly mux;
|
|
27
|
+
private readonly serializer;
|
|
28
|
+
private readonly serializeFrameworkException;
|
|
29
|
+
private readonly validationCustomizer;
|
|
30
|
+
/**
|
|
31
|
+
* Construct a SearchSuggestion handler.
|
|
32
|
+
* @param operation The {@link __Operation} implementation that supplies the business logic for SearchSuggestion
|
|
33
|
+
* @param mux The {@link __Mux} that verifies which service and operation are being invoked by a given {@link __HttpRequest}
|
|
34
|
+
* @param serializer An {@link __OperationSerializer} for SearchSuggestion that
|
|
35
|
+
* handles deserialization of requests and serialization of responses
|
|
36
|
+
* @param serializeFrameworkException A function that can serialize {@link __SmithyFrameworkException}s
|
|
37
|
+
* @param validationCustomizer A {@link __ValidationCustomizer} for turning validation failures into {@link __SmithyFrameworkException}s
|
|
38
|
+
*/
|
|
39
|
+
constructor(operation: __Operation<SearchSuggestionServerInput, SearchSuggestionServerOutput, Context>, mux: __Mux<"AppAPI", "SearchSuggestion">, serializer: __OperationSerializer<AppAPIService<Context>, "SearchSuggestion", SearchSuggestionErrors>, serializeFrameworkException: (e: __SmithyFrameworkException, ctx: __ServerSerdeContext) => Promise<__HttpResponse>, validationCustomizer: __ValidationCustomizer<"SearchSuggestion">);
|
|
40
|
+
handle(request: __HttpRequest, context: Context): Promise<__HttpResponse>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RuntimeError, UpdateUserInput, UpdateUserOutput, ValidationException } from "../../models/models_0";
|
|
2
|
+
import { AppAPIService } from "../AppAPIService";
|
|
3
|
+
import { ServerSerdeContext, Mux as __Mux, Operation as __Operation, OperationSerializer as __OperationSerializer, ServerSerdeContext as __ServerSerdeContext, ServiceHandler as __ServiceHandler, SmithyFrameworkException as __SmithyFrameworkException, ValidationCustomizer as __ValidationCustomizer, ValidationFailure as __ValidationFailure } from "@aws-smithy/server-common";
|
|
4
|
+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
5
|
+
export type UpdateUser<Context> = __Operation<UpdateUserServerInput, UpdateUserServerOutput, Context>;
|
|
6
|
+
export interface UpdateUserServerInput extends UpdateUserInput {
|
|
7
|
+
}
|
|
8
|
+
export declare namespace UpdateUserServerInput {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
const validate: (obj: Parameters<typeof UpdateUserInput.validate>[0]) => __ValidationFailure[];
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateUserServerOutput extends UpdateUserOutput {
|
|
15
|
+
}
|
|
16
|
+
export type UpdateUserErrors = ValidationException | RuntimeError;
|
|
17
|
+
export declare class UpdateUserSerializer implements __OperationSerializer<AppAPIService<any>, "UpdateUser", UpdateUserErrors> {
|
|
18
|
+
serialize: (input: UpdateUserServerOutput, ctx: ServerSerdeContext) => Promise<__HttpResponse>;
|
|
19
|
+
deserialize: (output: __HttpRequest, context: import("@smithy/types").SerdeContext) => Promise<UpdateUserServerInput>;
|
|
20
|
+
isOperationError(error: any): error is UpdateUserErrors;
|
|
21
|
+
serializeError(error: UpdateUserErrors, ctx: ServerSerdeContext): Promise<__HttpResponse>;
|
|
22
|
+
}
|
|
23
|
+
export declare const getUpdateUserHandler: <Context>(operation: __Operation<UpdateUserServerInput, UpdateUserServerOutput, Context>) => __ServiceHandler<Context, __HttpRequest, __HttpResponse>;
|
|
24
|
+
export declare class UpdateUserHandler<Context> implements __ServiceHandler<Context> {
|
|
25
|
+
private readonly operation;
|
|
26
|
+
private readonly mux;
|
|
27
|
+
private readonly serializer;
|
|
28
|
+
private readonly serializeFrameworkException;
|
|
29
|
+
private readonly validationCustomizer;
|
|
30
|
+
/**
|
|
31
|
+
* Construct a UpdateUser handler.
|
|
32
|
+
* @param operation The {@link __Operation} implementation that supplies the business logic for UpdateUser
|
|
33
|
+
* @param mux The {@link __Mux} that verifies which service and operation are being invoked by a given {@link __HttpRequest}
|
|
34
|
+
* @param serializer An {@link __OperationSerializer} for UpdateUser that
|
|
35
|
+
* handles deserialization of requests and serialization of responses
|
|
36
|
+
* @param serializeFrameworkException A function that can serialize {@link __SmithyFrameworkException}s
|
|
37
|
+
* @param validationCustomizer A {@link __ValidationCustomizer} for turning validation failures into {@link __SmithyFrameworkException}s
|
|
38
|
+
*/
|
|
39
|
+
constructor(operation: __Operation<UpdateUserServerInput, UpdateUserServerOutput, Context>, mux: __Mux<"AppAPI", "UpdateUser">, serializer: __OperationSerializer<AppAPIService<Context>, "UpdateUser", UpdateUserErrors>, serializeFrameworkException: (e: __SmithyFrameworkException, ctx: __ServerSerdeContext) => Promise<__HttpResponse>, validationCustomizer: __ValidationCustomizer<"UpdateUser">);
|
|
40
|
+
handle(request: __HttpRequest, context: Context): Promise<__HttpResponse>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./DeleteUser";
|
|
2
|
+
export * from "./FavoritePlans";
|
|
3
|
+
export * from "./FavoriteShops";
|
|
4
|
+
export * from "./GetShop";
|
|
5
|
+
export * from "./GetShopPublic";
|
|
6
|
+
export * from "./GetUser";
|
|
7
|
+
export * from "./LikeOrg";
|
|
8
|
+
export * from "./NearbyShops";
|
|
9
|
+
export * from "./NearbyShopsPublic";
|
|
10
|
+
export * from "./NearestShop";
|
|
11
|
+
export * from "./OnboardUser";
|
|
12
|
+
export * from "./PinnedShop";
|
|
13
|
+
export * from "./PinnedShopPublic";
|
|
14
|
+
export * from "./Plan";
|
|
15
|
+
export * from "./PlanPublic";
|
|
16
|
+
export * from "./Plans";
|
|
17
|
+
export * from "./PopularShops";
|
|
18
|
+
export * from "./PopularShopsPublic";
|
|
19
|
+
export * from "./RadiusShops";
|
|
20
|
+
export * from "./RecordVisit";
|
|
21
|
+
export * from "./RedeemFirstTimeReward";
|
|
22
|
+
export * from "./RedeemPointReward";
|
|
23
|
+
export * from "./RedeemVisitReward";
|
|
24
|
+
export * from "./SearchShopsPublic";
|
|
25
|
+
export * from "./SearchSuggestion";
|
|
26
|
+
export * from "./UpdateUser";
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sparkrewards/sra-sdk",
|
|
3
|
+
"description": "@sparkrewards/sra-sdk server",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
8
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
9
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
11
|
+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
|
|
12
|
+
"prepack": "yarn run clean && yarn run build"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist-cjs/index.js",
|
|
15
|
+
"types": "./dist-types/index.d.ts",
|
|
16
|
+
"module": "./dist-es/index.js",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@aws-crypto/sha256-browser": "5.2.0",
|
|
20
|
+
"@aws-crypto/sha256-js": "5.2.0",
|
|
21
|
+
"@aws-sdk/core": "3.624.0",
|
|
22
|
+
"@aws-sdk/types": "3.609.0",
|
|
23
|
+
"@aws-smithy/server-common": "1.0.0-alpha.10",
|
|
24
|
+
"@smithy/config-resolver": "^3.0.5",
|
|
25
|
+
"@smithy/fetch-http-handler": "^3.2.4",
|
|
26
|
+
"@smithy/hash-node": "^3.0.3",
|
|
27
|
+
"@smithy/invalid-dependency": "^3.0.3",
|
|
28
|
+
"@smithy/middleware-content-length": "^3.0.5",
|
|
29
|
+
"@smithy/middleware-retry": "^3.0.14",
|
|
30
|
+
"@smithy/middleware-serde": "^3.0.3",
|
|
31
|
+
"@smithy/middleware-stack": "^3.0.3",
|
|
32
|
+
"@smithy/node-http-handler": "^3.1.4",
|
|
33
|
+
"@smithy/protocol-http": "^4.1.0",
|
|
34
|
+
"@smithy/smithy-client": "^3.1.12",
|
|
35
|
+
"@smithy/types": "^3.3.0",
|
|
36
|
+
"@smithy/url-parser": "^3.0.3",
|
|
37
|
+
"@smithy/util-base64": "^3.0.0",
|
|
38
|
+
"@smithy/util-body-length-browser": "^3.0.0",
|
|
39
|
+
"@smithy/util-body-length-node": "^3.0.0",
|
|
40
|
+
"@smithy/util-defaults-mode-browser": "^3.0.14",
|
|
41
|
+
"@smithy/util-defaults-mode-node": "^3.0.14",
|
|
42
|
+
"@smithy/util-utf8": "^3.0.0",
|
|
43
|
+
"tslib": "^2.6.2"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@tsconfig/node16": "16.1.3",
|
|
47
|
+
"@types/node": "^16.18.96",
|
|
48
|
+
"concurrently": "7.0.0",
|
|
49
|
+
"downlevel-dts": "0.10.1",
|
|
50
|
+
"rimraf": "^3.0.0",
|
|
51
|
+
"typescript": "~4.9.5"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=16.0.0"
|
|
55
|
+
},
|
|
56
|
+
"typesVersions": {
|
|
57
|
+
"<4.0": {
|
|
58
|
+
"dist-types/*": [
|
|
59
|
+
"dist-types/ts3.4/*"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
"dist-*/**"
|
|
65
|
+
]
|
|
66
|
+
}
|