@internxt/sdk 1.5.25 → 1.6.4
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/auth/index.d.ts +127 -122
- package/dist/auth/index.js +378 -310
- package/dist/auth/types.d.ts +65 -54
- package/dist/auth/types.js +26 -26
- package/dist/drive/backups/index.d.ts +18 -18
- package/dist/drive/backups/index.js +40 -40
- package/dist/drive/backups/types.d.ts +27 -27
- package/dist/drive/backups/types.js +2 -2
- package/dist/drive/index.d.ts +7 -7
- package/dist/drive/index.js +23 -19
- package/dist/drive/payments/index.d.ts +66 -71
- package/dist/drive/payments/index.js +206 -208
- package/dist/drive/payments/types.d.ts +180 -176
- package/dist/drive/payments/types.js +37 -37
- package/dist/drive/referrals/index.d.ts +19 -19
- package/dist/drive/referrals/index.js +54 -50
- package/dist/drive/referrals/types.d.ts +21 -21
- package/dist/drive/referrals/types.js +18 -18
- package/dist/drive/share/index.d.ts +319 -319
- package/dist/drive/share/index.js +544 -540
- package/dist/drive/share/types.d.ts +360 -360
- package/dist/drive/share/types.js +2 -2
- package/dist/drive/storage/index.d.ts +315 -315
- package/dist/drive/storage/index.js +634 -630
- package/dist/drive/storage/types.d.ts +480 -473
- package/dist/drive/storage/types.js +13 -13
- package/dist/drive/trash/index.d.ts +75 -75
- package/dist/drive/trash/index.js +184 -180
- package/dist/drive/trash/types.d.ts +29 -29
- package/dist/drive/trash/types.js +2 -2
- package/dist/drive/users/index.d.ts +135 -135
- package/dist/drive/users/index.js +208 -204
- package/dist/drive/users/types.d.ts +53 -51
- package/dist/drive/users/types.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +35 -31
- package/dist/network/download.d.ts +8 -8
- package/dist/network/download.js +123 -123
- package/dist/network/errors/codes.d.ts +24 -24
- package/dist/network/errors/codes.js +48 -48
- package/dist/network/errors/context.d.ts +35 -35
- package/dist/network/errors/context.js +39 -39
- package/dist/network/errors/download.d.ts +4 -4
- package/dist/network/errors/download.js +52 -48
- package/dist/network/errors/index.d.ts +3 -3
- package/dist/network/errors/index.js +19 -15
- package/dist/network/errors/upload.d.ts +13 -13
- package/dist/network/errors/upload.js +82 -78
- package/dist/network/index.d.ts +70 -70
- package/dist/network/index.js +315 -311
- package/dist/network/types.d.ts +102 -102
- package/dist/network/types.js +18 -18
- package/dist/network/upload.d.ts +4 -4
- package/dist/network/upload.js +158 -159
- package/dist/photos/devices/index.d.ts +10 -10
- package/dist/photos/devices/index.js +79 -79
- package/dist/photos/index.d.ts +17 -17
- package/dist/photos/index.js +56 -52
- package/dist/photos/photos/index.d.ts +60 -60
- package/dist/photos/photos/index.js +225 -225
- package/dist/photos/shares/index.d.ts +8 -8
- package/dist/photos/shares/index.js +34 -34
- package/dist/photos/types.d.ts +154 -154
- package/dist/photos/types.js +19 -19
- package/dist/photos/users/index.d.ts +7 -7
- package/dist/photos/users/index.js +46 -46
- package/dist/shared/headers/index.d.ts +21 -21
- package/dist/shared/headers/index.js +78 -79
- package/dist/shared/http/client.d.ts +85 -85
- package/dist/shared/http/client.js +172 -172
- package/dist/shared/http/types.d.ts +7 -7
- package/dist/shared/http/types.js +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +17 -13
- package/dist/shared/types/apiConnection.d.ts +12 -12
- package/dist/shared/types/apiConnection.js +2 -2
- package/dist/shared/types/appsumo.d.ts +16 -16
- package/dist/shared/types/appsumo.js +12 -12
- package/dist/shared/types/errors.d.ts +5 -5
- package/dist/shared/types/errors.js +28 -28
- package/dist/shared/types/teams.d.ts +9 -9
- package/dist/shared/types/teams.js +2 -2
- package/dist/shared/types/userSettings.d.ts +43 -29
- package/dist/shared/types/userSettings.js +2 -2
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +24 -25
- package/dist/workspaces/index.d.ts +176 -176
- package/dist/workspaces/index.js +419 -415
- package/dist/workspaces/index.test.d.ts +1 -1
- package/dist/workspaces/index.test.js +908 -903
- package/dist/workspaces/types.d.ts +294 -291
- package/dist/workspaces/types.js +2 -2
- package/package.json +13 -13
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var axios_1 = __importDefault(require("axios"));
|
|
18
|
-
var utils_1 = require("../../utils");
|
|
19
|
-
var DevicesSubmodule = /** @class */ (function () {
|
|
20
|
-
function DevicesSubmodule(model) {
|
|
21
|
-
this.model = model;
|
|
22
|
-
}
|
|
23
|
-
DevicesSubmodule.prototype.getDeviceById = function (deviceId) {
|
|
24
|
-
var _this = this;
|
|
25
|
-
return axios_1.default
|
|
26
|
-
.get(this.model.baseUrl
|
|
27
|
-
headers: {
|
|
28
|
-
Authorization: "Bearer "
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
.then(function (res) { return _this.parse(res.data); })
|
|
32
|
-
.catch(function (err) {
|
|
33
|
-
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
DevicesSubmodule.prototype.getDevices = function () {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return axios_1.default
|
|
39
|
-
.get(this.model.baseUrl
|
|
40
|
-
headers: {
|
|
41
|
-
Authorization: "Bearer "
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
.then(function (res) { return res.data.results.map(function (json) { return _this.parse(json); }); })
|
|
45
|
-
.catch(function (err) {
|
|
46
|
-
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
DevicesSubmodule.prototype.createDevice = function (data) {
|
|
50
|
-
var _this = this;
|
|
51
|
-
return axios_1.default
|
|
52
|
-
.post(this.model.baseUrl
|
|
53
|
-
headers: {
|
|
54
|
-
Authorization: "Bearer "
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
.then(function (res) { return _this.parse(res.data); })
|
|
58
|
-
.catch(function (err) {
|
|
59
|
-
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
DevicesSubmodule.prototype.deleteDevice = function (deviceId) {
|
|
63
|
-
return axios_1.default
|
|
64
|
-
.delete(this.model.baseUrl
|
|
65
|
-
headers: {
|
|
66
|
-
Authorization: "Bearer "
|
|
67
|
-
},
|
|
68
|
-
})
|
|
69
|
-
.then(function () { return undefined; })
|
|
70
|
-
.catch(function (err) {
|
|
71
|
-
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
DevicesSubmodule.prototype.parse = function (json) {
|
|
75
|
-
return __assign(__assign({}, json), { newestDate: new Date(json.newestDate), oldestDate: json.oldestDate === null ? json.oldestDate : new Date(json.oldestDate), createdAt: new Date(json.createdAt), updatedAt: new Date(json.updatedAt) });
|
|
76
|
-
};
|
|
77
|
-
return DevicesSubmodule;
|
|
78
|
-
}());
|
|
79
|
-
exports.default = DevicesSubmodule;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var axios_1 = __importDefault(require("axios"));
|
|
18
|
+
var utils_1 = require("../../utils");
|
|
19
|
+
var DevicesSubmodule = /** @class */ (function () {
|
|
20
|
+
function DevicesSubmodule(model) {
|
|
21
|
+
this.model = model;
|
|
22
|
+
}
|
|
23
|
+
DevicesSubmodule.prototype.getDeviceById = function (deviceId) {
|
|
24
|
+
var _this = this;
|
|
25
|
+
return axios_1.default
|
|
26
|
+
.get("".concat(this.model.baseUrl, "/devices/").concat(deviceId), {
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: "Bearer ".concat(this.model.accessToken),
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
.then(function (res) { return _this.parse(res.data); })
|
|
32
|
+
.catch(function (err) {
|
|
33
|
+
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
DevicesSubmodule.prototype.getDevices = function () {
|
|
37
|
+
var _this = this;
|
|
38
|
+
return axios_1.default
|
|
39
|
+
.get("".concat(this.model.baseUrl, "/devices"), {
|
|
40
|
+
headers: {
|
|
41
|
+
Authorization: "Bearer ".concat(this.model.accessToken),
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
.then(function (res) { return res.data.results.map(function (json) { return _this.parse(json); }); })
|
|
45
|
+
.catch(function (err) {
|
|
46
|
+
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
DevicesSubmodule.prototype.createDevice = function (data) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
return axios_1.default
|
|
52
|
+
.post("".concat(this.model.baseUrl, "/devices"), data, {
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: "Bearer ".concat(this.model.accessToken),
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
.then(function (res) { return _this.parse(res.data); })
|
|
58
|
+
.catch(function (err) {
|
|
59
|
+
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
DevicesSubmodule.prototype.deleteDevice = function (deviceId) {
|
|
63
|
+
return axios_1.default
|
|
64
|
+
.delete("".concat(this.model.baseUrl, "/devices/").concat(deviceId), {
|
|
65
|
+
headers: {
|
|
66
|
+
Authorization: "Bearer ".concat(this.model.accessToken),
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
.then(function () { return undefined; })
|
|
70
|
+
.catch(function (err) {
|
|
71
|
+
throw new Error((0, utils_1.extractAxiosErrorMessage)(err));
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
DevicesSubmodule.prototype.parse = function (json) {
|
|
75
|
+
return __assign(__assign({}, json), { newestDate: new Date(json.newestDate), oldestDate: json.oldestDate === null ? json.oldestDate : new Date(json.oldestDate), createdAt: new Date(json.createdAt), updatedAt: new Date(json.updatedAt) });
|
|
76
|
+
};
|
|
77
|
+
return DevicesSubmodule;
|
|
78
|
+
}());
|
|
79
|
+
exports.default = DevicesSubmodule;
|
package/dist/photos/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import UsersSubmodule from './users';
|
|
2
|
-
import DevicesSubmodule from './devices';
|
|
3
|
-
import PhotosSubmodule from './photos';
|
|
4
|
-
import SharesSubmodule from './shares';
|
|
5
|
-
export declare class Photos {
|
|
6
|
-
private readonly model;
|
|
7
|
-
readonly users: UsersSubmodule;
|
|
8
|
-
readonly photos: PhotosSubmodule;
|
|
9
|
-
readonly devices: DevicesSubmodule;
|
|
10
|
-
readonly shares: SharesSubmodule;
|
|
11
|
-
constructor(baseUrl: string, accessToken?: string);
|
|
12
|
-
setBaseUrl(baseUrl: string): void;
|
|
13
|
-
setAccessToken(accessToken: string): void;
|
|
14
|
-
get baseUrl(): string | undefined;
|
|
15
|
-
get accessToken(): string | undefined;
|
|
16
|
-
}
|
|
17
|
-
export * from './types';
|
|
1
|
+
import UsersSubmodule from './users';
|
|
2
|
+
import DevicesSubmodule from './devices';
|
|
3
|
+
import PhotosSubmodule from './photos';
|
|
4
|
+
import SharesSubmodule from './shares';
|
|
5
|
+
export declare class Photos {
|
|
6
|
+
private readonly model;
|
|
7
|
+
readonly users: UsersSubmodule;
|
|
8
|
+
readonly photos: PhotosSubmodule;
|
|
9
|
+
readonly devices: DevicesSubmodule;
|
|
10
|
+
readonly shares: SharesSubmodule;
|
|
11
|
+
constructor(baseUrl: string, accessToken?: string);
|
|
12
|
+
setBaseUrl(baseUrl: string): void;
|
|
13
|
+
setAccessToken(accessToken: string): void;
|
|
14
|
+
get baseUrl(): string | undefined;
|
|
15
|
+
get accessToken(): string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export * from './types';
|
package/dist/photos/index.js
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.Photos = void 0;
|
|
21
|
+
var users_1 = __importDefault(require("./users"));
|
|
22
|
+
var devices_1 = __importDefault(require("./devices"));
|
|
23
|
+
var photos_1 = __importDefault(require("./photos"));
|
|
24
|
+
var shares_1 = __importDefault(require("./shares"));
|
|
25
|
+
var Photos = /** @class */ (function () {
|
|
26
|
+
function Photos(baseUrl, accessToken) {
|
|
27
|
+
this.model = { baseUrl: baseUrl, accessToken: accessToken };
|
|
28
|
+
this.users = new users_1.default(this.model);
|
|
29
|
+
this.photos = new photos_1.default(this.model);
|
|
30
|
+
this.devices = new devices_1.default(this.model);
|
|
31
|
+
this.shares = new shares_1.default(this.model);
|
|
32
|
+
}
|
|
33
|
+
Photos.prototype.setBaseUrl = function (baseUrl) {
|
|
34
|
+
this.model.baseUrl = baseUrl;
|
|
35
|
+
};
|
|
36
|
+
Photos.prototype.setAccessToken = function (accessToken) {
|
|
37
|
+
this.model.accessToken = accessToken;
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(Photos.prototype, "baseUrl", {
|
|
40
|
+
get: function () {
|
|
41
|
+
return this.model.baseUrl;
|
|
42
|
+
},
|
|
43
|
+
enumerable: false,
|
|
44
|
+
configurable: true
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(Photos.prototype, "accessToken", {
|
|
47
|
+
get: function () {
|
|
48
|
+
return this.model.accessToken;
|
|
49
|
+
},
|
|
50
|
+
enumerable: false,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
53
|
+
return Photos;
|
|
54
|
+
}());
|
|
55
|
+
exports.Photos = Photos;
|
|
56
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { CreatePhotoData, Photo, PhotoId, PhotosSdkModel, PhotoStatus } from '..';
|
|
2
|
-
import { PhotoWithDownloadLink, PhotoExistsPayload, PhotoExistsData, PhotosUsage, UpdatePhotoPayload, PhotosCount, PhotosSortBy } from '../types';
|
|
3
|
-
export default class PhotosSubmodule {
|
|
4
|
-
private model;
|
|
5
|
-
constructor(model: PhotosSdkModel);
|
|
6
|
-
getPhotoById(photoId: PhotoId): Promise<Photo>;
|
|
7
|
-
getPhotosSorted(filter: {
|
|
8
|
-
status?: PhotoStatus;
|
|
9
|
-
updatedAt?: Date;
|
|
10
|
-
}, sort: {
|
|
11
|
-
sortBy: PhotosSortBy;
|
|
12
|
-
sortType: 'ASC' | 'DESC';
|
|
13
|
-
}, skip: number, limit: number, includeDownloadLinks: true): Promise<{
|
|
14
|
-
results: PhotoWithDownloadLink[];
|
|
15
|
-
bucketId: string;
|
|
16
|
-
}>;
|
|
17
|
-
getPhotosSorted(filter: {
|
|
18
|
-
status?: PhotoStatus;
|
|
19
|
-
updatedAt?: Date;
|
|
20
|
-
}, sort: {
|
|
21
|
-
sortBy: PhotosSortBy;
|
|
22
|
-
sortType: 'ASC' | 'DESC';
|
|
23
|
-
}, skip: number, limit: number, includeDownloadLinks: false): Promise<{
|
|
24
|
-
results: Photo[];
|
|
25
|
-
bucketId: string;
|
|
26
|
-
}>;
|
|
27
|
-
getPhotos(filter: {
|
|
28
|
-
name?: string;
|
|
29
|
-
status?: PhotoStatus;
|
|
30
|
-
updatedAt?: Date;
|
|
31
|
-
}, skip: number, limit: number): Promise<{
|
|
32
|
-
results: Photo[];
|
|
33
|
-
bucketId: string;
|
|
34
|
-
}>;
|
|
35
|
-
getPhotos(filter: {
|
|
36
|
-
name?: string;
|
|
37
|
-
status?: PhotoStatus;
|
|
38
|
-
updatedAt?: Date;
|
|
39
|
-
}, skip: number, limit: number, includeDownloadLinks: true): Promise<{
|
|
40
|
-
results: PhotoWithDownloadLink[];
|
|
41
|
-
bucketId: string;
|
|
42
|
-
}>;
|
|
43
|
-
createPhoto(data: CreatePhotoData): Promise<Photo>;
|
|
44
|
-
findOrCreatePhoto(data: CreatePhotoData): Promise<Photo>;
|
|
45
|
-
deletePhotosById(photos: {
|
|
46
|
-
id: PhotoId;
|
|
47
|
-
}[]): Promise<void>;
|
|
48
|
-
deletePhotoById(photoId: PhotoId): Promise<void>;
|
|
49
|
-
trashPhotosById(photos: {
|
|
50
|
-
id: PhotoId;
|
|
51
|
-
}[]): Promise<void>;
|
|
52
|
-
trashPhotoById(photoId: PhotoId): Promise<void>;
|
|
53
|
-
getUsage(): Promise<PhotosUsage>;
|
|
54
|
-
photosExists(photosExistPayload: PhotoExistsPayload[]): Promise<PhotoExistsData[]>;
|
|
55
|
-
updatePhoto(photoId: PhotoId, data: UpdatePhotoPayload): Promise<{
|
|
56
|
-
message: string;
|
|
57
|
-
}>;
|
|
58
|
-
getCount(): Promise<PhotosCount>;
|
|
59
|
-
private parse;
|
|
60
|
-
}
|
|
1
|
+
import { CreatePhotoData, Photo, PhotoId, PhotosSdkModel, PhotoStatus } from '..';
|
|
2
|
+
import { PhotoWithDownloadLink, PhotoExistsPayload, PhotoExistsData, PhotosUsage, UpdatePhotoPayload, PhotosCount, PhotosSortBy } from '../types';
|
|
3
|
+
export default class PhotosSubmodule {
|
|
4
|
+
private model;
|
|
5
|
+
constructor(model: PhotosSdkModel);
|
|
6
|
+
getPhotoById(photoId: PhotoId): Promise<Photo>;
|
|
7
|
+
getPhotosSorted(filter: {
|
|
8
|
+
status?: PhotoStatus;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
}, sort: {
|
|
11
|
+
sortBy: PhotosSortBy;
|
|
12
|
+
sortType: 'ASC' | 'DESC';
|
|
13
|
+
}, skip: number, limit: number, includeDownloadLinks: true): Promise<{
|
|
14
|
+
results: PhotoWithDownloadLink[];
|
|
15
|
+
bucketId: string;
|
|
16
|
+
}>;
|
|
17
|
+
getPhotosSorted(filter: {
|
|
18
|
+
status?: PhotoStatus;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
}, sort: {
|
|
21
|
+
sortBy: PhotosSortBy;
|
|
22
|
+
sortType: 'ASC' | 'DESC';
|
|
23
|
+
}, skip: number, limit: number, includeDownloadLinks: false): Promise<{
|
|
24
|
+
results: Photo[];
|
|
25
|
+
bucketId: string;
|
|
26
|
+
}>;
|
|
27
|
+
getPhotos(filter: {
|
|
28
|
+
name?: string;
|
|
29
|
+
status?: PhotoStatus;
|
|
30
|
+
updatedAt?: Date;
|
|
31
|
+
}, skip: number, limit: number): Promise<{
|
|
32
|
+
results: Photo[];
|
|
33
|
+
bucketId: string;
|
|
34
|
+
}>;
|
|
35
|
+
getPhotos(filter: {
|
|
36
|
+
name?: string;
|
|
37
|
+
status?: PhotoStatus;
|
|
38
|
+
updatedAt?: Date;
|
|
39
|
+
}, skip: number, limit: number, includeDownloadLinks: true): Promise<{
|
|
40
|
+
results: PhotoWithDownloadLink[];
|
|
41
|
+
bucketId: string;
|
|
42
|
+
}>;
|
|
43
|
+
createPhoto(data: CreatePhotoData): Promise<Photo>;
|
|
44
|
+
findOrCreatePhoto(data: CreatePhotoData): Promise<Photo>;
|
|
45
|
+
deletePhotosById(photos: {
|
|
46
|
+
id: PhotoId;
|
|
47
|
+
}[]): Promise<void>;
|
|
48
|
+
deletePhotoById(photoId: PhotoId): Promise<void>;
|
|
49
|
+
trashPhotosById(photos: {
|
|
50
|
+
id: PhotoId;
|
|
51
|
+
}[]): Promise<void>;
|
|
52
|
+
trashPhotoById(photoId: PhotoId): Promise<void>;
|
|
53
|
+
getUsage(): Promise<PhotosUsage>;
|
|
54
|
+
photosExists(photosExistPayload: PhotoExistsPayload[]): Promise<PhotoExistsData[]>;
|
|
55
|
+
updatePhoto(photoId: PhotoId, data: UpdatePhotoPayload): Promise<{
|
|
56
|
+
message: string;
|
|
57
|
+
}>;
|
|
58
|
+
getCount(): Promise<PhotosCount>;
|
|
59
|
+
private parse;
|
|
60
|
+
}
|