camstreamerlib 4.0.0-beta.146 → 4.0.0-beta.148

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.js CHANGED
@@ -141,7 +141,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
141
141
  return Number(job.jobid);
142
142
  }
143
143
  async fetchSDCardJobProgress(jobId, options) {
144
- const res = await this._postUrlEncoded('/disks/job.cgi', {
144
+ const res = await this._postUrlEncoded('/axis-cgi/disks/job.cgi', {
145
145
  jobid: String(jobId),
146
146
  diskid: 'SD_DISK',
147
147
  }, options);
@@ -455,7 +455,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
455
455
  const appList = apps.map((app) => {
456
456
  return {
457
457
  ...app,
458
- appId: VapixAPI_1.APP_IDS.find((id) => id.toLowerCase() === app.Name.toLowerCase()) ?? null,
458
+ appId: VapixAPI_1.ALL_APP_IDS.find((id) => id.toLowerCase() === app.Name.toLowerCase()) ?? null,
459
459
  };
460
460
  });
461
461
  return VapixAPI_1.applicationListSchema.parse(appList);
@@ -71,10 +71,12 @@ export declare const applicationListSchema: z.ZodArray<z.ZodObject<{
71
71
  VendorHomePage?: string | undefined;
72
72
  LicenseName?: string | undefined;
73
73
  }>, "many">;
74
- export declare const APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin", "SportTracker", "CamOverlayHtmlplugin"];
74
+ export declare const APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin"];
75
+ export declare const ALL_APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin", "SportTracker", "CamOverlayHtmlplugin"];
75
76
  export type TApplicationId = (typeof APP_IDS)[number];
76
77
  export type TApplicationList = z.infer<typeof applicationListSchema>;
77
78
  export type TApplication = z.infer<typeof applicationListSchema>[number];
79
+ export type TAllApplicationId = (typeof ALL_APP_IDS)[number];
78
80
  export declare const guardTourSchema: z.ZodObject<{
79
81
  id: z.ZodString;
80
82
  camNbr: z.ZodUnknown;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
3
+ exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.ALL_APP_IDS = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const transformers_1 = require("../internal/transformers");
6
6
  exports.applicationSchema = zod_1.z.object({
@@ -36,9 +36,8 @@ exports.APP_IDS = [
36
36
  'CamScripter',
37
37
  'PlaneTracker',
38
38
  'Ndihxplugin',
39
- 'SportTracker',
40
- 'CamOverlayHtmlplugin',
41
39
  ];
40
+ exports.ALL_APP_IDS = [...exports.APP_IDS, 'SportTracker', 'CamOverlayHtmlplugin'];
42
41
  exports.guardTourSchema = zod_1.z.object({
43
42
  id: zod_1.z.string(),
44
43
  camNbr: zod_1.z.unknown(),
package/esm/VapixAPI.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { arrayToUrl, isNullish, paramToUrl } from './internal/utils';
2
- import { sdCardWatchedStatuses, APP_IDS, maxFpsResponseSchema, dateTimeinfoSchema, audioDeviceRequestSchema, audioSampleRatesResponseSchema, timeZoneSchema, getPortsResponseSchema, guardTourSchema, ptzOverviewSchema, cameraPTZItemDataSchema, applicationListSchema, sdCardInfoSchema, } from './types/VapixAPI';
2
+ import { sdCardWatchedStatuses, maxFpsResponseSchema, dateTimeinfoSchema, audioDeviceRequestSchema, audioSampleRatesResponseSchema, timeZoneSchema, getPortsResponseSchema, guardTourSchema, ptzOverviewSchema, cameraPTZItemDataSchema, applicationListSchema, sdCardInfoSchema, ALL_APP_IDS, } from './types/VapixAPI';
3
3
  import { ApplicationAPIError, MaxFPSError, NoDeviceInfoError, PtzNotSupportedError, ErrorWithResponse, SDCardActionError, SDCardJobError, SettingParameterError, TimezoneFetchError, TimezoneNotSetupError, } from './errors/errors';
4
4
  import { z } from 'zod';
5
5
  import { XMLParser } from 'fast-xml-parser';
@@ -138,7 +138,7 @@ export class VapixAPI extends BasicAPI {
138
138
  return Number(job.jobid);
139
139
  }
140
140
  async fetchSDCardJobProgress(jobId, options) {
141
- const res = await this._postUrlEncoded('/disks/job.cgi', {
141
+ const res = await this._postUrlEncoded('/axis-cgi/disks/job.cgi', {
142
142
  jobid: String(jobId),
143
143
  diskid: 'SD_DISK',
144
144
  }, options);
@@ -452,7 +452,7 @@ export class VapixAPI extends BasicAPI {
452
452
  const appList = apps.map((app) => {
453
453
  return {
454
454
  ...app,
455
- appId: APP_IDS.find((id) => id.toLowerCase() === app.Name.toLowerCase()) ?? null,
455
+ appId: ALL_APP_IDS.find((id) => id.toLowerCase() === app.Name.toLowerCase()) ?? null,
456
456
  };
457
457
  });
458
458
  return applicationListSchema.parse(appList);
@@ -33,9 +33,8 @@ export const APP_IDS = [
33
33
  'CamScripter',
34
34
  'PlaneTracker',
35
35
  'Ndihxplugin',
36
- 'SportTracker',
37
- 'CamOverlayHtmlplugin',
38
36
  ];
37
+ export const ALL_APP_IDS = [...APP_IDS, 'SportTracker', 'CamOverlayHtmlplugin'];
39
38
  export const guardTourSchema = z.object({
40
39
  id: z.string(),
41
40
  camNbr: z.unknown(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.146",
3
+ "version": "4.0.0-beta.148",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -71,10 +71,12 @@ export declare const applicationListSchema: z.ZodArray<z.ZodObject<{
71
71
  VendorHomePage?: string | undefined;
72
72
  LicenseName?: string | undefined;
73
73
  }>, "many">;
74
- export declare const APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin", "SportTracker", "CamOverlayHtmlplugin"];
74
+ export declare const APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin"];
75
+ export declare const ALL_APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin", "SportTracker", "CamOverlayHtmlplugin"];
75
76
  export type TApplicationId = (typeof APP_IDS)[number];
76
77
  export type TApplicationList = z.infer<typeof applicationListSchema>;
77
78
  export type TApplication = z.infer<typeof applicationListSchema>[number];
79
+ export type TAllApplicationId = (typeof ALL_APP_IDS)[number];
78
80
  export declare const guardTourSchema: z.ZodObject<{
79
81
  id: z.ZodString;
80
82
  camNbr: z.ZodUnknown;