@agility/management-sdk 0.1.8 → 0.1.9
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.
|
@@ -11,4 +11,5 @@ export declare class AssetMethods {
|
|
|
11
11
|
getAssetByID(mediaID: number, guid: string): Promise<Media>;
|
|
12
12
|
getAssetByUrl(url: string, guid: string): Promise<Media>;
|
|
13
13
|
upload(formData: FormData, agilityFolderPath: string, guid: string, groupingID?: number): Promise<Media[]>;
|
|
14
|
+
createFolder(originKey: string, guid: string): Promise<Media>;
|
|
14
15
|
}
|
|
@@ -167,6 +167,26 @@ var AssetMethods = /** @class */ (function () {
|
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
|
+
AssetMethods.prototype.createFolder = function (originKey, guid) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
172
|
+
var apiPath, resp, err_7;
|
|
173
|
+
return __generator(this, function (_a) {
|
|
174
|
+
switch (_a.label) {
|
|
175
|
+
case 0:
|
|
176
|
+
_a.trys.push([0, 2, , 3]);
|
|
177
|
+
apiPath = "asset/folder?originKey=".concat(originKey);
|
|
178
|
+
return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
|
|
179
|
+
case 1:
|
|
180
|
+
resp = _a.sent();
|
|
181
|
+
return [2 /*return*/, resp.data];
|
|
182
|
+
case 2:
|
|
183
|
+
err_7 = _a.sent();
|
|
184
|
+
throw new exception_1.Exception('Unable to create folder.', err_7);
|
|
185
|
+
case 3: return [2 /*return*/];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
170
190
|
return AssetMethods;
|
|
171
191
|
}());
|
|
172
192
|
exports.AssetMethods = AssetMethods;
|