@agility/management-sdk 0.1.30 → 0.1.31

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.
@@ -1,11 +1,42 @@
1
1
  import { Options } from "../models/options";
2
2
  import { ClientInstance } from "./clientInstance";
3
3
  import { Batch } from "../models/batch";
4
+ import { BatchTypesResponse } from "../models/batchTypes";
4
5
  export declare class BatchMethods {
5
6
  _options: Options;
6
7
  _clientInstance: ClientInstance;
7
8
  constructor(options: Options);
8
- getBatch(batchID: number, guid: string): Promise<Batch>;
9
+ getBatch(batchID: number, guid: string, expandItems?: boolean): Promise<Batch>;
10
+ publishBatch(batchID: number, guid: string, returnBatchId?: boolean): Promise<number>;
11
+ unpublishBatch(batchID: number, guid: string, returnBatchId?: boolean): Promise<number>;
12
+ approveBatch(batchID: number, guid: string, returnBatchId?: boolean): Promise<number>;
13
+ declineBatch(batchID: number, guid: string, returnBatchId?: boolean): Promise<number>;
14
+ requestApprovalBatch(batchID: number, guid: string, returnBatchId?: boolean): Promise<number>;
15
+ /**
16
+ * Retrieves all batch-related enum types for developer discovery.
17
+ * This method provides all available enum values with their names,
18
+ * enabling dynamic UI population and client-side validation.
19
+ *
20
+ * @param guid - Current website guid
21
+ * @returns Promise containing all batch enum types
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * // Get all batch types for UI population
26
+ * const types = await client.batchMethods.getBatchTypes(guid);
27
+ *
28
+ * // Create dropdown options for item types
29
+ * const itemTypeOptions = types.itemTypes.map(type => ({
30
+ * label: type.name,
31
+ * value: type.value
32
+ * }));
33
+ *
34
+ * // Validate operation type
35
+ * const isValidOperation = (value: number) =>
36
+ * types.workflowOperations.some(op => op.value === value);
37
+ * ```
38
+ */
39
+ getBatchTypes(guid: string): Promise<BatchTypesResponse>;
9
40
  Retry(method: Function): Promise<Batch>;
10
41
  delay(ms: number): Promise<unknown>;
11
42
  }
@@ -45,14 +45,15 @@ var BatchMethods = /** @class */ (function () {
45
45
  this._options = options;
46
46
  this._clientInstance = new clientInstance_1.ClientInstance(this._options);
47
47
  }
48
- BatchMethods.prototype.getBatch = function (batchID, guid) {
49
- return __awaiter(this, void 0, void 0, function () {
48
+ BatchMethods.prototype.getBatch = function (batchID_1, guid_1) {
49
+ return __awaiter(this, arguments, void 0, function (batchID, guid, expandItems) {
50
50
  var apiPath, resp, err_1;
51
+ if (expandItems === void 0) { expandItems = true; }
51
52
  return __generator(this, function (_a) {
52
53
  switch (_a.label) {
53
54
  case 0:
54
55
  _a.trys.push([0, 2, , 3]);
55
- apiPath = "batch/".concat(batchID);
56
+ apiPath = "batch/".concat(batchID, "?expandItems=").concat(expandItems);
56
57
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
57
58
  case 1:
58
59
  resp = _a.sent();
@@ -65,9 +66,238 @@ var BatchMethods = /** @class */ (function () {
65
66
  });
66
67
  });
67
68
  };
69
+ BatchMethods.prototype.publishBatch = function (batchID_1, guid_1) {
70
+ return __awaiter(this, arguments, void 0, function (batchID, guid, returnBatchId) {
71
+ var apiPath, resp, resultBatchID_1, err_2;
72
+ var _this = this;
73
+ if (returnBatchId === void 0) { returnBatchId = false; }
74
+ return __generator(this, function (_a) {
75
+ switch (_a.label) {
76
+ case 0:
77
+ _a.trys.push([0, 3, , 4]);
78
+ apiPath = "batch/".concat(batchID, "/publish");
79
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
80
+ case 1:
81
+ resp = _a.sent();
82
+ resultBatchID_1 = resp.data;
83
+ // If user wants batchID immediately, return it for custom polling
84
+ if (returnBatchId) {
85
+ return [2 /*return*/, resultBatchID_1];
86
+ }
87
+ // Default behavior: wait for completion and return batch ID
88
+ return [4 /*yield*/, this.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
89
+ switch (_a.label) {
90
+ case 0: return [4 /*yield*/, this.getBatch(resultBatchID_1, guid)];
91
+ case 1: return [2 /*return*/, _a.sent()];
92
+ }
93
+ }); }); })];
94
+ case 2:
95
+ // Default behavior: wait for completion and return batch ID
96
+ _a.sent();
97
+ return [2 /*return*/, resultBatchID_1];
98
+ case 3:
99
+ err_2 = _a.sent();
100
+ throw new exception_1.Exception("Unable to publish the batch with id: ".concat(batchID), err_2);
101
+ case 4: return [2 /*return*/];
102
+ }
103
+ });
104
+ });
105
+ };
106
+ BatchMethods.prototype.unpublishBatch = function (batchID_1, guid_1) {
107
+ return __awaiter(this, arguments, void 0, function (batchID, guid, returnBatchId) {
108
+ var apiPath, resp, resultBatchID_2, err_3;
109
+ var _this = this;
110
+ if (returnBatchId === void 0) { returnBatchId = false; }
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ _a.trys.push([0, 3, , 4]);
115
+ apiPath = "batch/".concat(batchID, "/unpublish");
116
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
117
+ case 1:
118
+ resp = _a.sent();
119
+ resultBatchID_2 = resp.data;
120
+ // If user wants batchID immediately, return it for custom polling
121
+ if (returnBatchId) {
122
+ return [2 /*return*/, resultBatchID_2];
123
+ }
124
+ // Default behavior: wait for completion and return batch ID
125
+ return [4 /*yield*/, this.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0: return [4 /*yield*/, this.getBatch(resultBatchID_2, guid)];
128
+ case 1: return [2 /*return*/, _a.sent()];
129
+ }
130
+ }); }); })];
131
+ case 2:
132
+ // Default behavior: wait for completion and return batch ID
133
+ _a.sent();
134
+ return [2 /*return*/, resultBatchID_2];
135
+ case 3:
136
+ err_3 = _a.sent();
137
+ throw new exception_1.Exception("Unable to unpublish the batch with id: ".concat(batchID), err_3);
138
+ case 4: return [2 /*return*/];
139
+ }
140
+ });
141
+ });
142
+ };
143
+ BatchMethods.prototype.approveBatch = function (batchID_1, guid_1) {
144
+ return __awaiter(this, arguments, void 0, function (batchID, guid, returnBatchId) {
145
+ var apiPath, resp, resultBatchID_3, err_4;
146
+ var _this = this;
147
+ if (returnBatchId === void 0) { returnBatchId = false; }
148
+ return __generator(this, function (_a) {
149
+ switch (_a.label) {
150
+ case 0:
151
+ _a.trys.push([0, 3, , 4]);
152
+ apiPath = "batch/".concat(batchID, "/approve");
153
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
154
+ case 1:
155
+ resp = _a.sent();
156
+ resultBatchID_3 = resp.data;
157
+ // If user wants batchID immediately, return it for custom polling
158
+ if (returnBatchId) {
159
+ return [2 /*return*/, resultBatchID_3];
160
+ }
161
+ // Default behavior: wait for completion and return batch ID
162
+ return [4 /*yield*/, this.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
163
+ switch (_a.label) {
164
+ case 0: return [4 /*yield*/, this.getBatch(resultBatchID_3, guid)];
165
+ case 1: return [2 /*return*/, _a.sent()];
166
+ }
167
+ }); }); })];
168
+ case 2:
169
+ // Default behavior: wait for completion and return batch ID
170
+ _a.sent();
171
+ return [2 /*return*/, resultBatchID_3];
172
+ case 3:
173
+ err_4 = _a.sent();
174
+ throw new exception_1.Exception("Unable to approve the batch with id: ".concat(batchID), err_4);
175
+ case 4: return [2 /*return*/];
176
+ }
177
+ });
178
+ });
179
+ };
180
+ BatchMethods.prototype.declineBatch = function (batchID_1, guid_1) {
181
+ return __awaiter(this, arguments, void 0, function (batchID, guid, returnBatchId) {
182
+ var apiPath, resp, resultBatchID_4, err_5;
183
+ var _this = this;
184
+ if (returnBatchId === void 0) { returnBatchId = false; }
185
+ return __generator(this, function (_a) {
186
+ switch (_a.label) {
187
+ case 0:
188
+ _a.trys.push([0, 3, , 4]);
189
+ apiPath = "batch/".concat(batchID, "/decline");
190
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
191
+ case 1:
192
+ resp = _a.sent();
193
+ resultBatchID_4 = resp.data;
194
+ // If user wants batchID immediately, return it for custom polling
195
+ if (returnBatchId) {
196
+ return [2 /*return*/, resultBatchID_4];
197
+ }
198
+ // Default behavior: wait for completion and return batch ID
199
+ return [4 /*yield*/, this.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
200
+ switch (_a.label) {
201
+ case 0: return [4 /*yield*/, this.getBatch(resultBatchID_4, guid)];
202
+ case 1: return [2 /*return*/, _a.sent()];
203
+ }
204
+ }); }); })];
205
+ case 2:
206
+ // Default behavior: wait for completion and return batch ID
207
+ _a.sent();
208
+ return [2 /*return*/, resultBatchID_4];
209
+ case 3:
210
+ err_5 = _a.sent();
211
+ throw new exception_1.Exception("Unable to decline the batch with id: ".concat(batchID), err_5);
212
+ case 4: return [2 /*return*/];
213
+ }
214
+ });
215
+ });
216
+ };
217
+ BatchMethods.prototype.requestApprovalBatch = function (batchID_1, guid_1) {
218
+ return __awaiter(this, arguments, void 0, function (batchID, guid, returnBatchId) {
219
+ var apiPath, resp, resultBatchID_5, err_6;
220
+ var _this = this;
221
+ if (returnBatchId === void 0) { returnBatchId = false; }
222
+ return __generator(this, function (_a) {
223
+ switch (_a.label) {
224
+ case 0:
225
+ _a.trys.push([0, 3, , 4]);
226
+ apiPath = "batch/".concat(batchID, "/request-approval");
227
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
228
+ case 1:
229
+ resp = _a.sent();
230
+ resultBatchID_5 = resp.data;
231
+ // If user wants batchID immediately, return it for custom polling
232
+ if (returnBatchId) {
233
+ return [2 /*return*/, resultBatchID_5];
234
+ }
235
+ // Default behavior: wait for completion and return batch ID
236
+ return [4 /*yield*/, this.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
237
+ switch (_a.label) {
238
+ case 0: return [4 /*yield*/, this.getBatch(resultBatchID_5, guid)];
239
+ case 1: return [2 /*return*/, _a.sent()];
240
+ }
241
+ }); }); })];
242
+ case 2:
243
+ // Default behavior: wait for completion and return batch ID
244
+ _a.sent();
245
+ return [2 /*return*/, resultBatchID_5];
246
+ case 3:
247
+ err_6 = _a.sent();
248
+ throw new exception_1.Exception("Unable to request approval for the batch with id: ".concat(batchID), err_6);
249
+ case 4: return [2 /*return*/];
250
+ }
251
+ });
252
+ });
253
+ };
254
+ /**
255
+ * Retrieves all batch-related enum types for developer discovery.
256
+ * This method provides all available enum values with their names,
257
+ * enabling dynamic UI population and client-side validation.
258
+ *
259
+ * @param guid - Current website guid
260
+ * @returns Promise containing all batch enum types
261
+ *
262
+ * @example
263
+ * ```typescript
264
+ * // Get all batch types for UI population
265
+ * const types = await client.batchMethods.getBatchTypes(guid);
266
+ *
267
+ * // Create dropdown options for item types
268
+ * const itemTypeOptions = types.itemTypes.map(type => ({
269
+ * label: type.name,
270
+ * value: type.value
271
+ * }));
272
+ *
273
+ * // Validate operation type
274
+ * const isValidOperation = (value: number) =>
275
+ * types.workflowOperations.some(op => op.value === value);
276
+ * ```
277
+ */
278
+ BatchMethods.prototype.getBatchTypes = function (guid) {
279
+ return __awaiter(this, void 0, void 0, function () {
280
+ var apiPath, resp, err_7;
281
+ return __generator(this, function (_a) {
282
+ switch (_a.label) {
283
+ case 0:
284
+ _a.trys.push([0, 2, , 3]);
285
+ apiPath = "batch/types";
286
+ return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
287
+ case 1:
288
+ resp = _a.sent();
289
+ return [2 /*return*/, resp.data];
290
+ case 2:
291
+ err_7 = _a.sent();
292
+ throw new exception_1.Exception("Unable to retrieve batch types", err_7);
293
+ case 3: return [2 /*return*/];
294
+ }
295
+ });
296
+ });
297
+ };
68
298
  BatchMethods.prototype.Retry = function (method) {
69
299
  return __awaiter(this, void 0, void 0, function () {
70
- var retryCount, duration, batch, err_2;
300
+ var retryCount, duration, batch, err_8;
71
301
  return __generator(this, function (_a) {
72
302
  switch (_a.label) {
73
303
  case 0:
@@ -97,7 +327,7 @@ var BatchMethods = /** @class */ (function () {
97
327
  _a.label = 6;
98
328
  case 6: return [3 /*break*/, 8];
99
329
  case 7:
100
- err_2 = _a.sent();
330
+ err_8 = _a.sent();
101
331
  throw new Error('Timeout exceeded but operation still in progress. Please check the Batches page in the Agility Content Manager app.');
102
332
  case 8: return [3 /*break*/, 1];
103
333
  case 9: return [2 /*return*/];
@@ -15,6 +15,6 @@ export declare class ClientInstance {
15
15
  getAxiosInstance(guid: string): AxiosInstance;
16
16
  executeServerGet(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
17
17
  executeGet(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
18
- executeDelete(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
18
+ executeDelete(apiPath: string, guid: string, token: string, data?: any): Promise<import("axios").AxiosResponse<any, any>>;
19
19
  executePost(apiPath: string, guid: string, token: string, data: any): Promise<import("axios").AxiosResponse<any, any>>;
20
20
  }
@@ -147,7 +147,7 @@ var ClientInstance = /** @class */ (function () {
147
147
  });
148
148
  });
149
149
  };
150
- ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
150
+ ClientInstance.prototype.executeDelete = function (apiPath, guid, token, data) {
151
151
  return __awaiter(this, void 0, void 0, function () {
152
152
  var instance, resp, err_3;
153
153
  return __generator(this, function (_a) {
@@ -161,7 +161,8 @@ var ClientInstance = /** @class */ (function () {
161
161
  headers: {
162
162
  'Authorization': "Bearer ".concat(token),
163
163
  'Cache-Control': 'no-cache'
164
- }
164
+ },
165
+ data: data
165
166
  })];
166
167
  case 2:
167
168
  resp = _a.sent();
@@ -0,0 +1,7 @@
1
+ export declare enum BatchItemType {
2
+ Page = 1,
3
+ ContentItem = 2,
4
+ ContentList = 3,
5
+ Tag = 4,
6
+ ModuleDef = 5
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchItemType = void 0;
4
+ var BatchItemType;
5
+ (function (BatchItemType) {
6
+ BatchItemType[BatchItemType["Page"] = 1] = "Page";
7
+ BatchItemType[BatchItemType["ContentItem"] = 2] = "ContentItem";
8
+ BatchItemType[BatchItemType["ContentList"] = 3] = "ContentList";
9
+ BatchItemType[BatchItemType["Tag"] = 4] = "Tag";
10
+ BatchItemType[BatchItemType["ModuleDef"] = 5] = "ModuleDef";
11
+ })(BatchItemType || (exports.BatchItemType = BatchItemType = {}));
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Workflow operation types specifically for batch processing.
3
+ * Subset of BatchOperationType containing only workflow-related operations.
4
+ */
5
+ export declare enum WorkflowOperationType {
6
+ /**
7
+ * Publish the items in the batch.
8
+ */
9
+ Publish = 1,
10
+ /**
11
+ * Unpublish the items in the batch.
12
+ */
13
+ Unpublish = 2,
14
+ /**
15
+ * Approve the items in the batch.
16
+ */
17
+ Approve = 3,
18
+ /**
19
+ * Decline the items in the batch.
20
+ */
21
+ Decline = 4,
22
+ /**
23
+ * Request approval for the items in the batch.
24
+ */
25
+ RequestApproval = 5
26
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowOperationType = void 0;
4
+ /**
5
+ * Workflow operation types specifically for batch processing.
6
+ * Subset of BatchOperationType containing only workflow-related operations.
7
+ */
8
+ var WorkflowOperationType;
9
+ (function (WorkflowOperationType) {
10
+ /**
11
+ * Publish the items in the batch.
12
+ */
13
+ WorkflowOperationType[WorkflowOperationType["Publish"] = 1] = "Publish";
14
+ /**
15
+ * Unpublish the items in the batch.
16
+ */
17
+ WorkflowOperationType[WorkflowOperationType["Unpublish"] = 2] = "Unpublish";
18
+ /**
19
+ * Approve the items in the batch.
20
+ */
21
+ WorkflowOperationType[WorkflowOperationType["Approve"] = 3] = "Approve";
22
+ /**
23
+ * Decline the items in the batch.
24
+ */
25
+ WorkflowOperationType[WorkflowOperationType["Decline"] = 4] = "Decline";
26
+ /**
27
+ * Request approval for the items in the batch.
28
+ */
29
+ WorkflowOperationType[WorkflowOperationType["RequestApproval"] = 5] = "RequestApproval";
30
+ })(WorkflowOperationType || (exports.WorkflowOperationType = WorkflowOperationType = {}));
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export * from "./models/options";
2
2
  export * from "./models/batch";
3
3
  export * from "./models/batchItem";
4
+ export * from "./models/batchTypes";
4
5
  export * from "./models/container";
6
+ export * from "./models/contentDefinitionTypeID";
5
7
  export * from "./models/contentItem";
6
8
  export * from "./models/contentViewColumn";
7
9
  export * from "./models/instanceRole";
@@ -21,4 +23,8 @@ export * from "./models/contentSectionDefaultModule";
21
23
  export * from "./models/contentSectionDefinition";
22
24
  export * from "./models/sharedModule";
23
25
  export * from "./models/pageModel";
26
+ export * from "./enums/batchOperationType";
27
+ export * from "./enums/workflowOperationType";
28
+ export * from "./enums/batchState.";
29
+ export * from "./enums/batchItemType";
24
30
  export * from "./apiClient";
package/dist/index.js CHANGED
@@ -17,7 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./models/options"), exports);
18
18
  __exportStar(require("./models/batch"), exports);
19
19
  __exportStar(require("./models/batchItem"), exports);
20
+ __exportStar(require("./models/batchTypes"), exports);
20
21
  __exportStar(require("./models/container"), exports);
22
+ __exportStar(require("./models/contentDefinitionTypeID"), exports);
21
23
  __exportStar(require("./models/contentItem"), exports);
22
24
  __exportStar(require("./models/contentViewColumn"), exports);
23
25
  __exportStar(require("./models/instanceRole"), exports);
@@ -37,4 +39,8 @@ __exportStar(require("./models/contentSectionDefaultModule"), exports);
37
39
  __exportStar(require("./models/contentSectionDefinition"), exports);
38
40
  __exportStar(require("./models/sharedModule"), exports);
39
41
  __exportStar(require("./models/pageModel"), exports);
42
+ __exportStar(require("./enums/batchOperationType"), exports);
43
+ __exportStar(require("./enums/workflowOperationType"), exports);
44
+ __exportStar(require("./enums/batchState."), exports);
45
+ __exportStar(require("./enums/batchItemType"), exports);
40
46
  __exportStar(require("./apiClient"), exports);
@@ -10,4 +10,5 @@ export declare class BatchItem {
10
10
  createdOn: string;
11
11
  createdBy: number;
12
12
  createdByName: string;
13
+ errorMessage: string | null;
13
14
  }
@@ -0,0 +1,67 @@
1
+ import { BatchOperationType } from "../enums/batchOperationType";
2
+ import { BatchItemType } from "../enums/batchItemType";
3
+ /**
4
+ * Request model for creating a new batch.
5
+ */
6
+ export interface CreateBatchRequest {
7
+ /**
8
+ * Custom name for the batch. If not provided, defaults to "Custom Batch".
9
+ */
10
+ batchName?: string;
11
+ /**
12
+ * Default operation type for the batch.
13
+ * If not provided, defaults to Publish (1).
14
+ */
15
+ operationType?: BatchOperationType;
16
+ /**
17
+ * Whether the batch should be private (visible only to the creator).
18
+ * If not provided, defaults to true.
19
+ */
20
+ isPrivate?: boolean;
21
+ /**
22
+ * Optional comments or notes about the batch.
23
+ */
24
+ comments?: string;
25
+ }
26
+ /**
27
+ * Request model for adding a reference to an existing item to a batch.
28
+ */
29
+ export interface AddBatchItemRequest {
30
+ /**
31
+ * The type of item to add to the batch.
32
+ */
33
+ itemType: BatchItemType;
34
+ /**
35
+ * The ID of the existing item to add to the batch.
36
+ * For Content Items: use the ContentID of an existing content item
37
+ * For Page Items: use the PageID of an existing page
38
+ */
39
+ itemID: number;
40
+ /**
41
+ * The language code for the item (e.g., "en-us", "fr-ca", "es-mx").
42
+ */
43
+ languageCode: string;
44
+ /**
45
+ * Optional display title for the item in the batch for identification purposes.
46
+ */
47
+ itemTitle?: string;
48
+ }
49
+ /**
50
+ * Request model for adding multiple items to a batch at once.
51
+ */
52
+ export interface AddBatchItemsRequest {
53
+ /**
54
+ * Array of items to add to the batch.
55
+ * Each item must reference an existing content item or page in your CMS.
56
+ */
57
+ items: AddBatchItemRequest[];
58
+ }
59
+ /**
60
+ * Request model for processing a batch with optional comments.
61
+ */
62
+ export interface ProcessBatchRequest {
63
+ /**
64
+ * Optional comments for the batch operation (for audit trail).
65
+ */
66
+ comments?: string;
67
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Response model containing all batch-related enum types for developer discovery.
3
+ */
4
+ export interface BatchTypesResponse {
5
+ /**
6
+ * Available item types that can be added to batches.
7
+ */
8
+ itemTypes: EnumInfo[];
9
+ /**
10
+ * All available batch operation types (includes workflow and other operations).
11
+ */
12
+ operationTypes: EnumInfo[];
13
+ /**
14
+ * Workflow-specific operation types (subset of operationTypes).
15
+ */
16
+ workflowOperations: EnumInfo[];
17
+ /**
18
+ * Available batch states during lifecycle.
19
+ */
20
+ states: EnumInfo[];
21
+ }
22
+ /**
23
+ * Information about an enum value including value and name.
24
+ */
25
+ export interface EnumInfo {
26
+ /**
27
+ * The numeric value of the enum.
28
+ */
29
+ value: number;
30
+ /**
31
+ * The string name of the enum value (e.g., "ContentItem", "Publish").
32
+ */
33
+ name: string;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { ContentViewColumn } from "./contentViewColumn";
2
+ import { ContentDefinitionTypeID } from "./contentDefinitionTypeID";
2
3
  export declare class Container {
3
4
  columns: ContentViewColumn[];
4
5
  contentViewID: number | null;
@@ -30,7 +31,7 @@ export declare class Container {
30
31
  enableAPIOutput: boolean | null;
31
32
  commentsRecordTypeName: string | null;
32
33
  numRowsInListing: number | null;
33
- contentDefinitionTypeID: number | null;
34
+ contentDefinitionTypeID: ContentDefinitionTypeID | null;
34
35
  fullSyncModDate: string | null;
35
36
  confirmSharingOnPublish: boolean | null;
36
37
  contentTemplateName: string | null;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Enum representing the content definition type ID values in Agility CMS
3
+ */
4
+ export declare enum ContentDefinitionTypeID {
5
+ /**
6
+ * List type content definition (0)
7
+ */
8
+ List = 0,
9
+ /**
10
+ * Single item type content definition (1)
11
+ */
12
+ SingleItem = 1,
13
+ /**
14
+ * Component type content definition (2)
15
+ */
16
+ Component = 2
17
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentDefinitionTypeID = void 0;
4
+ /**
5
+ * Enum representing the content definition type ID values in Agility CMS
6
+ */
7
+ var ContentDefinitionTypeID;
8
+ (function (ContentDefinitionTypeID) {
9
+ /**
10
+ * List type content definition (0)
11
+ */
12
+ ContentDefinitionTypeID[ContentDefinitionTypeID["List"] = 0] = "List";
13
+ /**
14
+ * Single item type content definition (1)
15
+ */
16
+ ContentDefinitionTypeID[ContentDefinitionTypeID["SingleItem"] = 1] = "SingleItem";
17
+ /**
18
+ * Component type content definition (2)
19
+ */
20
+ ContentDefinitionTypeID[ContentDefinitionTypeID["Component"] = 2] = "Component";
21
+ })(ContentDefinitionTypeID || (exports.ContentDefinitionTypeID = ContentDefinitionTypeID = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility/management-sdk",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Agility CMS Tyescript SDK for Management API.",
5
5
  "repository": {
6
6
  "type": "git",