@datocms/cma-client 5.4.18 → 5.4.20

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.
@@ -90,7 +90,7 @@ class Client {
90
90
  return this.config.baseUrl || Client.defaultBaseUrl;
91
91
  }
92
92
  request(options) {
93
- return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.4.18', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
93
+ return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.4.20', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
94
94
  ? { 'X-Environment': this.config.environment }
95
95
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
96
96
  return this.jobResultsFetcher
@@ -63,6 +63,35 @@ class Session extends BaseResource_js_1.default {
63
63
  body,
64
64
  });
65
65
  }
66
+ /**
67
+ * Destroy the current session
68
+ *
69
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
70
+ *
71
+ * @throws {ApiError}
72
+ * @throws {TimeoutError}
73
+ *
74
+ * @deprecated This API call is to be considered private and might change without notice
75
+ */
76
+ destroy() {
77
+ return this.rawDestroy();
78
+ }
79
+ /**
80
+ * Destroy the current session
81
+ *
82
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
83
+ *
84
+ * @throws {ApiError}
85
+ * @throws {TimeoutError}
86
+ *
87
+ * @deprecated This API call is to be considered private and might change without notice
88
+ */
89
+ rawDestroy() {
90
+ return this.client.request({
91
+ method: 'DELETE',
92
+ url: '/session',
93
+ });
94
+ }
66
95
  }
67
96
  exports.default = Session;
68
97
  Session.TYPE = 'session';
@@ -1 +1 @@
1
- {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,4EAAiD;AAIjD,MAAqB,OAAQ,SAAQ,yBAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AA3CH,0BA4CC;AA3CiB,YAAI,GAAG,SAAkB,CAAC"}
1
+ {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,4EAAiD;AAIjD,MAAqB,OAAQ,SAAQ,yBAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO;YAC/B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,UAAU;SAChB,CAAC,CAAC;IACL,CAAC;;AA1EH,0BA2EC;AA1EiB,YAAI,GAAG,SAAkB,CAAC"}
@@ -64,7 +64,7 @@ export class Client {
64
64
  return this.config.baseUrl || Client.defaultBaseUrl;
65
65
  }
66
66
  request(options) {
67
- return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.4.18', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
67
+ return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.4.20', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
68
68
  ? { 'X-Environment': this.config.environment }
69
69
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
70
70
  return this.jobResultsFetcher
@@ -25,4 +25,26 @@ export default class Session extends BaseResource {
25
25
  * @deprecated This API call is to be considered private and might change without notice
26
26
  */
27
27
  rawCreate(body: RawApiTypes.SessionCreateSchema): Promise<RawApiTypes.SessionCreateTargetSchema>;
28
+ /**
29
+ * Destroy the current session
30
+ *
31
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
32
+ *
33
+ * @throws {ApiError}
34
+ * @throws {TimeoutError}
35
+ *
36
+ * @deprecated This API call is to be considered private and might change without notice
37
+ */
38
+ destroy(): Promise<void>;
39
+ /**
40
+ * Destroy the current session
41
+ *
42
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
43
+ *
44
+ * @throws {ApiError}
45
+ * @throws {TimeoutError}
46
+ *
47
+ * @deprecated This API call is to be considered private and might change without notice
48
+ */
49
+ rawDestroy(): Promise<void>;
28
50
  }
@@ -35,6 +35,35 @@ export default class Session extends BaseResource {
35
35
  body,
36
36
  });
37
37
  }
38
+ /**
39
+ * Destroy the current session
40
+ *
41
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
42
+ *
43
+ * @throws {ApiError}
44
+ * @throws {TimeoutError}
45
+ *
46
+ * @deprecated This API call is to be considered private and might change without notice
47
+ */
48
+ destroy() {
49
+ return this.rawDestroy();
50
+ }
51
+ /**
52
+ * Destroy the current session
53
+ *
54
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
55
+ *
56
+ * @throws {ApiError}
57
+ * @throws {TimeoutError}
58
+ *
59
+ * @deprecated This API call is to be considered private and might change without notice
60
+ */
61
+ rawDestroy() {
62
+ return this.client.request({
63
+ method: 'DELETE',
64
+ url: '/session',
65
+ });
66
+ }
38
67
  }
39
68
  Session.TYPE = 'session';
40
69
  //# sourceMappingURL=Session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AA1Ce,YAAI,GAAG,SAAkB,CAAC"}
1
+ {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO;YAC/B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,UAAU;SAChB,CAAC,CAAC;IACL,CAAC;;AAzEe,YAAI,GAAG,SAAkB,CAAC"}
@@ -25,4 +25,26 @@ export default class Session extends BaseResource {
25
25
  * @deprecated This API call is to be considered private and might change without notice
26
26
  */
27
27
  rawCreate(body: RawApiTypes.SessionCreateSchema): Promise<RawApiTypes.SessionCreateTargetSchema>;
28
+ /**
29
+ * Destroy the current session
30
+ *
31
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
32
+ *
33
+ * @throws {ApiError}
34
+ * @throws {TimeoutError}
35
+ *
36
+ * @deprecated This API call is to be considered private and might change without notice
37
+ */
38
+ destroy(): Promise<void>;
39
+ /**
40
+ * Destroy the current session
41
+ *
42
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
43
+ *
44
+ * @throws {ApiError}
45
+ * @throws {TimeoutError}
46
+ *
47
+ * @deprecated This API call is to be considered private and might change without notice
48
+ */
49
+ rawDestroy(): Promise<void>;
28
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "5.4.18",
3
+ "version": "5.4.20",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -42,8 +42,8 @@
42
42
  "uuid": "^9.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@datocms/dashboard-client": "^5.4.9",
45
+ "@datocms/dashboard-client": "^5.4.20",
46
46
  "@types/uuid": "^9.0.7"
47
47
  },
48
- "gitHead": "4f7d64737c1abd7cb2568604a99f2dd0eda6020b"
48
+ "gitHead": "3bf94319989323e8c035e96ba952477b141b30f3"
49
49
  }
package/resources.json CHANGED
@@ -1649,6 +1649,22 @@
1649
1649
  "deprecated": "This API call is to be considered private and might change without notice",
1650
1650
  "name": "create",
1651
1651
  "rawName": "rawCreate"
1652
+ },
1653
+ {
1654
+ "returnsItem": false,
1655
+ "requestBodyRequiresItem": false,
1656
+ "offersNestedItemsOptionInQueryParams": false,
1657
+ "docUrl": "https://www.datocms.com/docs/content-management-api/resources/session/destroy",
1658
+ "rel": "destroy",
1659
+ "urlTemplate": "/session",
1660
+ "method": "DELETE",
1661
+ "comment": "Destroy the current session",
1662
+ "urlPlaceholders": [],
1663
+ "optionalRequestBody": false,
1664
+ "queryParamsRequired": false,
1665
+ "deprecated": "This API call is to be considered private and might change without notice",
1666
+ "name": "destroy",
1667
+ "rawName": "rawDestroy"
1652
1668
  }
1653
1669
  ],
1654
1670
  "namespace": "session",
@@ -151,7 +151,7 @@ export class Client {
151
151
  ...this.config,
152
152
  ...options,
153
153
  logFn: this.config.logFn || console.log,
154
- userAgent: '@datocms/cma-client v5.4.18',
154
+ userAgent: '@datocms/cma-client v5.4.20',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -47,4 +47,35 @@ export default class Session extends BaseResource {
47
47
  body,
48
48
  });
49
49
  }
50
+
51
+ /**
52
+ * Destroy the current session
53
+ *
54
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
55
+ *
56
+ * @throws {ApiError}
57
+ * @throws {TimeoutError}
58
+ *
59
+ * @deprecated This API call is to be considered private and might change without notice
60
+ */
61
+ destroy() {
62
+ return this.rawDestroy();
63
+ }
64
+
65
+ /**
66
+ * Destroy the current session
67
+ *
68
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
69
+ *
70
+ * @throws {ApiError}
71
+ * @throws {TimeoutError}
72
+ *
73
+ * @deprecated This API call is to be considered private and might change without notice
74
+ */
75
+ rawDestroy(): Promise<void> {
76
+ return this.client.request<void>({
77
+ method: 'DELETE',
78
+ url: '/session',
79
+ });
80
+ }
50
81
  }