@coveo/push-api-client 1.0.0 → 1.1.4
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/README.md +41 -2
- package/dist/definitions/document.d.ts +1 -1
- package/dist/docs/.nojekyll +1 -0
- package/dist/docs/assets/highlight.css +71 -0
- package/dist/docs/assets/icons.css +1043 -0
- package/dist/docs/assets/{images/icons.png → icons.png} +0 -0
- package/dist/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
- package/dist/docs/assets/main.js +52 -0
- package/dist/docs/assets/{js/search.js → search.js} +1 -1
- package/dist/docs/assets/style.css +1384 -0
- package/dist/docs/assets/{images/widgets.png → widgets.png} +0 -0
- package/dist/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- package/dist/docs/classes/AnySecurityIdentityBuilder.html +12 -0
- package/dist/docs/classes/DocumentBuilder.html +37 -0
- package/dist/docs/classes/GroupSecurityIdentityBuilder.html +10 -0
- package/dist/docs/classes/Source.html +34 -0
- package/dist/docs/classes/UserSecurityIdentityBuilder.html +10 -0
- package/dist/docs/classes/VirtualGroupSecurityIdentityBuilder.html +10 -0
- package/dist/docs/enums/Environment.html +1 -0
- package/dist/docs/enums/SourceVisibility.html +1 -0
- package/dist/docs/index.html +38 -156
- package/dist/docs/interfaces/BatchUpdateDocuments.html +1 -0
- package/dist/docs/interfaces/Document.html +67 -0
- package/dist/docs/interfaces/SecurityIdentity.html +22 -0
- package/dist/docs/interfaces/SecurityIdentityBuilder.html +3 -0
- package/dist/docs/modules.html +3 -240
- package/dist/documentBuilder.js +10 -5
- package/dist/documentBuilder.js.map +1 -1
- package/dist/documentBuilder.spec.js +34 -0
- package/dist/documentBuilder.spec.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/securityIdentityBuilder.js.map +1 -1
- package/dist/source.spec.js +1 -1
- package/dist/source.spec.js.map +1 -1
- package/package.json +20 -19
- package/CHANGELOG.md +0 -52
- package/dist/docs/assets/css/main.css +0 -2660
- package/dist/docs/assets/js/main.js +0 -248
- package/dist/docs/classes/anysecurityidentitybuilder.html +0 -297
- package/dist/docs/classes/documentbuilder.html +0 -949
- package/dist/docs/classes/groupsecurityidentitybuilder.html +0 -273
- package/dist/docs/classes/source.html +0 -897
- package/dist/docs/classes/usersecurityidentitybuilder.html +0 -273
- package/dist/docs/classes/virtualgroupsecurityidentitybuilder.html +0 -273
- package/dist/docs/enums/environment.html +0 -234
- package/dist/docs/enums/sourcevisibility.html +0 -220
- package/dist/docs/interfaces/batchupdatedocuments.html +0 -214
- package/dist/docs/interfaces/document.html +0 -518
- package/dist/docs/interfaces/securityidentity.html +0 -263
- package/dist/docs/interfaces/securityidentitybuilder.html +0 -223
package/README.md
CHANGED
@@ -1,4 +1,43 @@
|
|
1
1
|
# @coveo/push-api-client.js
|
2
|
-
Push API client
|
3
2
|
|
4
|
-
|
3
|
+
Coveo Push API client
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
`npm i @coveo/push-api-client`
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
```js
|
12
|
+
import {Source, DocumentBuilder} from '@coveo/push-api-client';
|
13
|
+
|
14
|
+
async function main() {
|
15
|
+
const source = new Source('my_api_key', 'my_coveo_organization_id');
|
16
|
+
|
17
|
+
const myDocument = new DocumentBuilder(
|
18
|
+
'https://my.document.uri',
|
19
|
+
'My document title'
|
20
|
+
).withData('these words will be searchable');
|
21
|
+
|
22
|
+
await source.addOrUpdateDocument('my_source_id', myDocument);
|
23
|
+
}
|
24
|
+
|
25
|
+
main();
|
26
|
+
```
|
27
|
+
|
28
|
+
See more examples in the `./samples` folder.
|
29
|
+
|
30
|
+
## Local development
|
31
|
+
|
32
|
+
- `npm i`
|
33
|
+
- Copy `env.sample` to `.env`, and replace the variables with proper values.
|
34
|
+
- `npm run dev` to compile and run `./src/localtest.ts`.
|
35
|
+
- `npm run test` for unit tests.
|
36
|
+
|
37
|
+
## Commit
|
38
|
+
|
39
|
+
Use `npm run commit` to get a properly formatted commit message which will help control the versioning and CHANGELOG generation.
|
40
|
+
|
41
|
+
## Release
|
42
|
+
|
43
|
+
Run Github action named `release`, which will bump version, tag and publish to npm.
|
@@ -27,7 +27,7 @@ export interface SecurityIdentity {
|
|
27
27
|
*/
|
28
28
|
securityProvider?: string;
|
29
29
|
}
|
30
|
-
export declare type MetadataValue = string | string[] | number | number[];
|
30
|
+
export declare type MetadataValue = string | string[] | number | number[] | boolean;
|
31
31
|
export declare type Metadata = Record<string, MetadataValue>;
|
32
32
|
/**
|
33
33
|
* The compression type that was applied to your compressed document.
|
@@ -0,0 +1 @@
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
:root {
|
2
|
+
--light-hl-0: #AF00DB;
|
3
|
+
--dark-hl-0: #C586C0;
|
4
|
+
--light-hl-1: #000000;
|
5
|
+
--dark-hl-1: #D4D4D4;
|
6
|
+
--light-hl-2: #001080;
|
7
|
+
--dark-hl-2: #9CDCFE;
|
8
|
+
--light-hl-3: #A31515;
|
9
|
+
--dark-hl-3: #CE9178;
|
10
|
+
--light-hl-4: #0000FF;
|
11
|
+
--dark-hl-4: #569CD6;
|
12
|
+
--light-hl-5: #795E26;
|
13
|
+
--dark-hl-5: #DCDCAA;
|
14
|
+
--light-hl-6: #0070C1;
|
15
|
+
--dark-hl-6: #4FC1FF;
|
16
|
+
--light-code-background: #FFFFFF;
|
17
|
+
--dark-code-background: #1E1E1E;
|
18
|
+
}
|
19
|
+
|
20
|
+
@media (prefers-color-scheme: light) { :root {
|
21
|
+
--hl-0: var(--light-hl-0);
|
22
|
+
--hl-1: var(--light-hl-1);
|
23
|
+
--hl-2: var(--light-hl-2);
|
24
|
+
--hl-3: var(--light-hl-3);
|
25
|
+
--hl-4: var(--light-hl-4);
|
26
|
+
--hl-5: var(--light-hl-5);
|
27
|
+
--hl-6: var(--light-hl-6);
|
28
|
+
--code-background: var(--light-code-background);
|
29
|
+
} }
|
30
|
+
|
31
|
+
@media (prefers-color-scheme: dark) { :root {
|
32
|
+
--hl-0: var(--dark-hl-0);
|
33
|
+
--hl-1: var(--dark-hl-1);
|
34
|
+
--hl-2: var(--dark-hl-2);
|
35
|
+
--hl-3: var(--dark-hl-3);
|
36
|
+
--hl-4: var(--dark-hl-4);
|
37
|
+
--hl-5: var(--dark-hl-5);
|
38
|
+
--hl-6: var(--dark-hl-6);
|
39
|
+
--code-background: var(--dark-code-background);
|
40
|
+
} }
|
41
|
+
|
42
|
+
body.light {
|
43
|
+
--hl-0: var(--light-hl-0);
|
44
|
+
--hl-1: var(--light-hl-1);
|
45
|
+
--hl-2: var(--light-hl-2);
|
46
|
+
--hl-3: var(--light-hl-3);
|
47
|
+
--hl-4: var(--light-hl-4);
|
48
|
+
--hl-5: var(--light-hl-5);
|
49
|
+
--hl-6: var(--light-hl-6);
|
50
|
+
--code-background: var(--light-code-background);
|
51
|
+
}
|
52
|
+
|
53
|
+
body.dark {
|
54
|
+
--hl-0: var(--dark-hl-0);
|
55
|
+
--hl-1: var(--dark-hl-1);
|
56
|
+
--hl-2: var(--dark-hl-2);
|
57
|
+
--hl-3: var(--dark-hl-3);
|
58
|
+
--hl-4: var(--dark-hl-4);
|
59
|
+
--hl-5: var(--dark-hl-5);
|
60
|
+
--hl-6: var(--dark-hl-6);
|
61
|
+
--code-background: var(--dark-code-background);
|
62
|
+
}
|
63
|
+
|
64
|
+
.hl-0 { color: var(--hl-0); }
|
65
|
+
.hl-1 { color: var(--hl-1); }
|
66
|
+
.hl-2 { color: var(--hl-2); }
|
67
|
+
.hl-3 { color: var(--hl-3); }
|
68
|
+
.hl-4 { color: var(--hl-4); }
|
69
|
+
.hl-5 { color: var(--hl-5); }
|
70
|
+
.hl-6 { color: var(--hl-6); }
|
71
|
+
pre, code { background: var(--code-background); }
|