camstreamerlib 4.0.0-beta.109 → 4.0.0-beta.110

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.
@@ -1,4 +1,5 @@
1
1
  import z from 'zod';
2
+ export declare const facebookStreamPrivacySchema: z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"friends">, z.ZodLiteral<"only_me">]>;
2
3
  export declare const facebookSchema: z.ZodObject<{
3
4
  id: z.ZodNumber;
4
5
  enabled: z.ZodBoolean;
@@ -179,7 +180,39 @@ export declare const facebookSchema: z.ZodObject<{
179
180
  }>]>;
180
181
  } & {
181
182
  type: z.ZodLiteral<"facebook">;
183
+ description: z.ZodOptional<z.ZodString>;
184
+ deleteAfterEnd: z.ZodBoolean;
185
+ saveToSdCard: z.ZodBoolean;
186
+ statusCameraLed: z.ZodBoolean;
187
+ statusCameraOutput: z.ZodNullable<z.ZodString>;
188
+ countdown: z.ZodBoolean;
189
+ post: z.ZodDiscriminatedUnion<"postLocation", [z.ZodObject<{
190
+ postLocation: z.ZodLiteral<"timeline">;
191
+ streamPrivacy: z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"friends">, z.ZodLiteral<"only_me">]>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ postLocation: "timeline";
194
+ streamPrivacy: "public" | "friends" | "only_me";
195
+ }, {
196
+ postLocation: "timeline";
197
+ streamPrivacy: "public" | "friends" | "only_me";
198
+ }>, z.ZodObject<{
199
+ postLocation: z.ZodLiteral<"page">;
200
+ page: z.ZodString;
201
+ }, "strip", z.ZodTypeAny, {
202
+ postLocation: "page";
203
+ page: string;
204
+ }, {
205
+ postLocation: "page";
206
+ page: string;
207
+ }>]>;
182
208
  }, "strip", z.ZodTypeAny, {
209
+ post: {
210
+ postLocation: "timeline";
211
+ streamPrivacy: "public" | "friends" | "only_me";
212
+ } | {
213
+ postLocation: "page";
214
+ page: string;
215
+ };
183
216
  type: "facebook";
184
217
  audio: {
185
218
  source: "none";
@@ -232,7 +265,20 @@ export declare const facebookSchema: z.ZodObject<{
232
265
  isActive: boolean;
233
266
  }[];
234
267
  };
268
+ deleteAfterEnd: boolean;
269
+ saveToSdCard: boolean;
270
+ statusCameraLed: boolean;
271
+ statusCameraOutput: string | null;
272
+ countdown: boolean;
273
+ description?: string | undefined;
235
274
  }, {
275
+ post: {
276
+ postLocation: "timeline";
277
+ streamPrivacy: "public" | "friends" | "only_me";
278
+ } | {
279
+ postLocation: "page";
280
+ page: string;
281
+ };
236
282
  type: "facebook";
237
283
  audio: {
238
284
  source: "none";
@@ -285,4 +331,10 @@ export declare const facebookSchema: z.ZodObject<{
285
331
  isActive: boolean;
286
332
  }[];
287
333
  };
334
+ deleteAfterEnd: boolean;
335
+ saveToSdCard: boolean;
336
+ statusCameraLed: boolean;
337
+ statusCameraOutput: string | null;
338
+ countdown: boolean;
339
+ description?: string | undefined;
288
340
  }>;
@@ -3,9 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.facebookSchema = void 0;
6
+ exports.facebookSchema = exports.facebookStreamPrivacySchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const streamCommonTypes_1 = require("./streamCommonTypes");
9
+ exports.facebookStreamPrivacySchema = zod_1.default.union([zod_1.default.literal('public'), zod_1.default.literal('friends'), zod_1.default.literal('only_me')]);
10
+ const timelinePost = zod_1.default.object({
11
+ postLocation: zod_1.default.literal('timeline'),
12
+ streamPrivacy: exports.facebookStreamPrivacySchema,
13
+ });
14
+ const pagePost = zod_1.default.object({
15
+ postLocation: zod_1.default.literal('page'),
16
+ page: zod_1.default.string(),
17
+ });
9
18
  exports.facebookSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
19
  type: zod_1.default.literal('facebook'),
20
+ description: zod_1.default.string().optional(),
21
+ deleteAfterEnd: zod_1.default.boolean(),
22
+ saveToSdCard: zod_1.default.boolean(),
23
+ statusCameraLed: zod_1.default.boolean(),
24
+ statusCameraOutput: zod_1.default.string().nullable(),
25
+ countdown: zod_1.default.boolean(),
26
+ post: zod_1.default.discriminatedUnion('postLocation', [timelinePost, pagePost]),
11
27
  });
@@ -239,9 +239,9 @@ export declare const gameChangerSchema: z.ZodObject<{
239
239
  isActive: boolean;
240
240
  }[];
241
241
  };
242
+ saveToSdCard: boolean;
242
243
  statusCameraLed: boolean;
243
244
  statusCameraOutput: string | null;
244
- saveToSdCard: boolean;
245
245
  outputUrl: string;
246
246
  streamKey: string;
247
247
  streamIdentifier?: string | undefined;
@@ -298,9 +298,9 @@ export declare const gameChangerSchema: z.ZodObject<{
298
298
  isActive: boolean;
299
299
  }[];
300
300
  };
301
+ saveToSdCard: boolean;
301
302
  statusCameraLed: boolean;
302
303
  statusCameraOutput: string | null;
303
- saveToSdCard: boolean;
304
304
  outputUrl: string;
305
305
  streamKey: string;
306
306
  streamIdentifier?: string | undefined;
@@ -249,6 +249,9 @@ export declare const mpegDvbSchema: z.ZodObject<{
249
249
  isActive: boolean;
250
250
  }[];
251
251
  };
252
+ saveToSdCard: boolean;
253
+ statusCameraLed: boolean;
254
+ statusCameraOutput: string | null;
252
255
  ipAddress: string;
253
256
  standard: "DVB" | "ATSC";
254
257
  nullPacketsPaddingEnabled: boolean;
@@ -261,9 +264,6 @@ export declare const mpegDvbSchema: z.ZodObject<{
261
264
  pcrPeriodMs: number;
262
265
  providerName: string;
263
266
  serviceName: string;
264
- statusCameraLed: boolean;
265
- statusCameraOutput: string | null;
266
- saveToSdCard: boolean;
267
267
  }, {
268
268
  type: "mpeg_dvb";
269
269
  audio: {
@@ -318,6 +318,9 @@ export declare const mpegDvbSchema: z.ZodObject<{
318
318
  isActive: boolean;
319
319
  }[];
320
320
  };
321
+ saveToSdCard: boolean;
322
+ statusCameraLed: boolean;
323
+ statusCameraOutput: string | null;
321
324
  ipAddress: string;
322
325
  standard: "DVB" | "ATSC";
323
326
  nullPacketsPaddingEnabled: boolean;
@@ -330,7 +333,4 @@ export declare const mpegDvbSchema: z.ZodObject<{
330
333
  pcrPeriodMs: number;
331
334
  providerName: string;
332
335
  serviceName: string;
333
- statusCameraLed: boolean;
334
- statusCameraOutput: string | null;
335
- saveToSdCard: boolean;
336
336
  }>;
@@ -236,9 +236,9 @@ export declare const commonRtmpSchema: z.ZodObject<{
236
236
  isActive: boolean;
237
237
  }[];
238
238
  };
239
+ saveToSdCard: boolean;
239
240
  statusCameraLed: boolean;
240
241
  statusCameraOutput: string | null;
241
- saveToSdCard: boolean;
242
242
  outputUrl: string;
243
243
  streamKey: string;
244
244
  streamIdentifier?: string | undefined;
@@ -294,9 +294,9 @@ export declare const commonRtmpSchema: z.ZodObject<{
294
294
  isActive: boolean;
295
295
  }[];
296
296
  };
297
+ saveToSdCard: boolean;
297
298
  statusCameraLed: boolean;
298
299
  statusCameraOutput: string | null;
299
- saveToSdCard: boolean;
300
300
  outputUrl: string;
301
301
  streamKey: string;
302
302
  streamIdentifier?: string | undefined;
@@ -541,9 +541,9 @@ export declare const rtmpSchema: z.ZodObject<{
541
541
  isActive: boolean;
542
542
  }[];
543
543
  };
544
+ saveToSdCard: boolean;
544
545
  statusCameraLed: boolean;
545
546
  statusCameraOutput: string | null;
546
- saveToSdCard: boolean;
547
547
  outputUrl: string;
548
548
  streamKey: string;
549
549
  streamIdentifier?: string | undefined;
@@ -600,9 +600,9 @@ export declare const rtmpSchema: z.ZodObject<{
600
600
  isActive: boolean;
601
601
  }[];
602
602
  };
603
+ saveToSdCard: boolean;
603
604
  statusCameraLed: boolean;
604
605
  statusCameraOutput: string | null;
605
- saveToSdCard: boolean;
606
606
  outputUrl: string;
607
607
  streamKey: string;
608
608
  streamIdentifier?: string | undefined;
@@ -246,16 +246,16 @@ export declare const youtubeSchema: z.ZodObject<{
246
246
  isActive: boolean;
247
247
  }[];
248
248
  };
249
+ streamPrivacy: "public" | "unlisted" | "private";
250
+ saveToSdCard: boolean;
249
251
  statusCameraLed: boolean;
250
252
  statusCameraOutput: string | null;
251
- saveToSdCard: boolean;
253
+ countdown: boolean;
252
254
  tags: string[];
253
- streamPrivacy: "public" | "unlisted" | "private";
254
255
  latency: "normal" | "low" | "ultra_low";
255
256
  afterEndStatus: "public" | "unlisted" | "private" | "no_change";
256
257
  dvr: boolean;
257
258
  hasWatchdogs: boolean;
258
- countdown: boolean;
259
259
  enableManualControl: boolean;
260
260
  playlist?: string | undefined;
261
261
  description?: string | undefined;
@@ -313,16 +313,16 @@ export declare const youtubeSchema: z.ZodObject<{
313
313
  isActive: boolean;
314
314
  }[];
315
315
  };
316
+ streamPrivacy: "public" | "unlisted" | "private";
317
+ saveToSdCard: boolean;
316
318
  statusCameraLed: boolean;
317
319
  statusCameraOutput: string | null;
318
- saveToSdCard: boolean;
320
+ countdown: boolean;
319
321
  tags: string[];
320
- streamPrivacy: "public" | "unlisted" | "private";
321
322
  latency: "normal" | "low" | "ultra_low";
322
323
  afterEndStatus: "public" | "unlisted" | "private" | "no_change";
323
324
  dvr: boolean;
324
325
  hasWatchdogs: boolean;
325
- countdown: boolean;
326
326
  enableManualControl: boolean;
327
327
  playlist?: string | undefined;
328
328
  description?: string | undefined;
@@ -1,5 +1,21 @@
1
1
  import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
+ export const facebookStreamPrivacySchema = z.union([z.literal('public'), z.literal('friends'), z.literal('only_me')]);
4
+ const timelinePost = z.object({
5
+ postLocation: z.literal('timeline'),
6
+ streamPrivacy: facebookStreamPrivacySchema,
7
+ });
8
+ const pagePost = z.object({
9
+ postLocation: z.literal('page'),
10
+ page: z.string(),
11
+ });
3
12
  export const facebookSchema = streamCommonSchema.extend({
4
13
  type: z.literal('facebook'),
14
+ description: z.string().optional(),
15
+ deleteAfterEnd: z.boolean(),
16
+ saveToSdCard: z.boolean(),
17
+ statusCameraLed: z.boolean(),
18
+ statusCameraOutput: z.string().nullable(),
19
+ countdown: z.boolean(),
20
+ post: z.discriminatedUnion('postLocation', [timelinePost, pagePost]),
5
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.109",
3
+ "version": "4.0.0-beta.110",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -14,6 +14,13 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
14
14
  getUtcTime(options?: THttpRequestOptions): Promise<number>;
15
15
  getMaxFps(source?: number, options?: THttpRequestOptions): Promise<any>;
16
16
  getStreamList(options?: THttpRequestOptions): Promise<({
17
+ post: {
18
+ postLocation: "timeline";
19
+ streamPrivacy: "public" | "friends" | "only_me";
20
+ } | {
21
+ postLocation: "page";
22
+ page: string;
23
+ };
17
24
  type: "facebook";
18
25
  audio: {
19
26
  source: "none";
@@ -66,6 +73,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
66
73
  isActive: boolean;
67
74
  }[];
68
75
  };
76
+ deleteAfterEnd: boolean;
77
+ saveToSdCard: boolean;
78
+ statusCameraLed: boolean;
79
+ statusCameraOutput: string | null;
80
+ countdown: boolean;
81
+ description?: string | undefined;
69
82
  } | {
70
83
  type: "mpeg_dvb";
71
84
  audio: {
@@ -120,6 +133,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
120
133
  isActive: boolean;
121
134
  }[];
122
135
  };
136
+ saveToSdCard: boolean;
137
+ statusCameraLed: boolean;
138
+ statusCameraOutput: string | null;
123
139
  ipAddress: string;
124
140
  standard: "DVB" | "ATSC";
125
141
  nullPacketsPaddingEnabled: boolean;
@@ -132,9 +148,6 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
132
148
  pcrPeriodMs: number;
133
149
  providerName: string;
134
150
  serviceName: string;
135
- statusCameraLed: boolean;
136
- statusCameraOutput: string | null;
137
- saveToSdCard: boolean;
138
151
  } | {
139
152
  type: "rtmp";
140
153
  audio: {
@@ -188,9 +201,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
188
201
  isActive: boolean;
189
202
  }[];
190
203
  };
204
+ saveToSdCard: boolean;
191
205
  statusCameraLed: boolean;
192
206
  statusCameraOutput: string | null;
193
- saveToSdCard: boolean;
194
207
  outputUrl: string;
195
208
  streamKey: string;
196
209
  streamIdentifier?: string | undefined;
@@ -353,16 +366,16 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
353
366
  isActive: boolean;
354
367
  }[];
355
368
  };
369
+ streamPrivacy: "public" | "unlisted" | "private";
370
+ saveToSdCard: boolean;
356
371
  statusCameraLed: boolean;
357
372
  statusCameraOutput: string | null;
358
- saveToSdCard: boolean;
373
+ countdown: boolean;
359
374
  tags: string[];
360
- streamPrivacy: "public" | "unlisted" | "private";
361
375
  latency: "normal" | "low" | "ultra_low";
362
376
  afterEndStatus: "public" | "unlisted" | "private" | "no_change";
363
377
  dvr: boolean;
364
378
  hasWatchdogs: boolean;
365
- countdown: boolean;
366
379
  enableManualControl: boolean;
367
380
  playlist?: string | undefined;
368
381
  description?: string | undefined;
@@ -1056,15 +1069,22 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1056
1069
  isActive: boolean;
1057
1070
  }[];
1058
1071
  };
1072
+ saveToSdCard: boolean;
1059
1073
  statusCameraLed: boolean;
1060
1074
  statusCameraOutput: string | null;
1061
- saveToSdCard: boolean;
1062
1075
  outputUrl: string;
1063
1076
  streamKey: string;
1064
1077
  streamIdentifier?: string | undefined;
1065
1078
  })[]>;
1066
1079
  setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
1067
1080
  getStream(streamId: number, options?: THttpRequestOptions): Promise<{
1081
+ post: {
1082
+ postLocation: "timeline";
1083
+ streamPrivacy: "public" | "friends" | "only_me";
1084
+ } | {
1085
+ postLocation: "page";
1086
+ page: string;
1087
+ };
1068
1088
  type: "facebook";
1069
1089
  audio: {
1070
1090
  source: "none";
@@ -1117,6 +1137,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1117
1137
  isActive: boolean;
1118
1138
  }[];
1119
1139
  };
1140
+ deleteAfterEnd: boolean;
1141
+ saveToSdCard: boolean;
1142
+ statusCameraLed: boolean;
1143
+ statusCameraOutput: string | null;
1144
+ countdown: boolean;
1145
+ description?: string | undefined;
1120
1146
  } | {
1121
1147
  type: "mpeg_dvb";
1122
1148
  audio: {
@@ -1171,6 +1197,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1171
1197
  isActive: boolean;
1172
1198
  }[];
1173
1199
  };
1200
+ saveToSdCard: boolean;
1201
+ statusCameraLed: boolean;
1202
+ statusCameraOutput: string | null;
1174
1203
  ipAddress: string;
1175
1204
  standard: "DVB" | "ATSC";
1176
1205
  nullPacketsPaddingEnabled: boolean;
@@ -1183,9 +1212,6 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1183
1212
  pcrPeriodMs: number;
1184
1213
  providerName: string;
1185
1214
  serviceName: string;
1186
- statusCameraLed: boolean;
1187
- statusCameraOutput: string | null;
1188
- saveToSdCard: boolean;
1189
1215
  } | {
1190
1216
  type: "rtmp";
1191
1217
  audio: {
@@ -1239,9 +1265,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1239
1265
  isActive: boolean;
1240
1266
  }[];
1241
1267
  };
1268
+ saveToSdCard: boolean;
1242
1269
  statusCameraLed: boolean;
1243
1270
  statusCameraOutput: string | null;
1244
- saveToSdCard: boolean;
1245
1271
  outputUrl: string;
1246
1272
  streamKey: string;
1247
1273
  streamIdentifier?: string | undefined;
@@ -1404,16 +1430,16 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1404
1430
  isActive: boolean;
1405
1431
  }[];
1406
1432
  };
1433
+ streamPrivacy: "public" | "unlisted" | "private";
1434
+ saveToSdCard: boolean;
1407
1435
  statusCameraLed: boolean;
1408
1436
  statusCameraOutput: string | null;
1409
- saveToSdCard: boolean;
1437
+ countdown: boolean;
1410
1438
  tags: string[];
1411
- streamPrivacy: "public" | "unlisted" | "private";
1412
1439
  latency: "normal" | "low" | "ultra_low";
1413
1440
  afterEndStatus: "public" | "unlisted" | "private" | "no_change";
1414
1441
  dvr: boolean;
1415
1442
  hasWatchdogs: boolean;
1416
- countdown: boolean;
1417
1443
  enableManualControl: boolean;
1418
1444
  playlist?: string | undefined;
1419
1445
  description?: string | undefined;
@@ -2107,9 +2133,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
2107
2133
  isActive: boolean;
2108
2134
  }[];
2109
2135
  };
2136
+ saveToSdCard: boolean;
2110
2137
  statusCameraLed: boolean;
2111
2138
  statusCameraOutput: string | null;
2112
- saveToSdCard: boolean;
2113
2139
  outputUrl: string;
2114
2140
  streamKey: string;
2115
2141
  streamIdentifier?: string | undefined;