You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/create-contentful-api.js
+74-15Lines changed: 74 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,46 @@
1
-
importerrorHandlerfrom'./error-handler'
2
-
importentitiesfrom'./entities'
1
+
/**
2
+
* Contentful Management API Client. Contains methods which allow access to
3
+
* any operations that can be performed with a management token.
4
+
* @namespace ContentfulClientAPI
5
+
*/
6
+
7
+
/**
8
+
* Types for meta information found across the different entities in Contentful
9
+
* @namespace Meta
10
+
*/
11
+
12
+
/**
13
+
* System metadata. See <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes">Common Resource Attributes</a> for more details.
14
+
* @memberof Meta
15
+
* @typedef Sys
16
+
* @prop {string} type
17
+
* @prop {string} id
18
+
* @prop {Meta.Link} space
19
+
* @prop {string} createdAt
20
+
* @prop {string} updatedAt
21
+
* @prop {number} revision
22
+
*/
3
23
4
24
/**
5
-
* @typedef {ClientAPI} ClientAPI
6
-
* @property {function(id: string): Promise<Space>} getSpace - Gets a space with the spcified id
7
-
* @property {function(): Promise<SpaceCollection>} getSpaces - Gets a collection of spaces
8
-
* @property {function(data: {name: string}): Promise<Space>} createSpace - Creates a space
9
-
* @property {function(): Promise<OrganizationCollection>} getOrganizations - Gets a collection of Organizations
25
+
* Link to another entity. See <a href="https://www.contentful.com/developers/docs/concepts/links/">Links</a> for more details.
26
+
* @memberof Meta
27
+
* @typedef Link
28
+
* @prop {string} type - type of this entity. Always link.
29
+
* @prop {string} id
30
+
* @prop {string} linkType - type of this link. If defined, either Entry or Asset
10
31
*/
11
32
33
+
/**
34
+
* @memberof ContentfulClientAPI
35
+
* @typedef {Object} ClientAPI
36
+
* @prop {function} getSpace
37
+
* @prop {function} getSpaces
38
+
* @prop {function} createSpace
39
+
*/
40
+
41
+
importerrorHandlerfrom'./error-handler'
42
+
importentitiesfrom'./entities'
43
+
12
44
/**
13
45
* Creates API object with methods to access functionality from Contentful's
0 commit comments