@sparkrewards/sra-sdk 0.0.4 → 0.0.6

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.
@@ -185,7 +185,10 @@ const getAppAPIServiceHandler = (service) => {
185
185
  new server_common_1.httpbinding.UriSpec('GET', [
186
186
  { type: 'path_literal', value: "shops" },
187
187
  { type: 'path_literal', value: "favorite" },
188
- ], [], { service: "AppAPI", operation: "FavoriteShops" }),
188
+ ], [
189
+ { type: 'query', key: "lat" },
190
+ { type: 'query', key: "lon" },
191
+ ], { service: "AppAPI", operation: "FavoriteShops" }),
189
192
  new server_common_1.httpbinding.UriSpec('GET', [
190
193
  { type: 'path_literal', value: "shops" },
191
194
  { type: 'path_literal', value: "shop" },
@@ -208,11 +211,17 @@ const getAppAPIServiceHandler = (service) => {
208
211
  ], { service: "AppAPI", operation: "LikeOrg" }),
209
212
  new server_common_1.httpbinding.UriSpec('GET', [
210
213
  { type: 'path_literal', value: "shops" },
211
- ], [], { service: "AppAPI", operation: "NearbyShops" }),
214
+ ], [
215
+ { type: 'query', key: "lat" },
216
+ { type: 'query', key: "lon" },
217
+ ], { service: "AppAPI", operation: "NearbyShops" }),
212
218
  new server_common_1.httpbinding.UriSpec('GET', [
213
219
  { type: 'path_literal', value: "public" },
214
220
  { type: 'path_literal', value: "shops" },
215
- ], [], { service: "AppAPI", operation: "NearbyShopsPublic" }),
221
+ ], [
222
+ { type: 'query', key: "lat" },
223
+ { type: 'query', key: "lon" },
224
+ ], { service: "AppAPI", operation: "NearbyShopsPublic" }),
216
225
  new server_common_1.httpbinding.UriSpec('GET', [
217
226
  { type: 'path_literal', value: "shops" },
218
227
  { type: 'path_literal', value: "nearest" },
@@ -262,17 +271,26 @@ const getAppAPIServiceHandler = (service) => {
262
271
  new server_common_1.httpbinding.UriSpec('GET', [
263
272
  { type: 'path_literal', value: "shops" },
264
273
  { type: 'path_literal', value: "popular" },
265
- ], [], { service: "AppAPI", operation: "PopularShops" }),
274
+ ], [
275
+ { type: 'query', key: "lat" },
276
+ { type: 'query', key: "lon" },
277
+ ], { service: "AppAPI", operation: "PopularShops" }),
266
278
  new server_common_1.httpbinding.UriSpec('GET', [
267
279
  { type: 'path_literal', value: "public" },
268
280
  { type: 'path_literal', value: "shops" },
269
281
  { type: 'path_literal', value: "popular" },
270
- ], [], { service: "AppAPI", operation: "PopularShopsPublic" }),
282
+ ], [
283
+ { type: 'query', key: "lat" },
284
+ { type: 'query', key: "lon" },
285
+ ], { service: "AppAPI", operation: "PopularShopsPublic" }),
271
286
  new server_common_1.httpbinding.UriSpec('GET', [
272
287
  { type: 'path_literal', value: "public" },
273
288
  { type: 'path_literal', value: "shops" },
274
289
  { type: 'path_literal', value: "radius" },
275
- ], [], { service: "AppAPI", operation: "RadiusShops" }),
290
+ ], [
291
+ { type: 'query', key: "lat" },
292
+ { type: 'query', key: "lon" },
293
+ ], { service: "AppAPI", operation: "RadiusShops" }),
276
294
  new server_common_1.httpbinding.UriSpec('POST', [
277
295
  { type: 'path_literal', value: "visit" },
278
296
  ], [
@@ -41,7 +41,10 @@ const getFavoriteShopsHandler = (operation) => {
41
41
  new server_common_1.httpbinding.UriSpec('GET', [
42
42
  { type: 'path_literal', value: "shops" },
43
43
  { type: 'path_literal', value: "favorite" },
44
- ], [], { service: "AppAPI", operation: "FavoriteShops" }),
44
+ ], [
45
+ { type: 'query', key: "lat" },
46
+ { type: 'query', key: "lon" },
47
+ ], { service: "AppAPI", operation: "FavoriteShops" }),
45
48
  ]);
46
49
  const customizer = (ctx, failures) => {
47
50
  if (!failures) {
@@ -40,7 +40,10 @@ const getNearbyShopsHandler = (operation) => {
40
40
  const mux = new server_common_1.httpbinding.HttpBindingMux([
41
41
  new server_common_1.httpbinding.UriSpec('GET', [
42
42
  { type: 'path_literal', value: "shops" },
43
- ], [], { service: "AppAPI", operation: "NearbyShops" }),
43
+ ], [
44
+ { type: 'query', key: "lat" },
45
+ { type: 'query', key: "lon" },
46
+ ], { service: "AppAPI", operation: "NearbyShops" }),
44
47
  ]);
45
48
  const customizer = (ctx, failures) => {
46
49
  if (!failures) {
@@ -41,7 +41,10 @@ const getNearbyShopsPublicHandler = (operation) => {
41
41
  new server_common_1.httpbinding.UriSpec('GET', [
42
42
  { type: 'path_literal', value: "public" },
43
43
  { type: 'path_literal', value: "shops" },
44
- ], [], { service: "AppAPI", operation: "NearbyShopsPublic" }),
44
+ ], [
45
+ { type: 'query', key: "lat" },
46
+ { type: 'query', key: "lon" },
47
+ ], { service: "AppAPI", operation: "NearbyShopsPublic" }),
45
48
  ]);
46
49
  const customizer = (ctx, failures) => {
47
50
  if (!failures) {
@@ -41,7 +41,10 @@ const getPopularShopsHandler = (operation) => {
41
41
  new server_common_1.httpbinding.UriSpec('GET', [
42
42
  { type: 'path_literal', value: "shops" },
43
43
  { type: 'path_literal', value: "popular" },
44
- ], [], { service: "AppAPI", operation: "PopularShops" }),
44
+ ], [
45
+ { type: 'query', key: "lat" },
46
+ { type: 'query', key: "lon" },
47
+ ], { service: "AppAPI", operation: "PopularShops" }),
45
48
  ]);
46
49
  const customizer = (ctx, failures) => {
47
50
  if (!failures) {
@@ -42,7 +42,10 @@ const getPopularShopsPublicHandler = (operation) => {
42
42
  { type: 'path_literal', value: "public" },
43
43
  { type: 'path_literal', value: "shops" },
44
44
  { type: 'path_literal', value: "popular" },
45
- ], [], { service: "AppAPI", operation: "PopularShopsPublic" }),
45
+ ], [
46
+ { type: 'query', key: "lat" },
47
+ { type: 'query', key: "lon" },
48
+ ], { service: "AppAPI", operation: "PopularShopsPublic" }),
46
49
  ]);
47
50
  const customizer = (ctx, failures) => {
48
51
  if (!failures) {
@@ -42,7 +42,10 @@ const getRadiusShopsHandler = (operation) => {
42
42
  { type: 'path_literal', value: "public" },
43
43
  { type: 'path_literal', value: "shops" },
44
44
  { type: 'path_literal', value: "radius" },
45
- ], [], { service: "AppAPI", operation: "RadiusShops" }),
45
+ ], [
46
+ { type: 'query', key: "lat" },
47
+ { type: 'query', key: "lon" },
48
+ ], { service: "AppAPI", operation: "RadiusShops" }),
46
49
  ]);
47
50
  const customizer = (ctx, failures) => {
48
51
  if (!failures) {
@@ -475,19 +475,31 @@ export var ShopListInput;
475
475
  if (memberValidators[member] === undefined) {
476
476
  switch (member) {
477
477
  case "lat": {
478
- memberValidators["lat"] = new __NoOpValidator();
478
+ memberValidators["lat"] = new __CompositeValidator([
479
+ new __RequiredValidator(),
480
+ ]);
479
481
  break;
480
482
  }
481
483
  case "lon": {
482
- memberValidators["lon"] = new __NoOpValidator();
484
+ memberValidators["lon"] = new __CompositeValidator([
485
+ new __RequiredValidator(),
486
+ ]);
483
487
  break;
484
488
  }
485
489
  case "page": {
486
490
  memberValidators["page"] = new __NoOpValidator();
487
491
  break;
488
492
  }
489
- case "filters": {
490
- memberValidators["filters"] = new __NoOpValidator();
493
+ case "open_now": {
494
+ memberValidators["open_now"] = new __NoOpValidator();
495
+ break;
496
+ }
497
+ case "timezone": {
498
+ memberValidators["timezone"] = new __NoOpValidator();
499
+ break;
500
+ }
501
+ case "categories": {
502
+ memberValidators["categories"] = new __NoOpValidator();
491
503
  break;
492
504
  }
493
505
  }
@@ -498,7 +510,9 @@ export var ShopListInput;
498
510
  ...getMemberValidator("lat").validate(obj.lat, `${path}/lat`),
499
511
  ...getMemberValidator("lon").validate(obj.lon, `${path}/lon`),
500
512
  ...getMemberValidator("page").validate(obj.page, `${path}/page`),
501
- ...getMemberValidator("filters").validate(obj.filters, `${path}/filters`),
513
+ ...getMemberValidator("open_now").validate(obj.open_now, `${path}/open_now`),
514
+ ...getMemberValidator("timezone").validate(obj.timezone, `${path}/timezone`),
515
+ ...getMemberValidator("categories").validate(obj.categories, `${path}/categories`),
502
516
  ];
503
517
  };
504
518
  })(ShopListInput || (ShopListInput = {}));
@@ -1696,8 +1710,8 @@ export var SearchShopsInput;
1696
1710
  memberValidators["page"] = new __NoOpValidator();
1697
1711
  break;
1698
1712
  }
1699
- case "filters": {
1700
- memberValidators["filters"] = new __NoOpValidator();
1713
+ case "tags": {
1714
+ memberValidators["tags"] = new __NoOpValidator();
1701
1715
  break;
1702
1716
  }
1703
1717
  }
@@ -1710,7 +1724,7 @@ export var SearchShopsInput;
1710
1724
  ...getMemberValidator("lat").validate(obj.lat, `${path}/lat`),
1711
1725
  ...getMemberValidator("lon").validate(obj.lon, `${path}/lon`),
1712
1726
  ...getMemberValidator("page").validate(obj.page, `${path}/page`),
1713
- ...getMemberValidator("filters").validate(obj.filters, `${path}/filters`),
1727
+ ...getMemberValidator("tags").validate(obj.tags, `${path}/tags`),
1714
1728
  ];
1715
1729
  };
1716
1730
  })(SearchShopsInput || (SearchShopsInput = {}));
@@ -257,7 +257,8 @@
257
257
  "schema": {
258
258
  "type": "number",
259
259
  "format": "double"
260
- }
260
+ },
261
+ "required": true
261
262
  },
262
263
  {
263
264
  "name": "lon",
@@ -265,7 +266,8 @@
265
266
  "schema": {
266
267
  "type": "number",
267
268
  "format": "double"
268
- }
269
+ },
270
+ "required": true
269
271
  },
270
272
  {
271
273
  "name": "page",
@@ -275,7 +277,21 @@
275
277
  }
276
278
  },
277
279
  {
278
- "name": "filters",
280
+ "name": "open_now",
281
+ "in": "query",
282
+ "schema": {
283
+ "type": "boolean"
284
+ }
285
+ },
286
+ {
287
+ "name": "timezone",
288
+ "in": "query",
289
+ "schema": {
290
+ "type": "string"
291
+ }
292
+ },
293
+ {
294
+ "name": "categories",
279
295
  "in": "query",
280
296
  "schema": {
281
297
  "type": "string"
@@ -393,7 +409,8 @@
393
409
  "schema": {
394
410
  "type": "number",
395
411
  "format": "double"
396
- }
412
+ },
413
+ "required": true
397
414
  },
398
415
  {
399
416
  "name": "lon",
@@ -401,7 +418,8 @@
401
418
  "schema": {
402
419
  "type": "number",
403
420
  "format": "double"
404
- }
421
+ },
422
+ "required": true
405
423
  },
406
424
  {
407
425
  "name": "page",
@@ -411,7 +429,21 @@
411
429
  }
412
430
  },
413
431
  {
414
- "name": "filters",
432
+ "name": "open_now",
433
+ "in": "query",
434
+ "schema": {
435
+ "type": "boolean"
436
+ }
437
+ },
438
+ {
439
+ "name": "timezone",
440
+ "in": "query",
441
+ "schema": {
442
+ "type": "string"
443
+ }
444
+ },
445
+ {
446
+ "name": "categories",
415
447
  "in": "query",
416
448
  "schema": {
417
449
  "type": "string"
@@ -463,7 +495,8 @@
463
495
  "schema": {
464
496
  "type": "number",
465
497
  "format": "double"
466
- }
498
+ },
499
+ "required": true
467
500
  },
468
501
  {
469
502
  "name": "lon",
@@ -471,7 +504,8 @@
471
504
  "schema": {
472
505
  "type": "number",
473
506
  "format": "double"
474
- }
507
+ },
508
+ "required": true
475
509
  },
476
510
  {
477
511
  "name": "page",
@@ -481,7 +515,21 @@
481
515
  }
482
516
  },
483
517
  {
484
- "name": "filters",
518
+ "name": "open_now",
519
+ "in": "query",
520
+ "schema": {
521
+ "type": "boolean"
522
+ }
523
+ },
524
+ {
525
+ "name": "timezone",
526
+ "in": "query",
527
+ "schema": {
528
+ "type": "string"
529
+ }
530
+ },
531
+ {
532
+ "name": "categories",
485
533
  "in": "query",
486
534
  "schema": {
487
535
  "type": "string"
@@ -899,7 +947,8 @@
899
947
  "schema": {
900
948
  "type": "number",
901
949
  "format": "double"
902
- }
950
+ },
951
+ "required": true
903
952
  },
904
953
  {
905
954
  "name": "lon",
@@ -907,7 +956,8 @@
907
956
  "schema": {
908
957
  "type": "number",
909
958
  "format": "double"
910
- }
959
+ },
960
+ "required": true
911
961
  },
912
962
  {
913
963
  "name": "page",
@@ -917,7 +967,21 @@
917
967
  }
918
968
  },
919
969
  {
920
- "name": "filters",
970
+ "name": "open_now",
971
+ "in": "query",
972
+ "schema": {
973
+ "type": "boolean"
974
+ }
975
+ },
976
+ {
977
+ "name": "timezone",
978
+ "in": "query",
979
+ "schema": {
980
+ "type": "string"
981
+ }
982
+ },
983
+ {
984
+ "name": "categories",
921
985
  "in": "query",
922
986
  "schema": {
923
987
  "type": "string"
@@ -969,7 +1033,8 @@
969
1033
  "schema": {
970
1034
  "type": "number",
971
1035
  "format": "double"
972
- }
1036
+ },
1037
+ "required": true
973
1038
  },
974
1039
  {
975
1040
  "name": "lon",
@@ -977,7 +1042,8 @@
977
1042
  "schema": {
978
1043
  "type": "number",
979
1044
  "format": "double"
980
- }
1045
+ },
1046
+ "required": true
981
1047
  },
982
1048
  {
983
1049
  "name": "page",
@@ -987,7 +1053,21 @@
987
1053
  }
988
1054
  },
989
1055
  {
990
- "name": "filters",
1056
+ "name": "open_now",
1057
+ "in": "query",
1058
+ "schema": {
1059
+ "type": "boolean"
1060
+ }
1061
+ },
1062
+ {
1063
+ "name": "timezone",
1064
+ "in": "query",
1065
+ "schema": {
1066
+ "type": "string"
1067
+ }
1068
+ },
1069
+ {
1070
+ "name": "categories",
991
1071
  "in": "query",
992
1072
  "schema": {
993
1073
  "type": "string"
@@ -1171,7 +1251,8 @@
1171
1251
  "schema": {
1172
1252
  "type": "number",
1173
1253
  "format": "double"
1174
- }
1254
+ },
1255
+ "required": true
1175
1256
  },
1176
1257
  {
1177
1258
  "name": "lon",
@@ -1179,7 +1260,8 @@
1179
1260
  "schema": {
1180
1261
  "type": "number",
1181
1262
  "format": "double"
1182
- }
1263
+ },
1264
+ "required": true
1183
1265
  },
1184
1266
  {
1185
1267
  "name": "page",
@@ -1189,7 +1271,21 @@
1189
1271
  }
1190
1272
  },
1191
1273
  {
1192
- "name": "filters",
1274
+ "name": "open_now",
1275
+ "in": "query",
1276
+ "schema": {
1277
+ "type": "boolean"
1278
+ }
1279
+ },
1280
+ {
1281
+ "name": "timezone",
1282
+ "in": "query",
1283
+ "schema": {
1284
+ "type": "string"
1285
+ }
1286
+ },
1287
+ {
1288
+ "name": "categories",
1193
1289
  "in": "query",
1194
1290
  "schema": {
1195
1291
  "type": "string"