@kohost/api-client 4.19.8-beta.0 → 4.19.8
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/dist/cjs/models/session.cjs +2 -3
- package/dist/cjs/models/session.cjs.map +1 -1
- package/dist/cjs/schemas/definitions.cjs +1 -0
- package/dist/cjs/schemas/definitions.cjs.map +1 -1
- package/dist/cjs/schemas/definitions.d.cts +1 -1
- package/dist/cjs/schemas/session.cjs +3 -1
- package/dist/cjs/schemas/session.cjs.map +1 -1
- package/dist/cjs/schemas/session.d.cts +1 -1
- package/dist/cjs/validate.d.cts +6 -0
- package/dist/esm/models/session.js +2 -3
- package/dist/esm/models/session.js.map +1 -1
- package/dist/esm/schemas/definitions.d.ts +1 -1
- package/dist/esm/schemas/definitions.js +1 -0
- package/dist/esm/schemas/definitions.js.map +1 -1
- package/dist/esm/schemas/session.d.ts +1 -1
- package/dist/esm/schemas/session.js +3 -1
- package/dist/esm/schemas/session.js.map +1 -1
- package/dist/esm/validate.d.ts +6 -0
- package/package.json +1 -1
|
@@ -33,11 +33,10 @@ class Session extends import_entity.Entity {
|
|
|
33
33
|
this.id = data.id;
|
|
34
34
|
this.type = data.type;
|
|
35
35
|
this.userId = data.userId;
|
|
36
|
-
|
|
37
|
-
this.organizationId = data.organizationId;
|
|
36
|
+
this.organizationId = data.organizationId;
|
|
38
37
|
this.userAgent = data.userAgent;
|
|
39
38
|
this.expires = data.expires;
|
|
40
|
-
|
|
39
|
+
this.data = data.data;
|
|
41
40
|
if (data.createdAt !== void 0) this.createdAt = data.createdAt;
|
|
42
41
|
if (data.updatedAt !== void 0) this.updatedAt = data.updatedAt;
|
|
43
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/models/session.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateSession as validate } from \"../validate.js\";\nimport { sessionSchema, type SessionSchema } from \"../schemas/session.js\";\n\n/**\n * Data type for Session constructor - exported for backwards compatibility\n */\nexport type SessionData = SessionSchema;\n\n/**\n * Session\n */\nexport interface Session extends SessionSchema {}\nexport class Session extends Entity {\n declare schema: typeof sessionSchema;\n declare validator: typeof validate;\n\n constructor(data: SessionSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.userId = data.userId;\n
|
|
1
|
+
{"version":3,"sources":["../../../.generated/models/session.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateSession as validate } from \"../validate.js\";\nimport { sessionSchema, type SessionSchema } from \"../schemas/session.js\";\n\n/**\n * Data type for Session constructor - exported for backwards compatibility\n */\nexport type SessionData = SessionSchema;\n\n/**\n * Session\n */\nexport interface Session extends SessionSchema {}\nexport class Session extends Entity {\n declare schema: typeof sessionSchema;\n declare validator: typeof validate;\n\n constructor(data: SessionSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.userId = data.userId;\n this.organizationId = data.organizationId;\n this.userAgent = data.userAgent;\n this.expires = data.expires;\n this.data = data.data;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n }\n}\n\nObject.defineProperty(Session.prototype, \"schema\", {\n value: sessionSchema,\n});\n\nObject.defineProperty(Session.prototype, \"validator\", {\n get: function () {\n return validate;\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAAuB;AACvB,sBAA4C;AAC5C,qBAAkD;AAW3C,MAAM,gBAAgB,qBAAO;AAAA,EAfpC,OAeoC;AAAA;AAAA;AAAA,EAIlC,YAAY,MAAqB;AAC/B,UAAM,IAAI;AACV,SAAK,KAAK,KAAK;AACf,SAAK,OAAO,KAAK;AACjB,SAAK,SAAS,KAAK;AACnB,SAAK,iBAAiB,KAAK;AAC3B,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,KAAK;AACpB,SAAK,OAAO,KAAK;AACjB,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AAAA,EAC1D;AACF;AAEA,OAAO,eAAe,QAAQ,WAAW,UAAU;AAAA,EACjD,OAAO;AACT,CAAC;AAED,OAAO,eAAe,QAAQ,WAAW,aAAa;AAAA,EACpD,KAAK,kCAAY;AACf,WAAO,gBAAAA;AAAA,EACT,GAFK;AAGP,CAAC;","names":["validate"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"newline\",\n \"paxton\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA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,MACb,OAAO;AAAA,QACL,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"newline\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MA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IACA,cAAc;AAAA,MACZ,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
@@ -75,7 +75,7 @@ declare const defs: {
|
|
|
75
75
|
readonly driver: {
|
|
76
76
|
readonly type: "string";
|
|
77
77
|
readonly description: "Driver used to communicate with the object.";
|
|
78
|
-
readonly enum: readonly ["adlink", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lg", "lg-webos", "lapi", "lirc", "mews", "mht", "newline", "paxton", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
78
|
+
readonly enum: readonly ["adlink", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lg", "lg-webos", "lapi", "lirc", "mews", "mht", "newline", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
79
79
|
};
|
|
80
80
|
readonly type: {
|
|
81
81
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/session.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { policySchema } from \"./policy\";\n\nexport const sessionSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"session.json\",\n title: \"Session\",\n type: \"object\",\n required: [\n \"id\",\n \"type\",\n \"userId\",\n \"userAgent\",\n \"expires\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"session\",\n enum: [\"session\"],\n },\n userId: {\n type: \"string\",\n },\n organizationId: {\n type: \"string\",\n },\n userAgent: {\n type: \"string\",\n },\n expires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n data: {\n type: \"object\",\n additionalProperties: true,\n required: [\"phoneVerified\", \"properties\", \"organizationId\"],\n properties: {\n phoneVerified: {\n type: \"boolean\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n spaces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n rooms: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n $ref: \"policy.json#\",\n },\n },\n },\n },\n },\n organizationId: {\n type: \"string\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SessionSchema = FromSchema<\n typeof sessionSchema,\n {\n references: [typeof defs, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,SAAS;AAAA,IAClB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,UAAU,CAAC,iBAAiB,cAAc,gBAAgB;AAAA,MAC1D,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,QACR;AAAA,QACA,YAAY;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,IAAI;AAAA,gBACF,MAAM;AAAA,cACR;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,gBAAgB;AAAA,UACd,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/session.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { policySchema } from \"./policy\";\n\nexport const sessionSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"session.json\",\n title: \"Session\",\n type: \"object\",\n required: [\n \"id\",\n \"type\",\n \"userId\",\n \"organizationId\",\n \"userAgent\",\n \"expires\",\n \"data\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"session\",\n enum: [\"session\"],\n },\n userId: {\n type: \"string\",\n },\n organizationId: {\n type: \"string\",\n },\n userAgent: {\n type: \"string\",\n },\n expires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n data: {\n type: \"object\",\n additionalProperties: true,\n required: [\"phoneVerified\", \"properties\", \"organizationId\"],\n properties: {\n phoneVerified: {\n type: \"boolean\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n spaces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n rooms: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n $ref: \"policy.json#\",\n },\n },\n },\n },\n },\n organizationId: {\n type: \"string\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SessionSchema = FromSchema<\n typeof sessionSchema,\n {\n references: [typeof defs, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,SAAS;AAAA,IAClB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,UAAU,CAAC,iBAAiB,cAAc,gBAAgB;AAAA,MAC1D,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,QACR;AAAA,QACA,YAAY;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,IAAI;AAAA,gBACF,MAAM;AAAA,cACR;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,gBAAgB;AAAA,UACd,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -7,7 +7,7 @@ declare const sessionSchema: {
|
|
|
7
7
|
readonly $id: "session.json";
|
|
8
8
|
readonly title: "Session";
|
|
9
9
|
readonly type: "object";
|
|
10
|
-
readonly required: readonly ["id", "type", "userId", "userAgent", "expires"];
|
|
10
|
+
readonly required: readonly ["id", "type", "userId", "organizationId", "userAgent", "expires", "data"];
|
|
11
11
|
readonly additionalProperties: false;
|
|
12
12
|
readonly properties: {
|
|
13
13
|
readonly id: {
|
package/dist/cjs/validate.d.cts
CHANGED
|
@@ -495,17 +495,23 @@ declare const validateServer: ajv.ValidateFunction<{
|
|
|
495
495
|
type: any;
|
|
496
496
|
}>;
|
|
497
497
|
declare const validateSession: ajv.ValidateFunction<{
|
|
498
|
+
data: any;
|
|
498
499
|
id: any;
|
|
499
500
|
type: any;
|
|
500
501
|
expires: any;
|
|
502
|
+
organizationId: any;
|
|
501
503
|
userId: any;
|
|
502
504
|
userAgent: any;
|
|
505
|
+
} & {
|
|
506
|
+
data: any;
|
|
503
507
|
} & {
|
|
504
508
|
id: any;
|
|
505
509
|
} & {
|
|
506
510
|
type: any;
|
|
507
511
|
} & {
|
|
508
512
|
expires: any;
|
|
513
|
+
} & {
|
|
514
|
+
organizationId: any;
|
|
509
515
|
} & {
|
|
510
516
|
userId: any;
|
|
511
517
|
} & {
|
|
@@ -12,11 +12,10 @@ class Session extends Entity {
|
|
|
12
12
|
this.id = data.id;
|
|
13
13
|
this.type = data.type;
|
|
14
14
|
this.userId = data.userId;
|
|
15
|
-
|
|
16
|
-
this.organizationId = data.organizationId;
|
|
15
|
+
this.organizationId = data.organizationId;
|
|
17
16
|
this.userAgent = data.userAgent;
|
|
18
17
|
this.expires = data.expires;
|
|
19
|
-
|
|
18
|
+
this.data = data.data;
|
|
20
19
|
if (data.createdAt !== void 0) this.createdAt = data.createdAt;
|
|
21
20
|
if (data.updatedAt !== void 0) this.updatedAt = data.updatedAt;
|
|
22
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/models/session.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateSession as validate } from \"../validate.js\";\nimport { sessionSchema, type SessionSchema } from \"../schemas/session.js\";\n\n/**\n * Data type for Session constructor - exported for backwards compatibility\n */\nexport type SessionData = SessionSchema;\n\n/**\n * Session\n */\nexport interface Session extends SessionSchema {}\nexport class Session extends Entity {\n declare schema: typeof sessionSchema;\n declare validator: typeof validate;\n\n constructor(data: SessionSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.userId = data.userId;\n
|
|
1
|
+
{"version":3,"sources":["../../../.generated/models/session.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateSession as validate } from \"../validate.js\";\nimport { sessionSchema, type SessionSchema } from \"../schemas/session.js\";\n\n/**\n * Data type for Session constructor - exported for backwards compatibility\n */\nexport type SessionData = SessionSchema;\n\n/**\n * Session\n */\nexport interface Session extends SessionSchema {}\nexport class Session extends Entity {\n declare schema: typeof sessionSchema;\n declare validator: typeof validate;\n\n constructor(data: SessionSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.userId = data.userId;\n this.organizationId = data.organizationId;\n this.userAgent = data.userAgent;\n this.expires = data.expires;\n this.data = data.data;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n }\n}\n\nObject.defineProperty(Session.prototype, \"schema\", {\n value: sessionSchema,\n});\n\nObject.defineProperty(Session.prototype, \"validator\", {\n get: function () {\n return validate;\n },\n});\n"],"mappings":";;AAEA,SAAS,cAAc;AACvB,SAAS,mBAAmB,gBAAgB;AAC5C,SAAS,qBAAyC;AAW3C,MAAM,gBAAgB,OAAO;AAAA,EAfpC,OAeoC;AAAA;AAAA;AAAA,EAIlC,YAAY,MAAqB;AAC/B,UAAM,IAAI;AACV,SAAK,KAAK,KAAK;AACf,SAAK,OAAO,KAAK;AACjB,SAAK,SAAS,KAAK;AACnB,SAAK,iBAAiB,KAAK;AAC3B,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,KAAK;AACpB,SAAK,OAAO,KAAK;AACjB,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AAAA,EAC1D;AACF;AAEA,OAAO,eAAe,QAAQ,WAAW,UAAU;AAAA,EACjD,OAAO;AACT,CAAC;AAED,OAAO,eAAe,QAAQ,WAAW,aAAa;AAAA,EACpD,KAAK,kCAAY;AACf,WAAO;AAAA,EACT,GAFK;AAGP,CAAC;","names":[]}
|
|
@@ -75,7 +75,7 @@ declare const defs: {
|
|
|
75
75
|
readonly driver: {
|
|
76
76
|
readonly type: "string";
|
|
77
77
|
readonly description: "Driver used to communicate with the object.";
|
|
78
|
-
readonly enum: readonly ["adlink", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lg", "lg-webos", "lapi", "lirc", "mews", "mht", "newline", "paxton", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
78
|
+
readonly enum: readonly ["adlink", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lg", "lg-webos", "lapi", "lirc", "mews", "mht", "newline", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
79
79
|
};
|
|
80
80
|
readonly type: {
|
|
81
81
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"newline\",\n \"paxton\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":"AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UAC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A;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"newline\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":"AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,YAAY;AAAA,QACV,IAAI;AAAA,UACF,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,MAAM;AAAA,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A,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
@@ -7,7 +7,7 @@ declare const sessionSchema: {
|
|
|
7
7
|
readonly $id: "session.json";
|
|
8
8
|
readonly title: "Session";
|
|
9
9
|
readonly type: "object";
|
|
10
|
-
readonly required: readonly ["id", "type", "userId", "userAgent", "expires"];
|
|
10
|
+
readonly required: readonly ["id", "type", "userId", "organizationId", "userAgent", "expires", "data"];
|
|
11
11
|
readonly additionalProperties: false;
|
|
12
12
|
readonly properties: {
|
|
13
13
|
readonly id: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/session.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { policySchema } from \"./policy\";\n\nexport const sessionSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"session.json\",\n title: \"Session\",\n type: \"object\",\n required: [\n \"id\",\n \"type\",\n \"userId\",\n \"userAgent\",\n \"expires\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"session\",\n enum: [\"session\"],\n },\n userId: {\n type: \"string\",\n },\n organizationId: {\n type: \"string\",\n },\n userAgent: {\n type: \"string\",\n },\n expires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n data: {\n type: \"object\",\n additionalProperties: true,\n required: [\"phoneVerified\", \"properties\", \"organizationId\"],\n properties: {\n phoneVerified: {\n type: \"boolean\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n spaces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n rooms: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n $ref: \"policy.json#\",\n },\n },\n },\n },\n },\n organizationId: {\n type: \"string\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SessionSchema = FromSchema<\n typeof sessionSchema,\n {\n references: [typeof defs, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,SAAS;AAAA,IAClB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,UAAU,CAAC,iBAAiB,cAAc,gBAAgB;AAAA,MAC1D,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,QACR;AAAA,QACA,YAAY;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,IAAI;AAAA,gBACF,MAAM;AAAA,cACR;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,gBAAgB;AAAA,UACd,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/session.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { policySchema } from \"./policy\";\n\nexport const sessionSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"session.json\",\n title: \"Session\",\n type: \"object\",\n required: [\n \"id\",\n \"type\",\n \"userId\",\n \"organizationId\",\n \"userAgent\",\n \"expires\",\n \"data\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"session\",\n enum: [\"session\"],\n },\n userId: {\n type: \"string\",\n },\n organizationId: {\n type: \"string\",\n },\n userAgent: {\n type: \"string\",\n },\n expires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n data: {\n type: \"object\",\n additionalProperties: true,\n required: [\"phoneVerified\", \"properties\", \"organizationId\"],\n properties: {\n phoneVerified: {\n type: \"boolean\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n spaces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n rooms: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n $ref: \"policy.json#\",\n },\n },\n },\n },\n },\n organizationId: {\n type: \"string\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SessionSchema = FromSchema<\n typeof sessionSchema,\n {\n references: [typeof defs, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,SAAS;AAAA,IAClB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,UAAU,CAAC,iBAAiB,cAAc,gBAAgB;AAAA,MAC1D,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,QACR;AAAA,QACA,YAAY;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,IAAI;AAAA,gBACF,MAAM;AAAA,cACR;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,OAAO;AAAA,gBACL,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,cACA,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,OAAO;AAAA,kBACL,MAAM;AAAA,gBACR;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,gBAAgB;AAAA,UACd,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
package/dist/esm/validate.d.ts
CHANGED
|
@@ -495,17 +495,23 @@ declare const validateServer: ajv.ValidateFunction<{
|
|
|
495
495
|
type: any;
|
|
496
496
|
}>;
|
|
497
497
|
declare const validateSession: ajv.ValidateFunction<{
|
|
498
|
+
data: any;
|
|
498
499
|
id: any;
|
|
499
500
|
type: any;
|
|
500
501
|
expires: any;
|
|
502
|
+
organizationId: any;
|
|
501
503
|
userId: any;
|
|
502
504
|
userAgent: any;
|
|
505
|
+
} & {
|
|
506
|
+
data: any;
|
|
503
507
|
} & {
|
|
504
508
|
id: any;
|
|
505
509
|
} & {
|
|
506
510
|
type: any;
|
|
507
511
|
} & {
|
|
508
512
|
expires: any;
|
|
513
|
+
} & {
|
|
514
|
+
organizationId: any;
|
|
509
515
|
} & {
|
|
510
516
|
userId: any;
|
|
511
517
|
} & {
|