@agility/management-sdk 0.1.14 → 0.1.15
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/README.md +522 -522
- package/dist/apiMethods/assetMethods.d.ts +11 -1
- package/dist/apiMethods/assetMethods.js +30 -20
- package/dist/apiMethods/batchMethods.js +3 -3
- package/dist/apiMethods/clientInstance.js +5 -5
- package/dist/apiMethods/containerMethods.js +13 -13
- package/dist/apiMethods/contentMethods.js +19 -19
- package/dist/apiMethods/instanceUserMethods.js +4 -4
- package/dist/apiMethods/modelMethods.js +8 -8
- package/dist/apiMethods/pageMethods.js +24 -24
- package/dist/index.js +1 -5
- package/dist/models/exception.js +0 -2
- package/license.txt +20 -20
- package/package.json +39 -39
- package/tsconfig.json +14 -14
- package/dist/apiMethods/apiClient.d.ts +0 -19
- package/dist/apiMethods/apiClient.js +0 -24
- package/dist/src/apiMethods/assetMethods.d.ts +0 -14
- package/dist/src/apiMethods/assetMethods.js +0 -172
- package/dist/src/apiMethods/batchMethods.d.ts +0 -11
- package/dist/src/apiMethods/batchMethods.js +0 -117
- package/dist/src/apiMethods/clientInstance.d.ts +0 -8
- package/dist/src/apiMethods/clientInstance.js +0 -156
- package/dist/src/apiMethods/containerMethods.d.ts +0 -16
- package/dist/src/apiMethods/containerMethods.js +0 -189
- package/dist/src/apiMethods/contentMethods.d.ts +0 -20
- package/dist/src/apiMethods/contentMethods.js +0 -359
- package/dist/src/apiMethods/instanceUserMethods.d.ts +0 -13
- package/dist/src/apiMethods/instanceUserMethods.js +0 -111
- package/dist/src/apiMethods/modelMethods.d.ts +0 -13
- package/dist/src/apiMethods/modelMethods.js +0 -150
- package/dist/src/apiMethods/pageMethods.d.ts +0 -20
- package/dist/src/apiMethods/pageMethods.js +0 -323
- package/dist/src/enums/batchOperationType.d.ts +0 -19
- package/dist/src/enums/batchOperationType.js +0 -23
- package/dist/src/enums/batchState..d.ts +0 -7
- package/dist/src/enums/batchState..js +0 -11
- package/dist/src/index.d.ts +0 -14
- package/dist/src/index.js +0 -30
- package/dist/src/models/batch.d.ts +0 -29
- package/dist/src/models/batch.js +0 -9
- package/dist/src/models/batchItem.d.ts +0 -13
- package/dist/src/models/batchItem.js +0 -9
- package/dist/src/models/container.d.ts +0 -47
- package/dist/src/models/container.js +0 -9
- package/dist/src/models/contentItem.d.ts +0 -37
- package/dist/src/models/contentItem.js +0 -33
- package/dist/src/models/contentViewColumn.d.ts +0 -8
- package/dist/src/models/contentViewColumn.js +0 -9
- package/dist/src/models/exception.d.ts +0 -4
- package/dist/src/models/exception.js +0 -28
- package/dist/src/models/instanceRole.d.ts +0 -7
- package/dist/src/models/instanceRole.js +0 -9
- package/dist/src/models/instanceUser.d.ts +0 -14
- package/dist/src/models/instanceUser.js +0 -9
- package/dist/src/models/media.d.ts +0 -30
- package/dist/src/models/media.js +0 -15
- package/dist/src/models/model.d.ts +0 -30
- package/dist/src/models/model.js +0 -15
- package/dist/src/models/notification.d.ts +0 -13
- package/dist/src/models/notification.js +0 -9
- package/dist/src/models/options.d.ts +0 -7
- package/dist/src/models/options.js +0 -9
- package/dist/src/models/pageItem.d.ts +0 -56
- package/dist/src/models/pageItem.js +0 -39
- package/dist/src/models/sitemap.d.ts +0 -20
- package/dist/src/models/sitemap.js +0 -15
- package/dist/src/models/websiteUser.d.ts +0 -22
- package/dist/src/models/websiteUser.js +0 -15
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -51,14 +51,14 @@ var ModelMethods = /** @class */ (function () {
|
|
|
51
51
|
switch (_a.label) {
|
|
52
52
|
case 0:
|
|
53
53
|
_a.trys.push([0, 2, , 3]);
|
|
54
|
-
apiPath = "model/"
|
|
54
|
+
apiPath = "model/" + id;
|
|
55
55
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
56
56
|
case 1:
|
|
57
57
|
resp = _a.sent();
|
|
58
58
|
return [2 /*return*/, resp.data];
|
|
59
59
|
case 2:
|
|
60
60
|
err_1 = _a.sent();
|
|
61
|
-
throw new exception_1.Exception("Unable to retreive model for id: "
|
|
61
|
+
throw new exception_1.Exception("Unable to retreive model for id: " + id + ".", err_1);
|
|
62
62
|
case 3: return [2 /*return*/];
|
|
63
63
|
}
|
|
64
64
|
});
|
|
@@ -71,14 +71,14 @@ var ModelMethods = /** @class */ (function () {
|
|
|
71
71
|
switch (_a.label) {
|
|
72
72
|
case 0:
|
|
73
73
|
_a.trys.push([0, 2, , 3]);
|
|
74
|
-
apiPath = "model/"
|
|
74
|
+
apiPath = "model/" + referenceName;
|
|
75
75
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
76
76
|
case 1:
|
|
77
77
|
resp = _a.sent();
|
|
78
78
|
return [2 /*return*/, resp.data];
|
|
79
79
|
case 2:
|
|
80
80
|
err_2 = _a.sent();
|
|
81
|
-
throw new exception_1.Exception("Unable to retreive model for referenceName: "
|
|
81
|
+
throw new exception_1.Exception("Unable to retreive model for referenceName: " + referenceName + ".", err_2);
|
|
82
82
|
case 3: return [2 /*return*/];
|
|
83
83
|
}
|
|
84
84
|
});
|
|
@@ -92,7 +92,7 @@ var ModelMethods = /** @class */ (function () {
|
|
|
92
92
|
switch (_a.label) {
|
|
93
93
|
case 0:
|
|
94
94
|
_a.trys.push([0, 2, , 3]);
|
|
95
|
-
apiPath = "model/list/"
|
|
95
|
+
apiPath = "model/list/" + includeDefaults + "?includeModules=" + includeModules;
|
|
96
96
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
97
97
|
case 1:
|
|
98
98
|
resp = _a.sent();
|
|
@@ -112,7 +112,7 @@ var ModelMethods = /** @class */ (function () {
|
|
|
112
112
|
switch (_a.label) {
|
|
113
113
|
case 0:
|
|
114
114
|
_a.trys.push([0, 2, , 3]);
|
|
115
|
-
apiPath = "model/list-page-modules/"
|
|
115
|
+
apiPath = "model/list-page-modules/" + includeDefault;
|
|
116
116
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
117
117
|
case 1:
|
|
118
118
|
resp = _a.sent();
|
|
@@ -152,7 +152,7 @@ var ModelMethods = /** @class */ (function () {
|
|
|
152
152
|
switch (_a.label) {
|
|
153
153
|
case 0:
|
|
154
154
|
_a.trys.push([0, 2, , 3]);
|
|
155
|
-
apiPath = "model/"
|
|
155
|
+
apiPath = "model/" + id;
|
|
156
156
|
return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
|
|
157
157
|
case 1:
|
|
158
158
|
resp = _a.sent();
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -53,7 +53,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
53
53
|
switch (_a.label) {
|
|
54
54
|
case 0:
|
|
55
55
|
_a.trys.push([0, 2, , 3]);
|
|
56
|
-
apiPath =
|
|
56
|
+
apiPath = locale + "/sitemap";
|
|
57
57
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
58
58
|
case 1:
|
|
59
59
|
resp = _a.sent();
|
|
@@ -76,7 +76,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
76
76
|
_a.trys.push([0, 2, , 3]);
|
|
77
77
|
if (!searchFilter)
|
|
78
78
|
searchFilter = '';
|
|
79
|
-
apiPath =
|
|
79
|
+
apiPath = locale + "/page/templates?includeModuleZones=" + includeModuleZones + "&searchFilter=" + searchFilter;
|
|
80
80
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
81
81
|
case 1:
|
|
82
82
|
resp = _a.sent();
|
|
@@ -96,7 +96,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
96
96
|
switch (_a.label) {
|
|
97
97
|
case 0:
|
|
98
98
|
_a.trys.push([0, 2, , 3]);
|
|
99
|
-
apiPath =
|
|
99
|
+
apiPath = locale + "/page/template/" + pageTemplateId;
|
|
100
100
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
101
101
|
case 1:
|
|
102
102
|
resp = _a.sent();
|
|
@@ -116,7 +116,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
116
116
|
switch (_a.label) {
|
|
117
117
|
case 0:
|
|
118
118
|
_a.trys.push([0, 2, , 3]);
|
|
119
|
-
apiPath =
|
|
119
|
+
apiPath = locale + "/page/template/" + templateName;
|
|
120
120
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
121
121
|
case 1:
|
|
122
122
|
resp = _a.sent();
|
|
@@ -136,7 +136,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
136
136
|
switch (_a.label) {
|
|
137
137
|
case 0:
|
|
138
138
|
_a.trys.push([0, 2, , 3]);
|
|
139
|
-
apiPath =
|
|
139
|
+
apiPath = locale + "/page/template/" + pageTemplateId;
|
|
140
140
|
return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
|
|
141
141
|
case 1:
|
|
142
142
|
resp = _a.sent();
|
|
@@ -156,7 +156,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
156
156
|
switch (_a.label) {
|
|
157
157
|
case 0:
|
|
158
158
|
_a.trys.push([0, 2, , 3]);
|
|
159
|
-
apiPath =
|
|
159
|
+
apiPath = locale + "/page/template/items/" + id;
|
|
160
160
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
161
161
|
case 1:
|
|
162
162
|
resp = _a.sent();
|
|
@@ -176,7 +176,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
176
176
|
switch (_a.label) {
|
|
177
177
|
case 0:
|
|
178
178
|
_a.trys.push([0, 2, , 3]);
|
|
179
|
-
apiPath =
|
|
179
|
+
apiPath = locale + "/page/template";
|
|
180
180
|
return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageModel)];
|
|
181
181
|
case 1:
|
|
182
182
|
resp = _a.sent();
|
|
@@ -196,14 +196,14 @@ var PageMethods = /** @class */ (function () {
|
|
|
196
196
|
switch (_a.label) {
|
|
197
197
|
case 0:
|
|
198
198
|
_a.trys.push([0, 2, , 3]);
|
|
199
|
-
apiPath =
|
|
199
|
+
apiPath = locale + "/page/" + pageID;
|
|
200
200
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
201
201
|
case 1:
|
|
202
202
|
resp = _a.sent();
|
|
203
203
|
return [2 /*return*/, resp.data];
|
|
204
204
|
case 2:
|
|
205
205
|
err_8 = _a.sent();
|
|
206
|
-
throw new exception_1.Exception("Unable to retreive page for id "
|
|
206
|
+
throw new exception_1.Exception("Unable to retreive page for id " + pageID + ".", err_8);
|
|
207
207
|
case 3: return [2 /*return*/];
|
|
208
208
|
}
|
|
209
209
|
});
|
|
@@ -218,7 +218,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
218
218
|
switch (_a.label) {
|
|
219
219
|
case 0:
|
|
220
220
|
_a.trys.push([0, 3, , 4]);
|
|
221
|
-
apiPath =
|
|
221
|
+
apiPath = locale + "/page/" + pageID + "/publish?comments=" + comments;
|
|
222
222
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
223
223
|
case 1:
|
|
224
224
|
resp = _a.sent();
|
|
@@ -236,7 +236,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
236
236
|
return [2 /*return*/, pageIDs_1];
|
|
237
237
|
case 3:
|
|
238
238
|
err_9 = _a.sent();
|
|
239
|
-
throw new exception_1.Exception("Unable to publish the page for id: "
|
|
239
|
+
throw new exception_1.Exception("Unable to publish the page for id: " + pageID, err_9);
|
|
240
240
|
case 4: return [2 /*return*/];
|
|
241
241
|
}
|
|
242
242
|
});
|
|
@@ -251,7 +251,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
251
251
|
switch (_a.label) {
|
|
252
252
|
case 0:
|
|
253
253
|
_a.trys.push([0, 3, , 4]);
|
|
254
|
-
apiPath =
|
|
254
|
+
apiPath = locale + "/page/" + pageID + "/unpublish?comments=" + comments;
|
|
255
255
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
256
256
|
case 1:
|
|
257
257
|
resp = _a.sent();
|
|
@@ -269,7 +269,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
269
269
|
return [2 /*return*/, pageIDs_2];
|
|
270
270
|
case 3:
|
|
271
271
|
err_10 = _a.sent();
|
|
272
|
-
throw new exception_1.Exception("Unable to un-publish the page for id: "
|
|
272
|
+
throw new exception_1.Exception("Unable to un-publish the page for id: " + pageID, err_10);
|
|
273
273
|
case 4: return [2 /*return*/];
|
|
274
274
|
}
|
|
275
275
|
});
|
|
@@ -284,7 +284,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
284
284
|
switch (_a.label) {
|
|
285
285
|
case 0:
|
|
286
286
|
_a.trys.push([0, 3, , 4]);
|
|
287
|
-
apiPath =
|
|
287
|
+
apiPath = locale + "/page/" + pageID + "/request-approval?comments=" + comments;
|
|
288
288
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
289
289
|
case 1:
|
|
290
290
|
resp = _a.sent();
|
|
@@ -302,7 +302,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
302
302
|
return [2 /*return*/, pageIDs_3];
|
|
303
303
|
case 3:
|
|
304
304
|
err_11 = _a.sent();
|
|
305
|
-
throw new exception_1.Exception("Unable to request approval the page for id: "
|
|
305
|
+
throw new exception_1.Exception("Unable to request approval the page for id: " + pageID, err_11);
|
|
306
306
|
case 4: return [2 /*return*/];
|
|
307
307
|
}
|
|
308
308
|
});
|
|
@@ -317,7 +317,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
317
317
|
switch (_a.label) {
|
|
318
318
|
case 0:
|
|
319
319
|
_a.trys.push([0, 3, , 4]);
|
|
320
|
-
apiPath =
|
|
320
|
+
apiPath = locale + "/page/" + pageID + "/approve?comments=" + comments;
|
|
321
321
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
322
322
|
case 1:
|
|
323
323
|
resp = _a.sent();
|
|
@@ -335,7 +335,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
335
335
|
return [2 /*return*/, pageIDs_4];
|
|
336
336
|
case 3:
|
|
337
337
|
err_12 = _a.sent();
|
|
338
|
-
throw new exception_1.Exception("Unable to approve the page for id: "
|
|
338
|
+
throw new exception_1.Exception("Unable to approve the page for id: " + pageID, err_12);
|
|
339
339
|
case 4: return [2 /*return*/];
|
|
340
340
|
}
|
|
341
341
|
});
|
|
@@ -350,7 +350,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
350
350
|
switch (_a.label) {
|
|
351
351
|
case 0:
|
|
352
352
|
_a.trys.push([0, 3, , 4]);
|
|
353
|
-
apiPath =
|
|
353
|
+
apiPath = locale + "/page/" + pageID + "/decline?comments=" + comments;
|
|
354
354
|
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
355
355
|
case 1:
|
|
356
356
|
resp = _a.sent();
|
|
@@ -368,7 +368,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
368
368
|
return [2 /*return*/, pageIDs_5];
|
|
369
369
|
case 3:
|
|
370
370
|
err_13 = _a.sent();
|
|
371
|
-
throw new exception_1.Exception("Unable to decline the page for id: "
|
|
371
|
+
throw new exception_1.Exception("Unable to decline the page for id: " + pageID, err_13);
|
|
372
372
|
case 4: return [2 /*return*/];
|
|
373
373
|
}
|
|
374
374
|
});
|
|
@@ -383,7 +383,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
383
383
|
switch (_a.label) {
|
|
384
384
|
case 0:
|
|
385
385
|
_a.trys.push([0, 3, , 4]);
|
|
386
|
-
apiPath =
|
|
386
|
+
apiPath = locale + "/page/" + pageID + "?comments=" + comments;
|
|
387
387
|
return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
|
|
388
388
|
case 1:
|
|
389
389
|
resp = _a.sent();
|
|
@@ -401,7 +401,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
401
401
|
return [2 /*return*/, pageIDs_6];
|
|
402
402
|
case 3:
|
|
403
403
|
err_14 = _a.sent();
|
|
404
|
-
throw new exception_1.Exception("Unable to delete the page for id: "
|
|
404
|
+
throw new exception_1.Exception("Unable to delete the page for id: " + pageID, err_14);
|
|
405
405
|
case 4: return [2 /*return*/];
|
|
406
406
|
}
|
|
407
407
|
});
|
|
@@ -417,7 +417,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
417
417
|
switch (_a.label) {
|
|
418
418
|
case 0:
|
|
419
419
|
_a.trys.push([0, 3, , 4]);
|
|
420
|
-
apiPath =
|
|
420
|
+
apiPath = locale + "/page?parentPageID=" + parentPageID + "&placeBeforePageItemID=" + placeBeforePageItemID;
|
|
421
421
|
return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageItem)];
|
|
422
422
|
case 1:
|
|
423
423
|
resp = _a.sent();
|
|
@@ -435,7 +435,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
435
435
|
return [2 /*return*/, pageIDs_7];
|
|
436
436
|
case 3:
|
|
437
437
|
err_15 = _a.sent();
|
|
438
|
-
throw new exception_1.Exception("Unable to create page. "
|
|
438
|
+
throw new exception_1.Exception("Unable to create page. " + err_15, err_15);
|
|
439
439
|
case 4: return [2 /*return*/];
|
|
440
440
|
}
|
|
441
441
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
package/dist/models/exception.js
CHANGED
|
@@ -7,8 +7,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
10
|
extendStatics(d, b);
|
|
13
11
|
function __() { this.constructor = d; }
|
|
14
12
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/license.txt
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) [year] [fullname]
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@agility/management-sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Agility CMS Tyescript SDK for Management API.",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/agility/agility-cms-management-sdk-typescript.git"
|
|
8
|
-
},
|
|
9
|
-
"bugs": {
|
|
10
|
-
"url": "https://github.com/agility/agility-cms-management-sdk-typescript/issues"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/agility/agility-cms-management-sdk-typescript#readme",
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"clean": "git clean -Xf && rm -rf ./dist",
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"prepare": "yarn build",
|
|
18
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"typescript",
|
|
22
|
-
"agility",
|
|
23
|
-
"cms",
|
|
24
|
-
"headlesscms",
|
|
25
|
-
"management-api"
|
|
26
|
-
],
|
|
27
|
-
"author": "Agility CMS",
|
|
28
|
-
"contributors": [
|
|
29
|
-
"Joel Varty",
|
|
30
|
-
"Mohit Vashishtha"
|
|
31
|
-
],
|
|
32
|
-
"license": "MIT",
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"axios": "^0.27.2"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@types/node": "^18.11.9"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@agility/management-sdk",
|
|
3
|
+
"version": "0.1.15",
|
|
4
|
+
"description": "Agility CMS Tyescript SDK for Management API.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/agility/agility-cms-management-sdk-typescript.git"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/agility/agility-cms-management-sdk-typescript/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/agility/agility-cms-management-sdk-typescript#readme",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"clean": "git clean -Xf && rm -rf ./dist",
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"prepare": "yarn build",
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"typescript",
|
|
22
|
+
"agility",
|
|
23
|
+
"cms",
|
|
24
|
+
"headlesscms",
|
|
25
|
+
"management-api"
|
|
26
|
+
],
|
|
27
|
+
"author": "Agility CMS",
|
|
28
|
+
"contributors": [
|
|
29
|
+
"Joel Varty",
|
|
30
|
+
"Mohit Vashishtha"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"axios": "^0.27.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^18.11.9"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module" : "commonjs",
|
|
4
|
-
"allowJs": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"jsx": "react",
|
|
7
|
-
"target": "es5",
|
|
8
|
-
"outDir": "./dist/",
|
|
9
|
-
"lib": ["es2016", "dom"],
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true
|
|
13
|
-
},
|
|
14
|
-
"include": ["src", "src/apiClient.ts"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module" : "commonjs",
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"target": "es5",
|
|
8
|
+
"outDir": "./dist/",
|
|
9
|
+
"lib": ["es2016", "dom"],
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src", "src/apiClient.ts"]
|
|
15
15
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ContentMethods } from "./contentMethods";
|
|
2
|
-
import { AssetMethods } from "./assetMethods";
|
|
3
|
-
import { BatchMethods } from "./batchMethods";
|
|
4
|
-
import { ContainerMethods } from "./containerMethods";
|
|
5
|
-
import { InstanceUserMethods } from "./instanceUserMethods";
|
|
6
|
-
import { ModelMethods } from "./modelMethods";
|
|
7
|
-
import { PageMethods } from "./pageMethods";
|
|
8
|
-
import { Options } from "../models/options";
|
|
9
|
-
export declare class ApiClient {
|
|
10
|
-
_options: Options;
|
|
11
|
-
contentMethods: ContentMethods;
|
|
12
|
-
assetMethods: AssetMethods;
|
|
13
|
-
batchMethods: BatchMethods;
|
|
14
|
-
containerMethods: ContainerMethods;
|
|
15
|
-
instanceUserMethods: InstanceUserMethods;
|
|
16
|
-
modelMethods: ModelMethods;
|
|
17
|
-
pageMethods: PageMethods;
|
|
18
|
-
constructor(options: Options);
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiClient = void 0;
|
|
4
|
-
var contentMethods_1 = require("./contentMethods");
|
|
5
|
-
var assetMethods_1 = require("./assetMethods");
|
|
6
|
-
var batchMethods_1 = require("./batchMethods");
|
|
7
|
-
var containerMethods_1 = require("./containerMethods");
|
|
8
|
-
var instanceUserMethods_1 = require("./instanceUserMethods");
|
|
9
|
-
var modelMethods_1 = require("./modelMethods");
|
|
10
|
-
var pageMethods_1 = require("./pageMethods");
|
|
11
|
-
var ApiClient = /** @class */ (function () {
|
|
12
|
-
function ApiClient(options) {
|
|
13
|
-
this._options = options;
|
|
14
|
-
this.contentMethods = new contentMethods_1.ContentMethods(this._options);
|
|
15
|
-
this.assetMethods = new assetMethods_1.AssetMethods(this._options);
|
|
16
|
-
this.batchMethods = new batchMethods_1.BatchMethods(this._options);
|
|
17
|
-
this.containerMethods = new containerMethods_1.ContainerMethods(this._options);
|
|
18
|
-
this.instanceUserMethods = new instanceUserMethods_1.InstanceUserMethods(this._options);
|
|
19
|
-
this.modelMethods = new modelMethods_1.ModelMethods(this._options);
|
|
20
|
-
this.pageMethods = new pageMethods_1.PageMethods(this._options);
|
|
21
|
-
}
|
|
22
|
-
return ApiClient;
|
|
23
|
-
}());
|
|
24
|
-
exports.ApiClient = ApiClient;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Options } from "../models/options";
|
|
2
|
-
import { ClientInstance } from "./clientInstance";
|
|
3
|
-
import { AssetMediaList, Media } from "../models/media";
|
|
4
|
-
export declare class AssetMethods {
|
|
5
|
-
_options: Options;
|
|
6
|
-
_clientInstance: ClientInstance;
|
|
7
|
-
constructor(options: Options);
|
|
8
|
-
deleteFile(mediaID: number, guid: string): Promise<string>;
|
|
9
|
-
moveFile(mediaID: number, newFolder: string, guid: string): Promise<Media>;
|
|
10
|
-
getMediaList(pageSize: number, recordOffset: number, guid: string): Promise<AssetMediaList>;
|
|
11
|
-
getAssetByID(mediaID: number, guid: string): Promise<Media>;
|
|
12
|
-
getAssetByUrl(url: string, guid: string): Promise<Media>;
|
|
13
|
-
upload(formData: FormData, agilityFolderPath: string, guid: string, groupingID?: number): Promise<Media[]>;
|
|
14
|
-
}
|