@extrahorizon/javascript-sdk 8.4.1-dev-60-97f0a63 → 8.4.1-dev-61-77bbe05

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/CHANGELOG.md CHANGED
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Fixed
11
11
  - No longer minifying to prevent huge error stack traces, we expect that where it matters bundlers are in use anyway
12
12
  - `exh.data.schemas.update` now correctly accepts all the `*Mode` and `*Limit` schema properties
13
+ - Added missing `Schema` and `TypeConfiguration` properties
14
+ - Corrected the notification settings type
13
15
 
14
16
  ## [8.4.0]
15
17
 
@@ -5368,7 +5368,7 @@ const logsService = (httpWithAuth) => {
5368
5368
  };
5369
5369
  };
5370
5370
 
5371
- const version = '8.4.1-dev-60-97f0a63';
5371
+ const version = '8.4.1-dev-61-77bbe05';
5372
5372
 
5373
5373
  /**
5374
5374
  * Create ExtraHorizon client.
package/build/index.mjs CHANGED
@@ -5338,7 +5338,7 @@ const logsService = (httpWithAuth) => {
5338
5338
  };
5339
5339
  };
5340
5340
 
5341
- const version = '8.4.1-dev-60-97f0a63';
5341
+ const version = '8.4.1-dev-61-77bbe05';
5342
5342
 
5343
5343
  /**
5344
5344
  * Create ExtraHorizon client.
@@ -65,6 +65,7 @@ export interface ArrayConfiguration extends BaseConfiguration {
65
65
  export interface ObjectConfiguration extends BaseConfiguration {
66
66
  type?: 'object';
67
67
  properties?: Record<string, TypeConfiguration>;
68
+ additionalProperties?: TypeConfiguration;
68
69
  required?: string[];
69
70
  }
70
71
  export interface StringConfiguration extends BaseConfiguration {
@@ -74,15 +75,19 @@ export interface StringConfiguration extends BaseConfiguration {
74
75
  enum?: string[];
75
76
  pattern?: string;
76
77
  format?: 'date-time';
78
+ const?: string;
77
79
  }
78
80
  export interface NumberConfiguration extends BaseConfiguration {
79
81
  type?: 'number';
80
82
  minimum?: number;
81
83
  maximum?: number;
82
84
  enum?: number[];
85
+ const?: string;
83
86
  }
84
87
  export interface BooleanConfiguration extends BaseConfiguration {
85
88
  type?: 'boolean';
89
+ enum?: boolean[];
90
+ const?: boolean;
86
91
  }
87
92
  export declare type TypeConfiguration = ObjectConfiguration | ArrayConfiguration | StringConfiguration | NumberConfiguration | BooleanConfiguration;
88
93
  export interface DocumentCondition {
@@ -177,7 +182,7 @@ export interface Schema {
177
182
  id: ObjectId;
178
183
  name: string;
179
184
  description: string;
180
- properties: Record<string, any>;
185
+ properties: Record<string, TypeConfiguration>;
181
186
  indexes: Index[];
182
187
  statuses: Record<string, Record<string, string>>;
183
188
  creationTransition: CreationTransition;
@@ -75,14 +75,22 @@ export declare enum FieldType {
75
75
  OBJECT_ID = "OBJECT_ID",
76
76
  URL = "URL"
77
77
  }
78
- export interface Setting {
78
+ export interface NotificationSettings {
79
79
  id?: ObjectId;
80
80
  key?: string;
81
- preferences?: Record<string, boolean>;
81
+ preferences?: {
82
+ passwordChanged?: boolean;
83
+ activated?: boolean;
84
+ prescriptionExpiry?: boolean;
85
+ measurementComment?: boolean;
86
+ measurementReviewed?: boolean;
87
+ message?: boolean;
88
+ link?: boolean;
89
+ };
82
90
  creationTimestamp?: Date;
83
91
  updateTimestamp?: Date;
84
92
  }
85
- export declare type SettingCreation = Required<Pick<Setting, 'key' | 'preferences'>>;
93
+ export declare type SettingCreation = Required<Pick<NotificationSettings, 'key' | 'preferences'>>;
86
94
  export interface NotificationsService {
87
95
  /**
88
96
  * Create a notification
@@ -182,20 +190,20 @@ export interface NotificationSettingsServices {
182
190
  * @param rql Add filters to the requested list.
183
191
  * @returns PagedResult<Setting>
184
192
  */
185
- find(options?: OptionsWithRql): Promise<PagedResult<Setting>>;
193
+ find(options?: OptionsWithRql): Promise<PagedResult<NotificationSettings>>;
186
194
  /**
187
195
  * Find By Id
188
196
  * @param id the Id to search for
189
197
  * @param rql an optional rql string
190
198
  * @returns the first element found
191
199
  */
192
- findById(id: ObjectId, options?: OptionsWithRql): Promise<Setting>;
200
+ findById(id: ObjectId, options?: OptionsWithRql): Promise<NotificationSettings>;
193
201
  /**
194
202
  * Find First
195
203
  * @param rql an optional rql string
196
204
  * @returns the first element found
197
205
  */
198
- findFirst(options?: OptionsWithRql): Promise<Setting>;
206
+ findFirst(options?: OptionsWithRql): Promise<NotificationSettings>;
199
207
  /**
200
208
  * Update the notification settings for a user
201
209
  *
@@ -207,7 +215,7 @@ export interface NotificationSettingsServices {
207
215
  * @param requestBody SettingCreation object
208
216
  * @returns Setting
209
217
  */
210
- update(userId: string, requestBody: SettingCreation, options?: OptionsBase): Promise<Setting>;
218
+ update(userId: string, requestBody: SettingCreation, options?: OptionsBase): Promise<NotificationSettings>;
211
219
  /**
212
220
  * Delete the notifications settings for a user
213
221
  *
@@ -1 +1 @@
1
- export declare const version = "8.4.1-dev-60-97f0a63";
1
+ export declare const version = "8.4.1-dev-61-77bbe05";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/javascript-sdk",
3
- "version": "8.4.1-dev-60-97f0a63",
3
+ "version": "8.4.1-dev-61-77bbe05",
4
4
  "description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
5
5
  "main": "build/index.cjs.js",
6
6
  "types": "build/types/index.d.ts",