@tinyburg/lego-tower-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 +249 -0
- package/dist/Endpoints.d.ts.map +1 -0
- package/dist/Endpoints.js +359 -0
- package/dist/Endpoints.js.map +1 -0
- package/dist/LegoTower.d.ts +83 -0
- package/dist/LegoTower.d.ts.map +1 -0
- package/dist/LegoTower.js +172 -0
- package/dist/LegoTower.js.map +1 -0
- package/dist/Scopes.d.ts +72 -0
- package/dist/Scopes.d.ts.map +1 -0
- package/dist/Scopes.js +80 -0
- package/dist/Scopes.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/Endpoints.ts +410 -0
- package/src/LegoTower.ts +186 -0
- package/src/Scopes.ts +89 -0
- package/src/index.ts +59 -0
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tinyburg/lego-tower-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The LEGO Tower api, for the authproxy.
|
|
4
|
+
|
|
5
|
+
LEGO Tower speaks Nimblebit's NBSync protocol under the game code `lt`. Requests
|
|
6
|
+
are signed with `NimblebitAuth` from `@tinyburg/nimblebit-sdk`, using the
|
|
7
|
+
game's own secret salt, and the endpoints carry the `legotower` scope tree
|
|
8
|
+
built by `defineGame`. Game-specific save and meta payloads are still
|
|
9
|
+
`Schema.Unknown`.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LEGO Tower (game code `lt`) 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
|
+
* `lt/<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
|
+
* - Rich endpoint set: adds snapshots, trades, mailbox, AG, and LL-friends.
|
|
19
|
+
* - LEGO Tower issues player ids longer than 5 chars (relaxed PlayerId schema).
|
|
20
|
+
*
|
|
21
|
+
* Game-specific save/meta schemas are left as `Schema.Unknown` placeholders.
|
|
22
|
+
*
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category Endpoints
|
|
25
|
+
*/
|
|
26
|
+
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
27
|
+
import * as Schema from "effect/Schema";
|
|
28
|
+
/**
|
|
29
|
+
* LEGO Tower player id. Unlike tt/pp/pt, LEGO Tower issues ids longer than 5
|
|
30
|
+
* chars (e.g. `1QVVY7`), so the shared `PlayerId`
|
|
31
|
+
* (max length 5) is too strict here.
|
|
32
|
+
*
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @category Schemas
|
|
35
|
+
*/
|
|
36
|
+
export declare const PlayerId: Schema.brand<Schema.String, "PlayerId">;
|
|
37
|
+
/**
|
|
38
|
+
* A gift/item in the general item channel (get_items / send_item). Verified DTO
|
|
39
|
+
* NBSyncItemsGift on pt: `{gift_id, gift_to, gift_from, gift_type, item_type,
|
|
40
|
+
* gift_str, h}` (no `c`, unlike pp). Left open for the data-schema work.
|
|
41
|
+
*
|
|
42
|
+
* @since 1.0.0
|
|
43
|
+
* @category Schemas
|
|
44
|
+
*/
|
|
45
|
+
export declare const Gift: Schema.Unknown;
|
|
46
|
+
/**
|
|
47
|
+
* The LEGO Tower NBSync api.
|
|
48
|
+
*
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category Api
|
|
51
|
+
*/
|
|
52
|
+
export declare const Api: HttpApi.HttpApi<"LegoTowerApi", HttpApiGroup.HttpApiGroup<"DeviceManagementGroup", HttpApiEndpoint.HttpApiEndpoint<"DeviceNewPlayer", "GET", "/register/lt/:salt1/:salt2/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
53
|
+
salt1: Schema.Int;
|
|
54
|
+
salt2: Schema.Int;
|
|
55
|
+
hash: Schema.String;
|
|
56
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
57
|
+
readonly error: Schema.String;
|
|
58
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
59
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
60
|
+
readonly playerSs: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerAuthKey">;
|
|
61
|
+
}>, {
|
|
62
|
+
readonly playerId: "player_id";
|
|
63
|
+
readonly playerSs: "player_ss";
|
|
64
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"DevicePlayerDetails", "GET", "/player_details/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
65
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
66
|
+
salt: Schema.Int;
|
|
67
|
+
hash: Schema.String;
|
|
68
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
69
|
+
readonly error: Schema.String;
|
|
70
|
+
}> | Schema.Struct<{
|
|
71
|
+
readonly success: Schema.Literal<"Found">;
|
|
72
|
+
readonly player: Schema.encodeKeys<Schema.Struct<{
|
|
73
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
74
|
+
readonly playerEmail: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerEmail">;
|
|
75
|
+
readonly registered: Schema.compose<Schema.BooleanFromBit, Schema.NumberFromString>;
|
|
76
|
+
readonly blacklisted: Schema.compose<Schema.BooleanFromBit, Schema.NumberFromString>;
|
|
77
|
+
readonly saveVersion: Schema.compose<Schema.Int, Schema.NumberFromString>;
|
|
78
|
+
readonly checksum: Schema.String;
|
|
79
|
+
}>, {
|
|
80
|
+
readonly playerId: "player_id";
|
|
81
|
+
readonly playerEmail: "email";
|
|
82
|
+
readonly checksum: "h";
|
|
83
|
+
}>;
|
|
84
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"DeviceVerifyDevice", "GET", "/verify_device/lt/:playerId/:verificationCode", Schema.toCodecStringTree<Schema.Struct<{
|
|
85
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
86
|
+
verificationCode: Schema.String;
|
|
87
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
88
|
+
readonly error: Schema.String;
|
|
89
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
90
|
+
readonly success: Schema.Literal<"NewDevice">;
|
|
91
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
92
|
+
readonly playerAuthKey: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerAuthKey">;
|
|
93
|
+
readonly playerEmail: Schema.brand<Schema.RedactedFromValue<Schema.String>, "PlayerEmail">;
|
|
94
|
+
}>, {
|
|
95
|
+
readonly playerId: "player_id";
|
|
96
|
+
readonly playerAuthKey: "player_ss";
|
|
97
|
+
readonly playerEmail: "player_email";
|
|
98
|
+
}>>, 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/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
99
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
100
|
+
salt: Schema.Int;
|
|
101
|
+
hash: Schema.String;
|
|
102
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
103
|
+
readonly error: Schema.String;
|
|
104
|
+
}> | Schema.Struct<{
|
|
105
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
106
|
+
}> | Schema.Struct<{
|
|
107
|
+
readonly success: Schema.Literal<"Found">;
|
|
108
|
+
readonly gifts: Schema.$Array<Schema.Unknown>;
|
|
109
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialGetVisits", "GET", "/get_visits/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
110
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
111
|
+
salt: Schema.Int;
|
|
112
|
+
hash: Schema.String;
|
|
113
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
114
|
+
readonly error: Schema.String;
|
|
115
|
+
}> | Schema.Struct<{
|
|
116
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
117
|
+
}> | Schema.Struct<{
|
|
118
|
+
readonly success: Schema.Literal<"Found">;
|
|
119
|
+
readonly gifts: Schema.$Array<Schema.Unknown>;
|
|
120
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialPullFriendGame", "GET", "/friend/pull_game/lt/:playerId/:friendId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
121
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
122
|
+
friendId: Schema.brand<Schema.String, "PlayerId">;
|
|
123
|
+
salt: Schema.Int;
|
|
124
|
+
hash: Schema.String;
|
|
125
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
126
|
+
readonly error: Schema.String;
|
|
127
|
+
}> | Schema.Struct<{
|
|
128
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
129
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
130
|
+
readonly success: Schema.Literal<"Found">;
|
|
131
|
+
readonly data: Schema.Uint8ArrayFromBase64;
|
|
132
|
+
readonly checksum: Schema.String;
|
|
133
|
+
readonly saveId: Schema.NumberFromString;
|
|
134
|
+
readonly playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
135
|
+
}>, {
|
|
136
|
+
readonly checksum: "h";
|
|
137
|
+
readonly saveId: "id";
|
|
138
|
+
readonly playerId: "player_id";
|
|
139
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialPullFriendMeta", "POST", "/friend/pull_meta/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
140
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
141
|
+
salt: Schema.Int;
|
|
142
|
+
hash: Schema.String;
|
|
143
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
144
|
+
readonly friends: Schema.brand<Schema.String, "PlayerId">;
|
|
145
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
146
|
+
readonly error: Schema.String;
|
|
147
|
+
}> | Schema.Struct<{
|
|
148
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
149
|
+
}> | Schema.Struct<{
|
|
150
|
+
readonly success: Schema.Literal<"Found">;
|
|
151
|
+
readonly meta: Schema.$Record<Schema.brand<Schema.String, "PlayerId">, Schema.Unknown>;
|
|
152
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SocialSendItem", "POST", "/send_item/lt/:itemType/:playerId/:friendId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
153
|
+
itemType: Schema.String;
|
|
154
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
155
|
+
friendId: Schema.brand<Schema.String, "PlayerId">;
|
|
156
|
+
salt: Schema.Int;
|
|
157
|
+
hash: Schema.String;
|
|
158
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
159
|
+
readonly itemStr: Schema.String;
|
|
160
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
161
|
+
readonly error: Schema.String;
|
|
162
|
+
}> | Schema.Struct<{
|
|
163
|
+
readonly success: Schema.Literal<"Sent">;
|
|
164
|
+
}> | Schema.Struct<{
|
|
165
|
+
readonly success: Schema.Literal<"NotSent">;
|
|
166
|
+
}>>, 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/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
167
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
168
|
+
salt: Schema.Int;
|
|
169
|
+
hash: Schema.String;
|
|
170
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
171
|
+
readonly error: Schema.String;
|
|
172
|
+
}> | Schema.Struct<{
|
|
173
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
174
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
175
|
+
readonly success: Schema.Literal<"Found">;
|
|
176
|
+
readonly checksum: Schema.String;
|
|
177
|
+
readonly saveId: Schema.NumberFromString;
|
|
178
|
+
}>, {
|
|
179
|
+
readonly checksum: "h";
|
|
180
|
+
readonly saveId: "id";
|
|
181
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SyncPullSave", "GET", "/sync/pull/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
182
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
183
|
+
salt: Schema.Int;
|
|
184
|
+
hash: Schema.String;
|
|
185
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
186
|
+
readonly error: Schema.String;
|
|
187
|
+
}> | Schema.Struct<{
|
|
188
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
189
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
190
|
+
readonly success: Schema.Literal<"Found">;
|
|
191
|
+
readonly data: Schema.Uint8ArrayFromBase64;
|
|
192
|
+
readonly checksum: Schema.String;
|
|
193
|
+
readonly saveId: Schema.NumberFromString;
|
|
194
|
+
}>, {
|
|
195
|
+
readonly checksum: "h";
|
|
196
|
+
readonly saveId: "id";
|
|
197
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SyncPullSnapshot", "GET", "/sync/pull_snapshot/lt/:playerId/:snapshotId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
198
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
199
|
+
snapshotId: Schema.Int;
|
|
200
|
+
salt: Schema.Int;
|
|
201
|
+
hash: Schema.String;
|
|
202
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
203
|
+
readonly error: Schema.String;
|
|
204
|
+
}> | Schema.Struct<{
|
|
205
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
206
|
+
}> | Schema.encodeKeys<Schema.Struct<{
|
|
207
|
+
readonly success: Schema.Literal<"Found">;
|
|
208
|
+
readonly data: Schema.Uint8ArrayFromBase64;
|
|
209
|
+
readonly checksum: Schema.String;
|
|
210
|
+
readonly snapshotId: Schema.NumberFromString;
|
|
211
|
+
}>, {
|
|
212
|
+
readonly checksum: "h";
|
|
213
|
+
readonly snapshotId: "id";
|
|
214
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"SyncRetrieveSnapshotList", "GET", "/sync/current_snapshots/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
215
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
216
|
+
salt: Schema.Int;
|
|
217
|
+
hash: Schema.String;
|
|
218
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
219
|
+
readonly error: Schema.String;
|
|
220
|
+
}> | Schema.Struct<{
|
|
221
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
222
|
+
}> | Schema.Struct<{
|
|
223
|
+
readonly success: Schema.Literal<"Found">;
|
|
224
|
+
readonly saves: Schema.$Array<Schema.Struct<{
|
|
225
|
+
readonly id: Schema.Int;
|
|
226
|
+
readonly created: Schema.Int;
|
|
227
|
+
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
228
|
+
}>>;
|
|
229
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"TradeGroup", HttpApiEndpoint.HttpApiEndpoint<"TradeGetTrades", "GET", "/get_trades/lt/:playerId/:salt/:hash", Schema.toCodecStringTree<Schema.Struct<{
|
|
230
|
+
playerId: Schema.brand<Schema.String, "PlayerId">;
|
|
231
|
+
salt: Schema.Int;
|
|
232
|
+
hash: Schema.String;
|
|
233
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
234
|
+
readonly error: Schema.String;
|
|
235
|
+
}> | Schema.Struct<{
|
|
236
|
+
readonly success: Schema.Literal<"NotFound">;
|
|
237
|
+
}> | Schema.Struct<{
|
|
238
|
+
readonly success: Schema.Literal<"Found">;
|
|
239
|
+
readonly trades: Schema.$Array<Schema.Struct<{
|
|
240
|
+
readonly id: Schema.Int;
|
|
241
|
+
readonly to: Schema.String;
|
|
242
|
+
readonly from: Schema.String;
|
|
243
|
+
readonly status: Schema.Int;
|
|
244
|
+
readonly payload: Schema.String;
|
|
245
|
+
readonly added: Schema.Int;
|
|
246
|
+
readonly expire: Schema.Int;
|
|
247
|
+
}>>;
|
|
248
|
+
}>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, false>>;
|
|
249
|
+
//# sourceMappingURL=Endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Endpoints.d.ts","sourceRoot":"","sources":["../src/Endpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAOxC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,yCAKpB,CAAC;AAyBF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,gBAAiB,CAAC;AA+TnC;;;;;GAKG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4LAII,CAAC"}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LEGO Tower (game code `lt`) 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
|
+
* `lt/<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
|
+
* - Rich endpoint set: adds snapshots, trades, mailbox, AG, and LL-friends.
|
|
19
|
+
* - LEGO Tower issues player ids longer than 5 chars (relaxed PlayerId schema).
|
|
20
|
+
*
|
|
21
|
+
* Game-specific save/meta schemas are left as `Schema.Unknown` placeholders.
|
|
22
|
+
*
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category Endpoints
|
|
25
|
+
*/
|
|
26
|
+
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
27
|
+
import * as Schema from "effect/Schema";
|
|
28
|
+
import * as NimblebitConfig from "@tinyburg/nimblebit-sdk/NimblebitConfig";
|
|
29
|
+
import * as OAuthScope from "@yielded/auth/OAuthScope";
|
|
30
|
+
import * as Scopes from "./Scopes.js";
|
|
31
|
+
/**
|
|
32
|
+
* LEGO Tower player id. Unlike tt/pp/pt, LEGO Tower issues ids longer than 5
|
|
33
|
+
* chars (e.g. `1QVVY7`), so the shared `PlayerId`
|
|
34
|
+
* (max length 5) is too strict here.
|
|
35
|
+
*
|
|
36
|
+
* @since 1.0.0
|
|
37
|
+
* @category Schemas
|
|
38
|
+
*/
|
|
39
|
+
export const PlayerId = /*#__PURE__*/Schema.String.pipe(/*#__PURE__*/Schema.check(/*#__PURE__*/Schema.isMinLength(1)), /*#__PURE__*/Schema.check(/*#__PURE__*/Schema.isMaxLength(10)), /*#__PURE__*/Schema.check(/*#__PURE__*/Schema.isPattern(/^([\dA-Z]*)$/)), /*#__PURE__*/Schema.brand("PlayerId"));
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const U32 = /*#__PURE__*/Schema.Int.check(/*#__PURE__*/Schema.isUint32());
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ApiErrors = [HttpApiError.Forbidden, HttpApiError.BadRequest, HttpApiError.Unauthorized, HttpApiError.InternalServerError];
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ErrorResponse = /*#__PURE__*/Schema.Struct({
|
|
46
|
+
error: Schema.String
|
|
47
|
+
});
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const NotFoundResponse = /*#__PURE__*/Schema.Struct({
|
|
50
|
+
success: /*#__PURE__*/Schema.Literal("NotFound")
|
|
51
|
+
});
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const SentResponse = /*#__PURE__*/Schema.Struct({
|
|
54
|
+
success: /*#__PURE__*/Schema.Literal("Sent")
|
|
55
|
+
});
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const NotSentResponse = /*#__PURE__*/Schema.Struct({
|
|
58
|
+
success: /*#__PURE__*/Schema.Literal("NotSent")
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* A gift/item in the general item channel (get_items / send_item). Verified DTO
|
|
62
|
+
* NBSyncItemsGift on pt: `{gift_id, gift_to, gift_from, gift_type, item_type,
|
|
63
|
+
* gift_str, h}` (no `c`, unlike pp). Left open for the data-schema work.
|
|
64
|
+
*
|
|
65
|
+
* @since 1.0.0
|
|
66
|
+
* @category Schemas
|
|
67
|
+
*/
|
|
68
|
+
export const Gift = Schema.Unknown;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const DeviceNewPlayerEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DeviceNewPlayer", "/register/lt/:salt1/:salt2/:hash", {
|
|
71
|
+
params: {
|
|
72
|
+
salt1: U32,
|
|
73
|
+
salt2: U32,
|
|
74
|
+
hash: Schema.String
|
|
75
|
+
},
|
|
76
|
+
error: ApiErrors,
|
|
77
|
+
success: [ErrorResponse, /*#__PURE__*/Schema.Struct({
|
|
78
|
+
playerId: PlayerId,
|
|
79
|
+
playerSs: NimblebitConfig.PlayerAuthKeySchema
|
|
80
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
81
|
+
playerId: "player_id",
|
|
82
|
+
playerSs: "player_ss"
|
|
83
|
+
}))]
|
|
84
|
+
});
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const DevicePlayerDetailsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DevicePlayerDetails", "/player_details/lt/:playerId/:salt/:hash", {
|
|
87
|
+
params: {
|
|
88
|
+
playerId: PlayerId,
|
|
89
|
+
salt: U32,
|
|
90
|
+
hash: Schema.String
|
|
91
|
+
},
|
|
92
|
+
error: ApiErrors,
|
|
93
|
+
success: [ErrorResponse, Schema.Struct({
|
|
94
|
+
success: Schema.Literal("Found"),
|
|
95
|
+
player: Schema.Struct({
|
|
96
|
+
playerId: PlayerId,
|
|
97
|
+
playerEmail: NimblebitConfig.PlayerEmailSchema,
|
|
98
|
+
registered: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.BooleanFromBit)),
|
|
99
|
+
blacklisted: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.BooleanFromBit)),
|
|
100
|
+
saveVersion: Schema.NumberFromString.pipe(Schema.decodeTo(Schema.Int)),
|
|
101
|
+
checksum: Schema.String
|
|
102
|
+
}).pipe(Schema.encodeKeys({
|
|
103
|
+
playerId: "player_id",
|
|
104
|
+
playerEmail: "email",
|
|
105
|
+
checksum: "h"
|
|
106
|
+
}))
|
|
107
|
+
})]
|
|
108
|
+
}).annotate(OAuthScope.Required, Scopes.Device.read.player_details.required);
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const DeviceVerifyDeviceEndpoint = /*#__PURE__*/HttpApiEndpoint.get("DeviceVerifyDevice", "/verify_device/lt/:playerId/:verificationCode", {
|
|
111
|
+
params: {
|
|
112
|
+
playerId: PlayerId,
|
|
113
|
+
verificationCode: Schema.String
|
|
114
|
+
},
|
|
115
|
+
error: ApiErrors,
|
|
116
|
+
success: [ErrorResponse, Schema.Struct({
|
|
117
|
+
success: Schema.Literal("NewDevice"),
|
|
118
|
+
playerId: PlayerId,
|
|
119
|
+
playerAuthKey: NimblebitConfig.PlayerAuthKeySchema,
|
|
120
|
+
playerEmail: NimblebitConfig.PlayerEmailSchema
|
|
121
|
+
}).pipe(Schema.encodeKeys({
|
|
122
|
+
playerId: "player_id",
|
|
123
|
+
playerAuthKey: "player_ss",
|
|
124
|
+
playerEmail: "player_email"
|
|
125
|
+
}))]
|
|
126
|
+
}).annotate(OAuthScope.Required, Scopes.Device.write.verify_device.required);
|
|
127
|
+
/**
|
|
128
|
+
* Pull the player's cloud save. VERIFIED envelope (NBSyncGameSaveResponse). No-save
|
|
129
|
+
* case returns `{ error: "SaveNotFound" }`. `data` is base64 pako-deflated bytes.
|
|
130
|
+
*
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
export const SyncPullSaveEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncPullSave", "/sync/pull/lt/:playerId/:salt/:hash", {
|
|
134
|
+
params: {
|
|
135
|
+
playerId: PlayerId,
|
|
136
|
+
salt: U32,
|
|
137
|
+
hash: Schema.String
|
|
138
|
+
},
|
|
139
|
+
error: ApiErrors,
|
|
140
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
141
|
+
success: Schema.Literal("Found"),
|
|
142
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
143
|
+
checksum: Schema.String,
|
|
144
|
+
saveId: Schema.NumberFromString
|
|
145
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
146
|
+
checksum: "h",
|
|
147
|
+
saveId: "id"
|
|
148
|
+
}))]
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* VERIFIED envelope (NBSyncCurrentCheckResponse); no-save returns `{ error: "NoSave" }`.
|
|
152
|
+
*
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
export const SyncCheckForNewerSaveEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncCheckForNewerSave", "/sync/current_version/lt/:playerId/:salt/:hash", {
|
|
156
|
+
params: {
|
|
157
|
+
playerId: PlayerId,
|
|
158
|
+
salt: U32,
|
|
159
|
+
hash: Schema.String
|
|
160
|
+
},
|
|
161
|
+
error: ApiErrors,
|
|
162
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
163
|
+
success: Schema.Literal("Found"),
|
|
164
|
+
checksum: Schema.String,
|
|
165
|
+
saveId: Schema.NumberFromString
|
|
166
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
167
|
+
checksum: "h",
|
|
168
|
+
saveId: "id"
|
|
169
|
+
}))]
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* VERIFIED live: `/get_items/lt/:playerId/:salt/:hash` -> `{ success:"Found",
|
|
173
|
+
* gifts:[...] }` (NBSyncItemsGetResponse; no `total` on pt).
|
|
174
|
+
*
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
export const SocialGetItemsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialGetItems", "/get_items/lt/:playerId/:salt/:hash", {
|
|
178
|
+
params: {
|
|
179
|
+
playerId: PlayerId,
|
|
180
|
+
salt: U32,
|
|
181
|
+
hash: Schema.String
|
|
182
|
+
},
|
|
183
|
+
error: ApiErrors,
|
|
184
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
185
|
+
success: Schema.Literal("Found"),
|
|
186
|
+
gifts: Schema.Array(Gift)
|
|
187
|
+
})]
|
|
188
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.get_items.required);
|
|
189
|
+
/**
|
|
190
|
+
* DERIVED from Tiny Tower. Sends an item to a friend. Response VERIFIED
|
|
191
|
+
* (NBSyncItemsSendResponse: success/error). pt also has a `/send_pt/` variant.
|
|
192
|
+
*
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
|
+
export const SocialSendItemEndpoint = /*#__PURE__*/HttpApiEndpoint.post("SocialSendItem", "/send_item/lt/:itemType/:playerId/:friendId/:salt/:hash", {
|
|
196
|
+
params: {
|
|
197
|
+
itemType: Schema.String,
|
|
198
|
+
playerId: PlayerId,
|
|
199
|
+
friendId: PlayerId,
|
|
200
|
+
salt: U32,
|
|
201
|
+
hash: Schema.String
|
|
202
|
+
},
|
|
203
|
+
payload: Schema.Struct({
|
|
204
|
+
itemStr: Schema.String
|
|
205
|
+
}),
|
|
206
|
+
error: ApiErrors,
|
|
207
|
+
success: [ErrorResponse, SentResponse, NotSentResponse]
|
|
208
|
+
}).annotate(OAuthScope.Required, Scopes.Social.write.send_item.required);
|
|
209
|
+
/**
|
|
210
|
+
* VERIFIED envelope (NBSyncFriendGameSaveResponse); preimage
|
|
211
|
+
* `lt/<playerId>/<friendId>/<salt><playerAuthKey>`.
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
export const SocialPullFriendGameEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialPullFriendGame", "/friend/pull_game/lt/:playerId/:friendId/:salt/:hash", {
|
|
216
|
+
params: {
|
|
217
|
+
playerId: PlayerId,
|
|
218
|
+
friendId: PlayerId,
|
|
219
|
+
salt: U32,
|
|
220
|
+
hash: Schema.String
|
|
221
|
+
},
|
|
222
|
+
error: ApiErrors,
|
|
223
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
224
|
+
success: Schema.Literal("Found"),
|
|
225
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
226
|
+
checksum: Schema.String,
|
|
227
|
+
saveId: Schema.NumberFromString,
|
|
228
|
+
playerId: PlayerId
|
|
229
|
+
}).pipe(Schema.encodeKeys({
|
|
230
|
+
checksum: "h",
|
|
231
|
+
saveId: "id",
|
|
232
|
+
playerId: "player_id"
|
|
233
|
+
}))]
|
|
234
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.pull_friend_game.required);
|
|
235
|
+
/**
|
|
236
|
+
* VERIFIED envelope (NBSyncFriendGameMetaResponse; `meta` is a flat
|
|
237
|
+
* Dictionary<String,Object> on pt). Preimage `lt/<playerId>/<salt><friendId><playerAuthKey>`.
|
|
238
|
+
*
|
|
239
|
+
* @internal
|
|
240
|
+
*/
|
|
241
|
+
export const SocialPullFriendMetaEndpoint = /*#__PURE__*/HttpApiEndpoint.post("SocialPullFriendMeta", "/friend/pull_meta/lt/:playerId/:salt/:hash", {
|
|
242
|
+
params: {
|
|
243
|
+
playerId: PlayerId,
|
|
244
|
+
salt: U32,
|
|
245
|
+
hash: Schema.String
|
|
246
|
+
},
|
|
247
|
+
payload: Schema.Struct({
|
|
248
|
+
friends: PlayerId
|
|
249
|
+
}),
|
|
250
|
+
error: ApiErrors,
|
|
251
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
252
|
+
success: Schema.Literal("Found"),
|
|
253
|
+
meta: Schema.Record(PlayerId, Schema.Unknown)
|
|
254
|
+
})]
|
|
255
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.pull_friend_meta.required);
|
|
256
|
+
/**
|
|
257
|
+
* VERIFIED path `/get_visits/lt/:playerId/:salt/:hash`.
|
|
258
|
+
*
|
|
259
|
+
* @internal
|
|
260
|
+
*/
|
|
261
|
+
export const SocialGetVisitsEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SocialGetVisits", "/get_visits/lt/:playerId/:salt/:hash", {
|
|
262
|
+
params: {
|
|
263
|
+
playerId: PlayerId,
|
|
264
|
+
salt: U32,
|
|
265
|
+
hash: Schema.String
|
|
266
|
+
},
|
|
267
|
+
error: ApiErrors,
|
|
268
|
+
success: [ErrorResponse, NotFoundResponse, Schema.Struct({
|
|
269
|
+
success: Schema.Literal("Found"),
|
|
270
|
+
gifts: Schema.Array(Gift)
|
|
271
|
+
})]
|
|
272
|
+
}).annotate(OAuthScope.Required, Scopes.Social.read.get_visits.required);
|
|
273
|
+
/**
|
|
274
|
+
* Snapshot list. VERIFIED DTO NBSyncSnapshotList { success, error, saves:
|
|
275
|
+
* List<NBSyncSnapshotItem{ id, created, meta }> }.
|
|
276
|
+
*
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
export const SyncRetrieveSnapshotListEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncRetrieveSnapshotList", "/sync/current_snapshots/lt/:playerId/:salt/:hash", {
|
|
280
|
+
params: {
|
|
281
|
+
playerId: PlayerId,
|
|
282
|
+
salt: U32,
|
|
283
|
+
hash: Schema.String
|
|
284
|
+
},
|
|
285
|
+
error: ApiErrors,
|
|
286
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
287
|
+
success: /*#__PURE__*/Schema.Literal("Found"),
|
|
288
|
+
saves: /*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.Struct({
|
|
289
|
+
id: Schema.Int,
|
|
290
|
+
created: Schema.Int,
|
|
291
|
+
meta: /*#__PURE__*/Schema.Record(Schema.String, Schema.Unknown)
|
|
292
|
+
}))
|
|
293
|
+
})]
|
|
294
|
+
});
|
|
295
|
+
/**
|
|
296
|
+
* Pull one snapshot. Preimage `lt/<playerId>/<snapshotId>/<salt><playerAuthKey>`.
|
|
297
|
+
*
|
|
298
|
+
* @internal
|
|
299
|
+
*/
|
|
300
|
+
export const SyncPullSnapshotEndpoint = /*#__PURE__*/HttpApiEndpoint.get("SyncPullSnapshot", "/sync/pull_snapshot/lt/:playerId/:snapshotId/:salt/:hash", {
|
|
301
|
+
params: {
|
|
302
|
+
playerId: PlayerId,
|
|
303
|
+
snapshotId: Schema.Int,
|
|
304
|
+
salt: U32,
|
|
305
|
+
hash: Schema.String
|
|
306
|
+
},
|
|
307
|
+
error: ApiErrors,
|
|
308
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
309
|
+
success: Schema.Literal("Found"),
|
|
310
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
311
|
+
checksum: Schema.String,
|
|
312
|
+
snapshotId: Schema.NumberFromString
|
|
313
|
+
}).pipe(/*#__PURE__*/Schema.encodeKeys({
|
|
314
|
+
checksum: "h",
|
|
315
|
+
snapshotId: "id"
|
|
316
|
+
}))]
|
|
317
|
+
});
|
|
318
|
+
/**
|
|
319
|
+
* Trades list. VERIFIED DTO NBSyncTradeItemsGetResponse { success, trades:
|
|
320
|
+
* List<NBSyncTradeItem{ id, to, from, status, payload, added, expire }>, error }.
|
|
321
|
+
*
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
export const TradeGetTradesEndpoint = /*#__PURE__*/HttpApiEndpoint.get("TradeGetTrades", "/get_trades/lt/:playerId/:salt/:hash", {
|
|
325
|
+
params: {
|
|
326
|
+
playerId: PlayerId,
|
|
327
|
+
salt: U32,
|
|
328
|
+
hash: Schema.String
|
|
329
|
+
},
|
|
330
|
+
error: ApiErrors,
|
|
331
|
+
success: [ErrorResponse, NotFoundResponse, /*#__PURE__*/Schema.Struct({
|
|
332
|
+
success: /*#__PURE__*/Schema.Literal("Found"),
|
|
333
|
+
trades: /*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.Struct({
|
|
334
|
+
id: Schema.Int,
|
|
335
|
+
to: Schema.String,
|
|
336
|
+
from: Schema.String,
|
|
337
|
+
status: Schema.Int,
|
|
338
|
+
payload: Schema.String,
|
|
339
|
+
added: Schema.Int,
|
|
340
|
+
expire: Schema.Int
|
|
341
|
+
}))
|
|
342
|
+
})]
|
|
343
|
+
});
|
|
344
|
+
/** @internal */
|
|
345
|
+
export const DeviceManagementGroup = /*#__PURE__*/HttpApiGroup.make("DeviceManagementGroup").add(DeviceNewPlayerEndpoint).add(DevicePlayerDetailsEndpoint).add(DeviceVerifyDeviceEndpoint);
|
|
346
|
+
/** @internal */
|
|
347
|
+
export const SyncManagementGroup = /*#__PURE__*/HttpApiGroup.make("SyncManagementGroup").add(SyncPullSaveEndpoint).add(SyncCheckForNewerSaveEndpoint).add(SyncRetrieveSnapshotListEndpoint).add(SyncPullSnapshotEndpoint);
|
|
348
|
+
/** @internal */
|
|
349
|
+
export const TradeGroup = /*#__PURE__*/HttpApiGroup.make("TradeGroup").add(TradeGetTradesEndpoint);
|
|
350
|
+
/** @internal */
|
|
351
|
+
export const SocialGroup = /*#__PURE__*/HttpApiGroup.make("SocialGroup").add(SocialGetItemsEndpoint).add(SocialGetVisitsEndpoint).add(SocialSendItemEndpoint).add(SocialPullFriendGameEndpoint).add(SocialPullFriendMetaEndpoint);
|
|
352
|
+
/**
|
|
353
|
+
* The LEGO Tower NBSync api.
|
|
354
|
+
*
|
|
355
|
+
* @since 1.0.0
|
|
356
|
+
* @category Api
|
|
357
|
+
*/
|
|
358
|
+
export const Api = /*#__PURE__*/HttpApi.make("LegoTowerApi").add(DeviceManagementGroup).add(SyncManagementGroup).add(SocialGroup).add(TradeGroup);
|
|
359
|
+
//# sourceMappingURL=Endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Endpoints.js","names":[],"sources":["../src/Endpoints.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,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;;;;;;;;AAQA,OAAO,MAAM,QAAQ,gBAAG,MAAM,CAAC,MAAM,CAAC,IAAI,cACtC,MAAM,CAAC,KAAK,cAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,eACnC,MAAM,CAAC,KAAK,cAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,eACpC,MAAM,CAAC,KAAK,cAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,eAC9C,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAC3B;AAED;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,S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