dt-common-device 7.6.14 → 7.6.15

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.
@@ -1,5 +1,5 @@
1
1
  import { IIssueDocument } from "./Issue.model";
2
- import { CreateIssueData, UpdateIssueData, AddCommentData, IssuePriority, IssuesCategory, EntityType, EntitySubType, IIssueQuery, IssueType } from "./issue.types";
2
+ import { CreateIssueData, UpdateIssueData, AddCommentData, IssuePriority, IssuesCategory, EntityType, EntitySubType, IIssueQuery } from "./issue.types";
3
3
  import { IssueBuilder } from "./IssueBuilder";
4
4
  import { Source } from "../constants/Service";
5
5
  import { IDevice } from "../entities/device/local/interfaces";
@@ -30,15 +30,6 @@ export declare class IssueService {
30
30
  * Create a user-specific issue using IssueBuilder
31
31
  */
32
32
  createUserIssue(data: CreateIssueData): Promise<IIssueDocument | null>;
33
- createCloudAccountAuthorizationIssue(data: {
34
- propertyId: string;
35
- entityId: string;
36
- entityType: EntityType;
37
- title: string;
38
- description: string;
39
- createdBy: string;
40
- type: IssueType;
41
- }): Promise<IIssueDocument | null>;
42
33
  /**
43
34
  * Create issue for device going offline longer than baseline
44
35
  */
@@ -54,9 +45,10 @@ export declare class IssueService {
54
45
  }, propertyId: string, source: Source): Promise<IIssueDocument | null>;
55
46
  createAccountUnauthorizedIssue(account: {
56
47
  accountId: string;
57
- accountType: EntitySubType;
48
+ accountType: EntityType;
58
49
  propertyId: string;
59
50
  name: string;
51
+ accountSubType: EntitySubType;
60
52
  }, source: Source, reason?: string): Promise<IIssueDocument | null>;
61
53
  /**
62
54
  * Create issue for device malfunction (jammed or not accepting codes) (READINESS + OPERATIONAL)
@@ -226,13 +226,6 @@ let IssueService = (() => {
226
226
  issueBuilder.setZoneId(data.zoneId);
227
227
  return await this.createIssue(issueBuilder);
228
228
  }
229
- async createCloudAccountAuthorizationIssue(data) {
230
- const issueBuilder = IssueBuilder_1.IssueBuilder.createCloudAccountAuthorizationIssue(data.propertyId, data.entityId, data.entityType, data.type)
231
- .setTitle(data.title)
232
- .setDescription(data.description)
233
- .setCreatedBy(data.createdBy);
234
- return await this.createIssue(issueBuilder);
235
- }
236
229
  /**
237
230
  * Create issue for device going offline longer than baseline
238
231
  */
@@ -290,8 +283,8 @@ let IssueService = (() => {
290
283
  async createAccountUnauthorizedIssue(account, source, reason) {
291
284
  return await this.createIssue({
292
285
  entityId: account.accountId,
293
- entityType: issue_types_1.EntityType.CLOUD_DEVICE_ACCOUNT,
294
- entitySubType: account.accountType,
286
+ entityType: account?.accountType,
287
+ entitySubType: account?.accountSubType,
295
288
  propertyId: account.propertyId,
296
289
  title: "Account re-authorization required",
297
290
  description: `${account.name}'s authorization has expired. Please re-authorize the account. ${reason ? `Reason: ${reason}.` : ""}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "7.6.14",
3
+ "version": "7.6.15",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [