@inventorai/sdk 1.3.0
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/LICENSE +21 -0
- package/README.md +516 -0
- package/dist/client.d.ts +59 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +61 -0
- package/dist/errors/api-error.d.ts +12 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-error.js +26 -0
- package/dist/http/client.d.ts +13 -0
- package/dist/http/client.d.ts.map +1 -0
- package/dist/http/client.js +89 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/resources/address-lookup.d.ts +15 -0
- package/dist/resources/address-lookup.d.ts.map +1 -0
- package/dist/resources/address-lookup.js +21 -0
- package/dist/resources/asset-checks.d.ts +19 -0
- package/dist/resources/asset-checks.d.ts.map +1 -0
- package/dist/resources/asset-checks.js +15 -0
- package/dist/resources/branches.d.ts +11 -0
- package/dist/resources/branches.d.ts.map +1 -0
- package/dist/resources/branches.js +15 -0
- package/dist/resources/clients.d.ts +19 -0
- package/dist/resources/clients.d.ts.map +1 -0
- package/dist/resources/clients.js +27 -0
- package/dist/resources/compliance-forms.d.ts +8 -0
- package/dist/resources/compliance-forms.d.ts.map +1 -0
- package/dist/resources/compliance-forms.js +12 -0
- package/dist/resources/compliance.d.ts +28 -0
- package/dist/resources/compliance.d.ts.map +1 -0
- package/dist/resources/compliance.js +45 -0
- package/dist/resources/components.d.ts +8 -0
- package/dist/resources/components.d.ts.map +1 -0
- package/dist/resources/components.js +12 -0
- package/dist/resources/defects.d.ts +29 -0
- package/dist/resources/defects.d.ts.map +1 -0
- package/dist/resources/defects.js +39 -0
- package/dist/resources/hazards.d.ts +11 -0
- package/dist/resources/hazards.d.ts.map +1 -0
- package/dist/resources/hazards.js +12 -0
- package/dist/resources/hmo.d.ts +23 -0
- package/dist/resources/hmo.d.ts.map +1 -0
- package/dist/resources/hmo.js +21 -0
- package/dist/resources/inspection-ai.d.ts +16 -0
- package/dist/resources/inspection-ai.d.ts.map +1 -0
- package/dist/resources/inspection-ai.js +30 -0
- package/dist/resources/inspection-areas.d.ts +26 -0
- package/dist/resources/inspection-areas.d.ts.map +1 -0
- package/dist/resources/inspection-areas.js +39 -0
- package/dist/resources/inspection-elements.d.ts +22 -0
- package/dist/resources/inspection-elements.d.ts.map +1 -0
- package/dist/resources/inspection-elements.js +33 -0
- package/dist/resources/inspection-items.d.ts +25 -0
- package/dist/resources/inspection-items.d.ts.map +1 -0
- package/dist/resources/inspection-items.js +36 -0
- package/dist/resources/inspections.d.ts +42 -0
- package/dist/resources/inspections.d.ts.map +1 -0
- package/dist/resources/inspections.js +57 -0
- package/dist/resources/keys-fobs.d.ts +20 -0
- package/dist/resources/keys-fobs.d.ts.map +1 -0
- package/dist/resources/keys-fobs.js +30 -0
- package/dist/resources/meter-readings.d.ts +20 -0
- package/dist/resources/meter-readings.d.ts.map +1 -0
- package/dist/resources/meter-readings.js +30 -0
- package/dist/resources/modifiers.d.ts +41 -0
- package/dist/resources/modifiers.d.ts.map +1 -0
- package/dist/resources/modifiers.js +45 -0
- package/dist/resources/phrases.d.ts +27 -0
- package/dist/resources/phrases.d.ts.map +1 -0
- package/dist/resources/phrases.js +27 -0
- package/dist/resources/properties.d.ts +21 -0
- package/dist/resources/properties.d.ts.map +1 -0
- package/dist/resources/properties.js +30 -0
- package/dist/resources/property-templates.d.ts +11 -0
- package/dist/resources/property-templates.d.ts.map +1 -0
- package/dist/resources/property-templates.js +15 -0
- package/dist/resources/scheduler.d.ts +11 -0
- package/dist/resources/scheduler.d.ts.map +1 -0
- package/dist/resources/scheduler.js +24 -0
- package/dist/resources/stats.d.ts +10 -0
- package/dist/resources/stats.d.ts.map +1 -0
- package/dist/resources/stats.js +21 -0
- package/dist/resources/team.d.ts +18 -0
- package/dist/resources/team.d.ts.map +1 -0
- package/dist/resources/team.js +20 -0
- package/dist/resources/teams.d.ts +16 -0
- package/dist/resources/teams.d.ts.map +1 -0
- package/dist/resources/teams.js +18 -0
- package/dist/resources/user.d.ts +10 -0
- package/dist/resources/user.d.ts.map +1 -0
- package/dist/resources/user.js +12 -0
- package/dist/resources/vocabulary.d.ts +11 -0
- package/dist/resources/vocabulary.d.ts.map +1 -0
- package/dist/resources/vocabulary.js +12 -0
- package/dist/types/index.d.ts +887 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/package.json +45 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { HazardSync } from '../types';
|
|
3
|
+
export declare class Hazards {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
sync(): Promise<{
|
|
7
|
+
success: boolean;
|
|
8
|
+
data: HazardSync;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hazards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazards.d.ts","sourceRoot":"","sources":["../../src/resources/hazards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,qBAAa,OAAO;IACN,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;CAG9D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Hazards = void 0;
|
|
4
|
+
class Hazards {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async sync() {
|
|
9
|
+
return this.http.get('/hazards/sync');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Hazards = Hazards;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
export interface HmoTenantAssignment {
|
|
3
|
+
tenant_ids?: string[];
|
|
4
|
+
is_shared?: boolean;
|
|
5
|
+
room_identifier?: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface HmoBulkAssignment {
|
|
8
|
+
assignments: Array<{
|
|
9
|
+
area_id: string;
|
|
10
|
+
tenant_ids?: string[];
|
|
11
|
+
is_shared?: boolean;
|
|
12
|
+
room_identifier?: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export declare class Hmo {
|
|
16
|
+
private http;
|
|
17
|
+
constructor(http: HttpClient);
|
|
18
|
+
summary(inspectionId: number | string): Promise<any>;
|
|
19
|
+
tenants(inspectionId: number | string): Promise<any>;
|
|
20
|
+
assignTenantToArea(inspectionId: number | string, areaId: string, data: HmoTenantAssignment): Promise<any>;
|
|
21
|
+
bulkAssignTenants(inspectionId: number | string, data: HmoBulkAssignment): Promise<any>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=hmo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmo.d.ts","sourceRoot":"","sources":["../../src/resources/hmo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,KAAK,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,CAAC,CAAC;CACJ;AAED,qBAAa,GAAG;IACF,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpD,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpD,kBAAkB,CACtB,YAAY,EAAE,MAAM,GAAG,MAAM,EAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,GAAG,CAAC;IAIT,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC;CAG9F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Hmo = void 0;
|
|
4
|
+
class Hmo {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async summary(inspectionId) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/hmo/summary`);
|
|
10
|
+
}
|
|
11
|
+
async tenants(inspectionId) {
|
|
12
|
+
return this.http.get(`/inspections/${inspectionId}/hmo/tenants`);
|
|
13
|
+
}
|
|
14
|
+
async assignTenantToArea(inspectionId, areaId, data) {
|
|
15
|
+
return this.http.put(`/inspections/${inspectionId}/hmo/areas/${areaId}/assign`, data);
|
|
16
|
+
}
|
|
17
|
+
async bulkAssignTenants(inspectionId, data) {
|
|
18
|
+
return this.http.post(`/inspections/${inspectionId}/hmo/bulk-assign`, data);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Hmo = Hmo;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { AiStatus } from '../types';
|
|
3
|
+
export declare class InspectionAi {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
enable(inspectionId: number | string): Promise<any>;
|
|
7
|
+
disable(inspectionId: number | string): Promise<any>;
|
|
8
|
+
status(inspectionId: number | string): Promise<{
|
|
9
|
+
data: AiStatus;
|
|
10
|
+
}>;
|
|
11
|
+
retryCredits(inspectionId: number | string): Promise<any>;
|
|
12
|
+
requestRetry(inspectionId: number | string): Promise<any>;
|
|
13
|
+
retryStatus(inspectionId: number | string): Promise<any>;
|
|
14
|
+
submitFeedback(inspectionId: number | string, data: any): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=inspection-ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-ai.d.ts","sourceRoot":"","sources":["../../src/resources/inspection-ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,qBAAa,YAAY;IACX,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAInD,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpD,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;IAIlE,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzD,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzD,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAG7E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectionAi = void 0;
|
|
4
|
+
class InspectionAi {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async enable(inspectionId) {
|
|
9
|
+
return this.http.post(`/inspections/${inspectionId}/ai/enable`);
|
|
10
|
+
}
|
|
11
|
+
async disable(inspectionId) {
|
|
12
|
+
return this.http.post(`/inspections/${inspectionId}/ai/disable`);
|
|
13
|
+
}
|
|
14
|
+
async status(inspectionId) {
|
|
15
|
+
return this.http.get(`/inspections/${inspectionId}/ai/status`);
|
|
16
|
+
}
|
|
17
|
+
async retryCredits(inspectionId) {
|
|
18
|
+
return this.http.post(`/inspections/${inspectionId}/ai/retry-credits`);
|
|
19
|
+
}
|
|
20
|
+
async requestRetry(inspectionId) {
|
|
21
|
+
return this.http.post(`/inspections/${inspectionId}/ai/request-retry`);
|
|
22
|
+
}
|
|
23
|
+
async retryStatus(inspectionId) {
|
|
24
|
+
return this.http.get(`/inspections/${inspectionId}/ai/retry-status`);
|
|
25
|
+
}
|
|
26
|
+
async submitFeedback(inspectionId, data) {
|
|
27
|
+
return this.http.post(`/inspections/${inspectionId}/ai/feedback`, data);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.InspectionAi = InspectionAi;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { InspectionArea, CreateInspectionAreaData, UpdateInspectionAreaData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class InspectionAreas {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(inspectionId: number | string, params?: ListParams): Promise<PaginatedResponse<InspectionArea>>;
|
|
7
|
+
get(inspectionId: number | string, areaId: string, params?: {
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}): Promise<{
|
|
10
|
+
data: InspectionArea;
|
|
11
|
+
}>;
|
|
12
|
+
create(inspectionId: number | string, data: CreateInspectionAreaData): Promise<{
|
|
13
|
+
data: InspectionArea;
|
|
14
|
+
}>;
|
|
15
|
+
update(inspectionId: number | string, areaId: string, data: UpdateInspectionAreaData): Promise<{
|
|
16
|
+
data: InspectionArea;
|
|
17
|
+
}>;
|
|
18
|
+
delete(inspectionId: number | string, areaId: string): Promise<void>;
|
|
19
|
+
duplicate(inspectionId: number | string, areaId: string): Promise<{
|
|
20
|
+
data: InspectionArea;
|
|
21
|
+
}>;
|
|
22
|
+
reorder(inspectionId: number | string, order: string[]): Promise<void>;
|
|
23
|
+
uploadPhoto(inspectionId: number | string, areaId: string, file: File | Blob | Buffer): Promise<any>;
|
|
24
|
+
deletePhoto(inspectionId: number | string, areaId: string, photoId: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=inspection-areas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-areas.d.ts","sourceRoot":"","sources":["../../src/resources/inspection-areas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7H,qBAAa,eAAe;IACd,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAIxG,GAAG,CAAC,YAAY,EAAE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|
4
|
+
class InspectionAreas {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(inspectionId, params = {}) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/areas`, params);
|
|
10
|
+
}
|
|
11
|
+
async get(inspectionId, areaId, params = {}) {
|
|
12
|
+
const query = params.include
|
|
13
|
+
? { include: Array.isArray(params.include) ? params.include.join(',') : params.include }
|
|
14
|
+
: {};
|
|
15
|
+
return this.http.get(`/inspections/${inspectionId}/areas/${areaId}`, query);
|
|
16
|
+
}
|
|
17
|
+
async create(inspectionId, data) {
|
|
18
|
+
return this.http.post(`/inspections/${inspectionId}/areas`, data);
|
|
19
|
+
}
|
|
20
|
+
async update(inspectionId, areaId, data) {
|
|
21
|
+
return this.http.patch(`/inspections/${inspectionId}/areas/${areaId}`, data);
|
|
22
|
+
}
|
|
23
|
+
async delete(inspectionId, areaId) {
|
|
24
|
+
return this.http.delete(`/inspections/${inspectionId}/areas/${areaId}`);
|
|
25
|
+
}
|
|
26
|
+
async duplicate(inspectionId, areaId) {
|
|
27
|
+
return this.http.post(`/inspections/${inspectionId}/areas/${areaId}/duplicate`);
|
|
28
|
+
}
|
|
29
|
+
async reorder(inspectionId, order) {
|
|
30
|
+
return this.http.post(`/inspections/${inspectionId}/areas/reorder`, { order });
|
|
31
|
+
}
|
|
32
|
+
async uploadPhoto(inspectionId, areaId, file) {
|
|
33
|
+
return this.http.upload(`/inspections/${inspectionId}/areas/${areaId}/photos`, file, 'photo');
|
|
34
|
+
}
|
|
35
|
+
async deletePhoto(inspectionId, areaId, photoId) {
|
|
36
|
+
return this.http.delete(`/inspections/${inspectionId}/areas/${areaId}/photos/${photoId}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.InspectionAreas = InspectionAreas;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { InspectionElement, CreateInspectionElementData, UpdateInspectionElementData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class InspectionElements {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(inspectionId: number | string, params?: ListParams): Promise<PaginatedResponse<InspectionElement>>;
|
|
7
|
+
get(inspectionId: number | string, elementId: string, params?: {
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}): Promise<{
|
|
10
|
+
data: InspectionElement;
|
|
11
|
+
}>;
|
|
12
|
+
create(inspectionId: number | string, data: CreateInspectionElementData): Promise<{
|
|
13
|
+
data: InspectionElement;
|
|
14
|
+
}>;
|
|
15
|
+
update(inspectionId: number | string, elementId: string, data: UpdateInspectionElementData): Promise<{
|
|
16
|
+
data: InspectionElement;
|
|
17
|
+
}>;
|
|
18
|
+
delete(inspectionId: number | string, elementId: string): Promise<void>;
|
|
19
|
+
uploadPhoto(inspectionId: number | string, elementId: string, file: File | Blob | Buffer): Promise<any>;
|
|
20
|
+
deletePhoto(inspectionId: number | string, elementId: string, photoId: string): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=inspection-elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-elements.d.ts","sourceRoot":"","sources":["../../src/resources/inspection-elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtI,qBAAa,kBAAkB;IACjB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAI3G,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAOzI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAI9G,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAIjI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvG,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGpG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectionElements = void 0;
|
|
4
|
+
class InspectionElements {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(inspectionId, params = {}) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/elements`, params);
|
|
10
|
+
}
|
|
11
|
+
async get(inspectionId, elementId, params = {}) {
|
|
12
|
+
const query = params.include
|
|
13
|
+
? { include: Array.isArray(params.include) ? params.include.join(',') : params.include }
|
|
14
|
+
: {};
|
|
15
|
+
return this.http.get(`/inspections/${inspectionId}/elements/${elementId}`, query);
|
|
16
|
+
}
|
|
17
|
+
async create(inspectionId, data) {
|
|
18
|
+
return this.http.post(`/inspections/${inspectionId}/elements`, data);
|
|
19
|
+
}
|
|
20
|
+
async update(inspectionId, elementId, data) {
|
|
21
|
+
return this.http.patch(`/inspections/${inspectionId}/elements/${elementId}`, data);
|
|
22
|
+
}
|
|
23
|
+
async delete(inspectionId, elementId) {
|
|
24
|
+
return this.http.delete(`/inspections/${inspectionId}/elements/${elementId}`);
|
|
25
|
+
}
|
|
26
|
+
async uploadPhoto(inspectionId, elementId, file) {
|
|
27
|
+
return this.http.upload(`/inspections/${inspectionId}/elements/${elementId}/photos`, file, 'photo');
|
|
28
|
+
}
|
|
29
|
+
async deletePhoto(inspectionId, elementId, photoId) {
|
|
30
|
+
return this.http.delete(`/inspections/${inspectionId}/elements/${elementId}/photos/${photoId}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.InspectionElements = InspectionElements;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { InspectionItem, CreateInspectionItemData, UpdateInspectionItemData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class InspectionItems {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(inspectionId: number | string, params?: ListParams): Promise<PaginatedResponse<InspectionItem>>;
|
|
7
|
+
get(inspectionId: number | string, itemId: string, params?: {
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}): Promise<{
|
|
10
|
+
data: InspectionItem;
|
|
11
|
+
}>;
|
|
12
|
+
create(inspectionId: number | string, data: CreateInspectionItemData): Promise<{
|
|
13
|
+
data: InspectionItem;
|
|
14
|
+
}>;
|
|
15
|
+
update(inspectionId: number | string, itemId: string, data: UpdateInspectionItemData): Promise<{
|
|
16
|
+
data: InspectionItem;
|
|
17
|
+
}>;
|
|
18
|
+
delete(inspectionId: number | string, itemId: string): Promise<void>;
|
|
19
|
+
duplicate(inspectionId: number | string, itemId: string): Promise<{
|
|
20
|
+
data: InspectionItem;
|
|
21
|
+
}>;
|
|
22
|
+
uploadPhoto(inspectionId: number | string, itemId: string, file: File | Blob | Buffer): Promise<any>;
|
|
23
|
+
deletePhoto(inspectionId: number | string, itemId: string, photoId: string): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=inspection-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-items.d.ts","sourceRoot":"","sources":["../../src/resources/inspection-items.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7H,qBAAa,eAAe;IACd,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAIxG,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC;IAOnI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC;IAIxG,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC;IAIxH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC;IAI3F,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpG,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectionItems = void 0;
|
|
4
|
+
class InspectionItems {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(inspectionId, params = {}) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/items`, params);
|
|
10
|
+
}
|
|
11
|
+
async get(inspectionId, itemId, params = {}) {
|
|
12
|
+
const query = params.include
|
|
13
|
+
? { include: Array.isArray(params.include) ? params.include.join(',') : params.include }
|
|
14
|
+
: {};
|
|
15
|
+
return this.http.get(`/inspections/${inspectionId}/items/${itemId}`, query);
|
|
16
|
+
}
|
|
17
|
+
async create(inspectionId, data) {
|
|
18
|
+
return this.http.post(`/inspections/${inspectionId}/items`, data);
|
|
19
|
+
}
|
|
20
|
+
async update(inspectionId, itemId, data) {
|
|
21
|
+
return this.http.patch(`/inspections/${inspectionId}/items/${itemId}`, data);
|
|
22
|
+
}
|
|
23
|
+
async delete(inspectionId, itemId) {
|
|
24
|
+
return this.http.delete(`/inspections/${inspectionId}/items/${itemId}`);
|
|
25
|
+
}
|
|
26
|
+
async duplicate(inspectionId, itemId) {
|
|
27
|
+
return this.http.post(`/inspections/${inspectionId}/items/${itemId}/duplicate`);
|
|
28
|
+
}
|
|
29
|
+
async uploadPhoto(inspectionId, itemId, file) {
|
|
30
|
+
return this.http.upload(`/inspections/${inspectionId}/items/${itemId}/photos`, file, 'photo');
|
|
31
|
+
}
|
|
32
|
+
async deletePhoto(inspectionId, itemId, photoId) {
|
|
33
|
+
return this.http.delete(`/inspections/${inspectionId}/items/${itemId}/photos/${photoId}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.InspectionItems = InspectionItems;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Inspection, CreateInspectionData, RescheduleInspectionData, FinalizeInspectionData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class Inspections {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(params?: ListParams): Promise<PaginatedResponse<Inspection>>;
|
|
7
|
+
get(id: number | string, params?: {
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}): Promise<{
|
|
10
|
+
data: Inspection;
|
|
11
|
+
}>;
|
|
12
|
+
create(data: CreateInspectionData): Promise<{
|
|
13
|
+
data: Inspection;
|
|
14
|
+
}>;
|
|
15
|
+
initialize(data: Record<string, any>): Promise<{
|
|
16
|
+
data: Inspection;
|
|
17
|
+
}>;
|
|
18
|
+
takeOver(inspectionId: number | string): Promise<{
|
|
19
|
+
data: Inspection;
|
|
20
|
+
}>;
|
|
21
|
+
takeBackToWeb(inspectionId: number | string): Promise<{
|
|
22
|
+
data: Inspection;
|
|
23
|
+
}>;
|
|
24
|
+
checkExisting(params: Record<string, any>): Promise<any>;
|
|
25
|
+
comparable(params: Record<string, any>): Promise<any>;
|
|
26
|
+
begin(inspectionId: number | string): Promise<{
|
|
27
|
+
data: Inspection;
|
|
28
|
+
}>;
|
|
29
|
+
finalize(inspectionId: number | string, data?: FinalizeInspectionData): Promise<{
|
|
30
|
+
data: Inspection;
|
|
31
|
+
}>;
|
|
32
|
+
reschedule(inspectionId: number | string, data: RescheduleInspectionData): Promise<{
|
|
33
|
+
data: Inspection;
|
|
34
|
+
}>;
|
|
35
|
+
uploadCoverImage(inspectionId: number | string, file: File | Blob | Buffer): Promise<any>;
|
|
36
|
+
deleteCoverImage(inspectionId: number | string): Promise<void>;
|
|
37
|
+
reopen(inspectionId: number | string): Promise<{
|
|
38
|
+
data: Inspection;
|
|
39
|
+
}>;
|
|
40
|
+
delete(inspectionId: number | string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=inspections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspections.d.ts","sourceRoot":"","sources":["../../src/resources/inspections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7I,qBAAa,WAAW;IACV,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAIrE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;IAOrG,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC;QAAE,IAAI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;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;IAIpE,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Inspections = void 0;
|
|
4
|
+
class Inspections {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(params = {}) {
|
|
9
|
+
return this.http.get('/inspections', params);
|
|
10
|
+
}
|
|
11
|
+
async get(id, params = {}) {
|
|
12
|
+
const query = params.include
|
|
13
|
+
? { include: Array.isArray(params.include) ? params.include.join(',') : params.include }
|
|
14
|
+
: {};
|
|
15
|
+
return this.http.get(`/inspections/${id}`, query);
|
|
16
|
+
}
|
|
17
|
+
async create(data) {
|
|
18
|
+
return this.http.post('/inspections', data);
|
|
19
|
+
}
|
|
20
|
+
async initialize(data) {
|
|
21
|
+
return this.http.post('/inspections/initialize', data);
|
|
22
|
+
}
|
|
23
|
+
async takeOver(inspectionId) {
|
|
24
|
+
return this.http.post(`/inspections/${inspectionId}/take-over`);
|
|
25
|
+
}
|
|
26
|
+
async takeBackToWeb(inspectionId) {
|
|
27
|
+
return this.http.post(`/inspections/${inspectionId}/take-back-to-web`);
|
|
28
|
+
}
|
|
29
|
+
async checkExisting(params) {
|
|
30
|
+
return this.http.get('/inspections/check-existing', params);
|
|
31
|
+
}
|
|
32
|
+
async comparable(params) {
|
|
33
|
+
return this.http.get('/inspections/comparable', params);
|
|
34
|
+
}
|
|
35
|
+
async begin(inspectionId) {
|
|
36
|
+
return this.http.post(`/inspections/${inspectionId}/begin`);
|
|
37
|
+
}
|
|
38
|
+
async finalize(inspectionId, data = {}) {
|
|
39
|
+
return this.http.post(`/inspections/${inspectionId}/finalize`, data);
|
|
40
|
+
}
|
|
41
|
+
async reschedule(inspectionId, data) {
|
|
42
|
+
return this.http.patch(`/inspections/${inspectionId}/reschedule`, data);
|
|
43
|
+
}
|
|
44
|
+
async uploadCoverImage(inspectionId, file) {
|
|
45
|
+
return this.http.upload(`/inspections/${inspectionId}/cover-image`, file, 'cover_image');
|
|
46
|
+
}
|
|
47
|
+
async deleteCoverImage(inspectionId) {
|
|
48
|
+
return this.http.delete(`/inspections/${inspectionId}/cover-image`);
|
|
49
|
+
}
|
|
50
|
+
async reopen(inspectionId) {
|
|
51
|
+
return this.http.post(`/inspections/${inspectionId}/reopen`);
|
|
52
|
+
}
|
|
53
|
+
async delete(inspectionId) {
|
|
54
|
+
return this.http.delete(`/inspections/${inspectionId}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.Inspections = Inspections;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { KeyFob, CreateKeyFobData, UpdateKeyFobData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class KeysFobs {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(inspectionId: number | string, params?: ListParams): Promise<PaginatedResponse<KeyFob>>;
|
|
7
|
+
get(inspectionId: number | string, keyFobId: string): Promise<{
|
|
8
|
+
data: KeyFob;
|
|
9
|
+
}>;
|
|
10
|
+
create(inspectionId: number | string, data: CreateKeyFobData): Promise<{
|
|
11
|
+
data: KeyFob;
|
|
12
|
+
}>;
|
|
13
|
+
update(inspectionId: number | string, keyFobId: string, data: UpdateKeyFobData): Promise<{
|
|
14
|
+
data: KeyFob;
|
|
15
|
+
}>;
|
|
16
|
+
delete(inspectionId: number | string, keyFobId: string): Promise<void>;
|
|
17
|
+
uploadPhoto(inspectionId: number | string, keyFobId: string, file: File | Blob | Buffer): Promise<any>;
|
|
18
|
+
deletePhoto(inspectionId: number | string, keyFobId: string, photoId: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ke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,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeysFobs = void 0;
|
|
4
|
+
class KeysFobs {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(inspectionId, params = {}) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/keys-fobs`, params);
|
|
10
|
+
}
|
|
11
|
+
async get(inspectionId, keyFobId) {
|
|
12
|
+
return this.http.get(`/inspections/${inspectionId}/keys-fobs/${keyFobId}`);
|
|
13
|
+
}
|
|
14
|
+
async create(inspectionId, data) {
|
|
15
|
+
return this.http.post(`/inspections/${inspectionId}/keys-fobs`, data);
|
|
16
|
+
}
|
|
17
|
+
async update(inspectionId, keyFobId, data) {
|
|
18
|
+
return this.http.patch(`/inspections/${inspectionId}/keys-fobs/${keyFobId}`, data);
|
|
19
|
+
}
|
|
20
|
+
async delete(inspectionId, keyFobId) {
|
|
21
|
+
return this.http.delete(`/inspections/${inspectionId}/keys-fobs/${keyFobId}`);
|
|
22
|
+
}
|
|
23
|
+
async uploadPhoto(inspectionId, keyFobId, file) {
|
|
24
|
+
return this.http.upload(`/inspections/${inspectionId}/keys-fobs/${keyFobId}/photos`, file, 'photo');
|
|
25
|
+
}
|
|
26
|
+
async deletePhoto(inspectionId, keyFobId, photoId) {
|
|
27
|
+
return this.http.delete(`/inspections/${inspectionId}/keys-fobs/${keyFobId}/photos/${photoId}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.KeysFobs = KeysFobs;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { MeterReading, CreateMeterReadingData, UpdateMeterReadingData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class MeterReadings {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(inspectionId: number | string, params?: ListParams): Promise<PaginatedResponse<MeterReading>>;
|
|
7
|
+
get(inspectionId: number | string, meterReadingId: string): Promise<{
|
|
8
|
+
data: MeterReading;
|
|
9
|
+
}>;
|
|
10
|
+
create(inspectionId: number | string, data: CreateMeterReadingData): Promise<{
|
|
11
|
+
data: MeterReading;
|
|
12
|
+
}>;
|
|
13
|
+
update(inspectionId: number | string, meterReadingId: string, data: UpdateMeterReadingData): Promise<{
|
|
14
|
+
data: MeterReading;
|
|
15
|
+
}>;
|
|
16
|
+
delete(inspectionId: number | string, meterReadingId: string): Promise<void>;
|
|
17
|
+
uploadPhoto(inspectionId: number | string, meterReadingId: string, file: File | Blob | Buffer): Promise<any>;
|
|
18
|
+
deletePhoto(inspectionId: number | string, meterReadingId: string, photoId: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=meter-readings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meter-readings.d.ts","sourceRoot":"","sources":["../../src/resources/meter-readings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvH,qBAAa,aAAa;IACZ,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAItG,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;IAI3F,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;IAIpG,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;IAI5H,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5E,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI5G,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeterReadings = void 0;
|
|
4
|
+
class MeterReadings {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(inspectionId, params = {}) {
|
|
9
|
+
return this.http.get(`/inspections/${inspectionId}/meter-readings`, params);
|
|
10
|
+
}
|
|
11
|
+
async get(inspectionId, meterReadingId) {
|
|
12
|
+
return this.http.get(`/inspections/${inspectionId}/meter-readings/${meterReadingId}`);
|
|
13
|
+
}
|
|
14
|
+
async create(inspectionId, data) {
|
|
15
|
+
return this.http.post(`/inspections/${inspectionId}/meter-readings`, data);
|
|
16
|
+
}
|
|
17
|
+
async update(inspectionId, meterReadingId, data) {
|
|
18
|
+
return this.http.patch(`/inspections/${inspectionId}/meter-readings/${meterReadingId}`, data);
|
|
19
|
+
}
|
|
20
|
+
async delete(inspectionId, meterReadingId) {
|
|
21
|
+
return this.http.delete(`/inspections/${inspectionId}/meter-readings/${meterReadingId}`);
|
|
22
|
+
}
|
|
23
|
+
async uploadPhoto(inspectionId, meterReadingId, file) {
|
|
24
|
+
return this.http.upload(`/inspections/${inspectionId}/meter-readings/${meterReadingId}/photos`, file, 'photo');
|
|
25
|
+
}
|
|
26
|
+
async deletePhoto(inspectionId, meterReadingId, photoId) {
|
|
27
|
+
return this.http.delete(`/inspections/${inspectionId}/meter-readings/${meterReadingId}/photos/${photoId}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.MeterReadings = MeterReadings;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Modifier, CreateCustomModifierData } from '../types';
|
|
3
|
+
export declare class Modifiers {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(): Promise<{
|
|
7
|
+
data: Modifier[];
|
|
8
|
+
}>;
|
|
9
|
+
types(): Promise<any>;
|
|
10
|
+
forItem(params: {
|
|
11
|
+
category?: string;
|
|
12
|
+
item?: string;
|
|
13
|
+
item_name?: string;
|
|
14
|
+
}): Promise<{
|
|
15
|
+
data: Modifier[];
|
|
16
|
+
}>;
|
|
17
|
+
search(params: {
|
|
18
|
+
q: string;
|
|
19
|
+
type?: string;
|
|
20
|
+
category?: string;
|
|
21
|
+
item_name?: string;
|
|
22
|
+
limit?: number;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
data: Modifier[];
|
|
25
|
+
}>;
|
|
26
|
+
disabled(): Promise<{
|
|
27
|
+
data: number[];
|
|
28
|
+
}>;
|
|
29
|
+
master(): Promise<{
|
|
30
|
+
data: Modifier[];
|
|
31
|
+
}>;
|
|
32
|
+
createCustom(data: CreateCustomModifierData): Promise<{
|
|
33
|
+
data: Modifier;
|
|
34
|
+
}>;
|
|
35
|
+
deleteCustom(id: number | string): Promise<void>;
|
|
36
|
+
disable(id: number | string): Promise<void>;
|
|
37
|
+
enable(id: number | string): Promise<void>;
|
|
38
|
+
compose(data: any): Promise<any>;
|
|
39
|
+
sync(params?: Record<string, any>): Promise<any>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=modifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../src/resources/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAE9D,qBAAa,SAAS;IACR,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC;IAIrC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAIrB,OAAO,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC;IAIxG,MAAM,CAAC,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC;IAIlI,QAAQ,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAIvC,MAA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