@coveo/push-api-client 3.0.117 → 3.0.122
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/APICore.js +47 -47
- package/dist/APICore.js.map +1 -1
- package/dist/definitions/APICore.d.ts +18 -18
- package/dist/definitions/document.d.ts +124 -124
- package/dist/definitions/documentBuilder.d.ts +168 -168
- package/dist/definitions/documentBuilder.spec.d.ts +1 -1
- package/dist/definitions/environment.d.ts +16 -16
- package/dist/definitions/errors/baseError.d.ts +4 -4
- package/dist/definitions/errors/fieldErrors.d.ts +18 -18
- package/dist/definitions/errors/index.d.ts +3 -3
- package/dist/definitions/errors/privilegeError.d.ts +6 -6
- package/dist/definitions/errors/validatorErrors.d.ts +20 -20
- package/dist/definitions/fieldAnalyser/fieldAnalyser.d.ts +36 -36
- package/dist/definitions/fieldAnalyser/fieldAnalyser.spec.d.ts +1 -1
- package/dist/definitions/fieldAnalyser/fieldStore.d.ts +5 -5
- package/dist/definitions/fieldAnalyser/fieldUtils.d.ts +6 -6
- package/dist/definitions/fieldAnalyser/fieldsUtils.spec.d.ts +1 -1
- package/dist/definitions/fieldAnalyser/inconsistencies.d.ts +5 -5
- package/dist/definitions/fieldAnalyser/inconsistencies.spec.d.ts +1 -1
- package/dist/definitions/fieldAnalyser/typeUtils.d.ts +3 -3
- package/dist/definitions/fieldAnalyser/typeUtils.spec.d.ts +1 -1
- package/dist/definitions/help/file.d.ts +3 -3
- package/dist/definitions/help/file.spec.d.ts +1 -1
- package/dist/definitions/help/fileConsumer.d.ts +31 -31
- package/dist/definitions/help/fileConsumer.spec.d.ts +1 -1
- package/dist/definitions/help/fileContainer.d.ts +8 -8
- package/dist/definitions/help/fileContainer.spec.d.ts +1 -1
- package/dist/definitions/help/function.d.ts +1 -1
- package/dist/definitions/help/generator.d.ts +11 -11
- package/dist/definitions/help/generator.spec.d.ts +1 -1
- package/dist/definitions/help/urlUtils.d.ts +27 -27
- package/dist/definitions/help/urlUtils.spec.d.ts +1 -1
- package/dist/definitions/index.d.ts +14 -14
- package/dist/definitions/interfaces.d.ts +70 -70
- package/dist/definitions/localtest.d.ts +1 -1
- package/dist/definitions/permissionSetBuilder.d.ts +34 -34
- package/dist/definitions/permissionSetBuilder.spec.d.ts +1 -1
- package/dist/definitions/securityIdentityBuilder.d.ts +105 -105
- package/dist/definitions/securityIdentityBuilder.spec.d.ts +1 -1
- package/dist/definitions/source/batchUploadDocumentsFromFile.d.ts +11 -11
- package/dist/definitions/source/batchUploadDocumentsFromFile.spec.d.ts +1 -1
- package/dist/definitions/source/catalog.d.ts +70 -70
- package/dist/definitions/source/catalog.spec.d.ts +1 -1
- package/dist/definitions/source/documentUploader.d.ts +11 -11
- package/dist/definitions/source/documentUploader.spec.d.ts +1 -1
- package/dist/definitions/source/push.d.ts +87 -87
- package/dist/definitions/source/push.spec.d.ts +1 -1
- package/dist/definitions/source/securityIdenty.d.ts +43 -43
- package/dist/definitions/uploadStrategy/fileContainerStrategy.d.ts +23 -23
- package/dist/definitions/uploadStrategy/fileContainerStrategy.spec.d.ts +1 -1
- package/dist/definitions/uploadStrategy/index.d.ts +3 -3
- package/dist/definitions/uploadStrategy/strategy.d.ts +23 -23
- package/dist/definitions/uploadStrategy/streamChunkStrategy.d.ts +28 -28
- package/dist/definitions/uploadStrategy/streamChunkStrategy.spec.d.ts +1 -1
- package/dist/definitions/validation/caseInsensitiveDocument.d.ts +13 -13
- package/dist/definitions/validation/knownKey.d.ts +10 -10
- package/dist/definitions/validation/parseFile.d.ts +4 -4
- package/dist/definitions/validation/parseFile.spec.d.ts +1 -1
- package/dist/definitions/validation/parsePermissions.d.ts +5 -5
- package/dist/definitions/validation/parsePermissions.spec.d.ts +1 -1
- package/dist/definitions/validation/preconditions/apiKeyPrivilege.d.ts +3 -3
- package/dist/definitions/validation/preconditions/apiKeyPrivilege.spec.d.ts +1 -1
- package/dist/definitions/validation/preconditions/platformPrivilege.d.ts +7 -7
- package/dist/definitions/validation/requiredKeyValidator.d.ts +17 -17
- package/dist/definitions/validation/transformers/transformer.d.ts +31 -31
- package/dist/definitions/validation/transformers/transformer.spec.d.ts +1 -1
- package/dist/document.js +2 -2
- package/dist/documentBuilder.js +292 -292
- package/dist/documentBuilder.spec.js +191 -191
- package/dist/environment.js +41 -41
- package/dist/errors/baseError.js +10 -10
- package/dist/errors/fieldErrors.js +42 -42
- package/dist/errors/index.js +19 -19
- package/dist/errors/privilegeError.js +12 -12
- package/dist/errors/validatorErrors.js +40 -40
- package/dist/fieldAnalyser/fieldAnalyser.js +95 -95
- package/dist/fieldAnalyser/fieldAnalyser.spec.js +230 -230
- package/dist/fieldAnalyser/fieldStore.js +21 -21
- package/dist/fieldAnalyser/fieldUtils.js +41 -41
- package/dist/fieldAnalyser/fieldsUtils.spec.js +116 -116
- package/dist/fieldAnalyser/inconsistencies.js +14 -14
- package/dist/fieldAnalyser/inconsistencies.spec.js +40 -40
- package/dist/fieldAnalyser/typeUtils.js +61 -61
- package/dist/fieldAnalyser/typeUtils.spec.js +142 -142
- package/dist/help/file.js +37 -37
- package/dist/help/file.spec.js +67 -67
- package/dist/help/fileConsumer.js +150 -150
- package/dist/help/fileConsumer.spec.js +153 -153
- package/dist/help/fileContainer.js +48 -48
- package/dist/help/fileContainer.spec.js +65 -65
- package/dist/help/function.js +5 -5
- package/dist/help/generator.js +32 -32
- package/dist/help/generator.spec.js +82 -82
- package/dist/help/urlUtils.js +42 -42
- package/dist/help/urlUtils.spec.js +41 -41
- package/dist/index.js +38 -38
- package/dist/interfaces.js +2 -2
- package/dist/localtest.js +55 -55
- package/dist/permissionSetBuilder.js +58 -58
- package/dist/permissionSetBuilder.spec.js +68 -68
- package/dist/securityIdentityBuilder.js +128 -128
- package/dist/securityIdentityBuilder.spec.js +50 -50
- package/dist/source/batchUploadDocumentsFromFile.js +46 -46
- package/dist/source/batchUploadDocumentsFromFile.spec.js +145 -145
- package/dist/source/catalog.js +111 -111
- package/dist/source/catalog.spec.js +64 -64
- package/dist/source/documentUploader.js +45 -45
- package/dist/source/documentUploader.spec.js +118 -118
- package/dist/source/push.js +140 -140
- package/dist/source/push.spec.js +152 -152
- package/dist/source/securityIdenty.js +57 -57
- package/dist/uploadStrategy/fileContainerStrategy.js +32 -32
- package/dist/uploadStrategy/fileContainerStrategy.spec.js +86 -86
- package/dist/uploadStrategy/index.js +19 -19
- package/dist/uploadStrategy/strategy.js +2 -2
- package/dist/uploadStrategy/streamChunkStrategy.js +52 -52
- package/dist/uploadStrategy/streamChunkStrategy.spec.js +77 -77
- package/dist/validation/caseInsensitiveDocument.js +31 -31
- package/dist/validation/knownKey.js +37 -37
- package/dist/validation/parseFile.js +120 -120
- package/dist/validation/parseFile.spec.js +96 -96
- package/dist/validation/parsePermissions.js +118 -118
- package/dist/validation/parsePermissions.spec.js +86 -86
- package/dist/validation/preconditions/apiKeyPrivilege.js +20 -20
- package/dist/validation/preconditions/apiKeyPrivilege.spec.js +66 -66
- package/dist/validation/preconditions/platformPrivilege.js +32 -32
- package/dist/validation/requiredKeyValidator.js +61 -61
- package/dist/validation/transformers/transformer.js +51 -51
- package/dist/validation/transformers/transformer.spec.js +21 -21
- package/package.json +11 -11
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,13 +1,13 @@
|
|
1
|
-
export type Recordable<T> = {
|
2
|
-
[K in keyof T]: T[K];
|
3
|
-
};
|
4
|
-
export declare class CaseInsensitiveDocument<T> {
|
5
|
-
private _originalDocument;
|
6
|
-
private _remainingRecord;
|
7
|
-
constructor(doc: Record<string, T>);
|
8
|
-
remove(...keys: string[]): void;
|
9
|
-
getRecordValue(key: string): T;
|
10
|
-
get remainingRecord(): Readonly<Record<string, T>>;
|
11
|
-
get originalDocument(): Readonly<Record<string, T>>;
|
12
|
-
private shallowCopy;
|
13
|
-
}
|
1
|
+
export type Recordable<T> = {
|
2
|
+
[K in keyof T]: T[K];
|
3
|
+
};
|
4
|
+
export declare class CaseInsensitiveDocument<T> {
|
5
|
+
private _originalDocument;
|
6
|
+
private _remainingRecord;
|
7
|
+
constructor(doc: Record<string, T>);
|
8
|
+
remove(...keys: string[]): void;
|
9
|
+
getRecordValue(key: string): T;
|
10
|
+
get remainingRecord(): Readonly<Record<string, T>>;
|
11
|
+
get originalDocument(): Readonly<Record<string, T>>;
|
12
|
+
private shallowCopy;
|
13
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { PrimitivesValues } from '@coveo/bueno';
|
2
|
-
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
3
|
-
export declare class KnownKeys<T extends PrimitivesValues> {
|
4
|
-
private doc;
|
5
|
-
private keys;
|
6
|
-
constructor(k: string | string[], doc: CaseInsensitiveDocument<PrimitivesValues>);
|
7
|
-
get value(): PrimitivesValues;
|
8
|
-
whenExists<U = T>(cb: (v: U) => void): this;
|
9
|
-
whenDoesNotExist<U = T>(cb: (v: U) => void): this;
|
10
|
-
}
|
1
|
+
import { PrimitivesValues } from '@coveo/bueno';
|
2
|
+
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
3
|
+
export declare class KnownKeys<T extends PrimitivesValues> {
|
4
|
+
private doc;
|
5
|
+
private keys;
|
6
|
+
constructor(k: string | string[], doc: CaseInsensitiveDocument<PrimitivesValues>);
|
7
|
+
get value(): PrimitivesValues;
|
8
|
+
whenExists<U = T>(cb: (v: U) => void): this;
|
9
|
+
whenDoesNotExist<U = T>(cb: (v: U) => void): this;
|
10
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { DocumentBuilder } from '..';
|
2
|
-
import { PathLike } from 'fs';
|
3
|
-
import { ParseDocumentOptions } from '../interfaces';
|
4
|
-
export declare const parseAndGetDocumentBuilderFromJSONDocument: (documentPath: PathLike, options?: ParseDocumentOptions) => Promise<DocumentBuilder[]>;
|
1
|
+
import { DocumentBuilder } from '..';
|
2
|
+
import { PathLike } from 'fs';
|
3
|
+
import { ParseDocumentOptions } from '../interfaces';
|
4
|
+
export declare const parseAndGetDocumentBuilderFromJSONDocument: (documentPath: PathLike, options?: ParseDocumentOptions) => Promise<DocumentBuilder[]>;
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { PathLike } from 'fs';
|
2
|
-
import { PrimitivesValues } from '@coveo/bueno';
|
3
|
-
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
4
|
-
import { DocumentBuilder } from '../documentBuilder';
|
5
|
-
export declare const processPermissionList: (caseInsensitiveDoc: CaseInsensitiveDocument<PrimitivesValues>, documentBuilder: DocumentBuilder, documentPath: PathLike) => void;
|
1
|
+
import { PathLike } from 'fs';
|
2
|
+
import { PrimitivesValues } from '@coveo/bueno';
|
3
|
+
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
4
|
+
import { DocumentBuilder } from '../documentBuilder';
|
5
|
+
export declare const processPermissionList: (caseInsensitiveDoc: CaseInsensitiveDocument<PrimitivesValues>, documentBuilder: DocumentBuilder, documentPath: PathLike) => void;
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { PlatformPrivilege } from './platformPrivilege';
|
2
|
-
import PlatformClient from '@coveo/platform-client';
|
3
|
-
export declare function ensureNecessaryCoveoPrivileges(client: PlatformClient, ...privileges: PlatformPrivilege[]): Promise<void | never>;
|
1
|
+
import type { PlatformPrivilege } from './platformPrivilege';
|
2
|
+
import PlatformClient from '@coveo/platform-client';
|
3
|
+
export declare function ensureNecessaryCoveoPrivileges(client: PlatformClient, ...privileges: PlatformPrivilege[]): Promise<void | never>;
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { PrivilegeModel } from '@coveo/platform-client';
|
2
|
-
export interface PlatformPrivilege {
|
3
|
-
models: PrivilegeModel[];
|
4
|
-
unsatisfiedConditionMessage: string;
|
5
|
-
}
|
6
|
-
export declare const readFieldsPrivilege: PlatformPrivilege;
|
7
|
-
export declare const writeFieldsPrivilege: PlatformPrivilege;
|
1
|
+
import type { PrivilegeModel } from '@coveo/platform-client';
|
2
|
+
export interface PlatformPrivilege {
|
3
|
+
models: PrivilegeModel[];
|
4
|
+
unsatisfiedConditionMessage: string;
|
5
|
+
}
|
6
|
+
export declare const readFieldsPrivilege: PlatformPrivilege;
|
7
|
+
export declare const writeFieldsPrivilege: PlatformPrivilege;
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { PrimitivesValues, SchemaValue } from '@coveo/bueno';
|
2
|
-
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
3
|
-
export declare class RequiredKeyValidator<T extends PrimitivesValues> {
|
4
|
-
private doc;
|
5
|
-
private schema;
|
6
|
-
private keys;
|
7
|
-
private validations;
|
8
|
-
constructor(k: string[] | string, doc: CaseInsensitiveDocument<PrimitivesValues>, schema: SchemaValue<T>);
|
9
|
-
private doValidations;
|
10
|
-
get isValid(): boolean;
|
11
|
-
get value(): T | null;
|
12
|
-
get explanation(): string;
|
13
|
-
private get validEntries();
|
14
|
-
private get invalidEntries();
|
15
|
-
private getValidationMessage;
|
16
|
-
private isValueCorrectType;
|
17
|
-
}
|
1
|
+
import { PrimitivesValues, SchemaValue } from '@coveo/bueno';
|
2
|
+
import { CaseInsensitiveDocument } from './caseInsensitiveDocument';
|
3
|
+
export declare class RequiredKeyValidator<T extends PrimitivesValues> {
|
4
|
+
private doc;
|
5
|
+
private schema;
|
6
|
+
private keys;
|
7
|
+
private validations;
|
8
|
+
constructor(k: string[] | string, doc: CaseInsensitiveDocument<PrimitivesValues>, schema: SchemaValue<T>);
|
9
|
+
private doValidations;
|
10
|
+
get isValid(): boolean;
|
11
|
+
get value(): T | null;
|
12
|
+
get explanation(): string;
|
13
|
+
private get validEntries();
|
14
|
+
private get invalidEntries();
|
15
|
+
private getValidationMessage;
|
16
|
+
private isValueCorrectType;
|
17
|
+
}
|
@@ -1,31 +1,31 @@
|
|
1
|
-
export type Transformer = (str: string) => string;
|
2
|
-
export declare const BuiltInTransformers: Readonly<{
|
3
|
-
/**
|
4
|
-
* A transformer that does nothing but return the string supplied to it.
|
5
|
-
* Good as a default transformer function.
|
6
|
-
*
|
7
|
-
* _Transformation examples:_
|
8
|
-
*
|
9
|
-
* - `foo` => `foo`
|
10
|
-
* - `bar` => `bar`
|
11
|
-
*/
|
12
|
-
readonly identity: Transformer;
|
13
|
-
/**
|
14
|
-
* A transformer that removes leading numbers and replaces every non-alphanumeric characters with underscores
|
15
|
-
*
|
16
|
-
* _Transformation examples:_
|
17
|
-
*
|
18
|
-
* - `Field-With=Special+Characters` => `field_with_special_characters`
|
19
|
-
* - `01-Numeric-Field-#01` => `numeric_field_01`
|
20
|
-
*/
|
21
|
-
readonly toLowerCase: Transformer;
|
22
|
-
/**
|
23
|
-
* A transformer that removes leading numbers and non-alphanumeric characters.
|
24
|
-
*
|
25
|
-
* _Transformation examples:_
|
26
|
-
*
|
27
|
-
* - `Field-With=Special+Characters` => `fieldwithspecialcharacters`
|
28
|
-
* - `01-Numeric-Field-#01` => `numericfield01`
|
29
|
-
*/
|
30
|
-
readonly toSnakeCase: Transformer;
|
31
|
-
}>;
|
1
|
+
export type Transformer = (str: string) => string;
|
2
|
+
export declare const BuiltInTransformers: Readonly<{
|
3
|
+
/**
|
4
|
+
* A transformer that does nothing but return the string supplied to it.
|
5
|
+
* Good as a default transformer function.
|
6
|
+
*
|
7
|
+
* _Transformation examples:_
|
8
|
+
*
|
9
|
+
* - `foo` => `foo`
|
10
|
+
* - `bar` => `bar`
|
11
|
+
*/
|
12
|
+
readonly identity: Transformer;
|
13
|
+
/**
|
14
|
+
* A transformer that removes leading numbers and replaces every non-alphanumeric characters with underscores
|
15
|
+
*
|
16
|
+
* _Transformation examples:_
|
17
|
+
*
|
18
|
+
* - `Field-With=Special+Characters` => `field_with_special_characters`
|
19
|
+
* - `01-Numeric-Field-#01` => `numeric_field_01`
|
20
|
+
*/
|
21
|
+
readonly toLowerCase: Transformer;
|
22
|
+
/**
|
23
|
+
* A transformer that removes leading numbers and non-alphanumeric characters.
|
24
|
+
*
|
25
|
+
* _Transformation examples:_
|
26
|
+
*
|
27
|
+
* - `Field-With=Special+Characters` => `fieldwithspecialcharacters`
|
28
|
+
* - `01-Numeric-Field-#01` => `numericfield01`
|
29
|
+
*/
|
30
|
+
readonly toSnakeCase: Transformer;
|
31
|
+
}>;
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
package/dist/document.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
//# sourceMappingURL=document.js.map
|