@tinyburg/tinytower-vegas-sdk 0.0.0-stage → 0.1.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 +674 -0
- package/README.md +8 -2
- package/dist/Endpoints.d.ts +215 -0
- package/dist/Endpoints.d.ts.map +1 -0
- package/dist/Endpoints.js +319 -0
- package/dist/Endpoints.js.map +1 -0
- package/dist/Scopes.d.ts +74 -0
- package/dist/Scopes.d.ts.map +1 -0
- package/dist/Scopes.js +81 -0
- package/dist/Scopes.js.map +1 -0
- package/dist/TinyTowerVegas.d.ts +83 -0
- package/dist/TinyTowerVegas.d.ts.map +1 -0
- package/dist/TinyTowerVegas.js +172 -0
- package/dist/TinyTowerVegas.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/Endpoints.ts +361 -0
- package/src/Scopes.ts +90 -0
- package/src/TinyTowerVegas.ts +186 -0
- package/src/index.ts +58 -0
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tinyburg/tinytower-vegas-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Tiny Tower Vegas api, for the authproxy.
|
|
4
|
+
|
|
5
|
+
Tiny Tower Vegas speaks Nimblebit's NBSync protocol under the game code `vegas`. Requests
|
|
6
|
+
are signed with `NimblebitAuth` from `@tinyburg/nimblebit-sdk`, using the
|
|
7
|
+
game's own secret salt, and the endpoints carry the `tinytowervegas` scope tree
|
|
8
|
+
built by `defineGame`. Game-specific save and meta payloads are still
|
|
9
|
+
`Schema.Unknown`.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny Tower Vegas (game code `vegas`) NBSync api endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Signing: a random `salt` (signed int32) goes in the path, and `hash` is
|
|
5
|
+
* `md5(<preimage> + <game secret salt>)` with the preimage
|
|
6
|
+
* `vegas/<playerId>/<salt><playerAuthKey>` (variants noted per endpoint). The
|
|
7
|
+
* secret salt is the value extracted from `NBSync._ss`.
|
|
8
|
+
*
|
|
9
|
+
* Verification (live server + Frida DTO inspection of the game, 2026-08-26):
|
|
10
|
+
* - Signing is MD5, server-validated (same scheme as Tiny Tower / Pocket
|
|
11
|
+
* Planes; the game computes SHA-256 only for the unauthenticated `register`).
|
|
12
|
+
* - Response envelopes VERIFIED by reading the game's DTO classes at runtime:
|
|
13
|
+
* register, player_details, sync/pull (NBSyncGameSaveResponse), current_version,
|
|
14
|
+
* verify_device, friend/pull_game, friend/pull_meta (meta is a flat
|
|
15
|
+
* Dictionary<String,Object> on pt), send_item (NBSyncItemsSendResponse),
|
|
16
|
+
* get_items (NBSyncItemsGetResponse: success/gifts, NO `total` unlike pp).
|
|
17
|
+
* `get_items` was also exercised live with a burnbot.
|
|
18
|
+
* - Standard NBSync endpoint set plus get_visits and receive_item.
|
|
19
|
+
*
|
|
20
|
+
* Game-specific save/meta schemas are left as `Schema.Unknown` placeholders.
|
|
21
|
+
*
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category Endpoints
|
|
24
|
+
*/
|
|
25
|
+
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
26
|
+
import * as Schema from "effect/Schema";
|
|
27
|
+
/**
|
|
28
|
+
* A gift/item in the general item channel (get_items / send_item). Verified DTO
|
|
29
|
+
* NBSyncItemsGift on pt: `{gift_id, gift_to, gift_from, gift_type, item_type,
|
|
30
|
+
* gift_str, h}` (no `c`, unlike pp). Left open for the data-schema work.
|
|
31
|
+
*
|
|
32
|
+
* @since 1.0.0
|
|
33
|
+
* @category Schemas
|
|
34
|
+
*/
|
|
35
|
+
export declare const Gift: Schema.Unknown;
|
|
36
|
+
/**
|
|
37
|
+
* The Tiny Tower Vegas NBSync api.
|
|
38
|
+
*
|
|
39
|
+
* @since 1.0.0
|
|
40
|
+
* @category Api
|
|
41
|
+
*/
|
|
42
|
+
export declare const Api: HttpApi.HttpApi<"TinyTowerVegasApi", HttpApiGroup.HttpApiGroup<"DeviceManagementGroup", HttpApiEndpoint.HttpApiEndpoint<"DeviceNewPlayer", "GET", "/register/vegas/:salt1/:salt2/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
43
|
+
salt1: Schema.Int;
|
|
44
|
+
salt2: Schema.Int;
|
|
45
|
+
hash: Schema.String;
|
|
46
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
47
|
+
readonly error: Schema.String;
|
|
48
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
49
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
50
|
+
readonly playerSs: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerAuthKey">;
|
|
51
|
+
}>, {
|
|
52
|
+
readonly playerId: "player_id";
|
|
53
|
+
readonly playerSs: "player_ss";
|
|
54
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"DevicePlayerDetails", "GET", "/player_details/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
55
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
56
|
+
salt: Schema.Int;
|
|
57
|
+
hash: Schema.String;
|
|
58
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
59
|
+
readonly error: Schema.String;
|
|
60
|
+
}> | Schema.Struct<{
|
|
61
|
+
readonly success: Schema.Literal<"Found">;
|
|
62
|
+
readonly player: Schema.encodeKeys<Schema.Struct<{
|
|
63
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
64
|
+
readonly playerEmail: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerEmail">;
|
|
65
|
+
readonly registered: Schema.compose<Schema.BooleanFromBit, Schema.NumberFromString>;
|
|
66
|
+
readonly blacklisted: Schema.compose<Schema.BooleanFromBit, Schema.NumberFromString>;
|
|
67
|
+
readonly saveVersion: Schema.compose<Schema.Int, Schema.NumberFromString>;
|
|
68
|
+
readonly checksum: Schema.String;
|
|
69
|
+
}>, {
|
|
70
|
+
readonly playerId: "player_id";
|
|
71
|
+
readonly playerEmail: "email";
|
|
72
|
+
readonly checksum: "h";
|
|
73
|
+
}>;
|
|
74
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"DeviceVerifyDevice", "GET", "/verify_device/vegas/:playerId/:verificationCode", Schema.toCodecStringTree<Schema.Struct<{
|
|
75
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
76
|
+
verificationCode: Schema.String;
|
|
77
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
78
|
+
readonly error: Schema.String;
|
|
79
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
80
|
+
readonly success: Schema.Literal<"NewDevice">;
|
|
81
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
82
|
+
readonly playerAuthKey: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerAuthKey">;
|
|
83
|
+
readonly playerEmail: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerEmail">;
|
|
84
|
+
}>, {
|
|
85
|
+
readonly playerId: "player_id";
|
|
86
|
+
readonly playerAuthKey: "player_ss";
|
|
87
|
+
readonly playerEmail: "player_email";
|
|
88
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"SocialGroup", HttpApiEndpoint.HttpApiEndpoint<"SocialGetItems", "GET", "/get_items/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
89
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
90
|
+
salt: Schema.Int;
|
|
91
|
+
hash: Schema.String;
|
|
92
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
93
|
+
readonly error: Schema.String;
|
|
94
|
+
}> | Schema.Struct<{
|
|
95
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
96
|
+
}> | Schema.Struct<{
|
|
97
|
+
readonly success: Schema.Literal<"Found">;
|
|
98
|
+
readonly gifts: Schema.$Array<Schema.Unknown>;
|
|
99
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialGetVisits", "GET", "/get_visits/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
100
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
101
|
+
salt: Schema.Int;
|
|
102
|
+
hash: Schema.String;
|
|
103
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
104
|
+
readonly error: Schema.String;
|
|
105
|
+
}> | Schema.Struct<{
|
|
106
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
107
|
+
}> | Schema.Struct<{
|
|
108
|
+
readonly success: Schema.Literal<"Found">;
|
|
109
|
+
readonly gifts: Schema.$Array<Schema.Unknown>;
|
|
110
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialPullFriendGame", "GET", "/friend/pull_game/vegas/:playerId/:friendId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
111
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
112
|
+
friendId: Schema.brand<Schema.String, "PlayerId">;
|
|
113
|
+
salt: Schema.Int;
|
|
114
|
+
hash: Schema.String;
|
|
115
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
116
|
+
readonly error: Schema.String;
|
|
117
|
+
}> | Schema.Struct<{
|
|
118
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
119
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
120
|
+
readonly success: Schema.Literal<"Found">;
|
|
121
|
+
readonly data: Schema.Uint8ArrayFromBase64;
|
|
122
|
+
readonly checksum: Schema.String;
|
|
123
|
+
readonly saveId: Schema.NumberFromString;
|
|
124
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
125
|
+
}>, {
|
|
126
|
+
readonly checksum: "h";
|
|
127
|
+
readonly saveId: "id";
|
|
128
|
+
readonly playerId: "player_id";
|
|
129
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialPullFriendMeta", "POST", "/friend/pull_meta/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
130
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
131
|
+
salt: Schema.Int;
|
|
132
|
+
hash: Schema.String;
|
|
133
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
134
|
+
readonly friends: Schema.brand<Schema.String, "PlayerId">;
|
|
135
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
136
|
+
readonly error: Schema.String;
|
|
137
|
+
}> | Schema.Struct<{
|
|
138
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
139
|
+
}> | Schema.Struct<{
|
|
140
|
+
readonly success: Schema.Literal<"Found">;
|
|
141
|
+
readonly meta: Schema.$Record<Schema.brand<Schema.String, "PlayerId">, Schema.Unknown>;
|
|
142
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialReceiveItem", "GET", "/receive_item/vegas/:playerId/:giftId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
143
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
144
|
+
giftId: Schema.Int;
|
|
145
|
+
salt: Schema.Int;
|
|
146
|
+
hash: Schema.String;
|
|
147
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
148
|
+
readonly error: Schema.String;
|
|
149
|
+
}> | Schema.Struct<{
|
|
150
|
+
readonly success: Schema.Literal<"Received">;
|
|
151
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
152
|
+
}> | Schema.Struct<{
|
|
153
|
+
readonly success: Schema.Literal<"NotReceived">;
|
|
154
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialSendItem", "POST", "/send_item/vegas/:itemType/:playerId/:friendId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
155
|
+
itemType: Schema.String;
|
|
156
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
157
|
+
friendId: Schema.brand<Schema.String, "PlayerId">;
|
|
158
|
+
salt: Schema.Int;
|
|
159
|
+
hash: Schema.String;
|
|
160
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
161
|
+
readonly itemStr: Schema.String;
|
|
162
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
163
|
+
readonly error: Schema.String;
|
|
164
|
+
}> | Schema.Struct<{
|
|
165
|
+
readonly success: Schema.Literal<"Sent">;
|
|
166
|
+
}> | Schema.Struct<{
|
|
167
|
+
readonly success: Schema.Literal<"NotSent">;
|
|
168
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"SyncManagementGroup", HttpApiEndpoint.HttpApiEndpoint<"SyncCheckForNewerSave", "GET", "/sync/current_version/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
169
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
170
|
+
salt: Schema.Int;
|
|
171
|
+
hash: Schema.String;
|
|
172
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
173
|
+
readonly error: Schema.String;
|
|
174
|
+
}> | Schema.Struct<{
|
|
175
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
176
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
177
|
+
readonly success: Schema.Literal<"Found">;
|
|
178
|
+
readonly checksum: Schema.String;
|
|
179
|
+
readonly saveId: Schema.NumberFromString;
|
|
180
|
+
}>, {
|
|
181
|
+
readonly checksum: "h";
|
|
182
|
+
readonly saveId: "id";
|
|
183
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SyncPullSave", "GET", "/sync/pull/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
184
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
185
|
+
salt: Schema.Int;
|
|
186
|
+
hash: Schema.String;
|
|
187
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
188
|
+
readonly error: Schema.String;
|
|
189
|
+
}> | Schema.Struct<{
|
|
190
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
191
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
192
|
+
readonly success: Schema.Literal<"Found">;
|
|
193
|
+
readonly data: Schema.Uint8ArrayFromBase64;
|
|
194
|
+
readonly checksum: Schema.String;
|
|
195
|
+
readonly saveId: Schema.NumberFromString;
|
|
196
|
+
}>, {
|
|
197
|
+
readonly checksum: "h";
|
|
198
|
+
readonly saveId: "id";
|
|
199
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SyncRetrieveSnapshotList", "GET", "/sync/current_snapshots/vegas/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
200
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
201
|
+
salt: Schema.Int;
|
|
202
|
+
hash: Schema.String;
|
|
203
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
204
|
+
readonly error: Schema.String;
|
|
205
|
+
}> | Schema.Struct<{
|
|
206
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
207
|
+
}> | Schema.Struct<{
|
|
208
|
+
readonly success: Schema.Literal<"Found">;
|
|
209
|
+
readonly saves: Schema.$Array<Schema.Struct<{
|
|
210
|
+
readonly id: Schema.Int;
|
|
211
|
+
readonly created: Schema.Int;
|
|
212
|
+
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
213
|
+
}>>;
|
|
214
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, false>>;
|
|
215
|
+
//# sourceMappingURL=Endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Endpoints.d.ts","sourceRoot":"","sources":["../src/Endpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AA8BxC;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,gBAAiB,CAAC;AA+RnC;;;;;GAKG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4LAGK,CAAC"}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny Tower Vegas (game code `vegas`) NBSync api endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Signing: a random `salt` (signed int32) goes in the path, and `hash` is
|
|
5
|
+
* `md5(<preimage> + <game secret salt>)` with the preimage
|
|
6
|
+
* `vegas/<playerId>/<salt><playerAuthKey>` (variants noted per endpoint). The
|
|
7
|
+
* secret salt is the value extracted from `NBSync._ss`.
|
|
8
|
+
*
|
|
9
|
+
* Verification (live server + Frida DTO inspection of the game, 2026-08-26):
|
|
10
|
+
* - Signing is MD5, server-validated (same scheme as Tiny Tower / Pocket
|
|
11
|
+
* Planes; the game computes SHA-256 only for the unauthenticated `register`).
|
|
12
|
+
* - Response envelopes VERIFIED by reading the game's DTO classes at runtime:
|
|
13
|
+
* register, player_details, sync/pull (NBSyncGameSaveResponse), current_version,
|
|
14
|
+
* verify_device, friend/pull_game, friend/pull_meta (meta is a flat
|
|
15
|
+
* Dictionary<String,Object> on pt), send_item (NBSyncItemsSendResponse),
|
|
16
|
+
* get_items (NBSyncItemsGetResponse: success/gifts, NO `total` unlike pp).
|
|
17
|
+
* `get_items` was also exercised live with a burnbot.
|
|
18
|
+
* - Standard NBSync endpoint set plus get_visits and receive_item.
|
|
19
|
+
*
|
|
20
|
+
* Game-specific save/meta schemas are left as `Schema.Unknown` placeholders.
|
|
21
|
+
*
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category Endpoints
|
|
24
|
+
*/
|
|
25
|
+
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
26
|
+
import * as Schema from "effect/Schema";
|
|
27
|
+
import * as NimblebitConfig from "@tinyburg/nimblebit-sdk/NimblebitConfig";
|
|
28
|
+
import * as OAuthScope from "@yielded/auth/OAuthScope";
|
|
29
|
+
import * as Scopes from "./Scopes.js";
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const U32 = /*#__PURE__*/Schema.Int.check(/*#__PURE__*/Schema.isUint32());
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ApiErrors = [HttpApiError.Forbidden, HttpApiError.BadRequest, HttpApiError.Unauthorized, HttpApiError.InternalServerError];
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ErrorResponse = /*#__PURE__*/Schema.Struct({
|
|
36
|
+
error: Schema.String
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const NotFoundResponse = /*#__PURE__*/Schema.Struct({
|
|
40
|
+
success: /*#__PURE__*/Schema.Literal("NotFound")
|
|
41
|
+
});
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const SentResponse = /*#__PURE__*/Schema.Struct({
|
|
44
|
+
success: /*#__PURE__*/Schema.Literal("Sent")
|
|
45
|
+
});
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const NotSentResponse = /*#__PURE__*/Schema.Struct({
|
|
48
|
+
success: /*#__PURE__*/Schema.Literal("NotSent")
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* A gift/item in the general item channel (get_items / send_item). Verified DTO
|
|
52
|
+
* NBSyncItemsGift on pt: `{gift_id, gift_to, gift_from, gift_type, item_type,
|
|
53
|
+
* gift_str, h}` (no `c`, unlike pp). Left open for the data-schema work.
|
|
54
|
+
*
|
|
55
|
+
* @since 1.0.0
|
|
56
|
+
* @category Schemas
|
|
57
|
+
*/
|
|
58
|
+
export const Gift = Schema.Unknown;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const DeviceNewPlayerEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DeviceNewPlayer", "/register/vegas/:salt1/:salt2/:hash", {
|
|
61
|
+
params: {
|
|
62
|
+
salt1: U32,
|
|
63
|
+
salt2: U32,
|
|
64
|
+
hash: Schema.String
|
|
65
|
+
},
|
|
66
|
+
error: ApiErrors,
|
|
67
|
+
success: [ErrorResponse, /*#__PURE__*/Schema.Struct({
|
|
68
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
69
|
+
playerSs: NimblebitConfig.PlayerAuthKeySchema
|
|
70
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
71
|
+
playerId: "player_id",
|
|
72
|
+
playerSs: "player_ss"
|
|
73
|
+
}))]
|
|
74
|
+
});
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const DevicePlayerDetailsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DevicePlayerDetails", "/player_details/vegas/:playerId/:salt/:hash", {
|
|
77
|
+
params: {
|
|
78
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
79
|
+
salt: U32,
|
|
80
|
+
hash: Schema.String
|
|
81
|
+
},
|
|
82
|
+
error: ApiErrors,
|
|
83
|
+
success: [ErrorResponse, Schema.Struct({
|
|
84
|
+
success: Schema.Literal("Found"),
|
|
85
|
+
player: Schema.Struct({
|
|
86
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
87
|
+
playerEmail: NimblebitConfig.PlayerEmailSchema,
|
|
88
|
+
registered: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.BooleanFromBit)),
|
|
89
|
+
blacklisted: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.BooleanFromBit)),
|
|
90
|
+
saveVersion: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.Int)),
|
|
91
|
+
checksum: Schema.String
|
|
92
|
+
}).pipe(Schema.encodeKeys({
|
|
93
|
+
playerId: "player_id",
|
|
94
|
+
playerEmail: "email",
|
|
95
|
+
checksum: "h"
|
|
96
|
+
}))
|
|
97
|
+
})]
|
|
98
|
+
}).annotate(OAuthScope.Required, Scopes.Device.read.player_details.required);
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const DeviceVerifyDeviceEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DeviceVerifyDevice", "/verify_device/vegas/:playerId/:verificationCode", {
|
|
101
|
+
params: {
|
|
102
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
103
|
+
verificationCode: Schema.String
|
|
104
|
+
},
|
|
105
|
+
error: ApiErrors,
|
|
106
|
+
success: [ErrorResponse, Schema.Struct({
|
|
107
|
+
success: Schema.Literal("NewDevice"),
|
|
108
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
109
|
+
playerAuthKey: NimblebitConfig.PlayerAuthKeySchema,
|
|
110
|
+
playerEmail: NimblebitConfig.PlayerEmailSchema
|
|
111
|
+
}).pipe(Schema.encodeKeys({
|
|
112
|
+
playerId: "player_id",
|
|
113
|
+
playerAuthKey: "player_ss",
|
|
114
|
+
playerEmail: "player_email"
|
|
115
|
+
}))]
|
|
116
|
+
}).annotate(OAuthScope.Required, Scopes.Device.write.verify_device.required);
|
|
117
|
+
/**
|
|
118
|
+
* Pull the player's cloud save. VERIFIED envelope (NBSyncGameSaveResponse). No-save
|
|
119
|
+
* case returns `{ error: "SaveNotFound" }`. `data` is base64 pako-deflated bytes.
|
|
120
|
+
*
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
export const SyncPullSaveEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncPullSave", "/sync/pull/vegas/:playerId/:salt/:hash", {
|
|
124
|
+
params: {
|
|
125
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
126
|
+
salt: U32,
|
|
127
|
+
hash: Schema.String
|
|
128
|
+
},
|
|
129
|
+
error: ApiErrors,
|
|
130
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
131
|
+
success: Schema.Literal("Found"),
|
|
132
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
133
|
+
checksum: Schema.String,
|
|
134
|
+
saveId: Schema.NumberFromString
|
|
135
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
136
|
+
checksum: "h",
|
|
137
|
+
saveId: "id"
|
|
138
|
+
}))]
|
|
139
|
+
});
|
|
140
|
+
/**
|
|
141
|
+
* VERIFIED envelope (NBSyncCurrentCheckResponse); no-save returns `{ error: "NoSave" }`.
|
|
142
|
+
*
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
export const SyncCheckForNewerSaveEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncCheckForNewerSave", "/sync/current_version/vegas/:playerId/:salt/:hash", {
|
|
146
|
+
params: {
|
|
147
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
148
|
+
salt: U32,
|
|
149
|
+
hash: Schema.String
|
|
150
|
+
},
|
|
151
|
+
error: ApiErrors,
|
|
152
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
153
|
+
success: Schema.Literal("Found"),
|
|
154
|
+
checksum: Schema.String,
|
|
155
|
+
saveId: Schema.NumberFromString
|
|
156
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
157
|
+
checksum: "h",
|
|
158
|
+
saveId: "id"
|
|
159
|
+
}))]
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* VERIFIED live: `/get_items/vegas/:playerId/:salt/:hash` -> `{ success:"Found",
|
|
163
|
+
* gifts:[...] }` (NBSyncItemsGetResponse; no `total` on pt).
|
|
164
|
+
*
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
export const SocialGetItemsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialGetItems", "/get_items/vegas/:playerId/:salt/:hash", {
|
|
168
|
+
params: {
|
|
169
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
170
|
+
salt: U32,
|
|
171
|
+
hash: Schema.String
|
|
172
|
+
},
|
|
173
|
+
error: ApiErrors,
|
|
174
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
175
|
+
success: Schema.Literal("Found"),
|
|
176
|
+
gifts: Schema.Array(Gift)
|
|
177
|
+
})]
|
|
178
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.get_items.required);
|
|
179
|
+
/**
|
|
180
|
+
* DERIVED from Tiny Tower. Sends an item to a friend. Response VERIFIED
|
|
181
|
+
* (NBSyncItemsSendResponse: success/error). pt also has a `/send_pt/` variant.
|
|
182
|
+
*
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
185
|
+
export const SocialSendItemEndpoint = /*#__PURE__*/HttpApiEndpoint.post("SocialSendItem", "/send_item/vegas/:itemType/:playerId/:friendId/:salt/:hash", {
|
|
186
|
+
params: {
|
|
187
|
+
itemType: Schema.String,
|
|
188
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
189
|
+
friendId: NimblebitConfig.PlayerIdSchema,
|
|
190
|
+
salt: U32,
|
|
191
|
+
hash: Schema.String
|
|
192
|
+
},
|
|
193
|
+
payload: Schema.Struct({
|
|
194
|
+
itemStr: Schema.String
|
|
195
|
+
}),
|
|
196
|
+
error: ApiErrors,
|
|
197
|
+
success: [ErrorResponse, SentResponse, NotSentResponse]
|
|
198
|
+
}).annotate(OAuthScope.Required, Scopes.Social.write.send_item.required);
|
|
199
|
+
/**
|
|
200
|
+
* VERIFIED envelope (NBSyncFriendGameSaveResponse); preimage
|
|
201
|
+
* `vegas/<playerId>/<friendId>/<salt><playerAuthKey>`.
|
|
202
|
+
*
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
export const SocialPullFriendGameEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialPullFriendGame", "/friend/pull_game/vegas/:playerId/:friendId/:salt/:hash", {
|
|
206
|
+
params: {
|
|
207
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
208
|
+
friendId: NimblebitConfig.PlayerIdSchema,
|
|
209
|
+
salt: U32,
|
|
210
|
+
hash: Schema.String
|
|
211
|
+
},
|
|
212
|
+
error: ApiErrors,
|
|
213
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
214
|
+
success: Schema.Literal("Found"),
|
|
215
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
216
|
+
checksum: Schema.String,
|
|
217
|
+
saveId: Schema.NumberFromString,
|
|
218
|
+
playerId: NimblebitConfig.PlayerIdSchema
|
|
219
|
+
}).pipe(Schema.encodeKeys({
|
|
220
|
+
checksum: "h",
|
|
221
|
+
saveId: "id",
|
|
222
|
+
playerId: "player_id"
|
|
223
|
+
}))]
|
|
224
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.pull_friend_game.required);
|
|
225
|
+
/**
|
|
226
|
+
* VERIFIED envelope (NBSyncFriendGameMetaResponse; `meta` is a flat
|
|
227
|
+
* Dictionary<String,Object> on pt). Preimage `vegas/<playerId>/<salt><friendId><playerAuthKey>`.
|
|
228
|
+
*
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
export const SocialPullFriendMetaEndpoint = /*#__PURE__*/HttpApiEndpoint.post("SocialPullFriendMeta", "/friend/pull_meta/vegas/:playerId/:salt/:hash", {
|
|
232
|
+
params: {
|
|
233
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
234
|
+
salt: U32,
|
|
235
|
+
hash: Schema.String
|
|
236
|
+
},
|
|
237
|
+
payload: Schema.Struct({
|
|
238
|
+
friends: NimblebitConfig.PlayerIdSchema
|
|
239
|
+
}),
|
|
240
|
+
error: ApiErrors,
|
|
241
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
242
|
+
success: Schema.Literal("Found"),
|
|
243
|
+
meta: Schema.Record(NimblebitConfig.PlayerIdSchema, Schema.Unknown)
|
|
244
|
+
})]
|
|
245
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.pull_friend_meta.required);
|
|
246
|
+
/**
|
|
247
|
+
* VERIFIED path: `/get_visits/vegas/:playerId/:salt/:hash`. Same envelope as get_items.
|
|
248
|
+
*
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
export const SocialGetVisitsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialGetVisits", "/get_visits/vegas/:playerId/:salt/:hash", {
|
|
252
|
+
params: {
|
|
253
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
254
|
+
salt: U32,
|
|
255
|
+
hash: Schema.String
|
|
256
|
+
},
|
|
257
|
+
error: ApiErrors,
|
|
258
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
259
|
+
success: Schema.Literal("Found"),
|
|
260
|
+
gifts: Schema.Array(Gift)
|
|
261
|
+
})]
|
|
262
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.get_visits.required);
|
|
263
|
+
/**
|
|
264
|
+
* Preimage `vegas/<playerId>/<giftId>/<salt><playerAuthKey>`. Response DTO
|
|
265
|
+
* NBSyncItemsReceiveResponse (success/error/id).
|
|
266
|
+
*
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
export const SocialReceiveItemEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialReceiveItem", "/receive_item/vegas/:playerId/:giftId/:salt/:hash", {
|
|
270
|
+
params: {
|
|
271
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
272
|
+
giftId: Schema.Int,
|
|
273
|
+
salt: U32,
|
|
274
|
+
hash: Schema.String
|
|
275
|
+
},
|
|
276
|
+
error: ApiErrors,
|
|
277
|
+
success: [ErrorResponse, Schema.Struct({
|
|
278
|
+
success: Schema.Literal("Received"),
|
|
279
|
+
id: Schema.optionalKey(Schema.String)
|
|
280
|
+
}), Schema.Struct({
|
|
281
|
+
success: Schema.Literal("NotReceived")
|
|
282
|
+
})]
|
|
283
|
+
}).annotate(OAuthScope.Required, Scopes.Social.write.receive_item.required);
|
|
284
|
+
/**
|
|
285
|
+
* Snapshot list. Vegas exposes `/sync/current_snapshots/` (and a friend variant).
|
|
286
|
+
* Envelope follows the Tiny Tower snapshot list shape.
|
|
287
|
+
*
|
|
288
|
+
* @internal
|
|
289
|
+
*/
|
|
290
|
+
export const SyncRetrieveSnapshotListEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncRetrieveSnapshotList", "/sync/current_snapshots/vegas/:playerId/:salt/:hash", {
|
|
291
|
+
params: {
|
|
292
|
+
playerId: NimblebitConfig.PlayerIdSchema,
|
|
293
|
+
salt: U32,
|
|
294
|
+
hash: Schema.String
|
|
295
|
+
},
|
|
296
|
+
error: ApiErrors,
|
|
297
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
298
|
+
success: /*#__PURE__*/Schema.Literal("Found"),
|
|
299
|
+
saves: /*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.Struct({
|
|
300
|
+
id: Schema.Int,
|
|
301
|
+
created: Schema.Int,
|
|
302
|
+
meta: /*#__PURE__*/Schema.Record(Schema.String, Schema.Unknown)
|
|
303
|
+
}))
|
|
304
|
+
})]
|
|
305
|
+
});
|
|
306
|
+
/** @internal */
|
|
307
|
+
export const DeviceManagementGroup = /*#__PURE__*/HttpApiGroup.make("DeviceManagementGroup").add(DeviceNewPlayerEndpoint).add(DevicePlayerDetailsEndpoint).add(DeviceVerifyDeviceEndpoint);
|
|
308
|
+
/** @internal */
|
|
309
|
+
export const SyncManagementGroup = /*#__PURE__*/HttpApiGroup.make("SyncManagementGroup").add(SyncPullSaveEndpoint).add(SyncCheckForNewerSaveEndpoint).add(SyncRetrieveSnapshotListEndpoint);
|
|
310
|
+
/** @internal */
|
|
311
|
+
export const SocialGroup = /*#__PURE__*/HttpApiGroup.make("SocialGroup").add(SocialGetItemsEndpoint).add(SocialGetVisitsEndpoint).add(SocialReceiveItemEndpoint).add(SocialSendItemEndpoint).add(SocialPullFriendGameEndpoint).add(SocialPullFriendMetaEndpoint);
|
|
312
|
+
/**
|
|
313
|
+
* The Tiny Tower Vegas NBSync api.
|
|
314
|
+
*
|
|
315
|
+
* @since 1.0.0
|
|
316
|
+
* @category Api
|
|
317
|
+
*/
|
|
318
|
+
export const Api = /*#__PURE__*/HttpApi.make("TinyTowerVegasApi").add(DeviceManagementGroup).add(SyncManagementGroup).add(SocialGroup);
|
|
319
|
+
//# sourceMappingURL=Endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Endpoints.js","names":[],"sources":["../src/Endpoints.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAS,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,QAAQ,iBAAiB;AACtF,OAAO,KAAK,MAAM,MAAM,eAAe;AAEvC,OAAO,KAAK,eAAe,MAAM,yCAAyC;AAC1E,OAAO,KAAK,UAAU,MAAM,0BAA0B;AAEtD,OAAO,KAAK,MAAM,MAAM,aAAa;AAErC;AACA,OAAO,MAAM,GAAG,gBAAG,MAAM,CAAC,GAAG,CAAC,KAAK,cAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;AAEtD;AACA,OAAO,MAAM,SAAS,GAAG,CACrB,YAAY,CAAC,SAAS,EACtB,YAAY,CAAC,UAAU,EACvB,YAAY,CAAC,YAAY,EACzB,YAAY,CAAC,mBAAmB,CAC1B;AAEV;AACA,OAAO,MAAM,aAAa,gBAAG,MAAM,CAAC,MAAM,CAAC;EAAE,KAAK,EAAE,MAAM,CAAC;AAAM,CAAE,CAAC;AAEpE;AACA,OAAO,MAAM,gBAAgB,gBAAG,MAAM,CAAC,MAAM,CAAC;EAAE,OAAO,eAAE,MAAM,CAAC,OAAO,CAAC,UAAU;AAAC,CAAE,CAAC;AA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ACA,OAAO,MAAM,WAAW,gBAAG,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CACtD,GAAG,CAAC,sBAAsB,CAAC,CAC3B,GAAG,CAAC,uBAAuB,CAAC,CAC5B,GAAG,CAAC,yBAAyB,CAAC,CAC9B,GAAG,CAAC,sBAAsB,CAAC,CAC3B,GAAG,CAAC,4BAA4B,CAAC,CACjC,GAAG,CAAC,4BAA4B,CAAC;AAEtC;;;;;;AAMA,OAAO,MAAM,GAAG,gBAAG,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAC/C,GAAG,CAAC,qBAAqB,CAAC,CAC1B,GAAG,CAAC,mBAAmB,CAAC,CACxB,GAAG,CAAC,WAAW,CAAC","ignoreList":[]}
|
package/dist/Scopes.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scopes the Tiny Tower Vegas api is guarded by, as a game-rooted tree, built with
|
|
3
|
+
* `@tinyburg/nimblebit-sdk`'s `defineGame`. Only the endpoints this sdk defines
|
|
4
|
+
* are covered; areas without both a read and a write side are left out until
|
|
5
|
+
* their endpoints exist.
|
|
6
|
+
*
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category Scopes
|
|
9
|
+
*/
|
|
10
|
+
import { type Game, type ScopeDescription } from "@tinyburg/nimblebit-sdk/NimblebitScopes";
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category Games
|
|
14
|
+
*/
|
|
15
|
+
export declare const TinyTowerVegas: Game & {
|
|
16
|
+
readonly areas: {
|
|
17
|
+
readonly device: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Area & {
|
|
18
|
+
readonly read: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
19
|
+
readonly player_details: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
20
|
+
};
|
|
21
|
+
readonly write: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
22
|
+
readonly verify_device: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly social: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Area & {
|
|
26
|
+
readonly read: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
27
|
+
readonly get_items: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
28
|
+
readonly get_visits: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
29
|
+
readonly pull_friend_game: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
30
|
+
readonly pull_friend_meta: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
31
|
+
};
|
|
32
|
+
readonly write: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
33
|
+
readonly receive_item: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
34
|
+
readonly send_item: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The game's areas, by name, for annotating endpoints.
|
|
41
|
+
*
|
|
42
|
+
* @since 1.0.0
|
|
43
|
+
* @category Areas
|
|
44
|
+
*/
|
|
45
|
+
export declare const Device: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Area & {
|
|
46
|
+
readonly read: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
47
|
+
readonly player_details: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
48
|
+
};
|
|
49
|
+
readonly write: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
50
|
+
readonly verify_device: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
51
|
+
};
|
|
52
|
+
}, Social: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Area & {
|
|
53
|
+
readonly read: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
54
|
+
readonly get_items: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
55
|
+
readonly get_visits: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
56
|
+
readonly pull_friend_game: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
57
|
+
readonly pull_friend_meta: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
58
|
+
};
|
|
59
|
+
readonly write: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Branch & {
|
|
60
|
+
readonly receive_item: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
61
|
+
readonly send_item: import("@tinyburg/nimblebit-sdk/NimblebitScopes").Leaf;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @since 1.0.0
|
|
66
|
+
* @category Tree
|
|
67
|
+
*/
|
|
68
|
+
export declare const Games: ReadonlyArray<Game>;
|
|
69
|
+
/**
|
|
70
|
+
* @since 1.0.0
|
|
71
|
+
* @category Tree
|
|
72
|
+
*/
|
|
73
|
+
export declare const all: () => ReadonlyArray<ScopeDescription>;
|
|
74
|
+
//# sourceMappingURL=Scopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scopes.d.ts","sourceRoot":"","sources":["../src/Scopes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,gBAAgB,EAAc,MAAM,yCAAyC,CAAC;AAEvG;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CAyCzB,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAgB,MAAM;;;;;;;GAAU,MAAM;;;;;;;;;;;CAAyB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,IAAI,CAAoB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,GAAG,QAAO,aAAa,CAAC,gBAAgB,CAY/C,CAAC"}
|