@kohost/api-client 3.1.23 → 3.2.0

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.
Files changed (73) hide show
  1. package/dist/cjs/Client/index.js +471 -62
  2. package/dist/cjs/Models/Policy.js +34 -0
  3. package/dist/cjs/Models/User.js +17 -2
  4. package/dist/cjs/Models/index.js +2 -2
  5. package/dist/cjs/SocketIoClient/index.js +4 -0
  6. package/dist/cjs/index.js +1 -1
  7. package/dist/cjs/schemas/AnnouncementSchema.d.ts +1 -1
  8. package/dist/cjs/schemas/CategorySchema.d.ts +1 -1
  9. package/dist/cjs/schemas/CredentialSchema.d.ts +3 -3
  10. package/dist/cjs/schemas/DeviceRouterSchema.d.ts +1 -1
  11. package/dist/cjs/schemas/EmailMessageSchema.d.ts +1 -1
  12. package/dist/cjs/schemas/MediaFileSchema.d.ts +1 -1
  13. package/dist/cjs/schemas/MediaSourceSchema.d.ts +6 -1
  14. package/dist/cjs/schemas/OrderSchema.d.ts +7 -2
  15. package/dist/cjs/schemas/OrganizationSchema.d.ts +1 -1
  16. package/dist/cjs/schemas/PolicySchema.d.ts +25 -0
  17. package/dist/cjs/schemas/ProductSchema.d.ts +2 -2
  18. package/dist/cjs/schemas/PropertySchema.d.ts +2 -2
  19. package/dist/cjs/schemas/ReservationSchema.d.ts +1 -1
  20. package/dist/cjs/schemas/RoomSchema.d.ts +7 -1
  21. package/dist/cjs/schemas/SceneSchema.d.ts +1 -0
  22. package/dist/cjs/schemas/ShortLinkSchema.d.ts +1 -1
  23. package/dist/cjs/schemas/SmsMessageSchema.d.ts +1 -1
  24. package/dist/cjs/schemas/SpaceSchema.d.ts +1 -1
  25. package/dist/cjs/schemas/SystemUserSchema.d.ts +3 -3
  26. package/dist/cjs/schemas/TicketSchema.d.ts +2 -1
  27. package/dist/cjs/schemas/TimeSheetSchema.d.ts +1 -1
  28. package/dist/cjs/schemas/UserSchema.d.ts +26 -12
  29. package/dist/cjs/schemas/camera.json +2 -1
  30. package/dist/cjs/schemas/credential.json +3 -3
  31. package/dist/cjs/schemas/deviceRouter.json +2 -1
  32. package/dist/cjs/schemas/emailMessage.json +2 -1
  33. package/dist/cjs/schemas/mediaFile.json +2 -1
  34. package/dist/cjs/schemas/mediaSource.json +7 -1
  35. package/dist/cjs/schemas/order.json +10 -2
  36. package/dist/cjs/schemas/organization.json +2 -1
  37. package/dist/cjs/schemas/policy.json +62 -0
  38. package/dist/cjs/schemas/product.json +2 -1
  39. package/dist/cjs/schemas/property.json +3 -2
  40. package/dist/cjs/schemas/reservation.json +2 -1
  41. package/dist/cjs/schemas/room.json +5 -0
  42. package/dist/cjs/schemas/scene.json +5 -0
  43. package/dist/cjs/schemas/shortLink.json +2 -1
  44. package/dist/cjs/schemas/smsMessage.json +2 -1
  45. package/dist/cjs/schemas/space.json +2 -1
  46. package/dist/cjs/schemas/systemUser.json +10 -2
  47. package/dist/cjs/schemas/ticket.json +5 -0
  48. package/dist/cjs/schemas/timeSheet.json +1 -1
  49. package/dist/cjs/schemas/user.json +23 -26
  50. package/dist/cjs/utils/entityFactory.js +80 -0
  51. package/dist/cjs/utils/index.js +2 -0
  52. package/dist/esm/Client.js +473 -64
  53. package/dist/esm/Client.js.map +3 -3
  54. package/dist/esm/Models.js +215 -50
  55. package/dist/esm/Models.js.map +3 -3
  56. package/dist/esm/SocketIoClient.js +41 -17
  57. package/dist/esm/SocketIoClient.js.map +2 -2
  58. package/dist/esm/defs.js +33 -24
  59. package/dist/esm/defs.js.map +2 -2
  60. package/dist/esm/utils.js +5975 -1
  61. package/dist/esm/utils.js.map +4 -4
  62. package/dist/useCases/CreatePolicy.js +32 -0
  63. package/dist/useCases/DeletePolicy.js +32 -0
  64. package/dist/useCases/{SetCustomScene.js → DescribePolicy.js} +3 -3
  65. package/dist/useCases/DescribeReservationPetProducts.js +32 -0
  66. package/dist/useCases/DescribeReservationPromos.js +32 -0
  67. package/dist/useCases/ListPolicies.js +32 -0
  68. package/dist/useCases/ListProducts.js +32 -0
  69. package/dist/useCases/PurchaseReservationPetProducts.js +32 -0
  70. package/dist/useCases/PurchaseReservationPromos.js +32 -0
  71. package/dist/useCases/SetScene.js +32 -0
  72. package/dist/useCases/UpdatePolicy.js +32 -0
  73. package/package.json +4 -4
@@ -0,0 +1,34 @@
1
+ const schemas = require("../utils/schema");
2
+ const schema = require("../schemas/policy.json");
3
+ const Entity = require("./Entity");
4
+
5
+ schemas.add(schema);
6
+ const validator = schemas.compile(schema);
7
+
8
+ class Policy extends Entity {
9
+ /**
10
+ * @typedef {import("../schemas/PolicySchema").Policy} PolicyType
11
+ * Create a Permission Policy instance.
12
+ * @constructor
13
+ * @param {PolicyType} policy - The policy object of type PolicyType.
14
+ */
15
+ constructor(policy) {
16
+ super(policy);
17
+ }
18
+ }
19
+
20
+ Object.defineProperty(Policy.prototype, "schema", {
21
+ value: schema,
22
+ });
23
+
24
+ Object.defineProperty(Policy.prototype, "validator", {
25
+ get: function () {
26
+ return validator;
27
+ },
28
+ });
29
+
30
+ Object.defineProperty(Policy, "validProperties", {
31
+ value: Object.keys(schema.properties),
32
+ });
33
+
34
+ module.exports = Policy;
@@ -5,6 +5,7 @@ const paymentSchema = require("../schemas/payment.json");
5
5
  const Entity = require("./Entity");
6
6
  const MediaFile = require("./MediaFile");
7
7
  const Reservation = require("./Reservation");
8
+ const Policy = require("./Policy");
8
9
  const Identification = require("./Identification");
9
10
 
10
11
  const { nanoid } = require("nanoid/async");
@@ -23,12 +24,26 @@ class User extends Entity {
23
24
  */
24
25
  constructor(user) {
25
26
  if (user.photo) user.photo = new MediaFile(user.photo);
26
- if (user.reservations)
27
+ if (user.reservations) {
27
28
  user.reservations = user.reservations.map((res) => new Reservation(res));
28
- if (user.identifications)
29
+ }
30
+
31
+ if (user.identifications) {
29
32
  user.identifications = user.identifications.map(
30
33
  (id) => new Identification(id)
31
34
  );
35
+ }
36
+
37
+ if (user.permissions) {
38
+ user.permissions = user.permissions.map((permission) => {
39
+ if (permission.policies && Array.isArray(permission.policies)) {
40
+ permission.policies = permission.policies.map(
41
+ (policy) => new Policy(policy)
42
+ );
43
+ }
44
+ return permission;
45
+ });
46
+ }
32
47
 
33
48
  super(user);
34
49
  }
@@ -7,6 +7,7 @@ const Lock = require("./Lock");
7
7
  const Thermostat = require("./Thermostat");
8
8
  const WindowCovering = require("./WindowCovering");
9
9
  const Identification = require("./Identification");
10
+ const Policy = require("./Policy");
10
11
  const User = require("./User");
11
12
  const SystemUser = require("./SystemUser");
12
13
  const Courtesy = require("./Courtesy");
@@ -14,10 +15,8 @@ const Camera = require("./Camera");
14
15
  const MotionSensor = require("./MotionSensor");
15
16
  const MediaSource = require("./MediaSource");
16
17
  const Room = require("./Room");
17
-
18
18
  const Space = require("./Space");
19
19
  const Category = require("./Category");
20
-
21
20
  const Ticket = require("./Ticket");
22
21
  const Scene = require("./Scene");
23
22
  const Gateway = require("./Gateway");
@@ -76,4 +75,5 @@ module.exports = {
76
75
  Order,
77
76
  Announcement,
78
77
  TimeSheet,
78
+ Policy,
79
79
  };
@@ -81,6 +81,10 @@ module.exports = class SocketIoClient extends EventEmitter {
81
81
  this.socket.off(event, callback);
82
82
  }
83
83
 
84
+ getSubscriptions(event) {
85
+ return this.socket.listeners(event);
86
+ }
87
+
84
88
  send(event, { data = {}, query = {}, ...rest }) {
85
89
  this.socket.emit(event, { data, query, ...rest });
86
90
  }
package/dist/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ const Kohost = {
17
17
  SocketIoClient,
18
18
  AMQPClient,
19
19
  defs,
20
- utils: utils,
20
+ utils,
21
21
  };
22
22
 
23
23
  module.exports = Kohost;
@@ -34,7 +34,7 @@ export interface Announcement {
34
34
  */
35
35
  export interface MediaFile {
36
36
  id?: string;
37
- type: string;
37
+ type: "mediaFile";
38
38
  name?: string;
39
39
  fileHash?: string;
40
40
  /**
@@ -59,7 +59,7 @@ export interface Category {
59
59
  */
60
60
  export interface MediaFile {
61
61
  id?: string;
62
- type: string;
62
+ type: "mediaFile";
63
63
  name?: string;
64
64
  fileHash?: string;
65
65
  /**
@@ -42,9 +42,9 @@ export interface Credential {
42
42
  | "insperia-privacy";
43
43
  discriminator?: "verificationCode" | "token" | "mobileKey" | "pin" | "publicKey" | "passkeyChallenge";
44
44
  credential: string;
45
- user?: string;
46
- organization?: string;
47
- property?: string;
45
+ userId?: string;
46
+ organizationId?: string;
47
+ propertyId?: string;
48
48
  deviceId?: string;
49
49
  userAgent?: string;
50
50
  expires:
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export interface DeviceRouter {
12
12
  id?: string;
13
- type?: string;
13
+ type?: "deviceRouter";
14
14
  driver: string;
15
15
  /**
16
16
  * Reference (id) to the organization that owns this router
@@ -13,7 +13,7 @@ export type Date =
13
13
 
14
14
  export interface EmailMessage {
15
15
  id?: string;
16
- type?: string;
16
+ type?: "emailMessage";
17
17
  to: string;
18
18
  /**
19
19
  * Must be in the format of 'Sender <email@example.com>
@@ -16,7 +16,7 @@ export type Date =
16
16
  */
17
17
  export interface MediaFile {
18
18
  id?: string;
19
- type: string;
19
+ type: "mediaFile";
20
20
  name?: string;
21
21
  fileHash?: string;
22
22
  /**
@@ -96,7 +96,7 @@ export type Notification = {
96
96
  */
97
97
  export interface MediaSource {
98
98
  id: string;
99
- type: string;
99
+ type: "mediaSource";
100
100
  discriminator: "tv" | "dvr" | "appleTv" | "discPlayer" | "mediaPlayer" | "paSystem" | "uncontrolledDevice";
101
101
  playlists?: {
102
102
  id?: string;
@@ -168,10 +168,15 @@ export interface MediaSource {
168
168
  | "display"
169
169
  | "favoriteChannel"
170
170
  | "play"
171
+ | "playing"
171
172
  | "stop"
173
+ | "stopped"
172
174
  | "pause"
175
+ | "paused"
173
176
  | "fastForward"
177
+ | "fastForwarding"
174
178
  | "rewind"
179
+ | "rewinding"
175
180
  | "instantReplay"
176
181
  | "record"
177
182
  | "ac3"
@@ -16,7 +16,7 @@ export type Date =
16
16
  */
17
17
  export interface Order {
18
18
  id?: string;
19
- type: string;
19
+ type: "order";
20
20
  orderNumber?: string;
21
21
  status:
22
22
  | "draft"
@@ -30,7 +30,11 @@ export interface Order {
30
30
  /**
31
31
  * User id of purchaser
32
32
  */
33
- user?: string;
33
+ userId?: string;
34
+ /**
35
+ * Reservation id if the order is for a reservation
36
+ */
37
+ reservationId?: string;
34
38
  date?: Date;
35
39
  items?: {
36
40
  additionalProperties?: never;
@@ -40,6 +44,7 @@ export interface Order {
40
44
  price: number;
41
45
  taxClass?: string;
42
46
  deliveryClass?: string;
47
+ productId?: string;
43
48
  [k: string]: unknown;
44
49
  }[];
45
50
  taxes?: {
@@ -21,7 +21,7 @@ export type UpdatedAt =
21
21
  */
22
22
  export interface Organization {
23
23
  id?: string;
24
- type?: string;
24
+ type?: "organization";
25
25
  accountNumber: number | null;
26
26
  name: string;
27
27
  properties?: string[];
@@ -0,0 +1,25 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * A policy is a set of permissions that can be applied to a user to limit their access to resources.
10
+ */
11
+ export interface Policy {
12
+ id?: string;
13
+ type: "policy";
14
+ discriminator: "user";
15
+ name: string;
16
+ description?: string;
17
+ organizationId: string;
18
+ propertyId: string;
19
+ permissions: {
20
+ entities: string[];
21
+ effect: "Allow" | "Deny";
22
+ [k: string]: unknown;
23
+ }[];
24
+ [k: string]: unknown;
25
+ }
@@ -13,7 +13,7 @@ export type Date =
13
13
 
14
14
  export interface Product {
15
15
  id?: string;
16
- type?: string;
16
+ type?: "product";
17
17
  name: string;
18
18
  driver:
19
19
  | "aws-kinesis"
@@ -64,7 +64,7 @@ export interface Product {
64
64
  */
65
65
  export interface MediaFile {
66
66
  id?: string;
67
- type: string;
67
+ type: "mediaFile";
68
68
  name?: string;
69
69
  fileHash?: string;
70
70
  /**
@@ -11,7 +11,7 @@
11
11
  export interface Property {
12
12
  id: string;
13
13
  name: string;
14
- type: string;
14
+ type: "property";
15
15
  discriminator?: "hospitality" | "education" | "commercial";
16
16
  /**
17
17
  * Reference (id) to the organization that owns this property
@@ -71,7 +71,7 @@ export interface Property {
71
71
  };
72
72
  roomUpgrades?: unknown;
73
73
  pet?: unknown;
74
- promo?: unknown;
74
+ promos?: unknown;
75
75
  [k: string]: unknown;
76
76
  };
77
77
  CheckOut?: {
@@ -54,7 +54,7 @@ export interface Reservation {
54
54
  | "cloudflare-stream"
55
55
  | "insperia-privacy";
56
56
  primaryGuest?: string;
57
- type: string;
57
+ type: "reservation";
58
58
  sharedGuests?: string[];
59
59
  spaceCategory?: string;
60
60
  space?: string | null;
@@ -106,6 +106,7 @@ export type UpdatedAt =
106
106
  */
107
107
  export interface Room {
108
108
  id?: string;
109
+ type?: "room";
109
110
  name?: string;
110
111
  floor?: string;
111
112
  dimmers?: Dimmer[];
@@ -788,7 +789,7 @@ export interface Camera {
788
789
  */
789
790
  export interface MediaSource {
790
791
  id: string;
791
- type: string;
792
+ type: "mediaSource";
792
793
  discriminator: "tv" | "dvr" | "appleTv" | "discPlayer" | "mediaPlayer" | "paSystem" | "uncontrolledDevice";
793
794
  playlists?: {
794
795
  id?: string;
@@ -860,10 +861,15 @@ export interface MediaSource {
860
861
  | "display"
861
862
  | "favoriteChannel"
862
863
  | "play"
864
+ | "playing"
863
865
  | "stop"
866
+ | "stopped"
864
867
  | "pause"
868
+ | "paused"
865
869
  | "fastForward"
870
+ | "fastForwarding"
866
871
  | "rewind"
872
+ | "rewinding"
867
873
  | "instantReplay"
868
874
  | "record"
869
875
  | "ac3"
@@ -12,6 +12,7 @@ export interface Scene {
12
12
  id?: string;
13
13
  name?: string;
14
14
  description?: string;
15
+ type?: "scene";
15
16
  devices?: {
16
17
  switches?: {
17
18
  id?: string;
@@ -7,7 +7,7 @@
7
7
 
8
8
  export interface ShortLink {
9
9
  id?: string;
10
- type?: string;
10
+ type?: "shortLink";
11
11
  title?: string;
12
12
  destination: {
13
13
  [k: string]: unknown;
@@ -13,7 +13,7 @@ export type Date =
13
13
 
14
14
  export interface SMSMessage {
15
15
  id?: string;
16
- type?: string;
16
+ type?: "smsMessage";
17
17
  to: string;
18
18
  from: string;
19
19
  media?: string;
@@ -8,7 +8,7 @@
8
8
  export interface Space {
9
9
  id?: string;
10
10
  name?: string;
11
- type?: string;
11
+ type?: "space";
12
12
  discriminator?:
13
13
  | "classRoom"
14
14
  | "hotelRoom"
@@ -42,7 +42,7 @@ export type UpdatedAt =
42
42
  */
43
43
  export interface SystemUser {
44
44
  id?: string;
45
- type?: string;
45
+ type?: "systemUser";
46
46
  driver?:
47
47
  | "aws-kinesis"
48
48
  | "butler"
@@ -84,7 +84,7 @@ export interface SystemUser {
84
84
  jobTitle?: string;
85
85
  dob?: string;
86
86
  gender?: "male" | "female";
87
- roles?: ("Guest" | "User" | "Manager" | "Administrator" | "SuperAdmin")[];
87
+ roles?: ("Guest" | "User" | "Manager" | "Maintenance" | "Administrator" | "SuperAdmin")[];
88
88
  nationality?: string;
89
89
  notes?: string[];
90
90
  files?: MediaFile[];
@@ -112,7 +112,7 @@ export interface Address {
112
112
  */
113
113
  export interface MediaFile {
114
114
  id?: string;
115
- type: string;
115
+ type: "mediaFile";
116
116
  name?: string;
117
117
  fileHash?: string;
118
118
  /**
@@ -50,6 +50,7 @@ export interface Ticket {
50
50
  [k: string]: unknown;
51
51
  };
52
52
  status: "open" | "pending" | "solved" | "closed";
53
+ priority?: "low" | "normal" | "high";
53
54
  tags: string[];
54
55
  rating?: number;
55
56
  ratingComment?: string;
@@ -65,7 +66,7 @@ export interface Ticket {
65
66
  */
66
67
  export interface MediaFile {
67
68
  id?: string;
68
- type: string;
69
+ type: "mediaFile";
69
70
  name?: string;
70
71
  fileHash?: string;
71
72
  /**
@@ -20,7 +20,7 @@ export interface TimeSheet {
20
20
  locked?: boolean;
21
21
  timeEntries?: {
22
22
  id?: string;
23
- discriminator: "working" | "driving" | "meeting";
23
+ discriminator: "working" | "driving" | "meeting" | "break";
24
24
  start:
25
25
  | string
26
26
  | {
@@ -57,18 +57,14 @@ export interface User {
57
57
  /**
58
58
  * The ID of the organization the permission is applies to.
59
59
  */
60
- organization: string;
60
+ organizationId: string;
61
61
  /**
62
62
  * The ID of the property the permission is applies to.
63
63
  */
64
- property: string;
65
- role: "Guest" | "User" | "Manager" | "Administrator" | "SuperAdmin";
66
- customPermissions?: {
67
- discriminator?: "RoomControl.spaces" | "Concierge.timeTracking";
68
- onlyIncludeIds?: string[];
69
- excludeSubSystems?: string[];
70
- [k: string]: unknown;
71
- }[];
64
+ propertyId: string;
65
+ role: "Guest" | "User" | "Manager" | "Maintenance" | "Administrator" | "SuperAdmin";
66
+ policyIds?: string[];
67
+ policies?: Policy[];
72
68
  }[];
73
69
  notes?: string[];
74
70
  files?: MediaFile[];
@@ -87,7 +83,7 @@ export interface User {
87
83
  updatedAt?: UpdatedAt;
88
84
  systems?: {
89
85
  systemId: string;
90
- property: string;
86
+ propertyId: string;
91
87
  driver: string;
92
88
  }[];
93
89
  [k: string]: unknown;
@@ -108,7 +104,7 @@ export interface Address {
108
104
  */
109
105
  export interface MediaFile {
110
106
  id?: string;
111
- type: string;
107
+ type: "mediaFile";
112
108
  name?: string;
113
109
  fileHash?: string;
114
110
  /**
@@ -137,6 +133,24 @@ export interface MediaFile {
137
133
  createdBy?: string;
138
134
  systemId?: string;
139
135
  }
136
+ /**
137
+ * A policy object populated from the policyIds array.
138
+ */
139
+ export interface Policy {
140
+ id?: string;
141
+ type: "policy";
142
+ discriminator: "user";
143
+ name: string;
144
+ description?: string;
145
+ organizationId: string;
146
+ propertyId: string;
147
+ permissions: {
148
+ entities: string[];
149
+ effect: "Allow" | "Deny";
150
+ [k: string]: unknown;
151
+ }[];
152
+ [k: string]: unknown;
153
+ }
140
154
  export interface Identification1 {
141
155
  id?: string;
142
156
  type: "driversLicense" | "passport" | "identityCard" | "visa";
@@ -231,7 +245,7 @@ export interface Reservation {
231
245
  | "cloudflare-stream"
232
246
  | "insperia-privacy";
233
247
  primaryGuest?: string;
234
- type: string;
248
+ type: "reservation";
235
249
  sharedGuests?: string[];
236
250
  spaceCategory?: string;
237
251
  space?: string | null;
@@ -12,7 +12,8 @@
12
12
  "type": "string"
13
13
  },
14
14
  "type": {
15
- "$ref": "definitions.json#/definitions/type"
15
+ "$ref": "definitions.json#/definitions/type",
16
+ "default": "camera"
16
17
  },
17
18
  "supportedNotifications": {
18
19
  "$ref": "definitions.json#/definitions/supportedNotifications"
@@ -29,13 +29,13 @@
29
29
  "credential": {
30
30
  "type": "string"
31
31
  },
32
- "user": {
32
+ "userId": {
33
33
  "type": "string"
34
34
  },
35
- "organization": {
35
+ "organizationId": {
36
36
  "type": "string"
37
37
  },
38
- "property": {
38
+ "propertyId": {
39
39
  "type": "string"
40
40
  },
41
41
  "deviceId": {
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "type": {
13
13
  "type": "string",
14
- "default": "deviceRouter"
14
+ "default": "deviceRouter",
15
+ "enum": ["deviceRouter"]
15
16
  },
16
17
  "driver": {
17
18
  "type": "string"
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "type": {
12
12
  "type": "string",
13
- "default": "emailMessage"
13
+ "default": "emailMessage",
14
+ "enum": ["emailMessage"]
14
15
  },
15
16
  "to": {
16
17
  "type": "string",
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "type": {
12
12
  "type": "string",
13
- "default": "mediaFile"
13
+ "default": "mediaFile",
14
+ "enum": ["mediaFile"]
14
15
  },
15
16
  "name": {
16
17
  "type": "string"
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "type": {
13
13
  "type": "string",
14
- "default": "mediaSource"
14
+ "default": "mediaSource",
15
+ "enum": ["mediaSource"]
15
16
  },
16
17
  "discriminator": {
17
18
  "type": "string",
@@ -107,10 +108,15 @@
107
108
  "display",
108
109
  "favoriteChannel",
109
110
  "play",
111
+ "playing",
110
112
  "stop",
113
+ "stopped",
111
114
  "pause",
115
+ "paused",
112
116
  "fastForward",
117
+ "fastForwarding",
113
118
  "rewind",
119
+ "rewinding",
114
120
  "instantReplay",
115
121
  "record",
116
122
  "ac3",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "type": {
13
13
  "type": "string",
14
- "default": "order"
14
+ "default": "order",
15
+ "enum": ["order"]
15
16
  },
16
17
  "orderNumber": {
17
18
  "type": "string"
@@ -29,10 +30,14 @@
29
30
  "refunded"
30
31
  ]
31
32
  },
32
- "user": {
33
+ "userId": {
33
34
  "$ref": "definitions.json#/definitions/id",
34
35
  "description": "User id of purchaser"
35
36
  },
37
+ "reservationId": {
38
+ "$ref": "definitions.json#/definitions/id",
39
+ "description": "Reservation id if the order is for a reservation"
40
+ },
36
41
  "date": {
37
42
  "$ref": "definitions.json#/definitions/date"
38
43
  },
@@ -62,6 +67,9 @@
62
67
  },
63
68
  "deliveryClass": {
64
69
  "type": "string"
70
+ },
71
+ "productId": {
72
+ "type": "string"
65
73
  }
66
74
  }
67
75
  }
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "type": {
13
13
  "type": "string",
14
- "default": "organization"
14
+ "default": "organization",
15
+ "enum": ["organization"]
15
16
  },
16
17
  "accountNumber": {
17
18
  "type": ["number", "null"],