@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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Modifiers = void 0;
|
|
4
|
+
class Modifiers {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list() {
|
|
9
|
+
return this.http.get('/modifiers');
|
|
10
|
+
}
|
|
11
|
+
async types() {
|
|
12
|
+
return this.http.get('/modifiers/types');
|
|
13
|
+
}
|
|
14
|
+
async forItem(params) {
|
|
15
|
+
return this.http.get('/modifiers/for-item', params);
|
|
16
|
+
}
|
|
17
|
+
async search(params) {
|
|
18
|
+
return this.http.get('/modifiers/search', params);
|
|
19
|
+
}
|
|
20
|
+
async disabled() {
|
|
21
|
+
return this.http.get('/modifiers/disabled');
|
|
22
|
+
}
|
|
23
|
+
async master() {
|
|
24
|
+
return this.http.get('/modifiers/master');
|
|
25
|
+
}
|
|
26
|
+
async createCustom(data) {
|
|
27
|
+
return this.http.post('/modifiers/custom', data);
|
|
28
|
+
}
|
|
29
|
+
async deleteCustom(id) {
|
|
30
|
+
return this.http.delete(`/modifiers/custom/${id}`);
|
|
31
|
+
}
|
|
32
|
+
async disable(id) {
|
|
33
|
+
return this.http.post(`/modifiers/${id}/disable`);
|
|
34
|
+
}
|
|
35
|
+
async enable(id) {
|
|
36
|
+
return this.http.post(`/modifiers/${id}/enable`);
|
|
37
|
+
}
|
|
38
|
+
async compose(data) {
|
|
39
|
+
return this.http.post('/modifiers/compose', data);
|
|
40
|
+
}
|
|
41
|
+
async sync(params) {
|
|
42
|
+
return this.http.get('/modifiers/sync', params);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Modifiers = Modifiers;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Phrase, CreatePhraseData, PhraseCategory } from '../types';
|
|
3
|
+
export declare class Phrases {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
sync(): Promise<any>;
|
|
7
|
+
search(params: {
|
|
8
|
+
q: string;
|
|
9
|
+
category?: PhraseCategory;
|
|
10
|
+
limit?: number;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
data: Phrase[];
|
|
13
|
+
}>;
|
|
14
|
+
create(data: CreatePhraseData): Promise<{
|
|
15
|
+
data: Phrase;
|
|
16
|
+
}>;
|
|
17
|
+
generate(data: {
|
|
18
|
+
query: string;
|
|
19
|
+
category: PhraseCategory;
|
|
20
|
+
context?: string;
|
|
21
|
+
}): Promise<any>;
|
|
22
|
+
learn(data: {
|
|
23
|
+
descriptions: string[];
|
|
24
|
+
}): Promise<any>;
|
|
25
|
+
stats(): Promise<any>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=phrases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phrases.d.ts","sourceRoot":"","sources":["../../src/resources/phrases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEpE,qBAAa,OAAO;IACN,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAIpB,MAAM,CAAC,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAIrG,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAIzD,QAAQ,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,cAAc,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAI3F,KAAK,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAIrD,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;CAG5B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Phrases = void 0;
|
|
4
|
+
class Phrases {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async sync() {
|
|
9
|
+
return this.http.get('/phrases/sync');
|
|
10
|
+
}
|
|
11
|
+
async search(params) {
|
|
12
|
+
return this.http.get('/phrases/search', params);
|
|
13
|
+
}
|
|
14
|
+
async create(data) {
|
|
15
|
+
return this.http.post('/phrases', data);
|
|
16
|
+
}
|
|
17
|
+
async generate(data) {
|
|
18
|
+
return this.http.post('/phrases/generate', data);
|
|
19
|
+
}
|
|
20
|
+
async learn(data) {
|
|
21
|
+
return this.http.post('/phrases/learn', data);
|
|
22
|
+
}
|
|
23
|
+
async stats() {
|
|
24
|
+
return this.http.get('/phrases/stats');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Phrases = Phrases;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Property, CreatePropertyData, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class Properties {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(params?: ListParams): Promise<PaginatedResponse<Property>>;
|
|
7
|
+
get(id: number | string, params?: {
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}): Promise<{
|
|
10
|
+
data: Property;
|
|
11
|
+
}>;
|
|
12
|
+
create(data: CreatePropertyData): Promise<{
|
|
13
|
+
data: Property;
|
|
14
|
+
}>;
|
|
15
|
+
activeTenancy(propertyId: number | string): Promise<{
|
|
16
|
+
data: any;
|
|
17
|
+
}>;
|
|
18
|
+
uploadCoverImage(propertyId: number | string, file: File | Blob | Buffer): Promise<any>;
|
|
19
|
+
deleteCoverImage(propertyId: number | string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=properties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/resources/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvF,qBAAa,UAAU;IACT,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAInE,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,QAAQ,CAAA;KAAE,CAAC;IAOnG,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;IAI7D,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC;IAIlE,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvF,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Properties = void 0;
|
|
4
|
+
class Properties {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(params = {}) {
|
|
9
|
+
return this.http.get('/properties', 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(`/properties/${id}`, query);
|
|
16
|
+
}
|
|
17
|
+
async create(data) {
|
|
18
|
+
return this.http.post('/properties', data);
|
|
19
|
+
}
|
|
20
|
+
async activeTenancy(propertyId) {
|
|
21
|
+
return this.http.get(`/properties/${propertyId}/active-tenancy`);
|
|
22
|
+
}
|
|
23
|
+
async uploadCoverImage(propertyId, file) {
|
|
24
|
+
return this.http.upload(`/properties/${propertyId}/cover-image`, file, 'cover_image');
|
|
25
|
+
}
|
|
26
|
+
async deleteCoverImage(propertyId) {
|
|
27
|
+
return this.http.delete(`/properties/${propertyId}/cover-image`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Properties = Properties;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { PropertyTemplate, PaginatedResponse, ListParams } from '../types';
|
|
3
|
+
export declare class PropertyTemplates {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(params?: ListParams): Promise<PaginatedResponse<PropertyTemplate>>;
|
|
7
|
+
get(id: number | string): Promise<{
|
|
8
|
+
data: PropertyTemplate;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=property-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-templates.d.ts","sourceRoot":"","sources":["../../src/resources/property-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3E,qBAAa,iBAAiB;IAChB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAI3E,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC;CAGpE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyTemplates = void 0;
|
|
4
|
+
class PropertyTemplates {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list(params = {}) {
|
|
9
|
+
return this.http.get('/property-templates', params);
|
|
10
|
+
}
|
|
11
|
+
async get(id) {
|
|
12
|
+
return this.http.get(`/property-templates/${id}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.PropertyTemplates = PropertyTemplates;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
export declare class Scheduler {
|
|
3
|
+
private http;
|
|
4
|
+
constructor(http: HttpClient);
|
|
5
|
+
calendar(params?: Record<string, any>): Promise<any>;
|
|
6
|
+
weeklyAvailability(data: any): Promise<any>;
|
|
7
|
+
checkConflicts(data: any): Promise<any>;
|
|
8
|
+
officeHours(): Promise<any>;
|
|
9
|
+
estimateDuration(data: any): Promise<any>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/resources/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAAa,SAAS;IACR,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,QAAQ,CAAC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAI3C,cAAc,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC;IAI3B,gBAAgB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAGhD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scheduler = void 0;
|
|
4
|
+
class Scheduler {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async calendar(params = {}) {
|
|
9
|
+
return this.http.get('/inspections/scheduler/calendar', params);
|
|
10
|
+
}
|
|
11
|
+
async weeklyAvailability(data) {
|
|
12
|
+
return this.http.post('/inspections/scheduler/availability/weekly', data);
|
|
13
|
+
}
|
|
14
|
+
async checkConflicts(data) {
|
|
15
|
+
return this.http.post('/inspections/scheduler/availability/check-conflicts', data);
|
|
16
|
+
}
|
|
17
|
+
async officeHours() {
|
|
18
|
+
return this.http.get('/inspections/scheduler/office-hours');
|
|
19
|
+
}
|
|
20
|
+
async estimateDuration(data) {
|
|
21
|
+
return this.http.post('/inspections/scheduler/estimate-duration', data);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Scheduler = Scheduler;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
export declare class StatsResource {
|
|
3
|
+
private http;
|
|
4
|
+
constructor(http: HttpClient);
|
|
5
|
+
index(): Promise<any>;
|
|
6
|
+
team(): Promise<any>;
|
|
7
|
+
user(): Promise<any>;
|
|
8
|
+
schedule(): Promise<any>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/resources/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAAa,aAAa;IACZ,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAIpB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAIpB,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC;CAG/B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatsResource = void 0;
|
|
4
|
+
class StatsResource {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async index() {
|
|
9
|
+
return this.http.get('/stats');
|
|
10
|
+
}
|
|
11
|
+
async team() {
|
|
12
|
+
return this.http.get('/stats/team');
|
|
13
|
+
}
|
|
14
|
+
async user() {
|
|
15
|
+
return this.http.get('/stats/user');
|
|
16
|
+
}
|
|
17
|
+
async schedule() {
|
|
18
|
+
return this.http.get('/dashboard/schedule');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.StatsResource = StatsResource;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Team } from '../types';
|
|
3
|
+
export declare class TeamResource {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Get the team behind the current API token.
|
|
8
|
+
*
|
|
9
|
+
* Returns the team's id, name, slug, address, branding, subscription
|
|
10
|
+
* state, inspection hours, and option presets. Call this on startup to
|
|
11
|
+
* resolve the team_id for the `private-team.{id}` socket channel and
|
|
12
|
+
* to surface branding to your users.
|
|
13
|
+
*/
|
|
14
|
+
current(): Promise<{
|
|
15
|
+
data: Team;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=team.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../src/resources/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,qBAAa,YAAY;IACX,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;OAOG;IACG,OAAO,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;CAGzC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamResource = void 0;
|
|
4
|
+
class TeamResource {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get the team behind the current API token.
|
|
10
|
+
*
|
|
11
|
+
* Returns the team's id, name, slug, address, branding, subscription
|
|
12
|
+
* state, inspection hours, and option presets. Call this on startup to
|
|
13
|
+
* resolve the team_id for the `private-team.{id}` socket channel and
|
|
14
|
+
* to surface branding to your users.
|
|
15
|
+
*/
|
|
16
|
+
async current() {
|
|
17
|
+
return this.http.get('');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.TeamResource = TeamResource;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { Team } from '../types';
|
|
3
|
+
export declare class Teams {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
list(): Promise<{
|
|
7
|
+
data: Team[];
|
|
8
|
+
}>;
|
|
9
|
+
current(): Promise<{
|
|
10
|
+
data: Team;
|
|
11
|
+
}>;
|
|
12
|
+
switch(teamId: number): Promise<{
|
|
13
|
+
data: Team;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/resources/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,qBAAa,KAAK;IACJ,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC;IAIjC,OAAO,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAIlC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;CAGtD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Teams = void 0;
|
|
4
|
+
class Teams {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async list() {
|
|
9
|
+
return this.http.get('/teams');
|
|
10
|
+
}
|
|
11
|
+
async current() {
|
|
12
|
+
return this.http.get('/team');
|
|
13
|
+
}
|
|
14
|
+
async switch(teamId) {
|
|
15
|
+
return this.http.post('/team/switch', { team_id: teamId });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Teams = Teams;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/resources/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,qBAAa,YAAY;IACX,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,EAAE,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;CAGpC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserResource = void 0;
|
|
4
|
+
class UserResource {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async me() {
|
|
9
|
+
return this.http.get('/user');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.UserResource = UserResource;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '../http/client';
|
|
2
|
+
import { VocabularySync } from '../types';
|
|
3
|
+
export declare class Vocabulary {
|
|
4
|
+
private http;
|
|
5
|
+
constructor(http: HttpClient);
|
|
6
|
+
sync(): Promise<{
|
|
7
|
+
success: boolean;
|
|
8
|
+
data: VocabularySync;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/resources/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,qBAAa,UAAU;IACT,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,IAAI,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC;CAGlE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Vocabulary = void 0;
|
|
4
|
+
class Vocabulary {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
async sync() {
|
|
9
|
+
return this.http.get('/vocabulary/sync');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Vocabulary = Vocabulary;
|