@autonomys/auto-drive 1.1.3 → 1.1.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/.env +6 -0
- package/LICENSE +18 -0
- package/dist/api/calls/download.d.ts +6 -0
- package/dist/api/calls/download.d.ts.map +1 -0
- package/dist/api/calls/download.js +25 -0
- package/dist/api/calls/index.d.ts +57 -0
- package/dist/api/calls/index.d.ts.map +1 -0
- package/dist/api/calls/index.js +41 -0
- package/dist/api/calls/read.d.ts +99 -0
- package/dist/api/calls/read.d.ts.map +1 -0
- package/dist/api/calls/read.js +159 -0
- package/dist/api/calls/upload.d.ts +93 -0
- package/dist/api/calls/upload.d.ts.map +1 -0
- package/dist/api/calls/upload.js +137 -0
- package/dist/api/calls/write.d.ts +49 -0
- package/dist/api/calls/write.d.ts.map +1 -0
- package/dist/api/calls/write.js +80 -0
- package/dist/api/connection.d.ts +15 -0
- package/dist/api/connection.d.ts.map +1 -0
- package/dist/api/connection.js +28 -0
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +20 -0
- package/dist/api/models/common.d.ts +5 -0
- package/dist/api/models/common.d.ts.map +1 -0
- package/dist/api/models/common.js +2 -0
- package/dist/api/models/file.d.ts +10 -0
- package/dist/api/models/file.d.ts.map +1 -0
- package/dist/api/models/file.js +2 -0
- package/dist/api/models/folderTree.d.ts +47 -0
- package/dist/api/models/folderTree.d.ts.map +1 -0
- package/dist/api/models/folderTree.js +105 -0
- package/dist/api/models/index.d.ts +3 -0
- package/dist/api/models/index.d.ts.map +1 -0
- package/dist/api/models/index.js +18 -0
- package/dist/api/models/objects.d.ts +72 -0
- package/dist/api/models/objects.d.ts.map +1 -0
- package/dist/api/models/objects.js +13 -0
- package/dist/api/models/uploads.d.ts +148 -0
- package/dist/api/models/uploads.d.ts.map +1 -0
- package/dist/api/models/uploads.js +51 -0
- package/dist/api/wrappers.d.ts +84 -0
- package/dist/api/wrappers.d.ts.map +1 -0
- package/dist/api/wrappers.js +319 -0
- package/dist/browser.d.ts +3 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +18 -0
- package/dist/fs/index.d.ts +3 -0
- package/dist/fs/index.d.ts.map +1 -0
- package/dist/fs/index.js +18 -0
- package/dist/fs/utils.d.ts +6 -0
- package/dist/fs/utils.d.ts.map +1 -0
- package/dist/fs/utils.js +84 -0
- package/dist/fs/wrappers.d.ts +45 -0
- package/dist/fs/wrappers.d.ts.map +1 -0
- package/dist/fs/wrappers.js +156 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +18 -0
- package/dist/utils/async.d.ts +5 -0
- package/dist/utils/async.d.ts.map +1 -0
- package/dist/utils/async.js +73 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +20 -0
- package/dist/utils/misc.d.ts +2 -0
- package/dist/utils/misc.d.ts.map +1 -0
- package/dist/utils/misc.js +5 -0
- package/dist/utils/observable.d.ts +7 -0
- package/dist/utils/observable.d.ts.map +1 -0
- package/dist/utils/observable.js +52 -0
- package/dist/utils/types.d.ts +6 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.completeUpload = exports.uploadFileChunk = exports.createFileUploadWithinFolderUpload = exports.createFolderUpload = exports.createFileUpload = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Initiates a file upload to the server.
|
|
15
|
+
*
|
|
16
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
17
|
+
* @param {ArgsWithoutPagination<{ mimeType?: string; filename: string; uploadOptions: FileUploadOptions | null }>} args - The arguments for the file upload.
|
|
18
|
+
* @param {string} args.mimeType - The MIME type of the file (optional).
|
|
19
|
+
* @param {string} args.filename - The name of the file to be uploaded.
|
|
20
|
+
* @param {FileUploadOptions | null} args.uploadOptions - Additional options for the file upload (optional).
|
|
21
|
+
* @returns {Promise<FileUpload>} - A promise that resolves to the file upload information.
|
|
22
|
+
* @throws {Error} - Throws an error if the upload fails.
|
|
23
|
+
*/
|
|
24
|
+
const createFileUpload = (api_1, _a) => __awaiter(void 0, [api_1, _a], void 0, function* (api, { mimeType, filename, uploadOptions = {}, }) {
|
|
25
|
+
const response = yield api.sendRequest(`/uploads/file`, {
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: new Headers({
|
|
28
|
+
'Content-Type': 'application/json',
|
|
29
|
+
}),
|
|
30
|
+
}, JSON.stringify({ mimeType, filename, uploadOptions }));
|
|
31
|
+
if (!response.ok) {
|
|
32
|
+
throw new Error(`Failed to create file upload: ${response.statusText}`);
|
|
33
|
+
}
|
|
34
|
+
return response.json();
|
|
35
|
+
});
|
|
36
|
+
exports.createFileUpload = createFileUpload;
|
|
37
|
+
/**
|
|
38
|
+
* Initiates a folder upload to the server.
|
|
39
|
+
*
|
|
40
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
41
|
+
* @param {ArgsWithoutPagination<{ fileTree: FolderTree; uploadOptions: FileUploadOptions }>} args - The arguments for the folder upload.
|
|
42
|
+
* @param {FolderTree} args.fileTree - The structure of the folder and its contents to be uploaded.
|
|
43
|
+
* @param {FileUploadOptions} args.uploadOptions - Additional options for the folder upload.
|
|
44
|
+
* @returns {Promise<FolderUpload>} - A promise that resolves to the folder upload information.
|
|
45
|
+
* @throws {Error} - Throws an error if the upload fails.
|
|
46
|
+
*/
|
|
47
|
+
const createFolderUpload = (api_1, _a) => __awaiter(void 0, [api_1, _a], void 0, function* (api, { fileTree, uploadOptions = {}, }) {
|
|
48
|
+
const response = yield api.sendRequest(`/uploads/folder`, {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: new Headers({
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
}),
|
|
53
|
+
}, JSON.stringify({ fileTree, uploadOptions }));
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
throw new Error(`Failed to create folder upload: ${response.statusText}`);
|
|
56
|
+
}
|
|
57
|
+
return response.json();
|
|
58
|
+
});
|
|
59
|
+
exports.createFolderUpload = createFolderUpload;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a file upload within an existing folder upload.
|
|
62
|
+
*
|
|
63
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
64
|
+
* @param {ArgsWithoutPagination<{ uploadId: string; name: string; mimeType: string; relativeId: string; uploadOptions: FileUploadOptions }>} args - The arguments for the file upload.
|
|
65
|
+
* @param {string} args.uploadId - The ID of the folder upload to which the file will be added.
|
|
66
|
+
* @param {string} args.name - The name of the file to be uploaded.
|
|
67
|
+
* @param {string} args.mimeType - The MIME type of the file being uploaded.
|
|
68
|
+
* @param {string} args.relativeId - The relative ID of the file within the folder structure.
|
|
69
|
+
* @param {FileUploadOptions} [args.uploadOptions={}] - Additional options for the file upload.
|
|
70
|
+
* @returns {Promise<FileUpload>} - A promise that resolves to the file upload information.
|
|
71
|
+
* @throws {Error} - Throws an error if the upload fails.
|
|
72
|
+
*/
|
|
73
|
+
const createFileUploadWithinFolderUpload = (api_1, _a) => __awaiter(void 0, [api_1, _a], void 0, function* (api, { uploadId, name, mimeType, relativeId, uploadOptions = {}, }) {
|
|
74
|
+
const response = yield api.sendRequest(`/uploads/folder/${uploadId}/file`, {
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: new Headers({
|
|
77
|
+
'Content-Type': 'application/json',
|
|
78
|
+
}),
|
|
79
|
+
}, JSON.stringify({ name, mimeType, relativeId, uploadOptions }));
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
throw new Error(`Failed to create file upload within folder upload: ${response.statusText}`);
|
|
82
|
+
}
|
|
83
|
+
return response.json();
|
|
84
|
+
});
|
|
85
|
+
exports.createFileUploadWithinFolderUpload = createFileUploadWithinFolderUpload;
|
|
86
|
+
/**
|
|
87
|
+
* Uploads a chunk of a file to the server.
|
|
88
|
+
*
|
|
89
|
+
* This function allows for the uploading of a specific chunk of a file
|
|
90
|
+
* during a multi-part upload process. It sends the chunk along with its
|
|
91
|
+
* index to the server, which can be used to reconstruct the file on the
|
|
92
|
+
* server side.
|
|
93
|
+
*
|
|
94
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
95
|
+
* @param {ArgsWithoutPagination<{ uploadId: string; chunk: Buffer; index: number }>} args - The arguments for the file chunk upload.
|
|
96
|
+
* @param {string} args.uploadId - The ID of the upload session.
|
|
97
|
+
* @param {Buffer} args.chunk - The chunk of the file to be uploaded.
|
|
98
|
+
* @param {number} args.index - The index of the chunk in the overall file.
|
|
99
|
+
* @returns {Promise<void>} - A promise that resolves when the chunk is uploaded successfully.
|
|
100
|
+
* @throws {Error} - Throws an error if the upload fails.
|
|
101
|
+
*/
|
|
102
|
+
const uploadFileChunk = (api_1, _a) => __awaiter(void 0, [api_1, _a], void 0, function* (api, { uploadId, chunk, index, }) {
|
|
103
|
+
const formData = new FormData();
|
|
104
|
+
formData.append('file', new Blob([chunk]));
|
|
105
|
+
formData.append('index', index.toString());
|
|
106
|
+
const response = yield api.sendRequest(`/uploads/file/${uploadId}/chunk`, {
|
|
107
|
+
method: 'POST',
|
|
108
|
+
}, formData);
|
|
109
|
+
if (!response.ok) {
|
|
110
|
+
throw new Error(`Failed to upload file chunk: ${response.statusText}`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
exports.uploadFileChunk = uploadFileChunk;
|
|
114
|
+
/**
|
|
115
|
+
* Completes a file or folder upload session on the server.
|
|
116
|
+
*
|
|
117
|
+
* This function sends a request to the server to finalize the upload
|
|
118
|
+
* process for a given upload session identified by the upload ID. It is
|
|
119
|
+
* typically called after all file chunks have been uploaded. This method
|
|
120
|
+
* can be used to complete both file and folder uploads.
|
|
121
|
+
*
|
|
122
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
123
|
+
* @param {ArgsWithoutPagination<{ uploadId: string }>} args - The arguments for completing the upload.
|
|
124
|
+
* @param {string} args.uploadId - The ID of the upload session to complete.
|
|
125
|
+
* @returns {Promise<any>} - A promise that resolves to the response from the server.
|
|
126
|
+
* @throws {Error} - Throws an error if the completion of the upload fails.
|
|
127
|
+
*/
|
|
128
|
+
const completeUpload = (api_1, _a) => __awaiter(void 0, [api_1, _a], void 0, function* (api, { uploadId }) {
|
|
129
|
+
const response = yield api.sendRequest(`/uploads/${uploadId}/complete`, {
|
|
130
|
+
method: 'POST',
|
|
131
|
+
});
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
throw new Error(`Failed to complete upload: ${response.statusText}`);
|
|
134
|
+
}
|
|
135
|
+
return response.json();
|
|
136
|
+
});
|
|
137
|
+
exports.completeUpload = completeUpload;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ArgsWithoutPagination } from '../../utils/types';
|
|
2
|
+
import { AutoDriveApi } from '../connection';
|
|
3
|
+
/**
|
|
4
|
+
* Shares an object with a specified public ID.
|
|
5
|
+
*
|
|
6
|
+
* This function sends a request to the server to share an object identified
|
|
7
|
+
* by its CID. The object will be shared with the provided public ID, allowing
|
|
8
|
+
* access to the object for users with that ID.
|
|
9
|
+
*
|
|
10
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
11
|
+
* @param {ArgsWithoutPagination<{ cid: string; publicId: string }>} query - The query parameters containing the CID of the object to share and the public ID to share it with.
|
|
12
|
+
* @returns {Promise<any>} - A promise that resolves to the response from the server.
|
|
13
|
+
* @throws {Error} - Throws an error if the sharing process fails.
|
|
14
|
+
*/
|
|
15
|
+
export declare const shareObject: (api: AutoDriveApi, query: ArgsWithoutPagination<{
|
|
16
|
+
cid: string;
|
|
17
|
+
publicId: string;
|
|
18
|
+
}>) => Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Marks an object as deleted by sending a request to the server.
|
|
21
|
+
*
|
|
22
|
+
* This function sends a request to the server to mark an object identified
|
|
23
|
+
* by its CID as deleted. This action is typically irreversible and should
|
|
24
|
+
* be used with caution.
|
|
25
|
+
*
|
|
26
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
27
|
+
* @param {ArgsWithoutPagination<{ cid: string }>} query - The query parameters containing the CID of the object to mark as deleted.
|
|
28
|
+
* @returns {Promise<void>} - A promise that resolves when the object has been marked as deleted.
|
|
29
|
+
* @throws {Error} - Throws an error if the marking process fails.
|
|
30
|
+
*/
|
|
31
|
+
export declare const markObjectAsDeleted: (api: AutoDriveApi, query: ArgsWithoutPagination<{
|
|
32
|
+
cid: string;
|
|
33
|
+
}>) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Restores an object that has been marked as deleted by sending a request to the server.
|
|
36
|
+
*
|
|
37
|
+
* This function sends a request to the server to restore an object identified
|
|
38
|
+
* by its CID. The restoration process may depend on the server's implementation
|
|
39
|
+
* and the object's current state.
|
|
40
|
+
*
|
|
41
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
42
|
+
* @param {ArgsWithoutPagination<{ cid: string }>} query - The query parameters containing the CID of the object to restore.
|
|
43
|
+
* @returns {Promise<void>} - A promise that resolves when the object has been successfully restored.
|
|
44
|
+
* @throws {Error} - Throws an error if the restoration process fails.
|
|
45
|
+
*/
|
|
46
|
+
export declare const restoreObject: (api: AutoDriveApi, query: ArgsWithoutPagination<{
|
|
47
|
+
cid: string;
|
|
48
|
+
}>) => Promise<void>;
|
|
49
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/api/calls/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,QACjB,YAAY,SACV,qBAAqB,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,iBAkBhE,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QACzB,YAAY,SACV,qBAAqB,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,KAC5C,OAAO,CAAC,IAAI,CAQd,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,QACnB,YAAY,SACV,qBAAqB,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,KAC5C,OAAO,CAAC,IAAI,CAUd,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.restoreObject = exports.markObjectAsDeleted = exports.shareObject = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Shares an object with a specified public ID.
|
|
15
|
+
*
|
|
16
|
+
* This function sends a request to the server to share an object identified
|
|
17
|
+
* by its CID. The object will be shared with the provided public ID, allowing
|
|
18
|
+
* access to the object for users with that ID.
|
|
19
|
+
*
|
|
20
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
21
|
+
* @param {ArgsWithoutPagination<{ cid: string; publicId: string }>} query - The query parameters containing the CID of the object to share and the public ID to share it with.
|
|
22
|
+
* @returns {Promise<any>} - A promise that resolves to the response from the server.
|
|
23
|
+
* @throws {Error} - Throws an error if the sharing process fails.
|
|
24
|
+
*/
|
|
25
|
+
const shareObject = (api, query) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
const response = yield api.sendRequest(`/objects/${query.cid}/share`, {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
headers: new Headers({
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
}),
|
|
31
|
+
}, JSON.stringify({ publicId: query.publicId }));
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
throw new Error(`Failed to share object: ${response.statusText}`);
|
|
34
|
+
}
|
|
35
|
+
return response.json();
|
|
36
|
+
});
|
|
37
|
+
exports.shareObject = shareObject;
|
|
38
|
+
/**
|
|
39
|
+
* Marks an object as deleted by sending a request to the server.
|
|
40
|
+
*
|
|
41
|
+
* This function sends a request to the server to mark an object identified
|
|
42
|
+
* by its CID as deleted. This action is typically irreversible and should
|
|
43
|
+
* be used with caution.
|
|
44
|
+
*
|
|
45
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
46
|
+
* @param {ArgsWithoutPagination<{ cid: string }>} query - The query parameters containing the CID of the object to mark as deleted.
|
|
47
|
+
* @returns {Promise<void>} - A promise that resolves when the object has been marked as deleted.
|
|
48
|
+
* @throws {Error} - Throws an error if the marking process fails.
|
|
49
|
+
*/
|
|
50
|
+
const markObjectAsDeleted = (api, query) => __awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
+
const response = yield api.sendRequest(`/objects/${query.cid}/delete`, {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
});
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
throw new Error(`Failed to mark object as deleted: ${response.statusText}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
exports.markObjectAsDeleted = markObjectAsDeleted;
|
|
59
|
+
/**
|
|
60
|
+
* Restores an object that has been marked as deleted by sending a request to the server.
|
|
61
|
+
*
|
|
62
|
+
* This function sends a request to the server to restore an object identified
|
|
63
|
+
* by its CID. The restoration process may depend on the server's implementation
|
|
64
|
+
* and the object's current state.
|
|
65
|
+
*
|
|
66
|
+
* @param {AutoDriveApi} api - The API instance used to send requests.
|
|
67
|
+
* @param {ArgsWithoutPagination<{ cid: string }>} query - The query parameters containing the CID of the object to restore.
|
|
68
|
+
* @returns {Promise<void>} - A promise that resolves when the object has been successfully restored.
|
|
69
|
+
* @throws {Error} - Throws an error if the restoration process fails.
|
|
70
|
+
*/
|
|
71
|
+
const restoreObject = (api, query) => __awaiter(void 0, void 0, void 0, function* () {
|
|
72
|
+
const response = yield api.sendRequest(`/objects/${query.cid}/restore`, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
});
|
|
75
|
+
if (!response.ok) {
|
|
76
|
+
throw new Error(`Failed to restore object: ${response.statusText}`);
|
|
77
|
+
}
|
|
78
|
+
return response.json();
|
|
79
|
+
});
|
|
80
|
+
exports.restoreObject = restoreObject;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface AutoDriveApi {
|
|
2
|
+
sendRequest: (relativeUrl: string, request: Partial<Request>, body?: BodyInit) => Promise<Response>;
|
|
3
|
+
}
|
|
4
|
+
export declare enum OAuthProvider {
|
|
5
|
+
GOOGLE = "google",
|
|
6
|
+
DISCORD = "discord"
|
|
7
|
+
}
|
|
8
|
+
export type ApiKeyAuthProvider = 'apikey';
|
|
9
|
+
export type AuthProvider = ApiKeyAuthProvider | 'oauth';
|
|
10
|
+
export declare const createAutoDriveApi: ({ provider, apiKey, url, }: {
|
|
11
|
+
provider?: AuthProvider;
|
|
12
|
+
apiKey: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
}) => AutoDriveApi;
|
|
15
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/api/connection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,CACX,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EACzB,IAAI,CAAC,EAAE,QAAQ,KACZ,OAAO,CAAC,QAAQ,CAAC,CAAA;CACvB;AAED,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAA;AACzC,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,OAAO,CAAA;AAEvD,eAAO,MAAM,kBAAkB,+BAI5B;IACD,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,KAAG,YAiBH,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createAutoDriveApi = exports.OAuthProvider = void 0;
|
|
13
|
+
var OAuthProvider;
|
|
14
|
+
(function (OAuthProvider) {
|
|
15
|
+
OAuthProvider["GOOGLE"] = "google";
|
|
16
|
+
OAuthProvider["DISCORD"] = "discord";
|
|
17
|
+
})(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
|
|
18
|
+
const createAutoDriveApi = ({ provider = 'apikey', apiKey, url = 'https://demo.auto-drive.autonomys.xyz/api', }) => {
|
|
19
|
+
return {
|
|
20
|
+
sendRequest: (relativeUrl, request, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
var _a;
|
|
22
|
+
const headers = new Headers(Object.assign(Object.assign({}, Object.fromEntries(((_a = request.headers) === null || _a === void 0 ? void 0 : _a.entries()) || [])), { 'x-auth-provider': provider, Authorization: `Bearer ${apiKey}` }));
|
|
23
|
+
const fullRequest = Object.assign(Object.assign({}, request), { headers: new Headers(headers), body });
|
|
24
|
+
return fetch(`${url}${relativeUrl}`, fullRequest);
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
exports.createAutoDriveApi = createAutoDriveApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./calls/index"), exports);
|
|
18
|
+
__exportStar(require("./connection"), exports);
|
|
19
|
+
__exportStar(require("./models/index"), exports);
|
|
20
|
+
__exportStar(require("./wrappers"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/api/models/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAA;IACT,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/api/models/file.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,IAAI,aAAa,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type FolderTreeFolder = {
|
|
3
|
+
name: string;
|
|
4
|
+
type: 'folder';
|
|
5
|
+
children: FolderTree[];
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
export type FolderTreeFile = {
|
|
9
|
+
name: string;
|
|
10
|
+
type: 'file';
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
export type FolderTree = FolderTreeFolder | FolderTreeFile;
|
|
14
|
+
export declare const FolderTreeFolderSchema: z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
type: z.ZodLiteral<"folder">;
|
|
17
|
+
children: z.ZodArray<z.ZodLazy<z.ZodType<FolderTree, z.ZodTypeDef, FolderTree>>, "many">;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
name: string;
|
|
21
|
+
type: "folder";
|
|
22
|
+
children: FolderTree[];
|
|
23
|
+
id: string;
|
|
24
|
+
}, {
|
|
25
|
+
name: string;
|
|
26
|
+
type: "folder";
|
|
27
|
+
children: FolderTree[];
|
|
28
|
+
id: string;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const FolderTreeFileSchema: z.ZodObject<{
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
type: z.ZodLiteral<"file">;
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
name: string;
|
|
36
|
+
type: "file";
|
|
37
|
+
id: string;
|
|
38
|
+
}, {
|
|
39
|
+
name: string;
|
|
40
|
+
type: "file";
|
|
41
|
+
id: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const FolderTreeSchema: z.ZodType<FolderTree>;
|
|
44
|
+
export declare const constructFromFileSystemEntries: (entries: string[]) => FolderTree;
|
|
45
|
+
export declare const constructFromInput: (input: File[]) => FolderTree;
|
|
46
|
+
export declare const constructZipBlobFromTreeAndPaths: (tree: FolderTree, files: Record<string, File>) => Promise<Blob>;
|
|
47
|
+
//# sourceMappingURL=folderTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folderTree.d.ts","sourceRoot":"","sources":["../../../src/api/models/folderTree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,UAAU,EAAE,CAAA;IACtB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,cAAc,CAAA;AAE1D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAA;AAEF,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAGjD,CAAA;AAEF,eAAO,MAAM,8BAA8B,YAAa,MAAM,EAAE,KAAG,UA0ClE,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,IAAI,EAAE,KAAG,UASlD,CAAA;AAoBD,eAAO,MAAM,gCAAgC,SACrC,UAAU,SACT,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,kBAU5B,CAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.constructZipBlobFromTreeAndPaths = exports.constructFromInput = exports.constructFromFileSystemEntries = exports.FolderTreeSchema = exports.FolderTreeFileSchema = exports.FolderTreeFolderSchema = void 0;
|
|
16
|
+
const jszip_1 = __importDefault(require("jszip"));
|
|
17
|
+
const zod_1 = require("zod");
|
|
18
|
+
exports.FolderTreeFolderSchema = zod_1.z.object({
|
|
19
|
+
name: zod_1.z.string(),
|
|
20
|
+
type: zod_1.z.literal('folder'),
|
|
21
|
+
children: zod_1.z.array(zod_1.z.lazy(() => exports.FolderTreeSchema)),
|
|
22
|
+
id: zod_1.z.string(),
|
|
23
|
+
});
|
|
24
|
+
exports.FolderTreeFileSchema = zod_1.z.object({
|
|
25
|
+
name: zod_1.z.string(),
|
|
26
|
+
type: zod_1.z.literal('file'),
|
|
27
|
+
id: zod_1.z.string(),
|
|
28
|
+
});
|
|
29
|
+
exports.FolderTreeSchema = zod_1.z.discriminatedUnion('type', [
|
|
30
|
+
exports.FolderTreeFolderSchema,
|
|
31
|
+
exports.FolderTreeFileSchema,
|
|
32
|
+
]);
|
|
33
|
+
const constructFromFileSystemEntries = (entries) => {
|
|
34
|
+
const root = {
|
|
35
|
+
name: 'root',
|
|
36
|
+
type: 'folder',
|
|
37
|
+
children: [],
|
|
38
|
+
id: 'root',
|
|
39
|
+
};
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
const pathParts = entry.split('/').filter(Boolean);
|
|
42
|
+
let currentFolder = root;
|
|
43
|
+
for (const [index, part] of Array.from(pathParts.entries())) {
|
|
44
|
+
// Check if the part already exists in the current folder's children
|
|
45
|
+
let existingFolder = currentFolder.children.find((child) => child.name === part);
|
|
46
|
+
if (!existingFolder) {
|
|
47
|
+
// If it's the last part, create a file node
|
|
48
|
+
if (index === pathParts.length - 1) {
|
|
49
|
+
const fileNode = {
|
|
50
|
+
name: part,
|
|
51
|
+
type: 'file',
|
|
52
|
+
id: entry,
|
|
53
|
+
};
|
|
54
|
+
currentFolder.children.push(fileNode);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
// Create a new folder node
|
|
58
|
+
const folderNode = {
|
|
59
|
+
name: part,
|
|
60
|
+
type: 'folder',
|
|
61
|
+
children: [],
|
|
62
|
+
id: `${currentFolder.id.split('/').slice(1).join('/')}/${part}`,
|
|
63
|
+
};
|
|
64
|
+
currentFolder.children.push(folderNode);
|
|
65
|
+
existingFolder = folderNode;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
currentFolder = existingFolder; // Move to the next folder
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return root.children.length === 1 ? root.children[0] : root;
|
|
72
|
+
};
|
|
73
|
+
exports.constructFromFileSystemEntries = constructFromFileSystemEntries;
|
|
74
|
+
const constructFromInput = (input) => {
|
|
75
|
+
return (0, exports.constructFromFileSystemEntries)(Array.from(input).map((file) => {
|
|
76
|
+
if (!file.webkitRelativePath) {
|
|
77
|
+
throw new Error('webkitRelativePath is not supported');
|
|
78
|
+
}
|
|
79
|
+
return file.webkitRelativePath;
|
|
80
|
+
}));
|
|
81
|
+
};
|
|
82
|
+
exports.constructFromInput = constructFromInput;
|
|
83
|
+
const addFilesToZip = (folder, folderNode, files) => {
|
|
84
|
+
folderNode.children.forEach((child) => {
|
|
85
|
+
if (child.type === 'file') {
|
|
86
|
+
folder.file(child.name, files[child.id]);
|
|
87
|
+
}
|
|
88
|
+
else if (child.type === 'folder') {
|
|
89
|
+
const subFolder = folder.folder(child.name);
|
|
90
|
+
if (!subFolder) {
|
|
91
|
+
throw new Error('Failed to create folder in zip');
|
|
92
|
+
}
|
|
93
|
+
addFilesToZip(subFolder, child, files);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const constructZipBlobFromTreeAndPaths = (tree, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
98
|
+
if (tree.type === 'file') {
|
|
99
|
+
throw new Error('Cannot construct zip from file');
|
|
100
|
+
}
|
|
101
|
+
const zip = new jszip_1.default();
|
|
102
|
+
addFilesToZip(zip, tree, files);
|
|
103
|
+
return zip.generateAsync({ type: 'blob' });
|
|
104
|
+
});
|
|
105
|
+
exports.constructZipBlobFromTreeAndPaths = constructZipBlobFromTreeAndPaths;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./objects"), exports);
|
|
18
|
+
__exportStar(require("./uploads"), exports);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { FileUploadOptions } from './uploads';
|
|
2
|
+
export type OffchainMetadata = OffchainFileMetadata | OffchainFolderMetadata;
|
|
3
|
+
interface ChildrenMetadata {
|
|
4
|
+
type: 'folder' | 'file';
|
|
5
|
+
name?: string;
|
|
6
|
+
cid: string;
|
|
7
|
+
totalSize: bigint;
|
|
8
|
+
}
|
|
9
|
+
export type OffchainFolderMetadata = {
|
|
10
|
+
type: 'folder';
|
|
11
|
+
dataCid: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
totalSize: bigint;
|
|
14
|
+
totalFiles: number;
|
|
15
|
+
children: ChildrenMetadata[];
|
|
16
|
+
uploadOptions: FileUploadOptions;
|
|
17
|
+
};
|
|
18
|
+
export type OffchainFileMetadata = {
|
|
19
|
+
type: 'file';
|
|
20
|
+
dataCid: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
mimeType?: string;
|
|
23
|
+
totalSize: bigint;
|
|
24
|
+
totalChunks: number;
|
|
25
|
+
chunks: ChunkInfo[];
|
|
26
|
+
uploadOptions?: FileUploadOptions;
|
|
27
|
+
};
|
|
28
|
+
export interface ChunkInfo {
|
|
29
|
+
size: bigint;
|
|
30
|
+
cid: string;
|
|
31
|
+
}
|
|
32
|
+
export declare enum Scope {
|
|
33
|
+
Global = "global",
|
|
34
|
+
User = "user"
|
|
35
|
+
}
|
|
36
|
+
export interface Owner {
|
|
37
|
+
publicId: string;
|
|
38
|
+
role: OwnerRole;
|
|
39
|
+
}
|
|
40
|
+
export declare enum OwnerRole {
|
|
41
|
+
ADMIN = "admin",
|
|
42
|
+
VIEWER = "viewer"
|
|
43
|
+
}
|
|
44
|
+
export interface ObjectUploadStatus {
|
|
45
|
+
uploadedNodes: number | null;
|
|
46
|
+
totalNodes: number | null;
|
|
47
|
+
minimumBlockDepth: number | null;
|
|
48
|
+
maximumBlockDepth: number | null;
|
|
49
|
+
}
|
|
50
|
+
export type ObjectSummary = {
|
|
51
|
+
headCid: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
size: number;
|
|
54
|
+
owners: Owner[];
|
|
55
|
+
uploadStatus: ObjectUploadStatus;
|
|
56
|
+
} & ({
|
|
57
|
+
type: 'file';
|
|
58
|
+
mimeType?: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: 'folder';
|
|
61
|
+
children: (OffchainMetadata & {
|
|
62
|
+
type: 'folder';
|
|
63
|
+
})['children'];
|
|
64
|
+
});
|
|
65
|
+
export interface ObjectInformation {
|
|
66
|
+
cid: string;
|
|
67
|
+
metadata: OffchainMetadata;
|
|
68
|
+
uploadStatus: ObjectUploadStatus;
|
|
69
|
+
owners: Owner[];
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=objects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../../src/api/models/objects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAC5E,UAAU,gBAAgB;IACxB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,aAAa,CAAC,EAAE,iBAAiB,CAAA;CAClC,CAAA;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,oBAAY,KAAK;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,EAAE,kBAAkB,CAAA;CACjC,GAAG,CACA;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GACD;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,CAAC,gBAAgB,GAAG;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC,UAAU,CAAC,CAAA;CAC9D,CACJ,CAAA;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,YAAY,EAAE,kBAAkB,CAAA;IAChC,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB"}
|