@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,832 @@
|
|
|
1
|
+
import { ServiceException as __BaseException, ValidationFailure as __ValidationFailure } from "@aws-smithy/server-common";
|
|
2
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
3
|
+
/**
|
|
4
|
+
* Describes one specific validation failure for an input member.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationExceptionField {
|
|
8
|
+
/**
|
|
9
|
+
* A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
path: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* A detailed description of the validation failure.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
message: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace ValidationExceptionField {
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
const validate: (obj: ValidationExceptionField, path?: string) => __ValidationFailure[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A standard error for input validation failures.
|
|
27
|
+
* This should be thrown by services when a member of the input structure
|
|
28
|
+
* falls outside of the modeled or documented constraints.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare class ValidationException extends __BaseException {
|
|
32
|
+
readonly name: "ValidationException";
|
|
33
|
+
readonly $fault: "client";
|
|
34
|
+
/**
|
|
35
|
+
* A list of specific failures encountered while validating the input.
|
|
36
|
+
* A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
fieldList?: (ValidationExceptionField)[];
|
|
40
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Input for DeleteUser - no query params, uses auth token
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface DeleteUserInput {
|
|
47
|
+
}
|
|
48
|
+
export declare namespace DeleteUserInput {
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
const validate: (obj: DeleteUserInput, path?: string) => __ValidationFailure[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Output for DeleteUser
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export interface DeleteUserOutput {
|
|
59
|
+
message?: string;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace DeleteUserOutput {
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
const validate: (obj: DeleteUserOutput, path?: string) => __ValidationFailure[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare class RuntimeError extends __BaseException {
|
|
71
|
+
readonly name: "RuntimeError";
|
|
72
|
+
readonly $fault: "server";
|
|
73
|
+
constructor(opts: __ExceptionOptionType<RuntimeError, __BaseException>);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export interface PlansListInput {
|
|
79
|
+
page?: number;
|
|
80
|
+
limit?: number;
|
|
81
|
+
lat: number | undefined;
|
|
82
|
+
lon: number | undefined;
|
|
83
|
+
}
|
|
84
|
+
export declare namespace PlansListInput {
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
const validate: (obj: PlansListInput, path?: string) => __ValidationFailure[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export interface PaginationInfo {
|
|
94
|
+
currentPage?: number;
|
|
95
|
+
limit: number | undefined;
|
|
96
|
+
hasMore: boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The next page number, or null if there are no more pages
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
nextPage: number | undefined;
|
|
102
|
+
}
|
|
103
|
+
export declare namespace PaginationInfo {
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
const validate: (obj: PaginationInfo, path?: string) => __ValidationFailure[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export interface Reward {
|
|
113
|
+
reward_id?: string;
|
|
114
|
+
id?: string;
|
|
115
|
+
}
|
|
116
|
+
export declare namespace Reward {
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
const validate: (obj: Reward, path?: string) => __ValidationFailure[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export interface PointsRewardOption {
|
|
126
|
+
id: string | undefined;
|
|
127
|
+
reward: string | undefined;
|
|
128
|
+
points: number | undefined;
|
|
129
|
+
}
|
|
130
|
+
export declare namespace PointsRewardOption {
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
const validate: (obj: PointsRewardOption, path?: string) => __ValidationFailure[];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
export interface Tier {
|
|
140
|
+
id: string | undefined;
|
|
141
|
+
rewards: (string)[] | undefined;
|
|
142
|
+
}
|
|
143
|
+
export declare namespace Tier {
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
const validate: (obj: Tier, path?: string) => __ValidationFailure[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export interface VisitRewardProps {
|
|
153
|
+
tiers: Record<string, Tier> | undefined;
|
|
154
|
+
min_spend: number | undefined;
|
|
155
|
+
}
|
|
156
|
+
export declare namespace VisitRewardProps {
|
|
157
|
+
/**
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
const validate: (obj: VisitRewardProps, path?: string) => __ValidationFailure[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
export interface RewardPlan {
|
|
166
|
+
visits?: VisitRewardProps;
|
|
167
|
+
points?: (PointsRewardOption)[];
|
|
168
|
+
}
|
|
169
|
+
export declare namespace RewardPlan {
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
const validate: (obj: RewardPlan, path?: string) => __ValidationFailure[];
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
export interface GroupedPlan {
|
|
179
|
+
reward_plan: RewardPlan | undefined;
|
|
180
|
+
visits: number | undefined;
|
|
181
|
+
points: number | undefined;
|
|
182
|
+
redeemableRewards: (Reward)[] | undefined;
|
|
183
|
+
visits_active: boolean | undefined;
|
|
184
|
+
points_active: boolean | undefined;
|
|
185
|
+
banner: string | undefined;
|
|
186
|
+
logo: string | undefined;
|
|
187
|
+
org_id: string | undefined;
|
|
188
|
+
shop_id: string | undefined;
|
|
189
|
+
name: string | undefined;
|
|
190
|
+
id: string | undefined;
|
|
191
|
+
active: boolean | undefined;
|
|
192
|
+
favorite: boolean | undefined;
|
|
193
|
+
num_redeemableRewards: number | undefined;
|
|
194
|
+
}
|
|
195
|
+
export declare namespace GroupedPlan {
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
*/
|
|
199
|
+
const validate: (obj: GroupedPlan, path?: string) => __ValidationFailure[];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @public
|
|
203
|
+
*/
|
|
204
|
+
export interface PlansOutput {
|
|
205
|
+
value: (GroupedPlan)[] | undefined;
|
|
206
|
+
count: number | undefined;
|
|
207
|
+
pagination: PaginationInfo | undefined;
|
|
208
|
+
}
|
|
209
|
+
export declare namespace PlansOutput {
|
|
210
|
+
/**
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
const validate: (obj: PlansOutput, path?: string) => __ValidationFailure[];
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Input for shop list operations that require location and pagination
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
export interface ShopListInput {
|
|
220
|
+
lat?: number;
|
|
221
|
+
lon?: number;
|
|
222
|
+
page?: number;
|
|
223
|
+
filters?: string;
|
|
224
|
+
}
|
|
225
|
+
export declare namespace ShopListInput {
|
|
226
|
+
/**
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
const validate: (obj: ShopListInput, path?: string) => __ValidationFailure[];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Location details for a shop
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
export interface LocationDetails {
|
|
236
|
+
address: string | undefined;
|
|
237
|
+
city: string | undefined;
|
|
238
|
+
state: string | undefined;
|
|
239
|
+
zipcode: string | undefined;
|
|
240
|
+
}
|
|
241
|
+
export declare namespace LocationDetails {
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
const validate: (obj: LocationDetails, path?: string) => __ValidationFailure[];
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Individual shop hours entry for a day
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export interface ShopHoursItem {
|
|
252
|
+
day: string | undefined;
|
|
253
|
+
open: string | undefined;
|
|
254
|
+
close: string | undefined;
|
|
255
|
+
}
|
|
256
|
+
export declare namespace ShopHoursItem {
|
|
257
|
+
/**
|
|
258
|
+
* @internal
|
|
259
|
+
*/
|
|
260
|
+
const validate: (obj: ShopHoursItem, path?: string) => __ValidationFailure[];
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Base shop structure returned from enrichList/enrichSingle
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
export interface EnrichedShop {
|
|
267
|
+
shop_id: string | undefined;
|
|
268
|
+
org_id: string | undefined;
|
|
269
|
+
preview: string | undefined;
|
|
270
|
+
name: string | undefined;
|
|
271
|
+
distance: string | undefined;
|
|
272
|
+
favorite?: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* Location details for a shop
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
location: LocationDetails | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* List of shop hours for all days
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
282
|
+
shop_hours: (ShopHoursItem)[] | undefined;
|
|
283
|
+
logo?: string;
|
|
284
|
+
tags: (string)[] | undefined;
|
|
285
|
+
}
|
|
286
|
+
export declare namespace EnrichedShop {
|
|
287
|
+
/**
|
|
288
|
+
* @internal
|
|
289
|
+
*/
|
|
290
|
+
const validate: (obj: EnrichedShop, path?: string) => __ValidationFailure[];
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Output for NearbyShops, FavoriteShops, PopularShops, RadiusShops
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
export interface ShopListWithPaginationOutput {
|
|
297
|
+
message?: string;
|
|
298
|
+
value?: (EnrichedShop)[];
|
|
299
|
+
count?: number;
|
|
300
|
+
pagination?: PaginationInfo;
|
|
301
|
+
}
|
|
302
|
+
export declare namespace ShopListWithPaginationOutput {
|
|
303
|
+
/**
|
|
304
|
+
* @internal
|
|
305
|
+
*/
|
|
306
|
+
const validate: (obj: ShopListWithPaginationOutput, path?: string) => __ValidationFailure[];
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Input for getting shop details
|
|
310
|
+
* @public
|
|
311
|
+
*/
|
|
312
|
+
export interface GetShopInput {
|
|
313
|
+
shop_id: string | undefined;
|
|
314
|
+
}
|
|
315
|
+
export declare namespace GetShopInput {
|
|
316
|
+
/**
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
const validate: (obj: GetShopInput, path?: string) => __ValidationFailure[];
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @public
|
|
323
|
+
*/
|
|
324
|
+
export declare class NotFoundError extends __BaseException {
|
|
325
|
+
readonly name: "NotFoundError";
|
|
326
|
+
readonly $fault: "client";
|
|
327
|
+
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Full shop details structure
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
export interface ShopDetails {
|
|
334
|
+
id: string | undefined;
|
|
335
|
+
org_id: string | undefined;
|
|
336
|
+
shop_name: string | undefined;
|
|
337
|
+
org_name: string | undefined;
|
|
338
|
+
banner?: string;
|
|
339
|
+
preview: string | undefined;
|
|
340
|
+
logo: string | undefined;
|
|
341
|
+
description: string | undefined;
|
|
342
|
+
country_code: string | undefined;
|
|
343
|
+
latitude?: number;
|
|
344
|
+
longitude: number | undefined;
|
|
345
|
+
active: boolean | undefined;
|
|
346
|
+
menu?: string;
|
|
347
|
+
phone_number?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Location details for a shop
|
|
350
|
+
* @public
|
|
351
|
+
*/
|
|
352
|
+
location: LocationDetails | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* List of shop hours for all days
|
|
355
|
+
* @public
|
|
356
|
+
*/
|
|
357
|
+
shop_hours: (ShopHoursItem)[] | undefined;
|
|
358
|
+
sent_setup?: boolean;
|
|
359
|
+
setup: boolean | undefined;
|
|
360
|
+
tags: (string)[] | undefined;
|
|
361
|
+
}
|
|
362
|
+
export declare namespace ShopDetails {
|
|
363
|
+
/**
|
|
364
|
+
* @internal
|
|
365
|
+
*/
|
|
366
|
+
const validate: (obj: ShopDetails, path?: string) => __ValidationFailure[];
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Input for GetUser - no query params, uses auth token
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
372
|
+
export interface GetUserInput {
|
|
373
|
+
}
|
|
374
|
+
export declare namespace GetUserInput {
|
|
375
|
+
/**
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
const validate: (obj: GetUserInput, path?: string) => __ValidationFailure[];
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
383
|
+
export interface UserFullname {
|
|
384
|
+
firstName?: string;
|
|
385
|
+
lastName?: string;
|
|
386
|
+
}
|
|
387
|
+
export declare namespace UserFullname {
|
|
388
|
+
/**
|
|
389
|
+
* @internal
|
|
390
|
+
*/
|
|
391
|
+
const validate: (obj: UserFullname, path?: string) => __ValidationFailure[];
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* @public
|
|
395
|
+
*/
|
|
396
|
+
export interface UserPreferences {
|
|
397
|
+
lightMode?: boolean;
|
|
398
|
+
}
|
|
399
|
+
export declare namespace UserPreferences {
|
|
400
|
+
/**
|
|
401
|
+
* @internal
|
|
402
|
+
*/
|
|
403
|
+
const validate: (obj: UserPreferences, path?: string) => __ValidationFailure[];
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Full user object structure
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export interface User {
|
|
410
|
+
id: string | undefined;
|
|
411
|
+
email: string | undefined;
|
|
412
|
+
birthdate: string | undefined;
|
|
413
|
+
fullname?: UserFullname;
|
|
414
|
+
date_created: string | undefined;
|
|
415
|
+
newAccount: boolean | undefined;
|
|
416
|
+
preferences: UserPreferences | undefined;
|
|
417
|
+
total_visits: number | undefined;
|
|
418
|
+
total_points: number | undefined;
|
|
419
|
+
total_rewards: number | undefined;
|
|
420
|
+
fraud_count?: number;
|
|
421
|
+
num_redeemableRewards?: number;
|
|
422
|
+
}
|
|
423
|
+
export declare namespace User {
|
|
424
|
+
/**
|
|
425
|
+
* @internal
|
|
426
|
+
*/
|
|
427
|
+
const validate: (obj: User, path?: string) => __ValidationFailure[];
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Output for GetUser
|
|
431
|
+
* @public
|
|
432
|
+
*/
|
|
433
|
+
export interface GetUserOutput {
|
|
434
|
+
message?: string;
|
|
435
|
+
/**
|
|
436
|
+
* Full user object structure
|
|
437
|
+
* @public
|
|
438
|
+
*/
|
|
439
|
+
user?: User;
|
|
440
|
+
}
|
|
441
|
+
export declare namespace GetUserOutput {
|
|
442
|
+
/**
|
|
443
|
+
* @internal
|
|
444
|
+
*/
|
|
445
|
+
const validate: (obj: GetUserOutput, path?: string) => __ValidationFailure[];
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Input for LikeOrg - likely needs org_id to like/unlike
|
|
449
|
+
* @public
|
|
450
|
+
*/
|
|
451
|
+
export interface LikeOrgInput {
|
|
452
|
+
org_id: string | undefined;
|
|
453
|
+
}
|
|
454
|
+
export declare namespace LikeOrgInput {
|
|
455
|
+
/**
|
|
456
|
+
* @internal
|
|
457
|
+
*/
|
|
458
|
+
const validate: (obj: LikeOrgInput, path?: string) => __ValidationFailure[];
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Output for LikeOrg
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
464
|
+
export interface LikeOrgOutput {
|
|
465
|
+
message?: string;
|
|
466
|
+
liked?: boolean;
|
|
467
|
+
}
|
|
468
|
+
export declare namespace LikeOrgOutput {
|
|
469
|
+
/**
|
|
470
|
+
* @internal
|
|
471
|
+
*/
|
|
472
|
+
const validate: (obj: LikeOrgOutput, path?: string) => __ValidationFailure[];
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Input for nearest shop search
|
|
476
|
+
* @public
|
|
477
|
+
*/
|
|
478
|
+
export interface NearestShopInput {
|
|
479
|
+
shop_name: string | undefined;
|
|
480
|
+
lat: number | undefined;
|
|
481
|
+
lon: number | undefined;
|
|
482
|
+
}
|
|
483
|
+
export declare namespace NearestShopInput {
|
|
484
|
+
/**
|
|
485
|
+
* @internal
|
|
486
|
+
*/
|
|
487
|
+
const validate: (obj: NearestShopInput, path?: string) => __ValidationFailure[];
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Input for OnboardUser - no query params, uses auth token
|
|
491
|
+
* @public
|
|
492
|
+
*/
|
|
493
|
+
export interface OnboardUserInput {
|
|
494
|
+
}
|
|
495
|
+
export declare namespace OnboardUserInput {
|
|
496
|
+
/**
|
|
497
|
+
* @internal
|
|
498
|
+
*/
|
|
499
|
+
const validate: (obj: OnboardUserInput, path?: string) => __ValidationFailure[];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Output for OnboardUser
|
|
503
|
+
* @public
|
|
504
|
+
*/
|
|
505
|
+
export interface OnboardUserOutput {
|
|
506
|
+
message?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Full user object structure
|
|
509
|
+
* @public
|
|
510
|
+
*/
|
|
511
|
+
user?: User;
|
|
512
|
+
}
|
|
513
|
+
export declare namespace OnboardUserOutput {
|
|
514
|
+
/**
|
|
515
|
+
* @internal
|
|
516
|
+
*/
|
|
517
|
+
const validate: (obj: OnboardUserOutput, path?: string) => __ValidationFailure[];
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Input for pinned shop (requires location)
|
|
521
|
+
* @public
|
|
522
|
+
*/
|
|
523
|
+
export interface PinnedShopInput {
|
|
524
|
+
shop_id: string | undefined;
|
|
525
|
+
lat: number | undefined;
|
|
526
|
+
lon: number | undefined;
|
|
527
|
+
}
|
|
528
|
+
export declare namespace PinnedShopInput {
|
|
529
|
+
/**
|
|
530
|
+
* @internal
|
|
531
|
+
*/
|
|
532
|
+
const validate: (obj: PinnedShopInput, path?: string) => __ValidationFailure[];
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @public
|
|
536
|
+
*/
|
|
537
|
+
export interface PlanGetInput {
|
|
538
|
+
org_id: string | undefined;
|
|
539
|
+
}
|
|
540
|
+
export declare namespace PlanGetInput {
|
|
541
|
+
/**
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
const validate: (obj: PlanGetInput, path?: string) => __ValidationFailure[];
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* @public
|
|
548
|
+
*/
|
|
549
|
+
export interface FirstTimeReward {
|
|
550
|
+
active?: boolean;
|
|
551
|
+
description?: string;
|
|
552
|
+
}
|
|
553
|
+
export declare namespace FirstTimeReward {
|
|
554
|
+
/**
|
|
555
|
+
* @internal
|
|
556
|
+
*/
|
|
557
|
+
const validate: (obj: FirstTimeReward, path?: string) => __ValidationFailure[];
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @public
|
|
561
|
+
*/
|
|
562
|
+
export interface PlanOutput {
|
|
563
|
+
reward_plan: RewardPlan | undefined;
|
|
564
|
+
visits: number | undefined;
|
|
565
|
+
points: number | undefined;
|
|
566
|
+
redeemableRewards: (Reward)[] | undefined;
|
|
567
|
+
min_spend?: number;
|
|
568
|
+
visits_active: boolean | undefined;
|
|
569
|
+
points_active: boolean | undefined;
|
|
570
|
+
firstPlan: boolean | undefined;
|
|
571
|
+
id: string | undefined;
|
|
572
|
+
active: boolean | undefined;
|
|
573
|
+
organization_id?: string;
|
|
574
|
+
name: string | undefined;
|
|
575
|
+
favorite: boolean | undefined;
|
|
576
|
+
first_time_reward: FirstTimeReward | undefined;
|
|
577
|
+
}
|
|
578
|
+
export declare namespace PlanOutput {
|
|
579
|
+
/**
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
const validate: (obj: PlanOutput, path?: string) => __ValidationFailure[];
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Simple shop structure with just coordinates
|
|
586
|
+
* @public
|
|
587
|
+
*/
|
|
588
|
+
export interface ShopLocation {
|
|
589
|
+
id: string | undefined;
|
|
590
|
+
longitude: number | undefined;
|
|
591
|
+
latitude: number | undefined;
|
|
592
|
+
}
|
|
593
|
+
export declare namespace ShopLocation {
|
|
594
|
+
/**
|
|
595
|
+
* @internal
|
|
596
|
+
*/
|
|
597
|
+
const validate: (obj: ShopLocation, path?: string) => __ValidationFailure[];
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Output for RadiusShops (simple location list)
|
|
601
|
+
* @public
|
|
602
|
+
*/
|
|
603
|
+
export interface RadiusShopsOutput {
|
|
604
|
+
message?: string;
|
|
605
|
+
count?: number;
|
|
606
|
+
value?: (ShopLocation)[];
|
|
607
|
+
}
|
|
608
|
+
export declare namespace RadiusShopsOutput {
|
|
609
|
+
/**
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
612
|
+
const validate: (obj: RadiusShopsOutput, path?: string) => __ValidationFailure[];
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* @public
|
|
616
|
+
*/
|
|
617
|
+
export declare class InvalidOperationError extends __BaseException {
|
|
618
|
+
readonly name: "InvalidOperationError";
|
|
619
|
+
readonly $fault: "client";
|
|
620
|
+
constructor(opts: __ExceptionOptionType<InvalidOperationError, __BaseException>);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Input for RecordVisit - records a visit/scan at a shop
|
|
624
|
+
* @public
|
|
625
|
+
*/
|
|
626
|
+
export interface RecordVisitInput {
|
|
627
|
+
shop_id: string | undefined;
|
|
628
|
+
timestamp: string | undefined;
|
|
629
|
+
lat: number | undefined;
|
|
630
|
+
lon: number | undefined;
|
|
631
|
+
}
|
|
632
|
+
export declare namespace RecordVisitInput {
|
|
633
|
+
/**
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
const validate: (obj: RecordVisitInput, path?: string) => __ValidationFailure[];
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Output for RecordVisit
|
|
640
|
+
* @public
|
|
641
|
+
*/
|
|
642
|
+
export interface RecordVisitOutput {
|
|
643
|
+
success: boolean | undefined;
|
|
644
|
+
message: string | undefined;
|
|
645
|
+
visitId: string | undefined;
|
|
646
|
+
reason?: string;
|
|
647
|
+
}
|
|
648
|
+
export declare namespace RecordVisitOutput {
|
|
649
|
+
/**
|
|
650
|
+
* @internal
|
|
651
|
+
*/
|
|
652
|
+
const validate: (obj: RecordVisitOutput, path?: string) => __ValidationFailure[];
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* @public
|
|
656
|
+
*/
|
|
657
|
+
export interface RedeemFirstTimeRewardInput {
|
|
658
|
+
org_id: string | undefined;
|
|
659
|
+
}
|
|
660
|
+
export declare namespace RedeemFirstTimeRewardInput {
|
|
661
|
+
/**
|
|
662
|
+
* @internal
|
|
663
|
+
*/
|
|
664
|
+
const validate: (obj: RedeemFirstTimeRewardInput, path?: string) => __ValidationFailure[];
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* @public
|
|
668
|
+
*/
|
|
669
|
+
export interface RedeemRewardOutput {
|
|
670
|
+
message: string | undefined;
|
|
671
|
+
redeemed: boolean | undefined;
|
|
672
|
+
}
|
|
673
|
+
export declare namespace RedeemRewardOutput {
|
|
674
|
+
/**
|
|
675
|
+
* @internal
|
|
676
|
+
*/
|
|
677
|
+
const validate: (obj: RedeemRewardOutput, path?: string) => __ValidationFailure[];
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* @public
|
|
681
|
+
*/
|
|
682
|
+
export interface RedeemPointRewardInput {
|
|
683
|
+
org_id: string | undefined;
|
|
684
|
+
reward_id: string | undefined;
|
|
685
|
+
}
|
|
686
|
+
export declare namespace RedeemPointRewardInput {
|
|
687
|
+
/**
|
|
688
|
+
* @internal
|
|
689
|
+
*/
|
|
690
|
+
const validate: (obj: RedeemPointRewardInput, path?: string) => __ValidationFailure[];
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* @public
|
|
694
|
+
*/
|
|
695
|
+
export interface RedeemPointRewardOutput {
|
|
696
|
+
message: string | undefined;
|
|
697
|
+
redeemed: boolean | undefined;
|
|
698
|
+
pointsUsed: number | undefined;
|
|
699
|
+
remainingPoints: number | undefined;
|
|
700
|
+
}
|
|
701
|
+
export declare namespace RedeemPointRewardOutput {
|
|
702
|
+
/**
|
|
703
|
+
* @internal
|
|
704
|
+
*/
|
|
705
|
+
const validate: (obj: RedeemPointRewardOutput, path?: string) => __ValidationFailure[];
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* @public
|
|
709
|
+
*/
|
|
710
|
+
export interface RedeemVisitRewardInput {
|
|
711
|
+
reward_id: string | undefined;
|
|
712
|
+
}
|
|
713
|
+
export declare namespace RedeemVisitRewardInput {
|
|
714
|
+
/**
|
|
715
|
+
* @internal
|
|
716
|
+
*/
|
|
717
|
+
const validate: (obj: RedeemVisitRewardInput, path?: string) => __ValidationFailure[];
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* @public
|
|
721
|
+
*/
|
|
722
|
+
export interface SearchShopsInput {
|
|
723
|
+
q: string | undefined;
|
|
724
|
+
limit?: number;
|
|
725
|
+
lat?: number;
|
|
726
|
+
lon?: number;
|
|
727
|
+
page?: number;
|
|
728
|
+
filters?: string;
|
|
729
|
+
}
|
|
730
|
+
export declare namespace SearchShopsInput {
|
|
731
|
+
/**
|
|
732
|
+
* @internal
|
|
733
|
+
*/
|
|
734
|
+
const validate: (obj: SearchShopsInput, path?: string) => __ValidationFailure[];
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Note: FilterShopsInput is the same as ShopListInput - reuse ShopListInput
|
|
738
|
+
* Input for search suggestions
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
export interface SearchSuggestionInput {
|
|
742
|
+
q: string | undefined;
|
|
743
|
+
limit?: number;
|
|
744
|
+
lat?: number;
|
|
745
|
+
lon?: number;
|
|
746
|
+
}
|
|
747
|
+
export declare namespace SearchSuggestionInput {
|
|
748
|
+
/**
|
|
749
|
+
* @internal
|
|
750
|
+
*/
|
|
751
|
+
const validate: (obj: SearchSuggestionInput, path?: string) => __ValidationFailure[];
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Search suggestion result structure
|
|
755
|
+
* @public
|
|
756
|
+
*/
|
|
757
|
+
export interface SearchSuggestionItem {
|
|
758
|
+
shop_id: string | undefined;
|
|
759
|
+
organization_id: string | undefined;
|
|
760
|
+
search_name: string | undefined;
|
|
761
|
+
favorite: boolean | undefined;
|
|
762
|
+
distance: number | undefined;
|
|
763
|
+
}
|
|
764
|
+
export declare namespace SearchSuggestionItem {
|
|
765
|
+
/**
|
|
766
|
+
* @internal
|
|
767
|
+
*/
|
|
768
|
+
const validate: (obj: SearchSuggestionItem, path?: string) => __ValidationFailure[];
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Output for SearchSuggestion - returns SearchSuggestionList
|
|
772
|
+
* Handler should return \{ value: SearchSuggestionList \} where value is the array
|
|
773
|
+
* @public
|
|
774
|
+
*/
|
|
775
|
+
export interface SearchSuggestionOutput {
|
|
776
|
+
value?: (SearchSuggestionItem)[];
|
|
777
|
+
}
|
|
778
|
+
export declare namespace SearchSuggestionOutput {
|
|
779
|
+
/**
|
|
780
|
+
* @internal
|
|
781
|
+
*/
|
|
782
|
+
const validate: (obj: SearchSuggestionOutput, path?: string) => __ValidationFailure[];
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Partial fullname structure for updates (all fields optional)
|
|
786
|
+
* @public
|
|
787
|
+
*/
|
|
788
|
+
export interface UserFullnameUpdate {
|
|
789
|
+
firstName?: string;
|
|
790
|
+
lastName?: string;
|
|
791
|
+
}
|
|
792
|
+
export declare namespace UserFullnameUpdate {
|
|
793
|
+
/**
|
|
794
|
+
* @internal
|
|
795
|
+
*/
|
|
796
|
+
const validate: (obj: UserFullnameUpdate, path?: string) => __ValidationFailure[];
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Input for UpdateUser - body contains fullname fields
|
|
800
|
+
* @public
|
|
801
|
+
*/
|
|
802
|
+
export interface UpdateUserInput {
|
|
803
|
+
/**
|
|
804
|
+
* Partial fullname structure for updates (all fields optional)
|
|
805
|
+
* @public
|
|
806
|
+
*/
|
|
807
|
+
fullname?: UserFullnameUpdate;
|
|
808
|
+
}
|
|
809
|
+
export declare namespace UpdateUserInput {
|
|
810
|
+
/**
|
|
811
|
+
* @internal
|
|
812
|
+
*/
|
|
813
|
+
const validate: (obj: UpdateUserInput, path?: string) => __ValidationFailure[];
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Output for UpdateUser
|
|
817
|
+
* @public
|
|
818
|
+
*/
|
|
819
|
+
export interface UpdateUserOutput {
|
|
820
|
+
message?: string;
|
|
821
|
+
/**
|
|
822
|
+
* Full user object structure
|
|
823
|
+
* @public
|
|
824
|
+
*/
|
|
825
|
+
user?: User;
|
|
826
|
+
}
|
|
827
|
+
export declare namespace UpdateUserOutput {
|
|
828
|
+
/**
|
|
829
|
+
* @internal
|
|
830
|
+
*/
|
|
831
|
+
const validate: (obj: UpdateUserOutput, path?: string) => __ValidationFailure[];
|
|
832
|
+
}
|