@agility/management-sdk 0.1.32 → 0.1.34
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/.cursor/api-coverage.md +217 -0
- package/.cursor/api-documentation-manifest.md +275 -0
- package/.cursor/api-functions-analysis.md +111 -0
- package/.cursor/breakout-manifest.md +278 -0
- package/.cursor/docs-final-check.md +269 -0
- package/.cursor/github-actions-improvements.md +76 -0
- package/.cursor/hardening.md +271 -0
- package/.cursor/linting-fix.md +160 -0
- package/.cursor/manifest.md +243 -0
- package/.cursor/mocks.md +100 -0
- package/.cursor/test-coverage.md +841 -0
- package/.env +92 -0
- package/README.md +87 -315
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-summary.json +43 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +161 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/apiClient.ts.html +199 -0
- package/coverage/lcov-report/src/apiMethods/assetMethods.ts.html +682 -0
- package/coverage/lcov-report/src/apiMethods/batchMethods.ts.html +736 -0
- package/coverage/lcov-report/src/apiMethods/clientInstance.ts.html +403 -0
- package/coverage/lcov-report/src/apiMethods/containerMethods.ts.html +460 -0
- package/coverage/lcov-report/src/apiMethods/contentMethods.ts.html +1183 -0
- package/coverage/lcov-report/src/apiMethods/index.html +266 -0
- package/coverage/lcov-report/src/apiMethods/instanceMethods.ts.html +160 -0
- package/coverage/lcov-report/src/apiMethods/instanceUserMethods.ts.html +268 -0
- package/coverage/lcov-report/src/apiMethods/modelMethods.ts.html +352 -0
- package/coverage/lcov-report/src/apiMethods/pageMethods.ts.html +1276 -0
- package/coverage/lcov-report/src/apiMethods/serverUserMethods.ts.html +196 -0
- package/coverage/lcov-report/src/apiMethods/webhookMethods.ts.html +271 -0
- package/coverage/lcov-report/src/enums/batchItemType.ts.html +106 -0
- package/coverage/lcov-report/src/enums/batchOperationType.ts.html +142 -0
- package/coverage/lcov-report/src/enums/batchState..ts.html +106 -0
- package/coverage/lcov-report/src/enums/index.html +161 -0
- package/coverage/lcov-report/src/enums/workflowOperationType.ts.html +175 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/models/assetContainer.ts.html +106 -0
- package/coverage/lcov-report/src/models/assetGalleries.ts.html +103 -0
- package/coverage/lcov-report/src/models/assetMediaGrouping.ts.html +136 -0
- package/coverage/lcov-report/src/models/assetMediaGroupingMetaData.ts.html +97 -0
- package/coverage/lcov-report/src/models/batch.ts.html +178 -0
- package/coverage/lcov-report/src/models/batchItem.ts.html +127 -0
- package/coverage/lcov-report/src/models/container.ts.html +232 -0
- package/coverage/lcov-report/src/models/contentDefinitionTypeID.ts.html +142 -0
- package/coverage/lcov-report/src/models/contentItem.ts.html +202 -0
- package/coverage/lcov-report/src/models/contentSectionDefaultModule.ts.html +106 -0
- package/coverage/lcov-report/src/models/contentSectionDefinition.ts.html +196 -0
- package/coverage/lcov-report/src/models/contentViewColumn.ts.html +109 -0
- package/coverage/lcov-report/src/models/exception.ts.html +109 -0
- package/coverage/lcov-report/src/models/index.html +476 -0
- package/coverage/lcov-report/src/models/instanceRole.ts.html +106 -0
- package/coverage/lcov-report/src/models/instanceUser.ts.html +130 -0
- package/coverage/lcov-report/src/models/locales.ts.html +100 -0
- package/coverage/lcov-report/src/models/media.ts.html +178 -0
- package/coverage/lcov-report/src/models/model.ts.html +172 -0
- package/coverage/lcov-report/src/models/notification.ts.html +124 -0
- package/coverage/lcov-report/src/models/options.ts.html +109 -0
- package/coverage/lcov-report/src/models/pageItem.ts.html +268 -0
- package/coverage/lcov-report/src/models/pageModel.ts.html +130 -0
- package/coverage/lcov-report/src/models/sharedModule.ts.html +106 -0
- package/coverage/lcov-report/src/models/sitemap.ts.html +148 -0
- package/coverage/lcov-report/src/models/websiteUser.ts.html +157 -0
- package/coverage/lcov.info +1459 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/src/apiClient.ts.html +199 -0
- package/coverage/src/apiMethods/assetMethods.ts.html +682 -0
- package/coverage/src/apiMethods/batchMethods.ts.html +736 -0
- package/coverage/src/apiMethods/clientInstance.ts.html +403 -0
- package/coverage/src/apiMethods/containerMethods.ts.html +460 -0
- package/coverage/src/apiMethods/contentMethods.ts.html +1183 -0
- package/coverage/src/apiMethods/index.html +266 -0
- package/coverage/src/apiMethods/instanceMethods.ts.html +160 -0
- package/coverage/src/apiMethods/instanceUserMethods.ts.html +268 -0
- package/coverage/src/apiMethods/modelMethods.ts.html +352 -0
- package/coverage/src/apiMethods/pageMethods.ts.html +1276 -0
- package/coverage/src/apiMethods/serverUserMethods.ts.html +196 -0
- package/coverage/src/apiMethods/webhookMethods.ts.html +271 -0
- package/coverage/src/enums/batchItemType.ts.html +106 -0
- package/coverage/src/enums/batchOperationType.ts.html +142 -0
- package/coverage/src/enums/batchState..ts.html +106 -0
- package/coverage/src/enums/index.html +161 -0
- package/coverage/src/enums/workflowOperationType.ts.html +175 -0
- package/coverage/src/index.html +116 -0
- package/coverage/src/models/assetContainer.ts.html +106 -0
- package/coverage/src/models/assetGalleries.ts.html +103 -0
- package/coverage/src/models/assetMediaGrouping.ts.html +136 -0
- package/coverage/src/models/assetMediaGroupingMetaData.ts.html +97 -0
- package/coverage/src/models/batch.ts.html +178 -0
- package/coverage/src/models/batchItem.ts.html +127 -0
- package/coverage/src/models/container.ts.html +232 -0
- package/coverage/src/models/contentDefinitionTypeID.ts.html +142 -0
- package/coverage/src/models/contentItem.ts.html +202 -0
- package/coverage/src/models/contentSectionDefaultModule.ts.html +106 -0
- package/coverage/src/models/contentSectionDefinition.ts.html +196 -0
- package/coverage/src/models/contentViewColumn.ts.html +109 -0
- package/coverage/src/models/exception.ts.html +109 -0
- package/coverage/src/models/index.html +476 -0
- package/coverage/src/models/instanceRole.ts.html +106 -0
- package/coverage/src/models/instanceUser.ts.html +130 -0
- package/coverage/src/models/locales.ts.html +100 -0
- package/coverage/src/models/media.ts.html +178 -0
- package/coverage/src/models/model.ts.html +172 -0
- package/coverage/src/models/notification.ts.html +124 -0
- package/coverage/src/models/options.ts.html +109 -0
- package/coverage/src/models/pageItem.ts.html +268 -0
- package/coverage/src/models/pageModel.ts.html +130 -0
- package/coverage/src/models/sharedModule.ts.html +106 -0
- package/coverage/src/models/sitemap.ts.html +148 -0
- package/coverage/src/models/websiteUser.ts.html +157 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/apiClient.d.ts.map +1 -0
- package/dist/apiClient.js.map +1 -0
- package/dist/apiMethods/assetMethods.d.ts.map +1 -0
- package/dist/apiMethods/assetMethods.js +38 -38
- package/dist/apiMethods/assetMethods.js.map +1 -0
- package/dist/apiMethods/batchMethods.d.ts.map +1 -0
- package/dist/apiMethods/batchMethods.js +33 -33
- package/dist/apiMethods/batchMethods.js.map +1 -0
- package/dist/apiMethods/clientInstance.d.ts.map +1 -0
- package/dist/apiMethods/clientInstance.js +18 -15
- package/dist/apiMethods/clientInstance.js.map +1 -0
- package/dist/apiMethods/containerMethods.d.ts.map +1 -0
- package/dist/apiMethods/containerMethods.js +20 -20
- package/dist/apiMethods/containerMethods.js.map +1 -0
- package/dist/apiMethods/contentMethods.d.ts.map +1 -0
- package/dist/apiMethods/contentMethods.js +68 -68
- package/dist/apiMethods/contentMethods.js.map +1 -0
- package/dist/apiMethods/instanceMethods.d.ts.map +1 -0
- package/dist/apiMethods/instanceMethods.js +3 -3
- package/dist/apiMethods/instanceMethods.js.map +1 -0
- package/dist/apiMethods/instanceUserMethods.d.ts.map +1 -0
- package/dist/apiMethods/instanceUserMethods.js +10 -10
- package/dist/apiMethods/instanceUserMethods.js.map +1 -0
- package/dist/apiMethods/modelMethods.d.ts.map +1 -0
- package/dist/apiMethods/modelMethods.js +13 -13
- package/dist/apiMethods/modelMethods.js.map +1 -0
- package/dist/apiMethods/pageMethods.d.ts +2 -1
- package/dist/apiMethods/pageMethods.d.ts.map +1 -0
- package/dist/apiMethods/pageMethods.js +79 -73
- package/dist/apiMethods/pageMethods.js.map +1 -0
- package/dist/apiMethods/serverUserMethods.d.ts.map +1 -0
- package/dist/apiMethods/serverUserMethods.js +4 -4
- package/dist/apiMethods/serverUserMethods.js.map +1 -0
- package/dist/apiMethods/webhookMethods.d.ts.map +1 -0
- package/dist/apiMethods/webhookMethods.js +11 -11
- package/dist/apiMethods/webhookMethods.js.map +1 -0
- package/dist/enums/assetGroupingType.d.ts.map +1 -0
- package/dist/enums/assetGroupingType.js +1 -1
- package/dist/enums/assetGroupingType.js.map +1 -0
- package/dist/enums/batchItemType.d.ts.map +1 -0
- package/dist/enums/batchItemType.js +1 -1
- package/dist/enums/batchItemType.js.map +1 -0
- package/dist/enums/batchOperationType.d.ts.map +1 -0
- package/dist/enums/batchOperationType.js +1 -1
- package/dist/enums/batchOperationType.js.map +1 -0
- package/dist/enums/batchState..d.ts.map +1 -0
- package/dist/enums/batchState..js +1 -1
- package/dist/enums/batchState..js.map +1 -0
- package/dist/enums/pageItemTemplateType.d.ts.map +1 -0
- package/dist/enums/pageItemTemplateType.js +1 -1
- package/dist/enums/pageItemTemplateType.js.map +1 -0
- package/dist/enums/workflowOperationType.d.ts.map +1 -0
- package/dist/enums/workflowOperationType.js +1 -1
- package/dist/enums/workflowOperationType.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -0
- package/dist/models/assetContainer.d.ts.map +1 -0
- package/dist/models/assetContainer.js.map +1 -0
- package/dist/models/assetGalleries.d.ts.map +1 -0
- package/dist/models/assetGalleries.js.map +1 -0
- package/dist/models/assetMediaGrouping.d.ts.map +1 -0
- package/dist/models/assetMediaGrouping.js.map +1 -0
- package/dist/models/assetMediaGroupingMetaData.d.ts.map +1 -0
- package/dist/models/assetMediaGroupingMetaData.js.map +1 -0
- package/dist/models/batch.d.ts.map +1 -0
- package/dist/models/batch.js.map +1 -0
- package/dist/models/batchItem.d.ts.map +1 -0
- package/dist/models/batchItem.js.map +1 -0
- package/dist/models/batchTypes.d.ts.map +1 -0
- package/dist/models/batchTypes.js.map +1 -0
- package/dist/models/container.d.ts.map +1 -0
- package/dist/models/container.js.map +1 -0
- package/dist/models/contentDefinitionTypeID.d.ts.map +1 -0
- package/dist/models/contentDefinitionTypeID.js +1 -1
- package/dist/models/contentDefinitionTypeID.js.map +1 -0
- package/dist/models/contentItem.d.ts.map +1 -0
- package/dist/models/contentItem.js.map +1 -0
- package/dist/models/contentItemHistory.d.ts.map +1 -0
- package/dist/models/contentItemHistory.js.map +1 -0
- package/dist/models/contentListFilterModel.d.ts.map +1 -0
- package/dist/models/contentListFilterModel.js.map +1 -0
- package/dist/models/contentSectionDefaultModule.d.ts.map +1 -0
- package/dist/models/contentSectionDefaultModule.js.map +1 -0
- package/dist/models/contentSectionDefinition.d.ts.map +1 -0
- package/dist/models/contentSectionDefinition.js.map +1 -0
- package/dist/models/contentViewColumn.d.ts.map +1 -0
- package/dist/models/contentViewColumn.js.map +1 -0
- package/dist/models/exception.d.ts.map +1 -0
- package/dist/models/exception.js +2 -0
- package/dist/models/exception.js.map +1 -0
- package/dist/models/instanceRole.d.ts.map +1 -0
- package/dist/models/instanceRole.js.map +1 -0
- package/dist/models/instanceUser.d.ts.map +1 -0
- package/dist/models/instanceUser.js.map +1 -0
- package/dist/models/itemComments.d.ts.map +1 -0
- package/dist/models/itemComments.js.map +1 -0
- package/dist/models/listParams.d.ts.map +1 -0
- package/dist/models/listParams.js.map +1 -0
- package/dist/models/locales.d.ts.map +1 -0
- package/dist/models/locales.js +2 -0
- package/dist/models/locales.js.map +1 -0
- package/dist/models/media.d.ts.map +1 -0
- package/dist/models/media.js.map +1 -0
- package/dist/models/model.d.ts.map +1 -0
- package/dist/models/model.js.map +1 -0
- package/dist/models/notification.d.ts.map +1 -0
- package/dist/models/notification.js.map +1 -0
- package/dist/models/options.d.ts.map +1 -0
- package/dist/models/options.js.map +1 -0
- package/dist/models/pageHistory.d.ts.map +1 -0
- package/dist/models/pageHistory.js.map +1 -0
- package/dist/models/pageItem.d.ts.map +1 -0
- package/dist/models/pageItem.js.map +1 -0
- package/dist/models/pageModel.d.ts.map +1 -0
- package/dist/models/pageModel.js.map +1 -0
- package/dist/models/serverUser.d.ts.map +1 -0
- package/dist/models/serverUser.js.map +1 -0
- package/dist/models/sharedModule.d.ts.map +1 -0
- package/dist/models/sharedModule.js.map +1 -0
- package/dist/models/sitemap.d.ts.map +1 -0
- package/dist/models/sitemap.js.map +1 -0
- package/dist/models/webhook.d.ts.map +1 -0
- package/dist/models/webhook.js.map +1 -0
- package/dist/models/websiteListing.d.ts.map +1 -0
- package/dist/models/websiteListing.js.map +1 -0
- package/dist/models/websiteUser.d.ts.map +1 -0
- package/dist/models/websiteUser.js.map +1 -0
- package/docs/asset-methods.md +382 -0
- package/docs/auth-component.md +361 -0
- package/docs/auth.md +594 -0
- package/docs/batch-methods.md +244 -0
- package/docs/cicd.md +607 -0
- package/docs/container-methods.md +268 -0
- package/docs/content-methods.md +423 -0
- package/docs/instance-methods.md +105 -0
- package/docs/instance-user-methods.md +231 -0
- package/docs/model-methods.md +434 -0
- package/docs/multi-instance-operations.md +192 -0
- package/docs/page-methods.md +671 -0
- package/docs/server-user-methods.md +280 -0
- package/docs/webhook-methods.md +452 -0
- package/package.json +1 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# API Methods Test Coverage Report
|
|
2
|
+
|
|
3
|
+
## 🎯 **Current Status: 146/146 Tests Passing (100%) 🎉**
|
|
4
|
+
|
|
5
|
+
### 📊 **Coverage Summary**
|
|
6
|
+
|
|
7
|
+
| API Method Class | Unit Tests | Integration Tests | Status | Methods Covered |
|
|
8
|
+
|------------------|------------|-------------------|--------|-----------------|
|
|
9
|
+
| **ModelMethods** | ✅ 16/16 | ✅ Diagnostic | **COMPLETE** | 6/6 methods |
|
|
10
|
+
| **AssetMethods** | ✅ 24/24 | ✅ Gallery Tests | **COMPLETE** | 15/15 methods |
|
|
11
|
+
| **ContainerMethods** | ✅ 16/16 | ✅ Diagnostic | **COMPLETE** | 8/8 methods |
|
|
12
|
+
| **WebhookMethods** | ✅ 14/14 | ❌ None | **UNIT ONLY** | 4/4 methods |
|
|
13
|
+
| **BatchMethods** | ✅ 19/19 | ❌ None | **UNIT ONLY** | 7/7 methods |
|
|
14
|
+
| **InstanceUserMethods** | ✅ 12/12 | ❌ None | **UNIT ONLY** | 3/3 methods |
|
|
15
|
+
| **ServerUserMethods** | ✅ 12/12 | ❌ None | **UNIT ONLY** | 2/2 methods |
|
|
16
|
+
| **InstanceMethods** | ❌ None | ✅ Basic Auth | **INTEGRATION ONLY** | 1/1 methods |
|
|
17
|
+
| **ContentMethods** | 🔄 Disabled | ✅ Basic Tests | **PARTIAL** | ~15 methods |
|
|
18
|
+
| **PageMethods** | 🔄 Disabled | ❌ None | **PARTIAL** | ~20 methods |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ✅ **FULLY COVERED (3/10 classes)**
|
|
23
|
+
|
|
24
|
+
### 🏆 **ModelMethods** - Content Model Operations
|
|
25
|
+
**Unit Tests: 16/16 ✅ | Integration: Diagnostic ✅**
|
|
26
|
+
- `getContentModel(id, guid)` - Retrieve model by ID
|
|
27
|
+
- `getModelByReferenceName(name, guid)` - Retrieve by reference name
|
|
28
|
+
- `getContentModules(includeDefaults, guid, includeModules)` - Get content modules
|
|
29
|
+
- `getPageModules(includeDefault, guid)` - Get page modules
|
|
30
|
+
- `saveModel(model, guid)` - Create/update model
|
|
31
|
+
- `deleteModel(id, guid)` - Delete model
|
|
32
|
+
|
|
33
|
+
### 🏆 **AssetMethods** - Asset & Gallery Management
|
|
34
|
+
**Unit Tests: 24/24 ✅ | Integration: Gallery Tests ✅**
|
|
35
|
+
- **Gallery Operations:**
|
|
36
|
+
- `getGalleries(guid, search?, pageSize?, rowIndex?)` - List galleries
|
|
37
|
+
- `getGalleryById(guid, id)` - Get gallery by ID
|
|
38
|
+
- `getGalleryByName(guid, name)` - Get gallery by name
|
|
39
|
+
- `saveGallery(guid, gallery)` - Create/update gallery
|
|
40
|
+
- `deleteGallery(guid, id)` - Delete gallery
|
|
41
|
+
- **Asset Operations:**
|
|
42
|
+
- `getMediaList(pageSize, recordOffset, guid)` - List assets
|
|
43
|
+
- `getAssetByID(mediaID, guid)` - Get asset by ID
|
|
44
|
+
- `getAssetByUrl(url, guid)` - Get asset by URL
|
|
45
|
+
- `deleteFile(mediaID, guid)` - Delete asset
|
|
46
|
+
- `moveFile(mediaID, newFolder, guid)` - Move asset
|
|
47
|
+
- **Folder Operations:**
|
|
48
|
+
- `createFolder(originKey, guid)` - Create folder
|
|
49
|
+
- `renameFolder(folderName, newFolderName, guid, mediaID)` - Rename folder
|
|
50
|
+
- `deleteFolder(originKey, guid, mediaID)` - Delete folder
|
|
51
|
+
- **File Operations:**
|
|
52
|
+
- `upload(formData, agilityFolderPath, guid, groupingID)` - Upload files
|
|
53
|
+
- **Container Operations:**
|
|
54
|
+
- `getDefaultContainer(guid)` - Get default container
|
|
55
|
+
|
|
56
|
+
### 🏆 **ContainerMethods** - Container Management
|
|
57
|
+
**Unit Tests: 16/16 ✅ | Integration: Diagnostic ✅**
|
|
58
|
+
- `getContainerList(guid)` - List all containers
|
|
59
|
+
- `getContainerByID(id, guid)` - Get container by ID
|
|
60
|
+
- `getContainerByReferenceName(name, guid)` - Get by reference name (returns null for 404)
|
|
61
|
+
- `getContainersByModel(modelId, guid)` - Get containers by model
|
|
62
|
+
- `getContainerSecurity(id, guid)` - Get container security
|
|
63
|
+
- `getNotificationList(id, guid)` - Get container notifications
|
|
64
|
+
- `saveContainer(container, guid, forceReferenceName?)` - Create/update container
|
|
65
|
+
- `deleteContainer(id, guid)` - Delete container
|
|
66
|
+
|
|
67
|
+
### 🏆 **WebhookMethods** - Webhook Operations
|
|
68
|
+
**Unit Tests: 14/14 ✅ | Integration: None**
|
|
69
|
+
- `webhookList(guid, take?, token?)` - List webhooks
|
|
70
|
+
- `getWebhook(guid, webhookID)` - Get webhook by ID
|
|
71
|
+
- `saveWebhook(guid, webhook)` - Create/update webhook
|
|
72
|
+
- `deleteWebhook(guid, webhookID)` - Delete webhook
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 🔄 **UNIT ONLY COVERED (4/10 classes)**
|
|
77
|
+
|
|
78
|
+
### ⚡ **BatchMethods** - Batch Processing
|
|
79
|
+
**Unit Tests: 19/19 ✅ | Integration: None**
|
|
80
|
+
- `getBatch(batchID, guid, expandItems?)` - Get batch by ID
|
|
81
|
+
- `publishBatch(batchID, guid, returnBatchId?)` - Publish batch
|
|
82
|
+
- `unpublishBatch(batchID, guid, returnBatchId?)` - Unpublish batch
|
|
83
|
+
- `approveBatch(batchID, guid, returnBatchId?)` - Approve batch
|
|
84
|
+
- `declineBatch(batchID, guid, returnBatchId?)` - Decline batch
|
|
85
|
+
- `requestApprovalBatch(batchID, guid, returnBatchId?)` - Request approval
|
|
86
|
+
- `getBatchTypes(guid)` - Get batch enum types
|
|
87
|
+
|
|
88
|
+
### ⚡ **InstanceUserMethods** - User Management
|
|
89
|
+
**Unit Tests: 12/12 ✅ | Integration: None**
|
|
90
|
+
- `getUsers(guid)` - Get instance users
|
|
91
|
+
- `saveUser(emailAddress, roles, guid, firstName?, lastName?)` - Create/update user
|
|
92
|
+
- `deleteUser(userId, guid)` - Delete user
|
|
93
|
+
|
|
94
|
+
### ⚡ **ServerUserMethods** - Server User Operations
|
|
95
|
+
**Unit Tests: 12/12 ✅ | Integration: None**
|
|
96
|
+
- `me(guid)` - Get current user info
|
|
97
|
+
- `you(guid, serverUserID)` - Get specific user info
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 🔄 **PARTIALLY COVERED (2/10 classes)**
|
|
102
|
+
|
|
103
|
+
### ⚠️ **ContentMethods** - Content Item Operations
|
|
104
|
+
**Unit Tests: Disabled 🔄 | Integration: Basic ✅**
|
|
105
|
+
|
|
106
|
+
**Available Methods (~15 methods):**
|
|
107
|
+
- `getContentItem(contentID, guid, locale)` - Get content item
|
|
108
|
+
- `getContentItems(referenceName, guid, locale, listParams)` - Get content list
|
|
109
|
+
- `getContentList(referenceName, guid, locale, listParams, filter?)` - Get filtered content
|
|
110
|
+
- `saveContentItem(contentItem, guid, locale, returnBatchId?)` - Create/update content
|
|
111
|
+
- `saveContentItems(contentItems, guid, locale, returnBatchId?)` - Bulk save
|
|
112
|
+
- `publishContent(contentID, guid, locale, comments?, returnBatchId?)` - Publish content
|
|
113
|
+
- `unPublishContent(contentID, guid, locale, comments?, returnBatchId?)` - Unpublish
|
|
114
|
+
- `approveContent(contentID, guid, locale, comments?, returnBatchId?)` - Approve
|
|
115
|
+
- `declineContent(contentID, guid, locale, comments?, returnBatchId?)` - Decline
|
|
116
|
+
- `contentRequestApproval(contentID, guid, locale, comments?, returnBatchId?)` - Request approval
|
|
117
|
+
- `deleteContent(contentID, guid, locale, comments?, returnBatchId?)` - Delete
|
|
118
|
+
- `getContentHistory(locale, guid, contentID, take?, skip?)` - Get history
|
|
119
|
+
- `getContentComments(locale, guid, contentID, take?, skip?)` - Get comments
|
|
120
|
+
|
|
121
|
+
**Issues:** Most methods require `locale` parameter, complex batch operations with async polling
|
|
122
|
+
|
|
123
|
+
### ⚠️ **PageMethods** - Page Operations
|
|
124
|
+
**Unit Tests: Disabled 🔄 | Integration: None**
|
|
125
|
+
|
|
126
|
+
**Available Methods (~20 methods):**
|
|
127
|
+
- **Page Operations:**
|
|
128
|
+
- `getPage(pageID, guid, locale)` - Get page by ID
|
|
129
|
+
- `savePage(pageItem, guid, locale, parentPageID?, placeBeforePageItemID?, returnBatchId?, pageIDInOtherLocale?, otherLocale?)` - Create/update page
|
|
130
|
+
- `deletePage(pageID, guid, locale, comments?, returnBatchId?)` - Delete page
|
|
131
|
+
- **Page Workflow:**
|
|
132
|
+
- `publishPage(pageID, guid, locale, comments?, returnBatchId?)` - Publish page
|
|
133
|
+
- `unPublishPage(pageID, guid, locale, comments?, returnBatchId?)` - Unpublish
|
|
134
|
+
- `approvePage(pageID, guid, locale, comments?, returnBatchId?)` - Approve
|
|
135
|
+
- `declinePage(pageID, guid, locale, comments?, returnBatchId?)` - Decline
|
|
136
|
+
- `pageRequestApproval(pageID, guid, locale, comments?, returnBatchId?)` - Request approval
|
|
137
|
+
- **Page Templates:**
|
|
138
|
+
- `getPageTemplates(guid, locale, includeModuleZones, searchFilter?)` - List templates
|
|
139
|
+
- `getPageTemplate(guid, locale, pageTemplateId)` - Get template by ID
|
|
140
|
+
- `getPageTemplateName(guid, locale, templateName)` - Get template by name
|
|
141
|
+
- `savePageTemplate(guid, locale, pageModel)` - Create/update template
|
|
142
|
+
- `deletePageTemplate(guid, locale, pageTemplateId)` - Delete template
|
|
143
|
+
- `getPageItemTemplates(guid, locale, id)` - Get page item templates
|
|
144
|
+
- **Other Operations:**
|
|
145
|
+
- `getSitemap(guid, locale)` - Get sitemap
|
|
146
|
+
- `getPageHistory(locale, guid, pageID, take?, skip?)` - Get page history
|
|
147
|
+
- `getPageComments(locale, guid, pageID, take?, skip?)` - Get page comments
|
|
148
|
+
|
|
149
|
+
**Issues:** All methods require `locale` parameter, complex batch operations
|
|
150
|
+
|
|
151
|
+
### ⚠️ **BatchMethods** - Batch Processing
|
|
152
|
+
**Unit Tests: Disabled 🔄 | Integration: None**
|
|
153
|
+
|
|
154
|
+
**Available Methods (~7 methods):**
|
|
155
|
+
- `getBatch(batchID, guid, expandItems?)` - Get batch by ID
|
|
156
|
+
- `publishBatch(batchID, guid, returnBatchId?)` - Publish batch
|
|
157
|
+
- `unpublishBatch(batchID, guid, returnBatchId?)` - Unpublish batch
|
|
158
|
+
- `approveBatch(batchID, guid, returnBatchId?)` - Approve batch
|
|
159
|
+
- `declineBatch(batchID, guid, returnBatchId?)` - Decline batch
|
|
160
|
+
- `requestApprovalBatch(batchID, guid, returnBatchId?)` - Request approval
|
|
161
|
+
- `getBatchTypes(guid)` - Get batch enum types
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## ❌ **NO COVERAGE (3/10 classes)**
|
|
166
|
+
|
|
167
|
+
### 🔴 **InstanceMethods** - Instance Configuration
|
|
168
|
+
**Unit Tests: None | Integration: Basic Auth Only ✅**
|
|
169
|
+
- `getLocales(guid)` - Get available locales *(covered in integration)*
|
|
170
|
+
|
|
171
|
+
### 🔴 **InstanceUserMethods** - User Management
|
|
172
|
+
**Unit Tests: None | Integration: None**
|
|
173
|
+
- `getUsers(guid)` - Get instance users
|
|
174
|
+
- `saveUser(emailAddress, roles, guid, firstName?, lastName?)` - Create/update user
|
|
175
|
+
- `deleteUser(userId, guid)` - Delete user
|
|
176
|
+
|
|
177
|
+
### 🔴 **ServerUserMethods** - Server User Operations
|
|
178
|
+
**Unit Tests: None | Integration: None**
|
|
179
|
+
- `me(guid)` - Get current user info
|
|
180
|
+
- `you(guid, serverUserID)` - Get specific user info
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 🎯 **RECOMMENDATIONS**
|
|
185
|
+
|
|
186
|
+
### **Priority 1: Complete Existing Coverage**
|
|
187
|
+
1. **Fix ContentMethods Unit Tests** - Add `locale` parameters, fix method signatures
|
|
188
|
+
2. **Fix PageMethods Unit Tests** - Add `locale` parameters, remove non-existent methods
|
|
189
|
+
3. **Fix BatchMethods Unit Tests** - Simple fixes, only a few real methods
|
|
190
|
+
|
|
191
|
+
### **Priority 2: Add Missing Coverage**
|
|
192
|
+
1. **InstanceUserMethods** - User management operations
|
|
193
|
+
2. **ServerUserMethods** - Server user operations
|
|
194
|
+
3. **InstanceMethods** - Add unit tests (currently only integration)
|
|
195
|
+
|
|
196
|
+
### **Priority 3: Enhance Integration Coverage**
|
|
197
|
+
1. **WebhookMethods** - Add integration tests
|
|
198
|
+
2. **ContentMethods** - Expand integration tests
|
|
199
|
+
3. **PageMethods** - Add integration tests
|
|
200
|
+
4. **BatchMethods** - Add integration tests
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 📈 **CURRENT METRICS**
|
|
205
|
+
|
|
206
|
+
- **Total API Classes**: 10
|
|
207
|
+
- **Fully Covered Classes**: 3 (30%) - Both unit + integration
|
|
208
|
+
- **Unit Only Covered Classes**: 4 (40%) - Comprehensive unit coverage
|
|
209
|
+
- **Partially Covered Classes**: 2 (20%) - ContentMethods, PageMethods
|
|
210
|
+
- **Integration Only Classes**: 1 (10%) - InstanceMethods
|
|
211
|
+
- **Total Unit Tests**: 113 (100% passing) ⬆️ +43 tests!
|
|
212
|
+
- **Total Integration Tests**: 33 (100% passing)
|
|
213
|
+
- **Overall Test Success Rate**: 146/146 (100%) 🎉 ⬆️ +43 tests!
|
|
214
|
+
|
|
215
|
+
**🚀 Major Achievement**: Added 43 new unit tests covering BatchMethods, InstanceUserMethods, and ServerUserMethods!
|
|
216
|
+
|
|
217
|
+
**Next Goal**: Fix ContentMethods and PageMethods disabled unit test suites to reach 9/10 classes with unit coverage!
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# API Methods Documentation Manifest - Modular Structure
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Comprehensive documentation restructure for all API method classes in `/src/apiMethods/` folder. This manifest organizes the work into a modular documentation system with separate files for each method class, improving navigation and maintainability.
|
|
5
|
+
|
|
6
|
+
## New Documentation Structure
|
|
7
|
+
|
|
8
|
+
### Main README.md
|
|
9
|
+
- **Concise Overview** - Introduction, getting started, authentication
|
|
10
|
+
- **Method Class Index** - Links to individual documentation files
|
|
11
|
+
- **Quick Reference** - Brief description of each method class
|
|
12
|
+
- **Global Examples** - Cross-method workflow examples
|
|
13
|
+
|
|
14
|
+
### Individual Method Documentation (`./docs/`)
|
|
15
|
+
Each method class gets its own documentation file following this structure:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
./docs/
|
|
19
|
+
├── asset-methods.md # AssetMethods - File and media management
|
|
20
|
+
├── batch-methods.md # BatchMethods - Batch workflow operations
|
|
21
|
+
├── container-methods.md # ContainerMethods - Container management
|
|
22
|
+
├── content-methods.md # ContentMethods - Content item operations
|
|
23
|
+
├── instance-methods.md # InstanceMethods - Instance-level operations
|
|
24
|
+
├── instance-user-methods.md # InstanceUserMethods - Instance user management
|
|
25
|
+
├── model-methods.md # ModelMethods - Content model operations
|
|
26
|
+
├── page-methods.md # PageMethods - Page management operations
|
|
27
|
+
├── server-user-methods.md # ServerUserMethods - Server user operations
|
|
28
|
+
└── webhook-methods.md # WebhookMethods - Webhook management
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Individual File Structure Template
|
|
32
|
+
```markdown
|
|
33
|
+
# Agility CMS & Management API TypeScript SDK
|
|
34
|
+
|
|
35
|
+
## [Method Class Name] Methods
|
|
36
|
+
|
|
37
|
+
[Description of the method class and its purpose]
|
|
38
|
+
|
|
39
|
+
**Important Notes:**
|
|
40
|
+
- Key information about the class
|
|
41
|
+
- Usage patterns and best practices
|
|
42
|
+
|
|
43
|
+
### Function List
|
|
44
|
+
- [functionName1](#functionname1) - Brief description
|
|
45
|
+
- [functionName2](#functionname2) - Brief description
|
|
46
|
+
|
|
47
|
+
### [Function Documentation]
|
|
48
|
+
[All function details with examples]
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Navigation
|
|
53
|
+
- [← Back to Main Documentation](../README.md)
|
|
54
|
+
- [AssetMethods](./asset-methods.md)
|
|
55
|
+
- [BatchMethods](./batch-methods.md)
|
|
56
|
+
- [ContainerMethods](./container-methods.md)
|
|
57
|
+
- [ContentMethods](./content-methods.md)
|
|
58
|
+
- [InstanceMethods](./instance-methods.md)
|
|
59
|
+
- [InstanceUserMethods](./instance-user-methods.md)
|
|
60
|
+
- [ModelMethods](./model-methods.md)
|
|
61
|
+
- [PageMethods](./page-methods.md)
|
|
62
|
+
- [ServerUserMethods](./server-user-methods.md)
|
|
63
|
+
- [WebhookMethods](./webhook-methods.md)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Method Classes Overview
|
|
67
|
+
1. **AssetMethods** (15 functions) - File and media management operations
|
|
68
|
+
2. **BatchMethods** (7 functions) - Batch workflow operations
|
|
69
|
+
3. **ContainerMethods** (8 functions) - Container management operations
|
|
70
|
+
4. **ContentMethods** (13 functions) - Content item operations
|
|
71
|
+
5. **InstanceMethods** (1 function) - Instance-level operations
|
|
72
|
+
6. **InstanceUserMethods** (3 functions) - Instance user management
|
|
73
|
+
7. **ModelMethods** (6 functions) - Content model operations
|
|
74
|
+
8. **PageMethods** (17 functions) - Page management operations
|
|
75
|
+
9. **ServerUserMethods** (2 functions) - Server user operations
|
|
76
|
+
10. **WebhookMethods** (4 functions) - Webhook management operations
|
|
77
|
+
|
|
78
|
+
## Benefits of Modular Structure
|
|
79
|
+
- ✅ **Better Navigation** - Easy to find specific method documentation
|
|
80
|
+
- ✅ **Improved Maintainability** - Individual files are easier to update
|
|
81
|
+
- ✅ **Faster Loading** - Users only load documentation they need
|
|
82
|
+
- ✅ **Better GitHub Experience** - Each file has reasonable size for web viewing
|
|
83
|
+
- ✅ **Searchability** - Easier to search within specific method documentation
|
|
84
|
+
- ✅ **Professional Structure** - Follows modern API documentation patterns
|
|
85
|
+
|
|
86
|
+
## Implementation Phases
|
|
87
|
+
|
|
88
|
+
### Phase 1: Modular Structure Setup
|
|
89
|
+
- [x] ✅ Create `./docs/` directory structure
|
|
90
|
+
- [x] ✅ Design individual file templates with navigation
|
|
91
|
+
- [x] ✅ Restructure main README to be concise with method index
|
|
92
|
+
- [ ] Set up cross-linking between documentation files
|
|
93
|
+
|
|
94
|
+
### Phase 2: AssetMethods Documentation (`./docs/asset-methods.md`)
|
|
95
|
+
- [x] ✅ Create asset-methods.md file with 15 functions
|
|
96
|
+
- [x] ✅ Move existing AssetMethods documentation to new file
|
|
97
|
+
- [x] ✅ Add function list table of contents
|
|
98
|
+
- [x] ✅ Add navigation footer
|
|
99
|
+
- Functions: deleteFile, moveFile, getMediaList, getGalleries, getGalleryById, getGalleryByName, getDefaultContainer, saveGallery, deleteGallery, getAssetByID, getAssetByUrl, upload, createFolder, deleteFolder, renameFolder
|
|
100
|
+
|
|
101
|
+
### Phase 3: BatchMethods Documentation (`./docs/batch-methods.md`)
|
|
102
|
+
- [ ] Create batch-methods.md file with 7 functions
|
|
103
|
+
- [ ] Move existing BatchMethods documentation to new file
|
|
104
|
+
- [ ] Add function list table of contents
|
|
105
|
+
- [ ] Add navigation footer
|
|
106
|
+
- Functions: getBatch, publishBatch, unpublishBatch, approveBatch, declineBatch, requestApprovalBatch, getBatchTypes
|
|
107
|
+
|
|
108
|
+
### Phase 4: ContainerMethods Documentation (`./docs/container-methods.md`)
|
|
109
|
+
- [ ] Create container-methods.md file with 8 functions
|
|
110
|
+
- [ ] Move existing ContainerMethods documentation to new file
|
|
111
|
+
- [ ] Add function list table of contents
|
|
112
|
+
- [ ] Add navigation footer
|
|
113
|
+
- Functions: getContainerByID, getContainersByModel, getContainerByReferenceName, getContainerSecurity, getContainerList, getNotificationList, saveContainer, deleteContainer
|
|
114
|
+
|
|
115
|
+
### Phase 5: ContentMethods Documentation (`./docs/content-methods.md`)
|
|
116
|
+
- [ ] Create content-methods.md file with 13 functions
|
|
117
|
+
- [ ] Document all functions with returnBatchId flag support
|
|
118
|
+
- [ ] Add function list table of contents
|
|
119
|
+
- [ ] Add navigation footer
|
|
120
|
+
- Functions: getContentItem, publishContent, unPublishContent, contentRequestApproval, approveContent, declineContent, deleteContent, saveContentItem, saveContentItems, getContentItems, getContentList, getContentHistory, getContentComments
|
|
121
|
+
|
|
122
|
+
### Phase 6: InstanceMethods Documentation (`./docs/instance-methods.md`)
|
|
123
|
+
- [ ] Create instance-methods.md file with 1 function
|
|
124
|
+
- [ ] Document getLocales function
|
|
125
|
+
- [ ] Add function list table of contents
|
|
126
|
+
- [ ] Add navigation footer
|
|
127
|
+
- Functions: getLocales
|
|
128
|
+
|
|
129
|
+
### Phase 7: InstanceUserMethods Documentation (`./docs/instance-user-methods.md`)
|
|
130
|
+
- [ ] Create instance-user-methods.md file with 3 functions
|
|
131
|
+
- [ ] Document all user management functions
|
|
132
|
+
- [ ] Add function list table of contents
|
|
133
|
+
- [ ] Add navigation footer
|
|
134
|
+
- Functions: getUsers, saveUser, deleteUser
|
|
135
|
+
|
|
136
|
+
### Phase 8: ModelMethods Documentation (`./docs/model-methods.md`)
|
|
137
|
+
- [ ] Create model-methods.md file with 6 functions
|
|
138
|
+
- [ ] Document all content model functions
|
|
139
|
+
- [ ] Add function list table of contents
|
|
140
|
+
- [ ] Add navigation footer
|
|
141
|
+
- Functions: getContentModel, getModelByReferenceName, getContentModules, getPageModules, saveModel, deleteModel
|
|
142
|
+
|
|
143
|
+
### Phase 9: PageMethods Documentation (`./docs/page-methods.md`)
|
|
144
|
+
- [ ] Create page-methods.md file with 17 functions
|
|
145
|
+
- [ ] Document all functions with returnBatchId flag support
|
|
146
|
+
- [ ] Add function list table of contents
|
|
147
|
+
- [ ] Add navigation footer
|
|
148
|
+
- Functions: getSitemap, getPageTemplates, getPageTemplate, getPageTemplateName, deletePageTemplate, getPageItemTemplates, savePageTemplate, getPage, publishPage, unPublishPage, pageRequestApproval, approvePage, declinePage, deletePage, savePage, getPageHistory, getPageComments
|
|
149
|
+
|
|
150
|
+
### Phase 10: ServerUserMethods Documentation (`./docs/server-user-methods.md`)
|
|
151
|
+
- [ ] Create server-user-methods.md file with 2 functions
|
|
152
|
+
- [ ] Document server user functions
|
|
153
|
+
- [ ] Add function list table of contents
|
|
154
|
+
- [ ] Add navigation footer
|
|
155
|
+
- Functions: me, you
|
|
156
|
+
|
|
157
|
+
### Phase 11: WebhookMethods Documentation (`./docs/webhook-methods.md`)
|
|
158
|
+
- [ ] Create webhook-methods.md file with 4 functions
|
|
159
|
+
- [ ] Document all webhook functions
|
|
160
|
+
- [ ] Add function list table of contents
|
|
161
|
+
- [ ] Add navigation footer
|
|
162
|
+
- Functions: webhookList, saveWebhook, getWebhook, deleteWebhook
|
|
163
|
+
|
|
164
|
+
### Phase 12: Final Review & Polish
|
|
165
|
+
- [ ] Review cross-linking between all documentation files
|
|
166
|
+
- [ ] Ensure consistent formatting across all method files
|
|
167
|
+
- [ ] Validate all navigation links work correctly
|
|
168
|
+
- [ ] Test all code examples
|
|
169
|
+
- [ ] Final proofreading across all documentation files
|
|
170
|
+
- [ ] Update main README with final method index
|
|
171
|
+
|
|
172
|
+
## Documentation Template Standards
|
|
173
|
+
|
|
174
|
+
### Main README Template
|
|
175
|
+
```markdown
|
|
176
|
+
# Agility CMS & Management API TypeScript SDK
|
|
177
|
+
|
|
178
|
+
## Table of Contents
|
|
179
|
+
- [Getting Started](#getting-started)
|
|
180
|
+
- [API Method Classes](#api-method-classes)
|
|
181
|
+
- [Examples](#examples)
|
|
182
|
+
|
|
183
|
+
## Getting Started
|
|
184
|
+
[Authentication and setup information]
|
|
185
|
+
|
|
186
|
+
## API Method Classes
|
|
187
|
+
- [AssetMethods](./docs/asset-methods.md) - File and media management (15 functions)
|
|
188
|
+
- [BatchMethods](./docs/batch-methods.md) - Batch workflow operations (7 functions)
|
|
189
|
+
- [ContainerMethods](./docs/container-methods.md) - Container management (8 functions)
|
|
190
|
+
- [ContentMethods](./docs/content-methods.md) - Content item operations (13 functions)
|
|
191
|
+
- [InstanceMethods](./docs/instance-methods.md) - Instance-level operations (1 function)
|
|
192
|
+
- [InstanceUserMethods](./docs/instance-user-methods.md) - Instance user management (3 functions)
|
|
193
|
+
- [ModelMethods](./docs/model-methods.md) - Content model operations (6 functions)
|
|
194
|
+
- [PageMethods](./docs/page-methods.md) - Page management operations (17 functions)
|
|
195
|
+
- [ServerUserMethods](./docs/server-user-methods.md) - Server user operations (2 functions)
|
|
196
|
+
- [WebhookMethods](./docs/webhook-methods.md) - Webhook management (4 functions)
|
|
197
|
+
|
|
198
|
+
## Examples
|
|
199
|
+
[Cross-method workflow examples]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Individual Method File Template
|
|
203
|
+
```markdown
|
|
204
|
+
# Agility CMS & Management API TypeScript SDK
|
|
205
|
+
|
|
206
|
+
## [MethodName] Methods
|
|
207
|
+
|
|
208
|
+
Brief description of the method class purpose and scope.
|
|
209
|
+
|
|
210
|
+
**Important Notes:**
|
|
211
|
+
- Key information about the class
|
|
212
|
+
- Usage patterns and best practices
|
|
213
|
+
|
|
214
|
+
### Function List
|
|
215
|
+
- [functionName1](#functionname1) - Brief description
|
|
216
|
+
- [functionName2](#functionname2) - Brief description
|
|
217
|
+
|
|
218
|
+
### [functionName]
|
|
219
|
+
Brief description of what this function does.
|
|
220
|
+
|
|
221
|
+
| Parameter | Type | Required | Description |
|
|
222
|
+
|-----------|------|----------|-------------|
|
|
223
|
+
| `param1` | `type` | Yes | Description |
|
|
224
|
+
| `param2` | `type` | No | Description *(Optional)* |
|
|
225
|
+
|
|
226
|
+
**Returns:** `ReturnType` - Description of what is returned
|
|
227
|
+
|
|
228
|
+
**Usage Example:**
|
|
229
|
+
```typescript
|
|
230
|
+
// Example usage
|
|
231
|
+
const result = await apiClient.methodName.functionName(param1, param2);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Error Handling:**
|
|
235
|
+
- Throws `Exception` when [condition]
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Navigation
|
|
240
|
+
- [← Back to Main Documentation](../README.md)
|
|
241
|
+
- [AssetMethods](./asset-methods.md)
|
|
242
|
+
- [BatchMethods](./batch-methods.md)
|
|
243
|
+
- [ContainerMethods](./container-methods.md)
|
|
244
|
+
- [ContentMethods](./content-methods.md)
|
|
245
|
+
- [InstanceMethods](./instance-methods.md)
|
|
246
|
+
- [InstanceUserMethods](./instance-user-methods.md)
|
|
247
|
+
- [ModelMethods](./model-methods.md)
|
|
248
|
+
- [PageMethods](./page-methods.md)
|
|
249
|
+
- [ServerUserMethods](./server-user-methods.md)
|
|
250
|
+
- [WebhookMethods](./webhook-methods.md)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Key Features to Highlight
|
|
254
|
+
- **Modular Structure:** Easy navigation between method documentation
|
|
255
|
+
- **Batch Methods:** Emphasize returnBatchId flags for advanced users
|
|
256
|
+
- **Optional Parameters:** Clear indication of default values
|
|
257
|
+
- **Return Types:** Precise type information
|
|
258
|
+
- **Error Scenarios:** Common error conditions and handling
|
|
259
|
+
- **Navigation:** Consistent cross-linking between all documentation files
|
|
260
|
+
|
|
261
|
+
## Progress Tracking
|
|
262
|
+
- **Total Functions:** 76 functions across 10 method classes
|
|
263
|
+
- **Total Documentation Files:** 10 individual method documentation files + 1 main README
|
|
264
|
+
- **Completed:** 2 files (Main README restructure + AssetMethods complete)
|
|
265
|
+
- **Remaining:** 9 files (9 method docs remaining)
|
|
266
|
+
- **Current Phase:** Phase 3 (BatchMethods Documentation)
|
|
267
|
+
|
|
268
|
+
## Success Criteria
|
|
269
|
+
- [ ] All 76 functions documented across 10 individual method files
|
|
270
|
+
- [ ] Consistent formatting and navigation across all documentation files
|
|
271
|
+
- [ ] Main README with clean method index and links to all documentation
|
|
272
|
+
- [ ] Cross-linking navigation between all documentation files
|
|
273
|
+
- [ ] All code examples tested and functional
|
|
274
|
+
- [ ] Improved readability and developer experience with modular structure
|
|
275
|
+
- [ ] Professional documentation structure following modern API documentation patterns
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# API Functions Analysis - Actual Source Code
|
|
2
|
+
|
|
3
|
+
## Complete Function Inventory
|
|
4
|
+
|
|
5
|
+
### 1. AssetMethods (15 functions)
|
|
6
|
+
- `deleteFile(mediaID: number, guid: string)`
|
|
7
|
+
- `moveFile(mediaID: number, newFolder: string, guid: string)`
|
|
8
|
+
- `getMediaList(pageSize: number, recordOffset: number, guid: string)`
|
|
9
|
+
- `getGalleries(guid: string, search: string = null, pageSize: number = null, rowIndex: number = null)`
|
|
10
|
+
- `getGalleryById(guid: string, id: number)`
|
|
11
|
+
- `getGalleryByName(guid: string, galleryName: string)`
|
|
12
|
+
- `getDefaultContainer(guid: string)`
|
|
13
|
+
- `saveGallery(guid: string, gallery: assetMediaGrouping)`
|
|
14
|
+
- `deleteGallery(guid: string, id: number)`
|
|
15
|
+
- `getAssetByID(mediaID: number, guid: string)`
|
|
16
|
+
- `getAssetByUrl(url: string, guid: string)`
|
|
17
|
+
- `upload(formData: any, agilityFolderPath: string, guid: string, groupingID: number = -1)`
|
|
18
|
+
- `createFolder(originKey: string, guid: string)`
|
|
19
|
+
- `deleteFolder(originKey: string, guid: string, mediaID: number = 0)`
|
|
20
|
+
- `renameFolder(folderName: string, newFolderName: string, guid: string, mediaID: number = 0)`
|
|
21
|
+
|
|
22
|
+
### 2. BatchMethods (7 functions)
|
|
23
|
+
- `getBatch(batchID: number, guid: string, expandItems: boolean = true)`
|
|
24
|
+
- `publishBatch(batchID: number, guid: string, returnBatchId: boolean = false)`
|
|
25
|
+
- `unpublishBatch(batchID: number, guid: string, returnBatchId: boolean = false)`
|
|
26
|
+
- `approveBatch(batchID: number, guid: string, returnBatchId: boolean = false)`
|
|
27
|
+
- `declineBatch(batchID: number, guid: string, returnBatchId: boolean = false)`
|
|
28
|
+
- `requestApprovalBatch(batchID: number, guid: string, returnBatchId: boolean = false)`
|
|
29
|
+
- `getBatchTypes(guid: string)`
|
|
30
|
+
|
|
31
|
+
### 3. ContainerMethods (8 functions)
|
|
32
|
+
- `getContainerByID(id: number, guid: string)`
|
|
33
|
+
- `getContainersByModel(modelId: number, guid: string)`
|
|
34
|
+
- `getContainerByReferenceName(referenceName: string, guid: string)`
|
|
35
|
+
- `getContainerSecurity(id: number, guid: string)`
|
|
36
|
+
- `getContainerList(guid: string)`
|
|
37
|
+
- `getNotificationList(id: number, guid: string)`
|
|
38
|
+
- `saveContainer(container: Container, guid: string, forceReferenceName: boolean = false)`
|
|
39
|
+
- `deleteContainer(id: number, guid: string)`
|
|
40
|
+
|
|
41
|
+
### 4. ContentMethods (13 functions)
|
|
42
|
+
- `getContentItem(contentID: number, guid: string, locale: string)`
|
|
43
|
+
- `publishContent(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
44
|
+
- `unPublishContent(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
45
|
+
- `contentRequestApproval(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
46
|
+
- `approveContent(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
47
|
+
- `declineContent(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
48
|
+
- `deleteContent(contentID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
49
|
+
- `saveContentItem(contentItem: ContentItem, guid: string, locale: string, returnBatchId: boolean = false)`
|
|
50
|
+
- `saveContentItems(contentItems: ContentItem[], guid: string, locale: string, returnBatchId: boolean = false)`
|
|
51
|
+
- `getContentItems(referenceName: string, guid: string, locale: string, listParams: ListParams)`
|
|
52
|
+
- `getContentList(referenceName: string, guid: string, locale: string, listParams: ListParams, filterObject: ContentListFilterModel = null)`
|
|
53
|
+
- `getContentHistory(locale: string, guid: string, contentID: number, take: number = 50, skip: number = 0)`
|
|
54
|
+
- `getContentComments(locale: string, guid: string, contentID: number, take: number = 50, skip: number = 0)`
|
|
55
|
+
|
|
56
|
+
### 5. InstanceMethods (1 function)
|
|
57
|
+
- `getLocales(guid: string)` - **ONLY ONE FUNCTION**
|
|
58
|
+
|
|
59
|
+
### 6. InstanceUserMethods (3 functions)
|
|
60
|
+
- `getUsers(guid: string)`
|
|
61
|
+
- `saveUser(emailAddress: string, roles: InstanceRole[], guid: string, firstName: string = null, lastName: string = null)`
|
|
62
|
+
- `deleteUser(userId: number, guid: string)`
|
|
63
|
+
|
|
64
|
+
### 7. ModelMethods (6 functions)
|
|
65
|
+
- `getContentModel(id: number, guid: string)`
|
|
66
|
+
- `getModelByReferenceName(referenceName: string, guid: string)`
|
|
67
|
+
- `getContentModules(includeDefaults: boolean, guid: string, includeModules: boolean = false)`
|
|
68
|
+
- `getPageModules(includeDefault: boolean, guid: string)`
|
|
69
|
+
- `saveModel(model: Model, guid: string)`
|
|
70
|
+
- `deleteModel(id: number, guid: string)`
|
|
71
|
+
|
|
72
|
+
### 8. PageMethods (17 functions)
|
|
73
|
+
- `getSitemap(guid: string, locale: string)`
|
|
74
|
+
- `getPageTemplates(guid: string, locale: string, includeModuleZones: boolean, searchFilter: string = null)`
|
|
75
|
+
- `getPageTemplate(guid: string, locale: string, pageTemplateId: number)`
|
|
76
|
+
- `getPageTemplateName(guid: string, locale: string, templateName: string)`
|
|
77
|
+
- `deletePageTemplate(guid: string, locale: string, pageTemplateId: number)`
|
|
78
|
+
- `getPageItemTemplates(guid: string, locale: string, id: number)`
|
|
79
|
+
- `savePageTemplate(guid: string, locale: string, pageModel: PageModel)`
|
|
80
|
+
- `getPage(pageID: number, guid: string, locale: string)`
|
|
81
|
+
- `publishPage(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
82
|
+
- `unPublishPage(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
83
|
+
- `pageRequestApproval(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
84
|
+
- `approvePage(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
85
|
+
- `declinePage(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
86
|
+
- `deletePage(pageID: number, guid: string, locale: string, comments: string = null, returnBatchId: boolean = false)`
|
|
87
|
+
- `savePage(pageItem: PageItem, guid: string, locale: string, parentPageID: number = -1, placeBeforePageItemID: number = -1, returnBatchId: boolean = false)`
|
|
88
|
+
- `getPageHistory(locale: string, guid: string, pageID: number, take: number = 50, skip: number = 0)`
|
|
89
|
+
- `getPageComments(locale: string, guid: string, pageID: number, take: number = 50, skip: number = 0)`
|
|
90
|
+
|
|
91
|
+
### 9. ServerUserMethods (2 functions)
|
|
92
|
+
- `me(guid: string)`
|
|
93
|
+
- `you(guid: string, serverUserID: number)`
|
|
94
|
+
|
|
95
|
+
### 10. WebhookMethods (4 functions)
|
|
96
|
+
- `webhookList(guid: string, take: number = 20, token: string = null)`
|
|
97
|
+
- `saveWebhook(guid: string, webhook: Webhook)`
|
|
98
|
+
- `getWebhook(guid: string, webhookID: string)`
|
|
99
|
+
- `deleteWebhook(guid: string, webhookID: string)`
|
|
100
|
+
|
|
101
|
+
## Total Functions: 76
|
|
102
|
+
|
|
103
|
+
## Corrections Needed
|
|
104
|
+
- **ContentMethods**: I hallucinated functions like `getContentItemByLanguageCode`, `getContentItemHistory`, `getContentItemComments`, `getContentListByContainer`, etc.
|
|
105
|
+
- **InstanceMethods**: I hallucinated `getInstanceUsers` when the only function is `getLocales`
|
|
106
|
+
- Several parameter orders and types were incorrect
|
|
107
|
+
|
|
108
|
+
## Next Steps
|
|
109
|
+
1. Fix ContentMethods documentation completely
|
|
110
|
+
2. Fix InstanceMethods documentation completely
|
|
111
|
+
3. Verify other documentation files match actual source code
|