@agility/management-sdk 0.1.26 → 0.1.30

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 (154) hide show
  1. package/.cursor/manifest.md +98 -0
  2. package/.env +92 -0
  3. package/dist/apiClient.js.map +1 -0
  4. package/dist/apiMethods/assetMethods.js +38 -38
  5. package/dist/apiMethods/assetMethods.js.map +1 -0
  6. package/dist/apiMethods/batchMethods.js +5 -5
  7. package/dist/apiMethods/batchMethods.js.map +1 -0
  8. package/dist/apiMethods/clientInstance.js +9 -9
  9. package/dist/apiMethods/clientInstance.js.map +1 -0
  10. package/dist/apiMethods/containerMethods.d.ts +8 -1
  11. package/dist/apiMethods/containerMethods.js +27 -20
  12. package/dist/apiMethods/containerMethods.js.map +1 -0
  13. package/dist/apiMethods/contentMethods.d.ts +8 -8
  14. package/dist/apiMethods/contentMethods.js +100 -68
  15. package/dist/apiMethods/contentMethods.js.map +1 -0
  16. package/dist/apiMethods/instanceMethods.js +3 -3
  17. package/dist/apiMethods/instanceMethods.js.map +1 -0
  18. package/dist/apiMethods/instanceUserMethods.js +10 -10
  19. package/dist/apiMethods/instanceUserMethods.js.map +1 -0
  20. package/dist/apiMethods/modelMethods.js +13 -13
  21. package/dist/apiMethods/modelMethods.js.map +1 -0
  22. package/dist/apiMethods/pageMethods.d.ts +7 -7
  23. package/dist/apiMethods/pageMethods.js +98 -67
  24. package/dist/apiMethods/pageMethods.js.map +1 -0
  25. package/dist/apiMethods/serverUserMethods.js +4 -4
  26. package/dist/apiMethods/serverUserMethods.js.map +1 -0
  27. package/dist/apiMethods/webhookMethods.js +11 -11
  28. package/dist/apiMethods/webhookMethods.js.map +1 -0
  29. package/dist/enums/assetGroupingType.js +1 -1
  30. package/dist/enums/assetGroupingType.js.map +1 -0
  31. package/dist/enums/batchOperationType.js +1 -1
  32. package/dist/enums/batchOperationType.js.map +1 -0
  33. package/dist/enums/batchState..js +1 -1
  34. package/dist/enums/batchState.d.ts +7 -0
  35. package/dist/enums/batchState.js +12 -0
  36. package/dist/enums/batchState.js.map +1 -0
  37. package/dist/enums/pageItemTemplateType.js +1 -1
  38. package/dist/enums/pageItemTemplateType.js.map +1 -0
  39. package/dist/errors/exception.d.ts +4 -0
  40. package/dist/errors/exception.js +11 -0
  41. package/dist/errors/exception.js.map +1 -0
  42. package/dist/index.js +5 -1
  43. package/dist/index.js.map +1 -0
  44. package/dist/models/exception.js +2 -0
  45. package/dist/models/locales.js +2 -0
  46. package/dist/tests/authHelper.d.ts +2 -0
  47. package/dist/tests/authHelper.js +14 -0
  48. package/dist/tests/authHelper.js.map +1 -0
  49. package/dist/tests/config/apiClient.config.d.ts +16 -0
  50. package/dist/tests/config/apiClient.config.js +84 -0
  51. package/dist/tests/config/apiClient.config.js.map +1 -0
  52. package/dist/tests/config/test.config.d.ts +24 -0
  53. package/dist/tests/config/test.config.js +47 -0
  54. package/dist/tests/config/test.config.js.map +1 -0
  55. package/dist/types/apiResponse.d.ts +13 -0
  56. package/dist/types/apiResponse.js +3 -0
  57. package/dist/types/apiResponse.js.map +1 -0
  58. package/dist/types/assetContainer.d.ts +7 -0
  59. package/dist/types/assetContainer.js +3 -0
  60. package/dist/types/assetContainer.js.map +1 -0
  61. package/dist/types/assetGalleries.d.ts +5 -0
  62. package/dist/types/assetGalleries.js +3 -0
  63. package/dist/types/assetGalleries.js.map +1 -0
  64. package/dist/types/assetMediaGrouping.d.ts +17 -0
  65. package/dist/types/assetMediaGrouping.js +3 -0
  66. package/dist/types/assetMediaGrouping.js.map +1 -0
  67. package/dist/types/assetMediaGroupingMetaData.d.ts +4 -0
  68. package/dist/types/assetMediaGroupingMetaData.js +3 -0
  69. package/dist/types/assetMediaGroupingMetaData.js.map +1 -0
  70. package/dist/types/batch.d.ts +29 -0
  71. package/dist/types/batch.js +3 -0
  72. package/dist/types/batch.js.map +1 -0
  73. package/dist/types/batchItem.d.ts +13 -0
  74. package/dist/types/batchItem.js +3 -0
  75. package/dist/types/batchItem.js.map +1 -0
  76. package/dist/types/container.d.ts +47 -0
  77. package/dist/types/container.js +3 -0
  78. package/dist/types/container.js.map +1 -0
  79. package/dist/types/contentItem.d.ts +37 -0
  80. package/dist/types/contentItem.js +3 -0
  81. package/dist/types/contentItem.js.map +1 -0
  82. package/dist/types/contentItemHistory.d.ts +20 -0
  83. package/dist/types/contentItemHistory.js +3 -0
  84. package/dist/types/contentItemHistory.js.map +1 -0
  85. package/dist/types/contentListFilterModel.d.ts +26 -0
  86. package/dist/types/contentListFilterModel.js +3 -0
  87. package/dist/types/contentListFilterModel.js.map +1 -0
  88. package/dist/types/contentSectionDefaultModule.d.ts +7 -0
  89. package/dist/types/contentSectionDefaultModule.js +3 -0
  90. package/dist/types/contentSectionDefaultModule.js.map +1 -0
  91. package/dist/types/contentSectionDefinition.d.ts +35 -0
  92. package/dist/types/contentSectionDefinition.js +3 -0
  93. package/dist/types/contentSectionDefinition.js.map +1 -0
  94. package/dist/types/contentViewColumn.d.ts +8 -0
  95. package/dist/types/contentViewColumn.js +3 -0
  96. package/dist/types/contentViewColumn.js.map +1 -0
  97. package/dist/types/instanceRole.d.ts +7 -0
  98. package/dist/types/instanceRole.js +3 -0
  99. package/dist/types/instanceRole.js.map +1 -0
  100. package/dist/types/instanceUser.d.ts +14 -0
  101. package/dist/types/instanceUser.js +3 -0
  102. package/dist/types/instanceUser.js.map +1 -0
  103. package/dist/types/itemComments.d.ts +14 -0
  104. package/dist/types/itemComments.js +3 -0
  105. package/dist/types/itemComments.js.map +1 -0
  106. package/dist/types/listParams.d.ts +9 -0
  107. package/dist/types/listParams.js +3 -0
  108. package/dist/types/listParams.js.map +1 -0
  109. package/dist/types/locales.d.ts +1 -0
  110. package/dist/types/locales.js +3 -0
  111. package/dist/types/locales.js.map +1 -0
  112. package/dist/types/media.d.ts +30 -0
  113. package/dist/types/media.js +3 -0
  114. package/dist/types/media.js.map +1 -0
  115. package/dist/types/model.d.ts +30 -0
  116. package/dist/types/model.js +3 -0
  117. package/dist/types/model.js.map +1 -0
  118. package/dist/types/notification.d.ts +13 -0
  119. package/dist/types/notification.js +3 -0
  120. package/dist/types/notification.js.map +1 -0
  121. package/dist/types/options.d.ts +7 -0
  122. package/dist/types/options.js +3 -0
  123. package/dist/types/options.js.map +1 -0
  124. package/dist/types/pageHistory.d.ts +21 -0
  125. package/dist/types/pageHistory.js +3 -0
  126. package/dist/types/pageHistory.js.map +1 -0
  127. package/dist/types/pageItem.d.ts +56 -0
  128. package/dist/types/pageItem.js +3 -0
  129. package/dist/types/pageItem.js.map +1 -0
  130. package/dist/types/pageModel.d.ts +14 -0
  131. package/dist/types/pageModel.js +3 -0
  132. package/dist/types/pageModel.js.map +1 -0
  133. package/dist/types/serverUser.d.ts +21 -0
  134. package/dist/types/serverUser.js +3 -0
  135. package/dist/types/serverUser.js.map +1 -0
  136. package/dist/types/sharedModule.d.ts +7 -0
  137. package/dist/types/sharedModule.js +3 -0
  138. package/dist/types/sharedModule.js.map +1 -0
  139. package/dist/types/sitemap.d.ts +20 -0
  140. package/dist/types/sitemap.js +3 -0
  141. package/dist/types/sitemap.js.map +1 -0
  142. package/dist/types/tokenResponseData.d.ts +10 -0
  143. package/dist/types/tokenResponseData.js +3 -0
  144. package/dist/types/tokenResponseData.js.map +1 -0
  145. package/dist/types/webhook.d.ts +9 -0
  146. package/dist/types/webhook.js +3 -0
  147. package/dist/types/webhook.js.map +1 -0
  148. package/dist/types/websiteListing.d.ts +16 -0
  149. package/dist/types/websiteListing.js +3 -0
  150. package/dist/types/websiteListing.js.map +1 -0
  151. package/dist/types/websiteUser.d.ts +22 -0
  152. package/dist/types/websiteUser.js +3 -0
  153. package/dist/types/websiteUser.js.map +1 -0
  154. package/package.json +1 -1
@@ -5,4 +5,4 @@ var PageItemTemplateType;
5
5
  (function (PageItemTemplateType) {
6
6
  PageItemTemplateType[PageItemTemplateType["Variable"] = 0] = "Variable";
7
7
  PageItemTemplateType[PageItemTemplateType["FixedModule"] = 1] = "FixedModule";
8
- })(PageItemTemplateType = exports.PageItemTemplateType || (exports.PageItemTemplateType = {}));
8
+ })(PageItemTemplateType || (exports.PageItemTemplateType = PageItemTemplateType = {}));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageItemTemplateType.js","sourceRoot":"","sources":["../../src/enums/pageItemTemplateType.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,uEAAY,CAAA;IACf,6EAAe,CAAA;AAChB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
@@ -0,0 +1,4 @@
1
+ export declare class Exception extends Error {
2
+ constructor(message: string, inner?: Error);
3
+ innerError?: Error;
4
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Exception = void 0;
4
+ class Exception extends Error {
5
+ constructor(message, inner) {
6
+ super(message);
7
+ this.innerError = inner;
8
+ }
9
+ }
10
+ exports.Exception = Exception;
11
+ //# sourceMappingURL=exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exception.js","sourceRoot":"","sources":["../../src/errors/exception.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IAEnC,YAAY,OAAe,EAAE,KAAa;QACzC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACxB,CAAC;CAGD;AARD,8BAQC"}
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,gDAA8B;AAC9B,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,4DAA0C;AAC1C,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC;AACrC,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,yDAAuC;AACvC,6DAA2C;AAC3C,qEAAmD;AACnD,sEAAoD;AACpD,mEAAiD;AACjD,uDAAqC;AACrC,oDAAkC;AAClC,qDAAmC;AACnC,8CAA4B"}
@@ -7,6 +7,8 @@ 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");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ 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");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -0,0 +1,2 @@
1
+ import { Options } from '../types/options';
2
+ export declare const getTestOptions: () => Options;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTestOptions = void 0;
4
+ const getTestOptions = () => {
5
+ return {
6
+ token: process.env.AGILITY_API_TOKEN || 'test-token',
7
+ baseUrl: process.env.AGILITY_API_URL || 'https://api.agilitycms.com',
8
+ refresh_token: process.env.AGILITY_REFRESH_TOKEN || 'test-refresh-token',
9
+ duration: 3000,
10
+ retryCount: 500
11
+ };
12
+ };
13
+ exports.getTestOptions = getTestOptions;
14
+ //# sourceMappingURL=authHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authHelper.js","sourceRoot":"","sources":["../../src/tests/authHelper.ts"],"names":[],"mappings":";;;AAEO,MAAM,cAAc,GAAG,GAAY,EAAE;IAC1C,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,YAAY;QACpD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,4BAA4B;QACpE,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,oBAAoB;QACxE,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,GAAG;KAChB,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB"}
@@ -0,0 +1,16 @@
1
+ import { ClientInstance } from '../../apiMethods/clientInstance';
2
+ export declare class ApiClientConfig {
3
+ private static instance;
4
+ private testConfig;
5
+ private _mgmtApiClient;
6
+ private tableClient;
7
+ private constructor();
8
+ static getInstance(): ApiClientConfig;
9
+ private getTableClient;
10
+ private getCurrentToken;
11
+ private getAuthorizationToken;
12
+ createManagementSdkClient(): Promise<{
13
+ apiClient: ClientInstance;
14
+ guid: string;
15
+ }>;
16
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ApiClientConfig = void 0;
7
+ const test_config_1 = require("./test.config");
8
+ const clientInstance_1 = require("../../apiMethods/clientInstance");
9
+ const data_tables_1 = require("@azure/data-tables");
10
+ const axios_1 = __importDefault(require("axios"));
11
+ const form_data_1 = __importDefault(require("form-data"));
12
+ class ApiClientConfig {
13
+ constructor() {
14
+ this._mgmtApiClient = null;
15
+ this.tableClient = null;
16
+ this.testConfig = test_config_1.TestConfiguration.getInstance();
17
+ }
18
+ static getInstance() {
19
+ if (!ApiClientConfig.instance) {
20
+ ApiClientConfig.instance = new ApiClientConfig();
21
+ }
22
+ return ApiClientConfig.instance;
23
+ }
24
+ async getTableClient() {
25
+ if (!this.tableClient) {
26
+ const azureConfig = this.testConfig.getAzureConfig();
27
+ const credentials = new data_tables_1.AzureNamedKeyCredential(azureConfig.storageAccount, azureConfig.storageAccountKey);
28
+ this.tableClient = new data_tables_1.TableClient(`https://${azureConfig.storageAccount}.table.core.windows.net`, azureConfig.storageAccountTable, credentials);
29
+ }
30
+ return this.tableClient;
31
+ }
32
+ async getCurrentToken(partitionKey, rowKey) {
33
+ try {
34
+ const tableClient = await this.getTableClient();
35
+ const tokenInfo = await tableClient.getEntity(partitionKey, rowKey);
36
+ return tokenInfo;
37
+ }
38
+ catch (err) {
39
+ return null;
40
+ }
41
+ }
42
+ async getAuthorizationToken() {
43
+ const rowKey = process.env.TEST_ENV === "dev" ? "dev" : "prod";
44
+ const partitionKey = 'Integration-Test';
45
+ const currentToken = await this.getCurrentToken(partitionKey, rowKey);
46
+ if (!currentToken) {
47
+ throw new Error('No current token found');
48
+ }
49
+ const form = new form_data_1.default();
50
+ form.append("refresh_token", currentToken.refresh_token);
51
+ const config = this.testConfig.getConfig();
52
+ const apiPath = `${config.managementApiBaseUrl}/oauth/refresh`;
53
+ const resp = await axios_1.default.post(apiPath, form, {
54
+ headers: {
55
+ 'Cache-Control': 'no-cache'
56
+ }
57
+ });
58
+ const tokenInfo = resp.data;
59
+ tokenInfo.partitionKey = partitionKey;
60
+ tokenInfo.rowKey = rowKey;
61
+ const tableClient = await this.getTableClient();
62
+ await tableClient.updateEntity(tokenInfo);
63
+ return tokenInfo;
64
+ }
65
+ async createManagementSdkClient() {
66
+ if (!this._mgmtApiClient) {
67
+ const config = this.testConfig.getConfig();
68
+ const authToken = await this.getAuthorizationToken();
69
+ const mgmtOpt = {
70
+ token: authToken.access_token,
71
+ baseUrl: config.managementApiBaseUrl,
72
+ refresh_token: authToken.refresh_token
73
+ // duration and retryCount are optional and will be undefined
74
+ };
75
+ this._mgmtApiClient = new clientInstance_1.ClientInstance(mgmtOpt);
76
+ }
77
+ return {
78
+ apiClient: this._mgmtApiClient,
79
+ guid: this.testConfig.getConfig().guid
80
+ };
81
+ }
82
+ }
83
+ exports.ApiClientConfig = ApiClientConfig;
84
+ //# sourceMappingURL=apiClient.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiClient.config.js","sourceRoot":"","sources":["../../../src/tests/config/apiClient.config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,24 @@
1
+ export interface TestConfig {
2
+ guid: string;
3
+ apiKeyFetch: string;
4
+ apiKeyPreview: string;
5
+ websiteName: string;
6
+ securityKey: string;
7
+ contentServerBaseUrl: string;
8
+ fetchApiBaseUrl: string;
9
+ directFetchApiBaseUrl: string;
10
+ managementApiBaseUrl: string;
11
+ }
12
+ export declare class TestConfiguration {
13
+ private static instance;
14
+ private config;
15
+ private constructor();
16
+ static getInstance(): TestConfiguration;
17
+ private loadConfig;
18
+ getConfig(): TestConfig;
19
+ getAzureConfig(): {
20
+ storageAccount: string;
21
+ storageAccountKey: string;
22
+ storageAccountTable: string;
23
+ };
24
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TestConfiguration = void 0;
7
+ const dotenv_1 = __importDefault(require("dotenv"));
8
+ // Load environment variables from .env file
9
+ dotenv_1.default.config();
10
+ class TestConfiguration {
11
+ constructor() {
12
+ const env = process.env.TEST_ENV || 'dev';
13
+ this.config = this.loadConfig(env);
14
+ }
15
+ static getInstance() {
16
+ if (!TestConfiguration.instance) {
17
+ TestConfiguration.instance = new TestConfiguration();
18
+ }
19
+ return TestConfiguration.instance;
20
+ }
21
+ loadConfig(env) {
22
+ const prefix = env.toUpperCase().replace(/-/g, '_');
23
+ return {
24
+ guid: process.env[`${prefix}_GUID`] || '',
25
+ apiKeyFetch: process.env[`${prefix}_API_KEY_FETCH`] || '',
26
+ apiKeyPreview: process.env[`${prefix}_API_KEY_PREVIEW`] || '',
27
+ websiteName: process.env[`${prefix}_WEBSITE_NAME`] || '',
28
+ securityKey: process.env[`${prefix}_SECURITY_KEY`] || '',
29
+ contentServerBaseUrl: process.env[`${prefix}_CONTENT_SERVER_BASE_URL`] || '',
30
+ fetchApiBaseUrl: process.env[`${prefix}_FETCH_API_BASE_URL`] || '',
31
+ directFetchApiBaseUrl: process.env[`${prefix}_DIRECT_FETCH_API_BASE_URL`] || '',
32
+ managementApiBaseUrl: process.env[`${prefix}_MANAGEMENT_API_BASE_URL`] || ''
33
+ };
34
+ }
35
+ getConfig() {
36
+ return this.config;
37
+ }
38
+ getAzureConfig() {
39
+ return {
40
+ storageAccount: process.env.STORAGE_ACCOUNT || '',
41
+ storageAccountKey: process.env.STORAGE_ACCOUNT_KEY || '',
42
+ storageAccountTable: process.env.STORAGE_ACCOUNT_TABLE || ''
43
+ };
44
+ }
45
+ }
46
+ exports.TestConfiguration = TestConfiguration;
47
+ //# sourceMappingURL=test.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.config.js","sourceRoot":"","sources":["../../../src/tests/config/test.config.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,4CAA4C;AAC5C,gBAAM,CAAC,MAAM,EAAE,CAAC;AAchB,MAAa,iBAAiB;IAI1B;QACI,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAEM,MAAM,CAAC,WAAW;QACrB,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;YAC9B,iBAAiB,CAAC,QAAQ,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACzD,CAAC;QACD,OAAO,iBAAiB,CAAC,QAAQ,CAAC;IACtC,CAAC;IAEO,UAAU,CAAC,GAAW;QAC1B,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAEpD,OAAO;YACH,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;YACzC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE;YACzD,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,kBAAkB,CAAC,IAAI,EAAE;YAC7D,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE;YACxD,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE;YACxD,oBAAoB,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE;YAC5E,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,qBAAqB,CAAC,IAAI,EAAE;YAClE,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,4BAA4B,CAAC,IAAI,EAAE;YAC/E,oBAAoB,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE;SAC/E,CAAC;IACN,CAAC;IAEM,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,cAAc;QACjB,OAAO;YACH,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE;YACjD,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YACxD,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE;SAC/D,CAAC;IACN,CAAC;CACJ;AA3CD,8CA2CC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents a generic success or informational message returned by the API.
3
+ */
4
+ export interface ApiResponseMessage {
5
+ message: string;
6
+ }
7
+ /**
8
+ * Represents the typical response structure for DELETE operations, often empty or just a status.
9
+ * For simplicity, we can often expect an empty object or potentially a simple message.
10
+ */
11
+ export interface DeleteResponse {
12
+ message?: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=apiResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiResponse.js","sourceRoot":"","sources":["../../src/types/apiResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface assetContainer {
2
+ containerID: number | null;
3
+ isDefault: boolean;
4
+ containerName: string | null;
5
+ originUrl: string | null;
6
+ edgeUrl: string | null;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=assetContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetContainer.js","sourceRoot":"","sources":["../../src/types/assetContainer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { assetMediaGrouping } from "./assetMediaGrouping";
2
+ export interface assetGalleries {
3
+ totalCount: number | null;
4
+ assetMediaGroupings: (assetMediaGrouping | null)[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=assetGalleries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetGalleries.js","sourceRoot":"","sources":["../../src/types/assetGalleries.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { AssetGroupingType } from "../enums/assetGroupingType";
2
+ import { assetMediaGroupingMetaData } from "./assetMediaGroupingMetaData";
3
+ export interface assetMediaGrouping {
4
+ mediaGroupingID: number | null;
5
+ groupingType: AssetGroupingType | null;
6
+ groupingTypeID: number | null;
7
+ name: string | null;
8
+ description: string | null;
9
+ modifiedBy: number | null;
10
+ modifiedByName: string | null;
11
+ modifiedOn: string | null;
12
+ isDeleted: boolean;
13
+ isFolder: boolean;
14
+ metaData: {
15
+ [key: string]: assetMediaGroupingMetaData;
16
+ };
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=assetMediaGrouping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetMediaGrouping.js","sourceRoot":"","sources":["../../src/types/assetMediaGrouping.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface assetMediaGroupingMetaData {
2
+ key: string;
3
+ value: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=assetMediaGroupingMetaData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetMediaGroupingMetaData.js","sourceRoot":"","sources":["../../src/types/assetMediaGroupingMetaData.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import { BatchState } from "../enums/batchState";
2
+ import { BatchOperationType } from "../enums/batchOperationType";
3
+ import { BatchItem } from "./batchItem";
4
+ export interface Batch {
5
+ batchID: number | null;
6
+ batchItemID: number | null;
7
+ batchName: string;
8
+ batchState: BatchState;
9
+ operationType: BatchOperationType;
10
+ ownerUserID: number | null;
11
+ createdDate: string;
12
+ modifiedDate: string;
13
+ processDate: string | null;
14
+ queueDate: string | null;
15
+ isPrivate: boolean;
16
+ modifiedByUserID: number;
17
+ queuedByUserID: number | null;
18
+ ownerName: string;
19
+ modifiedByName: string;
20
+ queuedByName: string;
21
+ additionalData: string;
22
+ errorData: string;
23
+ percentComplete: number | null;
24
+ numItemsProcessed: number | null;
25
+ abortYN: boolean | null;
26
+ statusMessage: string;
27
+ batchItemCount: number;
28
+ items: BatchItem[];
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=batch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/types/batch.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export interface BatchItem {
2
+ batchItemID: number | null;
3
+ batchID: number | null;
4
+ itemTypeName: string;
5
+ itemID: number;
6
+ languageCode: string;
7
+ processedItemVersionID: number | null;
8
+ itemTitle: string;
9
+ itemNull: boolean;
10
+ createdOn: string;
11
+ createdBy: number;
12
+ createdByName: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=batchItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batchItem.js","sourceRoot":"","sources":["../../src/types/batchItem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { ContentViewColumn } from "./contentViewColumn";
2
+ export interface Container {
3
+ columns: ContentViewColumn[];
4
+ contentViewID: number | null;
5
+ contentDefinitionID: number | null;
6
+ contentDefinitionName: string | null;
7
+ referenceName: string | null;
8
+ contentViewName: string | null;
9
+ contentDefinitionType: number;
10
+ requiresApproval: boolean | null;
11
+ lastModifiedDate: string | null;
12
+ lastModifiedOn: string | null;
13
+ lastModifiedBy: string | null;
14
+ isShared: boolean | null;
15
+ isDynamicPageList: boolean | null;
16
+ disablePublishFromList: boolean | null;
17
+ contentViewCategoryID: number | null;
18
+ contentViewCategoryReferenceName: string | null;
19
+ contentViewCategoryName: string | null;
20
+ title: string | null;
21
+ defaultPage: string | null;
22
+ isPublished: boolean | null;
23
+ schemaTitle: string | null;
24
+ allowClientSideSave: boolean | null;
25
+ defaultSortColumn: string | null;
26
+ defaultSortDirection: string | null;
27
+ usageCount: number | null;
28
+ isDeleted: boolean | null;
29
+ enableRSSOutput: boolean | null;
30
+ enableAPIOutput: boolean | null;
31
+ commentsRecordTypeName: string | null;
32
+ numRowsInListing: number | null;
33
+ contentDefinitionTypeID: number | null;
34
+ fullSyncModDate: string | null;
35
+ confirmSharingOnPublish: boolean | null;
36
+ contentTemplateName: string | null;
37
+ currentUserCanDelete: boolean | null;
38
+ currentUserCanEdit: boolean | null;
39
+ currentUserCanDesign: boolean | null;
40
+ currentUserCanManage: boolean | null;
41
+ currentUserCanContribute: boolean | null;
42
+ currentUserCanPublish: boolean | null;
43
+ defaultListingPage: string | null;
44
+ defaultDetailsPage: string | null;
45
+ defaultDetailsPageQueryString: string;
46
+ isListItem: boolean | null;
47
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/types/container.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ export interface ContentItem {
2
+ contentID: number;
3
+ properties: ContentItemProperties;
4
+ fields: {
5
+ [key: string]: any;
6
+ };
7
+ seo: SeoProperties | null;
8
+ scripts: ContentScripts | null;
9
+ }
10
+ export interface ContentItemProperties {
11
+ state: number | null;
12
+ modifiedBy: number | null;
13
+ modified: string | null;
14
+ pullDate: string | null;
15
+ releaseDate: string | null;
16
+ versionID: number | null;
17
+ referenceName: string | null;
18
+ definitionName: string | null;
19
+ itemOrder: number | null;
20
+ }
21
+ export interface SeoProperties {
22
+ metaDescription: string | null;
23
+ metaKeywords: string | null;
24
+ metaHTML: string | null;
25
+ menuVisible: boolean | null;
26
+ sitemapVisible: boolean | null;
27
+ }
28
+ export interface ContentScripts {
29
+ top: string | null;
30
+ bottom: string | null;
31
+ }
32
+ export interface ContentList {
33
+ recordOffset: number | null;
34
+ totalCount: number | null;
35
+ pageSize: number | null;
36
+ items: any[] | null;
37
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contentItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentItem.js","sourceRoot":"","sources":["../../src/types/contentItem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface ContentItemHistoryResponse {
2
+ items: ContentItemHistory[];
3
+ totalCount: number;
4
+ }
5
+ export interface ContentItemHistory {
6
+ contentItemID: number;
7
+ stateID: number;
8
+ state: string | null;
9
+ createdDate: string;
10
+ createdBy: string | null;
11
+ createdByUserID: number;
12
+ createdByServerUserID: number;
13
+ createdByUserEmail: string | null;
14
+ releaseDate: string;
15
+ pullDate: string;
16
+ commentID: number;
17
+ comment: string | null;
18
+ pinned: boolean;
19
+ versionNumber: number;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contentItemHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentItemHistory.js","sourceRoot":"","sources":["../../src/types/contentItemHistory.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ export interface ContentListFilterModel {
2
+ sortIDs: number[];
3
+ modifiedByIds: number[];
4
+ dateRange: DateRangeFilter | null;
5
+ stateIds: number[];
6
+ fieldFilters: FieldFilter[];
7
+ genericSearch: string;
8
+ }
9
+ export interface DateRangeFilter {
10
+ startDate: string | null;
11
+ endDate: string | null;
12
+ }
13
+ export interface NumRangeFilter {
14
+ fromNum: number;
15
+ toNum: number;
16
+ }
17
+ export interface FieldFilterValue {
18
+ stringValue: string | null;
19
+ dateRangeValue: DateRangeFilter | null;
20
+ numRangeValue: NumRangeFilter | null;
21
+ boolValue: boolean | null;
22
+ }
23
+ export interface FieldFilter {
24
+ field: string | null;
25
+ value: FieldFilterValue | null;
26
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contentListFilterModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentListFilterModel.js","sourceRoot":"","sources":["../../src/types/contentListFilterModel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface ContentSectionDefaultModule {
2
+ title: string | null;
3
+ pageItemTemplateDefaultModuleID: number | null;
4
+ contentDefinitionID: number | null;
5
+ pageItemTemplateID: number | null;
6
+ autoCreate: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contentSectionDefaultModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentSectionDefaultModule.js","sourceRoot":"","sources":["../../src/types/contentSectionDefaultModule.ts"],"names":[],"mappings":""}