@internxt/sdk 1.4.77 → 1.5.25
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 +122 -122
- package/dist/auth/index.js +310 -310
- package/dist/auth/types.d.ts +54 -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 +19 -19
- package/dist/drive/payments/index.d.ts +71 -53
- package/dist/drive/payments/index.js +208 -153
- package/dist/drive/payments/types.d.ts +176 -114
- package/dist/drive/payments/types.js +37 -32
- package/dist/drive/referrals/index.d.ts +19 -19
- package/dist/drive/referrals/index.js +50 -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 +540 -539
- package/dist/drive/share/types.d.ts +360 -358
- package/dist/drive/share/types.js +2 -2
- package/dist/drive/storage/index.d.ts +315 -195
- package/dist/drive/storage/index.js +630 -434
- package/dist/drive/storage/types.d.ts +473 -394
- package/dist/drive/storage/types.js +13 -13
- package/dist/drive/trash/index.d.ts +75 -55
- package/dist/drive/trash/index.js +180 -149
- package/dist/drive/trash/types.d.ts +29 -20
- package/dist/drive/trash/types.js +2 -2
- package/dist/drive/users/index.d.ts +135 -108
- package/dist/drive/users/index.js +204 -174
- package/dist/drive/users/types.d.ts +51 -43
- package/dist/drive/users/types.js +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.js +31 -30
- 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 +48 -48
- package/dist/network/errors/index.d.ts +3 -3
- package/dist/network/errors/index.js +15 -15
- package/dist/network/errors/upload.d.ts +13 -13
- package/dist/network/errors/upload.js +78 -78
- package/dist/network/index.d.ts +70 -71
- package/dist/network/index.js +311 -310
- 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 +159 -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 +52 -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 -18
- package/dist/shared/headers/index.js +79 -69
- package/dist/shared/http/client.d.ts +85 -85
- package/dist/shared/http/client.js +172 -181
- 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 +13 -13
- package/dist/shared/types/apiConnection.d.ts +12 -11
- 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 -4
- package/dist/shared/types/errors.js +28 -27
- package/dist/shared/types/teams.d.ts +9 -9
- package/dist/shared/types/teams.js +2 -2
- package/dist/shared/types/userSettings.d.ts +29 -27
- package/dist/shared/types/userSettings.js +2 -2
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +25 -25
- package/dist/workspaces/index.d.ts +176 -0
- package/dist/workspaces/index.js +415 -0
- package/dist/workspaces/index.test.d.ts +1 -0
- package/dist/workspaces/index.test.js +903 -0
- package/dist/workspaces/types.d.ts +291 -0
- package/dist/workspaces/types.js +2 -0
- package/package.json +1 -1
|
@@ -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 + "/devices/" + deviceId, {
|
|
27
|
-
headers: {
|
|
28
|
-
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices", {
|
|
40
|
-
headers: {
|
|
41
|
-
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices", data, {
|
|
53
|
-
headers: {
|
|
54
|
-
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices/" + deviceId, {
|
|
65
|
-
headers: {
|
|
66
|
-
Authorization: "Bearer " + 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;
|
|
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 + "/devices/" + deviceId, {
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices", {
|
|
40
|
+
headers: {
|
|
41
|
+
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices", data, {
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: "Bearer " + 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(this.model.baseUrl + "/devices/" + deviceId, {
|
|
65
|
+
headers: {
|
|
66
|
+
Authorization: "Bearer " + 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,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Photos = void 0;
|
|
17
|
-
var users_1 = __importDefault(require("./users"));
|
|
18
|
-
var devices_1 = __importDefault(require("./devices"));
|
|
19
|
-
var photos_1 = __importDefault(require("./photos"));
|
|
20
|
-
var shares_1 = __importDefault(require("./shares"));
|
|
21
|
-
var Photos = /** @class */ (function () {
|
|
22
|
-
function Photos(baseUrl, accessToken) {
|
|
23
|
-
this.model = { baseUrl: baseUrl, accessToken: accessToken };
|
|
24
|
-
this.users = new users_1.default(this.model);
|
|
25
|
-
this.photos = new photos_1.default(this.model);
|
|
26
|
-
this.devices = new devices_1.default(this.model);
|
|
27
|
-
this.shares = new shares_1.default(this.model);
|
|
28
|
-
}
|
|
29
|
-
Photos.prototype.setBaseUrl = function (baseUrl) {
|
|
30
|
-
this.model.baseUrl = baseUrl;
|
|
31
|
-
};
|
|
32
|
-
Photos.prototype.setAccessToken = function (accessToken) {
|
|
33
|
-
this.model.accessToken = accessToken;
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(Photos.prototype, "baseUrl", {
|
|
36
|
-
get: function () {
|
|
37
|
-
return this.model.baseUrl;
|
|
38
|
-
},
|
|
39
|
-
enumerable: false,
|
|
40
|
-
configurable: true
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(Photos.prototype, "accessToken", {
|
|
43
|
-
get: function () {
|
|
44
|
-
return this.model.accessToken;
|
|
45
|
-
},
|
|
46
|
-
enumerable: false,
|
|
47
|
-
configurable: true
|
|
48
|
-
});
|
|
49
|
-
return Photos;
|
|
50
|
-
}());
|
|
51
|
-
exports.Photos = Photos;
|
|
52
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.Photos = void 0;
|
|
17
|
+
var users_1 = __importDefault(require("./users"));
|
|
18
|
+
var devices_1 = __importDefault(require("./devices"));
|
|
19
|
+
var photos_1 = __importDefault(require("./photos"));
|
|
20
|
+
var shares_1 = __importDefault(require("./shares"));
|
|
21
|
+
var Photos = /** @class */ (function () {
|
|
22
|
+
function Photos(baseUrl, accessToken) {
|
|
23
|
+
this.model = { baseUrl: baseUrl, accessToken: accessToken };
|
|
24
|
+
this.users = new users_1.default(this.model);
|
|
25
|
+
this.photos = new photos_1.default(this.model);
|
|
26
|
+
this.devices = new devices_1.default(this.model);
|
|
27
|
+
this.shares = new shares_1.default(this.model);
|
|
28
|
+
}
|
|
29
|
+
Photos.prototype.setBaseUrl = function (baseUrl) {
|
|
30
|
+
this.model.baseUrl = baseUrl;
|
|
31
|
+
};
|
|
32
|
+
Photos.prototype.setAccessToken = function (accessToken) {
|
|
33
|
+
this.model.accessToken = accessToken;
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(Photos.prototype, "baseUrl", {
|
|
36
|
+
get: function () {
|
|
37
|
+
return this.model.baseUrl;
|
|
38
|
+
},
|
|
39
|
+
enumerable: false,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(Photos.prototype, "accessToken", {
|
|
43
|
+
get: function () {
|
|
44
|
+
return this.model.accessToken;
|
|
45
|
+
},
|
|
46
|
+
enumerable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
return Photos;
|
|
50
|
+
}());
|
|
51
|
+
exports.Photos = Photos;
|
|
52
|
+
__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
|
+
}
|