@tak-ps/node-tak 11.2.2 → 11.3.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/CHANGELOG.md +4 -0
- package/dist/lib/api/video.d.ts +15 -3
- package/dist/lib/api/video.js +16 -1
- package/dist/lib/api/video.js.map +1 -1
- package/lib/api/video.ts +21 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/lib/api/video.d.ts
CHANGED
|
@@ -7,7 +7,19 @@ export declare const FeedInput: import("@sinclair/typebox").TObject<{
|
|
|
7
7
|
alias: import("@sinclair/typebox").TString;
|
|
8
8
|
url: import("@sinclair/typebox").TString;
|
|
9
9
|
}>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const VideoConnectionCreateInput: import("@sinclair/typebox").TObject<{
|
|
11
|
+
groups: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
12
|
+
uuid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
active: import("@sinclair/typebox").TBoolean;
|
|
14
|
+
alias: import("@sinclair/typebox").TString;
|
|
15
|
+
feeds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
16
|
+
uuid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
|
+
active: import("@sinclair/typebox").TBoolean;
|
|
18
|
+
alias: import("@sinclair/typebox").TString;
|
|
19
|
+
url: import("@sinclair/typebox").TString;
|
|
20
|
+
}>>;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const VideoConnectionUpdateInput: import("@sinclair/typebox").TObject<{
|
|
11
23
|
uuid: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
24
|
active: import("@sinclair/typebox").TBoolean;
|
|
13
25
|
alias: import("@sinclair/typebox").TString;
|
|
@@ -120,8 +132,8 @@ export default class VideoCommands extends Commands {
|
|
|
120
132
|
};
|
|
121
133
|
cli(args: ParsedArgs): Promise<object | string>;
|
|
122
134
|
list(query?: Static<typeof VideoConnectionListInput>): Promise<Static<typeof VideoConnectionList>>;
|
|
123
|
-
update(connection: Static<typeof
|
|
124
|
-
create(connection: Static<typeof
|
|
135
|
+
update(connection: Static<typeof VideoConnectionUpdateInput>): Promise<Static<typeof VideoConnection>>;
|
|
136
|
+
create(connection: Static<typeof VideoConnectionCreateInput>): Promise<Static<typeof VideoConnection>>;
|
|
125
137
|
get(uid: string): Promise<Static<typeof VideoConnection>>;
|
|
126
138
|
delete(uid: string): Promise<void>;
|
|
127
139
|
}
|
package/dist/lib/api/video.js
CHANGED
|
@@ -8,7 +8,16 @@ export const FeedInput = Type.Object({
|
|
|
8
8
|
alias: Type.String(),
|
|
9
9
|
url: Type.String(),
|
|
10
10
|
});
|
|
11
|
-
export const
|
|
11
|
+
export const VideoConnectionCreateInput = Type.Object({
|
|
12
|
+
groups: Type.Optional(Type.Array(Type.String())),
|
|
13
|
+
uuid: Type.Optional(Type.String()),
|
|
14
|
+
active: Type.Boolean({
|
|
15
|
+
default: true
|
|
16
|
+
}),
|
|
17
|
+
alias: Type.String(),
|
|
18
|
+
feeds: Type.Array(FeedInput)
|
|
19
|
+
});
|
|
20
|
+
export const VideoConnectionUpdateInput = Type.Object({
|
|
12
21
|
uuid: Type.Optional(Type.String()),
|
|
13
22
|
active: Type.Boolean({
|
|
14
23
|
default: true
|
|
@@ -103,6 +112,12 @@ export default class VideoCommands extends Commands {
|
|
|
103
112
|
async create(connection) {
|
|
104
113
|
const url = new URL(`/Marti/api/video`, this.api.url);
|
|
105
114
|
const uuid = connection.uuid || randomUUID();
|
|
115
|
+
if (connection.groups) {
|
|
116
|
+
for (const group of connection.groups) {
|
|
117
|
+
url.searchParams.append('group', group);
|
|
118
|
+
}
|
|
119
|
+
delete connection.groups;
|
|
120
|
+
}
|
|
106
121
|
await this.api.fetch(url, {
|
|
107
122
|
method: 'POST',
|
|
108
123
|
body: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../lib/api/video.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAU,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,QAAQ,EAAE,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAClC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACvC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../lib/api/video.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAU,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,QAAQ,EAAE,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAClC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACvC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAA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AAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE;YAC7B,MAAM,EAAE,KAAK;SAChB,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,MAAM,CACR,GAAW;QAEX,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,oBAAoB,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjF,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE;YACtB,MAAM,EAAE,QAAQ;SACnB,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/lib/api/video.ts
CHANGED
|
@@ -11,7 +11,17 @@ export const FeedInput = Type.Object({
|
|
|
11
11
|
url: Type.String(),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const VideoConnectionCreateInput = Type.Object({
|
|
15
|
+
groups: Type.Optional(Type.Array(Type.String())),
|
|
16
|
+
uuid: Type.Optional(Type.String()),
|
|
17
|
+
active: Type.Boolean({
|
|
18
|
+
default: true
|
|
19
|
+
}),
|
|
20
|
+
alias: Type.String(),
|
|
21
|
+
feeds: Type.Array(FeedInput)
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const VideoConnectionUpdateInput = Type.Object({
|
|
15
25
|
uuid: Type.Optional(Type.String()),
|
|
16
26
|
active: Type.Boolean({
|
|
17
27
|
default: true
|
|
@@ -99,7 +109,7 @@ export default class VideoCommands extends Commands {
|
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
async update(
|
|
102
|
-
connection: Static<typeof
|
|
112
|
+
connection: Static<typeof VideoConnectionUpdateInput>
|
|
103
113
|
): Promise<Static<typeof VideoConnection>> {
|
|
104
114
|
const url = new URL(`/Marti/api/video/${connection.uuid}`, this.api.url);
|
|
105
115
|
|
|
@@ -120,12 +130,20 @@ export default class VideoCommands extends Commands {
|
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
async create(
|
|
123
|
-
connection: Static<typeof
|
|
133
|
+
connection: Static<typeof VideoConnectionCreateInput>
|
|
124
134
|
): Promise<Static<typeof VideoConnection>> {
|
|
125
135
|
const url = new URL(`/Marti/api/video`, this.api.url);
|
|
126
136
|
|
|
127
137
|
const uuid = connection.uuid || randomUUID();
|
|
128
138
|
|
|
139
|
+
if (connection.groups) {
|
|
140
|
+
for (const group of connection.groups) {
|
|
141
|
+
url.searchParams.append('group', group);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
delete connection.groups;
|
|
145
|
+
}
|
|
146
|
+
|
|
129
147
|
await this.api.fetch(url, {
|
|
130
148
|
method: 'POST',
|
|
131
149
|
body: {
|
package/package.json
CHANGED