@extrahorizon/javascript-sdk 8.4.0 → 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.
@@ -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;
@@ -205,7 +210,7 @@ export interface SchemaInput {
205
210
  defaultLimit?: number;
206
211
  maximumLimit?: number;
207
212
  }
208
- export declare type UpdateSchemaInput = Pick<Partial<SchemaInput>, 'name' | 'description' | 'defaultLimit' | 'maximumLimit'>;
213
+ export declare type UpdateSchemaInput = Partial<SchemaInput>;
209
214
  export declare type IndexFieldsName = string;
210
215
  export declare type IndexFieldsType = 'asc' | 'desc' | 'text';
211
216
  export interface IndexOptions {
@@ -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.0";
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.0",
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",
@@ -55,7 +55,6 @@
55
55
  "nock": "^13.5.4",
56
56
  "rimraf": "^5.0.5",
57
57
  "rollup": "^2.68.0",
58
- "rollup-plugin-terser": "^7.0.2",
59
58
  "ts-jest": "^29.1.2",
60
59
  "typescript": "^4.5.5"
61
60
  }