@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.
Files changed (93) hide show
  1. package/dist/auth/index.d.ts +122 -122
  2. package/dist/auth/index.js +310 -310
  3. package/dist/auth/types.d.ts +54 -54
  4. package/dist/auth/types.js +26 -26
  5. package/dist/drive/backups/index.d.ts +18 -18
  6. package/dist/drive/backups/index.js +40 -40
  7. package/dist/drive/backups/types.d.ts +27 -27
  8. package/dist/drive/backups/types.js +2 -2
  9. package/dist/drive/index.d.ts +7 -7
  10. package/dist/drive/index.js +19 -19
  11. package/dist/drive/payments/index.d.ts +71 -53
  12. package/dist/drive/payments/index.js +208 -153
  13. package/dist/drive/payments/types.d.ts +176 -114
  14. package/dist/drive/payments/types.js +37 -32
  15. package/dist/drive/referrals/index.d.ts +19 -19
  16. package/dist/drive/referrals/index.js +50 -50
  17. package/dist/drive/referrals/types.d.ts +21 -21
  18. package/dist/drive/referrals/types.js +18 -18
  19. package/dist/drive/share/index.d.ts +319 -319
  20. package/dist/drive/share/index.js +540 -539
  21. package/dist/drive/share/types.d.ts +360 -358
  22. package/dist/drive/share/types.js +2 -2
  23. package/dist/drive/storage/index.d.ts +315 -195
  24. package/dist/drive/storage/index.js +630 -434
  25. package/dist/drive/storage/types.d.ts +473 -394
  26. package/dist/drive/storage/types.js +13 -13
  27. package/dist/drive/trash/index.d.ts +75 -55
  28. package/dist/drive/trash/index.js +180 -149
  29. package/dist/drive/trash/types.d.ts +29 -20
  30. package/dist/drive/trash/types.js +2 -2
  31. package/dist/drive/users/index.d.ts +135 -108
  32. package/dist/drive/users/index.js +204 -174
  33. package/dist/drive/users/types.d.ts +51 -43
  34. package/dist/drive/users/types.js +2 -2
  35. package/dist/index.d.ts +6 -5
  36. package/dist/index.js +31 -30
  37. package/dist/network/download.d.ts +8 -8
  38. package/dist/network/download.js +123 -123
  39. package/dist/network/errors/codes.d.ts +24 -24
  40. package/dist/network/errors/codes.js +48 -48
  41. package/dist/network/errors/context.d.ts +35 -35
  42. package/dist/network/errors/context.js +39 -39
  43. package/dist/network/errors/download.d.ts +4 -4
  44. package/dist/network/errors/download.js +48 -48
  45. package/dist/network/errors/index.d.ts +3 -3
  46. package/dist/network/errors/index.js +15 -15
  47. package/dist/network/errors/upload.d.ts +13 -13
  48. package/dist/network/errors/upload.js +78 -78
  49. package/dist/network/index.d.ts +70 -71
  50. package/dist/network/index.js +311 -310
  51. package/dist/network/types.d.ts +102 -102
  52. package/dist/network/types.js +18 -18
  53. package/dist/network/upload.d.ts +4 -4
  54. package/dist/network/upload.js +159 -159
  55. package/dist/photos/devices/index.d.ts +10 -10
  56. package/dist/photos/devices/index.js +79 -79
  57. package/dist/photos/index.d.ts +17 -17
  58. package/dist/photos/index.js +52 -52
  59. package/dist/photos/photos/index.d.ts +60 -60
  60. package/dist/photos/photos/index.js +225 -225
  61. package/dist/photos/shares/index.d.ts +8 -8
  62. package/dist/photos/shares/index.js +34 -34
  63. package/dist/photos/types.d.ts +154 -154
  64. package/dist/photos/types.js +19 -19
  65. package/dist/photos/users/index.d.ts +7 -7
  66. package/dist/photos/users/index.js +46 -46
  67. package/dist/shared/headers/index.d.ts +21 -18
  68. package/dist/shared/headers/index.js +79 -69
  69. package/dist/shared/http/client.d.ts +85 -85
  70. package/dist/shared/http/client.js +172 -181
  71. package/dist/shared/http/types.d.ts +7 -7
  72. package/dist/shared/http/types.js +2 -2
  73. package/dist/shared/index.d.ts +1 -1
  74. package/dist/shared/index.js +13 -13
  75. package/dist/shared/types/apiConnection.d.ts +12 -11
  76. package/dist/shared/types/apiConnection.js +2 -2
  77. package/dist/shared/types/appsumo.d.ts +16 -16
  78. package/dist/shared/types/appsumo.js +12 -12
  79. package/dist/shared/types/errors.d.ts +5 -4
  80. package/dist/shared/types/errors.js +28 -27
  81. package/dist/shared/types/teams.d.ts +9 -9
  82. package/dist/shared/types/teams.js +2 -2
  83. package/dist/shared/types/userSettings.d.ts +29 -27
  84. package/dist/shared/types/userSettings.js +2 -2
  85. package/dist/utils.d.ts +3 -3
  86. package/dist/utils.js +25 -25
  87. package/dist/workspaces/index.d.ts +176 -0
  88. package/dist/workspaces/index.js +415 -0
  89. package/dist/workspaces/index.test.d.ts +1 -0
  90. package/dist/workspaces/index.test.js +903 -0
  91. package/dist/workspaces/types.d.ts +291 -0
  92. package/dist/workspaces/types.js +2 -0
  93. 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;
@@ -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';
@@ -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
+ }