camstreamerlib 4.0.25-9526055 → 4.0.25-b134db7

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/cjs/VapixAPI.d.ts CHANGED
@@ -56,8 +56,6 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
56
56
  fetchSDCardJobProgress(jobId: number, options?: THttpRequestOptions): Promise<number>;
57
57
  getParameter(paramNames: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
58
58
  setParameter(params: Record<string, string | number | boolean>, options?: THttpRequestOptions): Promise<void>;
59
- listDefinitions(group: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
60
- private static collectParameterDefinitions;
61
59
  getGuardTourList(options?: THttpRequestOptions): Promise<{
62
60
  name: string;
63
61
  id: string;
package/cjs/VapixAPI.js CHANGED
@@ -285,38 +285,6 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
285
285
  throw new errors_1.SettingParameterError(responseText);
286
286
  }
287
287
  }
288
- async listDefinitions(group, options) {
289
- const xml = await this._getText('/axis-cgi/param.cgi', {
290
- action: 'listdefinitions',
291
- listformat: 'xmlschema',
292
- group: (0, utils_1.arrayToUrl)(group),
293
- }, options);
294
- const parser = new fast_xml_parser_1.XMLParser({
295
- ignoreAttributes: false,
296
- attributeNamePrefix: '',
297
- allowBooleanAttributes: true,
298
- });
299
- const definitions = {};
300
- VapixAPI.collectParameterDefinitions(parser.parse(xml), definitions);
301
- return definitions;
302
- }
303
- static collectParameterDefinitions(node, acc) {
304
- if (node === null || typeof node !== 'object') {
305
- return;
306
- }
307
- for (const [key, value] of Object.entries(node)) {
308
- if (key === 'parameter') {
309
- for (const parameter of Array.isArray(value) ? value : [value]) {
310
- if (!(0, utils_1.isNullish)(parameter?.name) && !(0, utils_1.isNullish)(parameter?.value)) {
311
- acc[parameter.name] = String(parameter.value);
312
- }
313
- }
314
- }
315
- else if (value !== null && typeof value === 'object') {
316
- VapixAPI.collectParameterDefinitions(value, acc);
317
- }
318
- }
319
- }
320
288
  async getGuardTourList(options) {
321
289
  const gTourList = new Array();
322
290
  const response = await this.getParameter('GuardTour', options);
@@ -10,7 +10,7 @@ export declare const oldStringStreamSchema: z.ZodObject<{
10
10
  outputType: z.ZodString;
11
11
  mediaServerUrl: z.ZodString;
12
12
  inputType: z.ZodString;
13
- inputUrl: z.ZodString;
13
+ inputUrl: z.ZodDefault<z.ZodString>;
14
14
  forceStereo: z.ZodString;
15
15
  streamDelay: z.ZodString;
16
16
  statusLed: z.ZodString;
@@ -60,11 +60,11 @@ export declare const oldStringStreamSchema: z.ZodObject<{
60
60
  outputType: string;
61
61
  mediaServerUrl: string;
62
62
  inputType: string;
63
- inputUrl: string;
64
63
  streamDelay: string;
65
64
  statusLed: string;
66
65
  statusPort: string;
67
66
  prepareAhead: string;
67
+ inputUrl?: string | undefined;
68
68
  }>;
69
69
  export declare const oldStringStreamSchemaWithId: z.ZodObject<{
70
70
  enabled: z.ZodString;
@@ -77,7 +77,7 @@ export declare const oldStringStreamSchemaWithId: z.ZodObject<{
77
77
  outputType: z.ZodString;
78
78
  mediaServerUrl: z.ZodString;
79
79
  inputType: z.ZodString;
80
- inputUrl: z.ZodString;
80
+ inputUrl: z.ZodDefault<z.ZodString>;
81
81
  forceStereo: z.ZodString;
82
82
  streamDelay: z.ZodString;
83
83
  statusLed: z.ZodString;
@@ -131,11 +131,11 @@ export declare const oldStringStreamSchemaWithId: z.ZodObject<{
131
131
  outputType: string;
132
132
  mediaServerUrl: string;
133
133
  inputType: string;
134
- inputUrl: string;
135
134
  streamDelay: string;
136
135
  statusLed: string;
137
136
  statusPort: string;
138
137
  prepareAhead: string;
138
+ inputUrl?: string | undefined;
139
139
  }>;
140
140
  export type TOldStringStream = z.infer<typeof oldStringStreamSchema>;
141
141
  export declare const oldStreamSchema: z.ZodObject<{
@@ -13,7 +13,7 @@ exports.oldStringStreamSchema = zod_1.z.object({
13
13
  outputType: zod_1.z.string(),
14
14
  mediaServerUrl: zod_1.z.string(),
15
15
  inputType: zod_1.z.string(),
16
- inputUrl: zod_1.z.string(),
16
+ inputUrl: zod_1.z.string().default(''),
17
17
  forceStereo: zod_1.z.string(),
18
18
  streamDelay: zod_1.z.string(),
19
19
  statusLed: zod_1.z.string(),
package/esm/VapixAPI.js CHANGED
@@ -282,38 +282,6 @@ export class VapixAPI extends BasicAPI {
282
282
  throw new SettingParameterError(responseText);
283
283
  }
284
284
  }
285
- async listDefinitions(group, options) {
286
- const xml = await this._getText('/axis-cgi/param.cgi', {
287
- action: 'listdefinitions',
288
- listformat: 'xmlschema',
289
- group: arrayToUrl(group),
290
- }, options);
291
- const parser = new XMLParser({
292
- ignoreAttributes: false,
293
- attributeNamePrefix: '',
294
- allowBooleanAttributes: true,
295
- });
296
- const definitions = {};
297
- VapixAPI.collectParameterDefinitions(parser.parse(xml), definitions);
298
- return definitions;
299
- }
300
- static collectParameterDefinitions(node, acc) {
301
- if (node === null || typeof node !== 'object') {
302
- return;
303
- }
304
- for (const [key, value] of Object.entries(node)) {
305
- if (key === 'parameter') {
306
- for (const parameter of Array.isArray(value) ? value : [value]) {
307
- if (!isNullish(parameter?.name) && !isNullish(parameter?.value)) {
308
- acc[parameter.name] = String(parameter.value);
309
- }
310
- }
311
- }
312
- else if (value !== null && typeof value === 'object') {
313
- VapixAPI.collectParameterDefinitions(value, acc);
314
- }
315
- }
316
- }
317
285
  async getGuardTourList(options) {
318
286
  const gTourList = new Array();
319
287
  const response = await this.getParameter('GuardTour', options);
@@ -10,7 +10,7 @@ export const oldStringStreamSchema = z.object({
10
10
  outputType: z.string(),
11
11
  mediaServerUrl: z.string(),
12
12
  inputType: z.string(),
13
- inputUrl: z.string(),
13
+ inputUrl: z.string().default(''),
14
14
  forceStereo: z.string(),
15
15
  streamDelay: z.string(),
16
16
  statusLed: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.25-9526055",
3
+ "version": "4.0.25-b134db7",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -56,8 +56,6 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
56
56
  fetchSDCardJobProgress(jobId: number, options?: THttpRequestOptions): Promise<number>;
57
57
  getParameter(paramNames: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
58
58
  setParameter(params: Record<string, string | number | boolean>, options?: THttpRequestOptions): Promise<void>;
59
- listDefinitions(group: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
60
- private static collectParameterDefinitions;
61
59
  getGuardTourList(options?: THttpRequestOptions): Promise<{
62
60
  name: string;
63
61
  id: string;
@@ -10,7 +10,7 @@ export declare const oldStringStreamSchema: z.ZodObject<{
10
10
  outputType: z.ZodString;
11
11
  mediaServerUrl: z.ZodString;
12
12
  inputType: z.ZodString;
13
- inputUrl: z.ZodString;
13
+ inputUrl: z.ZodDefault<z.ZodString>;
14
14
  forceStereo: z.ZodString;
15
15
  streamDelay: z.ZodString;
16
16
  statusLed: z.ZodString;
@@ -60,11 +60,11 @@ export declare const oldStringStreamSchema: z.ZodObject<{
60
60
  outputType: string;
61
61
  mediaServerUrl: string;
62
62
  inputType: string;
63
- inputUrl: string;
64
63
  streamDelay: string;
65
64
  statusLed: string;
66
65
  statusPort: string;
67
66
  prepareAhead: string;
67
+ inputUrl?: string | undefined;
68
68
  }>;
69
69
  export declare const oldStringStreamSchemaWithId: z.ZodObject<{
70
70
  enabled: z.ZodString;
@@ -77,7 +77,7 @@ export declare const oldStringStreamSchemaWithId: z.ZodObject<{
77
77
  outputType: z.ZodString;
78
78
  mediaServerUrl: z.ZodString;
79
79
  inputType: z.ZodString;
80
- inputUrl: z.ZodString;
80
+ inputUrl: z.ZodDefault<z.ZodString>;
81
81
  forceStereo: z.ZodString;
82
82
  streamDelay: z.ZodString;
83
83
  statusLed: z.ZodString;
@@ -131,11 +131,11 @@ export declare const oldStringStreamSchemaWithId: z.ZodObject<{
131
131
  outputType: string;
132
132
  mediaServerUrl: string;
133
133
  inputType: string;
134
- inputUrl: string;
135
134
  streamDelay: string;
136
135
  statusLed: string;
137
136
  statusPort: string;
138
137
  prepareAhead: string;
138
+ inputUrl?: string | undefined;
139
139
  }>;
140
140
  export type TOldStringStream = z.infer<typeof oldStringStreamSchema>;
141
141
  export declare const oldStreamSchema: z.ZodObject<{