@frankieone/one-sdk 0.1.0-poc.15

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.
Files changed (45) hide show
  1. package/README.md +25 -0
  2. package/dist/index.esm.js +2 -0
  3. package/dist/index.esm.js.map +1 -0
  4. package/dist/index.umd.js +2 -0
  5. package/dist/index.umd.js.map +1 -0
  6. package/dist/types/api/ExternalIdvClient.d.ts +19 -0
  7. package/dist/types/api/FrankieApiClient.d.ts +54 -0
  8. package/dist/types/api/index.d.ts +1 -0
  9. package/dist/types/facades/POC/reactComponent.d.ts +644 -0
  10. package/dist/types/facades/POC/routing.d.ts +3 -0
  11. package/dist/types/facades/POC/viewWrapper.d.ts +4 -0
  12. package/dist/types/facades/POC/webEntry.d.ts +6 -0
  13. package/dist/types/index.d.ts +11 -0
  14. package/dist/types/models/Address.d.ts +67 -0
  15. package/dist/types/models/Admin.d.ts +1295 -0
  16. package/dist/types/models/Applicant.d.ts +115 -0
  17. package/dist/types/models/CheckSummary.d.ts +164 -0
  18. package/dist/types/models/ConfigurationReader.d.ts +7 -0
  19. package/dist/types/models/Core.d.ts +2725 -0
  20. package/dist/types/models/Document.d.ts +112 -0
  21. package/dist/types/models/General.d.ts +196 -0
  22. package/dist/types/models/Organisation.d.ts +36 -0
  23. package/dist/types/models/Profile.d.ts +27 -0
  24. package/dist/types/models/SupportingDocument.d.ts +95 -0
  25. package/dist/types/models/User.d.ts +27 -0
  26. package/dist/types/models/index.d.ts +14 -0
  27. package/dist/types/models/transformers/apiState.d.ts +23 -0
  28. package/dist/types/models/utils/address.d.ts +2 -0
  29. package/dist/types/models/utils/base64.d.ts +11 -0
  30. package/dist/types/models/utils/buildCycleUtils.d.ts +1 -0
  31. package/dist/types/models/utils/constants.d.ts +75 -0
  32. package/dist/types/models/utils/date.d.ts +5 -0
  33. package/dist/types/models/utils/getCountryDetails.d.ts +9 -0
  34. package/dist/types/models/utils/getDocumentDetails.d.ts +8 -0
  35. package/dist/types/models/utils/helper.d.ts +4 -0
  36. package/dist/types/models/utils/index.d.ts +11 -0
  37. package/dist/types/models/utils/isEmpty.d.ts +5 -0
  38. package/dist/types/models/utils/sanitiser.d.ts +8 -0
  39. package/dist/types/modules/router/ReactDictionaryRouter.d.ts +15 -0
  40. package/dist/types/modules/router/common/routing.d.ts +25 -0
  41. package/dist/types/modules/store/ReactInMemoryStore.d.ts +24 -0
  42. package/dist/types/uiComponents/reactWeb.d.ts +8 -0
  43. package/dist/types/utils/base64.d.ts +11 -0
  44. package/dist/types/utils/env2Url.d.ts +1 -0
  45. package/package.json +64 -0
@@ -0,0 +1,115 @@
1
+ import { Address, IAddressPayload } from "./Address";
2
+ import { Profile, IProfilePayload } from "./Profile";
3
+ import { Core } from "./Core";
4
+ import { Nullable, ICloneable, ExtraData } from "./General";
5
+ declare type AddressType = Address["addressType"];
6
+ declare type ApplicantExtraData = ExtraData & Partial<{
7
+ home_country_givenname: string;
8
+ home_country_familyname: string;
9
+ marital_status: Core["enumMaritalStatus"];
10
+ }>;
11
+ export declare type TOriginalUboDetails = {
12
+ name: {
13
+ givenName: Nullable<string>;
14
+ middleName: Nullable<string>;
15
+ familyName: Nullable<string>;
16
+ displayName: Nullable<string>;
17
+ };
18
+ dateOfBirth: Nullable<string>;
19
+ addresses: Address[];
20
+ };
21
+ export interface IApplicantPayload {
22
+ entityId: Nullable<string>;
23
+ customerReference: Nullable<string>;
24
+ name: {
25
+ givenName: Nullable<string>;
26
+ middleName: Nullable<string>;
27
+ familyName: Nullable<string>;
28
+ displayName: Nullable<string>;
29
+ };
30
+ extraData?: ApplicantExtraData;
31
+ dateOfBirth: Nullable<string>;
32
+ gender: Nullable<Core["enumGender"]>;
33
+ phoneNumber: {
34
+ documentId: Nullable<string>;
35
+ idNumber: Nullable<string>;
36
+ };
37
+ addresses: IAddressPayload[];
38
+ email: {
39
+ documentId: Nullable<string>;
40
+ idNumber: Nullable<string>;
41
+ };
42
+ profile: IProfilePayload | null;
43
+ assignee: Nullable<string>;
44
+ consents: string[];
45
+ blocklistAttributes: Nullable<"ATTR" | "FULL">;
46
+ originalUboDetails?: Nullable<TOriginalUboDetails>;
47
+ }
48
+ interface IApplicantConstructor {
49
+ entityId: Nullable<string>;
50
+ customerReference?: Nullable<string>;
51
+ name?: {
52
+ givenName?: Nullable<string>;
53
+ middleName?: Nullable<string>;
54
+ familyName?: Nullable<string>;
55
+ displayName?: Nullable<string>;
56
+ };
57
+ extraData?: ApplicantExtraData;
58
+ dateOfBirth?: Nullable<string>;
59
+ gender?: Nullable<Core["enumGender"]>;
60
+ phoneNumber?: {
61
+ documentId?: Nullable<string>;
62
+ idNumber?: Nullable<string>;
63
+ };
64
+ addresses?: Address[];
65
+ email?: {
66
+ documentId?: Nullable<string>;
67
+ idNumber?: Nullable<string>;
68
+ };
69
+ profile?: Nullable<Profile>;
70
+ assignee?: Nullable<string>;
71
+ consents?: string[];
72
+ blocklistAttributes?: Nullable<"ATTR" | "FULL">;
73
+ originalUboDetails?: Nullable<TOriginalUboDetails>;
74
+ }
75
+ export declare type FullNameFields = {
76
+ givenName: Nullable<string>;
77
+ middleName: Nullable<string>;
78
+ familyName: Nullable<string>;
79
+ displayName: Nullable<string>;
80
+ };
81
+ export declare type SpecialDocument = {
82
+ documentId: Nullable<string>;
83
+ idNumber: Nullable<string>;
84
+ };
85
+ export declare class Applicant implements ICloneable<Applicant> {
86
+ entityId: Nullable<string>;
87
+ customerReference: Nullable<string>;
88
+ name: FullNameFields;
89
+ dateOfBirth: Nullable<string>;
90
+ gender: Nullable<Core["enumGender"]>;
91
+ extraData: ApplicantExtraData;
92
+ phoneNumber: SpecialDocument;
93
+ addresses: Address[];
94
+ email: SpecialDocument;
95
+ profile: Nullable<Profile>;
96
+ assignee: Nullable<string>;
97
+ consents: string[];
98
+ blocklistAttributes: Nullable<"ATTR" | "FULL">;
99
+ originalUboDetails: Nullable<TOriginalUboDetails>;
100
+ constructor();
101
+ constructor(a: IApplicantConstructor);
102
+ get currentPreviousAddress(): {
103
+ current: Address;
104
+ previous: Address;
105
+ };
106
+ set fullName(value: string);
107
+ get displayName(): string;
108
+ get nativeName(): string;
109
+ getAddress(addressType: AddressType): Address | null;
110
+ clone(): Applicant;
111
+ toJSON(): IApplicantPayload;
112
+ static fromJSON(payload: IApplicantPayload): Applicant;
113
+ static default(): Applicant;
114
+ }
115
+ export {};
@@ -0,0 +1,164 @@
1
+ import { TValidation, IIssueAction, IIssue, TApplicantStatus, TKycMethod, Nullable } from "./General";
2
+ import { DuplicateResults } from "./Duplicate";
3
+ declare type issue = {
4
+ code: string | null;
5
+ description: string | null;
6
+ };
7
+ declare type TMatchsetCount = {
8
+ required: number | null;
9
+ actual: number | null;
10
+ };
11
+ export declare type TRulesetMatchFields = {
12
+ name: TMatchsetCount;
13
+ dob: TMatchsetCount;
14
+ address: TMatchsetCount;
15
+ govId: TMatchsetCount;
16
+ };
17
+ interface IConstructorCheckResult {
18
+ type: string | null;
19
+ result: TApplicantStatus;
20
+ issues: issue[];
21
+ }
22
+ interface IConstructorRulesetsCount {
23
+ name: string | null;
24
+ order: number | null;
25
+ result: string | null;
26
+ rulesetMatchFields: TRulesetMatchFields;
27
+ }
28
+ declare type CheckSource = string[] | null;
29
+ export declare class CheckResult {
30
+ type: string | null;
31
+ result: TApplicantStatus;
32
+ issues: issue[];
33
+ constructor(payload: IConstructorCheckResult);
34
+ }
35
+ export interface ICheckSummaryPayload {
36
+ checkTypes: string[];
37
+ checkDate: string;
38
+ personalChecks: {
39
+ name: TValidation;
40
+ dateOfBirth: TValidation;
41
+ phoneNumber: TValidation;
42
+ email: TValidation;
43
+ chineseName: Nullable<string>;
44
+ addresses: {
45
+ [k: string]: TValidation;
46
+ };
47
+ };
48
+ status: TApplicantStatus;
49
+ blocklistPotentialMatches: DuplicateResults[];
50
+ duplicatePotentialMatches: DuplicateResults[];
51
+ duplicateBlocklistMatches: DuplicateResults[];
52
+ risk: {
53
+ level: number | null;
54
+ class: string | null;
55
+ };
56
+ alertList: (IIssue | IIssueAction)[];
57
+ checkCounts: {
58
+ name: CheckSource;
59
+ address: {
60
+ [k: string]: CheckSource;
61
+ };
62
+ document: {
63
+ [k: string]: CheckSource;
64
+ };
65
+ dob: CheckSource;
66
+ };
67
+ kycMethod: TKycMethod;
68
+ issues: {
69
+ [issue: string]: any;
70
+ };
71
+ checkResults?: CheckResult[];
72
+ rulesetsMatches: RulesetsMatch[];
73
+ }
74
+ export interface ICheckSummaryConstructor {
75
+ checkTypes: string[];
76
+ checkDate: string;
77
+ personalChecks: {
78
+ name: TValidation;
79
+ dateOfBirth: TValidation;
80
+ phoneNumber: TValidation;
81
+ email: TValidation;
82
+ chineseName: Nullable<string>;
83
+ addresses: {
84
+ [k: string]: TValidation;
85
+ };
86
+ };
87
+ status: string;
88
+ blocklistPotentialMatches: DuplicateResults[];
89
+ duplicatePotentialMatches: DuplicateResults[];
90
+ duplicateBlocklistMatches: DuplicateResults[];
91
+ risk: {
92
+ level: number | null;
93
+ class: string | null;
94
+ };
95
+ alertList: (IIssue | IIssueAction)[];
96
+ checkCounts: {
97
+ name: CheckSource;
98
+ address: {
99
+ [k: string]: CheckSource;
100
+ };
101
+ document: {
102
+ [k: string]: CheckSource;
103
+ };
104
+ dob: CheckSource;
105
+ };
106
+ kycMethod: TKycMethod;
107
+ issues: {
108
+ [issue: string]: any;
109
+ };
110
+ checkResults?: CheckResult[];
111
+ rulesetsMatches?: RulesetsMatch[];
112
+ }
113
+ export declare class RulesetsMatch {
114
+ name: string | null;
115
+ order: number | null;
116
+ result: string | null;
117
+ rulesetMatchFields: TRulesetMatchFields;
118
+ constructor(payload: IConstructorRulesetsCount);
119
+ }
120
+ export declare class CheckSummary implements ICheckSummaryPayload {
121
+ checkDate: string;
122
+ checkTypes: string[];
123
+ personalChecks: {
124
+ name: TValidation;
125
+ dateOfBirth: TValidation;
126
+ phoneNumber: TValidation;
127
+ email: TValidation;
128
+ chineseName: Nullable<string>;
129
+ addresses: {
130
+ [k: string]: TValidation;
131
+ };
132
+ };
133
+ status: TApplicantStatus;
134
+ risk: {
135
+ level: number | null;
136
+ class: string | null;
137
+ };
138
+ alertList: (IIssue | IIssueAction)[];
139
+ blocklistPotentialMatches: DuplicateResults[];
140
+ duplicatePotentialMatches: DuplicateResults[];
141
+ duplicateBlocklistMatches: DuplicateResults[];
142
+ checkCounts: {
143
+ name: CheckSource;
144
+ address: {
145
+ [k: string]: CheckSource;
146
+ };
147
+ document: {
148
+ [k: string]: CheckSource;
149
+ };
150
+ dob: CheckSource;
151
+ };
152
+ kycMethod: TKycMethod;
153
+ issues: {
154
+ [issue: string]: any;
155
+ };
156
+ checkResults: CheckResult[];
157
+ rulesetsMatches: RulesetsMatch[];
158
+ constructor(c: ICheckSummaryConstructor);
159
+ toJSON(): ICheckSummaryPayload;
160
+ clone(): CheckSummary;
161
+ static fromJSON(payload: ICheckSummaryPayload): CheckSummary;
162
+ static default(): CheckSummary;
163
+ }
164
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ConfigurationReader as IConfigurationReader, Path, StrObject } from "../interfaces";
2
+ export declare class ConfigurationReader<Config extends StrObject> implements IConfigurationReader<Config> {
3
+ private parsedConfiguration;
4
+ constructor(original: Config);
5
+ read<Value = unknown>(path: Path<Config>): Value | undefined;
6
+ read<Value = unknown>(path: Path<Config>, fallback: Exclude<Value, undefined>): Exclude<Value, undefined>;
7
+ }