@escapenavigator/services 2.0.22 → 2.0.23

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.
@@ -43,7 +43,10 @@ export declare const cityPlayerApiDeclaration: {
43
43
  cityId?: number;
44
44
  language?: string;
45
45
  }, CityPlayerPersonDetailRO>;
46
- questPreview: ApiMethodDeclaration<number, CityPlayerQuestPreviewRO>;
46
+ questPreview: ApiMethodDeclaration<number | {
47
+ id: number;
48
+ language?: string;
49
+ }, CityPlayerQuestPreviewRO>;
47
50
  freeRoute: ApiMethodDeclaration<{
48
51
  cityId: number;
49
52
  personId?: number;
@@ -58,6 +61,25 @@ export declare const cityPlayerApiDeclaration: {
58
61
  readyRouteDetail: ApiMethodDeclaration<{
59
62
  routeId: number;
60
63
  language?: string;
61
- unlocked?: boolean;
62
64
  }, CityPlayerReadyRouteDetailRO>;
65
+ entitlements: ApiMethodDeclaration<void, unknown[]>;
66
+ devGrantEntitlement: ApiMethodDeclaration<{
67
+ scope: "route" | "city" | "quest" | "pass";
68
+ scopeId?: number | null;
69
+ secret?: string;
70
+ }, {
71
+ accessToken?: string | null;
72
+ }>;
73
+ devRevokeEntitlement: ApiMethodDeclaration<{
74
+ entitlementId: number;
75
+ secret?: string;
76
+ }, unknown>;
77
+ iapGrantEntitlement: ApiMethodDeclaration<{
78
+ scope: "route" | "city" | "quest" | "pass";
79
+ scopeId?: number | null;
80
+ storeTransactionId: string;
81
+ productId?: string;
82
+ }, {
83
+ accessToken?: string | null;
84
+ }>;
63
85
  };
@@ -79,10 +79,15 @@ var personDetail = function (_a) {
79
79
  params: { cityId: cityId, language: language },
80
80
  });
81
81
  };
82
- var questPreview = function (id) { return ({
83
- url: "/openapi/city-player/quests/".concat(id),
84
- method: 'GET',
85
- }); };
82
+ var questPreview = function (params) {
83
+ var id = typeof params === 'number' ? params : params.id;
84
+ var language = typeof params === 'number' ? undefined : params.language;
85
+ return {
86
+ url: "/openapi/city-player/quests/".concat(id),
87
+ method: 'GET',
88
+ params: { language: language },
89
+ };
90
+ };
86
91
  var freeRoute = function (params) { return ({
87
92
  url: '/openapi/city-player/free-route',
88
93
  method: 'GET',
@@ -97,13 +102,32 @@ var cityReadyRoutes = function (_a) {
97
102
  });
98
103
  };
99
104
  var readyRouteDetail = function (_a) {
100
- var routeId = _a.routeId, language = _a.language, unlocked = _a.unlocked;
105
+ var routeId = _a.routeId, language = _a.language;
101
106
  return ({
102
107
  url: "/openapi/city-player/ready-routes/".concat(routeId),
103
108
  method: 'GET',
104
- params: { language: language, unlocked: unlocked ? '1' : undefined },
109
+ params: { language: language },
105
110
  });
106
111
  };
112
+ var entitlements = function () { return ({
113
+ url: '/openapi/city-player/entitlements',
114
+ method: 'GET',
115
+ }); };
116
+ var devGrantEntitlement = function (data) { return ({
117
+ url: '/openapi/city-player/entitlements/dev-grant',
118
+ method: 'POST',
119
+ data: data,
120
+ }); };
121
+ var devRevokeEntitlement = function (data) { return ({
122
+ url: '/openapi/city-player/entitlements/dev-revoke',
123
+ method: 'POST',
124
+ data: data,
125
+ }); };
126
+ var iapGrantEntitlement = function (data) { return ({
127
+ url: '/openapi/city-player/entitlements/iap-grant',
128
+ method: 'POST',
129
+ data: data,
130
+ }); };
107
131
  exports.cityPlayerApiDeclaration = {
108
132
  ping: ping,
109
133
  login: login,
@@ -120,4 +144,8 @@ exports.cityPlayerApiDeclaration = {
120
144
  freeRoute: freeRoute,
121
145
  cityReadyRoutes: cityReadyRoutes,
122
146
  readyRouteDetail: readyRouteDetail,
147
+ entitlements: entitlements,
148
+ devGrantEntitlement: devGrantEntitlement,
149
+ devRevokeEntitlement: devRevokeEntitlement,
150
+ iapGrantEntitlement: iapGrantEntitlement,
123
151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,10 +12,10 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc --project tsconfig.json"
14
14
  },
15
- "gitHead": "c496ff2a46800da778dd3f32111ce824c21bc598",
15
+ "gitHead": "f2fc9ae4f50b78f6440fe0ae2f947bf54fa802a3",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^2.0.21",
18
- "@escapenavigator/utils": "^2.0.22",
17
+ "@escapenavigator/types": "^2.0.22",
18
+ "@escapenavigator/utils": "^2.0.23",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",