@coveo/platform-client 57.1.0 → 57.2.1
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.
- package/dist/cjs/resources/ApiKeyTemplate/ApiKeyTemplate.js +5 -1
- package/dist/cjs/resources/ApiKeyTemplate/ApiKeyTemplate.js.map +1 -1
- package/dist/esm/resources/ApiKeyTemplate/ApiKeyTemplate.js +5 -1
- package/dist/esm/resources/ApiKeyTemplate/ApiKeyTemplate.js.map +1 -1
- package/dist/types/resources/ApiKeyTemplate/ApiKeyTemplate.d.ts +2 -1
- package/dist/types/resources/ApiKeyTemplate/ApiKeyTemplateInterface.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const APICore_js_1 = tslib_1.__importDefault(require("../../APICore.js"));
|
|
4
5
|
const Resource_js_1 = tslib_1.__importDefault(require("../Resource.js"));
|
|
5
6
|
class ApiKeyTemplate extends Resource_js_1.default {
|
|
6
|
-
static baseUrl =
|
|
7
|
+
static baseUrl = `/rest/organizations/${APICore_js_1.default.orgPlaceholder}/templates/apikeys`;
|
|
7
8
|
get(apiKeyTemplateId) {
|
|
8
9
|
return this.api.get(`${ApiKeyTemplate.baseUrl}/${apiKeyTemplateId}`);
|
|
9
10
|
}
|
|
11
|
+
listAPIKeysEligibility() {
|
|
12
|
+
return this.api.get(`${ApiKeyTemplate.baseUrl}/privileges/eligibility`);
|
|
13
|
+
}
|
|
10
14
|
}
|
|
11
15
|
exports.default = ApiKeyTemplate;
|
|
12
16
|
//# 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,
|
|
1
|
+
{"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":";;;AAAA,0EAAmC;AACnC,yEAAsC;AAGtC,MAAqB,cAAe,SAAQ,qBAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,uBAAuB,oBAAG,CAAC,cAAc,oBAAoB,CAAC;IAE/E,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"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import API from '../../APICore.js';
|
|
1
2
|
import Resource from '../Resource.js';
|
|
2
3
|
export default class ApiKeyTemplate extends Resource {
|
|
3
|
-
static baseUrl =
|
|
4
|
+
static baseUrl = `/rest/organizations/${API.orgPlaceholder}/templates/apikeys`;
|
|
4
5
|
get(apiKeyTemplateId) {
|
|
5
6
|
return this.api.get(`${ApiKeyTemplate.baseUrl}/${apiKeyTemplateId}`);
|
|
6
7
|
}
|
|
8
|
+
listAPIKeysEligibility() {
|
|
9
|
+
return this.api.get(`${ApiKeyTemplate.baseUrl}/privileges/eligibility`);
|
|
10
|
+
}
|
|
7
11
|
}
|
|
8
12
|
//# 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,
|
|
1
|
+
{"version":3,"file":"ApiKeyTemplate.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeyTemplate/ApiKeyTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,uBAAuB,GAAG,CAAC,cAAc,oBAAoB,CAAC;IAE/E,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
|
+
}
|