@agility/management-sdk 0.1.16 → 0.1.18

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 (162) hide show
  1. package/README.md +182 -9
  2. package/dist/apiClient.d.ts +23 -19
  3. package/dist/apiClient.js +28 -24
  4. package/dist/apiMethods/apiClient.d.ts +19 -0
  5. package/dist/apiMethods/apiClient.js +24 -0
  6. package/dist/apiMethods/assetMethods.d.ts +36 -34
  7. package/dist/apiMethods/assetMethods.js +367 -325
  8. package/dist/apiMethods/batchMethods.d.ts +11 -11
  9. package/dist/apiMethods/batchMethods.js +117 -117
  10. package/dist/apiMethods/clientInstance.d.ts +20 -18
  11. package/dist/apiMethods/clientInstance.js +206 -170
  12. package/dist/apiMethods/containerMethods.d.ts +17 -17
  13. package/dist/apiMethods/containerMethods.js +209 -209
  14. package/dist/apiMethods/contentMethods.d.ts +27 -20
  15. package/dist/apiMethods/contentMethods.js +418 -359
  16. package/dist/apiMethods/instanceUserMethods.d.ts +13 -13
  17. package/dist/apiMethods/instanceUserMethods.js +111 -111
  18. package/dist/apiMethods/modelMethods.d.ts +14 -14
  19. package/dist/apiMethods/modelMethods.js +170 -170
  20. package/dist/apiMethods/pageMethods.d.ts +32 -28
  21. package/dist/apiMethods/pageMethods.js +490 -446
  22. package/dist/apiMethods/serverUserMethods.d.ts +10 -0
  23. package/dist/apiMethods/serverUserMethods.js +89 -0
  24. package/dist/apiMethods/webhookMethods.d.ts +12 -0
  25. package/dist/apiMethods/webhookMethods.js +131 -0
  26. package/dist/enums/assetGroupingType.d.ts +3 -3
  27. package/dist/enums/assetGroupingType.js +7 -7
  28. package/dist/enums/batchOperationType.d.ts +19 -19
  29. package/dist/enums/batchOperationType.js +23 -23
  30. package/dist/enums/batchState..d.ts +7 -7
  31. package/dist/enums/batchState..js +11 -11
  32. package/dist/enums/pageItemTemplateType.d.ts +4 -4
  33. package/dist/enums/pageItemTemplateType.js +8 -8
  34. package/dist/index.d.ts +23 -23
  35. package/dist/index.js +39 -39
  36. package/dist/models/assetContainer.d.ts +7 -7
  37. package/dist/models/assetContainer.js +9 -9
  38. package/dist/models/assetGalleries.d.ts +5 -5
  39. package/dist/models/assetGalleries.js +9 -9
  40. package/dist/models/assetMediaGrouping.d.ts +17 -17
  41. package/dist/models/assetMediaGrouping.js +9 -9
  42. package/dist/models/assetMediaGroupingMetaData.d.ts +4 -4
  43. package/dist/models/assetMediaGroupingMetaData.js +9 -9
  44. package/dist/models/batch.d.ts +29 -29
  45. package/dist/models/batch.js +9 -9
  46. package/dist/models/batchItem.d.ts +13 -13
  47. package/dist/models/batchItem.js +9 -9
  48. package/dist/models/container.d.ts +47 -47
  49. package/dist/models/container.js +9 -9
  50. package/dist/models/contentItem.d.ts +37 -37
  51. package/dist/models/contentItem.js +33 -33
  52. package/dist/models/contentItemHistory.d.ts +20 -0
  53. package/dist/models/contentItemHistory.js +15 -0
  54. package/dist/models/contentListFilterModel.d.ts +26 -0
  55. package/dist/models/contentListFilterModel.js +33 -0
  56. package/dist/models/contentSectionDefaultModule.d.ts +7 -7
  57. package/dist/models/contentSectionDefaultModule.js +9 -9
  58. package/dist/models/contentSectionDefinition.d.ts +35 -35
  59. package/dist/models/contentSectionDefinition.js +9 -9
  60. package/dist/models/contentViewColumn.d.ts +8 -8
  61. package/dist/models/contentViewColumn.js +9 -9
  62. package/dist/models/exception.d.ts +4 -4
  63. package/dist/models/exception.js +28 -28
  64. package/dist/models/instanceRole.d.ts +7 -7
  65. package/dist/models/instanceRole.js +9 -9
  66. package/dist/models/instanceUser.d.ts +14 -14
  67. package/dist/models/instanceUser.js +9 -9
  68. package/dist/models/itemComments.d.ts +14 -0
  69. package/dist/models/itemComments.js +15 -0
  70. package/dist/models/listParams.d.ts +9 -0
  71. package/dist/models/listParams.js +16 -0
  72. package/dist/models/media.d.ts +30 -30
  73. package/dist/models/media.js +15 -15
  74. package/dist/models/model.d.ts +30 -30
  75. package/dist/models/model.js +15 -15
  76. package/dist/models/notification.d.ts +13 -13
  77. package/dist/models/notification.js +9 -9
  78. package/dist/models/options.d.ts +7 -7
  79. package/dist/models/options.js +9 -9
  80. package/dist/models/pageHistory.d.ts +21 -0
  81. package/dist/models/pageHistory.js +15 -0
  82. package/dist/models/pageItem.d.ts +56 -56
  83. package/dist/models/pageItem.js +39 -39
  84. package/dist/models/pageModel.d.ts +14 -14
  85. package/dist/models/pageModel.js +9 -9
  86. package/dist/models/serverUser.d.ts +21 -0
  87. package/dist/models/serverUser.js +9 -0
  88. package/dist/models/sharedModule.d.ts +7 -7
  89. package/dist/models/sharedModule.js +9 -9
  90. package/dist/models/sitemap.d.ts +20 -20
  91. package/dist/models/sitemap.js +15 -15
  92. package/dist/models/webhook.d.ts +9 -0
  93. package/dist/models/webhook.js +9 -0
  94. package/dist/models/websiteListing.d.ts +16 -0
  95. package/dist/models/websiteListing.js +9 -0
  96. package/dist/models/websiteUser.d.ts +22 -22
  97. package/dist/models/websiteUser.js +15 -15
  98. package/dist/src/apiMethods/assetMethods.d.ts +14 -0
  99. package/dist/src/apiMethods/assetMethods.js +172 -0
  100. package/dist/src/apiMethods/batchMethods.d.ts +11 -0
  101. package/dist/src/apiMethods/batchMethods.js +117 -0
  102. package/dist/src/apiMethods/clientInstance.d.ts +8 -0
  103. package/dist/src/apiMethods/clientInstance.js +156 -0
  104. package/dist/src/apiMethods/containerMethods.d.ts +16 -0
  105. package/dist/src/apiMethods/containerMethods.js +189 -0
  106. package/dist/src/apiMethods/contentMethods.d.ts +20 -0
  107. package/dist/src/apiMethods/contentMethods.js +359 -0
  108. package/dist/src/apiMethods/instanceUserMethods.d.ts +13 -0
  109. package/dist/src/apiMethods/instanceUserMethods.js +111 -0
  110. package/dist/src/apiMethods/modelMethods.d.ts +13 -0
  111. package/dist/src/apiMethods/modelMethods.js +150 -0
  112. package/dist/src/apiMethods/pageMethods.d.ts +20 -0
  113. package/dist/src/apiMethods/pageMethods.js +323 -0
  114. package/dist/src/enums/batchOperationType.d.ts +19 -0
  115. package/dist/src/enums/batchOperationType.js +23 -0
  116. package/dist/src/enums/batchState..d.ts +7 -0
  117. package/dist/src/enums/batchState..js +11 -0
  118. package/dist/src/index.d.ts +14 -0
  119. package/dist/src/index.js +30 -0
  120. package/dist/src/models/batch.d.ts +29 -0
  121. package/dist/src/models/batch.js +9 -0
  122. package/dist/src/models/batchItem.d.ts +13 -0
  123. package/dist/src/models/batchItem.js +9 -0
  124. package/dist/src/models/container.d.ts +47 -0
  125. package/dist/src/models/container.js +9 -0
  126. package/dist/src/models/contentItem.d.ts +37 -0
  127. package/dist/src/models/contentItem.js +33 -0
  128. package/dist/src/models/contentViewColumn.d.ts +8 -0
  129. package/dist/src/models/contentViewColumn.js +9 -0
  130. package/dist/src/models/exception.d.ts +4 -0
  131. package/dist/src/models/exception.js +28 -0
  132. package/dist/src/models/instanceRole.d.ts +7 -0
  133. package/dist/src/models/instanceRole.js +9 -0
  134. package/dist/src/models/instanceUser.d.ts +14 -0
  135. package/dist/src/models/instanceUser.js +9 -0
  136. package/dist/src/models/media.d.ts +30 -0
  137. package/dist/src/models/media.js +15 -0
  138. package/dist/src/models/model.d.ts +30 -0
  139. package/dist/src/models/model.js +15 -0
  140. package/dist/src/models/notification.d.ts +13 -0
  141. package/dist/src/models/notification.js +9 -0
  142. package/dist/src/models/options.d.ts +7 -0
  143. package/dist/src/models/options.js +9 -0
  144. package/dist/src/models/pageItem.d.ts +56 -0
  145. package/dist/src/models/pageItem.js +39 -0
  146. package/dist/src/models/sitemap.d.ts +20 -0
  147. package/dist/src/models/sitemap.js +15 -0
  148. package/dist/src/models/websiteUser.d.ts +22 -0
  149. package/dist/src/models/websiteUser.js +15 -0
  150. package/package.json +1 -1
  151. package/.yarn/cache/@types-node-npm-18.11.9-d21dd6ec05-cc0aae109e.zip +0 -0
  152. package/.yarn/cache/asynckit-npm-0.4.0-c718858525-7b78c451df.zip +0 -0
  153. package/.yarn/cache/axios-npm-0.27.2-dbe3a48aea-38cb754046.zip +0 -0
  154. package/.yarn/cache/combined-stream-npm-1.0.8-dc14d4a63a-49fa4aeb49.zip +0 -0
  155. package/.yarn/cache/delayed-stream-npm-1.0.0-c5a4c4cc02-46fe6e83e2.zip +0 -0
  156. package/.yarn/cache/follow-redirects-npm-1.15.2-1ec1dd82be-faa66059b6.zip +0 -0
  157. package/.yarn/cache/form-data-npm-4.0.0-916facec2d-01135bf867.zip +0 -0
  158. package/.yarn/cache/mime-db-npm-1.52.0-b5371d6fd2-0d99a03585.zip +0 -0
  159. package/.yarn/cache/mime-types-npm-2.1.35-dd9ea9f3e2-89a5b7f1de.zip +0 -0
  160. package/.yarn/cache/typescript-npm-4.9.5-6427b65ee6-ee000bc268.zip +0 -0
  161. package/.yarn/cache/typescript-patch-f8edcd7439-1f8f3b6aae.zip +0 -0
  162. package/.yarn/install-state.gz +0 -0
@@ -1,170 +1,206 @@
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 __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
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
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.ClientInstance = void 0;
43
- var axios_1 = __importDefault(require("axios"));
44
- var ClientInstance = /** @class */ (function () {
45
- function ClientInstance(options) {
46
- this._options = options;
47
- }
48
- /**
49
- * Figure out the Base Url, which can be overriden using options.baseUrl
50
- *
51
- * @param {string} guid
52
- * @returns {string}
53
- * @memberof ClientInstance
54
- */
55
- ClientInstance.prototype.determineBaseUrl = function (guid) {
56
- //if we have a baseUrl overridden, use it
57
- if (this._options.baseUrl)
58
- return this._options.baseUrl;
59
- var seperator = guid.split('-');
60
- //determine the base url based on the GUID
61
- if (seperator[1] === 'd') {
62
- return "https://mgmt-dev.aglty.io";
63
- }
64
- else if (seperator[1] === 'u') {
65
- return "https://mgmt.aglty.io";
66
- }
67
- else if (seperator[1] === 'c') {
68
- return "https://mgmt-ca.aglty.io";
69
- }
70
- else if (seperator[1] === 'e') {
71
- return "https://mgmt-eu.aglty.io";
72
- }
73
- else if (seperator[1] === 'a') {
74
- return "https://mgmt-aus.aglty.io";
75
- }
76
- return "https://mgmt.aglty.io";
77
- };
78
- ClientInstance.prototype.getInstance = function (guid) {
79
- var baseUrl = this.determineBaseUrl(guid);
80
- var instance = axios_1.default.create({
81
- baseURL: "".concat(baseUrl, "/api/v1/instance/").concat(guid),
82
- maxContentLength: Infinity,
83
- maxBodyLength: Infinity
84
- });
85
- return instance;
86
- };
87
- ClientInstance.prototype.executeGet = function (apiPath, guid, token) {
88
- return __awaiter(this, void 0, void 0, function () {
89
- var instance, resp, err_1;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0:
93
- instance = this.getInstance(guid);
94
- _a.label = 1;
95
- case 1:
96
- _a.trys.push([1, 3, , 4]);
97
- return [4 /*yield*/, instance.get(apiPath, {
98
- headers: {
99
- 'Authorization': "Bearer ".concat(token),
100
- 'Cache-Control': 'no-cache'
101
- }
102
- })];
103
- case 2:
104
- resp = _a.sent();
105
- return [2 /*return*/, resp];
106
- case 3:
107
- err_1 = _a.sent();
108
- throw err_1;
109
- case 4: return [2 /*return*/];
110
- }
111
- });
112
- });
113
- };
114
- ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
115
- return __awaiter(this, void 0, void 0, function () {
116
- var instance, resp, err_2;
117
- return __generator(this, function (_a) {
118
- switch (_a.label) {
119
- case 0:
120
- instance = this.getInstance(guid);
121
- _a.label = 1;
122
- case 1:
123
- _a.trys.push([1, 3, , 4]);
124
- return [4 /*yield*/, instance.delete(apiPath, {
125
- headers: {
126
- 'Authorization': "Bearer ".concat(token),
127
- 'Cache-Control': 'no-cache'
128
- }
129
- })];
130
- case 2:
131
- resp = _a.sent();
132
- return [2 /*return*/, resp];
133
- case 3:
134
- err_2 = _a.sent();
135
- throw err_2;
136
- case 4: return [2 /*return*/];
137
- }
138
- });
139
- });
140
- };
141
- ClientInstance.prototype.executePost = function (apiPath, guid, token, data) {
142
- return __awaiter(this, void 0, void 0, function () {
143
- var instance, resp, err_3;
144
- return __generator(this, function (_a) {
145
- switch (_a.label) {
146
- case 0:
147
- instance = this.getInstance(guid);
148
- _a.label = 1;
149
- case 1:
150
- _a.trys.push([1, 3, , 4]);
151
- return [4 /*yield*/, instance.post(apiPath, data, {
152
- headers: {
153
- 'Authorization': "Bearer ".concat(token),
154
- 'Cache-Control': 'no-cache'
155
- }
156
- })];
157
- case 2:
158
- resp = _a.sent();
159
- return [2 /*return*/, resp];
160
- case 3:
161
- err_3 = _a.sent();
162
- throw err_3;
163
- case 4: return [2 /*return*/];
164
- }
165
- });
166
- });
167
- };
168
- return ClientInstance;
169
- }());
170
- exports.ClientInstance = ClientInstance;
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 __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
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
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.ClientInstance = void 0;
43
+ var axios_1 = __importDefault(require("axios"));
44
+ var ClientInstance = /** @class */ (function () {
45
+ function ClientInstance(options) {
46
+ this._options = options;
47
+ }
48
+ /**
49
+ * Figure out the Base Url, which can be overriden using options.baseUrl
50
+ *
51
+ * @param {string} guid
52
+ * @returns {string}
53
+ * @memberof ClientInstance
54
+ */
55
+ ClientInstance.prototype.determineBaseUrl = function (guid) {
56
+ //if we have a baseUrl overridden, use it
57
+ if (this._options.baseUrl)
58
+ return this._options.baseUrl;
59
+ var seperator = guid.split('-');
60
+ //determine the base url based on the GUID
61
+ if (seperator[1] === 'd') {
62
+ return "https://mgmt-dev.aglty.io";
63
+ }
64
+ else if (seperator[1] === 'u') {
65
+ return "https://mgmt.aglty.io";
66
+ }
67
+ else if (seperator[1] === 'c') {
68
+ return "https://mgmt-ca.aglty.io";
69
+ }
70
+ else if (seperator[1] === 'e') {
71
+ return "https://mgmt-eu.aglty.io";
72
+ }
73
+ else if (seperator[1] === 'a') {
74
+ return "https://mgmt-aus.aglty.io";
75
+ }
76
+ return "https://mgmt.aglty.io";
77
+ };
78
+ ClientInstance.prototype.getInstance = function (guid) {
79
+ var baseUrl = this.determineBaseUrl(guid);
80
+ var instance = axios_1.default.create({
81
+ baseURL: "".concat(baseUrl, "/api/v1/instance/").concat(guid),
82
+ maxContentLength: Infinity,
83
+ maxBodyLength: Infinity
84
+ });
85
+ return instance;
86
+ };
87
+ ClientInstance.prototype.getAxiosInstance = function (guid) {
88
+ var baseUrl = this.determineBaseUrl(guid);
89
+ var instance = axios_1.default.create({
90
+ baseURL: "".concat(baseUrl, "/api/v1"),
91
+ maxContentLength: Infinity,
92
+ maxBodyLength: Infinity
93
+ });
94
+ return instance;
95
+ };
96
+ ClientInstance.prototype.executeServerGet = function (apiPath, guid, token) {
97
+ return __awaiter(this, void 0, void 0, function () {
98
+ var instance, resp, err_1;
99
+ return __generator(this, function (_a) {
100
+ switch (_a.label) {
101
+ case 0:
102
+ instance = this.getAxiosInstance(guid);
103
+ _a.label = 1;
104
+ case 1:
105
+ _a.trys.push([1, 3, , 4]);
106
+ return [4 /*yield*/, instance.get(apiPath, {
107
+ headers: {
108
+ 'Authorization': "Bearer ".concat(token),
109
+ 'Cache-Control': 'no-cache'
110
+ }
111
+ })];
112
+ case 2:
113
+ resp = _a.sent();
114
+ return [2 /*return*/, resp];
115
+ case 3:
116
+ err_1 = _a.sent();
117
+ throw err_1;
118
+ case 4: return [2 /*return*/];
119
+ }
120
+ });
121
+ });
122
+ };
123
+ ClientInstance.prototype.executeGet = function (apiPath, guid, token) {
124
+ return __awaiter(this, void 0, void 0, function () {
125
+ var instance, resp, err_2;
126
+ return __generator(this, function (_a) {
127
+ switch (_a.label) {
128
+ case 0:
129
+ instance = this.getInstance(guid);
130
+ _a.label = 1;
131
+ case 1:
132
+ _a.trys.push([1, 3, , 4]);
133
+ return [4 /*yield*/, instance.get(apiPath, {
134
+ headers: {
135
+ 'Authorization': "Bearer ".concat(token),
136
+ 'Cache-Control': 'no-cache'
137
+ }
138
+ })];
139
+ case 2:
140
+ resp = _a.sent();
141
+ return [2 /*return*/, resp];
142
+ case 3:
143
+ err_2 = _a.sent();
144
+ throw err_2;
145
+ case 4: return [2 /*return*/];
146
+ }
147
+ });
148
+ });
149
+ };
150
+ ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
151
+ return __awaiter(this, void 0, void 0, function () {
152
+ var instance, resp, err_3;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ instance = this.getInstance(guid);
157
+ _a.label = 1;
158
+ case 1:
159
+ _a.trys.push([1, 3, , 4]);
160
+ return [4 /*yield*/, instance.delete(apiPath, {
161
+ headers: {
162
+ 'Authorization': "Bearer ".concat(token),
163
+ 'Cache-Control': 'no-cache'
164
+ }
165
+ })];
166
+ case 2:
167
+ resp = _a.sent();
168
+ return [2 /*return*/, resp];
169
+ case 3:
170
+ err_3 = _a.sent();
171
+ throw err_3;
172
+ case 4: return [2 /*return*/];
173
+ }
174
+ });
175
+ });
176
+ };
177
+ ClientInstance.prototype.executePost = function (apiPath, guid, token, data) {
178
+ return __awaiter(this, void 0, void 0, function () {
179
+ var instance, resp, err_4;
180
+ return __generator(this, function (_a) {
181
+ switch (_a.label) {
182
+ case 0:
183
+ instance = this.getInstance(guid);
184
+ _a.label = 1;
185
+ case 1:
186
+ _a.trys.push([1, 3, , 4]);
187
+ return [4 /*yield*/, instance.post(apiPath, data, {
188
+ headers: {
189
+ 'Authorization': "Bearer ".concat(token),
190
+ 'Cache-Control': 'no-cache'
191
+ }
192
+ })];
193
+ case 2:
194
+ resp = _a.sent();
195
+ return [2 /*return*/, resp];
196
+ case 3:
197
+ err_4 = _a.sent();
198
+ throw err_4;
199
+ case 4: return [2 /*return*/];
200
+ }
201
+ });
202
+ });
203
+ };
204
+ return ClientInstance;
205
+ }());
206
+ exports.ClientInstance = ClientInstance;
@@ -1,17 +1,17 @@
1
- import { Options } from "../models/options";
2
- import { ClientInstance } from "./clientInstance";
3
- import { Container } from "../models/container";
4
- import { Notification } from "../models/notification";
5
- export declare class ContainerMethods {
6
- _options: Options;
7
- _clientInstance: ClientInstance;
8
- constructor(options: Options);
9
- getContainerByID(id: number, guid: string): Promise<Container>;
10
- getContainersByModel(modelId: number, guid: string): Promise<Container[]>;
11
- getContainerByReferenceName(referenceName: string, guid: string): Promise<Container>;
12
- getContainerSecurity(id: number, guid: string): Promise<Container>;
13
- getContainerList(guid: string): Promise<Container[]>;
14
- getNotificationList(id: number, guid: string): Promise<Notification[]>;
15
- saveContainer(container: Container, guid: string): Promise<Container>;
16
- deleteContainer(id: number, guid: string): Promise<string>;
17
- }
1
+ import { Options } from "../models/options";
2
+ import { ClientInstance } from "./clientInstance";
3
+ import { Container } from "../models/container";
4
+ import { Notification } from "../models/notification";
5
+ export declare class ContainerMethods {
6
+ _options: Options;
7
+ _clientInstance: ClientInstance;
8
+ constructor(options: Options);
9
+ getContainerByID(id: number, guid: string): Promise<Container>;
10
+ getContainersByModel(modelId: number, guid: string): Promise<Container[]>;
11
+ getContainerByReferenceName(referenceName: string, guid: string): Promise<Container>;
12
+ getContainerSecurity(id: number, guid: string): Promise<Container>;
13
+ getContainerList(guid: string): Promise<Container[]>;
14
+ getNotificationList(id: number, guid: string): Promise<Notification[]>;
15
+ saveContainer(container: Container, guid: string): Promise<Container>;
16
+ deleteContainer(id: number, guid: string): Promise<string>;
17
+ }