@juhuu/sdk-ts 1.2.161 → 1.2.162
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 +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +91 -0
- package/dist/index.mjs +91 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -866,6 +866,15 @@ declare class IncidentTemplatesService extends Service {
|
|
866
866
|
delete(IncidentTemplateDeleteParams: JUHUU.IncidentTemplate.Delete.Params, IncidentTemplateDeleteOptions?: JUHUU.IncidentTemplate.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Delete.Response>>;
|
867
867
|
}
|
868
868
|
|
869
|
+
declare class IncidentsService extends Service {
|
870
|
+
constructor(config: JUHUU.SetupConfig);
|
871
|
+
create(IncidentCreateParams: JUHUU.Incident.Create.Params, IncidentCreateOptions?: JUHUU.Incident.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Create.Response>>;
|
872
|
+
list(IncidentListParams: JUHUU.Incident.List.Params, IncidentListOptions?: JUHUU.Incident.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.List.Response>>;
|
873
|
+
retrieve(IncidentRetrieveParams: JUHUU.Incident.Retrieve.Params, IncidentRetrieveOptions?: JUHUU.Incident.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Retrieve.Response>>;
|
874
|
+
update(IncidentUpdateParams: JUHUU.Incident.Update.Params, IncidentUpdateOptions?: JUHUU.Incident.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Update.Response>>;
|
875
|
+
delete(IncidentDeleteParams: JUHUU.Incident.Delete.Params, IncidentDeleteOptions?: JUHUU.Incident.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Delete.Response>>;
|
876
|
+
}
|
877
|
+
|
869
878
|
declare class Juhuu {
|
870
879
|
constructor(config: JUHUU.SetupConfig);
|
871
880
|
/**
|
@@ -902,6 +911,7 @@ declare class Juhuu {
|
|
902
911
|
readonly apiKeys: ApiKeysService;
|
903
912
|
readonly parameters: ParametersService;
|
904
913
|
readonly incidentTemplates: IncidentTemplatesService;
|
914
|
+
readonly incidents: IncidentsService;
|
905
915
|
}
|
906
916
|
declare namespace JUHUU {
|
907
917
|
interface SetupConfig {
|
package/dist/index.d.ts
CHANGED
@@ -866,6 +866,15 @@ declare class IncidentTemplatesService extends Service {
|
|
866
866
|
delete(IncidentTemplateDeleteParams: JUHUU.IncidentTemplate.Delete.Params, IncidentTemplateDeleteOptions?: JUHUU.IncidentTemplate.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.IncidentTemplate.Delete.Response>>;
|
867
867
|
}
|
868
868
|
|
869
|
+
declare class IncidentsService extends Service {
|
870
|
+
constructor(config: JUHUU.SetupConfig);
|
871
|
+
create(IncidentCreateParams: JUHUU.Incident.Create.Params, IncidentCreateOptions?: JUHUU.Incident.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Create.Response>>;
|
872
|
+
list(IncidentListParams: JUHUU.Incident.List.Params, IncidentListOptions?: JUHUU.Incident.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.List.Response>>;
|
873
|
+
retrieve(IncidentRetrieveParams: JUHUU.Incident.Retrieve.Params, IncidentRetrieveOptions?: JUHUU.Incident.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Retrieve.Response>>;
|
874
|
+
update(IncidentUpdateParams: JUHUU.Incident.Update.Params, IncidentUpdateOptions?: JUHUU.Incident.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Update.Response>>;
|
875
|
+
delete(IncidentDeleteParams: JUHUU.Incident.Delete.Params, IncidentDeleteOptions?: JUHUU.Incident.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Incident.Delete.Response>>;
|
876
|
+
}
|
877
|
+
|
869
878
|
declare class Juhuu {
|
870
879
|
constructor(config: JUHUU.SetupConfig);
|
871
880
|
/**
|
@@ -902,6 +911,7 @@ declare class Juhuu {
|
|
902
911
|
readonly apiKeys: ApiKeysService;
|
903
912
|
readonly parameters: ParametersService;
|
904
913
|
readonly incidentTemplates: IncidentTemplatesService;
|
914
|
+
readonly incidents: IncidentsService;
|
905
915
|
}
|
906
916
|
declare namespace JUHUU {
|
907
917
|
interface SetupConfig {
|
package/dist/index.js
CHANGED
@@ -3111,6 +3111,95 @@ var IncidentTemplatesService = class extends Service {
|
|
3111
3111
|
}
|
3112
3112
|
};
|
3113
3113
|
|
3114
|
+
// src/incidents/incidents.service.ts
|
3115
|
+
var IncidentsService = class extends Service {
|
3116
|
+
constructor(config) {
|
3117
|
+
super(config);
|
3118
|
+
}
|
3119
|
+
async create(IncidentCreateParams, IncidentCreateOptions) {
|
3120
|
+
return await super.sendRequest(
|
3121
|
+
{
|
3122
|
+
method: "POST",
|
3123
|
+
url: "incidents",
|
3124
|
+
body: {
|
3125
|
+
propertyId: IncidentCreateParams.propertyId,
|
3126
|
+
title: IncidentCreateParams.title,
|
3127
|
+
subtitle: IncidentCreateParams.description,
|
3128
|
+
type: IncidentCreateParams.type,
|
3129
|
+
deviceId: IncidentCreateParams.deviceId,
|
3130
|
+
locationId: IncidentCreateParams.locationId,
|
3131
|
+
incidentTepmlateId: IncidentCreateParams.incidentTepmlateId,
|
3132
|
+
severity: IncidentCreateParams.severity
|
3133
|
+
},
|
3134
|
+
authenticationNotOptional: true
|
3135
|
+
},
|
3136
|
+
IncidentCreateOptions
|
3137
|
+
);
|
3138
|
+
}
|
3139
|
+
async list(IncidentListParams, IncidentListOptions) {
|
3140
|
+
const queryArray = [];
|
3141
|
+
if (IncidentListParams?.propertyId !== void 0) {
|
3142
|
+
queryArray.push("propertyId=" + IncidentListParams.propertyId);
|
3143
|
+
}
|
3144
|
+
if (IncidentListOptions?.skip !== void 0) {
|
3145
|
+
queryArray.push("skip=" + IncidentListOptions.skip);
|
3146
|
+
}
|
3147
|
+
if (IncidentListOptions?.limit !== void 0) {
|
3148
|
+
queryArray.push("limit=" + IncidentListOptions.limit);
|
3149
|
+
}
|
3150
|
+
return await super.sendRequest(
|
3151
|
+
{
|
3152
|
+
method: "GET",
|
3153
|
+
url: "incidents?" + queryArray.join("&"),
|
3154
|
+
body: void 0,
|
3155
|
+
authenticationNotOptional: false
|
3156
|
+
},
|
3157
|
+
IncidentListOptions
|
3158
|
+
);
|
3159
|
+
}
|
3160
|
+
async retrieve(IncidentRetrieveParams, IncidentRetrieveOptions) {
|
3161
|
+
const queryArray = [];
|
3162
|
+
if (IncidentRetrieveOptions?.expand !== void 0) {
|
3163
|
+
queryArray.push("expand=" + IncidentRetrieveOptions.expand.join(","));
|
3164
|
+
}
|
3165
|
+
return await super.sendRequest(
|
3166
|
+
{
|
3167
|
+
method: "GET",
|
3168
|
+
url: "incidents/" + IncidentRetrieveParams.incidentId + "?" + queryArray.join("&"),
|
3169
|
+
body: void 0,
|
3170
|
+
authenticationNotOptional: false
|
3171
|
+
},
|
3172
|
+
IncidentRetrieveOptions
|
3173
|
+
);
|
3174
|
+
}
|
3175
|
+
async update(IncidentUpdateParams, IncidentUpdateOptions) {
|
3176
|
+
return await super.sendRequest(
|
3177
|
+
{
|
3178
|
+
method: "PATCH",
|
3179
|
+
url: "incidents/" + IncidentUpdateParams.incidentId,
|
3180
|
+
body: {
|
3181
|
+
title: IncidentUpdateParams.title,
|
3182
|
+
severity: IncidentUpdateParams.severity,
|
3183
|
+
status: IncidentUpdateParams.status
|
3184
|
+
},
|
3185
|
+
authenticationNotOptional: true
|
3186
|
+
},
|
3187
|
+
IncidentUpdateOptions
|
3188
|
+
);
|
3189
|
+
}
|
3190
|
+
async delete(IncidentDeleteParams, IncidentDeleteOptions) {
|
3191
|
+
return await super.sendRequest(
|
3192
|
+
{
|
3193
|
+
method: "DELETE",
|
3194
|
+
url: "incidents/" + IncidentDeleteParams.incidentId,
|
3195
|
+
authenticationNotOptional: true,
|
3196
|
+
body: void 0
|
3197
|
+
},
|
3198
|
+
IncidentDeleteOptions
|
3199
|
+
);
|
3200
|
+
}
|
3201
|
+
};
|
3202
|
+
|
3114
3203
|
// src/types/types.ts
|
3115
3204
|
var LanguageCodeArray = [
|
3116
3205
|
"en",
|
@@ -3291,6 +3380,7 @@ var Juhuu = class {
|
|
3291
3380
|
this.apiKeys = new ApiKeysService(config);
|
3292
3381
|
this.parameters = new ParametersService(config);
|
3293
3382
|
this.incidentTemplates = new IncidentTemplatesService(config);
|
3383
|
+
this.incidents = new IncidentsService(config);
|
3294
3384
|
}
|
3295
3385
|
/**
|
3296
3386
|
* Top Level Resources
|
@@ -3326,6 +3416,7 @@ var Juhuu = class {
|
|
3326
3416
|
apiKeys;
|
3327
3417
|
parameters;
|
3328
3418
|
incidentTemplates;
|
3419
|
+
incidents;
|
3329
3420
|
};
|
3330
3421
|
var JUHUU;
|
3331
3422
|
((JUHUU2) => {
|
package/dist/index.mjs
CHANGED
@@ -3067,6 +3067,95 @@ var IncidentTemplatesService = class extends Service {
|
|
3067
3067
|
}
|
3068
3068
|
};
|
3069
3069
|
|
3070
|
+
// src/incidents/incidents.service.ts
|
3071
|
+
var IncidentsService = class extends Service {
|
3072
|
+
constructor(config) {
|
3073
|
+
super(config);
|
3074
|
+
}
|
3075
|
+
async create(IncidentCreateParams, IncidentCreateOptions) {
|
3076
|
+
return await super.sendRequest(
|
3077
|
+
{
|
3078
|
+
method: "POST",
|
3079
|
+
url: "incidents",
|
3080
|
+
body: {
|
3081
|
+
propertyId: IncidentCreateParams.propertyId,
|
3082
|
+
title: IncidentCreateParams.title,
|
3083
|
+
subtitle: IncidentCreateParams.description,
|
3084
|
+
type: IncidentCreateParams.type,
|
3085
|
+
deviceId: IncidentCreateParams.deviceId,
|
3086
|
+
locationId: IncidentCreateParams.locationId,
|
3087
|
+
incidentTepmlateId: IncidentCreateParams.incidentTepmlateId,
|
3088
|
+
severity: IncidentCreateParams.severity
|
3089
|
+
},
|
3090
|
+
authenticationNotOptional: true
|
3091
|
+
},
|
3092
|
+
IncidentCreateOptions
|
3093
|
+
);
|
3094
|
+
}
|
3095
|
+
async list(IncidentListParams, IncidentListOptions) {
|
3096
|
+
const queryArray = [];
|
3097
|
+
if (IncidentListParams?.propertyId !== void 0) {
|
3098
|
+
queryArray.push("propertyId=" + IncidentListParams.propertyId);
|
3099
|
+
}
|
3100
|
+
if (IncidentListOptions?.skip !== void 0) {
|
3101
|
+
queryArray.push("skip=" + IncidentListOptions.skip);
|
3102
|
+
}
|
3103
|
+
if (IncidentListOptions?.limit !== void 0) {
|
3104
|
+
queryArray.push("limit=" + IncidentListOptions.limit);
|
3105
|
+
}
|
3106
|
+
return await super.sendRequest(
|
3107
|
+
{
|
3108
|
+
method: "GET",
|
3109
|
+
url: "incidents?" + queryArray.join("&"),
|
3110
|
+
body: void 0,
|
3111
|
+
authenticationNotOptional: false
|
3112
|
+
},
|
3113
|
+
IncidentListOptions
|
3114
|
+
);
|
3115
|
+
}
|
3116
|
+
async retrieve(IncidentRetrieveParams, IncidentRetrieveOptions) {
|
3117
|
+
const queryArray = [];
|
3118
|
+
if (IncidentRetrieveOptions?.expand !== void 0) {
|
3119
|
+
queryArray.push("expand=" + IncidentRetrieveOptions.expand.join(","));
|
3120
|
+
}
|
3121
|
+
return await super.sendRequest(
|
3122
|
+
{
|
3123
|
+
method: "GET",
|
3124
|
+
url: "incidents/" + IncidentRetrieveParams.incidentId + "?" + queryArray.join("&"),
|
3125
|
+
body: void 0,
|
3126
|
+
authenticationNotOptional: false
|
3127
|
+
},
|
3128
|
+
IncidentRetrieveOptions
|
3129
|
+
);
|
3130
|
+
}
|
3131
|
+
async update(IncidentUpdateParams, IncidentUpdateOptions) {
|
3132
|
+
return await super.sendRequest(
|
3133
|
+
{
|
3134
|
+
method: "PATCH",
|
3135
|
+
url: "incidents/" + IncidentUpdateParams.incidentId,
|
3136
|
+
body: {
|
3137
|
+
title: IncidentUpdateParams.title,
|
3138
|
+
severity: IncidentUpdateParams.severity,
|
3139
|
+
status: IncidentUpdateParams.status
|
3140
|
+
},
|
3141
|
+
authenticationNotOptional: true
|
3142
|
+
},
|
3143
|
+
IncidentUpdateOptions
|
3144
|
+
);
|
3145
|
+
}
|
3146
|
+
async delete(IncidentDeleteParams, IncidentDeleteOptions) {
|
3147
|
+
return await super.sendRequest(
|
3148
|
+
{
|
3149
|
+
method: "DELETE",
|
3150
|
+
url: "incidents/" + IncidentDeleteParams.incidentId,
|
3151
|
+
authenticationNotOptional: true,
|
3152
|
+
body: void 0
|
3153
|
+
},
|
3154
|
+
IncidentDeleteOptions
|
3155
|
+
);
|
3156
|
+
}
|
3157
|
+
};
|
3158
|
+
|
3070
3159
|
// src/types/types.ts
|
3071
3160
|
var LanguageCodeArray = [
|
3072
3161
|
"en",
|
@@ -3247,6 +3336,7 @@ var Juhuu = class {
|
|
3247
3336
|
this.apiKeys = new ApiKeysService(config);
|
3248
3337
|
this.parameters = new ParametersService(config);
|
3249
3338
|
this.incidentTemplates = new IncidentTemplatesService(config);
|
3339
|
+
this.incidents = new IncidentsService(config);
|
3250
3340
|
}
|
3251
3341
|
/**
|
3252
3342
|
* Top Level Resources
|
@@ -3282,6 +3372,7 @@ var Juhuu = class {
|
|
3282
3372
|
apiKeys;
|
3283
3373
|
parameters;
|
3284
3374
|
incidentTemplates;
|
3375
|
+
incidents;
|
3285
3376
|
};
|
3286
3377
|
var JUHUU;
|
3287
3378
|
((JUHUU2) => {
|