@awarevue/api-types 1.0.108 → 1.0.109

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,12 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.presenceTrackerEventSchemaByKind = exports.sPersonOut = exports.sPersonIn = exports.PRESENCE_TRACKER = void 0;
3
+ exports.presenceTrackerEventSchemaByKind = exports.sPersonOut = exports.sPersonIn = exports.presenceTrackerCommands = exports.sTogglePresenceCommand = exports.sCheckOutPersonCommand = exports.sCheckInPersonCommand = exports.PRESENCE_TRACKER = void 0;
4
+ const primitives_1 = require("src/primitives");
4
5
  const zod_1 = require("zod");
5
6
  exports.PRESENCE_TRACKER = 'presence-tracker';
7
+ // COMMANDS
8
+ exports.sCheckInPersonCommand = zod_1.z.object({
9
+ command: zod_1.z.literal('presence-tracker.check-in'),
10
+ params: zod_1.z.object({
11
+ personId: primitives_1.sPersonId,
12
+ zoneId: primitives_1.sZoneId.nullable(),
13
+ }),
14
+ });
15
+ exports.sCheckOutPersonCommand = zod_1.z.object({
16
+ command: zod_1.z.literal('presence-tracker.check-out'),
17
+ params: zod_1.z.object({
18
+ personId: primitives_1.sPersonId,
19
+ zoneId: primitives_1.sZoneId.nullable(),
20
+ leave: zod_1.z.boolean(),
21
+ }),
22
+ });
23
+ exports.sTogglePresenceCommand = zod_1.z.object({
24
+ command: zod_1.z.literal('presence-tracker.toggle-presence'),
25
+ params: zod_1.z.object({
26
+ personId: primitives_1.sPersonId,
27
+ zoneId: primitives_1.sZoneId.nullable(),
28
+ }),
29
+ });
30
+ exports.presenceTrackerCommands = {
31
+ 'presence-tracker.check-in': exports.sCheckInPersonCommand,
32
+ 'presence-tracker.check-out': exports.sCheckOutPersonCommand,
33
+ 'presence-tracker.toggle-presence': exports.sTogglePresenceCommand,
34
+ };
6
35
  // EVENTS
7
36
  exports.sPersonIn = zod_1.z.object({
8
37
  kind: zod_1.z.literal('person-in'),
9
- personId: zod_1.z.string().nonempty(),
38
+ personId: primitives_1.sPersonId,
10
39
  personFirstName: zod_1.z.string().nonempty(),
11
40
  personLastName: zod_1.z.string().nonempty(),
12
41
  personAvatarId: zod_1.z.string().nullable(),
@@ -14,7 +43,7 @@ exports.sPersonIn = zod_1.z.object({
14
43
  });
15
44
  exports.sPersonOut = zod_1.z.object({
16
45
  kind: zod_1.z.literal('person-out'),
17
- personId: zod_1.z.string().nonempty(),
46
+ personId: primitives_1.sPersonId,
18
47
  personFirstName: zod_1.z.string().nonempty(),
19
48
  personLastName: zod_1.z.string().nonempty(),
20
49
  personAvatarId: zod_1.z.string().nullable(),
@@ -3,12 +3,49 @@ import { ModuleConfig, ModuleConfigMetadata } from '../module-config';
3
3
  import { AccessControlCapabilityReport } from '../agent-communication';
4
4
  import { ObjectKinds } from 'src/objects';
5
5
  export declare const SERVER = "server";
6
- export interface RunMacro {
7
- command: 'server.run-macro';
6
+ export declare const sRunMacroCommand: z.ZodObject<{
7
+ command: z.ZodLiteral<"server.run-macro">;
8
+ params: z.ZodObject<{
9
+ macroId: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ macroId: string;
12
+ }, {
13
+ macroId: string;
14
+ }>;
15
+ }, "strip", z.ZodTypeAny, {
8
16
  params: {
9
17
  macroId: string;
10
18
  };
11
- }
19
+ command: "server.run-macro";
20
+ }, {
21
+ params: {
22
+ macroId: string;
23
+ };
24
+ command: "server.run-macro";
25
+ }>;
26
+ export type RunMacro = z.infer<typeof sRunMacroCommand>;
27
+ export declare const serverCommands: {
28
+ readonly 'server.run-macro': z.ZodObject<{
29
+ command: z.ZodLiteral<"server.run-macro">;
30
+ params: z.ZodObject<{
31
+ macroId: z.ZodString;
32
+ }, "strip", z.ZodTypeAny, {
33
+ macroId: string;
34
+ }, {
35
+ macroId: string;
36
+ }>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ params: {
39
+ macroId: string;
40
+ };
41
+ command: "server.run-macro";
42
+ }, {
43
+ params: {
44
+ macroId: string;
45
+ };
46
+ command: "server.run-macro";
47
+ }>;
48
+ };
12
49
  export type ServerCommand = RunMacro;
13
50
  export type AccessControlProviderState = AccessControlCapabilityReport & {
14
51
  syncInProgress: boolean;
@@ -31,12 +68,12 @@ export declare const sAgentStarted: z.ZodObject<{
31
68
  providers: z.ZodArray<z.ZodString, "many">;
32
69
  }, "strip", z.ZodTypeAny, {
33
70
  kind: "agent-started";
34
- agent: string;
35
71
  providers: string[];
72
+ agent: string;
36
73
  }, {
37
74
  kind: "agent-started";
38
- agent: string;
39
75
  providers: string[];
76
+ agent: string;
40
77
  }>;
41
78
  export declare const sAgentStopped: z.ZodObject<{
42
79
  kind: z.ZodLiteral<"agent-stopped">;
@@ -44,12 +81,12 @@ export declare const sAgentStopped: z.ZodObject<{
44
81
  providers: z.ZodArray<z.ZodString, "many">;
45
82
  }, "strip", z.ZodTypeAny, {
46
83
  kind: "agent-stopped";
47
- agent: string;
48
84
  providers: string[];
85
+ agent: string;
49
86
  }, {
50
87
  kind: "agent-stopped";
51
- agent: string;
52
88
  providers: string[];
89
+ agent: string;
53
90
  }>;
54
91
  export type AgentStarted = z.infer<typeof sAgentStarted>;
55
92
  export type AgentStopped = z.infer<typeof sAgentStopped>;
@@ -1,8 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sAgentStopped = exports.sAgentStarted = exports.SERVER = void 0;
3
+ exports.sAgentStopped = exports.sAgentStarted = exports.serverCommands = exports.sRunMacroCommand = exports.SERVER = void 0;
4
4
  const zod_1 = require("zod");
5
+ const primitives_1 = require("src/primitives");
5
6
  exports.SERVER = 'server';
7
+ // SPECS
8
+ // COMMANDS
9
+ exports.sRunMacroCommand = zod_1.z.object({
10
+ command: zod_1.z.literal('server.run-macro'),
11
+ params: zod_1.z.object({
12
+ macroId: primitives_1.sMacroId,
13
+ }),
14
+ });
15
+ exports.serverCommands = {
16
+ 'server.run-macro': exports.sRunMacroCommand,
17
+ };
6
18
  // EVENTS
7
19
  exports.sAgentStarted = zod_1.z.object({
8
20
  kind: zod_1.z.literal('agent-started'),