@coveo/platform-client 56.1.0 → 56.3.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.
@@ -24,6 +24,12 @@ class ApiKey extends Resource_js_1.default {
24
24
  delete(apiKeyId) {
25
25
  return this.api.delete(`${ApiKey.baseUrl}/${apiKeyId}`);
26
26
  }
27
+ extend(apiKeyId) {
28
+ return this.api.put(`${ApiKey.baseUrl}/${apiKeyId}/activation/extend`);
29
+ }
30
+ duplicate(apiKeyId, options) {
31
+ return this.api.put(this.buildPath(`${ApiKey.baseUrl}/${apiKeyId}/duplicate`), options);
32
+ }
27
33
  }
28
34
  exports.default = ApiKey;
29
35
  //# sourceMappingURL=ApiKeys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiKeys.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeys/ApiKeys.ts"],"names":[],"mappings":";;;AAAA,0EAAmC;AAEnC,yEAAsC;AAGtC,MAAqB,MAAO,SAAQ,qBAAQ;IACxC,MAAM,CAAC,OAAO,GAAG,uBAAuB,oBAAG,CAAC,cAAc,UAAU,CAAC;IAErE,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,MAA6C,EAAE,OAA6B;QAC/E,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAc,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IACvF,CAAC;IAED,GAAG,CAAC,QAAgB;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAc,GAAG,MAAM,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,MAAM,CAAC,MAAmB;QACtB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,MA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OAAO,IAAI,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,CAAC,MAAmB;QACtB,MAAM,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAEzF,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,QAAgB;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,QAAgB;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAO,GAAG,MAAM,CAAC,OAAO,IAAI,QAAQ,oBAAoB,CAAC,CAAC;IACjF,CAAC;IAED,SAAS,CAAC,QAAgB,EAAE,OAA+B;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAc,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,QAAQ,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;;AAnCL,yBAoCC"}
@@ -5,45 +5,88 @@ const APICore_js_1 = tslib_1.__importDefault(require("../../APICore.js"));
5
5
  const Resource_js_1 = tslib_1.__importDefault(require("../Resource.js"));
6
6
  class Extension extends Resource_js_1.default {
7
7
  static baseUrl = `/rest/organizations/${APICore_js_1.default.orgPlaceholder}/extensions`;
8
+ /**
9
+ * Creates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
10
+ * @param extension The configuration to use for the new extension.
11
+ * @returns The newly created extension.
12
+ */
8
13
  create(extension) {
9
14
  return this.api.post(Extension.baseUrl, extension);
10
15
  }
16
+ /**
17
+ * Updates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
18
+ * @param extensionId The unique identifier of the extension to update.
19
+ * @param options The new configuration to use for the updated extension.
20
+ * @returns The updated extension.
21
+ */
11
22
  update(extensionId, options) {
12
23
  return this.api.put(`${Extension.baseUrl}/${extensionId}`, options);
13
24
  }
25
+ /**
26
+ * Deletes an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
27
+ * @param extensionId The unique identifier of the extension to delete.
28
+ * @returns
29
+ */
14
30
  delete(extensionId) {
15
31
  return this.api.delete(`${Extension.baseUrl}/${extensionId}`);
16
32
  }
33
+ /**
34
+ * Enables a disabled [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
35
+ *
36
+ * Note: Disabled extensions are not executed.
37
+ * @param extensionId The unique identifier of the extension to enable.
38
+ * @returns
39
+ */
17
40
  enable(extensionId) {
18
41
  return this.api.post(`${Extension.baseUrl}/${extensionId}/enable`);
19
42
  }
43
+ /**
44
+ * Disables an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
45
+ *
46
+ * Note: Disabled extensions are not executed.
47
+ * @param extensionId The unique identifier of the extension to disable.
48
+ * @param reason The reason why the extension is disabled.
49
+ * @returns
50
+ */
20
51
  disable(extensionId, reason) {
21
52
  return this.api.post(`${Extension.baseUrl}/${extensionId}/disable`, { reason });
22
53
  }
54
+ /**
55
+ * Shows an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
56
+ * @param extensionId Shows an extension in a Coveo Cloud organization.
57
+ * @returns The extension specified by the provided id.
58
+ */
23
59
  get(extensionId) {
24
60
  return this.api.get(`${Extension.baseUrl}/${extensionId}`);
25
61
  }
62
+ /**
63
+ * Lists all [extensions](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
64
+ * @returns A list of extensions.
65
+ */
26
66
  list() {
27
67
  return this.api.get(Extension.baseUrl);
28
68
  }
29
69
  /**
30
70
  * Lists all versions of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
31
- * @param extensionId
71
+ * @param extensionId he unique identifier of the target extension.
72
+ * @returns A list of versions of the extension.
32
73
  */
33
74
  listVersions(extensionId) {
34
75
  return this.api.get(`${Extension.baseUrl}/${extensionId}/versions`);
35
76
  }
36
77
  /**
37
78
  * Shows a specific version of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
38
- * @param extensionId
39
- * @param versionId
79
+ * @param extensionId The unique identifier of the target extension.
80
+ * @param versionId The unique identifier of the extension version to show.
81
+ * @returns The extension specified by the provided id and version id.
40
82
  */
41
83
  getVersion(extensionId, versionId) {
42
84
  return this.api.get(`${Extension.baseUrl}/${extensionId}/versions/${versionId}`);
43
85
  }
44
86
  /**
45
- * Validates the extension's script
87
+ * Tries to compile code that would be used in an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
46
88
  * @param extensionCode The code to compile
89
+ * @returns Details regarding the outcome of an extension script compilation.
47
90
  */
48
91
  validateCode(extensionCode) {
49
92
  return this.api.post(`${Extension.baseUrl}/test/compile`, extensionCode);
@@ -1 +1 @@
1
- {"version":3,"file":"Extensions.js","sourceRoot":"","sources":["../../../../src/resources/Extensions/Extensions.ts"],"names":[],"mappings":";;;AAAA,0EAAmC;AACnC,yEAAsC;AAStC,MAAqB,SAAU,SAAQ,qBAAQ;IAC3C,MAAM,CAAC,OAAO,GAAG,uBAAuB,oBAAG,CAAC,cAAc,aAAa,CAAC;IAExE,MAAM,CAAC,SAA0B;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAiB,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,WAAmB,EAAE,OAAwB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,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;OAGG;IACH,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAmB,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,WAAmB;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiC,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,WAAW,CAAC,CAAC;IACxG,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,WAAmB,EAAE,SAAiB;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiB,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,aAAa,SAAS,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,aAAmC;QAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAyB,GAAG,SAAS,CAAC,OAAO,eAAe,EAAE,aAAa,CAAC,CAAC;IACrG,CAAC;;AAjGL,4BAkGC"}
@@ -21,5 +21,11 @@ export default class ApiKey extends Resource {
21
21
  delete(apiKeyId) {
22
22
  return this.api.delete(`${ApiKey.baseUrl}/${apiKeyId}`);
23
23
  }
24
+ extend(apiKeyId) {
25
+ return this.api.put(`${ApiKey.baseUrl}/${apiKeyId}/activation/extend`);
26
+ }
27
+ duplicate(apiKeyId, options) {
28
+ return this.api.put(this.buildPath(`${ApiKey.baseUrl}/${apiKeyId}/duplicate`), options);
29
+ }
24
30
  }
25
31
  //# sourceMappingURL=ApiKeys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiKeys.js","sourceRoot":"","sources":["../../../../src/resources/ApiKeys/ApiKeys.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,MAAM,CAAC,OAAO,OAAO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,CAAC,OAAO,IAAI,QAAQ,oBAAoB,CAAC,CAAC;IACjF,CAAC;IAED,SAAS,CAAC,QAAgB,EAAE,OAA+B;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAc,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,QAAQ,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC"}
@@ -2,45 +2,88 @@ import API from '../../APICore.js';
2
2
  import Resource from '../Resource.js';
3
3
  export default class Extension extends Resource {
4
4
  static baseUrl = `/rest/organizations/${API.orgPlaceholder}/extensions`;
5
+ /**
6
+ * Creates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
7
+ * @param extension The configuration to use for the new extension.
8
+ * @returns The newly created extension.
9
+ */
5
10
  create(extension) {
6
11
  return this.api.post(Extension.baseUrl, extension);
7
12
  }
13
+ /**
14
+ * Updates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
15
+ * @param extensionId The unique identifier of the extension to update.
16
+ * @param options The new configuration to use for the updated extension.
17
+ * @returns The updated extension.
18
+ */
8
19
  update(extensionId, options) {
9
20
  return this.api.put(`${Extension.baseUrl}/${extensionId}`, options);
10
21
  }
22
+ /**
23
+ * Deletes an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
24
+ * @param extensionId The unique identifier of the extension to delete.
25
+ * @returns
26
+ */
11
27
  delete(extensionId) {
12
28
  return this.api.delete(`${Extension.baseUrl}/${extensionId}`);
13
29
  }
30
+ /**
31
+ * Enables a disabled [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
32
+ *
33
+ * Note: Disabled extensions are not executed.
34
+ * @param extensionId The unique identifier of the extension to enable.
35
+ * @returns
36
+ */
14
37
  enable(extensionId) {
15
38
  return this.api.post(`${Extension.baseUrl}/${extensionId}/enable`);
16
39
  }
40
+ /**
41
+ * Disables an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
42
+ *
43
+ * Note: Disabled extensions are not executed.
44
+ * @param extensionId The unique identifier of the extension to disable.
45
+ * @param reason The reason why the extension is disabled.
46
+ * @returns
47
+ */
17
48
  disable(extensionId, reason) {
18
49
  return this.api.post(`${Extension.baseUrl}/${extensionId}/disable`, { reason });
19
50
  }
51
+ /**
52
+ * Shows an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
53
+ * @param extensionId Shows an extension in a Coveo Cloud organization.
54
+ * @returns The extension specified by the provided id.
55
+ */
20
56
  get(extensionId) {
21
57
  return this.api.get(`${Extension.baseUrl}/${extensionId}`);
22
58
  }
59
+ /**
60
+ * Lists all [extensions](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
61
+ * @returns A list of extensions.
62
+ */
23
63
  list() {
24
64
  return this.api.get(Extension.baseUrl);
25
65
  }
26
66
  /**
27
67
  * Lists all versions of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
28
- * @param extensionId
68
+ * @param extensionId he unique identifier of the target extension.
69
+ * @returns A list of versions of the extension.
29
70
  */
30
71
  listVersions(extensionId) {
31
72
  return this.api.get(`${Extension.baseUrl}/${extensionId}/versions`);
32
73
  }
33
74
  /**
34
75
  * Shows a specific version of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
35
- * @param extensionId
36
- * @param versionId
76
+ * @param extensionId The unique identifier of the target extension.
77
+ * @param versionId The unique identifier of the extension version to show.
78
+ * @returns The extension specified by the provided id and version id.
37
79
  */
38
80
  getVersion(extensionId, versionId) {
39
81
  return this.api.get(`${Extension.baseUrl}/${extensionId}/versions/${versionId}`);
40
82
  }
41
83
  /**
42
- * Validates the extension's script
84
+ * Tries to compile code that would be used in an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
43
85
  * @param extensionCode The code to compile
86
+ * @returns Details regarding the outcome of an extension script compilation.
44
87
  */
45
88
  validateCode(extensionCode) {
46
89
  return this.api.post(`${Extension.baseUrl}/test/compile`, extensionCode);
@@ -1 +1 @@
1
- {"version":3,"file":"Extensions.js","sourceRoot":"","sources":["../../../../src/resources/Extensions/Extensions.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAStC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAC3C,MAAM,CAAC,OAAO,GAAG,uBAAuB,GAAG,CAAC,cAAc,aAAa,CAAC;IAExE,MAAM,CAAC,SAA0B;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAiB,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiB,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED,MAAM,CAAC,WAAmB;QACtB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAO,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,CAAC,WAAmB;QACtB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAO,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,SAAS,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,CAAC,WAAmB,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAO,GAAG,SAAS,CAAC,OAAO,IAAI,WAAW,UAAU,EAAE,EAAC,MAAM,EAAC,CAAC,CAAC;IACxF,CAAC;IAED,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AAY,CAAC,aAAmC;QAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAyB,GAAG,SAAS,CAAC,OAAO,eAAe,EAAE,aAAa,CAAC,CAAC;IACrG,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { New } from '../BaseInterfaces.js';
2
2
  import Resource from '../Resource.js';
3
- import { ApiKeyModel, CreateApiKeyOptions } from './ApiKeysInterfaces.js';
3
+ import { ApiKeyModel, CreateApiKeyOptions, DuplicateApiKeyOptions } from './ApiKeysInterfaces.js';
4
4
  export default class ApiKey extends Resource {
5
5
  static baseUrl: string;
6
6
  list(): Promise<ApiKeyModel[]>;
@@ -9,4 +9,6 @@ export default class ApiKey extends Resource {
9
9
  update(apiKey: ApiKeyModel): Promise<Record<string, unknown>>;
10
10
  toggle(apiKey: ApiKeyModel): Promise<Record<string, unknown>>;
11
11
  delete(apiKeyId: string): Promise<Record<string, unknown>>;
12
+ extend(apiKeyId: string): Promise<void>;
13
+ duplicate(apiKeyId: string, options: DuplicateApiKeyOptions): Promise<ApiKeyModel>;
12
14
  }
@@ -110,6 +110,23 @@ export interface CreateApiKeyOptions {
110
110
  */
111
111
  apiKeyTemplateId?: string;
112
112
  }
113
+ export interface DuplicateApiKeyOptions {
114
+ /**
115
+ * The display name for the API key.
116
+ *
117
+ */
118
+ displayName?: string;
119
+ /**
120
+ * A brief description of the API key.
121
+ *
122
+ */
123
+ description?: string;
124
+ /**
125
+ * The lifetime duration of the API key (iso8601 format).
126
+ * @example 'P1M'
127
+ */
128
+ lifetimeDuration: string;
129
+ }
113
130
  interface AdditionalConfigurationModel {
114
131
  /**
115
132
  * Configuration specific to commerce organization. [to be revised]
@@ -2,27 +2,70 @@ import Resource from '../Resource.js';
2
2
  import { CreateExtension, ExtensionCompileCode, ExtensionCompileResult, ExtensionContentVersionModel, ExtensionModel } from './ExtensionsInterfaces.js';
3
3
  export default class Extension extends Resource {
4
4
  static baseUrl: string;
5
+ /**
6
+ * Creates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
7
+ * @param extension The configuration to use for the new extension.
8
+ * @returns The newly created extension.
9
+ */
5
10
  create(extension: CreateExtension): Promise<ExtensionModel>;
11
+ /**
12
+ * Updates an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
13
+ * @param extensionId The unique identifier of the extension to update.
14
+ * @param options The new configuration to use for the updated extension.
15
+ * @returns The updated extension.
16
+ */
6
17
  update(extensionId: string, options: CreateExtension): Promise<ExtensionModel>;
18
+ /**
19
+ * Deletes an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
20
+ * @param extensionId The unique identifier of the extension to delete.
21
+ * @returns
22
+ */
7
23
  delete(extensionId: string): Promise<void>;
24
+ /**
25
+ * Enables a disabled [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
26
+ *
27
+ * Note: Disabled extensions are not executed.
28
+ * @param extensionId The unique identifier of the extension to enable.
29
+ * @returns
30
+ */
8
31
  enable(extensionId: string): Promise<void>;
32
+ /**
33
+ * Disables an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
34
+ *
35
+ * Note: Disabled extensions are not executed.
36
+ * @param extensionId The unique identifier of the extension to disable.
37
+ * @param reason The reason why the extension is disabled.
38
+ * @returns
39
+ */
9
40
  disable(extensionId: string, reason?: string): Promise<void>;
41
+ /**
42
+ * Shows an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
43
+ * @param extensionId Shows an extension in a Coveo Cloud organization.
44
+ * @returns The extension specified by the provided id.
45
+ */
10
46
  get(extensionId: string): Promise<ExtensionModel>;
47
+ /**
48
+ * Lists all [extensions](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
49
+ * @returns A list of extensions.
50
+ */
11
51
  list(): Promise<ExtensionModel[]>;
12
52
  /**
13
53
  * Lists all versions of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
14
- * @param extensionId
54
+ * @param extensionId he unique identifier of the target extension.
55
+ * @returns A list of versions of the extension.
15
56
  */
16
57
  listVersions(extensionId: string): Promise<ExtensionContentVersionModel[]>;
17
58
  /**
18
59
  * Shows a specific version of an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
19
- * @param extensionId
20
- * @param versionId
60
+ * @param extensionId The unique identifier of the target extension.
61
+ * @param versionId The unique identifier of the extension version to show.
62
+ * @returns The extension specified by the provided id and version id.
21
63
  */
22
64
  getVersion(extensionId: string, versionId: string): Promise<ExtensionModel>;
23
65
  /**
24
- * Validates the extension's script
66
+ * Tries to compile code that would be used in an [extension](https://docs.coveo.com/en/206/) in a [Coveo Cloud organization](https://docs.coveo.com/en/185/).
25
67
  * @param extensionCode The code to compile
68
+ * @returns Details regarding the outcome of an extension script compilation.
26
69
  */
27
70
  validateCode(extensionCode: ExtensionCompileCode): Promise<ExtensionCompileResult>;
28
71
  }
@@ -1,56 +1,192 @@
1
1
  import { GranularResource } from '../../Entry.js';
2
2
  import { DataStreamType, ExtensionLanguageType } from '../Enums.js';
3
3
  type Version = 'v1' | 'v2';
4
+ export interface ExtensionHealthModel {
5
+ /**
6
+ * A qualitative health indicator.
7
+ *
8
+ */
9
+ healthIndicator: 'GOOD' | 'WARNING' | 'PROBLEMATIC' | 'UNKNOWN';
10
+ /**
11
+ * Additional details if healthIndicator value is `WARNING` or `PROBLEMATIC`.
12
+ */
13
+ reason: string;
14
+ }
15
+ export interface ExtensionDisabledStatusModel {
16
+ /**
17
+ * The extension disablement date (in number of milliseconds since UNIX epoch).
18
+ * @example 1556034174000
19
+ */
20
+ disabledDate: number;
21
+ /**
22
+ * The reason why the extension was disabled.
23
+ */
24
+ reason: string;
25
+ }
26
+ export interface ExtensionStatisticsModel {
27
+ /**
28
+ * The average extension execution duration in seconds.
29
+ */
30
+ averageDurationInSeconds: number;
31
+ /**
32
+ * The number of extension executions for which the script returned an error.
33
+ */
34
+ numberOfErrors: number;
35
+ /**
36
+ * The total number of executions of the extension.
37
+ */
38
+ numberOfExecutions: number;
39
+ /**
40
+ * The number of times the extension was not executed due to any of the following reasons:
41
+ * - The extension condition was evaluated to false.
42
+ * - The extension timed out.
43
+ * - The extension was disabled.
44
+ */
45
+ numberOfSkips: number;
46
+ /**
47
+ * The number of executions that reached the maximum execution time (default of 5 seconds).
48
+ */
49
+ numberOfTimeouts: number;
50
+ }
51
+ export interface ExtensionStatusModel {
52
+ /**
53
+ * Execution statistics pertaining to an extension over the past 24 hours (for all items from all sources to which the extension applies).
54
+ */
55
+ dailyStatistics: ExtensionStatisticsModel;
56
+ /**
57
+ * Information regarding the disabled state of an extension, if applicable.
58
+ */
59
+ disabledStatus?: ExtensionDisabledStatusModel;
60
+ /**
61
+ * Information regarding a health characteristic of the extension.
62
+ */
63
+ durationHealth: ExtensionHealthModel;
64
+ /**
65
+ * The last date at which the extension was automatically disabled by the service, (in number of milliseconds since UNIX epoch).
66
+ * @example 1533916446000
67
+ */
68
+ lastAutoDisablingDate: number;
69
+ /**
70
+ * @deprecated use lastAutoDisablingDate instead.
71
+ */
72
+ lastDisablingDate: number;
73
+ /**
74
+ * Information regarding a health characteristic of the extension.
75
+ */
76
+ timeoutHealth: ExtensionHealthModel;
77
+ /**
78
+ * A qualitative indicator of the likelihood that the extension will time out.
79
+ *
80
+ */
81
+ timeoutLikeliness: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
82
+ }
83
+ export interface ExtensionUsedByModel {
84
+ /**
85
+ * The unique identifier of the source.
86
+ * @example mycoveocloudv2organizationg8tp8wu3-tqv7hb5wfju45im3lnuvtw2moq
87
+ */
88
+ sourceId: string;
89
+ /**
90
+ * The name of the source.
91
+ * @example mysource
92
+ */
93
+ sourceName: string;
94
+ }
4
95
  export interface ExtensionModel {
96
+ /**
97
+ * The api version.
98
+ */
5
99
  apiVersion: Version;
100
+ /**
101
+ * The body of the extension (user script), written in Python using the [document object](https://docs.coveo.com/en/34/index-content/document-object-python-api-reference).
102
+ */
6
103
  content: string;
104
+ /**
105
+ * The creation date of the extension (in number of milliseconds since UNIX epoch).
106
+ * @example 1556034174000
107
+ */
7
108
  createdDate: number;
109
+ /**
110
+ * A description of the extension
111
+ */
8
112
  description: string;
113
+ /**
114
+ * Whether the extension is enabled.
115
+ *
116
+ * Note: Disabled extensions are not executed.
117
+ */
9
118
  enabled: boolean;
119
+ /**
120
+ * The unique identifier of the extension.
121
+ * @example mycoveocloudv2organizationg8tp8wu3-vwlyqfbtjkotxqkmrxqjcbcpoy
122
+ */
10
123
  id: string;
124
+ /**
125
+ * The Python version.
126
+ */
11
127
  language: ExtensionLanguageType;
128
+ /**
129
+ * The last modification date of the extension (in number of milliseconds since UNIX epoch).
130
+ * @example 1556308241000
131
+ */
12
132
  lastModified: number;
133
+ /**
134
+ * The name of the extension.
135
+ */
13
136
  name: string;
137
+ /**
138
+ * The [data streams](https://docs.coveo.com/en/2891/glossary/data-stream) required by the extension.
139
+ */
14
140
  requiredDataStreams: DataStreamType[];
15
- status: {
16
- dailyStatistics: {
17
- averageDurationInSeconds: number;
18
- numberOfErrors: number;
19
- numberOfExecutions: number;
20
- numberOfSkips: number;
21
- numberOfTimeouts: number;
22
- };
23
- disabledStatus?: {
24
- disabledDate: number;
25
- reason: string;
26
- };
27
- durationHealth: {
28
- healthIndicator: string;
29
- reason: string;
30
- };
31
- lastAutoDisablingDate: number;
32
- lastDisablingDate: number;
33
- timeoutHealth: {
34
- healthIndicator: string;
35
- reason: string;
36
- };
37
- timeoutLikeliness: string;
38
- };
39
- usedBy: [
40
- {
41
- sourceId: string;
42
- sourceName: string;
43
- }
44
- ];
141
+ /**
142
+ * Status details of an extension.
143
+ */
144
+ status: ExtensionStatusModel;
145
+ /**
146
+ * The sources the extension applies to.
147
+ *
148
+ * Note: Only returned when performing GET/PUT /extensions/{extensionId} requests.
149
+ */
150
+ usedBy: ExtensionUsedByModel[];
151
+ /**
152
+ * Whether the extension uses vault parameters or not.
153
+ */
154
+ useVault?: boolean;
155
+ /**
156
+ * The unique identifier of the extension version.
157
+ * @example hdJSDb4hTkdnsCynNtF.d657FgLSDydcj
158
+ */
45
159
  versionId: string;
46
160
  }
47
161
  export interface CreateExtension extends GranularResource {
162
+ /**
163
+ * The body of the extension (user script), written in Python using the [document object](https://docs.coveo.com/en/34/index-content/document-object-python-api-reference).
164
+ */
48
165
  content: string;
166
+ /**
167
+ * A name for the extension.
168
+ */
49
169
  name: string;
170
+ /**
171
+ * The api version.
172
+ */
50
173
  apiVersion?: Version;
174
+ /**
175
+ * A description of the extension.
176
+ */
51
177
  description?: string;
178
+ /**
179
+ * The Python version.
180
+ */
52
181
  language?: ExtensionLanguageType;
182
+ /**
183
+ * The [data streams](https://docs.coveo.com/en/2891/glossary/data-stream) required by the extension.
184
+ */
53
185
  requiredDataStreams?: DataStreamType[];
186
+ /**
187
+ * Whether the extension uses vault parameters or not.
188
+ */
189
+ useVault?: boolean;
54
190
  }
55
191
  export interface ExtensionCompileCode {
56
192
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/platform-client",
3
- "version": "56.1.0",
3
+ "version": "56.3.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {