@agility/management-sdk 0.1.11 → 0.1.12

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 (132) hide show
  1. package/README.md +522 -522
  2. package/dist/apiClient.d.ts +19 -19
  3. package/dist/apiClient.js +24 -24
  4. package/dist/apiMethods/apiClient.d.ts +19 -0
  5. package/dist/apiMethods/apiClient.js +24 -0
  6. package/dist/apiMethods/assetMethods.d.ts +24 -24
  7. package/dist/apiMethods/assetMethods.js +315 -315
  8. package/dist/apiMethods/batchMethods.d.ts +11 -11
  9. package/dist/apiMethods/batchMethods.js +117 -117
  10. package/dist/apiMethods/clientInstance.d.ts +18 -18
  11. package/dist/apiMethods/clientInstance.js +168 -168
  12. package/dist/apiMethods/containerMethods.d.ts +16 -16
  13. package/dist/apiMethods/containerMethods.js +189 -189
  14. package/dist/apiMethods/contentMethods.d.ts +20 -20
  15. package/dist/apiMethods/contentMethods.js +359 -359
  16. package/dist/apiMethods/instanceUserMethods.d.ts +13 -13
  17. package/dist/apiMethods/instanceUserMethods.js +111 -111
  18. package/dist/apiMethods/modelMethods.d.ts +14 -14
  19. package/dist/apiMethods/modelMethods.js +170 -170
  20. package/dist/apiMethods/pageMethods.d.ts +26 -20
  21. package/dist/apiMethods/pageMethods.js +426 -323
  22. package/dist/enums/assetGroupingType.d.ts +3 -3
  23. package/dist/enums/assetGroupingType.js +7 -7
  24. package/dist/enums/batchOperationType.d.ts +19 -19
  25. package/dist/enums/batchOperationType.js +23 -23
  26. package/dist/enums/batchState..d.ts +7 -7
  27. package/dist/enums/batchState..js +11 -11
  28. package/dist/enums/pageItemTemplateType.d.ts +4 -0
  29. package/dist/enums/pageItemTemplateType.js +8 -0
  30. package/dist/index.d.ts +23 -19
  31. package/dist/index.js +39 -31
  32. package/dist/models/assetContainer.d.ts +7 -7
  33. package/dist/models/assetContainer.js +9 -9
  34. package/dist/models/assetGalleries.d.ts +5 -5
  35. package/dist/models/assetGalleries.js +9 -9
  36. package/dist/models/assetMediaGrouping.d.ts +17 -17
  37. package/dist/models/assetMediaGrouping.js +9 -9
  38. package/dist/models/assetMediaGroupingMetaData.d.ts +4 -4
  39. package/dist/models/assetMediaGroupingMetaData.js +9 -9
  40. package/dist/models/batch.d.ts +29 -29
  41. package/dist/models/batch.js +9 -9
  42. package/dist/models/batchItem.d.ts +13 -13
  43. package/dist/models/batchItem.js +9 -9
  44. package/dist/models/container.d.ts +47 -47
  45. package/dist/models/container.js +9 -9
  46. package/dist/models/contentItem.d.ts +37 -37
  47. package/dist/models/contentItem.js +33 -33
  48. package/dist/models/contentSectionDefaultModule.d.ts +7 -0
  49. package/dist/models/contentSectionDefaultModule.js +9 -0
  50. package/dist/models/contentSectionDefinition.d.ts +35 -0
  51. package/dist/models/contentSectionDefinition.js +9 -0
  52. package/dist/models/contentViewColumn.d.ts +8 -8
  53. package/dist/models/contentViewColumn.js +9 -9
  54. package/dist/models/exception.d.ts +4 -4
  55. package/dist/models/exception.js +28 -26
  56. package/dist/models/instanceRole.d.ts +7 -7
  57. package/dist/models/instanceRole.js +9 -9
  58. package/dist/models/instanceUser.d.ts +14 -14
  59. package/dist/models/instanceUser.js +9 -9
  60. package/dist/models/media.d.ts +30 -30
  61. package/dist/models/media.js +15 -15
  62. package/dist/models/model.d.ts +30 -30
  63. package/dist/models/model.js +15 -15
  64. package/dist/models/notification.d.ts +13 -13
  65. package/dist/models/notification.js +9 -9
  66. package/dist/models/options.d.ts +7 -7
  67. package/dist/models/options.js +9 -9
  68. package/dist/models/pageItem.d.ts +56 -56
  69. package/dist/models/pageItem.js +39 -39
  70. package/dist/models/pageModel.d.ts +14 -0
  71. package/dist/models/pageModel.js +9 -0
  72. package/dist/models/sharedModule.d.ts +7 -0
  73. package/dist/models/sharedModule.js +9 -0
  74. package/dist/models/sitemap.d.ts +20 -20
  75. package/dist/models/sitemap.js +15 -15
  76. package/dist/models/websiteUser.d.ts +22 -22
  77. package/dist/models/websiteUser.js +15 -15
  78. package/dist/src/apiMethods/assetMethods.d.ts +14 -0
  79. package/dist/src/apiMethods/assetMethods.js +172 -0
  80. package/dist/src/apiMethods/batchMethods.d.ts +11 -0
  81. package/dist/src/apiMethods/batchMethods.js +117 -0
  82. package/dist/src/apiMethods/clientInstance.d.ts +8 -0
  83. package/dist/src/apiMethods/clientInstance.js +156 -0
  84. package/dist/src/apiMethods/containerMethods.d.ts +16 -0
  85. package/dist/src/apiMethods/containerMethods.js +189 -0
  86. package/dist/src/apiMethods/contentMethods.d.ts +20 -0
  87. package/dist/src/apiMethods/contentMethods.js +359 -0
  88. package/dist/src/apiMethods/instanceUserMethods.d.ts +13 -0
  89. package/dist/src/apiMethods/instanceUserMethods.js +111 -0
  90. package/dist/src/apiMethods/modelMethods.d.ts +13 -0
  91. package/dist/src/apiMethods/modelMethods.js +150 -0
  92. package/dist/src/apiMethods/pageMethods.d.ts +20 -0
  93. package/dist/src/apiMethods/pageMethods.js +323 -0
  94. package/dist/src/enums/batchOperationType.d.ts +19 -0
  95. package/dist/src/enums/batchOperationType.js +23 -0
  96. package/dist/src/enums/batchState..d.ts +7 -0
  97. package/dist/src/enums/batchState..js +11 -0
  98. package/dist/src/index.d.ts +14 -0
  99. package/dist/src/index.js +30 -0
  100. package/dist/src/models/batch.d.ts +29 -0
  101. package/dist/src/models/batch.js +9 -0
  102. package/dist/src/models/batchItem.d.ts +13 -0
  103. package/dist/src/models/batchItem.js +9 -0
  104. package/dist/src/models/container.d.ts +47 -0
  105. package/dist/src/models/container.js +9 -0
  106. package/dist/src/models/contentItem.d.ts +37 -0
  107. package/dist/src/models/contentItem.js +33 -0
  108. package/dist/src/models/contentViewColumn.d.ts +8 -0
  109. package/dist/src/models/contentViewColumn.js +9 -0
  110. package/dist/src/models/exception.d.ts +4 -0
  111. package/dist/src/models/exception.js +28 -0
  112. package/dist/src/models/instanceRole.d.ts +7 -0
  113. package/dist/src/models/instanceRole.js +9 -0
  114. package/dist/src/models/instanceUser.d.ts +14 -0
  115. package/dist/src/models/instanceUser.js +9 -0
  116. package/dist/src/models/media.d.ts +30 -0
  117. package/dist/src/models/media.js +15 -0
  118. package/dist/src/models/model.d.ts +30 -0
  119. package/dist/src/models/model.js +15 -0
  120. package/dist/src/models/notification.d.ts +13 -0
  121. package/dist/src/models/notification.js +9 -0
  122. package/dist/src/models/options.d.ts +7 -0
  123. package/dist/src/models/options.js +9 -0
  124. package/dist/src/models/pageItem.d.ts +56 -0
  125. package/dist/src/models/pageItem.js +39 -0
  126. package/dist/src/models/sitemap.d.ts +20 -0
  127. package/dist/src/models/sitemap.js +15 -0
  128. package/dist/src/models/websiteUser.d.ts +22 -0
  129. package/dist/src/models/websiteUser.js +15 -0
  130. package/license.txt +20 -20
  131. package/package.json +39 -39
  132. package/tsconfig.json +14 -14
package/README.md CHANGED
@@ -1,523 +1,523 @@
1
- # Agility CMS & Management API TypeScript SDK
2
-
3
- ## About the Management API SDK
4
-
5
- - Provides a facility to developers to use the new Agility Management API more effectively.
6
- - Provides methods to perform operations on Assets, Batches, Containers, Content, Models, Pages, and Users.
7
- - Supports the creation of Pages and Content in batches.
8
- - Ability to generate Content in bulk for a Website.
9
-
10
- ## Getting Started
11
-
12
- ### Prerequisites
13
- 1. Clone the repository agility-cms-management-sdk-typescript.
14
- 2. Import the index file to make use of the Options class.
15
- 3. Create an object of the Options class to provide values of -
16
- - token -> Bearer token to authenticate a Rest Request to perform an operation.
17
- 4. Create an object of Method class(es), which can be used to create and perform operations. Following is the description of Classes and their respective methods -
18
-
19
- ### Making a Request
20
- ```Javascript
21
- import * as index from "./index";
22
-
23
- //initialize the Options Class
24
- let options = new index.Options();
25
-
26
- options.token = "<<Provide Auth Token>>"
27
- //Initialize the APIClient Class
28
- let apiClient = new index.ApiClient(options);
29
-
30
- let guid = "<<Provide the Guid of the Website>>";
31
- let locale = "<<Provide the locale of the Website>>"; //Example: en-us
32
-
33
-
34
-
35
- //make the request: get a content item with the ID '22'
36
- var contentItem = await apiClient.contentMethods.getContentItem(22,guid, locale);
37
-
38
- //To log the response of the contentItem object in console.
39
- console.log(JSON.stringify(contentItem));
40
- ```
41
- ## Class AssetMethods
42
- This class is used to perform operations related to Assets. The following are the methods: -
43
-
44
- ### upload
45
- | Parameter | Type | Description |
46
- | :-------- | :------- | :------------------------- |
47
- | `formData` | `FormData` | This is an object of type FormData where files can be posted eg : `const file = fs.readFileSync(<<Local File>>, null);const form = new FormData(); form.append('files',file,'<<File Name>>');`|
48
- | `agilityFolderPath` | `string` | Path of the folder in Agility where the file(s) needs to be uploaded.|
49
- | `guid` | `string` | Current website guid.|
50
- | `groupingID` | `number` | Path of the folder in Agility where the file(s) needs to be uploaded.|
51
-
52
- Returns: A collection of ```Media``` class Object.
53
-
54
- ### createFolder
55
- | Parameter | Type | Description |
56
- | :-------- | :------- | :------------------------- |
57
- | `originKey` | `string` | The origin key of the requested folder. |
58
- | `guid` | `string` | Current website guid.|
59
-
60
- Returns: A collection of ```Media``` class Object.
61
-
62
- ### deleteFile
63
- | Parameter | Type | Description |
64
- | :-------- | :------- | :------------------------- |
65
- | `mediaID` | `number` | The mediaID of the asset which needs to be deleted.|
66
- | `guid` | `string` | Current website guid.|
67
- Returns
68
- A ```string``` response if a file has been deleted.
69
-
70
- ### moveFile
71
- | Parameter | Type | Description |
72
- | :-------- | :------- | :------------------------- |
73
- | `mediaID` | `number` | The mediaID of the file that needs to be moved.|
74
- | `newFolder` | `string` | The new location (in Agility) where the file needs to be moved.|
75
- | `guid` | `string` | Current website guid.|
76
-
77
- Returns: An object of ```Media``` class with the new location of the file.
78
-
79
- ### getMediaList
80
- | Parameter | Type | Description |
81
- | :-------- | :------- | :------------------------- |
82
- | `pageSize` | `number` | The page size on which the assets needs to selected.|
83
- | `recordOffset` | `number` | The record offset value to skip search results.|
84
- | `guid` | `string` | Current website guid.|
85
-
86
- Returns: An object of ```AssetMediaList``` class.
87
-
88
- ### getGalleryById
89
- | Parameter | Type | Description |
90
- | :-------- | :------- | :------------------------- |
91
- | `guid` | `string` | Current website guid.|
92
- | `id` | `number` | The ID of the requested gallery.|
93
-
94
- Returns: An object of ```assetMediaGrouping``` class.
95
-
96
- ### getGalleryByName
97
- | Parameter | Type | Description |
98
- | :-------- | :------- | :------------------------- |
99
- | `guid` | `string` | Current website guid.|
100
- | `galleryName` | `string` | The name of the requested gallery.|
101
-
102
- Returns: An object of ```assetMediaGrouping``` class.
103
-
104
- ### getDefaultContainer
105
- | Parameter | Type | Description |
106
- | :-------- | :------- | :------------------------- |
107
- | `guid` | `string` | Current website guid.|
108
-
109
- Returns: An object of ```assetContainer``` class.
110
-
111
- ### getGalleries
112
- | Parameter | Type | Description |
113
- | :-------- | :------- | :------------------------- |
114
- | `guid` | `string` | Current website guid.|
115
- | `search` | `string` | String to search a specific gallery item.|
116
- | `pageSize` | `number` | The pageSize on which the galleries needs to be selected.|
117
- | `rowIndex` | `number` | The rowIndex value for the resultant record set.|
118
-
119
- Returns: An object of ```assetGalleries``` class.
120
-
121
- ### saveGallery
122
- | Parameter | Type | Description |
123
- | :-------- | :------- | :------------------------- |
124
- | `guid` | `string` | Current website guid.|
125
- | `gallery` | `assetMediaGrouping` | Object of AssetMediaGrouping class.|
126
-
127
- Returns: An object of ```assetMediaGrouping``` class.
128
-
129
- ### deleteGallery
130
- | Parameter | Type | Description |
131
- | :-------- | :------- | :------------------------- |
132
- | `guid` | `string` | Current website guid.|
133
- | `id` | `number` | The id of the gallery to be deleted.|
134
-
135
- A ```string``` response if the gallery has been deleted.
136
-
137
- ### getAssetByID
138
- | Parameter | Type | Description |
139
- | :-------- | :------- | :------------------------- |
140
- | `mediaID` | `number` | The mediaID of the requested asset.|
141
- | `guid` | `string` | Current website guid.|
142
-
143
- Returns: An object of ```Media``` class with the information of the asset.
144
-
145
- ### getAssetByUrl
146
- | Parameter | Type | Description |
147
- | :-------- | :------- | :------------------------- |
148
- | `url` | `string` | The url of the requested asset.|
149
- | `guid` | `string` | Current website guid.|
150
-
151
- Returns: An object of ```Media``` class with the information of the asset.
152
-
153
- ## Class BatchMethods
154
- This class is used to perform operations related to Batches. The following are the methods: -
155
-
156
- ### getBatch
157
- | Parameter | Type | Description |
158
- | :-------- | :------- | :------------------------- |
159
- | `id` | `number` | The batchID of the requested batch.|
160
- | `guid` | `string` | Current website guid.|
161
-
162
- Returns: A object of ```Batch``` class.
163
-
164
- ## Class ContainerMethods
165
- This class is used to perform operations related to Containers. The following are the methods: -
166
-
167
- ### getContainerByID
168
- | Parameter | Type | Description |
169
- | :-------- | :------- | :------------------------- |
170
- | `id` | `number` | The container id of the requested container.|
171
- | `guid` | `string` | Current website guid.|
172
-
173
- Returns: A object of ```Container``` class.
174
-
175
- ### getContainerByReferenceName
176
- | Parameter | Type | Description |
177
- | :-------- | :------- | :------------------------- |
178
- | `referenceName` | `string` | The container reference name of the requested container.|
179
- | `guid` | `string` | Current website guid.|
180
-
181
- Returns: A object of ```Container``` class.
182
-
183
- ### getContainerSecurity
184
- | Parameter | Type | Description |
185
- | :-------- | :------- | :------------------------- |
186
- | `id` | `number` | The container id of the requested container.|
187
- | `guid` | `string` | Current website guid.|
188
-
189
- Returns: A object of ```Container``` class.
190
-
191
- ### getContainerList
192
- | Parameter | Type | Description |
193
- | :-------- | :------- | :------------------------- |
194
- | `guid` | `string` | Current website guid.|
195
- Returns: A collection object of ```Container``` class.
196
-
197
- ### getNotificationList
198
- | Parameter | Type | Description |
199
- | :-------- | :------- | :------------------------- |
200
- | `id` | `number` | The container id of the requested container.|
201
- | `guid` | `string` | Current website guid.|
202
- Returns: A collection object of ```Notification``` class.
203
-
204
- ### saveContainer
205
- | Parameter | Type | Description |
206
- | :-------- | :------- | :------------------------- |
207
- | `container` | `Container` | A Container type object to create or update a container.|
208
- | `guid` | `string` | Current website guid.|
209
-
210
- Returns: An object of ```Container``` class.
211
-
212
- ### deleteContainer
213
- | Parameter | Type | Description |
214
- | :-------- | :------- | :------------------------- |
215
- | `id` | `number` | The container id of the requested container.|
216
- | `guid` | `string` | Current website guid.|
217
- Returns: A ```string``` response if a container has been deleted.
218
-
219
- ## Class ContentMethods
220
- This class is used to perform operations related to Content. The following are the methods: -
221
-
222
- ### getContentItem
223
- | Parameter | Type | Description |
224
- | :-------- | :------- | :------------------------- |
225
- | `contentID` | `number` | The contentid of the requested content.|
226
- | `guid` | `string` | Current website guid.|
227
- | `locale` | `string` | Current website locale.|
228
-
229
- Returns: An object of ```ContentItem``` class.
230
-
231
- ### publishContent
232
- | Parameter | Type | Description |
233
- | :-------- | :------- | :------------------------- |
234
- | `contentID` | `number` | The contentid of the requested content.|
235
- | `guid` | `string` | Current website guid.|
236
- | `locale` | `string` | Current website locale.|
237
- | `comments` | `string` | Additional comments for a batch request.|
238
-
239
- Returns: An array of ```contentID``` of the requested content.
240
-
241
- ### unPublishContent
242
- | Parameter | Type | Description |
243
- | :-------- | :------- | :------------------------- |
244
- | `contentID` | `number` | The contentid of the requested content.|
245
- | `guid` | `string` | Current website guid.|
246
- | `locale` | `string` | Current website locale.|
247
- | `comments` | `string` | Additional comments for a batch request.|
248
-
249
- Returns: An array of ```contentID``` of the requested content.
250
-
251
- ### contentRequestApproval
252
- | Parameter | Type | Description |
253
- | :-------- | :------- | :------------------------- |
254
- | `contentID` | `number` | The contentid of the requested content.|
255
- | `guid` | `string` | Current website guid.|
256
- | `locale` | `string` | Current website locale.|
257
- | `comments` | `string` | Additional comments for a batch request.|
258
-
259
- Returns: An array of ```contentID``` of the requested content.
260
-
261
- ### approveContent
262
- | Parameter | Type | Description |
263
- | :-------- | :------- | :------------------------- |
264
- | `contentID` | `number` | The contentid of the requested content.|
265
- | `guid` | `string` | Current website guid.|
266
- | `locale` | `string` | Current website locale.|
267
- | `comments` | `string` | Additional comments for a batch request.|
268
-
269
- Returns: An array of ```contentID``` of the requested content.
270
-
271
- ### declineContent
272
- | Parameter | Type | Description |
273
- | :-------- | :------- | :------------------------- |
274
- | `contentID` | `number` | The contentid of the requested content.|
275
- | `guid` | `string` | Current website guid.|
276
- | `locale` | `string` | Current website locale.|
277
- | `comments` | `string` | Additional comments for a batch request.|
278
-
279
- Returns: An array of ```contentID``` of the requested content.
280
-
281
- ### saveContentItem
282
- | Parameter | Type | Description |
283
- | :-------- | :------- | :------------------------- |
284
- | `contentItem` | `ContentItem` | A contentItem object to create or update a content.|
285
- | `guid` | `string` | Current website guid.|
286
- | `locale` | `string` | Current website locale.|
287
-
288
- Returns: An array of ```contentID``` of the requested content.
289
-
290
- ### saveContentItems
291
- | Parameter | Type | Description |
292
- | :-------- | :------- | :------------------------- |
293
- | `contentItems` | `ContentItem[]` | A collection of contentItems object to create or update multiple contents.|
294
- | `guid` | `string` | Current website guid.|
295
- | `locale` | `string` | Current website locale.|
296
-
297
- Returns: An array of ```contentID``` of the requested content.
298
-
299
- ### deleteContent
300
- | Parameter | Type | Description |
301
- | :-------- | :------- | :------------------------- |
302
- | `contentID` | `number` | The contentid of the requested content.|
303
- | `guid` | `string` | Current website guid.|
304
- | `locale` | `string` | Current website locale.|
305
- | `comments` | `string` | Additional comments for a batch request.|
306
-
307
- Returns: An array of ```contentID``` of the requested content.
308
-
309
- ### getContentItems
310
- | Parameter | Type | Description |
311
- | :-------- | :------- | :------------------------- |
312
- | `referenceName` | `string` | The reference name of the container for the requested content.|
313
- | `guid` | `string` | Current website guid.|
314
- | `locale` | `string` | Current website locale.|
315
- | `filter` | `string` | The filter condition for the requested content.|
316
- | `fields` | `string` | The fields mapped to the container.|
317
- | `sortDirection` | `string` | The direction to sort the result.|
318
- | `sortField` | `string` | The field on which the sort needs to be performed.|
319
- | `take` | `number` | The page size for the result.|
320
- | `skip` | `number` | The record offset for the result.|
321
-
322
- Returns: An object of ```ContentList``` class of the requested content.
323
-
324
- ## Class InstanceUserMethods
325
- This class is used to perform operations related to User. The following are the methods: -
326
-
327
- ### getUsers
328
- | Parameter | Type | Description |
329
- | :-------- | :------- | :------------------------- |
330
- | `guid` | `string` | Current website guid.|
331
- Returns: A collection of ```WebsiteUser``` class of the requested content.
332
-
333
- ### saveUser
334
- | Parameter | Type | Description |
335
- | :-------- | :------- | :------------------------- |
336
- | `emailAddress` | `string` | The email address of the requested user.|
337
- | `roles` | `InstanceRole[]` | Collection object of InstanceRole class for the requested user.|
338
- | `guid` | `string` | Current website guid.|
339
- | `firstName` | `string` | The first name of the requested user.|
340
- | `lastName` | `string` | The last name of the requested user.|
341
-
342
- Returns: An object of the ```InstanceUser``` class.
343
-
344
- ### deleteUser
345
- | Parameter | Type | Description |
346
- | :-------- | :------- | :------------------------- |
347
- | `userID` | `number` | The userID of the requested user.|
348
- | `guid` | `string` | Current website guid.|
349
-
350
- Returns: A ```string``` response if a user has been deleted.
351
-
352
- ## Class ModelMethods
353
- This class is used to perform operations related to Models. The following are the methods: -
354
-
355
- ### getContentModel
356
- | Parameter | Type | Description |
357
- | :-------- | :------- | :------------------------- |
358
- | `id` | `number` | The id of the requested model.|
359
- | `guid` | `string` | Current website guid.|
360
-
361
- Returns: An object of ```Model``` class.
362
-
363
- ### GetModelByReferenceName
364
- | Parameter | Type | Description |
365
- | :-------- | :------- | :------------------------- |
366
- | `referenceName` | `string` | The referenceName of the requested model.|
367
- | `guid` | `string` | The guid of the requested model.|
368
-
369
- ### getContentModules
370
- | Parameter | Type | Description |
371
- | :-------- | :------- | :------------------------- |
372
- | `includeDefaults` | `bool` | Boolean value to include defaults.|
373
- | `guid` | `string` | Current website guid.|
374
- | `includeModules` | `bool` | Boolean value to include modules.|
375
-
376
- Returns: A collection object of ```Model``` class.
377
-
378
- ### getPageModules
379
- | Parameter | Type | Description |
380
- | :-------- | :------- | :------------------------- |
381
- | `includeDefault` | `bool` | Boolean value to include defaults.|
382
- | `guid` | `string` | Current website guid.|
383
-
384
- Returns: A collection object of ```Model``` class.
385
-
386
- ### saveModel
387
- | Parameter | Type | Description |
388
- | :-------- | :------- | :------------------------- |
389
- | `model` | `Model` | The object of Model to for the requested model.|
390
- | `guid` | `string` | Current website guid.|
391
-
392
- Returns: An object of ```Model``` class.
393
-
394
- ### deleteModel
395
- | Parameter | Type | Description |
396
- | :-------- | :------- | :------------------------- |
397
- | `id` | `number` | The id for the requested model.|
398
- | `guid` | `string` | Current website guid.|
399
-
400
- Returns: A ```string``` response if a model is deleted.
401
-
402
- ## Class PageMethods
403
- This class is used to perform operations related to Pages. The following are the methods: -
404
-
405
- ### getSitemap
406
- | Parameter | Type | Description |
407
- | :-------- | :------- | :------------------------- |
408
- | `guid` | `string` | Current website guid.|
409
- | `locale` | `string` | Current website locale.|
410
- Returns: A collection object of ```Sitemap``` class.
411
-
412
- ### getPage
413
- | Parameter | Type | Description |
414
- | :-------- | :------- | :------------------------- |
415
- | `pageID` | `number` | The id of the requested page.|
416
- | `guid` | `string` | Current website guid.|
417
- | `locale` | `string` | Current website locale.|
418
-
419
- Returns: An object of ```PageItem``` class.
420
-
421
- ### publishPage
422
- | Parameter | Type | Description |
423
- | :-------- | :------- | :------------------------- |
424
- | `pageID` | `number` | The pageID of the requested page.|
425
- | `guid` | `string` | Current website guid.|
426
- | `locale` | `string` | Current website locale.|
427
- | `comments` | `string` | Additional comments for a batch request.|
428
-
429
- Returns: An array of ```pageID``` of the requested page.
430
-
431
- ### unPublishPage
432
- | Parameter | Type | Description |
433
- | :-------- | :------- | :------------------------- |
434
- | `pageID` | `number` | The pageID of the requested page.|
435
- | `guid` | `string` | Current website guid.|
436
- | `locale` | `string` | Current website locale.|
437
- | `comments` | `string` | Additional comments for a batch request.|
438
-
439
- Returns: An array of ```pageID``` of the requested page.
440
-
441
- ### deletePage
442
- | Parameter | Type | Description |
443
- | :-------- | :------- | :------------------------- |
444
- | `pageID` | `number` | The pageID of the requested page.|
445
- | `guid` | `string` | Current website guid.|
446
- | `locale` | `string` | Current website locale.|
447
- | `comments` | `string` | Additional comments for a batch request.|
448
-
449
- Returns: An array of ```pageID``` of the requested page.
450
-
451
- ### approvePage
452
- | Parameter | Type | Description |
453
- | :-------- | :------- | :------------------------- |
454
- | `pageID` | `number` | The pageID of the requested page.|
455
- | `guid` | `string` | Current website guid.|
456
- | `locale` | `string` | Current website locale.|
457
- | `comments` | `string` | Additional comments for a batch request.|
458
-
459
- Returns: An array of ```pageID``` of the requested page.
460
-
461
- ### declinePage
462
- | Parameter | Type | Description |
463
- | :-------- | :------- | :------------------------- |
464
- | `pageID` | `number` | The pageID of the requested page.|
465
- | `guid` | `string` | Current website guid.|
466
- | `locale` | `string` | Current website locale.|
467
- | `comments` | `string` | Additional comments for a batch request.|
468
-
469
- Returns: An array of ```pageID``` of the requested page.
470
-
471
- ### pageRequestApproval
472
- | Parameter | Type | Description |
473
- | :-------- | :------- | :------------------------- |
474
- | `pageID` | `number` | The pageID of the requested page.|
475
- | `guid` | `string` | Current website guid.|
476
- | `locale` | `string` | Current website locale.|
477
- | `comments` | `string` | Additional comments for a batch request.|
478
-
479
- Returns: An array of ```pageID``` of the requested page.
480
-
481
- ### savePage
482
- | Parameter | Type | Description |
483
- | :-------- | :------- | :------------------------- |
484
- | `pageItem` | `PageItem` | The object of PageItem class for the requested Page.|
485
- | `guid` | `string` | Current website guid.|
486
- | `locale` | `string` | Current website locale.|
487
- | `parentPageID` | `number` | The id of the parent page.|
488
- | `placeBeforePageItemID` | `number` | The id of the page before the page.|
489
-
490
- Returns: An array of ```pageID``` of the requested page.
491
-
492
-
493
- ## Running the SDK Locally
494
-
495
- - `npm run clean`
496
- - `npm run prepare`
497
- - `npm run build`
498
-
499
- ## How It Works
500
-
501
- - [How Pages Work](https://help.agilitycms.com/hc/en-us/articles/4404222849677)
502
- - [How Page Modules Work](https://help.agilitycms.com/hc/en-us/articles/4404222989453)
503
- - [How Page Templates Work](https://help.agilitycms.com/hc/en-us/articles/4404229108877)
504
-
505
- ## Resources
506
-
507
- ### Agility CMS
508
-
509
- - [Official site](https://agilitycms.com)
510
- - [Documentation](https://help.agilitycms.com/hc/en-us)
511
-
512
- ### Community
513
-
514
- - [Official Slack](https://join.slack.com/t/agilitycommunity/shared_invite/enQtNzI2NDc3MzU4Njc2LWI2OTNjZTI3ZGY1NWRiNTYzNmEyNmI0MGZlZTRkYzI3NmRjNzkxYmI5YTZjNTg2ZTk4NGUzNjg5NzY3OWViZGI)
515
- - [Blog](https://agilitycms.com/resources/posts)
516
- - [GitHub](https://github.com/agility)
517
- - [Forums](https://help.agilitycms.com/hc/en-us/community/topics)
518
- - [Facebook](https://www.facebook.com/AgilityCMS/)
519
- - [Twitter](https://twitter.com/AgilityCMS)
520
-
521
- ## Feedback and Questions
522
-
1
+ # Agility CMS & Management API TypeScript SDK
2
+
3
+ ## About the Management API SDK
4
+
5
+ - Provides a facility to developers to use the new Agility Management API more effectively.
6
+ - Provides methods to perform operations on Assets, Batches, Containers, Content, Models, Pages, and Users.
7
+ - Supports the creation of Pages and Content in batches.
8
+ - Ability to generate Content in bulk for a Website.
9
+
10
+ ## Getting Started
11
+
12
+ ### Prerequisites
13
+ 1. Clone the repository agility-cms-management-sdk-typescript.
14
+ 2. Import the index file to make use of the Options class.
15
+ 3. Create an object of the Options class to provide values of -
16
+ - token -> Bearer token to authenticate a Rest Request to perform an operation.
17
+ 4. Create an object of Method class(es), which can be used to create and perform operations. Following is the description of Classes and their respective methods -
18
+
19
+ ### Making a Request
20
+ ```Javascript
21
+ import * as index from "./index";
22
+
23
+ //initialize the Options Class
24
+ let options = new index.Options();
25
+
26
+ options.token = "<<Provide Auth Token>>"
27
+ //Initialize the APIClient Class
28
+ let apiClient = new index.ApiClient(options);
29
+
30
+ let guid = "<<Provide the Guid of the Website>>";
31
+ let locale = "<<Provide the locale of the Website>>"; //Example: en-us
32
+
33
+
34
+
35
+ //make the request: get a content item with the ID '22'
36
+ var contentItem = await apiClient.contentMethods.getContentItem(22,guid, locale);
37
+
38
+ //To log the response of the contentItem object in console.
39
+ console.log(JSON.stringify(contentItem));
40
+ ```
41
+ ## Class AssetMethods
42
+ This class is used to perform operations related to Assets. The following are the methods: -
43
+
44
+ ### upload
45
+ | Parameter | Type | Description |
46
+ | :-------- | :------- | :------------------------- |
47
+ | `formData` | `FormData` | This is an object of type FormData where files can be posted eg : `const file = fs.readFileSync(<<Local File>>, null);const form = new FormData(); form.append('files',file,'<<File Name>>');`|
48
+ | `agilityFolderPath` | `string` | Path of the folder in Agility where the file(s) needs to be uploaded.|
49
+ | `guid` | `string` | Current website guid.|
50
+ | `groupingID` | `number` | Path of the folder in Agility where the file(s) needs to be uploaded.|
51
+
52
+ Returns: A collection of ```Media``` class Object.
53
+
54
+ ### createFolder
55
+ | Parameter | Type | Description |
56
+ | :-------- | :------- | :------------------------- |
57
+ | `originKey` | `string` | The origin key of the requested folder. |
58
+ | `guid` | `string` | Current website guid.|
59
+
60
+ Returns: A collection of ```Media``` class Object.
61
+
62
+ ### deleteFile
63
+ | Parameter | Type | Description |
64
+ | :-------- | :------- | :------------------------- |
65
+ | `mediaID` | `number` | The mediaID of the asset which needs to be deleted.|
66
+ | `guid` | `string` | Current website guid.|
67
+ Returns
68
+ A ```string``` response if a file has been deleted.
69
+
70
+ ### moveFile
71
+ | Parameter | Type | Description |
72
+ | :-------- | :------- | :------------------------- |
73
+ | `mediaID` | `number` | The mediaID of the file that needs to be moved.|
74
+ | `newFolder` | `string` | The new location (in Agility) where the file needs to be moved.|
75
+ | `guid` | `string` | Current website guid.|
76
+
77
+ Returns: An object of ```Media``` class with the new location of the file.
78
+
79
+ ### getMediaList
80
+ | Parameter | Type | Description |
81
+ | :-------- | :------- | :------------------------- |
82
+ | `pageSize` | `number` | The page size on which the assets needs to selected.|
83
+ | `recordOffset` | `number` | The record offset value to skip search results.|
84
+ | `guid` | `string` | Current website guid.|
85
+
86
+ Returns: An object of ```AssetMediaList``` class.
87
+
88
+ ### getGalleryById
89
+ | Parameter | Type | Description |
90
+ | :-------- | :------- | :------------------------- |
91
+ | `guid` | `string` | Current website guid.|
92
+ | `id` | `number` | The ID of the requested gallery.|
93
+
94
+ Returns: An object of ```assetMediaGrouping``` class.
95
+
96
+ ### getGalleryByName
97
+ | Parameter | Type | Description |
98
+ | :-------- | :------- | :------------------------- |
99
+ | `guid` | `string` | Current website guid.|
100
+ | `galleryName` | `string` | The name of the requested gallery.|
101
+
102
+ Returns: An object of ```assetMediaGrouping``` class.
103
+
104
+ ### getDefaultContainer
105
+ | Parameter | Type | Description |
106
+ | :-------- | :------- | :------------------------- |
107
+ | `guid` | `string` | Current website guid.|
108
+
109
+ Returns: An object of ```assetContainer``` class.
110
+
111
+ ### getGalleries
112
+ | Parameter | Type | Description |
113
+ | :-------- | :------- | :------------------------- |
114
+ | `guid` | `string` | Current website guid.|
115
+ | `search` | `string` | String to search a specific gallery item.|
116
+ | `pageSize` | `number` | The pageSize on which the galleries needs to be selected.|
117
+ | `rowIndex` | `number` | The rowIndex value for the resultant record set.|
118
+
119
+ Returns: An object of ```assetGalleries``` class.
120
+
121
+ ### saveGallery
122
+ | Parameter | Type | Description |
123
+ | :-------- | :------- | :------------------------- |
124
+ | `guid` | `string` | Current website guid.|
125
+ | `gallery` | `assetMediaGrouping` | Object of AssetMediaGrouping class.|
126
+
127
+ Returns: An object of ```assetMediaGrouping``` class.
128
+
129
+ ### deleteGallery
130
+ | Parameter | Type | Description |
131
+ | :-------- | :------- | :------------------------- |
132
+ | `guid` | `string` | Current website guid.|
133
+ | `id` | `number` | The id of the gallery to be deleted.|
134
+
135
+ A ```string``` response if the gallery has been deleted.
136
+
137
+ ### getAssetByID
138
+ | Parameter | Type | Description |
139
+ | :-------- | :------- | :------------------------- |
140
+ | `mediaID` | `number` | The mediaID of the requested asset.|
141
+ | `guid` | `string` | Current website guid.|
142
+
143
+ Returns: An object of ```Media``` class with the information of the asset.
144
+
145
+ ### getAssetByUrl
146
+ | Parameter | Type | Description |
147
+ | :-------- | :------- | :------------------------- |
148
+ | `url` | `string` | The url of the requested asset.|
149
+ | `guid` | `string` | Current website guid.|
150
+
151
+ Returns: An object of ```Media``` class with the information of the asset.
152
+
153
+ ## Class BatchMethods
154
+ This class is used to perform operations related to Batches. The following are the methods: -
155
+
156
+ ### getBatch
157
+ | Parameter | Type | Description |
158
+ | :-------- | :------- | :------------------------- |
159
+ | `id` | `number` | The batchID of the requested batch.|
160
+ | `guid` | `string` | Current website guid.|
161
+
162
+ Returns: A object of ```Batch``` class.
163
+
164
+ ## Class ContainerMethods
165
+ This class is used to perform operations related to Containers. The following are the methods: -
166
+
167
+ ### getContainerByID
168
+ | Parameter | Type | Description |
169
+ | :-------- | :------- | :------------------------- |
170
+ | `id` | `number` | The container id of the requested container.|
171
+ | `guid` | `string` | Current website guid.|
172
+
173
+ Returns: A object of ```Container``` class.
174
+
175
+ ### getContainerByReferenceName
176
+ | Parameter | Type | Description |
177
+ | :-------- | :------- | :------------------------- |
178
+ | `referenceName` | `string` | The container reference name of the requested container.|
179
+ | `guid` | `string` | Current website guid.|
180
+
181
+ Returns: A object of ```Container``` class.
182
+
183
+ ### getContainerSecurity
184
+ | Parameter | Type | Description |
185
+ | :-------- | :------- | :------------------------- |
186
+ | `id` | `number` | The container id of the requested container.|
187
+ | `guid` | `string` | Current website guid.|
188
+
189
+ Returns: A object of ```Container``` class.
190
+
191
+ ### getContainerList
192
+ | Parameter | Type | Description |
193
+ | :-------- | :------- | :------------------------- |
194
+ | `guid` | `string` | Current website guid.|
195
+ Returns: A collection object of ```Container``` class.
196
+
197
+ ### getNotificationList
198
+ | Parameter | Type | Description |
199
+ | :-------- | :------- | :------------------------- |
200
+ | `id` | `number` | The container id of the requested container.|
201
+ | `guid` | `string` | Current website guid.|
202
+ Returns: A collection object of ```Notification``` class.
203
+
204
+ ### saveContainer
205
+ | Parameter | Type | Description |
206
+ | :-------- | :------- | :------------------------- |
207
+ | `container` | `Container` | A Container type object to create or update a container.|
208
+ | `guid` | `string` | Current website guid.|
209
+
210
+ Returns: An object of ```Container``` class.
211
+
212
+ ### deleteContainer
213
+ | Parameter | Type | Description |
214
+ | :-------- | :------- | :------------------------- |
215
+ | `id` | `number` | The container id of the requested container.|
216
+ | `guid` | `string` | Current website guid.|
217
+ Returns: A ```string``` response if a container has been deleted.
218
+
219
+ ## Class ContentMethods
220
+ This class is used to perform operations related to Content. The following are the methods: -
221
+
222
+ ### getContentItem
223
+ | Parameter | Type | Description |
224
+ | :-------- | :------- | :------------------------- |
225
+ | `contentID` | `number` | The contentid of the requested content.|
226
+ | `guid` | `string` | Current website guid.|
227
+ | `locale` | `string` | Current website locale.|
228
+
229
+ Returns: An object of ```ContentItem``` class.
230
+
231
+ ### publishContent
232
+ | Parameter | Type | Description |
233
+ | :-------- | :------- | :------------------------- |
234
+ | `contentID` | `number` | The contentid of the requested content.|
235
+ | `guid` | `string` | Current website guid.|
236
+ | `locale` | `string` | Current website locale.|
237
+ | `comments` | `string` | Additional comments for a batch request.|
238
+
239
+ Returns: An array of ```contentID``` of the requested content.
240
+
241
+ ### unPublishContent
242
+ | Parameter | Type | Description |
243
+ | :-------- | :------- | :------------------------- |
244
+ | `contentID` | `number` | The contentid of the requested content.|
245
+ | `guid` | `string` | Current website guid.|
246
+ | `locale` | `string` | Current website locale.|
247
+ | `comments` | `string` | Additional comments for a batch request.|
248
+
249
+ Returns: An array of ```contentID``` of the requested content.
250
+
251
+ ### contentRequestApproval
252
+ | Parameter | Type | Description |
253
+ | :-------- | :------- | :------------------------- |
254
+ | `contentID` | `number` | The contentid of the requested content.|
255
+ | `guid` | `string` | Current website guid.|
256
+ | `locale` | `string` | Current website locale.|
257
+ | `comments` | `string` | Additional comments for a batch request.|
258
+
259
+ Returns: An array of ```contentID``` of the requested content.
260
+
261
+ ### approveContent
262
+ | Parameter | Type | Description |
263
+ | :-------- | :------- | :------------------------- |
264
+ | `contentID` | `number` | The contentid of the requested content.|
265
+ | `guid` | `string` | Current website guid.|
266
+ | `locale` | `string` | Current website locale.|
267
+ | `comments` | `string` | Additional comments for a batch request.|
268
+
269
+ Returns: An array of ```contentID``` of the requested content.
270
+
271
+ ### declineContent
272
+ | Parameter | Type | Description |
273
+ | :-------- | :------- | :------------------------- |
274
+ | `contentID` | `number` | The contentid of the requested content.|
275
+ | `guid` | `string` | Current website guid.|
276
+ | `locale` | `string` | Current website locale.|
277
+ | `comments` | `string` | Additional comments for a batch request.|
278
+
279
+ Returns: An array of ```contentID``` of the requested content.
280
+
281
+ ### saveContentItem
282
+ | Parameter | Type | Description |
283
+ | :-------- | :------- | :------------------------- |
284
+ | `contentItem` | `ContentItem` | A contentItem object to create or update a content.|
285
+ | `guid` | `string` | Current website guid.|
286
+ | `locale` | `string` | Current website locale.|
287
+
288
+ Returns: An array of ```contentID``` of the requested content.
289
+
290
+ ### saveContentItems
291
+ | Parameter | Type | Description |
292
+ | :-------- | :------- | :------------------------- |
293
+ | `contentItems` | `ContentItem[]` | A collection of contentItems object to create or update multiple contents.|
294
+ | `guid` | `string` | Current website guid.|
295
+ | `locale` | `string` | Current website locale.|
296
+
297
+ Returns: An array of ```contentID``` of the requested content.
298
+
299
+ ### deleteContent
300
+ | Parameter | Type | Description |
301
+ | :-------- | :------- | :------------------------- |
302
+ | `contentID` | `number` | The contentid of the requested content.|
303
+ | `guid` | `string` | Current website guid.|
304
+ | `locale` | `string` | Current website locale.|
305
+ | `comments` | `string` | Additional comments for a batch request.|
306
+
307
+ Returns: An array of ```contentID``` of the requested content.
308
+
309
+ ### getContentItems
310
+ | Parameter | Type | Description |
311
+ | :-------- | :------- | :------------------------- |
312
+ | `referenceName` | `string` | The reference name of the container for the requested content.|
313
+ | `guid` | `string` | Current website guid.|
314
+ | `locale` | `string` | Current website locale.|
315
+ | `filter` | `string` | The filter condition for the requested content.|
316
+ | `fields` | `string` | The fields mapped to the container.|
317
+ | `sortDirection` | `string` | The direction to sort the result.|
318
+ | `sortField` | `string` | The field on which the sort needs to be performed.|
319
+ | `take` | `number` | The page size for the result.|
320
+ | `skip` | `number` | The record offset for the result.|
321
+
322
+ Returns: An object of ```ContentList``` class of the requested content.
323
+
324
+ ## Class InstanceUserMethods
325
+ This class is used to perform operations related to User. The following are the methods: -
326
+
327
+ ### getUsers
328
+ | Parameter | Type | Description |
329
+ | :-------- | :------- | :------------------------- |
330
+ | `guid` | `string` | Current website guid.|
331
+ Returns: A collection of ```WebsiteUser``` class of the requested content.
332
+
333
+ ### saveUser
334
+ | Parameter | Type | Description |
335
+ | :-------- | :------- | :------------------------- |
336
+ | `emailAddress` | `string` | The email address of the requested user.|
337
+ | `roles` | `InstanceRole[]` | Collection object of InstanceRole class for the requested user.|
338
+ | `guid` | `string` | Current website guid.|
339
+ | `firstName` | `string` | The first name of the requested user.|
340
+ | `lastName` | `string` | The last name of the requested user.|
341
+
342
+ Returns: An object of the ```InstanceUser``` class.
343
+
344
+ ### deleteUser
345
+ | Parameter | Type | Description |
346
+ | :-------- | :------- | :------------------------- |
347
+ | `userID` | `number` | The userID of the requested user.|
348
+ | `guid` | `string` | Current website guid.|
349
+
350
+ Returns: A ```string``` response if a user has been deleted.
351
+
352
+ ## Class ModelMethods
353
+ This class is used to perform operations related to Models. The following are the methods: -
354
+
355
+ ### getContentModel
356
+ | Parameter | Type | Description |
357
+ | :-------- | :------- | :------------------------- |
358
+ | `id` | `number` | The id of the requested model.|
359
+ | `guid` | `string` | Current website guid.|
360
+
361
+ Returns: An object of ```Model``` class.
362
+
363
+ ### GetModelByReferenceName
364
+ | Parameter | Type | Description |
365
+ | :-------- | :------- | :------------------------- |
366
+ | `referenceName` | `string` | The referenceName of the requested model.|
367
+ | `guid` | `string` | The guid of the requested model.|
368
+
369
+ ### getContentModules
370
+ | Parameter | Type | Description |
371
+ | :-------- | :------- | :------------------------- |
372
+ | `includeDefaults` | `bool` | Boolean value to include defaults.|
373
+ | `guid` | `string` | Current website guid.|
374
+ | `includeModules` | `bool` | Boolean value to include modules.|
375
+
376
+ Returns: A collection object of ```Model``` class.
377
+
378
+ ### getPageModules
379
+ | Parameter | Type | Description |
380
+ | :-------- | :------- | :------------------------- |
381
+ | `includeDefault` | `bool` | Boolean value to include defaults.|
382
+ | `guid` | `string` | Current website guid.|
383
+
384
+ Returns: A collection object of ```Model``` class.
385
+
386
+ ### saveModel
387
+ | Parameter | Type | Description |
388
+ | :-------- | :------- | :------------------------- |
389
+ | `model` | `Model` | The object of Model to for the requested model.|
390
+ | `guid` | `string` | Current website guid.|
391
+
392
+ Returns: An object of ```Model``` class.
393
+
394
+ ### deleteModel
395
+ | Parameter | Type | Description |
396
+ | :-------- | :------- | :------------------------- |
397
+ | `id` | `number` | The id for the requested model.|
398
+ | `guid` | `string` | Current website guid.|
399
+
400
+ Returns: A ```string``` response if a model is deleted.
401
+
402
+ ## Class PageMethods
403
+ This class is used to perform operations related to Pages. The following are the methods: -
404
+
405
+ ### getSitemap
406
+ | Parameter | Type | Description |
407
+ | :-------- | :------- | :------------------------- |
408
+ | `guid` | `string` | Current website guid.|
409
+ | `locale` | `string` | Current website locale.|
410
+ Returns: A collection object of ```Sitemap``` class.
411
+
412
+ ### getPage
413
+ | Parameter | Type | Description |
414
+ | :-------- | :------- | :------------------------- |
415
+ | `pageID` | `number` | The id of the requested page.|
416
+ | `guid` | `string` | Current website guid.|
417
+ | `locale` | `string` | Current website locale.|
418
+
419
+ Returns: An object of ```PageItem``` class.
420
+
421
+ ### publishPage
422
+ | Parameter | Type | Description |
423
+ | :-------- | :------- | :------------------------- |
424
+ | `pageID` | `number` | The pageID of the requested page.|
425
+ | `guid` | `string` | Current website guid.|
426
+ | `locale` | `string` | Current website locale.|
427
+ | `comments` | `string` | Additional comments for a batch request.|
428
+
429
+ Returns: An array of ```pageID``` of the requested page.
430
+
431
+ ### unPublishPage
432
+ | Parameter | Type | Description |
433
+ | :-------- | :------- | :------------------------- |
434
+ | `pageID` | `number` | The pageID of the requested page.|
435
+ | `guid` | `string` | Current website guid.|
436
+ | `locale` | `string` | Current website locale.|
437
+ | `comments` | `string` | Additional comments for a batch request.|
438
+
439
+ Returns: An array of ```pageID``` of the requested page.
440
+
441
+ ### deletePage
442
+ | Parameter | Type | Description |
443
+ | :-------- | :------- | :------------------------- |
444
+ | `pageID` | `number` | The pageID of the requested page.|
445
+ | `guid` | `string` | Current website guid.|
446
+ | `locale` | `string` | Current website locale.|
447
+ | `comments` | `string` | Additional comments for a batch request.|
448
+
449
+ Returns: An array of ```pageID``` of the requested page.
450
+
451
+ ### approvePage
452
+ | Parameter | Type | Description |
453
+ | :-------- | :------- | :------------------------- |
454
+ | `pageID` | `number` | The pageID of the requested page.|
455
+ | `guid` | `string` | Current website guid.|
456
+ | `locale` | `string` | Current website locale.|
457
+ | `comments` | `string` | Additional comments for a batch request.|
458
+
459
+ Returns: An array of ```pageID``` of the requested page.
460
+
461
+ ### declinePage
462
+ | Parameter | Type | Description |
463
+ | :-------- | :------- | :------------------------- |
464
+ | `pageID` | `number` | The pageID of the requested page.|
465
+ | `guid` | `string` | Current website guid.|
466
+ | `locale` | `string` | Current website locale.|
467
+ | `comments` | `string` | Additional comments for a batch request.|
468
+
469
+ Returns: An array of ```pageID``` of the requested page.
470
+
471
+ ### pageRequestApproval
472
+ | Parameter | Type | Description |
473
+ | :-------- | :------- | :------------------------- |
474
+ | `pageID` | `number` | The pageID of the requested page.|
475
+ | `guid` | `string` | Current website guid.|
476
+ | `locale` | `string` | Current website locale.|
477
+ | `comments` | `string` | Additional comments for a batch request.|
478
+
479
+ Returns: An array of ```pageID``` of the requested page.
480
+
481
+ ### savePage
482
+ | Parameter | Type | Description |
483
+ | :-------- | :------- | :------------------------- |
484
+ | `pageItem` | `PageItem` | The object of PageItem class for the requested Page.|
485
+ | `guid` | `string` | Current website guid.|
486
+ | `locale` | `string` | Current website locale.|
487
+ | `parentPageID` | `number` | The id of the parent page.|
488
+ | `placeBeforePageItemID` | `number` | The id of the page before the page.|
489
+
490
+ Returns: An array of ```pageID``` of the requested page.
491
+
492
+
493
+ ## Running the SDK Locally
494
+
495
+ - `npm run clean`
496
+ - `npm run prepare`
497
+ - `npm run build`
498
+
499
+ ## How It Works
500
+
501
+ - [How Pages Work](https://help.agilitycms.com/hc/en-us/articles/4404222849677)
502
+ - [How Page Modules Work](https://help.agilitycms.com/hc/en-us/articles/4404222989453)
503
+ - [How Page Templates Work](https://help.agilitycms.com/hc/en-us/articles/4404229108877)
504
+
505
+ ## Resources
506
+
507
+ ### Agility CMS
508
+
509
+ - [Official site](https://agilitycms.com)
510
+ - [Documentation](https://help.agilitycms.com/hc/en-us)
511
+
512
+ ### Community
513
+
514
+ - [Official Slack](https://join.slack.com/t/agilitycommunity/shared_invite/enQtNzI2NDc3MzU4Njc2LWI2OTNjZTI3ZGY1NWRiNTYzNmEyNmI0MGZlZTRkYzI3NmRjNzkxYmI5YTZjNTg2ZTk4NGUzNjg5NzY3OWViZGI)
515
+ - [Blog](https://agilitycms.com/resources/posts)
516
+ - [GitHub](https://github.com/agility)
517
+ - [Forums](https://help.agilitycms.com/hc/en-us/community/topics)
518
+ - [Facebook](https://www.facebook.com/AgilityCMS/)
519
+ - [Twitter](https://twitter.com/AgilityCMS)
520
+
521
+ ## Feedback and Questions
522
+
523
523
  If you have feedback or questions about this starter, please use the [Github Issues](https://github.com/agility/agility-cms-management-sdk-typescript/issues) on this repo, join our [Community Slack Channel](https://join.slack.com/t/agilitycommunity/shared_invite/enQtNzI2NDc3MzU4Njc2LWI2OTNjZTI3ZGY1NWRiNTYzNmEyNmI0MGZlZTRkYzI3NmRjNzkxYmI5YTZjNTg2ZTk4NGUzNjg5NzY3OWViZGI) or create a post on the [Agility Developer Community](https://help.agilitycms.com/hc/en-us/community/topics).