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,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Character resource for accessing character data
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Character, Message, Skill, GetCharacterOptions, GetCharacterByHandleOptions, ListMessagesOptions, GetMessageOptions, DeleteMessageOptions, CreateMessageOptions, GetCharacterSkillsOptions, GetCharacterPrivilegesOptions, GetCharacterCreditsOptions, GetCharacterCreditlogOptions, GetCharacterPermissionsOptions } from '../types/index.js';
|
|
7
|
+
export interface Privilege {
|
|
8
|
+
name: string;
|
|
9
|
+
granted: boolean;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface Credits {
|
|
13
|
+
amount: number;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface CreditLogEntry {
|
|
17
|
+
timestamp: string;
|
|
18
|
+
amount: number;
|
|
19
|
+
balance: number;
|
|
20
|
+
description?: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Character messages resource
|
|
25
|
+
*/
|
|
26
|
+
export declare class CharacterMessagesResource extends BaseResource {
|
|
27
|
+
/**
|
|
28
|
+
* List messages sent or received by character (paginated)
|
|
29
|
+
* @param options - Character UID, message mode, and optional pagination parameters
|
|
30
|
+
* @example
|
|
31
|
+
* const messages = await client.character.messages.list({ uid: '1:12345', mode: 'received' });
|
|
32
|
+
* const moreMessages = await client.character.messages.list({ uid: '1:12345', mode: 'received', start_index: 51, item_count: 50 });
|
|
33
|
+
*/
|
|
34
|
+
list(options: ListMessagesOptions): Promise<Message[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Get a specific message
|
|
37
|
+
*/
|
|
38
|
+
get(options: GetMessageOptions): Promise<Message>;
|
|
39
|
+
/**
|
|
40
|
+
* Delete a message
|
|
41
|
+
*/
|
|
42
|
+
delete(options: DeleteMessageOptions): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Send a message
|
|
45
|
+
*/
|
|
46
|
+
create(options: CreateMessageOptions): Promise<Message>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Character skills resource
|
|
50
|
+
*/
|
|
51
|
+
export declare class CharacterSkillsResource extends BaseResource {
|
|
52
|
+
/**
|
|
53
|
+
* Get character's skills
|
|
54
|
+
*/
|
|
55
|
+
list(options: GetCharacterSkillsOptions): Promise<Skill[]>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Character privileges resource
|
|
59
|
+
*/
|
|
60
|
+
export declare class CharacterPrivilegesResource extends BaseResource {
|
|
61
|
+
/**
|
|
62
|
+
* Get character's privileges
|
|
63
|
+
*/
|
|
64
|
+
list(options: GetCharacterPrivilegesOptions): Promise<Privilege[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Get or update a specific privilege
|
|
67
|
+
*/
|
|
68
|
+
get(options: {
|
|
69
|
+
uid: string;
|
|
70
|
+
privilegeGroup: string;
|
|
71
|
+
privilege: string;
|
|
72
|
+
}): Promise<Privilege>;
|
|
73
|
+
/**
|
|
74
|
+
* Update a specific privilege
|
|
75
|
+
*/
|
|
76
|
+
update(options: {
|
|
77
|
+
uid: string;
|
|
78
|
+
privilegeGroup: string;
|
|
79
|
+
privilege: string;
|
|
80
|
+
value: boolean;
|
|
81
|
+
}): Promise<Privilege>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Character credits resource
|
|
85
|
+
*/
|
|
86
|
+
export declare class CharacterCreditsResource extends BaseResource {
|
|
87
|
+
/**
|
|
88
|
+
* Get character's credits
|
|
89
|
+
*/
|
|
90
|
+
get(options: GetCharacterCreditsOptions): Promise<Credits>;
|
|
91
|
+
/**
|
|
92
|
+
* Update character's credits (transfer)
|
|
93
|
+
*/
|
|
94
|
+
update(options: {
|
|
95
|
+
uid: string;
|
|
96
|
+
amount: number;
|
|
97
|
+
recipient?: string;
|
|
98
|
+
}): Promise<Credits>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Character credit log resource
|
|
102
|
+
*/
|
|
103
|
+
export declare class CharacterCreditlogResource extends BaseResource {
|
|
104
|
+
/**
|
|
105
|
+
* Get character's credit log (paginated)
|
|
106
|
+
* @param options - Character UID and optional pagination/filtering parameters
|
|
107
|
+
* @example
|
|
108
|
+
* const creditlog = await client.character.creditlog.list({ uid: '1:12345' });
|
|
109
|
+
* const moreLogs = await client.character.creditlog.list({ uid: '1:12345', start_index: 51, item_count: 100 });
|
|
110
|
+
* const oldestLogs = await client.character.creditlog.list({ uid: '1:12345', start_id: 1 });
|
|
111
|
+
*/
|
|
112
|
+
list(options: GetCharacterCreditlogOptions): Promise<CreditLogEntry[]>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Character permissions resource
|
|
116
|
+
*/
|
|
117
|
+
export declare class CharacterPermissionsResource extends BaseResource {
|
|
118
|
+
/**
|
|
119
|
+
* Get permissions granted to API client for this character
|
|
120
|
+
*/
|
|
121
|
+
list(options: GetCharacterPermissionsOptions): Promise<string[]>;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Character resource for managing characters
|
|
125
|
+
*/
|
|
126
|
+
export declare class CharacterResource extends BaseResource {
|
|
127
|
+
readonly messages: CharacterMessagesResource;
|
|
128
|
+
readonly skills: CharacterSkillsResource;
|
|
129
|
+
readonly privileges: CharacterPrivilegesResource;
|
|
130
|
+
readonly credits: CharacterCreditsResource;
|
|
131
|
+
readonly creditlog: CharacterCreditlogResource;
|
|
132
|
+
readonly permissions: CharacterPermissionsResource;
|
|
133
|
+
constructor(http: HttpClient);
|
|
134
|
+
/**
|
|
135
|
+
* Get the currently authenticated user's character
|
|
136
|
+
* Requires authentication
|
|
137
|
+
* @returns The authenticated character's full profile
|
|
138
|
+
*/
|
|
139
|
+
me(): Promise<Character>;
|
|
140
|
+
/**
|
|
141
|
+
* Get character by UID
|
|
142
|
+
*/
|
|
143
|
+
get(options: GetCharacterOptions): Promise<Character>;
|
|
144
|
+
/**
|
|
145
|
+
* Get character UID by handle (username)
|
|
146
|
+
*/
|
|
147
|
+
getByHandle(options: GetCharacterByHandleOptions): Promise<{
|
|
148
|
+
uid: string;
|
|
149
|
+
}>;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=CharacterResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterResource.d.ts","sourceRoot":"","sources":["../../../src/resources/CharacterResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,E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OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAGlF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Datacard resource for managing datacards
|
|
3
|
+
*/
|
|
4
|
+
import { BaseResource } from './BaseResource.js';
|
|
5
|
+
export interface Datacard {
|
|
6
|
+
uid: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Datacard resource for managing datacards
|
|
13
|
+
*/
|
|
14
|
+
export declare class DatacardResource extends BaseResource {
|
|
15
|
+
/**
|
|
16
|
+
* List datacards owned by faction
|
|
17
|
+
*/
|
|
18
|
+
list(options: {
|
|
19
|
+
factionId: string;
|
|
20
|
+
}): Promise<Datacard[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get specific datacard
|
|
23
|
+
*/
|
|
24
|
+
get(options: {
|
|
25
|
+
uid: string;
|
|
26
|
+
}): Promise<Datacard>;
|
|
27
|
+
/**
|
|
28
|
+
* Create datacard
|
|
29
|
+
*/
|
|
30
|
+
create(options: {
|
|
31
|
+
factionId: string;
|
|
32
|
+
name: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
}): Promise<Datacard>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete datacard
|
|
37
|
+
*/
|
|
38
|
+
delete(options: {
|
|
39
|
+
uid: string;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=DatacardResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatacardResource.d.ts","sourceRoot":"","sources":["../../../src/resources/DatacardResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI/D;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItD;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQnG;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events resource for accessing event data
|
|
3
|
+
*/
|
|
4
|
+
import { BaseResource } from './BaseResource.js';
|
|
5
|
+
import { Event } from '../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Events resource for querying events
|
|
8
|
+
*/
|
|
9
|
+
export declare class EventsResource extends BaseResource {
|
|
10
|
+
/**
|
|
11
|
+
* List events by type and mode (paginated)
|
|
12
|
+
* @param options - Event mode, event type, and optional pagination/filtering parameters
|
|
13
|
+
* @example
|
|
14
|
+
* const events = await client.events.list({ eventMode: 'personal', eventType: 'all' });
|
|
15
|
+
* const moreEvents = await client.events.list({ eventMode: 'personal', eventType: 'all', start_index: 50, item_count: 50 });
|
|
16
|
+
* const recentEvents = await client.events.list({ eventMode: 'personal', eventType: 'all', start_time: 1640000000 });
|
|
17
|
+
* const factionEvents = await client.events.list({ eventMode: 'faction', eventType: 'all', faction_id: '20:123' });
|
|
18
|
+
*/
|
|
19
|
+
list(options: {
|
|
20
|
+
eventMode: string;
|
|
21
|
+
eventType: string;
|
|
22
|
+
start_index?: number;
|
|
23
|
+
item_count?: number;
|
|
24
|
+
start_time?: number;
|
|
25
|
+
faction_id?: string;
|
|
26
|
+
}): Promise<Event[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Get specific event
|
|
29
|
+
*/
|
|
30
|
+
get(options: {
|
|
31
|
+
uid: string;
|
|
32
|
+
}): Promise<Event>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=EventsResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventsResource.d.ts","sourceRoot":"","sources":["../../../src/resources/EventsResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;;;;;;OAQG;IACG,IAAI,CAAC,OAAO,EAAE;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAgBpB;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,CAAC;CAGpD"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Faction resource for accessing faction data
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Faction, Character, GetFactionOptions } from '../types/index.js';
|
|
7
|
+
export interface FactionMember {
|
|
8
|
+
character: Character | string;
|
|
9
|
+
rank?: string;
|
|
10
|
+
joinDate?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface Budget {
|
|
14
|
+
uid: string;
|
|
15
|
+
name: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface Stockholder {
|
|
20
|
+
character: Character | string;
|
|
21
|
+
shares: number;
|
|
22
|
+
percentage: number;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface FactionCredits {
|
|
26
|
+
amount: number;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface CreditLogEntry {
|
|
30
|
+
timestamp: string;
|
|
31
|
+
amount: number;
|
|
32
|
+
balance: number;
|
|
33
|
+
description?: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Faction members resource
|
|
38
|
+
*/
|
|
39
|
+
export declare class FactionMembersResource extends BaseResource {
|
|
40
|
+
/**
|
|
41
|
+
* List faction members (paginated)
|
|
42
|
+
* @param options - Faction ID and optional pagination parameters
|
|
43
|
+
* @example
|
|
44
|
+
* const members = await client.faction.members.list({ factionId: '20:123' });
|
|
45
|
+
* const moreMembers = await client.faction.members.list({ factionId: '20:123', start_index: 51, item_count: 50 });
|
|
46
|
+
*/
|
|
47
|
+
list(options: {
|
|
48
|
+
factionId: string;
|
|
49
|
+
start_index?: number;
|
|
50
|
+
item_count?: number;
|
|
51
|
+
}): Promise<FactionMember[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Add or update faction member
|
|
54
|
+
*/
|
|
55
|
+
update(options: {
|
|
56
|
+
factionId: string;
|
|
57
|
+
characterId: string;
|
|
58
|
+
rank?: string;
|
|
59
|
+
}): Promise<FactionMember>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Faction budgets resource
|
|
63
|
+
*/
|
|
64
|
+
export declare class FactionBudgetsResource extends BaseResource {
|
|
65
|
+
/**
|
|
66
|
+
* List faction budgets (paginated)
|
|
67
|
+
* @param options - Faction ID and optional pagination parameters
|
|
68
|
+
* @example
|
|
69
|
+
* const budgets = await client.faction.budgets.list({ factionId: '20:123' });
|
|
70
|
+
* const moreBudgets = await client.faction.budgets.list({ factionId: '20:123', start_index: 51, item_count: 50 });
|
|
71
|
+
*/
|
|
72
|
+
list(options: {
|
|
73
|
+
factionId: string;
|
|
74
|
+
start_index?: number;
|
|
75
|
+
item_count?: number;
|
|
76
|
+
}): Promise<Budget[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Get specific budget
|
|
79
|
+
*/
|
|
80
|
+
get(options: {
|
|
81
|
+
factionId: string;
|
|
82
|
+
budgetId: string;
|
|
83
|
+
}): Promise<Budget>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Faction stockholders resource
|
|
87
|
+
*/
|
|
88
|
+
export declare class FactionStockholdersResource extends BaseResource {
|
|
89
|
+
/**
|
|
90
|
+
* List faction stockholders (paginated)
|
|
91
|
+
* @param options - Faction ID and optional pagination parameters
|
|
92
|
+
* @example
|
|
93
|
+
* const stockholders = await client.faction.stockholders.list({ factionId: '20:123' });
|
|
94
|
+
* const moreStockholders = await client.faction.stockholders.list({ factionId: '20:123', start_index: 51, item_count: 50 });
|
|
95
|
+
*/
|
|
96
|
+
list(options: {
|
|
97
|
+
factionId: string;
|
|
98
|
+
start_index?: number;
|
|
99
|
+
item_count?: number;
|
|
100
|
+
}): Promise<Stockholder[]>;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Faction credits resource
|
|
104
|
+
*/
|
|
105
|
+
export declare class FactionCreditsResource extends BaseResource {
|
|
106
|
+
/**
|
|
107
|
+
* Get faction credits
|
|
108
|
+
*/
|
|
109
|
+
get(options: {
|
|
110
|
+
factionId: string;
|
|
111
|
+
}): Promise<FactionCredits>;
|
|
112
|
+
/**
|
|
113
|
+
* Transfer faction credits
|
|
114
|
+
*/
|
|
115
|
+
update(options: {
|
|
116
|
+
factionId: string;
|
|
117
|
+
amount: number;
|
|
118
|
+
recipient?: string;
|
|
119
|
+
}): Promise<FactionCredits>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Faction credit log resource
|
|
123
|
+
*/
|
|
124
|
+
export declare class FactionCreditlogResource extends BaseResource {
|
|
125
|
+
/**
|
|
126
|
+
* Get faction credit log (paginated)
|
|
127
|
+
* @param options - Faction ID and optional pagination/filtering parameters
|
|
128
|
+
* @example
|
|
129
|
+
* const creditlog = await client.faction.creditlog.list({ factionId: '20:123' });
|
|
130
|
+
* const moreLogs = await client.faction.creditlog.list({ factionId: '20:123', start_index: 51, item_count: 100 });
|
|
131
|
+
* const oldestLogs = await client.faction.creditlog.list({ factionId: '20:123', start_id: 1 });
|
|
132
|
+
*/
|
|
133
|
+
list(options: {
|
|
134
|
+
factionId: string;
|
|
135
|
+
start_index?: number;
|
|
136
|
+
item_count?: number;
|
|
137
|
+
start_id?: number;
|
|
138
|
+
}): Promise<CreditLogEntry[]>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Faction resource for managing factions
|
|
142
|
+
*/
|
|
143
|
+
export declare class FactionResource extends BaseResource {
|
|
144
|
+
readonly members: FactionMembersResource;
|
|
145
|
+
readonly budgets: FactionBudgetsResource;
|
|
146
|
+
readonly stockholders: FactionStockholdersResource;
|
|
147
|
+
readonly credits: FactionCreditsResource;
|
|
148
|
+
readonly creditlog: FactionCreditlogResource;
|
|
149
|
+
constructor(http: HttpClient);
|
|
150
|
+
/**
|
|
151
|
+
* Get faction by UID
|
|
152
|
+
*/
|
|
153
|
+
get(options: GetFactionOptions): Promise<Faction>;
|
|
154
|
+
/**
|
|
155
|
+
* List all factions (paginated)
|
|
156
|
+
* @param options - Optional pagination parameters
|
|
157
|
+
* @example
|
|
158
|
+
* const factions = await client.faction.list();
|
|
159
|
+
* const moreFactions = await client.faction.list({ start_index: 51, item_count: 50 });
|
|
160
|
+
*/
|
|
161
|
+
list(options?: {
|
|
162
|
+
start_index?: number;
|
|
163
|
+
item_count?: number;
|
|
164
|
+
}): Promise<Faction[]>;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=FactionResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactionResource.d.ts","sourceRoot":"","sources":["../../../src/resources/FactionResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MA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|
+
/**
|
|
2
|
+
* Galaxy resource for accessing galactic data
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Planet, Sector, System, Station, City, GetPlanetOptions, GetSectorOptions, GetSystemOptions, GetStationOptions, GetCityOptions } from '../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Galaxy planets resource
|
|
9
|
+
*/
|
|
10
|
+
export declare class GalaxyPlanetsResource extends BaseResource {
|
|
11
|
+
/**
|
|
12
|
+
* List all planets (paginated)
|
|
13
|
+
* @param options - Optional pagination parameters
|
|
14
|
+
* @example
|
|
15
|
+
* const planets = await client.galaxy.planets.list();
|
|
16
|
+
* const morePlanets = await client.galaxy.planets.list({ start_index: 51, item_count: 50 });
|
|
17
|
+
*/
|
|
18
|
+
list(options?: {
|
|
19
|
+
start_index?: number;
|
|
20
|
+
item_count?: number;
|
|
21
|
+
}): Promise<Planet[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Get planet by UID
|
|
24
|
+
*/
|
|
25
|
+
get(options: GetPlanetOptions): Promise<Planet>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Galaxy sectors resource
|
|
29
|
+
*/
|
|
30
|
+
export declare class GalaxySectorsResource extends BaseResource {
|
|
31
|
+
/**
|
|
32
|
+
* List all sectors (paginated)
|
|
33
|
+
* @param options - Optional pagination parameters
|
|
34
|
+
* @example
|
|
35
|
+
* const sectors = await client.galaxy.sectors.list();
|
|
36
|
+
* const moreSectors = await client.galaxy.sectors.list({ start_index: 51, item_count: 50 });
|
|
37
|
+
*/
|
|
38
|
+
list(options?: {
|
|
39
|
+
start_index?: number;
|
|
40
|
+
item_count?: number;
|
|
41
|
+
}): Promise<Sector[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Get sector by name or UID
|
|
44
|
+
* @param options - Sector identifier (use lowercase sector name, e.g., 'seswenna')
|
|
45
|
+
* @example
|
|
46
|
+
* const sector = await client.galaxy.sectors.get({ uid: 'seswenna' });
|
|
47
|
+
*/
|
|
48
|
+
get(options: GetSectorOptions): Promise<Sector>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Galaxy systems resource
|
|
52
|
+
*/
|
|
53
|
+
export declare class GalaxySystemsResource extends BaseResource {
|
|
54
|
+
/**
|
|
55
|
+
* List all systems (paginated)
|
|
56
|
+
* @param options - Optional pagination parameters
|
|
57
|
+
* @example
|
|
58
|
+
* const systems = await client.galaxy.systems.list();
|
|
59
|
+
* const moreSystems = await client.galaxy.systems.list({ start_index: 51, item_count: 50 });
|
|
60
|
+
*/
|
|
61
|
+
list(options?: {
|
|
62
|
+
start_index?: number;
|
|
63
|
+
item_count?: number;
|
|
64
|
+
}): Promise<System[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Get system by UID
|
|
67
|
+
*/
|
|
68
|
+
get(options: GetSystemOptions): Promise<System>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Galaxy stations resource
|
|
72
|
+
*/
|
|
73
|
+
export declare class GalaxyStationsResource extends BaseResource {
|
|
74
|
+
/**
|
|
75
|
+
* List all stations in named systems with no ECM (paginated)
|
|
76
|
+
* @param options - Optional pagination parameters
|
|
77
|
+
* @example
|
|
78
|
+
* const stations = await client.galaxy.stations.list();
|
|
79
|
+
* const moreStations = await client.galaxy.stations.list({ start_index: 51, item_count: 50 });
|
|
80
|
+
*/
|
|
81
|
+
list(options?: {
|
|
82
|
+
start_index?: number;
|
|
83
|
+
item_count?: number;
|
|
84
|
+
}): Promise<Station[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Get station by UID
|
|
87
|
+
*/
|
|
88
|
+
get(options: GetStationOptions): Promise<Station>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Galaxy cities resource
|
|
92
|
+
*/
|
|
93
|
+
export declare class GalaxyCitiesResource extends BaseResource {
|
|
94
|
+
/**
|
|
95
|
+
* List all cities (paginated)
|
|
96
|
+
* @param options - Optional pagination parameters
|
|
97
|
+
* @example
|
|
98
|
+
* const cities = await client.galaxy.cities.list();
|
|
99
|
+
* const moreCities = await client.galaxy.cities.list({ start_index: 51, item_count: 50 });
|
|
100
|
+
*/
|
|
101
|
+
list(options?: {
|
|
102
|
+
start_index?: number;
|
|
103
|
+
item_count?: number;
|
|
104
|
+
}): Promise<City[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Get city by UID
|
|
107
|
+
*/
|
|
108
|
+
get(options: GetCityOptions): Promise<City>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Galaxy resource for accessing galactic information
|
|
112
|
+
*/
|
|
113
|
+
export declare class GalaxyResource extends BaseResource {
|
|
114
|
+
readonly planets: GalaxyPlanetsResource;
|
|
115
|
+
readonly sectors: GalaxySectorsResource;
|
|
116
|
+
readonly systems: GalaxySystemsResource;
|
|
117
|
+
readonly stations: GalaxyStationsResource;
|
|
118
|
+
readonly cities: GalaxyCitiesResource;
|
|
119
|
+
constructor(http: HttpClient);
|
|
120
|
+
/**
|
|
121
|
+
* Extract unique sectors from systems list
|
|
122
|
+
* This is a helper method since the API doesn't provide a direct sectors list endpoint
|
|
123
|
+
* @returns Array of unique sector information extracted from systems
|
|
124
|
+
* @example
|
|
125
|
+
* const sectorsData = await client.galaxy.getSectorsFromSystems();
|
|
126
|
+
* // Returns: [{ uid: '25:160', name: 'Seswenna', href: '...' }, ...]
|
|
127
|
+
*/
|
|
128
|
+
getSectorsFromSystems(): Promise<Array<{
|
|
129
|
+
uid: string;
|
|
130
|
+
name: string;
|
|
131
|
+
href?: string;
|
|
132
|
+
}>>;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=GalaxyResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalaxyResource.d.ts","sourceRoot":"","sources":["../../../src/resources/GalaxyResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,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AAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQvF;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;CAGxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,YAAY;IACpD;;;;;;OAMG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAQpF;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C,SAAgB,OAAO,EAAE,qBAAqB,CAAC;IAC/C,SAAgB,OAAO,EAAE,qBAAqB,CAAC;IAC/C,SAAgB,OAAO,EAAE,qBAAqB,CAAC;IAC/C,SAAgB,QAAQ,EAAE,sBAAsB,CAAC;IACjD,SAAgB,MAAM,EAAE,oBAAoB,CAAC;gBAEjC,IAAI,EAAE,UAAU;IAS5B;;;;;;;OAOG;IACG,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAyB5F"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inventory resource for managing entities
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from '../http/HttpClient.js';
|
|
5
|
+
import { BaseResource } from './BaseResource.js';
|
|
6
|
+
import { Entity, GetEntityOptions, ListInventoryEntitiesOptions } from '../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Inventory entities resource
|
|
9
|
+
*/
|
|
10
|
+
export declare class InventoryEntitiesResource extends BaseResource {
|
|
11
|
+
/**
|
|
12
|
+
* List entities in inventory (paginated with optional filtering)
|
|
13
|
+
* @param options - Inventory UID, entity type, assign type, and optional pagination/filtering parameters
|
|
14
|
+
* @example
|
|
15
|
+
* const entities = await client.inventory.entities.list({ uid: '1:12345', entityType: 'vehicle', assignType: 'pilot' });
|
|
16
|
+
* const moreEntities = await client.inventory.entities.list({ uid: '1:12345', entityType: 'vehicle', assignType: 'pilot', start_index: 51, item_count: 100 });
|
|
17
|
+
* const filteredEntities = await client.inventory.entities.list({
|
|
18
|
+
* uid: '1:12345',
|
|
19
|
+
* entityType: 'vehicle',
|
|
20
|
+
* assignType: 'pilot',
|
|
21
|
+
* filter_type: ['hp'],
|
|
22
|
+
* filter_value: ['100'],
|
|
23
|
+
* filter_inclusion: ['includes']
|
|
24
|
+
* });
|
|
25
|
+
*/
|
|
26
|
+
list(options: ListInventoryEntitiesOptions): Promise<Entity[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Get specific entity
|
|
29
|
+
*/
|
|
30
|
+
get(options: GetEntityOptions): Promise<Entity>;
|
|
31
|
+
/**
|
|
32
|
+
* Update entity property
|
|
33
|
+
*/
|
|
34
|
+
updateProperty(options: {
|
|
35
|
+
entityType: string;
|
|
36
|
+
uid: string;
|
|
37
|
+
property: string;
|
|
38
|
+
value: any;
|
|
39
|
+
}): Promise<Entity>;
|
|
40
|
+
/**
|
|
41
|
+
* Add tag to entity
|
|
42
|
+
*/
|
|
43
|
+
addTag(options: {
|
|
44
|
+
entityType: string;
|
|
45
|
+
uid: string;
|
|
46
|
+
tag: string;
|
|
47
|
+
}): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Remove tag from entity
|
|
50
|
+
*/
|
|
51
|
+
removeTag(options: {
|
|
52
|
+
entityType: string;
|
|
53
|
+
uid: string;
|
|
54
|
+
tag: string;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Remove all tags from entity
|
|
58
|
+
*/
|
|
59
|
+
removeAllTags(options: {
|
|
60
|
+
entityType: string;
|
|
61
|
+
uid: string;
|
|
62
|
+
}): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Inventory resource for managing inventories
|
|
66
|
+
*/
|
|
67
|
+
export declare class InventoryResource extends BaseResource {
|
|
68
|
+
readonly entities: InventoryEntitiesResource;
|
|
69
|
+
constructor(http: HttpClient);
|
|
70
|
+
/**
|
|
71
|
+
* Get inventory by UID
|
|
72
|
+
*/
|
|
73
|
+
get(options: {
|
|
74
|
+
uid: string;
|
|
75
|
+
}): Promise<any>;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=InventoryResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InventoryResource.d.ts","sourceRoot":"","sources":["../../../src/resources/InventoryResource.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,4BAA4B,EAAe,MAAM,mBAAmB,CAAC;AAExG;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,YAAY;IACzD;;;;;;;;;;;;;;OAcG;IACG,IAAI,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAuBpE;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrD;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE;QAC5B,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,GAAG,CAAC;KACZ,GAAG,OAAO,CAAC,MAAM,CAAC;IAWnB;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAOtF;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAOzF;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjF;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,SAAgB,QAAQ,EAAE,yBAAyB,CAAC;gBAExC,IAAI,EAAE,UAAU;IAK5B;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAGlD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Location resource for accessing entity locations
|
|
3
|
+
*/
|
|
4
|
+
import { BaseResource } from './BaseResource.js';
|
|
5
|
+
import { Location } from '../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Location resource for querying entity locations
|
|
8
|
+
*/
|
|
9
|
+
export declare class LocationResource extends BaseResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get entity location
|
|
12
|
+
*/
|
|
13
|
+
get(options: {
|
|
14
|
+
entityType: string;
|
|
15
|
+
uid: string;
|
|
16
|
+
}): Promise<Location>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=LocationResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationResource.d.ts","sourceRoot":"","sources":["../../../src/resources/LocationResource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;CAG3E"}
|