@datocms/cma-client 5.1.6 → 5.1.7
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.
|
@@ -88,7 +88,7 @@ class Client {
|
|
|
88
88
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
89
89
|
}
|
|
90
90
|
request(options) {
|
|
91
|
-
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.1.
|
|
91
|
+
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.1.7', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
92
92
|
? { 'X-Environment': this.config.environment }
|
|
93
93
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
94
94
|
return this.jobResultsFetcher
|
|
@@ -62,7 +62,7 @@ export class Client {
|
|
|
62
62
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
63
63
|
}
|
|
64
64
|
request(options) {
|
|
65
|
-
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.
|
|
65
|
+
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.7', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
66
66
|
? { 'X-Environment': this.config.environment }
|
|
67
67
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
68
68
|
return this.jobResultsFetcher
|
|
@@ -7,7 +7,7 @@ import type * as RawApiTypes from '../generated/RawApiTypes';
|
|
|
7
7
|
* for various locales structured as an object, such as
|
|
8
8
|
* `{ "en": "Hello", "it": "Ciao" }`
|
|
9
9
|
*/
|
|
10
|
-
export type LocalizedFieldValue<T = unknown, L extends string = string> = Record<L, T
|
|
10
|
+
export type LocalizedFieldValue<T = unknown, L extends string = string> = Partial<Record<L, T>>;
|
|
11
11
|
/**
|
|
12
12
|
* Determines whether a DatoCMS field is localized or not.
|
|
13
13
|
*
|
|
@@ -7,7 +7,7 @@ import type * as RawApiTypes from '../generated/RawApiTypes';
|
|
|
7
7
|
* for various locales structured as an object, such as
|
|
8
8
|
* `{ "en": "Hello", "it": "Ciao" }`
|
|
9
9
|
*/
|
|
10
|
-
export type LocalizedFieldValue<T = unknown, L extends string = string> = Record<L, T
|
|
10
|
+
export type LocalizedFieldValue<T = unknown, L extends string = string> = Partial<Record<L, T>>;
|
|
11
11
|
/**
|
|
12
12
|
* Determines whether a DatoCMS field is localized or not.
|
|
13
13
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
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.1.
|
|
45
|
+
"@datocms/dashboard-client": "^5.1.7",
|
|
46
46
|
"@types/uuid": "^9.0.7"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "97a5dc490c53dfdd092146ae0e154ede5083ca68"
|
|
49
49
|
}
|
package/src/generated/Client.ts
CHANGED
|
@@ -147,7 +147,7 @@ export class Client {
|
|
|
147
147
|
...this.config,
|
|
148
148
|
...options,
|
|
149
149
|
logFn: this.config.logFn || console.log,
|
|
150
|
-
userAgent: '@datocms/cma-client v5.1.
|
|
150
|
+
userAgent: '@datocms/cma-client v5.1.7',
|
|
151
151
|
baseUrl: this.baseUrl,
|
|
152
152
|
preCallStack: new Error().stack,
|
|
153
153
|
extraHeaders: {
|
|
@@ -30,7 +30,7 @@ import type * as RawApiTypes from '../generated/RawApiTypes';
|
|
|
30
30
|
export type LocalizedFieldValue<
|
|
31
31
|
T = unknown,
|
|
32
32
|
L extends string = string,
|
|
33
|
-
> = Record<L, T
|
|
33
|
+
> = Partial<Record<L, T>>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Determines whether a DatoCMS field is localized or not.
|