@juhuu/sdk-ts 1.2.159 → 1.2.161

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/index.d.mts CHANGED
@@ -89,7 +89,6 @@ type OfferTime = {
89
89
  endMinutes: number;
90
90
  }[];
91
91
  };
92
- type FuelType = "battery" | "diesel" | "gasoline" | "hydrogen" | "fossil";
93
92
  type Viewport = {
94
93
  longitudeTopLeft: number;
95
94
  latitudeTopLeft: number;
@@ -150,7 +149,6 @@ interface Color {
150
149
  warning: hexColor;
151
150
  }
152
151
  interface GeneralSettings {
153
- frontendVersion: number;
154
152
  termsVersion: number;
155
153
  globalKill: boolean;
156
154
  maintenance: boolean;
@@ -856,6 +854,16 @@ declare class ParametersService extends Service {
856
854
  retrieve(ParameterRetrieveParams: JUHUU.Parameter.Retrieve.Params, ParameterRetrieveOptions?: JUHUU.Parameter.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Retrieve.Response>>;
857
855
  update(ParameterUpdateParams: JUHUU.Parameter.Update.Params, ParameterUpdateOptions?: JUHUU.Parameter.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Update.Response>>;
858
856
  delete(ParameterDeleteParams: JUHUU.Parameter.Delete.Params, ParameterDeleteOptions?: JUHUU.Parameter.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Delete.Response>>;
857
+ listen(ParameterRealtimeParams: JUHUU.Parameter.Realtime.Params, ParameterRealtimeOptions?: JUHUU.Parameter.Realtime.Options): JUHUU.Parameter.Realtime.Response;
858
+ }
859
+
860
+ declare class IncidentTemplatesService extends Service {
861
+ constructor(config: JUHUU.SetupConfig);
862
+ create(IncidentTemplateCreateParams: JUHUU.IncidentTemplate.Create.Params, IncidentTemplateCreateOptions?: JUHUU.IncidentTemplate.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Create.Response>>;
863
+ list(IncidentTemplateListParams: JUHUU.IncidentTemplate.List.Params, IncidentTemplateListOptions?: JUHUU.IncidentTemplate.List.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.List.Response>>;
864
+ retrieve(IncidentTemplateRetrieveParams: JUHUU.IncidentTemplate.Retrieve.Params, IncidentTemplateRetrieveOptions?: JUHUU.IncidentTemplate.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Retrieve.Response>>;
865
+ update(IncidentTemplateUpdateParams: JUHUU.IncidentTemplate.Update.Params, IncidentTemplateUpdateOptions?: JUHUU.IncidentTemplate.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Update.Response>>;
866
+ delete(IncidentTemplateDeleteParams: JUHUU.IncidentTemplate.Delete.Params, IncidentTemplateDeleteOptions?: JUHUU.IncidentTemplate.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Delete.Response>>;
859
867
  }
860
868
 
861
869
  declare class Juhuu {
@@ -893,6 +901,7 @@ declare class Juhuu {
893
901
  readonly parameterHistories: ParameterHistoriesService;
894
902
  readonly apiKeys: ApiKeysService;
895
903
  readonly parameters: ParametersService;
904
+ readonly incidentTemplates: IncidentTemplatesService;
896
905
  }
897
906
  declare namespace JUHUU {
898
907
  interface SetupConfig {
@@ -3097,6 +3106,163 @@ declare namespace JUHUU {
3097
3106
  }
3098
3107
  export { };
3099
3108
  }
3109
+ namespace Incident {
3110
+ type Base = {
3111
+ id: string;
3112
+ readonly object: "incident";
3113
+ severity: "low" | "medium" | "high";
3114
+ issuedBy: "propertyAdmin" | "system" | "user" | "nodeArray";
3115
+ propertyId: string;
3116
+ issuedByUserId: string | null;
3117
+ status: "waitingForPropertyConfirmation" | "waitingForResolvement" | "rejected" | "resolved";
3118
+ title: Date;
3119
+ createdAt: Date;
3120
+ description: string;
3121
+ imageUrlArray: string[];
3122
+ incidentTemplateId: string | null;
3123
+ };
3124
+ export interface Location extends Base {
3125
+ type: "location";
3126
+ locationId: string;
3127
+ }
3128
+ export interface Device extends Base {
3129
+ type: "device";
3130
+ deviceId: string;
3131
+ }
3132
+ export type Object = Location | Device;
3133
+ export namespace Create {
3134
+ type Params = {
3135
+ propertyId: string;
3136
+ description: JUHUU.Incident.Object["description"];
3137
+ severity?: JUHUU.Incident.Object["severity"];
3138
+ deviceId?: string;
3139
+ locationId?: string;
3140
+ incidentTepmlateId?: string;
3141
+ title: JUHUU.Incident.Object["title"];
3142
+ type: JUHUU.Incident.Object["type"];
3143
+ };
3144
+ type Options = JUHUU.RequestOptions;
3145
+ type Response = {
3146
+ connector: JUHUU.Connector.Object;
3147
+ };
3148
+ }
3149
+ export namespace Retrieve {
3150
+ type Params = {
3151
+ incidentId: string;
3152
+ };
3153
+ type Options = {
3154
+ expand: Array<"property">;
3155
+ } & JUHUU.RequestOptions;
3156
+ type Response = {
3157
+ Incident: JUHUU.Incident.Object;
3158
+ };
3159
+ }
3160
+ export namespace List {
3161
+ type Params = {
3162
+ propertyId?: string;
3163
+ };
3164
+ type Options = {
3165
+ limit?: number;
3166
+ skip?: number;
3167
+ } & JUHUU.RequestOptions;
3168
+ type Response = {
3169
+ incidentArray: JUHUU.Incident.Object[];
3170
+ hasMore: boolean;
3171
+ count: number;
3172
+ };
3173
+ }
3174
+ export namespace Update {
3175
+ type Params = {
3176
+ incidentId: string;
3177
+ title?: JUHUU.Incident.Object["title"];
3178
+ status?: JUHUU.Incident.Object["status"];
3179
+ severity?: JUHUU.Incident.Object["severity"];
3180
+ };
3181
+ type Options = JUHUU.RequestOptions;
3182
+ type Response = {
3183
+ incident: JUHUU.Incident.Object;
3184
+ };
3185
+ }
3186
+ export namespace Delete {
3187
+ type Params = {
3188
+ incidentId?: string;
3189
+ };
3190
+ type Options = JUHUU.RequestOptions;
3191
+ type Response = {
3192
+ incident: JUHUU.Connector.Object;
3193
+ };
3194
+ }
3195
+ export { };
3196
+ }
3197
+ namespace IncidentTemplate {
3198
+ type Object = {
3199
+ id: string;
3200
+ readonly object: "incidentTemplate";
3201
+ name: string;
3202
+ title: LocaleString;
3203
+ subtitle: LocaleString;
3204
+ description: LocaleString;
3205
+ propertyId: string;
3206
+ lastUpdatedAt: Date;
3207
+ createdAt: Date;
3208
+ };
3209
+ namespace Create {
3210
+ type Params = {
3211
+ propertyId: string;
3212
+ };
3213
+ type Options = JUHUU.RequestOptions;
3214
+ type Response = {
3215
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3216
+ };
3217
+ }
3218
+ namespace Retrieve {
3219
+ type Params = {
3220
+ incidentTemplateId: string;
3221
+ };
3222
+ type Options = {
3223
+ expand?: Array<"property">;
3224
+ } & JUHUU.RequestOptions;
3225
+ type Response = {
3226
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3227
+ property?: JUHUU.Property.Object;
3228
+ };
3229
+ }
3230
+ namespace List {
3231
+ type Params = {
3232
+ propertyId?: string;
3233
+ };
3234
+ type Options = {
3235
+ limit?: number;
3236
+ skip?: number;
3237
+ } & JUHUU.RequestOptions;
3238
+ type Response = {
3239
+ incidentTemplateArray: JUHUU.IncidentTemplate.Object[];
3240
+ count: number;
3241
+ hasMore: boolean;
3242
+ };
3243
+ }
3244
+ namespace Update {
3245
+ type Params = {
3246
+ incidentTemplateId: string;
3247
+ title?: LocaleString;
3248
+ description?: LocaleString;
3249
+ name?: string;
3250
+ };
3251
+ type Options = JUHUU.RequestOptions;
3252
+ type Response = {
3253
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3254
+ };
3255
+ }
3256
+ namespace Delete {
3257
+ type Params = {
3258
+ incidentTemplateId: string;
3259
+ };
3260
+ type Options = JUHUU.RequestOptions;
3261
+ type Response = {
3262
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3263
+ };
3264
+ }
3265
+ }
3100
3266
  namespace Parameter {
3101
3267
  type Base = {
3102
3268
  id: string;
@@ -3142,9 +3308,28 @@ declare namespace JUHUU {
3142
3308
  parameter: JUHUU.Parameter.Object;
3143
3309
  };
3144
3310
  }
3311
+ export namespace Realtime {
3312
+ type Params = {
3313
+ parameterId: string;
3314
+ };
3315
+ type Options = JUHUU.RequestOptions;
3316
+ type Response = {
3317
+ onUpdated: (callback: (message: {
3318
+ payload: {
3319
+ after: JUHUU.Parameter.Object;
3320
+ before: JUHUU.Parameter.Object;
3321
+ changedFields: string[];
3322
+ };
3323
+ }) => void) => void;
3324
+ close: () => void;
3325
+ };
3326
+ }
3145
3327
  export namespace Retrieve {
3146
3328
  type Params = {
3147
3329
  parameterId: string;
3330
+ /**
3331
+ * Supply a device ID if your parameterId starts with 'device.'
3332
+ */
3148
3333
  deviceId?: string;
3149
3334
  };
3150
3335
  type Options = {
@@ -3171,6 +3356,10 @@ declare namespace JUHUU {
3171
3356
  export namespace Update {
3172
3357
  type Params = {
3173
3358
  parameterId: string;
3359
+ /**
3360
+ * Supply a device ID if your parameterId starts with 'device.'
3361
+ */
3362
+ deviceId?: string;
3174
3363
  name?: string;
3175
3364
  currentValue?: string | boolean | number;
3176
3365
  };
@@ -3500,4 +3689,4 @@ declare namespace JUHUU {
3500
3689
  }
3501
3690
  }
3502
3691
 
3503
- export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
3692
+ export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.d.ts CHANGED
@@ -89,7 +89,6 @@ type OfferTime = {
89
89
  endMinutes: number;
90
90
  }[];
91
91
  };
92
- type FuelType = "battery" | "diesel" | "gasoline" | "hydrogen" | "fossil";
93
92
  type Viewport = {
94
93
  longitudeTopLeft: number;
95
94
  latitudeTopLeft: number;
@@ -150,7 +149,6 @@ interface Color {
150
149
  warning: hexColor;
151
150
  }
152
151
  interface GeneralSettings {
153
- frontendVersion: number;
154
152
  termsVersion: number;
155
153
  globalKill: boolean;
156
154
  maintenance: boolean;
@@ -856,6 +854,16 @@ declare class ParametersService extends Service {
856
854
  retrieve(ParameterRetrieveParams: JUHUU.Parameter.Retrieve.Params, ParameterRetrieveOptions?: JUHUU.Parameter.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Retrieve.Response>>;
857
855
  update(ParameterUpdateParams: JUHUU.Parameter.Update.Params, ParameterUpdateOptions?: JUHUU.Parameter.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Update.Response>>;
858
856
  delete(ParameterDeleteParams: JUHUU.Parameter.Delete.Params, ParameterDeleteOptions?: JUHUU.Parameter.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Parameter.Delete.Response>>;
857
+ listen(ParameterRealtimeParams: JUHUU.Parameter.Realtime.Params, ParameterRealtimeOptions?: JUHUU.Parameter.Realtime.Options): JUHUU.Parameter.Realtime.Response;
858
+ }
859
+
860
+ declare class IncidentTemplatesService extends Service {
861
+ constructor(config: JUHUU.SetupConfig);
862
+ create(IncidentTemplateCreateParams: JUHUU.IncidentTemplate.Create.Params, IncidentTemplateCreateOptions?: JUHUU.IncidentTemplate.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Create.Response>>;
863
+ list(IncidentTemplateListParams: JUHUU.IncidentTemplate.List.Params, IncidentTemplateListOptions?: JUHUU.IncidentTemplate.List.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.List.Response>>;
864
+ retrieve(IncidentTemplateRetrieveParams: JUHUU.IncidentTemplate.Retrieve.Params, IncidentTemplateRetrieveOptions?: JUHUU.IncidentTemplate.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Retrieve.Response>>;
865
+ update(IncidentTemplateUpdateParams: JUHUU.IncidentTemplate.Update.Params, IncidentTemplateUpdateOptions?: JUHUU.IncidentTemplate.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Update.Response>>;
866
+ delete(IncidentTemplateDeleteParams: JUHUU.IncidentTemplate.Delete.Params, IncidentTemplateDeleteOptions?: JUHUU.IncidentTemplate.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Delete.Response>>;
859
867
  }
860
868
 
861
869
  declare class Juhuu {
@@ -893,6 +901,7 @@ declare class Juhuu {
893
901
  readonly parameterHistories: ParameterHistoriesService;
894
902
  readonly apiKeys: ApiKeysService;
895
903
  readonly parameters: ParametersService;
904
+ readonly incidentTemplates: IncidentTemplatesService;
896
905
  }
897
906
  declare namespace JUHUU {
898
907
  interface SetupConfig {
@@ -3097,6 +3106,163 @@ declare namespace JUHUU {
3097
3106
  }
3098
3107
  export { };
3099
3108
  }
3109
+ namespace Incident {
3110
+ type Base = {
3111
+ id: string;
3112
+ readonly object: "incident";
3113
+ severity: "low" | "medium" | "high";
3114
+ issuedBy: "propertyAdmin" | "system" | "user" | "nodeArray";
3115
+ propertyId: string;
3116
+ issuedByUserId: string | null;
3117
+ status: "waitingForPropertyConfirmation" | "waitingForResolvement" | "rejected" | "resolved";
3118
+ title: Date;
3119
+ createdAt: Date;
3120
+ description: string;
3121
+ imageUrlArray: string[];
3122
+ incidentTemplateId: string | null;
3123
+ };
3124
+ export interface Location extends Base {
3125
+ type: "location";
3126
+ locationId: string;
3127
+ }
3128
+ export interface Device extends Base {
3129
+ type: "device";
3130
+ deviceId: string;
3131
+ }
3132
+ export type Object = Location | Device;
3133
+ export namespace Create {
3134
+ type Params = {
3135
+ propertyId: string;
3136
+ description: JUHUU.Incident.Object["description"];
3137
+ severity?: JUHUU.Incident.Object["severity"];
3138
+ deviceId?: string;
3139
+ locationId?: string;
3140
+ incidentTepmlateId?: string;
3141
+ title: JUHUU.Incident.Object["title"];
3142
+ type: JUHUU.Incident.Object["type"];
3143
+ };
3144
+ type Options = JUHUU.RequestOptions;
3145
+ type Response = {
3146
+ connector: JUHUU.Connector.Object;
3147
+ };
3148
+ }
3149
+ export namespace Retrieve {
3150
+ type Params = {
3151
+ incidentId: string;
3152
+ };
3153
+ type Options = {
3154
+ expand: Array<"property">;
3155
+ } & JUHUU.RequestOptions;
3156
+ type Response = {
3157
+ Incident: JUHUU.Incident.Object;
3158
+ };
3159
+ }
3160
+ export namespace List {
3161
+ type Params = {
3162
+ propertyId?: string;
3163
+ };
3164
+ type Options = {
3165
+ limit?: number;
3166
+ skip?: number;
3167
+ } & JUHUU.RequestOptions;
3168
+ type Response = {
3169
+ incidentArray: JUHUU.Incident.Object[];
3170
+ hasMore: boolean;
3171
+ count: number;
3172
+ };
3173
+ }
3174
+ export namespace Update {
3175
+ type Params = {
3176
+ incidentId: string;
3177
+ title?: JUHUU.Incident.Object["title"];
3178
+ status?: JUHUU.Incident.Object["status"];
3179
+ severity?: JUHUU.Incident.Object["severity"];
3180
+ };
3181
+ type Options = JUHUU.RequestOptions;
3182
+ type Response = {
3183
+ incident: JUHUU.Incident.Object;
3184
+ };
3185
+ }
3186
+ export namespace Delete {
3187
+ type Params = {
3188
+ incidentId?: string;
3189
+ };
3190
+ type Options = JUHUU.RequestOptions;
3191
+ type Response = {
3192
+ incident: JUHUU.Connector.Object;
3193
+ };
3194
+ }
3195
+ export { };
3196
+ }
3197
+ namespace IncidentTemplate {
3198
+ type Object = {
3199
+ id: string;
3200
+ readonly object: "incidentTemplate";
3201
+ name: string;
3202
+ title: LocaleString;
3203
+ subtitle: LocaleString;
3204
+ description: LocaleString;
3205
+ propertyId: string;
3206
+ lastUpdatedAt: Date;
3207
+ createdAt: Date;
3208
+ };
3209
+ namespace Create {
3210
+ type Params = {
3211
+ propertyId: string;
3212
+ };
3213
+ type Options = JUHUU.RequestOptions;
3214
+ type Response = {
3215
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3216
+ };
3217
+ }
3218
+ namespace Retrieve {
3219
+ type Params = {
3220
+ incidentTemplateId: string;
3221
+ };
3222
+ type Options = {
3223
+ expand?: Array<"property">;
3224
+ } & JUHUU.RequestOptions;
3225
+ type Response = {
3226
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3227
+ property?: JUHUU.Property.Object;
3228
+ };
3229
+ }
3230
+ namespace List {
3231
+ type Params = {
3232
+ propertyId?: string;
3233
+ };
3234
+ type Options = {
3235
+ limit?: number;
3236
+ skip?: number;
3237
+ } & JUHUU.RequestOptions;
3238
+ type Response = {
3239
+ incidentTemplateArray: JUHUU.IncidentTemplate.Object[];
3240
+ count: number;
3241
+ hasMore: boolean;
3242
+ };
3243
+ }
3244
+ namespace Update {
3245
+ type Params = {
3246
+ incidentTemplateId: string;
3247
+ title?: LocaleString;
3248
+ description?: LocaleString;
3249
+ name?: string;
3250
+ };
3251
+ type Options = JUHUU.RequestOptions;
3252
+ type Response = {
3253
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3254
+ };
3255
+ }
3256
+ namespace Delete {
3257
+ type Params = {
3258
+ incidentTemplateId: string;
3259
+ };
3260
+ type Options = JUHUU.RequestOptions;
3261
+ type Response = {
3262
+ incidentTemplate: JUHUU.IncidentTemplate.Object;
3263
+ };
3264
+ }
3265
+ }
3100
3266
  namespace Parameter {
3101
3267
  type Base = {
3102
3268
  id: string;
@@ -3142,9 +3308,28 @@ declare namespace JUHUU {
3142
3308
  parameter: JUHUU.Parameter.Object;
3143
3309
  };
3144
3310
  }
3311
+ export namespace Realtime {
3312
+ type Params = {
3313
+ parameterId: string;
3314
+ };
3315
+ type Options = JUHUU.RequestOptions;
3316
+ type Response = {
3317
+ onUpdated: (callback: (message: {
3318
+ payload: {
3319
+ after: JUHUU.Parameter.Object;
3320
+ before: JUHUU.Parameter.Object;
3321
+ changedFields: string[];
3322
+ };
3323
+ }) => void) => void;
3324
+ close: () => void;
3325
+ };
3326
+ }
3145
3327
  export namespace Retrieve {
3146
3328
  type Params = {
3147
3329
  parameterId: string;
3330
+ /**
3331
+ * Supply a device ID if your parameterId starts with 'device.'
3332
+ */
3148
3333
  deviceId?: string;
3149
3334
  };
3150
3335
  type Options = {
@@ -3171,6 +3356,10 @@ declare namespace JUHUU {
3171
3356
  export namespace Update {
3172
3357
  type Params = {
3173
3358
  parameterId: string;
3359
+ /**
3360
+ * Supply a device ID if your parameterId starts with 'device.'
3361
+ */
3362
+ deviceId?: string;
3174
3363
  name?: string;
3175
3364
  currentValue?: string | boolean | number;
3176
3365
  };
@@ -3500,4 +3689,4 @@ declare namespace JUHUU {
3500
3689
  }
3501
3690
  }
3502
3691
 
3503
- export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
3692
+ export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.js CHANGED
@@ -3008,6 +3008,107 @@ var ParametersService = class extends Service {
3008
3008
  ParameterDeleteOptions
3009
3009
  );
3010
3010
  }
3011
+ listen(ParameterRealtimeParams, ParameterRealtimeOptions) {
3012
+ const socket = super.connectToWebsocket({
3013
+ url: "parameters/" + ParameterRealtimeParams.parameterId + "/websocket"
3014
+ });
3015
+ const onUpdated = (onUpdatedCallback) => {
3016
+ socket.on("updated", (message) => {
3017
+ onUpdatedCallback(message);
3018
+ });
3019
+ };
3020
+ return {
3021
+ onUpdated,
3022
+ close: () => {
3023
+ console.log("closing websocket connection");
3024
+ socket.close();
3025
+ }
3026
+ };
3027
+ }
3028
+ };
3029
+
3030
+ // src/incidentTemplates/incidentTemplates.service.ts
3031
+ var IncidentTemplatesService = class extends Service {
3032
+ constructor(config) {
3033
+ super(config);
3034
+ }
3035
+ async create(IncidentTemplateCreateParams, IncidentTemplateCreateOptions) {
3036
+ return await super.sendRequest(
3037
+ {
3038
+ method: "POST",
3039
+ url: "incidentTemplates",
3040
+ body: {
3041
+ propertyId: IncidentTemplateCreateParams.propertyId
3042
+ },
3043
+ authenticationNotOptional: true
3044
+ },
3045
+ IncidentTemplateCreateOptions
3046
+ );
3047
+ }
3048
+ async list(IncidentTemplateListParams, IncidentTemplateListOptions) {
3049
+ const queryArray = [];
3050
+ if (IncidentTemplateListParams?.propertyId !== void 0) {
3051
+ queryArray.push("propertyId=" + IncidentTemplateListParams.propertyId);
3052
+ }
3053
+ if (IncidentTemplateListOptions?.skip !== void 0) {
3054
+ queryArray.push("skip=" + IncidentTemplateListOptions.skip);
3055
+ }
3056
+ if (IncidentTemplateListOptions?.limit !== void 0) {
3057
+ queryArray.push("limit=" + IncidentTemplateListOptions.limit);
3058
+ }
3059
+ return await super.sendRequest(
3060
+ {
3061
+ method: "GET",
3062
+ url: "incidentTemplates?" + queryArray.join("&"),
3063
+ body: void 0,
3064
+ authenticationNotOptional: false
3065
+ },
3066
+ IncidentTemplateListOptions
3067
+ );
3068
+ }
3069
+ async retrieve(IncidentTemplateRetrieveParams, IncidentTemplateRetrieveOptions) {
3070
+ const queryArray = [];
3071
+ if (IncidentTemplateRetrieveOptions?.expand !== void 0) {
3072
+ queryArray.push(
3073
+ "expand=" + IncidentTemplateRetrieveOptions.expand.join(",")
3074
+ );
3075
+ }
3076
+ return await super.sendRequest(
3077
+ {
3078
+ method: "GET",
3079
+ url: "incidentTemplates/" + IncidentTemplateRetrieveParams.incidentTemplateId + "?" + queryArray.join("&"),
3080
+ body: void 0,
3081
+ authenticationNotOptional: false
3082
+ },
3083
+ IncidentTemplateRetrieveOptions
3084
+ );
3085
+ }
3086
+ async update(IncidentTemplateUpdateParams, IncidentTemplateUpdateOptions) {
3087
+ return await super.sendRequest(
3088
+ {
3089
+ method: "PATCH",
3090
+ url: "incidentTemplates/" + IncidentTemplateUpdateParams.incidentTemplateId,
3091
+ body: {
3092
+ title: IncidentTemplateUpdateParams.title,
3093
+ description: IncidentTemplateUpdateParams.description,
3094
+ name: IncidentTemplateUpdateParams.name
3095
+ },
3096
+ authenticationNotOptional: true
3097
+ },
3098
+ IncidentTemplateUpdateOptions
3099
+ );
3100
+ }
3101
+ async delete(IncidentTemplateDeleteParams, IncidentTemplateDeleteOptions) {
3102
+ return await super.sendRequest(
3103
+ {
3104
+ method: "DELETE",
3105
+ url: "incidentTemplates/" + IncidentTemplateDeleteParams.incidentTemplateId,
3106
+ authenticationNotOptional: true,
3107
+ body: void 0
3108
+ },
3109
+ IncidentTemplateDeleteOptions
3110
+ );
3111
+ }
3011
3112
  };
3012
3113
 
3013
3114
  // src/types/types.ts
@@ -3189,6 +3290,7 @@ var Juhuu = class {
3189
3290
  this.parameterHistories = new ParameterHistoriesService(config);
3190
3291
  this.apiKeys = new ApiKeysService(config);
3191
3292
  this.parameters = new ParametersService(config);
3293
+ this.incidentTemplates = new IncidentTemplatesService(config);
3192
3294
  }
3193
3295
  /**
3194
3296
  * Top Level Resources
@@ -3223,6 +3325,7 @@ var Juhuu = class {
3223
3325
  parameterHistories;
3224
3326
  apiKeys;
3225
3327
  parameters;
3328
+ incidentTemplates;
3226
3329
  };
3227
3330
  var JUHUU;
3228
3331
  ((JUHUU2) => {
package/dist/index.mjs CHANGED
@@ -2964,6 +2964,107 @@ var ParametersService = class extends Service {
2964
2964
  ParameterDeleteOptions
2965
2965
  );
2966
2966
  }
2967
+ listen(ParameterRealtimeParams, ParameterRealtimeOptions) {
2968
+ const socket = super.connectToWebsocket({
2969
+ url: "parameters/" + ParameterRealtimeParams.parameterId + "/websocket"
2970
+ });
2971
+ const onUpdated = (onUpdatedCallback) => {
2972
+ socket.on("updated", (message) => {
2973
+ onUpdatedCallback(message);
2974
+ });
2975
+ };
2976
+ return {
2977
+ onUpdated,
2978
+ close: () => {
2979
+ console.log("closing websocket connection");
2980
+ socket.close();
2981
+ }
2982
+ };
2983
+ }
2984
+ };
2985
+
2986
+ // src/incidentTemplates/incidentTemplates.service.ts
2987
+ var IncidentTemplatesService = class extends Service {
2988
+ constructor(config) {
2989
+ super(config);
2990
+ }
2991
+ async create(IncidentTemplateCreateParams, IncidentTemplateCreateOptions) {
2992
+ return await super.sendRequest(
2993
+ {
2994
+ method: "POST",
2995
+ url: "incidentTemplates",
2996
+ body: {
2997
+ propertyId: IncidentTemplateCreateParams.propertyId
2998
+ },
2999
+ authenticationNotOptional: true
3000
+ },
3001
+ IncidentTemplateCreateOptions
3002
+ );
3003
+ }
3004
+ async list(IncidentTemplateListParams, IncidentTemplateListOptions) {
3005
+ const queryArray = [];
3006
+ if (IncidentTemplateListParams?.propertyId !== void 0) {
3007
+ queryArray.push("propertyId=" + IncidentTemplateListParams.propertyId);
3008
+ }
3009
+ if (IncidentTemplateListOptions?.skip !== void 0) {
3010
+ queryArray.push("skip=" + IncidentTemplateListOptions.skip);
3011
+ }
3012
+ if (IncidentTemplateListOptions?.limit !== void 0) {
3013
+ queryArray.push("limit=" + IncidentTemplateListOptions.limit);
3014
+ }
3015
+ return await super.sendRequest(
3016
+ {
3017
+ method: "GET",
3018
+ url: "incidentTemplates?" + queryArray.join("&"),
3019
+ body: void 0,
3020
+ authenticationNotOptional: false
3021
+ },
3022
+ IncidentTemplateListOptions
3023
+ );
3024
+ }
3025
+ async retrieve(IncidentTemplateRetrieveParams, IncidentTemplateRetrieveOptions) {
3026
+ const queryArray = [];
3027
+ if (IncidentTemplateRetrieveOptions?.expand !== void 0) {
3028
+ queryArray.push(
3029
+ "expand=" + IncidentTemplateRetrieveOptions.expand.join(",")
3030
+ );
3031
+ }
3032
+ return await super.sendRequest(
3033
+ {
3034
+ method: "GET",
3035
+ url: "incidentTemplates/" + IncidentTemplateRetrieveParams.incidentTemplateId + "?" + queryArray.join("&"),
3036
+ body: void 0,
3037
+ authenticationNotOptional: false
3038
+ },
3039
+ IncidentTemplateRetrieveOptions
3040
+ );
3041
+ }
3042
+ async update(IncidentTemplateUpdateParams, IncidentTemplateUpdateOptions) {
3043
+ return await super.sendRequest(
3044
+ {
3045
+ method: "PATCH",
3046
+ url: "incidentTemplates/" + IncidentTemplateUpdateParams.incidentTemplateId,
3047
+ body: {
3048
+ title: IncidentTemplateUpdateParams.title,
3049
+ description: IncidentTemplateUpdateParams.description,
3050
+ name: IncidentTemplateUpdateParams.name
3051
+ },
3052
+ authenticationNotOptional: true
3053
+ },
3054
+ IncidentTemplateUpdateOptions
3055
+ );
3056
+ }
3057
+ async delete(IncidentTemplateDeleteParams, IncidentTemplateDeleteOptions) {
3058
+ return await super.sendRequest(
3059
+ {
3060
+ method: "DELETE",
3061
+ url: "incidentTemplates/" + IncidentTemplateDeleteParams.incidentTemplateId,
3062
+ authenticationNotOptional: true,
3063
+ body: void 0
3064
+ },
3065
+ IncidentTemplateDeleteOptions
3066
+ );
3067
+ }
2967
3068
  };
2968
3069
 
2969
3070
  // src/types/types.ts
@@ -3145,6 +3246,7 @@ var Juhuu = class {
3145
3246
  this.parameterHistories = new ParameterHistoriesService(config);
3146
3247
  this.apiKeys = new ApiKeysService(config);
3147
3248
  this.parameters = new ParametersService(config);
3249
+ this.incidentTemplates = new IncidentTemplatesService(config);
3148
3250
  }
3149
3251
  /**
3150
3252
  * Top Level Resources
@@ -3179,6 +3281,7 @@ var Juhuu = class {
3179
3281
  parameterHistories;
3180
3282
  apiKeys;
3181
3283
  parameters;
3284
+ incidentTemplates;
3182
3285
  };
3183
3286
  var JUHUU;
3184
3287
  ((JUHUU2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.159",
3
+ "version": "1.2.161",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",