@notabene/javascript-sdk 2.22.0-next.1 → 2.22.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.
- package/README.md +1 -1
- package/dist/cjs/notabene.d.ts +21 -1
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +21 -1
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +21 -1
- package/package.json +1 -1
- package/src/notabene.ts +2 -0
- package/src/types.ts +26 -1
- package/src/utils/arbitraries.ts +11 -8
package/README.md
CHANGED
|
@@ -898,7 +898,7 @@ const options: TransactionOptions = {
|
|
|
898
898
|
contactSupport: { // Configures the contact support button (enabled via agentSections)
|
|
899
899
|
supportUrl: 'https://support.example.com',
|
|
900
900
|
},
|
|
901
|
-
hide: [
|
|
901
|
+
hide: ['asset', 'destination'], // Don't show specific sections of component. Also accepts 'header' to drop the card header (icon, title, description, participant logo)
|
|
902
902
|
autoSubmit: false // Automatically sends the complete event and hides the complete button - Default false
|
|
903
903
|
};
|
|
904
904
|
|
package/dist/cjs/notabene.d.ts
CHANGED
|
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
|
|
|
1163
1163
|
*/
|
|
1164
1164
|
export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
|
|
1165
1165
|
|
|
1166
|
+
/**
|
|
1167
|
+
* A section of a WithdrawalAssist or DepositAssist screen that can be left out,
|
|
1168
|
+
* via {@link TransactionOptions.hide}.
|
|
1169
|
+
*
|
|
1170
|
+
* `'header'` is the card header — its status icon, title, description and
|
|
1171
|
+
* participant logo. The card body and footer are unaffected, so the Notabene
|
|
1172
|
+
* attribution in the footer still shows.
|
|
1173
|
+
*
|
|
1174
|
+
* @public
|
|
1175
|
+
*/
|
|
1176
|
+
export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
|
|
1177
|
+
|
|
1166
1178
|
/**
|
|
1167
1179
|
* Host Message Type enum representing different message types that can be sent
|
|
1168
1180
|
* from the host application.
|
|
@@ -3356,7 +3368,12 @@ export declare interface TransactionOptions {
|
|
|
3356
3368
|
allowedCounterpartyTypes?: PersonType[];
|
|
3357
3369
|
fields?: FieldTypes;
|
|
3358
3370
|
vasps?: VASPOptions;
|
|
3359
|
-
|
|
3371
|
+
/**
|
|
3372
|
+
* Sections of the component to leave out. Hiding `'header'` is useful when the
|
|
3373
|
+
* surrounding page already states what the user is being asked to do, so ours
|
|
3374
|
+
* would repeat or contradict it.
|
|
3375
|
+
*/
|
|
3376
|
+
hide?: HideSection[];
|
|
3360
3377
|
counterpartyAssist?: CounterpartyAssistConfig;
|
|
3361
3378
|
contactSupport?: ContactSupportConfig;
|
|
3362
3379
|
consent?: ConsentConfig;
|
|
@@ -3612,6 +3629,9 @@ export declare type ValidationError = {
|
|
|
3612
3629
|
/**
|
|
3613
3630
|
* Sections in a WithdrawalAssist screen
|
|
3614
3631
|
*
|
|
3632
|
+
* @deprecated Use {@link HideSection} instead. Members stay assignable to their
|
|
3633
|
+
* literals, so existing callers keep compiling.
|
|
3634
|
+
*
|
|
3615
3635
|
* @alpha
|
|
3616
3636
|
*/
|
|
3617
3637
|
export declare enum ValidationSections {
|
package/dist/cjs/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.22.0
|
|
13
|
+
"version": "2.22.0",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/esm/notabene.d.ts
CHANGED
|
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
|
|
|
1163
1163
|
*/
|
|
1164
1164
|
export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
|
|
1165
1165
|
|
|
1166
|
+
/**
|
|
1167
|
+
* A section of a WithdrawalAssist or DepositAssist screen that can be left out,
|
|
1168
|
+
* via {@link TransactionOptions.hide}.
|
|
1169
|
+
*
|
|
1170
|
+
* `'header'` is the card header — its status icon, title, description and
|
|
1171
|
+
* participant logo. The card body and footer are unaffected, so the Notabene
|
|
1172
|
+
* attribution in the footer still shows.
|
|
1173
|
+
*
|
|
1174
|
+
* @public
|
|
1175
|
+
*/
|
|
1176
|
+
export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
|
|
1177
|
+
|
|
1166
1178
|
/**
|
|
1167
1179
|
* Host Message Type enum representing different message types that can be sent
|
|
1168
1180
|
* from the host application.
|
|
@@ -3356,7 +3368,12 @@ export declare interface TransactionOptions {
|
|
|
3356
3368
|
allowedCounterpartyTypes?: PersonType[];
|
|
3357
3369
|
fields?: FieldTypes;
|
|
3358
3370
|
vasps?: VASPOptions;
|
|
3359
|
-
|
|
3371
|
+
/**
|
|
3372
|
+
* Sections of the component to leave out. Hiding `'header'` is useful when the
|
|
3373
|
+
* surrounding page already states what the user is being asked to do, so ours
|
|
3374
|
+
* would repeat or contradict it.
|
|
3375
|
+
*/
|
|
3376
|
+
hide?: HideSection[];
|
|
3360
3377
|
counterpartyAssist?: CounterpartyAssistConfig;
|
|
3361
3378
|
contactSupport?: ContactSupportConfig;
|
|
3362
3379
|
consent?: ConsentConfig;
|
|
@@ -3612,6 +3629,9 @@ export declare type ValidationError = {
|
|
|
3612
3629
|
/**
|
|
3613
3630
|
* Sections in a WithdrawalAssist screen
|
|
3614
3631
|
*
|
|
3632
|
+
* @deprecated Use {@link HideSection} instead. Members stay assignable to their
|
|
3633
|
+
* literals, so existing callers keep compiling.
|
|
3634
|
+
*
|
|
3615
3635
|
* @alpha
|
|
3616
3636
|
*/
|
|
3617
3637
|
export declare enum ValidationSections {
|
package/dist/esm/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.22.0
|
|
13
|
+
"version": "2.22.0",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/notabene.d.ts
CHANGED
|
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
|
|
|
1163
1163
|
*/
|
|
1164
1164
|
export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
|
|
1165
1165
|
|
|
1166
|
+
/**
|
|
1167
|
+
* A section of a WithdrawalAssist or DepositAssist screen that can be left out,
|
|
1168
|
+
* via {@link TransactionOptions.hide}.
|
|
1169
|
+
*
|
|
1170
|
+
* `'header'` is the card header — its status icon, title, description and
|
|
1171
|
+
* participant logo. The card body and footer are unaffected, so the Notabene
|
|
1172
|
+
* attribution in the footer still shows.
|
|
1173
|
+
*
|
|
1174
|
+
* @public
|
|
1175
|
+
*/
|
|
1176
|
+
export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
|
|
1177
|
+
|
|
1166
1178
|
/**
|
|
1167
1179
|
* Host Message Type enum representing different message types that can be sent
|
|
1168
1180
|
* from the host application.
|
|
@@ -3356,7 +3368,12 @@ export declare interface TransactionOptions {
|
|
|
3356
3368
|
allowedCounterpartyTypes?: PersonType[];
|
|
3357
3369
|
fields?: FieldTypes;
|
|
3358
3370
|
vasps?: VASPOptions;
|
|
3359
|
-
|
|
3371
|
+
/**
|
|
3372
|
+
* Sections of the component to leave out. Hiding `'header'` is useful when the
|
|
3373
|
+
* surrounding page already states what the user is being asked to do, so ours
|
|
3374
|
+
* would repeat or contradict it.
|
|
3375
|
+
*/
|
|
3376
|
+
hide?: HideSection[];
|
|
3360
3377
|
counterpartyAssist?: CounterpartyAssistConfig;
|
|
3361
3378
|
contactSupport?: ContactSupportConfig;
|
|
3362
3379
|
consent?: ConsentConfig;
|
|
@@ -3612,6 +3629,9 @@ export declare type ValidationError = {
|
|
|
3612
3629
|
/**
|
|
3613
3630
|
* Sections in a WithdrawalAssist screen
|
|
3614
3631
|
*
|
|
3632
|
+
* @deprecated Use {@link HideSection} instead. Members stay assignable to their
|
|
3633
|
+
* literals, so existing callers keep compiling.
|
|
3634
|
+
*
|
|
3615
3635
|
* @alpha
|
|
3616
3636
|
*/
|
|
3617
3637
|
export declare enum ValidationSections {
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.22.0
|
|
13
|
+
"version": "2.22.0",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/src/notabene.ts
CHANGED
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
Error,
|
|
31
31
|
FieldOptions,
|
|
32
32
|
FieldTypes,
|
|
33
|
+
HideSection,
|
|
33
34
|
HostMessage,
|
|
34
35
|
InvalidValue,
|
|
35
36
|
InvoiceReaderResponse,
|
|
@@ -159,6 +160,7 @@ export type {
|
|
|
159
160
|
Error,
|
|
160
161
|
FieldOptions,
|
|
161
162
|
FieldTypes,
|
|
163
|
+
HideSection,
|
|
162
164
|
HostMessage,
|
|
163
165
|
InvalidValue,
|
|
164
166
|
InvoiceReaderResponse,
|
package/src/types.ts
CHANGED
|
@@ -914,9 +914,29 @@ export type CounterpartyAssistConfig =
|
|
|
914
914
|
webhookUrl?: string;
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
+
/**
|
|
918
|
+
* A section of a WithdrawalAssist or DepositAssist screen that can be left out,
|
|
919
|
+
* via {@link TransactionOptions.hide}.
|
|
920
|
+
*
|
|
921
|
+
* `'header'` is the card header — its status icon, title, description and
|
|
922
|
+
* participant logo. The card body and footer are unaffected, so the Notabene
|
|
923
|
+
* attribution in the footer still shows.
|
|
924
|
+
*
|
|
925
|
+
* @public
|
|
926
|
+
*/
|
|
927
|
+
export type HideSection =
|
|
928
|
+
| 'asset'
|
|
929
|
+
| 'destination'
|
|
930
|
+
| 'counterparty'
|
|
931
|
+
| 'agent'
|
|
932
|
+
| 'header';
|
|
933
|
+
|
|
917
934
|
/**
|
|
918
935
|
* Sections in a WithdrawalAssist screen
|
|
919
936
|
*
|
|
937
|
+
* @deprecated Use {@link HideSection} instead. Members stay assignable to their
|
|
938
|
+
* literals, so existing callers keep compiling.
|
|
939
|
+
*
|
|
920
940
|
* @alpha
|
|
921
941
|
*/
|
|
922
942
|
export enum ValidationSections {
|
|
@@ -1053,7 +1073,12 @@ export interface TransactionOptions {
|
|
|
1053
1073
|
allowedCounterpartyTypes?: PersonType[]; // Defaults to All
|
|
1054
1074
|
fields?: FieldTypes;
|
|
1055
1075
|
vasps?: VASPOptions;
|
|
1056
|
-
|
|
1076
|
+
/**
|
|
1077
|
+
* Sections of the component to leave out. Hiding `'header'` is useful when the
|
|
1078
|
+
* surrounding page already states what the user is being asked to do, so ours
|
|
1079
|
+
* would repeat or contradict it.
|
|
1080
|
+
*/
|
|
1081
|
+
hide?: HideSection[];
|
|
1057
1082
|
counterpartyAssist?: CounterpartyAssistConfig;
|
|
1058
1083
|
contactSupport?: ContactSupportConfig; // Requires 'contact-support' in agentSections
|
|
1059
1084
|
consent?: ConsentConfig; // Defaults to true
|
package/src/utils/arbitraries.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
DepositRequestOptions,
|
|
19
19
|
DID,
|
|
20
20
|
FieldTypes,
|
|
21
|
+
HideSection,
|
|
21
22
|
ISOCurrency,
|
|
22
23
|
ISODate,
|
|
23
24
|
NaturalPerson,
|
|
@@ -30,13 +31,7 @@ import type {
|
|
|
30
31
|
VASPTrustStatus,
|
|
31
32
|
Withdrawal,
|
|
32
33
|
} from '../types';
|
|
33
|
-
import {
|
|
34
|
-
AgentType,
|
|
35
|
-
PersonType,
|
|
36
|
-
ProofTypes,
|
|
37
|
-
ValidationSections,
|
|
38
|
-
VASPSearchControl,
|
|
39
|
-
} from '../types';
|
|
34
|
+
import { AgentType, PersonType, ProofTypes, VASPSearchControl } from '../types';
|
|
40
35
|
import {
|
|
41
36
|
CAIP10_MATCHER,
|
|
42
37
|
CAIP19_MATCHER,
|
|
@@ -295,7 +290,15 @@ export const arbitraryTransactionOptions =
|
|
|
295
290
|
fields: fc.option(arbitraryFieldTypes()),
|
|
296
291
|
vasps: fc.option(arbitraryVASPOptions()),
|
|
297
292
|
hide: fc.option(
|
|
298
|
-
fc.array(
|
|
293
|
+
fc.array(
|
|
294
|
+
fc.constantFrom<HideSection>(
|
|
295
|
+
'asset',
|
|
296
|
+
'destination',
|
|
297
|
+
'counterparty',
|
|
298
|
+
'agent',
|
|
299
|
+
'header',
|
|
300
|
+
),
|
|
301
|
+
),
|
|
299
302
|
),
|
|
300
303
|
contactSupport: fc.option(arbitraryContactSupportConfig()),
|
|
301
304
|
});
|