@meowpanel/api 0.1.0-alpha.11 → 1.0.0-beta.2
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 +1 -1
- package/README.md +40 -0
- package/esm/mod.d.ts +87 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +85 -1
- package/esm/src/client.d.ts +248 -0
- package/esm/src/client.d.ts.map +1 -0
- package/esm/src/client.js +235 -0
- package/esm/src/emitter.d.ts +53 -0
- package/esm/src/emitter.d.ts.map +1 -0
- package/esm/src/emitter.js +55 -0
- package/esm/src/errors.d.ts +42 -0
- package/esm/src/errors.d.ts.map +1 -0
- package/esm/src/errors.js +45 -0
- package/esm/src/http.d.ts +157 -0
- package/esm/src/http.d.ts.map +1 -0
- package/esm/src/http.js +317 -0
- package/esm/src/namespace.d.ts +59 -0
- package/esm/src/namespace.d.ts.map +1 -0
- package/esm/src/namespace.js +79 -0
- package/esm/src/reactive.d.ts +29 -0
- package/esm/src/reactive.d.ts.map +1 -0
- package/esm/src/reactive.js +35 -0
- package/esm/src/resources/account.d.ts +125 -0
- package/esm/src/resources/account.d.ts.map +1 -0
- package/esm/src/resources/account.js +151 -0
- package/esm/src/resources/api-keys.d.ts +116 -0
- package/esm/src/resources/api-keys.d.ts.map +1 -0
- package/esm/src/resources/api-keys.js +105 -0
- package/esm/src/resources/auth.d.ts +57 -0
- package/esm/src/resources/auth.d.ts.map +1 -0
- package/esm/src/resources/auth.js +39 -0
- package/esm/src/resources/eggs.d.ts +238 -0
- package/esm/src/resources/eggs.d.ts.map +1 -0
- package/esm/src/resources/eggs.js +187 -0
- package/esm/src/resources/hosts.d.ts +62 -0
- package/esm/src/resources/hosts.d.ts.map +1 -0
- package/esm/src/resources/hosts.js +62 -0
- package/esm/src/resources/members.d.ts +138 -0
- package/esm/src/resources/members.d.ts.map +1 -0
- package/esm/src/resources/members.js +122 -0
- package/esm/src/resources/nodes.d.ts +397 -0
- package/esm/src/resources/nodes.d.ts.map +1 -0
- package/esm/src/resources/nodes.js +352 -0
- package/esm/src/resources/server-groups.d.ts +150 -0
- package/esm/src/resources/server-groups.d.ts.map +1 -0
- package/esm/src/resources/server-groups.js +111 -0
- package/esm/src/resources/servers/activity.d.ts +120 -0
- package/esm/src/resources/servers/activity.d.ts.map +1 -0
- package/esm/src/resources/servers/activity.js +163 -0
- package/esm/src/resources/servers/allocations.d.ts +125 -0
- package/esm/src/resources/servers/allocations.d.ts.map +1 -0
- package/esm/src/resources/servers/allocations.js +137 -0
- package/esm/src/resources/servers/connection.d.ts +108 -0
- package/esm/src/resources/servers/connection.d.ts.map +1 -0
- package/esm/src/resources/servers/connection.js +169 -0
- package/esm/src/resources/servers/files.d.ts +164 -0
- package/esm/src/resources/servers/files.d.ts.map +1 -0
- package/esm/src/resources/servers/files.js +281 -0
- package/esm/src/resources/servers/index.d.ts +126 -0
- package/esm/src/resources/servers/index.d.ts.map +1 -0
- package/esm/src/resources/servers/index.js +135 -0
- package/esm/src/resources/servers/profiles.d.ts +138 -0
- package/esm/src/resources/servers/profiles.d.ts.map +1 -0
- package/esm/src/resources/servers/profiles.js +177 -0
- package/esm/src/resources/servers/server.d.ts +136 -0
- package/esm/src/resources/servers/server.d.ts.map +1 -0
- package/esm/src/resources/servers/server.js +202 -0
- package/esm/src/resources/servers/sftp.d.ts +147 -0
- package/esm/src/resources/servers/sftp.d.ts.map +1 -0
- package/esm/src/resources/servers/sftp.js +153 -0
- package/esm/src/resources/servers/types.d.ts +199 -0
- package/esm/src/resources/servers/types.d.ts.map +1 -0
- package/esm/src/resources/servers/types.js +1 -0
- package/esm/src/sse.d.ts +53 -0
- package/esm/src/sse.d.ts.map +1 -0
- package/esm/src/sse.js +133 -0
- package/esm/src/types.d.ts +126 -0
- package/esm/src/types.d.ts.map +1 -0
- package/esm/src/types.js +21 -0
- package/package.json +4 -92
- package/script/mod.d.ts +87 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +132 -3
- package/script/src/client.d.ts +248 -0
- package/script/src/client.d.ts.map +1 -0
- package/script/src/client.js +239 -0
- package/script/src/emitter.d.ts +53 -0
- package/script/src/emitter.d.ts.map +1 -0
- package/script/src/emitter.js +59 -0
- package/script/src/errors.d.ts +42 -0
- package/script/src/errors.d.ts.map +1 -0
- package/script/src/errors.js +49 -0
- package/script/src/http.d.ts +157 -0
- package/script/src/http.d.ts.map +1 -0
- package/script/src/http.js +321 -0
- package/script/src/namespace.d.ts +59 -0
- package/script/src/namespace.d.ts.map +1 -0
- package/script/src/namespace.js +83 -0
- package/script/src/reactive.d.ts +29 -0
- package/script/src/reactive.d.ts.map +1 -0
- package/script/src/reactive.js +39 -0
- package/script/src/resources/account.d.ts +125 -0
- package/script/src/resources/account.d.ts.map +1 -0
- package/script/src/resources/account.js +158 -0
- package/script/src/resources/api-keys.d.ts +116 -0
- package/script/src/resources/api-keys.d.ts.map +1 -0
- package/script/src/resources/api-keys.js +110 -0
- package/script/src/resources/auth.d.ts +57 -0
- package/script/src/resources/auth.d.ts.map +1 -0
- package/script/src/resources/auth.js +43 -0
- package/script/src/resources/eggs.d.ts +238 -0
- package/script/src/resources/eggs.d.ts.map +1 -0
- package/script/src/resources/eggs.js +193 -0
- package/script/src/resources/hosts.d.ts +62 -0
- package/script/src/resources/hosts.d.ts.map +1 -0
- package/script/src/resources/hosts.js +67 -0
- package/script/src/resources/members.d.ts +138 -0
- package/script/src/resources/members.d.ts.map +1 -0
- package/script/src/resources/members.js +127 -0
- package/script/src/resources/nodes.d.ts +397 -0
- package/script/src/resources/nodes.d.ts.map +1 -0
- package/script/src/resources/nodes.js +362 -0
- package/script/src/resources/server-groups.d.ts +150 -0
- package/script/src/resources/server-groups.d.ts.map +1 -0
- package/script/src/resources/server-groups.js +116 -0
- package/script/src/resources/servers/activity.d.ts +120 -0
- package/script/src/resources/servers/activity.d.ts.map +1 -0
- package/script/src/resources/servers/activity.js +170 -0
- package/script/src/resources/servers/allocations.d.ts +125 -0
- package/script/src/resources/servers/allocations.d.ts.map +1 -0
- package/script/src/resources/servers/allocations.js +142 -0
- package/script/src/resources/servers/connection.d.ts +108 -0
- package/script/src/resources/servers/connection.d.ts.map +1 -0
- package/script/src/resources/servers/connection.js +173 -0
- package/script/src/resources/servers/files.d.ts +164 -0
- package/script/src/resources/servers/files.d.ts.map +1 -0
- package/script/src/resources/servers/files.js +286 -0
- package/script/src/resources/servers/index.d.ts +126 -0
- package/script/src/resources/servers/index.d.ts.map +1 -0
- package/script/src/resources/servers/index.js +139 -0
- package/script/src/resources/servers/profiles.d.ts +138 -0
- package/script/src/resources/servers/profiles.d.ts.map +1 -0
- package/script/src/resources/servers/profiles.js +182 -0
- package/script/src/resources/servers/server.d.ts +136 -0
- package/script/src/resources/servers/server.d.ts.map +1 -0
- package/script/src/resources/servers/server.js +206 -0
- package/script/src/resources/servers/sftp.d.ts +147 -0
- package/script/src/resources/servers/sftp.d.ts.map +1 -0
- package/script/src/resources/servers/sftp.js +158 -0
- package/script/src/resources/servers/types.d.ts +199 -0
- package/script/src/resources/servers/types.d.ts.map +1 -0
- package/script/src/resources/servers/types.js +2 -0
- package/script/src/sse.d.ts +53 -0
- package/script/src/sse.d.ts.map +1 -0
- package/script/src/sse.js +137 -0
- package/script/src/types.d.ts +126 -0
- package/script/src/types.d.ts.map +1 -0
- package/script/src/types.js +25 -0
- package/esm/api.d.ts +0 -76
- package/esm/api.d.ts.map +0 -1
- package/esm/api.js +0 -187
- package/esm/components/auth.d.ts +0 -15
- package/esm/components/auth.d.ts.map +0 -1
- package/esm/components/auth.js +0 -13
- package/esm/components/connection/abstract.d.ts +0 -23
- package/esm/components/connection/abstract.d.ts.map +0 -1
- package/esm/components/connection/abstract.js +0 -43
- package/esm/components/connection/sse.d.ts +0 -20
- package/esm/components/connection/sse.d.ts.map +0 -1
- package/esm/components/connection/sse.js +0 -65
- package/esm/components/egg/egg.d.ts +0 -32
- package/esm/components/egg/egg.d.ts.map +0 -1
- package/esm/components/egg/egg.js +0 -70
- package/esm/components/group.d.ts +0 -14
- package/esm/components/group.d.ts.map +0 -1
- package/esm/components/group.js +0 -33
- package/esm/components/member_2.d.ts +0 -69
- package/esm/components/member_2.d.ts.map +0 -1
- package/esm/components/member_2.js +0 -140
- package/esm/components/node.d.ts +0 -78
- package/esm/components/node.d.ts.map +0 -1
- package/esm/components/node.js +0 -342
- package/esm/components/server/activity.d.ts +0 -45
- package/esm/components/server/activity.d.ts.map +0 -1
- package/esm/components/server/activity.js +0 -158
- package/esm/components/server/allocations.d.ts +0 -45
- package/esm/components/server/allocations.d.ts.map +0 -1
- package/esm/components/server/allocations.js +0 -146
- package/esm/components/server/files.d.ts +0 -50
- package/esm/components/server/files.d.ts.map +0 -1
- package/esm/components/server/files.js +0 -90
- package/esm/components/server/power.d.ts +0 -21
- package/esm/components/server/power.d.ts.map +0 -1
- package/esm/components/server/power.js +0 -43
- package/esm/components/server/profiles.d.ts +0 -63
- package/esm/components/server/profiles.d.ts.map +0 -1
- package/esm/components/server/profiles.js +0 -163
- package/esm/components/server/server.d.ts +0 -141
- package/esm/components/server/server.d.ts.map +0 -1
- package/esm/components/server/server.js +0 -358
- package/esm/components/server/sftp.d.ts +0 -31
- package/esm/components/server/sftp.d.ts.map +0 -1
- package/esm/components/server/sftp.js +0 -84
- package/esm/components/server/startup.d.ts +0 -17
- package/esm/components/server/startup.d.ts.map +0 -1
- package/esm/components/server/startup.js +0 -21
- package/esm/components/server/stats.d.ts +0 -19
- package/esm/components/server/stats.d.ts.map +0 -1
- package/esm/components/server/stats.js +0 -46
- package/esm/utils/cache.d.ts +0 -20
- package/esm/utils/cache.d.ts.map +0 -1
- package/esm/utils/cache.js +0 -66
- package/esm/utils/event.d.ts +0 -38
- package/esm/utils/event.d.ts.map +0 -1
- package/esm/utils/event.js +0 -71
- package/esm/utils/object.d.ts +0 -58
- package/esm/utils/object.d.ts.map +0 -1
- package/esm/utils/object.js +0 -86
- package/esm/utils/subscribe.d.ts +0 -37
- package/esm/utils/subscribe.d.ts.map +0 -1
- package/esm/utils/subscribe.js +0 -29
- package/esm/utils/timer.d.ts +0 -13
- package/esm/utils/timer.d.ts.map +0 -1
- package/esm/utils/timer.js +0 -32
- package/esm/utils/units.d.ts +0 -18
- package/esm/utils/units.d.ts.map +0 -1
- package/esm/utils/units.js +0 -82
- package/script/api.d.ts +0 -76
- package/script/api.d.ts.map +0 -1
- package/script/api.js +0 -192
- package/script/components/auth.d.ts +0 -15
- package/script/components/auth.d.ts.map +0 -1
- package/script/components/auth.js +0 -17
- package/script/components/connection/abstract.d.ts +0 -23
- package/script/components/connection/abstract.d.ts.map +0 -1
- package/script/components/connection/abstract.js +0 -47
- package/script/components/connection/sse.d.ts +0 -20
- package/script/components/connection/sse.d.ts.map +0 -1
- package/script/components/connection/sse.js +0 -69
- package/script/components/egg/egg.d.ts +0 -32
- package/script/components/egg/egg.d.ts.map +0 -1
- package/script/components/egg/egg.js +0 -74
- package/script/components/group.d.ts +0 -14
- package/script/components/group.d.ts.map +0 -1
- package/script/components/group.js +0 -37
- package/script/components/member_2.d.ts +0 -69
- package/script/components/member_2.d.ts.map +0 -1
- package/script/components/member_2.js +0 -146
- package/script/components/node.d.ts +0 -78
- package/script/components/node.d.ts.map +0 -1
- package/script/components/node.js +0 -349
- package/script/components/server/activity.d.ts +0 -45
- package/script/components/server/activity.d.ts.map +0 -1
- package/script/components/server/activity.js +0 -164
- package/script/components/server/allocations.d.ts +0 -45
- package/script/components/server/allocations.d.ts.map +0 -1
- package/script/components/server/allocations.js +0 -152
- package/script/components/server/files.d.ts +0 -50
- package/script/components/server/files.d.ts.map +0 -1
- package/script/components/server/files.js +0 -94
- package/script/components/server/power.d.ts +0 -21
- package/script/components/server/power.d.ts.map +0 -1
- package/script/components/server/power.js +0 -47
- package/script/components/server/profiles.d.ts +0 -63
- package/script/components/server/profiles.d.ts.map +0 -1
- package/script/components/server/profiles.js +0 -168
- package/script/components/server/server.d.ts +0 -141
- package/script/components/server/server.d.ts.map +0 -1
- package/script/components/server/server.js +0 -362
- package/script/components/server/sftp.d.ts +0 -31
- package/script/components/server/sftp.d.ts.map +0 -1
- package/script/components/server/sftp.js +0 -88
- package/script/components/server/startup.d.ts +0 -17
- package/script/components/server/startup.d.ts.map +0 -1
- package/script/components/server/startup.js +0 -25
- package/script/components/server/stats.d.ts +0 -19
- package/script/components/server/stats.d.ts.map +0 -1
- package/script/components/server/stats.js +0 -50
- package/script/utils/cache.d.ts +0 -20
- package/script/utils/cache.d.ts.map +0 -1
- package/script/utils/cache.js +0 -70
- package/script/utils/event.d.ts +0 -38
- package/script/utils/event.d.ts.map +0 -1
- package/script/utils/event.js +0 -75
- package/script/utils/object.d.ts +0 -58
- package/script/utils/object.d.ts.map +0 -1
- package/script/utils/object.js +0 -90
- package/script/utils/subscribe.d.ts +0 -37
- package/script/utils/subscribe.d.ts.map +0 -1
- package/script/utils/subscribe.js +0 -32
- package/script/utils/timer.d.ts +0 -13
- package/script/utils/timer.d.ts.map +0 -1
- package/script/utils/timer.js +0 -36
- package/script/utils/units.d.ts +0 -18
- package/script/utils/units.d.ts.map +0 -1
- package/script/utils/units.js +0 -86
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import { ResourceNamespace } from '../namespace.js';
|
|
3
|
+
import { ReactiveResource } from '../reactive.js';
|
|
4
|
+
import type { IncludeOptions, ResourceWith } from '../types.js';
|
|
5
|
+
import { type ISODate, type NanoID, type Paginated } from '../types.js';
|
|
6
|
+
/** Raw API response shape for a member (user). @internal */
|
|
7
|
+
export interface MemberData {
|
|
8
|
+
id: string;
|
|
9
|
+
issuer_type: 'user';
|
|
10
|
+
email: string;
|
|
11
|
+
nickname: string | null;
|
|
12
|
+
avatar_uri: string | null;
|
|
13
|
+
display?: {
|
|
14
|
+
language: string | null;
|
|
15
|
+
theme: string | null;
|
|
16
|
+
} | null;
|
|
17
|
+
permissions?: string[];
|
|
18
|
+
created_at: ISODate;
|
|
19
|
+
updated_at: ISODate;
|
|
20
|
+
}
|
|
21
|
+
/** Display preferences for a member. */
|
|
22
|
+
export interface MemberDisplay {
|
|
23
|
+
/** The member's preferred UI language code. */
|
|
24
|
+
language: string | null;
|
|
25
|
+
/** The member's preferred UI theme identifier. */
|
|
26
|
+
theme: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A MeowPanel user account (member).
|
|
30
|
+
*
|
|
31
|
+
* Retrieved via {@link MembersNamespace.get} or {@link MembersNamespace.list}.
|
|
32
|
+
*/
|
|
33
|
+
export declare class Member extends ReactiveResource {
|
|
34
|
+
/** The member's unique NanoID. */
|
|
35
|
+
readonly id: NanoID;
|
|
36
|
+
/** Always `'user'` for member accounts. */
|
|
37
|
+
issuerType: 'user';
|
|
38
|
+
/** The member's login email address. */
|
|
39
|
+
email: string;
|
|
40
|
+
/** The member's display nickname. */
|
|
41
|
+
nickname: string | null;
|
|
42
|
+
/** URL of the member's avatar image, or `null` if no avatar is set. */
|
|
43
|
+
avatarUri: string | null;
|
|
44
|
+
/** Display preferences (language and theme). */
|
|
45
|
+
display: MemberDisplay | null | undefined;
|
|
46
|
+
/** The member's assigned permission scopes. */
|
|
47
|
+
permissions: string[] | undefined;
|
|
48
|
+
/** When this member account was created. */
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
/** When this member account was last updated. */
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
/** @internal */
|
|
53
|
+
constructor(data: MemberData);
|
|
54
|
+
/**
|
|
55
|
+
* Apply raw API data to this member instance, updating all mutable fields.
|
|
56
|
+
*
|
|
57
|
+
* Called by the constructor and by {@link MembersNamespace.update} to update the instance in-place.
|
|
58
|
+
*/
|
|
59
|
+
applyData(data: MemberData): void;
|
|
60
|
+
}
|
|
61
|
+
/** Fields that can be updated on a member. All fields are optional. */
|
|
62
|
+
export interface UpdateMemberPayload {
|
|
63
|
+
/** New email address for the member. */
|
|
64
|
+
email?: string;
|
|
65
|
+
/** New display nickname. */
|
|
66
|
+
nickname?: string;
|
|
67
|
+
/** Display preference updates. */
|
|
68
|
+
display?: {
|
|
69
|
+
/** UI language code, or `null` to clear. */
|
|
70
|
+
language?: string | null;
|
|
71
|
+
/** UI theme identifier, or `null` to clear. */
|
|
72
|
+
theme?: string | null;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** Valid include keys for member endpoints. */
|
|
76
|
+
export type MemberInclude = 'display' | 'permissions';
|
|
77
|
+
/** Maps each {@link MemberInclude} key to the field(s) it guarantees on the {@link Member} instance. */
|
|
78
|
+
interface MemberIncludeMap {
|
|
79
|
+
display: {
|
|
80
|
+
display: MemberDisplay | null;
|
|
81
|
+
};
|
|
82
|
+
permissions: {
|
|
83
|
+
permissions: string[];
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/** A {@link Member} with specific include fields guaranteed to be populated. */
|
|
87
|
+
export type MemberWith<I extends readonly MemberInclude[] = []> = ResourceWith<Member, MemberIncludeMap, I>;
|
|
88
|
+
/** Typed events emitted by {@link MembersNamespace}. */
|
|
89
|
+
export interface MemberEvents {
|
|
90
|
+
/** Fired after a member is successfully updated. */
|
|
91
|
+
updated: Member;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Namespace for member (user) management.
|
|
95
|
+
*
|
|
96
|
+
* Access via `api.members`.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts ignore
|
|
100
|
+
* // Reactive store
|
|
101
|
+
* // {#each $api.members as member} ... {/each}
|
|
102
|
+
*
|
|
103
|
+
* // Imperative
|
|
104
|
+
* const members = await api.members.list();
|
|
105
|
+
* const member = await api.members.get(id);
|
|
106
|
+
* await api.members.update(id, { nickname: 'newname' });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare class MembersNamespace extends ResourceNamespace<Member, MemberEvents> {
|
|
110
|
+
/** @internal */
|
|
111
|
+
constructor(http: HttpClient);
|
|
112
|
+
/**
|
|
113
|
+
* Fetch a paginated list of all members.
|
|
114
|
+
*
|
|
115
|
+
* @param opts Pagination, search, and include options.
|
|
116
|
+
*/
|
|
117
|
+
list<const I extends readonly MemberInclude[] = []>(opts?: {
|
|
118
|
+
page?: number;
|
|
119
|
+
perPage?: number;
|
|
120
|
+
search?: string;
|
|
121
|
+
} & IncludeOptions<MemberInclude, I>): Promise<Paginated<MemberWith<I>>>;
|
|
122
|
+
/**
|
|
123
|
+
* Fetch a single member by ID.
|
|
124
|
+
*
|
|
125
|
+
* @param id The member's NanoID.
|
|
126
|
+
* @param opts Include options.
|
|
127
|
+
*/
|
|
128
|
+
get<const I extends readonly MemberInclude[] = []>(id: NanoID, opts?: IncludeOptions<MemberInclude, I>): Promise<MemberWith<I>>;
|
|
129
|
+
/**
|
|
130
|
+
* Update a member's profile fields.
|
|
131
|
+
*
|
|
132
|
+
* @param id The member's NanoID.
|
|
133
|
+
* @param payload The fields to update.
|
|
134
|
+
*/
|
|
135
|
+
update(id: NanoID, payload: UpdateMemberPayload): Promise<Member>;
|
|
136
|
+
}
|
|
137
|
+
export {};
|
|
138
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../../src/src/resources/members.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,KAAK,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,SAAS,EAAY,MAAM,aAAa,CAAC;AAEhG,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,M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,SAAS,SAAS,aAAa,EAAE,GAAG,EAAE,EAC7D,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,cAAc,CAAC,aAAa,EAAE,CAAC,CAAM,GACzC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAQzB;;;;;OAKG;IACU,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;CAc9E"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MembersNamespace = exports.Member = void 0;
|
|
4
|
+
const namespace_js_1 = require("../namespace.js");
|
|
5
|
+
const reactive_js_1 = require("../reactive.js");
|
|
6
|
+
const types_js_1 = require("../types.js");
|
|
7
|
+
/**
|
|
8
|
+
* A MeowPanel user account (member).
|
|
9
|
+
*
|
|
10
|
+
* Retrieved via {@link MembersNamespace.get} or {@link MembersNamespace.list}.
|
|
11
|
+
*/
|
|
12
|
+
class Member extends reactive_js_1.ReactiveResource {
|
|
13
|
+
/** The member's unique NanoID. */
|
|
14
|
+
id;
|
|
15
|
+
/** Always `'user'` for member accounts. */
|
|
16
|
+
issuerType;
|
|
17
|
+
/** The member's login email address. */
|
|
18
|
+
email;
|
|
19
|
+
/** The member's display nickname. */
|
|
20
|
+
nickname;
|
|
21
|
+
/** URL of the member's avatar image, or `null` if no avatar is set. */
|
|
22
|
+
avatarUri;
|
|
23
|
+
/** Display preferences (language and theme). */
|
|
24
|
+
display;
|
|
25
|
+
/** The member's assigned permission scopes. */
|
|
26
|
+
permissions;
|
|
27
|
+
/** When this member account was created. */
|
|
28
|
+
createdAt;
|
|
29
|
+
/** When this member account was last updated. */
|
|
30
|
+
updatedAt;
|
|
31
|
+
/** @internal */
|
|
32
|
+
constructor(data) {
|
|
33
|
+
super();
|
|
34
|
+
this.id = (0, types_js_1.toNanoID)(data.id);
|
|
35
|
+
this.issuerType = data.issuer_type;
|
|
36
|
+
this.applyData(data);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Apply raw API data to this member instance, updating all mutable fields.
|
|
40
|
+
*
|
|
41
|
+
* Called by the constructor and by {@link MembersNamespace.update} to update the instance in-place.
|
|
42
|
+
*/
|
|
43
|
+
applyData(data) {
|
|
44
|
+
this.issuerType = data.issuer_type;
|
|
45
|
+
this.email = data.email;
|
|
46
|
+
this.nickname = data.nickname;
|
|
47
|
+
this.avatarUri = data.avatar_uri;
|
|
48
|
+
this.display = data.display ?? undefined;
|
|
49
|
+
this.permissions = data.permissions;
|
|
50
|
+
this.createdAt = new Date(data.created_at);
|
|
51
|
+
this.updatedAt = new Date(data.updated_at);
|
|
52
|
+
this.notify();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Member = Member;
|
|
56
|
+
/**
|
|
57
|
+
* Namespace for member (user) management.
|
|
58
|
+
*
|
|
59
|
+
* Access via `api.members`.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts ignore
|
|
63
|
+
* // Reactive store
|
|
64
|
+
* // {#each $api.members as member} ... {/each}
|
|
65
|
+
*
|
|
66
|
+
* // Imperative
|
|
67
|
+
* const members = await api.members.list();
|
|
68
|
+
* const member = await api.members.get(id);
|
|
69
|
+
* await api.members.update(id, { nickname: 'newname' });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
class MembersNamespace extends namespace_js_1.ResourceNamespace {
|
|
73
|
+
/** @internal */
|
|
74
|
+
constructor(http) {
|
|
75
|
+
super(http);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Fetch a paginated list of all members.
|
|
79
|
+
*
|
|
80
|
+
* @param opts Pagination, search, and include options.
|
|
81
|
+
*/
|
|
82
|
+
async list(opts = {}) {
|
|
83
|
+
const extra = {};
|
|
84
|
+
const include = (0, types_js_1.joinIncludes)(opts);
|
|
85
|
+
if (include)
|
|
86
|
+
extra['include'] = include;
|
|
87
|
+
const result = await this.http.list('/members', opts, extra);
|
|
88
|
+
const members = result.data.map((d) => new Member(d));
|
|
89
|
+
this.setCache(members);
|
|
90
|
+
return { ...result, data: members };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Fetch a single member by ID.
|
|
94
|
+
*
|
|
95
|
+
* @param id The member's NanoID.
|
|
96
|
+
* @param opts Include options.
|
|
97
|
+
*/
|
|
98
|
+
async get(id, opts = {}) {
|
|
99
|
+
const params = {};
|
|
100
|
+
const include = (0, types_js_1.joinIncludes)(opts);
|
|
101
|
+
if (include)
|
|
102
|
+
params['include'] = include;
|
|
103
|
+
const data = await this.http.get(`/members/${id}`, { params });
|
|
104
|
+
return new Member(data);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Update a member's profile fields.
|
|
108
|
+
*
|
|
109
|
+
* @param id The member's NanoID.
|
|
110
|
+
* @param payload The fields to update.
|
|
111
|
+
*/
|
|
112
|
+
async update(id, payload) {
|
|
113
|
+
const data = await this.http.patch(`/members/${id}`, payload);
|
|
114
|
+
const existing = this.cache.find((m) => m.id === id);
|
|
115
|
+
if (existing) {
|
|
116
|
+
existing.applyData(data);
|
|
117
|
+
this.upsertCache(existing);
|
|
118
|
+
this.emit('updated', existing);
|
|
119
|
+
return existing;
|
|
120
|
+
}
|
|
121
|
+
const member = new Member(data);
|
|
122
|
+
this.upsertCache(member);
|
|
123
|
+
this.emit('updated', member);
|
|
124
|
+
return member;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.MembersNamespace = MembersNamespace;
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import { ResourceNamespace } from '../namespace.js';
|
|
3
|
+
import { ReactiveResource } from '../reactive.js';
|
|
4
|
+
import type { IncludeOptions, ResourceWith } from '../types.js';
|
|
5
|
+
import { type ISODate, type NanoID, type Paginated } from '../types.js';
|
|
6
|
+
import type { MemberData } from './members.js';
|
|
7
|
+
import { Member } from './members.js';
|
|
8
|
+
import type { ActivityLogData } from './servers/types.js';
|
|
9
|
+
import { ActivityLog } from './servers/activity.js';
|
|
10
|
+
/** Raw API response for a node location. @internal */
|
|
11
|
+
export interface NodeLocationData {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
short: string;
|
|
15
|
+
notes?: string | null;
|
|
16
|
+
owner?: MemberData;
|
|
17
|
+
created_at: ISODate;
|
|
18
|
+
updated_at: ISODate;
|
|
19
|
+
}
|
|
20
|
+
/** Raw API response for a node type (classification). @internal */
|
|
21
|
+
export interface NodeTypeData {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
short: string;
|
|
25
|
+
notes?: string | null;
|
|
26
|
+
owner?: MemberData;
|
|
27
|
+
created_at: ISODate;
|
|
28
|
+
updated_at: ISODate;
|
|
29
|
+
}
|
|
30
|
+
/** Raw API response for a physical host. @internal */
|
|
31
|
+
export interface NodeHostData {
|
|
32
|
+
id: string;
|
|
33
|
+
hostname: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
color?: string;
|
|
36
|
+
notes?: string | null;
|
|
37
|
+
owner?: MemberData;
|
|
38
|
+
created_at: ISODate;
|
|
39
|
+
updated_at: ISODate;
|
|
40
|
+
}
|
|
41
|
+
/** Raw API response for a node. @internal */
|
|
42
|
+
export interface NodeData {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string | null;
|
|
46
|
+
owner?: MemberData;
|
|
47
|
+
location: NodeLocationData;
|
|
48
|
+
type: NodeTypeData;
|
|
49
|
+
num: number;
|
|
50
|
+
limits: {
|
|
51
|
+
memory_mb: number;
|
|
52
|
+
memory_overallocate_mb: number;
|
|
53
|
+
disk_mb: number;
|
|
54
|
+
disk_overallocate_mb: number;
|
|
55
|
+
upload_size_mb: number;
|
|
56
|
+
};
|
|
57
|
+
/** @see NodeConnection */
|
|
58
|
+
connection?: {
|
|
59
|
+
url: string;
|
|
60
|
+
scheme: string;
|
|
61
|
+
fqdn: string;
|
|
62
|
+
port: number;
|
|
63
|
+
} | null;
|
|
64
|
+
is_maintenance_mode: boolean;
|
|
65
|
+
can_auto_deploy: boolean;
|
|
66
|
+
is_behind_proxy: boolean;
|
|
67
|
+
notes?: string | null;
|
|
68
|
+
created_at: ISODate;
|
|
69
|
+
updated_at: ISODate;
|
|
70
|
+
}
|
|
71
|
+
/** Raw API response for a node allocation port. @internal */
|
|
72
|
+
export interface NodeAllocationPortData {
|
|
73
|
+
id: string;
|
|
74
|
+
ip: string;
|
|
75
|
+
port: number;
|
|
76
|
+
ready_protocols: Array<'tcp' | 'udp'>;
|
|
77
|
+
is_in_use: boolean;
|
|
78
|
+
notes?: string | null;
|
|
79
|
+
created_at: ISODate;
|
|
80
|
+
updated_at: ISODate;
|
|
81
|
+
}
|
|
82
|
+
/** Raw API response for a node allocation IP. @internal */
|
|
83
|
+
export interface NodeAllocationIpData {
|
|
84
|
+
id: string;
|
|
85
|
+
ip: string;
|
|
86
|
+
ipAlias?: string | null;
|
|
87
|
+
ports: NodeAllocationPortData[];
|
|
88
|
+
node: NodeData;
|
|
89
|
+
notes?: string | null;
|
|
90
|
+
created_at: ISODate;
|
|
91
|
+
updated_at: ISODate;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A geographic location associated with one or more nodes.
|
|
95
|
+
*/
|
|
96
|
+
export declare class NodeLocation extends ReactiveResource {
|
|
97
|
+
/** Unique NanoID of this location. */
|
|
98
|
+
readonly id: NanoID;
|
|
99
|
+
/** Full display name of the location, e.g. `"US East"`. */
|
|
100
|
+
name: string;
|
|
101
|
+
/** Short code used in node name generation, e.g. `"use"`. */
|
|
102
|
+
short: string;
|
|
103
|
+
/** Internal notes. */
|
|
104
|
+
notes: string | null | undefined;
|
|
105
|
+
/** Owner of this location record. */
|
|
106
|
+
owner: Member | undefined;
|
|
107
|
+
/** When this location was created. */
|
|
108
|
+
createdAt: Date;
|
|
109
|
+
/** When this location was last updated. */
|
|
110
|
+
updatedAt: Date;
|
|
111
|
+
/** @internal */
|
|
112
|
+
constructor(data: NodeLocationData);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* A classification type for nodes (e.g. `"Apex"`, `"Shared"`).
|
|
116
|
+
*/
|
|
117
|
+
export declare class NodeType extends ReactiveResource {
|
|
118
|
+
/** Unique NanoID of this node type. */
|
|
119
|
+
readonly id: NanoID;
|
|
120
|
+
/** Full display name of the node type, e.g. `"Apex"`. */
|
|
121
|
+
name: string;
|
|
122
|
+
/** Short code used in node name generation, e.g. `"a"`. */
|
|
123
|
+
short: string;
|
|
124
|
+
/** Internal notes. */
|
|
125
|
+
notes: string | null | undefined;
|
|
126
|
+
/** Owner of this type record. */
|
|
127
|
+
owner: Member | undefined;
|
|
128
|
+
/** When this type was created. */
|
|
129
|
+
createdAt: Date;
|
|
130
|
+
/** When this type was last updated. */
|
|
131
|
+
updatedAt: Date;
|
|
132
|
+
/** @internal */
|
|
133
|
+
constructor(data: NodeTypeData);
|
|
134
|
+
}
|
|
135
|
+
/** Direct connection details for a node's daemon API. */
|
|
136
|
+
export interface NodeConnection {
|
|
137
|
+
/** Full URL to the node daemon API, e.g. `"http://1.2.3.4:8080"`. */
|
|
138
|
+
url: string;
|
|
139
|
+
/** URL scheme: `"http"` or `"https"`. */
|
|
140
|
+
scheme: string;
|
|
141
|
+
/** Fully qualified domain name or IP of the node. */
|
|
142
|
+
fqdn: string;
|
|
143
|
+
/** Port number of the node daemon API. */
|
|
144
|
+
port: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Resource limits configured for a node.
|
|
148
|
+
*/
|
|
149
|
+
export interface NodeLimits {
|
|
150
|
+
/** Total memory available on this node, in megabytes. */
|
|
151
|
+
memoryMb: number;
|
|
152
|
+
/** Allowed memory overallocation, in megabytes. */
|
|
153
|
+
memoryOverallocateMb: number;
|
|
154
|
+
/** Total disk space available on this node, in megabytes. */
|
|
155
|
+
diskMb: number;
|
|
156
|
+
/** Allowed disk overallocation, in megabytes. */
|
|
157
|
+
diskOverallocateMb: number;
|
|
158
|
+
/** Maximum upload size for file operations, in megabytes. */
|
|
159
|
+
uploadSizeMb: number;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* A single port on a node allocation IP.
|
|
163
|
+
*/
|
|
164
|
+
export declare class NodeAllocationPort extends ReactiveResource {
|
|
165
|
+
readonly id: NanoID;
|
|
166
|
+
ip: string;
|
|
167
|
+
port: number;
|
|
168
|
+
readyProtocols: Array<'tcp' | 'udp'>;
|
|
169
|
+
isInUse: boolean;
|
|
170
|
+
notes: string | null | undefined;
|
|
171
|
+
createdAt: Date;
|
|
172
|
+
updatedAt: Date;
|
|
173
|
+
/** @internal */
|
|
174
|
+
constructor(data: NodeAllocationPortData);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* An allocation IP assigned to a node, including its available ports.
|
|
178
|
+
*/
|
|
179
|
+
export declare class NodeAllocationIp extends ReactiveResource {
|
|
180
|
+
readonly id: NanoID;
|
|
181
|
+
ip: string;
|
|
182
|
+
ipAlias: string | null | undefined;
|
|
183
|
+
ports: NodeAllocationPort[];
|
|
184
|
+
node: Node;
|
|
185
|
+
notes: string | null | undefined;
|
|
186
|
+
createdAt: Date;
|
|
187
|
+
updatedAt: Date;
|
|
188
|
+
/** @internal */
|
|
189
|
+
constructor(data: NodeAllocationIpData);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* A MeowPanel daemon node (physical or virtual server hosting game servers).
|
|
193
|
+
*
|
|
194
|
+
* Retrieved via {@link NodesNamespace.get} or {@link NodesNamespace.list}.
|
|
195
|
+
*/
|
|
196
|
+
export declare class Node extends ReactiveResource {
|
|
197
|
+
/** The node's unique NanoID. */
|
|
198
|
+
readonly id: NanoID;
|
|
199
|
+
/**
|
|
200
|
+
* Auto-generated display name in the format `{type}{num}{location}.{hostname}`,
|
|
201
|
+
* e.g. `"a001use.host.example.com"`.
|
|
202
|
+
*/
|
|
203
|
+
name: string;
|
|
204
|
+
/** Optional description of the node. */
|
|
205
|
+
description: string | null;
|
|
206
|
+
/** Owner of this node record. */
|
|
207
|
+
owner: Member | undefined;
|
|
208
|
+
/** Geographic location of this node. */
|
|
209
|
+
location: NodeLocation;
|
|
210
|
+
/** Classification type of this node. */
|
|
211
|
+
type: NodeType;
|
|
212
|
+
/** Sequential number of this node within its type and location. */
|
|
213
|
+
num: number;
|
|
214
|
+
/** Resource limits configured for this node. */
|
|
215
|
+
limits: NodeLimits;
|
|
216
|
+
/**
|
|
217
|
+
/** Direct connection details for the node daemon API. */
|
|
218
|
+
connection: NodeConnection | null | undefined;
|
|
219
|
+
/** `true` when the node is in maintenance mode (no new servers will be started). */
|
|
220
|
+
isMaintenanceMode: boolean;
|
|
221
|
+
/** `true` when the node can be auto-deployed to. */
|
|
222
|
+
canAutoDeploy: boolean;
|
|
223
|
+
/** `true` when the node is behind a reverse proxy. */
|
|
224
|
+
isBehindProxy: boolean;
|
|
225
|
+
/** Internal notes visible to administrators. */
|
|
226
|
+
notes: string | null | undefined;
|
|
227
|
+
/** When this node was registered. */
|
|
228
|
+
createdAt: Date;
|
|
229
|
+
/** When this node was last updated. */
|
|
230
|
+
updatedAt: Date;
|
|
231
|
+
/** @internal */
|
|
232
|
+
constructor(data: NodeData);
|
|
233
|
+
}
|
|
234
|
+
/** Payload for creating a new node. */
|
|
235
|
+
export interface CreateNodePayload {
|
|
236
|
+
/** Fully qualified domain name or IP of the node. */
|
|
237
|
+
fqdn: string;
|
|
238
|
+
/** URL scheme: `"http"` or `"https"`. */
|
|
239
|
+
scheme: 'http' | 'https';
|
|
240
|
+
/** Port number of the node daemon API. */
|
|
241
|
+
apiPort: number;
|
|
242
|
+
/** Port number of the node SFTP server. */
|
|
243
|
+
sftpPort: number;
|
|
244
|
+
/** ID of the host this node belongs to. */
|
|
245
|
+
hostId: NanoID;
|
|
246
|
+
/** ID of the location this node belongs to. */
|
|
247
|
+
locationId: NanoID;
|
|
248
|
+
/** ID of the node type. */
|
|
249
|
+
typeId: NanoID;
|
|
250
|
+
/** Optional description. */
|
|
251
|
+
description?: string;
|
|
252
|
+
/** Optional internal notes. */
|
|
253
|
+
notes?: string;
|
|
254
|
+
/** Explicit node number override. */
|
|
255
|
+
num?: number;
|
|
256
|
+
/** Whether the node should start in maintenance mode. */
|
|
257
|
+
isMaintenanceMode?: boolean;
|
|
258
|
+
/** Whether the node can be auto-deployed to. */
|
|
259
|
+
canAutoDeploy?: boolean;
|
|
260
|
+
/** Whether the node is behind a reverse proxy. */
|
|
261
|
+
isBehindProxy?: boolean;
|
|
262
|
+
/** Resource limits for the node. */
|
|
263
|
+
limits: {
|
|
264
|
+
memoryMb: number;
|
|
265
|
+
memoryOverallocateMb: number;
|
|
266
|
+
diskMb: number;
|
|
267
|
+
diskOverallocateMb: number;
|
|
268
|
+
uploadSizeMb: number;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
/** Payload for creating a node allocation IP. */
|
|
272
|
+
export interface CreateNodeAllocationIpPayload {
|
|
273
|
+
ip: string;
|
|
274
|
+
ipAlias?: string;
|
|
275
|
+
notes?: string;
|
|
276
|
+
}
|
|
277
|
+
/** Payload for updating a node allocation IP. */
|
|
278
|
+
export interface UpdateNodeAllocationIpPayload {
|
|
279
|
+
ipAlias?: string;
|
|
280
|
+
notes?: string;
|
|
281
|
+
}
|
|
282
|
+
/** Payload for creating one or more allocation ports. */
|
|
283
|
+
export interface CreateNodeAllocationPortsPayload {
|
|
284
|
+
port: number;
|
|
285
|
+
type?: Array<'tcp' | 'udp'>;
|
|
286
|
+
}
|
|
287
|
+
/** Payload for updating a node allocation port. */
|
|
288
|
+
export interface UpdateNodeAllocationPortPayload {
|
|
289
|
+
type?: Array<'tcp' | 'udp'>;
|
|
290
|
+
}
|
|
291
|
+
/** Payload for logging node-originated activity into Nexus. */
|
|
292
|
+
export interface LogNodeActivityPayload {
|
|
293
|
+
userId: string;
|
|
294
|
+
serverId: string;
|
|
295
|
+
event: string;
|
|
296
|
+
metadata: Record<string, unknown>;
|
|
297
|
+
ip: string;
|
|
298
|
+
timestamp: string | Date;
|
|
299
|
+
}
|
|
300
|
+
/** Valid include keys for node endpoints. */
|
|
301
|
+
export type NodeInclude = 'connection';
|
|
302
|
+
/** Maps each {@link NodeInclude} key to the field(s) it guarantees on the {@link Node} instance. */
|
|
303
|
+
interface NodeIncludeMap {
|
|
304
|
+
connection: {
|
|
305
|
+
connection: NodeConnection;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
/** A {@link Node} with specific include fields guaranteed to be populated. */
|
|
309
|
+
export type NodeWith<I extends readonly NodeInclude[] = []> = ResourceWith<Node, NodeIncludeMap, I>;
|
|
310
|
+
/** Typed events emitted by {@link NodesNamespace}. */
|
|
311
|
+
export interface NodeEvents {
|
|
312
|
+
/** Fired after a node is created. */
|
|
313
|
+
created: Node;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Manage allocation IPs and ports on a specific node.
|
|
317
|
+
*/
|
|
318
|
+
export declare class NodeAllocationsManager {
|
|
319
|
+
private readonly nodeId;
|
|
320
|
+
private readonly http;
|
|
321
|
+
/** @internal */
|
|
322
|
+
constructor(nodeId: NanoID, http: HttpClient);
|
|
323
|
+
list(): Promise<NodeAllocationIp[]>;
|
|
324
|
+
get(allocationIp: string): Promise<NodeAllocationIp>;
|
|
325
|
+
create(payload: CreateNodeAllocationIpPayload): Promise<NodeAllocationIp>;
|
|
326
|
+
update(allocationIp: string, payload: UpdateNodeAllocationIpPayload): Promise<NodeAllocationIp>;
|
|
327
|
+
delete(allocationIp: string): Promise<void>;
|
|
328
|
+
createPorts(allocationIp: string, payload: CreateNodeAllocationPortsPayload[]): Promise<NodeAllocationIp>;
|
|
329
|
+
updatePort(allocationIp: string, port: number, payload: UpdateNodeAllocationPortPayload): Promise<NodeAllocationIp>;
|
|
330
|
+
deletePort(allocationIp: string, port: number): Promise<void>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Namespace for node management.
|
|
334
|
+
*
|
|
335
|
+
* Access via `api.nodes`.
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```ts ignore
|
|
339
|
+
* const nodes = await api.nodes.list();
|
|
340
|
+
* const node = await api.nodes.get(id, { includeConnection: true });
|
|
341
|
+
* console.log(node.connection?.url); // "http://1.2.3.4:8080"
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
export declare class NodesNamespace extends ResourceNamespace<Node, NodeEvents> {
|
|
345
|
+
/** @internal */
|
|
346
|
+
constructor(http: HttpClient);
|
|
347
|
+
/**
|
|
348
|
+
* Fetch a paginated list of nodes.
|
|
349
|
+
*
|
|
350
|
+
* @param opts Pagination, search, and include options.
|
|
351
|
+
*/
|
|
352
|
+
list<const I extends readonly NodeInclude[] = []>(opts?: {
|
|
353
|
+
page?: number;
|
|
354
|
+
perPage?: number;
|
|
355
|
+
search?: string;
|
|
356
|
+
} & IncludeOptions<NodeInclude, I>): Promise<Paginated<NodeWith<I>>>;
|
|
357
|
+
/**
|
|
358
|
+
* Fetch a single node by ID.
|
|
359
|
+
*
|
|
360
|
+
* @param id The node's NanoID.
|
|
361
|
+
* @param opts Include options (e.g. `{ include: ['connection'] }`).
|
|
362
|
+
*/
|
|
363
|
+
get<const I extends readonly NodeInclude[] = []>(id: NanoID, opts?: IncludeOptions<NodeInclude, I>): Promise<NodeWith<I>>;
|
|
364
|
+
/**
|
|
365
|
+
* Create a new node.
|
|
366
|
+
*
|
|
367
|
+
* @param payload Node creation parameters.
|
|
368
|
+
*/
|
|
369
|
+
create(payload: CreateNodePayload): Promise<Node>;
|
|
370
|
+
/**
|
|
371
|
+
* Fetch all servers deployed on a specific node.
|
|
372
|
+
*
|
|
373
|
+
* @param id The node's NanoID.
|
|
374
|
+
* @returns An array of minimal server data. Use `api.servers.get()` to fetch full server details.
|
|
375
|
+
*/
|
|
376
|
+
servers(id: NanoID): Promise<Array<{
|
|
377
|
+
id: NanoID;
|
|
378
|
+
}>>;
|
|
379
|
+
/**
|
|
380
|
+
* Access allocation management for a specific node.
|
|
381
|
+
*/
|
|
382
|
+
allocations(id: NanoID): NodeAllocationsManager;
|
|
383
|
+
/**
|
|
384
|
+
* Log activity on behalf of a node daemon.
|
|
385
|
+
*
|
|
386
|
+
* This endpoint is intended for node-authenticated clients.
|
|
387
|
+
*/
|
|
388
|
+
logActivity(entries: LogNodeActivityPayload[]): Promise<void>;
|
|
389
|
+
/**
|
|
390
|
+
* Create an activity log model from a raw payload.
|
|
391
|
+
*
|
|
392
|
+
* Useful when consuming activity data returned from other endpoints.
|
|
393
|
+
*/
|
|
394
|
+
toActivityLog(data: ActivityLogData): ActivityLog;
|
|
395
|
+
}
|
|
396
|
+
export {};
|
|
397
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/src/resources/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,KAAK,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,SAAS,EAAY,MAAM,aAAa,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,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