swcombine-sdk 1.0.0
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 +21 -0
- package/README.md +404 -0
- package/dist/cjs/SWCombine.js +120 -0
- package/dist/cjs/SWCombine.js.map +1 -0
- package/dist/cjs/auth/OAuthClient.js +195 -0
- package/dist/cjs/auth/OAuthClient.js.map +1 -0
- package/dist/cjs/auth/TokenManager.js +139 -0
- package/dist/cjs/auth/TokenManager.js.map +1 -0
- package/dist/cjs/auth/permissions.js +281 -0
- package/dist/cjs/auth/permissions.js.map +1 -0
- package/dist/cjs/auth/scopes.js +285 -0
- package/dist/cjs/auth/scopes.js.map +1 -0
- package/dist/cjs/http/HttpClient.js +216 -0
- package/dist/cjs/http/HttpClient.js.map +1 -0
- package/dist/cjs/http/errors.js +156 -0
- package/dist/cjs/http/errors.js.map +1 -0
- package/dist/cjs/index.js +48 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/resources/ApiResource.js +44 -0
- package/dist/cjs/resources/ApiResource.js.map +1 -0
- package/dist/cjs/resources/BaseResource.js +33 -0
- package/dist/cjs/resources/BaseResource.js.map +1 -0
- package/dist/cjs/resources/CharacterResource.js +178 -0
- package/dist/cjs/resources/CharacterResource.js.map +1 -0
- package/dist/cjs/resources/DatacardResource.js +42 -0
- package/dist/cjs/resources/DatacardResource.js.map +1 -0
- package/dist/cjs/resources/EventsResource.js +42 -0
- package/dist/cjs/resources/EventsResource.js.map +1 -0
- package/dist/cjs/resources/FactionResource.js +162 -0
- package/dist/cjs/resources/FactionResource.js.map +1 -0
- package/dist/cjs/resources/GalaxyResource.js +184 -0
- package/dist/cjs/resources/GalaxyResource.js.map +1 -0
- package/dist/cjs/resources/InventoryResource.js +95 -0
- package/dist/cjs/resources/InventoryResource.js.map +1 -0
- package/dist/cjs/resources/LocationResource.js +20 -0
- package/dist/cjs/resources/LocationResource.js.map +1 -0
- package/dist/cjs/resources/MarketResource.js +44 -0
- package/dist/cjs/resources/MarketResource.js.map +1 -0
- package/dist/cjs/resources/NewsResource.js +109 -0
- package/dist/cjs/resources/NewsResource.js.map +1 -0
- package/dist/cjs/resources/TypesResource.js +75 -0
- package/dist/cjs/resources/TypesResource.js.map +1 -0
- package/dist/cjs/types/index.js +25 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/esm/SWCombine.js +116 -0
- package/dist/esm/SWCombine.js.map +1 -0
- package/dist/esm/auth/OAuthClient.js +188 -0
- package/dist/esm/auth/OAuthClient.js.map +1 -0
- package/dist/esm/auth/TokenManager.js +135 -0
- package/dist/esm/auth/TokenManager.js.map +1 -0
- package/dist/esm/auth/permissions.js +275 -0
- package/dist/esm/auth/permissions.js.map +1 -0
- package/dist/esm/auth/scopes.js +274 -0
- package/dist/esm/auth/scopes.js.map +1 -0
- package/dist/esm/http/HttpClient.js +209 -0
- package/dist/esm/http/HttpClient.js.map +1 -0
- package/dist/esm/http/errors.js +152 -0
- package/dist/esm/http/errors.js.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/resources/ApiResource.js +40 -0
- package/dist/esm/resources/ApiResource.js.map +1 -0
- package/dist/esm/resources/BaseResource.js +29 -0
- package/dist/esm/resources/BaseResource.js.map +1 -0
- package/dist/esm/resources/CharacterResource.js +168 -0
- package/dist/esm/resources/CharacterResource.js.map +1 -0
- package/dist/esm/resources/DatacardResource.js +38 -0
- package/dist/esm/resources/DatacardResource.js.map +1 -0
- package/dist/esm/resources/EventsResource.js +38 -0
- package/dist/esm/resources/EventsResource.js.map +1 -0
- package/dist/esm/resources/FactionResource.js +153 -0
- package/dist/esm/resources/FactionResource.js.map +1 -0
- package/dist/esm/resources/GalaxyResource.js +175 -0
- package/dist/esm/resources/GalaxyResource.js.map +1 -0
- package/dist/esm/resources/InventoryResource.js +90 -0
- package/dist/esm/resources/InventoryResource.js.map +1 -0
- package/dist/esm/resources/LocationResource.js +16 -0
- package/dist/esm/resources/LocationResource.js.map +1 -0
- package/dist/esm/resources/MarketResource.js +39 -0
- package/dist/esm/resources/MarketResource.js.map +1 -0
- package/dist/esm/resources/NewsResource.js +103 -0
- package/dist/esm/resources/NewsResource.js.map +1 -0
- package/dist/esm/resources/TypesResource.js +69 -0
- package/dist/esm/resources/TypesResource.js.map +1 -0
- package/dist/esm/types/index.js +22 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/types/SWCombine.d.ts +66 -0
- package/dist/types/SWCombine.d.ts.map +1 -0
- package/dist/types/auth/OAuthClient.d.ts +48 -0
- package/dist/types/auth/OAuthClient.d.ts.map +1 -0
- package/dist/types/auth/TokenManager.d.ts +66 -0
- package/dist/types/auth/TokenManager.d.ts.map +1 -0
- package/dist/types/auth/permissions.d.ts +173 -0
- package/dist/types/auth/permissions.d.ts.map +1 -0
- package/dist/types/auth/scopes.d.ts +309 -0
- package/dist/types/auth/scopes.d.ts.map +1 -0
- package/dist/types/http/HttpClient.d.ts +64 -0
- package/dist/types/http/HttpClient.d.ts.map +1 -0
- package/dist/types/http/errors.d.ts +54 -0
- package/dist/types/http/errors.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/resources/ApiResource.d.ts +56 -0
- package/dist/types/resources/ApiResource.d.ts.map +1 -0
- package/dist/types/resources/BaseResource.d.ts +16 -0
- package/dist/types/resources/BaseResource.d.ts.map +1 -0
- package/dist/types/resources/CharacterResource.d.ts +151 -0
- package/dist/types/resources/CharacterResource.d.ts.map +1 -0
- package/dist/types/resources/DatacardResource.d.ts +42 -0
- package/dist/types/resources/DatacardResource.d.ts.map +1 -0
- package/dist/types/resources/EventsResource.d.ts +34 -0
- package/dist/types/resources/EventsResource.d.ts.map +1 -0
- package/dist/types/resources/FactionResource.d.ts +166 -0
- package/dist/types/resources/FactionResource.d.ts.map +1 -0
- package/dist/types/resources/GalaxyResource.d.ts +134 -0
- package/dist/types/resources/GalaxyResource.d.ts.map +1 -0
- package/dist/types/resources/InventoryResource.d.ts +77 -0
- package/dist/types/resources/InventoryResource.d.ts.map +1 -0
- package/dist/types/resources/LocationResource.d.ts +18 -0
- package/dist/types/resources/LocationResource.d.ts.map +1 -0
- package/dist/types/resources/MarketResource.d.ts +34 -0
- package/dist/types/resources/MarketResource.d.ts.map +1 -0
- package/dist/types/resources/NewsResource.d.ts +54 -0
- package/dist/types/resources/NewsResource.d.ts.map +1 -0
- package/dist/types/resources/TypesResource.d.ts +72 -0
- package/dist/types/resources/TypesResource.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +296 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth Scopes for SW Combine API
|
|
3
|
+
*
|
|
4
|
+
* This module defines all available OAuth scopes and provides utilities
|
|
5
|
+
* for requesting common scope combinations.
|
|
6
|
+
*
|
|
7
|
+
* @see https://www.swcombine.com/ws/developers/permissions/
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Character-related scopes
|
|
11
|
+
*/
|
|
12
|
+
export declare const CharacterScopes: {
|
|
13
|
+
/** Solely provides the character name and ID for use by clients who want to verify a character's identity */
|
|
14
|
+
readonly AUTH: "CHARACTER_AUTH";
|
|
15
|
+
/** Read basic character information (UID, handle, image, race, gender, etc.) */
|
|
16
|
+
readonly READ: "CHARACTER_READ";
|
|
17
|
+
/** Read character HP and XP */
|
|
18
|
+
readonly STATS: "CHARACTER_STATS";
|
|
19
|
+
/** Read character privileges */
|
|
20
|
+
readonly PRIVILEGES: "CHARACTER_PRIVILEGES";
|
|
21
|
+
/** Read character skills */
|
|
22
|
+
readonly SKILLS: "CHARACTER_SKILLS";
|
|
23
|
+
/** Read character credit information */
|
|
24
|
+
readonly CREDITS: "CHARACTER_CREDITS";
|
|
25
|
+
/** Transfer character credits */
|
|
26
|
+
readonly CREDITS_WRITE: "CHARACTER_CREDITS_WRITE";
|
|
27
|
+
/** Read character force-related information (FP, FXP, regen rate, Force Meter) */
|
|
28
|
+
readonly FORCE: "CHARACTER_FORCE";
|
|
29
|
+
/** Read location information in-game */
|
|
30
|
+
readonly LOCATION: "CHARACTER_LOCATION";
|
|
31
|
+
/** Read character events */
|
|
32
|
+
readonly EVENTS: "CHARACTER_EVENTS";
|
|
33
|
+
/** Access all character information (includes all above) */
|
|
34
|
+
readonly ALL: "CHARACTER_ALL";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Message-related scopes
|
|
38
|
+
*/
|
|
39
|
+
export declare const MessageScopes: {
|
|
40
|
+
/** Read messages */
|
|
41
|
+
readonly READ: "MESSAGES_READ";
|
|
42
|
+
/** Send messages */
|
|
43
|
+
readonly SEND: "MESSAGES_SEND";
|
|
44
|
+
/** Delete messages */
|
|
45
|
+
readonly DELETE: "MESSAGES_DELETE";
|
|
46
|
+
/** All message permissions */
|
|
47
|
+
readonly ALL: "MESSAGES_ALL";
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Personal inventory scopes
|
|
51
|
+
*/
|
|
52
|
+
export declare const PersonalInventoryScopes: {
|
|
53
|
+
/** Overview of personal inventory */
|
|
54
|
+
readonly OVERVIEW: "PERSONAL_INV_OVERVIEW";
|
|
55
|
+
/** Personal ship scopes */
|
|
56
|
+
readonly SHIPS: Record<string, string>;
|
|
57
|
+
/** Personal vehicle scopes */
|
|
58
|
+
readonly VEHICLES: Record<string, string>;
|
|
59
|
+
/** Personal station scopes */
|
|
60
|
+
readonly STATIONS: Record<string, string>;
|
|
61
|
+
/** Personal city scopes */
|
|
62
|
+
readonly CITIES: Record<string, string>;
|
|
63
|
+
/** Personal facility scopes */
|
|
64
|
+
readonly FACILITIES: Record<string, string>;
|
|
65
|
+
/** Personal planet scopes (no RENAME/MAKEOVER) */
|
|
66
|
+
readonly PLANETS: Record<string, string>;
|
|
67
|
+
/** Personal item scopes */
|
|
68
|
+
readonly ITEMS: Record<string, string>;
|
|
69
|
+
/** Personal NPC scopes (no RENAME) */
|
|
70
|
+
readonly NPCS: Record<string, string>;
|
|
71
|
+
/** Personal droid scopes */
|
|
72
|
+
readonly DROIDS: Record<string, string>;
|
|
73
|
+
/** Personal material scopes (no ASSIGN) */
|
|
74
|
+
readonly MATERIALS: {
|
|
75
|
+
readonly READ: "PERSONAL_INV_MATERIALS_READ";
|
|
76
|
+
readonly RENAME: "PERSONAL_INV_MATERIALS_RENAME";
|
|
77
|
+
readonly MAKEOVER: "PERSONAL_INV_MATERIALS_MAKEOVER";
|
|
78
|
+
readonly TAGS_READ: "PERSONAL_INV_MATERIALS_TAGS_READ";
|
|
79
|
+
readonly TAGS_WRITE: "PERSONAL_INV_MATERIALS_TAGS_WRITE";
|
|
80
|
+
readonly ALL: "PERSONAL_INV_MATERIALS_ALL";
|
|
81
|
+
};
|
|
82
|
+
/** Personal creature scopes */
|
|
83
|
+
readonly CREATURES: Record<string, string>;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Faction management scopes
|
|
87
|
+
*/
|
|
88
|
+
export declare const FactionScopes: {
|
|
89
|
+
/** Read faction information */
|
|
90
|
+
readonly READ: "FACTION_READ";
|
|
91
|
+
/** Read faction members */
|
|
92
|
+
readonly MEMBERS: "FACTION_MEMBERS";
|
|
93
|
+
/** Read faction stocks */
|
|
94
|
+
readonly STOCKS: "FACTION_STOCKS";
|
|
95
|
+
/** Read faction credits */
|
|
96
|
+
readonly CREDITS_READ: "FACTION_CREDITS_READ";
|
|
97
|
+
/** Write/transfer faction credits */
|
|
98
|
+
readonly CREDITS_WRITE: "FACTION_CREDITS_WRITE";
|
|
99
|
+
/** Read faction budgets */
|
|
100
|
+
readonly BUDGETS_READ: "FACTION_BUDGETS_READ";
|
|
101
|
+
/** Write faction budgets */
|
|
102
|
+
readonly BUDGETS_WRITE: "FACTION_BUDGETS_WRITE";
|
|
103
|
+
/** Read faction datacards */
|
|
104
|
+
readonly DATACARDS_READ: "FACTION_DATACARDS_READ";
|
|
105
|
+
/** Write faction datacards */
|
|
106
|
+
readonly DATACARDS_WRITE: "FACTION_DATACARDS_WRITE";
|
|
107
|
+
/** All faction permissions */
|
|
108
|
+
readonly ALL: "FACTION_ALL";
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Faction inventory scopes
|
|
112
|
+
*/
|
|
113
|
+
export declare const FactionInventoryScopes: {
|
|
114
|
+
/** Overview of faction inventory */
|
|
115
|
+
readonly OVERVIEW: "FACTION_INV_OVERVIEW";
|
|
116
|
+
/** Faction ship scopes */
|
|
117
|
+
readonly SHIPS: Record<string, string>;
|
|
118
|
+
/** Faction vehicle scopes */
|
|
119
|
+
readonly VEHICLES: Record<string, string>;
|
|
120
|
+
/** Faction station scopes */
|
|
121
|
+
readonly STATIONS: Record<string, string>;
|
|
122
|
+
/** Faction city scopes */
|
|
123
|
+
readonly CITIES: Record<string, string>;
|
|
124
|
+
/** Faction facility scopes */
|
|
125
|
+
readonly FACILITIES: Record<string, string>;
|
|
126
|
+
/** Faction planet scopes (no RENAME/MAKEOVER) */
|
|
127
|
+
readonly PLANETS: Record<string, string>;
|
|
128
|
+
/** Faction item scopes */
|
|
129
|
+
readonly ITEMS: Record<string, string>;
|
|
130
|
+
/** Faction NPC scopes (no RENAME) */
|
|
131
|
+
readonly NPCS: Record<string, string>;
|
|
132
|
+
/** Faction droid scopes */
|
|
133
|
+
readonly DROIDS: Record<string, string>;
|
|
134
|
+
/** Faction material scopes (no ASSIGN) */
|
|
135
|
+
readonly MATERIALS: {
|
|
136
|
+
readonly READ: "FACTION_INV_MATERIALS_READ";
|
|
137
|
+
readonly RENAME: "FACTION_INV_MATERIALS_RENAME";
|
|
138
|
+
readonly MAKEOVER: "FACTION_INV_MATERIALS_MAKEOVER";
|
|
139
|
+
readonly TAGS_READ: "FACTION_INV_MATERIALS_TAGS_READ";
|
|
140
|
+
readonly TAGS_WRITE: "FACTION_INV_MATERIALS_TAGS_WRITE";
|
|
141
|
+
readonly ALL: "FACTION_INV_MATERIALS_ALL";
|
|
142
|
+
};
|
|
143
|
+
/** Faction creature scopes */
|
|
144
|
+
readonly CREATURES: Record<string, string>;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* All available scopes organized by category
|
|
148
|
+
*/
|
|
149
|
+
export declare const Scopes: {
|
|
150
|
+
readonly Character: {
|
|
151
|
+
/** Solely provides the character name and ID for use by clients who want to verify a character's identity */
|
|
152
|
+
readonly AUTH: "CHARACTER_AUTH";
|
|
153
|
+
/** Read basic character information (UID, handle, image, race, gender, etc.) */
|
|
154
|
+
readonly READ: "CHARACTER_READ";
|
|
155
|
+
/** Read character HP and XP */
|
|
156
|
+
readonly STATS: "CHARACTER_STATS";
|
|
157
|
+
/** Read character privileges */
|
|
158
|
+
readonly PRIVILEGES: "CHARACTER_PRIVILEGES";
|
|
159
|
+
/** Read character skills */
|
|
160
|
+
readonly SKILLS: "CHARACTER_SKILLS";
|
|
161
|
+
/** Read character credit information */
|
|
162
|
+
readonly CREDITS: "CHARACTER_CREDITS";
|
|
163
|
+
/** Transfer character credits */
|
|
164
|
+
readonly CREDITS_WRITE: "CHARACTER_CREDITS_WRITE";
|
|
165
|
+
/** Read character force-related information (FP, FXP, regen rate, Force Meter) */
|
|
166
|
+
readonly FORCE: "CHARACTER_FORCE";
|
|
167
|
+
/** Read location information in-game */
|
|
168
|
+
readonly LOCATION: "CHARACTER_LOCATION";
|
|
169
|
+
/** Read character events */
|
|
170
|
+
readonly EVENTS: "CHARACTER_EVENTS";
|
|
171
|
+
/** Access all character information (includes all above) */
|
|
172
|
+
readonly ALL: "CHARACTER_ALL";
|
|
173
|
+
};
|
|
174
|
+
readonly Messages: {
|
|
175
|
+
/** Read messages */
|
|
176
|
+
readonly READ: "MESSAGES_READ";
|
|
177
|
+
/** Send messages */
|
|
178
|
+
readonly SEND: "MESSAGES_SEND";
|
|
179
|
+
/** Delete messages */
|
|
180
|
+
readonly DELETE: "MESSAGES_DELETE";
|
|
181
|
+
/** All message permissions */
|
|
182
|
+
readonly ALL: "MESSAGES_ALL";
|
|
183
|
+
};
|
|
184
|
+
readonly PersonalInventory: {
|
|
185
|
+
/** Overview of personal inventory */
|
|
186
|
+
readonly OVERVIEW: "PERSONAL_INV_OVERVIEW";
|
|
187
|
+
/** Personal ship scopes */
|
|
188
|
+
readonly SHIPS: Record<string, string>;
|
|
189
|
+
/** Personal vehicle scopes */
|
|
190
|
+
readonly VEHICLES: Record<string, string>;
|
|
191
|
+
/** Personal station scopes */
|
|
192
|
+
readonly STATIONS: Record<string, string>;
|
|
193
|
+
/** Personal city scopes */
|
|
194
|
+
readonly CITIES: Record<string, string>;
|
|
195
|
+
/** Personal facility scopes */
|
|
196
|
+
readonly FACILITIES: Record<string, string>;
|
|
197
|
+
/** Personal planet scopes (no RENAME/MAKEOVER) */
|
|
198
|
+
readonly PLANETS: Record<string, string>;
|
|
199
|
+
/** Personal item scopes */
|
|
200
|
+
readonly ITEMS: Record<string, string>;
|
|
201
|
+
/** Personal NPC scopes (no RENAME) */
|
|
202
|
+
readonly NPCS: Record<string, string>;
|
|
203
|
+
/** Personal droid scopes */
|
|
204
|
+
readonly DROIDS: Record<string, string>;
|
|
205
|
+
/** Personal material scopes (no ASSIGN) */
|
|
206
|
+
readonly MATERIALS: {
|
|
207
|
+
readonly READ: "PERSONAL_INV_MATERIALS_READ";
|
|
208
|
+
readonly RENAME: "PERSONAL_INV_MATERIALS_RENAME";
|
|
209
|
+
readonly MAKEOVER: "PERSONAL_INV_MATERIALS_MAKEOVER";
|
|
210
|
+
readonly TAGS_READ: "PERSONAL_INV_MATERIALS_TAGS_READ";
|
|
211
|
+
readonly TAGS_WRITE: "PERSONAL_INV_MATERIALS_TAGS_WRITE";
|
|
212
|
+
readonly ALL: "PERSONAL_INV_MATERIALS_ALL";
|
|
213
|
+
};
|
|
214
|
+
/** Personal creature scopes */
|
|
215
|
+
readonly CREATURES: Record<string, string>;
|
|
216
|
+
};
|
|
217
|
+
readonly Faction: {
|
|
218
|
+
/** Read faction information */
|
|
219
|
+
readonly READ: "FACTION_READ";
|
|
220
|
+
/** Read faction members */
|
|
221
|
+
readonly MEMBERS: "FACTION_MEMBERS";
|
|
222
|
+
/** Read faction stocks */
|
|
223
|
+
readonly STOCKS: "FACTION_STOCKS";
|
|
224
|
+
/** Read faction credits */
|
|
225
|
+
readonly CREDITS_READ: "FACTION_CREDITS_READ";
|
|
226
|
+
/** Write/transfer faction credits */
|
|
227
|
+
readonly CREDITS_WRITE: "FACTION_CREDITS_WRITE";
|
|
228
|
+
/** Read faction budgets */
|
|
229
|
+
readonly BUDGETS_READ: "FACTION_BUDGETS_READ";
|
|
230
|
+
/** Write faction budgets */
|
|
231
|
+
readonly BUDGETS_WRITE: "FACTION_BUDGETS_WRITE";
|
|
232
|
+
/** Read faction datacards */
|
|
233
|
+
readonly DATACARDS_READ: "FACTION_DATACARDS_READ";
|
|
234
|
+
/** Write faction datacards */
|
|
235
|
+
readonly DATACARDS_WRITE: "FACTION_DATACARDS_WRITE";
|
|
236
|
+
/** All faction permissions */
|
|
237
|
+
readonly ALL: "FACTION_ALL";
|
|
238
|
+
};
|
|
239
|
+
readonly FactionInventory: {
|
|
240
|
+
/** Overview of faction inventory */
|
|
241
|
+
readonly OVERVIEW: "FACTION_INV_OVERVIEW";
|
|
242
|
+
/** Faction ship scopes */
|
|
243
|
+
readonly SHIPS: Record<string, string>;
|
|
244
|
+
/** Faction vehicle scopes */
|
|
245
|
+
readonly VEHICLES: Record<string, string>;
|
|
246
|
+
/** Faction station scopes */
|
|
247
|
+
readonly STATIONS: Record<string, string>;
|
|
248
|
+
/** Faction city scopes */
|
|
249
|
+
readonly CITIES: Record<string, string>;
|
|
250
|
+
/** Faction facility scopes */
|
|
251
|
+
readonly FACILITIES: Record<string, string>;
|
|
252
|
+
/** Faction planet scopes (no RENAME/MAKEOVER) */
|
|
253
|
+
readonly PLANETS: Record<string, string>;
|
|
254
|
+
/** Faction item scopes */
|
|
255
|
+
readonly ITEMS: Record<string, string>;
|
|
256
|
+
/** Faction NPC scopes (no RENAME) */
|
|
257
|
+
readonly NPCS: Record<string, string>;
|
|
258
|
+
/** Faction droid scopes */
|
|
259
|
+
readonly DROIDS: Record<string, string>;
|
|
260
|
+
/** Faction material scopes (no ASSIGN) */
|
|
261
|
+
readonly MATERIALS: {
|
|
262
|
+
readonly READ: "FACTION_INV_MATERIALS_READ";
|
|
263
|
+
readonly RENAME: "FACTION_INV_MATERIALS_RENAME";
|
|
264
|
+
readonly MAKEOVER: "FACTION_INV_MATERIALS_MAKEOVER";
|
|
265
|
+
readonly TAGS_READ: "FACTION_INV_MATERIALS_TAGS_READ";
|
|
266
|
+
readonly TAGS_WRITE: "FACTION_INV_MATERIALS_TAGS_WRITE";
|
|
267
|
+
readonly ALL: "FACTION_INV_MATERIALS_ALL";
|
|
268
|
+
};
|
|
269
|
+
/** Faction creature scopes */
|
|
270
|
+
readonly CREATURES: Record<string, string>;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Type representing any valid scope value
|
|
275
|
+
*/
|
|
276
|
+
export type ScopeValue = string;
|
|
277
|
+
/**
|
|
278
|
+
* Helper function to get all character scopes
|
|
279
|
+
*/
|
|
280
|
+
export declare function getAllCharacterScopes(): string[];
|
|
281
|
+
/**
|
|
282
|
+
* Helper function to get all message scopes
|
|
283
|
+
*/
|
|
284
|
+
export declare function getAllMessageScopes(): string[];
|
|
285
|
+
/**
|
|
286
|
+
* Helper function to get all personal inventory scopes
|
|
287
|
+
*/
|
|
288
|
+
export declare function getAllPersonalInventoryScopes(): string[];
|
|
289
|
+
/**
|
|
290
|
+
* Helper function to get all faction scopes
|
|
291
|
+
*/
|
|
292
|
+
export declare function getAllFactionScopes(): string[];
|
|
293
|
+
/**
|
|
294
|
+
* Helper function to get all faction inventory scopes
|
|
295
|
+
*/
|
|
296
|
+
export declare function getAllFactionInventoryScopes(): string[];
|
|
297
|
+
/**
|
|
298
|
+
* Get all available scopes (for comprehensive testing)
|
|
299
|
+
*/
|
|
300
|
+
export declare function getAllScopes(): string[];
|
|
301
|
+
/**
|
|
302
|
+
* Get basic read-only scopes (good for read-only integrations)
|
|
303
|
+
*/
|
|
304
|
+
export declare function getReadOnlyScopes(): string[];
|
|
305
|
+
/**
|
|
306
|
+
* Get minimal scopes for basic character info (authentication only)
|
|
307
|
+
*/
|
|
308
|
+
export declare function getMinimalScopes(): string[];
|
|
309
|
+
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/auth/scopes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client for making requests to SW Combine API
|
|
3
|
+
*/
|
|
4
|
+
import { AxiosRequestConfig } from 'axios';
|
|
5
|
+
import type { TokenManager } from '../auth/TokenManager.js';
|
|
6
|
+
export interface HttpClientOptions {
|
|
7
|
+
baseURL?: string;
|
|
8
|
+
timeout?: number;
|
|
9
|
+
maxRetries?: number;
|
|
10
|
+
retryDelay?: number;
|
|
11
|
+
debug?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* HTTP client that handles requests, retries, and token refresh
|
|
15
|
+
*/
|
|
16
|
+
export declare class HttpClient {
|
|
17
|
+
private axios;
|
|
18
|
+
private tokenManager?;
|
|
19
|
+
private maxRetries;
|
|
20
|
+
private retryDelay;
|
|
21
|
+
private debug;
|
|
22
|
+
constructor(options: HttpClientOptions, tokenManager?: TokenManager);
|
|
23
|
+
/**
|
|
24
|
+
* Set up request interceptor to add auth token
|
|
25
|
+
*/
|
|
26
|
+
private setupRequestInterceptor;
|
|
27
|
+
/**
|
|
28
|
+
* Set up response interceptor to handle errors and retries
|
|
29
|
+
*/
|
|
30
|
+
private setupResponseInterceptor;
|
|
31
|
+
/**
|
|
32
|
+
* Determine if a request should be retried
|
|
33
|
+
*/
|
|
34
|
+
private shouldRetry;
|
|
35
|
+
/**
|
|
36
|
+
* Sleep for specified milliseconds
|
|
37
|
+
*/
|
|
38
|
+
private sleep;
|
|
39
|
+
/**
|
|
40
|
+
* Make a GET request
|
|
41
|
+
*/
|
|
42
|
+
get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
43
|
+
/**
|
|
44
|
+
* Make a POST request
|
|
45
|
+
*/
|
|
46
|
+
post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
47
|
+
/**
|
|
48
|
+
* Make a PUT request
|
|
49
|
+
*/
|
|
50
|
+
put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Make a DELETE request
|
|
53
|
+
*/
|
|
54
|
+
delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
55
|
+
/**
|
|
56
|
+
* Make a custom request
|
|
57
|
+
*/
|
|
58
|
+
request<T = any>(config: AxiosRequestConfig): Promise<T>;
|
|
59
|
+
/**
|
|
60
|
+
* Set token manager (useful for late initialization)
|
|
61
|
+
*/
|
|
62
|
+
setTokenManager(tokenManager: TokenManager): void;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/http/HttpClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAc,EAEZ,kBAAkB,EAGnB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,KAAK,CAAU;gBAEX,OAAO,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,YAAY;IAqBnE;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA2C/B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAwEhC;;OAEG;IACH,OAAO,CAAC,WAAW;IAuCnB;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;OAEG;IACG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKxE;;OAEG;IACG,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKrF;;OAEG;IACG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKpF;;OAEG;IACG,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAK3E;;OAEG;IACG,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAK9D;;OAEG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;CAGlD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error handling for SW Combine SDK
|
|
3
|
+
*/
|
|
4
|
+
export type SWCErrorType = 'auth' | 'rate_limit' | 'not_found' | 'validation' | 'server' | 'network' | 'unknown';
|
|
5
|
+
export interface SWCErrorOptions {
|
|
6
|
+
type: SWCErrorType;
|
|
7
|
+
statusCode?: number;
|
|
8
|
+
requestId?: string;
|
|
9
|
+
response?: any;
|
|
10
|
+
retryable?: boolean;
|
|
11
|
+
retryAfter?: number;
|
|
12
|
+
cause?: Error;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Custom error class for SW Combine API errors
|
|
16
|
+
*/
|
|
17
|
+
export declare class SWCError extends Error {
|
|
18
|
+
/** Error type discriminator */
|
|
19
|
+
readonly type: SWCErrorType;
|
|
20
|
+
/** HTTP status code if applicable */
|
|
21
|
+
readonly statusCode?: number;
|
|
22
|
+
/** Request ID from API response */
|
|
23
|
+
readonly requestId?: string;
|
|
24
|
+
/** Original API error response */
|
|
25
|
+
readonly response?: any;
|
|
26
|
+
/** Whether this error can be retried */
|
|
27
|
+
readonly retryable: boolean;
|
|
28
|
+
/** Seconds to wait before retrying (for rate limit errors) */
|
|
29
|
+
readonly retryAfter?: number;
|
|
30
|
+
/** Original error that caused this error */
|
|
31
|
+
readonly cause?: Error;
|
|
32
|
+
constructor(message: string, options: SWCErrorOptions);
|
|
33
|
+
/**
|
|
34
|
+
* Determine if an error is retryable based on type and status code
|
|
35
|
+
*/
|
|
36
|
+
private determineRetryable;
|
|
37
|
+
/**
|
|
38
|
+
* Create an error from an HTTP status code and response
|
|
39
|
+
*/
|
|
40
|
+
static fromHttpResponse(statusCode: number, response: any, requestId?: string): SWCError;
|
|
41
|
+
/**
|
|
42
|
+
* Create an error from a network failure
|
|
43
|
+
*/
|
|
44
|
+
static fromNetworkError(error: Error): SWCError;
|
|
45
|
+
/**
|
|
46
|
+
* Check if an error is a SWCError
|
|
47
|
+
*/
|
|
48
|
+
static isSWCError(error: unknown): error is SWCError;
|
|
49
|
+
/**
|
|
50
|
+
* Get a user-friendly error message
|
|
51
|
+
*/
|
|
52
|
+
toUserFriendlyMessage(): string;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/http/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,+BAA+B;IAC/B,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,qCAAqC;IACrC,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpC,mCAAmC;IACnC,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnC,kCAAkC;IAClC,SAAgB,QAAQ,CAAC,EAAE,GAAG,CAAC;IAC/B,wCAAwC;IACxC,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,8DAA8D;IAC9D,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpC,4CAA4C;IAC5C,SAAgB,KAAK,CAAC,EAAE,KAAK,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe;IAiBrD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ;IAsExF;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ;IAQ/C;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ;IAIpD;;OAEG;IACH,qBAAqB,IAAI,MAAM;CAoBhC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SW Combine SDK for Node.js
|
|
3
|
+
* Main entry point
|
|
4
|
+
*/
|
|
5
|
+
export { SWCombine } from './SWCombine.js';
|
|
6
|
+
export { SWCError } from './http/errors.js';
|
|
7
|
+
export * from './types/index.js';
|
|
8
|
+
export * from './auth/permissions.js';
|
|
9
|
+
export { Scopes, CharacterScopes, MessageScopes, PersonalInventoryScopes, FactionScopes, FactionInventoryScopes, getAllScopes, getAllCharacterScopes, getAllMessageScopes, getAllPersonalInventoryScopes, getAllFactionScopes, getAllFactionInventoryScopes, getReadOnlyScopes, getMinimalScopes, } from './auth/scopes.js';
|
|
10
|
+
export type { TokenStorage } from './auth/TokenManager.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EACL,MAAM,EACN,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API utility endpoints
|
|
3
|
+
*/
|
|
4
|
+
import { BaseResource } from './BaseResource.js';
|
|
5
|
+
export interface HelloWorldResponse {
|
|
6
|
+
message: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface HelloAuthResponse {
|
|
10
|
+
message: string;
|
|
11
|
+
character?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface Permission {
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface RateLimitInfo {
|
|
20
|
+
limit: number;
|
|
21
|
+
remaining: number;
|
|
22
|
+
reset: number;
|
|
23
|
+
resetTime: string;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface TimeResponse {
|
|
27
|
+
currentTime: string;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* API resource for utility endpoints
|
|
33
|
+
*/
|
|
34
|
+
export declare class ApiResource extends BaseResource {
|
|
35
|
+
/**
|
|
36
|
+
* Print a HelloWorld message
|
|
37
|
+
*/
|
|
38
|
+
helloWorld(): Promise<HelloWorldResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Print a HelloWorld message for authorized clients
|
|
41
|
+
*/
|
|
42
|
+
helloAuth(): Promise<HelloAuthResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get list of available web services permissions
|
|
45
|
+
*/
|
|
46
|
+
permissions(): Promise<Permission[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Get current rate limit status
|
|
49
|
+
*/
|
|
50
|
+
rateLimits(): Promise<RateLimitInfo>;
|
|
51
|
+
/**
|
|
52
|
+
* Get current time or convert times
|
|
53
|
+
*/
|
|
54
|
+
time(): Promise<TimeResponse>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=ApiResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiResource.d.ts","sourceRoot":"","sources":["../../../src/resources/ApiResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAI/C;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAI7C;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAI1C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAI1C;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC;CAGpC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for all API resources
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
/**
|
|
6
|
+
* Base resource class that all API resources extend
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class BaseResource {
|
|
9
|
+
protected http: HttpClient;
|
|
10
|
+
constructor(http: HttpClient);
|
|
11
|
+
/**
|
|
12
|
+
* Make a request to the API
|
|
13
|
+
*/
|
|
14
|
+
protected request<T>(method: string, path: string, data?: unknown): Promise<T>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=BaseResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseResource.d.ts","sourceRoot":"","sources":["../../../src/resources/BaseResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;GAEG;AACH,8BAAsB,YAAY;IAChC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;gBAEf,IAAI,EAAE,UAAU;IAI5B;;OAEG;cACa,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;CAcrF"}
|