@basis-theory/basis-theory-js 1.51.0 → 1.53.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.
|
@@ -10,5 +10,5 @@ export declare const BasisTheoryApplications: {
|
|
|
10
10
|
regenerateKey(id: string, options?: RequestOptions | undefined): Promise<Application>;
|
|
11
11
|
readonly client: import("axios").AxiosInstance;
|
|
12
12
|
};
|
|
13
|
-
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Application, CreateApplication>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Application>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Application, Partial<Pick<Application, "name" | "permissions">>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Application, ListApplicationsQuery>);
|
|
13
|
+
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Application, CreateApplication>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Application>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Application, Partial<Pick<Application, "name" | "permissions" | "rules">>>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Application, ListApplicationsQuery>);
|
|
14
14
|
export declare type BasisTheoryApplications = InstanceType<typeof BasisTheoryApplications>;
|
package/package.json
CHANGED
|
@@ -20,7 +20,6 @@ interface SanitizedElementOptions {
|
|
|
20
20
|
iconPosition?: string;
|
|
21
21
|
cardBrand?: string;
|
|
22
22
|
autoComplete?: string;
|
|
23
|
-
value?: string;
|
|
24
23
|
}
|
|
25
24
|
declare type ElementOptions = ElementInternalOptions & SanitizedElementOptions;
|
|
26
25
|
declare type Transform = RegExp | [RegExp, string?] | null;
|
|
@@ -31,35 +30,39 @@ interface AutoCompleteOption {
|
|
|
31
30
|
autoComplete?: AutoCompleteValue;
|
|
32
31
|
}
|
|
33
32
|
declare type CustomizableElementOptions = Pick<ElementOptions, 'style' | 'disabled'> & AutoCompleteOption;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
declare type ElementValueType = 'static' | 'reference';
|
|
34
|
+
interface CardElementValue<T extends ElementValueType> {
|
|
35
|
+
number?: T extends 'reference' ? DataElementReference : string;
|
|
36
|
+
expiration_month?: T extends 'reference' ? DataElementReference : string;
|
|
37
|
+
expiration_year?: T extends 'reference' ? DataElementReference : string;
|
|
38
|
+
cvc?: T extends 'reference' ? DataElementReference : string;
|
|
39
39
|
}
|
|
40
|
-
interface CardExpirationDateValue {
|
|
41
|
-
month: DataElementReference;
|
|
42
|
-
year: DataElementReference;
|
|
40
|
+
interface CardExpirationDateValue<T extends ElementValueType> {
|
|
41
|
+
month: T extends 'reference' ? DataElementReference : string;
|
|
42
|
+
year: T extends 'reference' ? DataElementReference : string;
|
|
43
43
|
}
|
|
44
44
|
declare type CreateCardElementOptions = CustomizableElementOptions & {
|
|
45
|
-
value?: CardElementValue
|
|
45
|
+
value?: CardElementValue<'static'>;
|
|
46
46
|
};
|
|
47
47
|
declare type UpdateCardElementOptions = CreateCardElementOptions;
|
|
48
|
-
declare type CreateTextElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'mask' | 'password'
|
|
48
|
+
declare type CreateTextElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'mask' | 'password'> & TransformOption & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
49
49
|
'aria-label'?: string;
|
|
50
|
+
value?: string;
|
|
50
51
|
};
|
|
51
52
|
declare type UpdateTextElementOptions = Omit<CreateTextElementOptions, 'targetId' | 'mask'>;
|
|
52
|
-
declare type CreateCardNumberElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'iconPosition'
|
|
53
|
+
declare type CreateCardNumberElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'iconPosition'> & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
53
54
|
'aria-label'?: string;
|
|
55
|
+
value?: string;
|
|
54
56
|
};
|
|
55
57
|
declare type UpdateCardNumberElementOptions = Omit<CreateCardNumberElementOptions, 'targetId'>;
|
|
56
58
|
declare type CreateCardExpirationDateElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder'> & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
57
59
|
'aria-label'?: string;
|
|
58
|
-
value?: CardExpirationDateValue
|
|
60
|
+
value?: CardExpirationDateValue<'static'>;
|
|
59
61
|
};
|
|
60
62
|
declare type UpdateCardExpirationDateElementOptions = Omit<CreateCardExpirationDateElementOptions, 'targetId'>;
|
|
61
|
-
declare type CreateCardVerificationCodeElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'cardBrand'
|
|
63
|
+
declare type CreateCardVerificationCodeElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'cardBrand'> & Required<Pick<ElementOptions, 'targetId'>> & {
|
|
62
64
|
'aria-label'?: string;
|
|
65
|
+
value?: string;
|
|
63
66
|
};
|
|
64
67
|
declare type UpdateCardVerificationCodeElementOptions = Omit<CreateCardVerificationCodeElementOptions, 'targetId'>;
|
|
65
68
|
export type { ElementInternalOptions, ElementType, ElementOptions, SanitizedElementOptions, Transform, CustomizableElementOptions, CreateCardElementOptions, UpdateCardElementOptions, CreateTextElementOptions, UpdateTextElementOptions, CreateCardNumberElementOptions, UpdateCardNumberElementOptions, CreateCardExpirationDateElementOptions, UpdateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, UpdateCardVerificationCodeElementOptions, CardElementValue, CardExpirationDateValue, };
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import type { Auditable } from './shared';
|
|
2
2
|
declare const APPLICATION_TYPES: readonly ["private", "public", "management"];
|
|
3
|
+
declare const TRANSFORM_TYPES: readonly ["mask", "redact", "reveal"];
|
|
3
4
|
declare type ApplicationType = typeof APPLICATION_TYPES[number];
|
|
5
|
+
declare type TransformType = typeof TRANSFORM_TYPES[number];
|
|
4
6
|
interface Application extends Auditable {
|
|
5
7
|
id: string;
|
|
6
8
|
tenantId: string;
|
|
7
9
|
name: string;
|
|
8
10
|
key?: string;
|
|
9
11
|
type: ApplicationType;
|
|
12
|
+
permissions?: string[];
|
|
13
|
+
rules?: AccessRule[];
|
|
14
|
+
}
|
|
15
|
+
interface AccessRule {
|
|
16
|
+
description: string;
|
|
17
|
+
priority: number;
|
|
18
|
+
container: string;
|
|
19
|
+
transform: TransformType;
|
|
10
20
|
permissions: string[];
|
|
11
21
|
}
|
|
12
|
-
declare type CreateApplication = Pick<Application, 'name' | 'type'> & Partial<Pick<Application, 'permissions'>>;
|
|
13
|
-
declare type UpdateApplication = Partial<Pick<Application, 'name' | 'permissions'>>;
|
|
14
|
-
export type { ApplicationType, Application, CreateApplication, UpdateApplication, };
|
|
15
|
-
export { APPLICATION_TYPES };
|
|
22
|
+
declare type CreateApplication = Pick<Application, 'name' | 'type'> & Partial<Pick<Application, 'permissions' | 'rules'>>;
|
|
23
|
+
declare type UpdateApplication = Partial<Pick<Application, 'name' | 'permissions' | 'rules'>>;
|
|
24
|
+
export type { ApplicationType, Application, CreateApplication, TransformType, UpdateApplication, };
|
|
25
|
+
export { APPLICATION_TYPES, TRANSFORM_TYPES };
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.APPLICATION_TYPES = void 0;
|
|
6
|
+
exports.TRANSFORM_TYPES = exports.APPLICATION_TYPES = void 0;
|
|
7
7
|
const APPLICATION_TYPES = ['private', 'public', 'management'];
|
|
8
|
-
exports.APPLICATION_TYPES = APPLICATION_TYPES;
|
|
8
|
+
exports.APPLICATION_TYPES = APPLICATION_TYPES;
|
|
9
|
+
const TRANSFORM_TYPES = ['mask', 'redact', 'reveal'];
|
|
10
|
+
exports.TRANSFORM_TYPES = TRANSFORM_TYPES;
|
package/types/models/tokens.d.ts
CHANGED
|
@@ -31,18 +31,18 @@ interface TokenPrivacy {
|
|
|
31
31
|
interface Token<DataType = Primitive> extends TokenBase {
|
|
32
32
|
data: TokenData<DataType>;
|
|
33
33
|
privacy?: TokenPrivacy;
|
|
34
|
-
|
|
34
|
+
containers?: string[];
|
|
35
35
|
encryption?: TokenEncryption;
|
|
36
36
|
searchIndexes?: string[];
|
|
37
37
|
fingerprintExpression?: string;
|
|
38
38
|
mask?: TokenMask;
|
|
39
39
|
expiresAt?: string;
|
|
40
40
|
}
|
|
41
|
-
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | '
|
|
41
|
+
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
|
|
42
42
|
deduplicateToken?: boolean;
|
|
43
43
|
id?: string;
|
|
44
44
|
};
|
|
45
|
-
declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | '
|
|
45
|
+
declare type UpdateToken<DataType = Primitive> = Partial<Pick<Token<DataType>, 'data' | 'containers' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
|
|
46
46
|
privacy: Omit<TokenPrivacy, 'classification'>;
|
|
47
47
|
deduplicateToken: boolean;
|
|
48
48
|
}>;
|