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,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market resource for accessing vendor data
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Vendor, GetVendorOptions } from '../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Market vendors resource
|
|
9
|
+
*/
|
|
10
|
+
export declare class MarketVendorsResource extends BaseResource {
|
|
11
|
+
/**
|
|
12
|
+
* List all public vendors (paginated)
|
|
13
|
+
* @param options - Optional pagination parameters
|
|
14
|
+
* @example
|
|
15
|
+
* const vendors = await client.market.vendors.list();
|
|
16
|
+
* const moreVendors = await client.market.vendors.list({ start_index: 51, item_count: 50 });
|
|
17
|
+
*/
|
|
18
|
+
list(options?: {
|
|
19
|
+
start_index?: number;
|
|
20
|
+
item_count?: number;
|
|
21
|
+
}): Promise<Vendor[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Get vendor by UID
|
|
24
|
+
*/
|
|
25
|
+
get(options: GetVendorOptions): Promise<Vendor>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Market resource for accessing market data
|
|
29
|
+
*/
|
|
30
|
+
export declare class MarketResource extends BaseResource {
|
|
31
|
+
readonly vendors: MarketVendorsResource;
|
|
32
|
+
constructor(http: HttpClient);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=MarketResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketResource.d.ts","sourceRoot":"","sources":["../../../src/resources/MarketResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD;;;;;;OAMG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQtF;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAGtD;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C,SAAgB,OAAO,EAAE,qBAAqB,CAAC;gBAEnC,IAAI,EAAE,UAAU;CAI7B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* News resource for accessing news feeds
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { NewsItem, GetNewsItemOptions, ListNewsOptions } from '../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Galactic News Service (GNS) resource
|
|
9
|
+
*/
|
|
10
|
+
export declare class GNSResource extends BaseResource {
|
|
11
|
+
/**
|
|
12
|
+
* List GNS news items (paginated with optional filtering)
|
|
13
|
+
* @param options - Optional category, pagination, and filtering parameters
|
|
14
|
+
* @example
|
|
15
|
+
* const news = await client.news.gns.list();
|
|
16
|
+
* const economyNews = await client.news.gns.list({ category: 'economy' });
|
|
17
|
+
* const moreNews = await client.news.gns.list({ start_index: 51, item_count: 50 });
|
|
18
|
+
* const searchNews = await client.news.gns.list({ search: 'battle', author: 'John Doe' });
|
|
19
|
+
* const factionNews = await client.news.gns.list({ faction: 'Empire', faction_type: 'government' });
|
|
20
|
+
*/
|
|
21
|
+
list(options?: ListNewsOptions): Promise<NewsItem[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Get specific GNS news item
|
|
24
|
+
*/
|
|
25
|
+
get(options: GetNewsItemOptions): Promise<NewsItem>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Sim News resource
|
|
29
|
+
*/
|
|
30
|
+
export declare class SimNewsResource extends BaseResource {
|
|
31
|
+
/**
|
|
32
|
+
* List Sim News items (paginated with optional filtering)
|
|
33
|
+
* @param options - Optional category, pagination, and filtering parameters
|
|
34
|
+
* @example
|
|
35
|
+
* const news = await client.news.simNews.list();
|
|
36
|
+
* const playerNews = await client.news.simNews.list({ category: 'player' });
|
|
37
|
+
* const moreNews = await client.news.simNews.list({ start_index: 51, item_count: 50 });
|
|
38
|
+
* const searchNews = await client.news.simNews.list({ search: 'update', author: 'Admin' });
|
|
39
|
+
*/
|
|
40
|
+
list(options?: ListNewsOptions): Promise<NewsItem[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Get specific Sim News item
|
|
43
|
+
*/
|
|
44
|
+
get(options: GetNewsItemOptions): Promise<NewsItem>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* News resource for accessing news feeds
|
|
48
|
+
*/
|
|
49
|
+
export declare class NewsResource extends BaseResource {
|
|
50
|
+
readonly gns: GNSResource;
|
|
51
|
+
readonly simNews: SimNewsResource;
|
|
52
|
+
constructor(http: HttpClient);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=NewsResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewsResource.d.ts","sourceRoot":"","sources":["../../../src/resources/NewsResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAe,MAAM,mBAAmB,CAAC;AAE/F;;GAEG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C;;;;;;;;;OASG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IA8B1D;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAG1D;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAC/C;;;;;;;;OAQG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAyB1D;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAG1D;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C,SAAgB,GAAG,EAAE,WAAW,CAAC;IACjC,SAAgB,OAAO,EAAE,eAAe,CAAC;gBAE7B,IAAI,EAAE,UAAU;CAK7B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types resource for accessing entity type information
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Entity } from '../types/index.js';
|
|
7
|
+
export interface EntityType {
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface EntityClass {
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Entity classes resource
|
|
19
|
+
*/
|
|
20
|
+
export declare class TypesClassesResource extends BaseResource {
|
|
21
|
+
/**
|
|
22
|
+
* Get all classes for an entity type (paginated)
|
|
23
|
+
* @param options - Entity type and optional pagination parameters
|
|
24
|
+
* @example
|
|
25
|
+
* const classes = await client.types.classes.list({ entityType: 'vehicle' });
|
|
26
|
+
* const moreClasses = await client.types.classes.list({ entityType: 'vehicle', start_index: 51, item_count: 50 });
|
|
27
|
+
*/
|
|
28
|
+
list(options: {
|
|
29
|
+
entityType: string;
|
|
30
|
+
start_index?: number;
|
|
31
|
+
item_count?: number;
|
|
32
|
+
}): Promise<EntityClass[]>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Entities by type resource
|
|
36
|
+
*/
|
|
37
|
+
export declare class TypesEntitiesResource extends BaseResource {
|
|
38
|
+
/**
|
|
39
|
+
* Get all entities of a type (paginated)
|
|
40
|
+
* @param options - Entity type, optional class filter, and optional pagination parameters
|
|
41
|
+
* @example
|
|
42
|
+
* const ships = await client.types.entities.list({ entityType: 'ships' });
|
|
43
|
+
* const moreShips = await client.types.entities.list({ entityType: 'ships', start_index: 51, item_count: 50 });
|
|
44
|
+
* const fighters = await client.types.entities.list({ entityType: 'ships', class: 'fighter', start_index: 1, item_count: 50 });
|
|
45
|
+
*/
|
|
46
|
+
list(options: {
|
|
47
|
+
entityType: string;
|
|
48
|
+
class?: string;
|
|
49
|
+
start_index?: number;
|
|
50
|
+
item_count?: number;
|
|
51
|
+
}): Promise<Entity[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Get specific entity type information
|
|
54
|
+
*/
|
|
55
|
+
get(options: {
|
|
56
|
+
entityType: string;
|
|
57
|
+
uid: string;
|
|
58
|
+
}): Promise<Entity>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Types resource for accessing type information
|
|
62
|
+
*/
|
|
63
|
+
export declare class TypesResource extends BaseResource {
|
|
64
|
+
readonly classes: TypesClassesResource;
|
|
65
|
+
readonly entities: TypesEntitiesResource;
|
|
66
|
+
constructor(http: HttpClient);
|
|
67
|
+
/**
|
|
68
|
+
* Get all entity types
|
|
69
|
+
*/
|
|
70
|
+
listEntityTypes(): Promise<EntityType[]>;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=TypesResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypesResource.d.ts","sourceRoot":"","sources":["../../../src/resources/TypesResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,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,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,YAAY;IACpD;;;;;;OAMG;IACG,IAAI,CAAC,OAAO,EAAE;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAQ3B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD;;;;;;;OAOG;IACG,IAAI,CAAC,OAAO,EAAE;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAarB;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAGzE;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,SAAgB,OAAO,EAAE,oBAAoB,CAAC;IAC9C,SAAgB,QAAQ,EAAE,qBAAqB,CAAC;gBAEpC,IAAI,EAAE,UAAU;IAM5B;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAG/C"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types and interfaces for SW Combine SDK
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Type for query parameters (for pagination, filtering, etc.)
|
|
6
|
+
* Supports primitive values and arrays for filtering
|
|
7
|
+
*/
|
|
8
|
+
export type QueryParams = Record<string, string | number | boolean | string[] | number[] | undefined>;
|
|
9
|
+
export declare enum GrantType {
|
|
10
|
+
AuthorizationCode = "authorization_code",
|
|
11
|
+
RefreshToken = "refresh_token"
|
|
12
|
+
}
|
|
13
|
+
export declare enum AccessType {
|
|
14
|
+
Online = "online",
|
|
15
|
+
Offline = "offline"
|
|
16
|
+
}
|
|
17
|
+
export declare enum MessageMode {
|
|
18
|
+
Sent = "sent",
|
|
19
|
+
Received = "received"
|
|
20
|
+
}
|
|
21
|
+
export interface ClientConfig {
|
|
22
|
+
/** OAuth client ID */
|
|
23
|
+
clientId: string;
|
|
24
|
+
/** OAuth client secret */
|
|
25
|
+
clientSecret: string;
|
|
26
|
+
/** OAuth redirect URI */
|
|
27
|
+
redirectUri?: string;
|
|
28
|
+
/** Access type: online or offline (offline provides refresh token) */
|
|
29
|
+
accessType?: AccessType;
|
|
30
|
+
/** Existing token to initialize with */
|
|
31
|
+
token?: string | OAuthToken;
|
|
32
|
+
/** Base URL for API (default: https://www.swcombine.com/ws/v2.0/) */
|
|
33
|
+
baseURL?: string;
|
|
34
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
35
|
+
timeout?: number;
|
|
36
|
+
/** Maximum number of retry attempts (default: 3) */
|
|
37
|
+
maxRetries?: number;
|
|
38
|
+
/** Delay between retries in milliseconds (default: 1000) */
|
|
39
|
+
retryDelay?: number;
|
|
40
|
+
/** Enable debug logging */
|
|
41
|
+
debug?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface OAuthToken {
|
|
44
|
+
/** Access token for API requests */
|
|
45
|
+
accessToken: string;
|
|
46
|
+
/** Refresh token for getting new access token */
|
|
47
|
+
refreshToken?: string;
|
|
48
|
+
/** Token expiration timestamp (milliseconds since epoch) */
|
|
49
|
+
expiresAt: number;
|
|
50
|
+
}
|
|
51
|
+
export interface OAuthAuthorizationOptions {
|
|
52
|
+
/** OAuth scopes to request */
|
|
53
|
+
scopes: string[];
|
|
54
|
+
/** State parameter for CSRF protection */
|
|
55
|
+
state: string;
|
|
56
|
+
}
|
|
57
|
+
export interface OAuthCallbackQuery {
|
|
58
|
+
/** Authorization code from callback */
|
|
59
|
+
code?: string;
|
|
60
|
+
/** Error from callback */
|
|
61
|
+
error?: string;
|
|
62
|
+
/** Error description */
|
|
63
|
+
error_description?: string;
|
|
64
|
+
/** State parameter echoed back */
|
|
65
|
+
state?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface AuthorizationResult {
|
|
68
|
+
/** Whether authorization was successful */
|
|
69
|
+
success: boolean;
|
|
70
|
+
/** OAuth token if successful */
|
|
71
|
+
token?: OAuthToken;
|
|
72
|
+
/** Error message if failed */
|
|
73
|
+
error?: string;
|
|
74
|
+
/** State parameter from request */
|
|
75
|
+
state?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface Character {
|
|
78
|
+
uid: string;
|
|
79
|
+
handle: string;
|
|
80
|
+
name: string;
|
|
81
|
+
race?: string;
|
|
82
|
+
faction?: Faction | string;
|
|
83
|
+
credits?: number;
|
|
84
|
+
location?: Location;
|
|
85
|
+
[key: string]: unknown;
|
|
86
|
+
}
|
|
87
|
+
export interface Faction {
|
|
88
|
+
uid: string;
|
|
89
|
+
name: string;
|
|
90
|
+
type?: string;
|
|
91
|
+
owner?: Character | string;
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
}
|
|
94
|
+
export interface Message {
|
|
95
|
+
uid: string;
|
|
96
|
+
subject: string;
|
|
97
|
+
sender: Character | string;
|
|
98
|
+
recipient: Character | string;
|
|
99
|
+
timestamp: string;
|
|
100
|
+
read: boolean;
|
|
101
|
+
body?: string;
|
|
102
|
+
[key: string]: unknown;
|
|
103
|
+
}
|
|
104
|
+
export interface Skill {
|
|
105
|
+
uid: string;
|
|
106
|
+
name: string;
|
|
107
|
+
level: number;
|
|
108
|
+
experience?: number;
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
export interface Planet {
|
|
112
|
+
uid: string;
|
|
113
|
+
name: string;
|
|
114
|
+
sector?: Sector | string;
|
|
115
|
+
system?: System | string;
|
|
116
|
+
size?: string;
|
|
117
|
+
terrain?: string;
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
}
|
|
120
|
+
export interface Sector {
|
|
121
|
+
uid: string;
|
|
122
|
+
name: string;
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
}
|
|
125
|
+
export interface System {
|
|
126
|
+
uid: string;
|
|
127
|
+
name: string;
|
|
128
|
+
sector?: Sector | string;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
}
|
|
131
|
+
export interface Station {
|
|
132
|
+
uid: string;
|
|
133
|
+
name: string;
|
|
134
|
+
system?: System | string;
|
|
135
|
+
[key: string]: unknown;
|
|
136
|
+
}
|
|
137
|
+
export interface City {
|
|
138
|
+
uid: string;
|
|
139
|
+
name: string;
|
|
140
|
+
planet?: Planet | string;
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
}
|
|
143
|
+
export interface Location {
|
|
144
|
+
x?: number;
|
|
145
|
+
y?: number;
|
|
146
|
+
z?: number;
|
|
147
|
+
system?: System | string;
|
|
148
|
+
planet?: Planet | string;
|
|
149
|
+
city?: City | string;
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
}
|
|
152
|
+
export interface Entity {
|
|
153
|
+
uid: string;
|
|
154
|
+
type: string;
|
|
155
|
+
name?: string;
|
|
156
|
+
owner?: Character | Faction | string;
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
}
|
|
159
|
+
export interface Vendor {
|
|
160
|
+
uid: string;
|
|
161
|
+
name: string;
|
|
162
|
+
owner?: Character | Faction | string;
|
|
163
|
+
location?: Location;
|
|
164
|
+
[key: string]: unknown;
|
|
165
|
+
}
|
|
166
|
+
export interface NewsItem {
|
|
167
|
+
uid: string;
|
|
168
|
+
title: string;
|
|
169
|
+
category?: string;
|
|
170
|
+
timestamp: string;
|
|
171
|
+
content?: string;
|
|
172
|
+
[key: string]: unknown;
|
|
173
|
+
}
|
|
174
|
+
export interface Event {
|
|
175
|
+
uid: string;
|
|
176
|
+
type: string;
|
|
177
|
+
timestamp: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
[key: string]: unknown;
|
|
180
|
+
}
|
|
181
|
+
export interface ListResponse<T> {
|
|
182
|
+
data: T[];
|
|
183
|
+
total?: number;
|
|
184
|
+
page?: number;
|
|
185
|
+
hasMore?: boolean;
|
|
186
|
+
}
|
|
187
|
+
export interface APIErrorResponse {
|
|
188
|
+
error: string;
|
|
189
|
+
error_description?: string;
|
|
190
|
+
message?: string;
|
|
191
|
+
[key: string]: unknown;
|
|
192
|
+
}
|
|
193
|
+
export interface GetCharacterOptions {
|
|
194
|
+
uid: string;
|
|
195
|
+
}
|
|
196
|
+
export interface GetCharacterByHandleOptions {
|
|
197
|
+
handle: string;
|
|
198
|
+
}
|
|
199
|
+
export interface ListMessagesOptions {
|
|
200
|
+
uid: string;
|
|
201
|
+
mode: MessageMode;
|
|
202
|
+
start_index?: number;
|
|
203
|
+
item_count?: number;
|
|
204
|
+
}
|
|
205
|
+
export interface GetMessageOptions {
|
|
206
|
+
uid: string;
|
|
207
|
+
messageId: string;
|
|
208
|
+
}
|
|
209
|
+
export interface DeleteMessageOptions {
|
|
210
|
+
uid: string;
|
|
211
|
+
messageId: string;
|
|
212
|
+
}
|
|
213
|
+
export interface CreateMessageOptions {
|
|
214
|
+
uid: string;
|
|
215
|
+
recipient: string;
|
|
216
|
+
subject: string;
|
|
217
|
+
body: string;
|
|
218
|
+
}
|
|
219
|
+
export interface GetCharacterSkillsOptions {
|
|
220
|
+
uid: string;
|
|
221
|
+
}
|
|
222
|
+
export interface GetCharacterPrivilegesOptions {
|
|
223
|
+
uid: string;
|
|
224
|
+
}
|
|
225
|
+
export interface GetCharacterCreditsOptions {
|
|
226
|
+
uid: string;
|
|
227
|
+
}
|
|
228
|
+
export interface GetCharacterCreditlogOptions {
|
|
229
|
+
uid: string;
|
|
230
|
+
start_index?: number;
|
|
231
|
+
item_count?: number;
|
|
232
|
+
start_id?: number;
|
|
233
|
+
}
|
|
234
|
+
export interface GetCharacterPermissionsOptions {
|
|
235
|
+
uid: string;
|
|
236
|
+
}
|
|
237
|
+
export interface GetFactionOptions {
|
|
238
|
+
uid: string;
|
|
239
|
+
}
|
|
240
|
+
export interface ListFactionMembersOptions {
|
|
241
|
+
factionId: string;
|
|
242
|
+
}
|
|
243
|
+
export interface GetFactionBudgetOptions {
|
|
244
|
+
uid: string;
|
|
245
|
+
budgetId: string;
|
|
246
|
+
}
|
|
247
|
+
export interface GetFactionCreditsOptions {
|
|
248
|
+
uid: string;
|
|
249
|
+
}
|
|
250
|
+
export interface GetPlanetOptions {
|
|
251
|
+
uid: string;
|
|
252
|
+
}
|
|
253
|
+
export interface GetSectorOptions {
|
|
254
|
+
uid: string;
|
|
255
|
+
}
|
|
256
|
+
export interface GetSystemOptions {
|
|
257
|
+
uid: string;
|
|
258
|
+
}
|
|
259
|
+
export interface GetStationOptions {
|
|
260
|
+
uid: string;
|
|
261
|
+
}
|
|
262
|
+
export interface GetCityOptions {
|
|
263
|
+
uid: string;
|
|
264
|
+
}
|
|
265
|
+
export interface GetVendorOptions {
|
|
266
|
+
uid: string;
|
|
267
|
+
}
|
|
268
|
+
export interface GetNewsItemOptions {
|
|
269
|
+
id: string;
|
|
270
|
+
}
|
|
271
|
+
export interface ListNewsOptions {
|
|
272
|
+
category?: string;
|
|
273
|
+
start_index?: number;
|
|
274
|
+
item_count?: number;
|
|
275
|
+
start_date?: number;
|
|
276
|
+
end_date?: number;
|
|
277
|
+
search?: string;
|
|
278
|
+
author?: string;
|
|
279
|
+
faction?: string;
|
|
280
|
+
faction_type?: string;
|
|
281
|
+
}
|
|
282
|
+
export interface GetEntityOptions {
|
|
283
|
+
entityType: string;
|
|
284
|
+
uid: string;
|
|
285
|
+
}
|
|
286
|
+
export interface ListInventoryEntitiesOptions {
|
|
287
|
+
uid: string;
|
|
288
|
+
entityType: string;
|
|
289
|
+
assignType: string;
|
|
290
|
+
start_index?: number;
|
|
291
|
+
item_count?: number;
|
|
292
|
+
filter_type?: string[];
|
|
293
|
+
filter_value?: string[];
|
|
294
|
+
filter_inclusion?: ('includes' | 'excludes')[];
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAMtG,oBAAY,SAAS;IACnB,iBAAiB,uBAAuB;IACxC,YAAY,kBAA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,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,UAAU,GAAG,UAAU,CAAC,EAAE,CAAC;CAChD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "swcombine-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Comprehensive TypeScript SDK for Star Wars Combine API v2.0",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.js",
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/cjs/index.js",
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"types": "./dist/types/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
|
|
22
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
23
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
24
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
25
|
+
"build:watch": "tsc -p tsconfig.esm.json --watch",
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
28
|
+
"test:watch": "vitest watch",
|
|
29
|
+
"lint": "eslint src --ext .ts",
|
|
30
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
31
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
32
|
+
"get-token": "tsx scripts/get-oauth-token.ts",
|
|
33
|
+
"get-character-uid": "tsx scripts/get-character-uid.ts",
|
|
34
|
+
"refresh-token": "tsx scripts/refresh-token.ts",
|
|
35
|
+
"prepublishOnly": "npm run build && npm test"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"swcombine",
|
|
39
|
+
"star-wars",
|
|
40
|
+
"api",
|
|
41
|
+
"sdk",
|
|
42
|
+
"oauth2",
|
|
43
|
+
"typescript"
|
|
44
|
+
],
|
|
45
|
+
"author": "Dreks Selmur <jonmarkgo@gmail.com>",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/jonmarkgo/swcombine-sdk-nodejs.git"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/jonmarkgo/swcombine-sdk-nodejs/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/jonmarkgo/swcombine-sdk-nodejs#readme",
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"axios": "^1.7.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/express": "^5.0.5",
|
|
63
|
+
"@types/node": "^20.19.25",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
65
|
+
"@typescript-eslint/parser": "^7.13.0",
|
|
66
|
+
"dotenv": "^17.2.3",
|
|
67
|
+
"eslint": "^8.57.0",
|
|
68
|
+
"express": "^5.1.0",
|
|
69
|
+
"prettier": "^3.3.0",
|
|
70
|
+
"ts-node": "^10.9.2",
|
|
71
|
+
"tsx": "^4.20.6",
|
|
72
|
+
"typescript": "^5.5.0",
|
|
73
|
+
"vitest": "^1.6.0"
|
|
74
|
+
}
|
|
75
|
+
}
|