@datocms/cma-client 5.2.1-alpha.0 → 5.2.2-alpha.0

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.2.1-alpha.0', 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.2.2-alpha.0', 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
@@ -3275,6 +3275,14 @@ export type AccessToken = {
3275
3275
  */
3276
3276
  can_access_cma: boolean;
3277
3277
  hardcoded_type: null | string;
3278
+ /**
3279
+ * When this API token was last used to access the Content Management API
3280
+ */
3281
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3282
+ /**
3283
+ * When this API token was last used to access the Content Delivery API
3284
+ */
3285
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3278
3286
  role: RoleData | null;
3279
3287
  };
3280
3288
  export type AccessTokenCreateTargetSchema = AccessToken;
@@ -3320,6 +3328,14 @@ export type AccessTokenAttributes = {
3320
3328
  */
3321
3329
  can_access_cma: boolean;
3322
3330
  hardcoded_type: null | string;
3331
+ /**
3332
+ * When this API token was last used to access the Content Management API
3333
+ */
3334
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3335
+ /**
3336
+ * When this API token was last used to access the Content Delivery API
3337
+ */
3338
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3323
3339
  };
3324
3340
  /**
3325
3341
  * JSON API links
@@ -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.2.1-alpha.0', 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.2.2-alpha.0', 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
@@ -2833,6 +2833,14 @@ export type AccessTokenAttributes = {
2833
2833
  */
2834
2834
  can_access_cma: boolean;
2835
2835
  hardcoded_type: null | string;
2836
+ /**
2837
+ * When this API token was last used to access the Content Management API
2838
+ */
2839
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
2840
+ /**
2841
+ * When this API token was last used to access the Content Delivery API
2842
+ */
2843
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
2836
2844
  };
2837
2845
  /**
2838
2846
  * JSON API links
@@ -3275,6 +3275,14 @@ export type AccessToken = {
3275
3275
  */
3276
3276
  can_access_cma: boolean;
3277
3277
  hardcoded_type: null | string;
3278
+ /**
3279
+ * When this API token was last used to access the Content Management API
3280
+ */
3281
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3282
+ /**
3283
+ * When this API token was last used to access the Content Delivery API
3284
+ */
3285
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3278
3286
  role: RoleData | null;
3279
3287
  };
3280
3288
  export type AccessTokenCreateTargetSchema = AccessToken;
@@ -3320,6 +3328,14 @@ export type AccessTokenAttributes = {
3320
3328
  */
3321
3329
  can_access_cma: boolean;
3322
3330
  hardcoded_type: null | string;
3331
+ /**
3332
+ * When this API token was last used to access the Content Management API
3333
+ */
3334
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3335
+ /**
3336
+ * When this API token was last used to access the Content Delivery API
3337
+ */
3338
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
3323
3339
  };
3324
3340
  /**
3325
3341
  * JSON API links
@@ -2833,6 +2833,14 @@ export type AccessTokenAttributes = {
2833
2833
  */
2834
2834
  can_access_cma: boolean;
2835
2835
  hardcoded_type: null | string;
2836
+ /**
2837
+ * When this API token was last used to access the Content Management API
2838
+ */
2839
+ last_cma_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
2840
+ /**
2841
+ * When this API token was last used to access the Content Delivery API
2842
+ */
2843
+ last_cda_access: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'never';
2836
2844
  };
2837
2845
  /**
2838
2846
  * JSON API links
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "5.2.1-alpha.0",
3
+ "version": "5.2.2-alpha.0",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -45,5 +45,5 @@
45
45
  "@datocms/dashboard-client": "^5.2.0",
46
46
  "@types/uuid": "^9.0.7"
47
47
  },
48
- "gitHead": "83db6c41a51a5f40056b7f60106c470918bcd02f"
48
+ "gitHead": "98dfd1f029816efecfa3167b60f615431030a8a7"
49
49
  }
@@ -3582,6 +3582,28 @@ export type AccessToken = {
3582
3582
  */
3583
3583
  can_access_cma: boolean;
3584
3584
  hardcoded_type: null | string;
3585
+ /**
3586
+ * When this API token was last used to access the Content Management API
3587
+ */
3588
+ last_cma_access:
3589
+ | 'today'
3590
+ | 'yesterday'
3591
+ | 'this_week'
3592
+ | 'last_week'
3593
+ | 'this_month'
3594
+ | 'last_month'
3595
+ | 'never';
3596
+ /**
3597
+ * When this API token was last used to access the Content Delivery API
3598
+ */
3599
+ last_cda_access:
3600
+ | 'today'
3601
+ | 'yesterday'
3602
+ | 'this_week'
3603
+ | 'last_week'
3604
+ | 'this_month'
3605
+ | 'last_month'
3606
+ | 'never';
3585
3607
  role: RoleData | null;
3586
3608
  };
3587
3609
  export type AccessTokenCreateTargetSchema = AccessToken;
@@ -3627,6 +3649,28 @@ export type AccessTokenAttributes = {
3627
3649
  */
3628
3650
  can_access_cma: boolean;
3629
3651
  hardcoded_type: null | string;
3652
+ /**
3653
+ * When this API token was last used to access the Content Management API
3654
+ */
3655
+ last_cma_access:
3656
+ | 'today'
3657
+ | 'yesterday'
3658
+ | 'this_week'
3659
+ | 'last_week'
3660
+ | 'this_month'
3661
+ | 'last_month'
3662
+ | 'never';
3663
+ /**
3664
+ * When this API token was last used to access the Content Delivery API
3665
+ */
3666
+ last_cda_access:
3667
+ | 'today'
3668
+ | 'yesterday'
3669
+ | 'this_week'
3670
+ | 'last_week'
3671
+ | 'this_month'
3672
+ | 'last_month'
3673
+ | 'never';
3630
3674
  };
3631
3675
  /**
3632
3676
  * JSON API links
@@ -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.2.1-alpha.0',
154
+ userAgent: '@datocms/cma-client v5.2.2-alpha.0',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -3075,6 +3075,28 @@ export type AccessTokenAttributes = {
3075
3075
  */
3076
3076
  can_access_cma: boolean;
3077
3077
  hardcoded_type: null | string;
3078
+ /**
3079
+ * When this API token was last used to access the Content Management API
3080
+ */
3081
+ last_cma_access:
3082
+ | 'today'
3083
+ | 'yesterday'
3084
+ | 'this_week'
3085
+ | 'last_week'
3086
+ | 'this_month'
3087
+ | 'last_month'
3088
+ | 'never';
3089
+ /**
3090
+ * When this API token was last used to access the Content Delivery API
3091
+ */
3092
+ last_cda_access:
3093
+ | 'today'
3094
+ | 'yesterday'
3095
+ | 'this_week'
3096
+ | 'last_week'
3097
+ | 'this_month'
3098
+ | 'last_month'
3099
+ | 'never';
3078
3100
  };
3079
3101
  /**
3080
3102
  * JSON API links