@coveo/platform-client 57.1.0 → 57.2.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.
@@ -7,6 +7,9 @@ class ApiKeyTemplate extends Resource_js_1.default {
7
7
  get(apiKeyTemplateId) {
8
8
  return this.api.get(`${ApiKeyTemplate.baseUrl}/${apiKeyTemplateId}`);
9
9
  }
10
+ listAPIKeysEligibility() {
11
+ return this.api.get(`${ApiKeyTemplate.baseUrl}/privileges/eligibility`);
12
+ }
10
13
  }
11
14
  exports.default = ApiKeyTemplate;
12
15
  //# sourceMappingURL=ApiKeyTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":";;;AAAA,yEAAsC;AAGtC,MAAqB,cAAe,SAAQ,qBAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAE3C,GAAG,CAAC,gBAAwB;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAsB,GAAG,cAAc,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,CAAC;IAC9F,CAAC;;AALL,iCAMC"}
1
+ {"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":";;;AAAA,yEAAsC;AAGtC,MAAqB,cAAe,SAAQ,qBAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAE3C,GAAG,CAAC,gBAAwB;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAsB,GAAG,cAAc,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,sBAAsB;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,GAAG,cAAc,CAAC,OAAO,yBAAyB,CACrD,CAAC;IACN,CAAC;;AAXL,iCAYC"}
@@ -4,5 +4,8 @@ export default class ApiKeyTemplate extends Resource {
4
4
  get(apiKeyTemplateId) {
5
5
  return this.api.get(`${ApiKeyTemplate.baseUrl}/${apiKeyTemplateId}`);
6
6
  }
7
+ listAPIKeysEligibility() {
8
+ return this.api.get(`${ApiKeyTemplate.baseUrl}/privileges/eligibility`);
9
+ }
7
10
  }
8
11
  //# sourceMappingURL=ApiKeyTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAE3C,GAAG,CAAC,gBAAwB;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAsB,GAAG,cAAc,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,CAAC;IAC9F,CAAC"}
1
+ {"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAE3C,GAAG,CAAC,gBAAwB;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAsB,GAAG,cAAc,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,sBAAsB;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,GAAG,cAAc,CAAC,OAAO,yBAAyB,CACrD,CAAC;IACN,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Resource from '../Resource.js';
2
- import { ApiKeyTemplateModel } from './ApiKeyTemplateInterface.js';
2
+ import { ApiKeyTemplateEligibilityResponseModel, ApiKeyTemplateModel } from './ApiKeyTemplateInterface.js';
3
3
  export default class ApiKeyTemplate extends Resource {
4
4
  static baseUrl: string;
5
5
  get(apiKeyTemplateId: string): Promise<ApiKeyTemplateModel>;
6
+ listAPIKeysEligibility(): Promise<ApiKeyTemplateEligibilityResponseModel[]>;
6
7
  }
@@ -25,3 +25,17 @@ export interface ApiKeyTemplateModel {
25
25
  */
26
26
  privileges?: PrivilegeModel[];
27
27
  }
28
+ export interface ApiKeyTemplateEligibilityResponseModel {
29
+ /**
30
+ * The id of the template
31
+ */
32
+ id: string;
33
+ /**
34
+ * The list of privileges missing to access the template
35
+ */
36
+ missingPrivileges: PrivilegeModel[];
37
+ /**
38
+ * If the user can generate an API key from this template
39
+ */
40
+ canGenerate: boolean;
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/platform-client",
3
- "version": "57.1.0",
3
+ "version": "57.2.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {