@tap-payments/auth-jsconnect 2.0.48 → 2.0.49

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 (172) hide show
  1. package/build/@types/app.d.ts +8 -6
  2. package/build/@types/form.d.ts +23 -22
  3. package/build/@types/theme.d.ts +1 -1
  4. package/build/api/account.d.ts +2 -2
  5. package/build/api/auth.d.ts +11 -11
  6. package/build/api/availabilityServices.d.ts +3 -3
  7. package/build/api/axios.js +1 -1
  8. package/build/api/board.d.ts +3 -3
  9. package/build/api/country.d.ts +1 -1
  10. package/build/api/data.d.ts +10 -10
  11. package/build/api/document.d.ts +25 -0
  12. package/build/api/document.js +38 -0
  13. package/build/api/entity.d.ts +10 -20
  14. package/build/api/entity.js +6 -5
  15. package/build/api/file.d.ts +2 -1
  16. package/build/api/file.js +14 -1
  17. package/build/api/index.d.ts +10 -3
  18. package/build/api/index.js +3 -1
  19. package/build/api/individual.d.ts +8 -8
  20. package/build/api/lead.d.ts +10 -10
  21. package/build/api/operator.d.ts +1 -1
  22. package/build/api/operator.js +1 -1
  23. package/build/api/user.d.ts +2 -2
  24. package/build/app/settings.d.ts +11 -2
  25. package/build/app/settings.js +1 -1
  26. package/build/app/store.d.ts +4 -4
  27. package/build/assets/locales/ar.json +3 -1
  28. package/build/assets/locales/en.json +3 -1
  29. package/build/components/Lottie/Lottie.d.ts +1 -2
  30. package/build/components/Lottie/Lottie.js +1 -1
  31. package/build/components/Lottie/index.d.ts +2 -2
  32. package/build/components/Lottie/index.js +2 -2
  33. package/build/components/Slide/Slide.d.ts +1 -1
  34. package/build/constants/app.d.ts +31 -0
  35. package/build/constants/app.js +43 -1
  36. package/build/features/app/bank/bankStore.d.ts +73 -10
  37. package/build/features/app/bank/bankStore.js +29 -15
  38. package/build/features/app/brand/brandStore.d.ts +104 -12
  39. package/build/features/app/brand/brandStore.js +65 -66
  40. package/build/features/app/business/businessStore.d.ts +163 -19
  41. package/build/features/app/business/businessStore.js +3 -3
  42. package/build/features/app/connect/connectStore.d.ts +121 -13
  43. package/build/features/app/connect/connectStore.js +1 -1
  44. package/build/features/app/connectExpress/connectExpressStore.d.ts +181 -19
  45. package/build/features/app/connectExpress/connectExpressStore.js +1 -1
  46. package/build/features/app/entity/entityStore.d.ts +76 -20
  47. package/build/features/app/entity/entityStore.js +67 -93
  48. package/build/features/app/individual/individualStore.d.ts +182 -20
  49. package/build/features/app/individual/individualStore.js +278 -135
  50. package/build/features/app/password/passwordStore.d.ts +102 -12
  51. package/build/features/app/password/passwordStore.js +1 -1
  52. package/build/features/app/signIn/signInStore.d.ts +61 -7
  53. package/build/features/app/signIn/signInStore.js +1 -1
  54. package/build/features/app/tax/taxStore.d.ts +62 -8
  55. package/build/features/app/tax/taxStore.js +25 -12
  56. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +1 -1
  57. package/build/features/bank/screens/BankDetails/BankStatement.js +4 -3
  58. package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
  59. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  60. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +13 -13
  61. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +6 -7
  62. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +11 -11
  63. package/build/features/brand/screens/BrandActivities/CustomerBase.js +5 -7
  64. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -7
  65. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +2 -2
  66. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
  67. package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
  68. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  69. package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -13
  70. package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
  71. package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
  72. package/build/features/business/screens/BusinessType/Article.js +1 -1
  73. package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
  74. package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -5
  75. package/build/features/business/screens/Customers/CustomerLocations.d.ts +11 -11
  76. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
  77. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  78. package/build/features/connect/screens/Individual/Email.js +1 -1
  79. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  80. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
  81. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +5 -5
  82. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
  83. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +13 -13
  84. package/build/features/entity/screens/EntityCapital/ActivityList.js +7 -7
  85. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -4
  86. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +3 -4
  87. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -4
  88. package/build/features/entity/screens/EntityName/Article.d.ts +1 -1
  89. package/build/features/entity/screens/EntityName/Article.js +16 -53
  90. package/build/features/entity/screens/EntityName/EntityName.js +2 -3
  91. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +13 -13
  92. package/build/features/entity/screens/EntityName/EntityTypeList.js +4 -6
  93. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
  94. package/build/features/entity/screens/EntityName/ExpiryDate.js +6 -6
  95. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
  96. package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
  97. package/build/features/entity/screens/EntityName/LegalName.js +2 -4
  98. package/build/features/entity/screens/EntityName/LicenseCertificate.js +4 -3
  99. package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -4
  100. package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
  101. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  102. package/build/features/featuresScreens.js +5 -0
  103. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  104. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +4 -3
  105. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +2 -4
  106. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -6
  107. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +5 -6
  108. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
  109. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +2 -4
  110. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +4 -3
  111. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +5 -6
  112. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +2 -0
  113. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +3 -2
  114. package/build/features/individual/screens/IndividualList/Email.d.ts +5 -1
  115. package/build/features/individual/screens/IndividualList/Email.js +73 -8
  116. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  117. package/build/features/individual/screens/IndividualList/UserList.js +36 -19
  118. package/build/features/individual/screens/IndividualList/validation.js +2 -1
  119. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -3
  120. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +3 -4
  121. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -5
  122. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +2 -3
  123. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  124. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +6 -7
  125. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -6
  126. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +2 -3
  127. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +6 -7
  128. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +12 -0
  129. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +143 -0
  130. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
  131. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +60 -0
  132. package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
  133. package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
  134. package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
  135. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
  136. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  137. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  138. package/build/features/shared/Address/CountryList.d.ts +9 -9
  139. package/build/features/shared/Address/InputSelect.d.ts +9 -9
  140. package/build/features/shared/Address/InputSelect.js +1 -1
  141. package/build/features/shared/Button/Button.js +1 -1
  142. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  143. package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
  144. package/build/features/shared/Button/FlowsButtons.js +1 -1
  145. package/build/features/shared/Button/{ListButton.d.ts → IndividualActionButtons.d.ts} +5 -4
  146. package/build/features/shared/Button/IndividualActionButtons.js +132 -0
  147. package/build/features/shared/Button/index.d.ts +1 -1
  148. package/build/features/shared/Button/index.js +1 -1
  149. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  150. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  151. package/build/features/shared/Input/Input.d.ts +3 -3
  152. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -1
  153. package/build/features/shared/UploadFile/FileUpload.d.ts +29 -0
  154. package/build/features/shared/UploadFile/FileUpload.js +263 -0
  155. package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
  156. package/build/features/shared/UploadFile/UploadWrapper.d.ts +33 -0
  157. package/build/features/shared/UploadFile/UploadWrapper.js +114 -0
  158. package/build/features/shared/UploadFile/index.d.ts +2 -1
  159. package/build/features/shared/UploadFile/index.js +2 -1
  160. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +9 -20
  161. package/build/features/shared/UploadMultipleFile/UploadFile.js +109 -24
  162. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +6 -4
  163. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +26 -19
  164. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  165. package/build/features/tax/screens/TaxDetails/TaxDocument.js +4 -3
  166. package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
  167. package/build/index.d.ts +2 -2
  168. package/build/index.js +4 -3
  169. package/build/utils/array.d.ts +3 -1
  170. package/build/utils/array.js +35 -6
  171. package/package.json +1 -1
  172. package/build/features/shared/Button/ListButton.js +0 -125
@@ -176,6 +176,7 @@ interface LibCallbacks {
176
176
  onStepStarted?: (name: string) => void;
177
177
  onBoardButtonClick?: (data: Record<string, any>) => void;
178
178
  onCreated?: (res: Record<string, any>) => void;
179
+ onBoardCompleted?: () => void;
179
180
  }
180
181
  export interface LibConfig extends LibCallbacks {
181
182
  publicKey: string;
@@ -239,7 +240,7 @@ export interface LocalProps {
239
240
  };
240
241
  };
241
242
  }
242
- export declare type BrandInfo = {
243
+ export type BrandInfo = {
243
244
  segment?: {
244
245
  type: {
245
246
  id: string;
@@ -268,7 +269,7 @@ export declare enum FlowsTypes {
268
269
  AUTH = "auth",
269
270
  BRAND = "brand"
270
271
  }
271
- export declare type FlowInfo = {
272
+ export type FlowInfo = {
272
273
  name: string;
273
274
  status: string;
274
275
  url: string;
@@ -283,7 +284,7 @@ export declare enum AddressFormateType {
283
284
  NUMBER = "number",
284
285
  TEXT = "text"
285
286
  }
286
- export declare type AddressFormat = {
287
+ export type AddressFormat = {
287
288
  code: string;
288
289
  name: {
289
290
  ar: string;
@@ -294,14 +295,14 @@ export declare type AddressFormat = {
294
295
  sort: number;
295
296
  type: AddressFormateType;
296
297
  };
297
- export declare type AddressType = {
298
+ export type AddressType = {
298
299
  code: string;
299
300
  name: {
300
301
  ar: string;
301
302
  en: string;
302
303
  };
303
304
  };
304
- export declare type AddressProps = {
305
+ export type AddressProps = {
305
306
  format: AddressFormat[];
306
307
  type: AddressType;
307
308
  };
@@ -332,7 +333,7 @@ export declare enum DocumentPurpose {
332
333
  CUSTOMER_SIGNATURE = "customer_signature",
333
334
  TAX_DOCUMENT = "tax_document_user_upload"
334
335
  }
335
- export declare type FileDetails = {
336
+ export type FileDetails = {
336
337
  created: string;
337
338
  id: string;
338
339
  object: string;
@@ -340,5 +341,6 @@ export declare type FileDetails = {
340
341
  size: string;
341
342
  title: string;
342
343
  type: string;
344
+ docId?: string;
343
345
  };
344
346
  export {};
@@ -1,34 +1,34 @@
1
1
  import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize, City } from './app';
2
- export declare type MobileFormValues = {
2
+ export type MobileFormValues = {
3
3
  mobile: string;
4
4
  countryCode: CountryCode;
5
5
  termAndConditionChecked?: boolean;
6
6
  };
7
- export declare type EmailFormValues = {
7
+ export type EmailFormValues = {
8
8
  email: string | null;
9
9
  };
10
- export declare type OTPFormValues = {
10
+ export type OTPFormValues = {
11
11
  otp: string;
12
12
  };
13
- export declare type PasswordFormValues = {
13
+ export type PasswordFormValues = {
14
14
  password: string;
15
15
  };
16
- export declare type NIDFormValues = {
16
+ export type NIDFormValues = {
17
17
  nid: string;
18
18
  dob: string;
19
19
  termAndConditionChecked?: boolean;
20
20
  };
21
- export declare type CivilFormValues = {
21
+ export type CivilFormValues = {
22
22
  civilId: string;
23
23
  termAndConditionChecked?: boolean;
24
24
  };
25
- export declare type IndividualFormValues = {
25
+ export type IndividualFormValues = {
26
26
  name: string;
27
27
  email: string;
28
28
  mobile: string | null;
29
29
  countryCode: CountryCode;
30
30
  };
31
- export declare type BrandFormValues = {
31
+ export type BrandFormValues = {
32
32
  brandName: string;
33
33
  segment?: Segment | undefined;
34
34
  teamSize?: TeamSize | undefined;
@@ -36,7 +36,7 @@ export declare type BrandFormValues = {
36
36
  termAndConditionChecked?: boolean;
37
37
  selectedBrandItem: BrandInfo;
38
38
  };
39
- export declare type BrandActivitiesFormValues = {
39
+ export type BrandActivitiesFormValues = {
40
40
  activities: Array<Activity>;
41
41
  customerLocations: Array<CustomerLocation>;
42
42
  expectedCustomer: ExpectedCustomer | undefined;
@@ -45,7 +45,7 @@ export declare type BrandActivitiesFormValues = {
45
45
  refundPolicy: boolean;
46
46
  transactionPolicy: boolean;
47
47
  };
48
- export declare type BusinessTypeFormValues = {
48
+ export type BusinessTypeFormValues = {
49
49
  licenseNumber: string;
50
50
  entityLegalName?: string;
51
51
  selectedLicense?: License;
@@ -53,18 +53,18 @@ export declare type BusinessTypeFormValues = {
53
53
  articleId?: string;
54
54
  articleFile?: File;
55
55
  };
56
- export declare type ActivitiesFormValues = {
56
+ export type ActivitiesFormValues = {
57
57
  activities: Array<Activity> | undefined;
58
58
  operationStartDate: string;
59
59
  };
60
- export declare type CustomersFormValues = {
60
+ export type CustomersFormValues = {
61
61
  customerLocations: Array<CustomerLocation>;
62
62
  expectedCustomer: ExpectedCustomer | undefined;
63
63
  expectedSale: ExpectedSaleRange | undefined;
64
64
  refundPolicy: boolean;
65
65
  transactionPolicy: boolean;
66
66
  };
67
- export declare type BankFormValues = {
67
+ export type BankFormValues = {
68
68
  iban: string;
69
69
  beneficiaryName: string;
70
70
  bankName: string;
@@ -72,16 +72,18 @@ export declare type BankFormValues = {
72
72
  uploading?: boolean;
73
73
  confirmPolicy: boolean;
74
74
  };
75
- export declare type TaxFormValues = {
75
+ export type TaxFormValues = {
76
76
  vatId: string;
77
77
  confirmPolicy: false;
78
78
  documentId?: Array<string>;
79
79
  };
80
- export interface IndividualEmailMobileFormValues {
81
- email: string;
80
+ export interface IndividualMobileFormValues {
82
81
  mobile: string | null;
83
82
  countryCode: CountryCode;
84
83
  }
84
+ export interface IndividualEmailMobileFormValues extends IndividualMobileFormValues {
85
+ email: string;
86
+ }
85
87
  export interface IndividualPersonalInfoFormValues extends IndividualEmailMobileFormValues {
86
88
  name: string;
87
89
  gender: string | null;
@@ -104,17 +106,17 @@ export interface IndividualExtraFormValues extends IndividualAttachmentsFormValu
104
106
  shareCount: string;
105
107
  shareValue: string;
106
108
  }
107
- export declare type IndividualAttachmentsFormValues = {
109
+ export type IndividualAttachmentsFormValues = {
108
110
  civilID?: Array<string>;
109
111
  signatureFileId?: Array<string>;
110
112
  civilIDUploading?: boolean;
111
113
  signatureFileUploading?: boolean;
112
114
  };
113
- export declare type PasswordCreateFormValues = {
115
+ export type PasswordCreateFormValues = {
114
116
  password: string;
115
117
  confirmPassword: string;
116
118
  };
117
- export declare type EntityNameFormValues = {
119
+ export type EntityNameFormValues = {
118
120
  legalName: string;
119
121
  licenseNumber: string;
120
122
  licenseType: string;
@@ -124,15 +126,14 @@ export declare type EntityNameFormValues = {
124
126
  unifiedNumber: string;
125
127
  certificateId?: Array<string>;
126
128
  articleId?: string;
127
- articleFile?: File;
128
129
  };
129
- export declare type EntityCapitalFormValues = {
130
+ export type EntityCapitalFormValues = {
130
131
  activities: Array<Activity>;
131
132
  capitalPaid: string;
132
133
  capitalShareCount: string;
133
134
  capitalShareValue: string;
134
135
  };
135
- export declare type BusinessDataFormValues = {
136
+ export type BusinessDataFormValues = {
136
137
  brandName: string;
137
138
  licenseNumber: string;
138
139
  selectedLicense?: License;
@@ -11,4 +11,4 @@ export declare enum DirectionMode {
11
11
  RTL = "rtl",
12
12
  LTR = "ltr"
13
13
  }
14
- export declare type ThemContext = Partial<Theme> | ((outerTheme: Theme) => Theme);
14
+ export type ThemContext = Partial<Theme> | ((outerTheme: Theme) => Theme);
@@ -1,4 +1,4 @@
1
- export declare type CreateAccountBody = {
1
+ export type CreateAccountBody = {
2
2
  lead_id: string;
3
3
  notify: {
4
4
  email: boolean;
@@ -8,7 +8,7 @@ export declare type CreateAccountBody = {
8
8
  is_acknowledged: boolean;
9
9
  step_name: string;
10
10
  };
11
- export declare type ExpressCreateAccountBody = {
11
+ export type ExpressCreateAccountBody = {
12
12
  post_url: string;
13
13
  lead_id: string;
14
14
  };
@@ -1,23 +1,23 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { LanguageMode } from '../@types';
3
- export declare type MobileCredential = {
3
+ export type MobileCredential = {
4
4
  code: string;
5
5
  phone: string;
6
6
  };
7
- export declare type EmailCredential = {
7
+ export type EmailCredential = {
8
8
  email: string;
9
9
  };
10
- export declare type IDCredential = {
10
+ export type IDCredential = {
11
11
  country_code?: string;
12
12
  identification_id: string;
13
13
  identification_id_type?: string;
14
14
  date_of_birth?: string;
15
15
  };
16
- export declare type CivilID = {
16
+ export type CivilID = {
17
17
  identification_id: string;
18
18
  country_code: string;
19
19
  };
20
- export declare type CreateAuthBody = {
20
+ export type CreateAuthBody = {
21
21
  country: string;
22
22
  scope: string;
23
23
  user_credentail: MobileCredential | EmailCredential | IDCredential | CivilID;
@@ -30,7 +30,7 @@ export declare type CreateAuthBody = {
30
30
  lang?: LanguageMode;
31
31
  lead_id?: string;
32
32
  };
33
- export declare type VerifyAuthBody = {
33
+ export type VerifyAuthBody = {
34
34
  auth_token: string;
35
35
  auth_type: number;
36
36
  data: string;
@@ -42,28 +42,28 @@ export declare type VerifyAuthBody = {
42
42
  encryption_contract: Array<string>;
43
43
  remember_me?: boolean;
44
44
  };
45
- export declare type VerifyOperationAuthBody = {
45
+ export type VerifyOperationAuthBody = {
46
46
  auth_token: string;
47
47
  auth_type: number;
48
48
  };
49
- export declare type ResetPasswordCredential = {
49
+ export type ResetPasswordCredential = {
50
50
  otp: string;
51
51
  new_password: string;
52
52
  };
53
- export declare type ResetPasswordVerifyAuthBody = {
53
+ export type ResetPasswordVerifyAuthBody = {
54
54
  auth_token: string;
55
55
  auth_type: number;
56
56
  step_name: string;
57
57
  user_credentail: ResetPasswordCredential;
58
58
  encryption_contract: Array<string>;
59
59
  };
60
- export declare type CreatePasswordBody = {
60
+ export type CreatePasswordBody = {
61
61
  password: string;
62
62
  signup_token?: string;
63
63
  step_name: string;
64
64
  encryption_contract: Array<string>;
65
65
  };
66
- export declare type VerifyAuthExpressOTPBody = {
66
+ export type VerifyAuthExpressOTPBody = {
67
67
  auth_token?: string;
68
68
  verify_token?: string;
69
69
  lead_id?: string;
@@ -1,14 +1,14 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- export declare type CheckEmailBody = {
2
+ export type CheckEmailBody = {
3
3
  email: string | null;
4
4
  encryption_contract: Array<string>;
5
5
  };
6
- export declare type CheckBrandBody = {
6
+ export type CheckBrandBody = {
7
7
  profile_name: string;
8
8
  country_code: string;
9
9
  encryption_contract: Array<string>;
10
10
  };
11
- export declare type CheckIBanBody = {
11
+ export type CheckIBanBody = {
12
12
  iban_number: string;
13
13
  encryption_contract?: Array<string>;
14
14
  };
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
13
13
  function verb(n) { return function (v) { return step([n, v]); }; }
14
14
  function step(op) {
15
15
  if (f) throw new TypeError("Generator is already executing.");
16
- while (_) try {
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
17
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
18
  if (y = 0, t) op = [op[0] & 2, t.value];
19
19
  switch (op[0]) {
@@ -1,15 +1,15 @@
1
- export declare type UpdateBoardBody = {
1
+ export type UpdateBoardBody = {
2
2
  id?: string;
3
3
  infoId?: string;
4
4
  step_name: string;
5
5
  lang: string;
6
6
  encryption_contract?: string;
7
7
  };
8
- export declare type RetrieveBoardInfoBody = {
8
+ export type RetrieveBoardInfoBody = {
9
9
  id: string;
10
10
  infoId: string;
11
11
  };
12
- export declare type UpdateBoardInfoBody = {
12
+ export type UpdateBoardInfoBody = {
13
13
  id: string;
14
14
  infoId: string;
15
15
  step_name: string;
@@ -1,4 +1,4 @@
1
- export declare type GetCitiesBody = {
1
+ export type GetCitiesBody = {
2
2
  country: string[];
3
3
  };
4
4
  declare const countryService: {
@@ -1,37 +1,37 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- declare type GetOccupationBody = {
2
+ type GetOccupationBody = {
3
3
  page: number;
4
4
  };
5
- declare type GetSegmentsBody = {
5
+ type GetSegmentsBody = {
6
6
  page: number;
7
7
  };
8
- declare type GetTeamSizeBody = {
8
+ type GetTeamSizeBody = {
9
9
  page: number;
10
10
  };
11
- declare type GetMonthlyIncomeBody = {
11
+ type GetMonthlyIncomeBody = {
12
12
  page: number;
13
13
  country_code: Array<string>;
14
14
  };
15
- export declare type DataElementBody = {
15
+ export type DataElementBody = {
16
16
  id: string;
17
17
  name: {
18
18
  en: string;
19
19
  ar: string;
20
20
  };
21
21
  };
22
- declare type GetCustomerBasesBody = {
22
+ type GetCustomerBasesBody = {
23
23
  page: number;
24
24
  };
25
- declare type GetExpectedSalesBody = {
25
+ type GetExpectedSalesBody = {
26
26
  page: number;
27
27
  };
28
- declare type GetExpectedCustomerSalesBody = {
28
+ type GetExpectedCustomerSalesBody = {
29
29
  page: number;
30
30
  };
31
- declare type GetSourceOfIncomeBody = {
31
+ type GetSourceOfIncomeBody = {
32
32
  page: number;
33
33
  };
34
- declare type GetChannelsOfServicesBody = {
34
+ type GetChannelsOfServicesBody = {
35
35
  page: number;
36
36
  };
37
37
  declare const dataService: {
@@ -0,0 +1,25 @@
1
+ export type DocumentInfo = {
2
+ type?: string;
3
+ number?: string;
4
+ issuing_country?: string;
5
+ issuing_date?: string;
6
+ expiry_date?: string;
7
+ images: Array<string>;
8
+ };
9
+ export type DocumentUpdateBody = {
10
+ entity_id?: boolean;
11
+ individual_type_id?: number;
12
+ country?: string;
13
+ documents: Array<DocumentInfo>;
14
+ };
15
+ export interface DocumentBody {
16
+ id: string;
17
+ images?: Array<string>;
18
+ files?: Array<string>;
19
+ }
20
+ declare const documentService: {
21
+ updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
22
+ addFilesToExistingDocument: ({ id, ...data }: DocumentBody) => Promise<any>;
23
+ removeFilesFromDocument: ({ id, ...data }: DocumentBody) => Promise<import("axios").AxiosResponse<any, any>>;
24
+ };
25
+ export { documentService };
@@ -0,0 +1,38 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { ENDPOINT_PATHS } from '../constants';
13
+ import instance, { httpClient } from './axios';
14
+ var updateDocumentInfo = function (data) {
15
+ return httpClient({
16
+ method: 'post',
17
+ url: "".concat(ENDPOINT_PATHS.DOCUMENT),
18
+ data: data
19
+ });
20
+ };
21
+ var addFilesToExistingDocument = function (_a) {
22
+ var id = _a.id, data = __rest(_a, ["id"]);
23
+ return httpClient({
24
+ method: 'put',
25
+ url: "".concat(ENDPOINT_PATHS.DOCUMENT, "/").concat(id, "/files/add"),
26
+ data: data
27
+ });
28
+ };
29
+ var removeFilesFromDocument = function (_a) {
30
+ var id = _a.id, data = __rest(_a, ["id"]);
31
+ return instance.put("".concat(ENDPOINT_PATHS.DOCUMENT, "/").concat(id, "/files/remove"), data);
32
+ };
33
+ var documentService = {
34
+ updateDocumentInfo: updateDocumentInfo,
35
+ addFilesToExistingDocument: addFilesToExistingDocument,
36
+ removeFilesFromDocument: removeFilesFromDocument
37
+ };
38
+ export { documentService };
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- export declare type EntityInfoBody = {
2
+ export type EntityInfoBody = {
3
3
  id: string;
4
4
  lead_id?: string;
5
5
  activities?: Array<{
@@ -33,7 +33,7 @@ export declare type EntityInfoBody = {
33
33
  step_name: string;
34
34
  encryption_contract?: Array<string>;
35
35
  };
36
- export declare type BankDocumentInfo = {
36
+ export type BankDocumentInfo = {
37
37
  type?: string;
38
38
  number?: string;
39
39
  issuing_country?: string;
@@ -41,7 +41,7 @@ export declare type BankDocumentInfo = {
41
41
  expiry_date?: string;
42
42
  files: Array<string>;
43
43
  };
44
- export declare type EntityBankUpdateBody = {
44
+ export type EntityBankUpdateBody = {
45
45
  wallet_id: string;
46
46
  bank_account: {
47
47
  bank_name?: string;
@@ -56,7 +56,7 @@ export declare type EntityBankUpdateBody = {
56
56
  step_name: string;
57
57
  encryption_contract?: Array<string>;
58
58
  };
59
- export declare type UpdateEntityBody = {
59
+ export type UpdateEntityBody = {
60
60
  id: string;
61
61
  license?: {
62
62
  type?: string;
@@ -86,13 +86,13 @@ export declare type UpdateEntityBody = {
86
86
  };
87
87
  encryption_contract?: Array<string>;
88
88
  };
89
- export declare type UpdateEntityActivityBody = {
89
+ export type UpdateEntityActivityBody = {
90
90
  id: string;
91
91
  activities?: Array<{
92
92
  id: string;
93
93
  }>;
94
94
  };
95
- export declare type UpdateEntityCapitalBody = {
95
+ export type UpdateEntityCapitalBody = {
96
96
  id: string;
97
97
  capital: {
98
98
  paid: string;
@@ -102,19 +102,9 @@ export declare type UpdateEntityCapitalBody = {
102
102
  };
103
103
  };
104
104
  };
105
- export declare type DocumentInfo = {
106
- type?: string;
107
- number?: string;
108
- issuing_country?: string;
109
- issuing_date?: string;
110
- expiry_date?: string;
111
- images: Array<string>;
112
- };
113
- export declare type DocumentUpdateBody = {
114
- entity_id?: boolean;
115
- individual_type_id?: number;
116
- country?: string;
117
- documents: Array<DocumentInfo>;
105
+ export type UpdateEntityAOAFileBody = {
106
+ id: string;
107
+ AOA_file_id: string;
118
108
  };
119
109
  declare const entityService: {
120
110
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -123,11 +113,11 @@ declare const entityService: {
123
113
  retrieveBankAccount: (id: string) => Promise<any>;
124
114
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
125
115
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
126
- updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
127
116
  retrieveEntity: (entity_id: string) => Promise<any>;
128
117
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
129
118
  updateEntityActivity: ({ id, ...data }: UpdateEntityActivityBody) => Promise<any>;
130
119
  retrieveEntityType: () => Promise<any>;
131
120
  updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
121
+ updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
132
122
  };
133
123
  export { entityService };
@@ -69,10 +69,11 @@ var updateIndividualInfo = function (_a) {
69
69
  data: data
70
70
  });
71
71
  };
72
- var updateDocumentInfo = function (data) {
72
+ var updateEntityAOAFile = function (_a) {
73
+ var id = _a.id, data = __rest(_a, ["id"]);
73
74
  return httpClient({
74
- method: 'post',
75
- url: "".concat(ENDPOINT_PATHS.DOCUMENT),
75
+ method: 'put',
76
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id, "/aoa_file"),
76
77
  data: data
77
78
  });
78
79
  };
@@ -89,11 +90,11 @@ var entityService = {
89
90
  retrieveBankAccount: retrieveBankAccount,
90
91
  retrieveEntityInfo: retrieveEntityInfo,
91
92
  updateIndividualInfo: updateIndividualInfo,
92
- updateDocumentInfo: updateDocumentInfo,
93
93
  retrieveEntity: retrieveEntity,
94
94
  updateEntity: updateEntity,
95
95
  updateEntityActivity: updateEntityActivity,
96
96
  retrieveEntityType: retrieveEntityType,
97
- updateEntityCapital: updateEntityCapital
97
+ updateEntityCapital: updateEntityCapital,
98
+ updateEntityAOAFile: updateEntityAOAFile
98
99
  };
99
100
  export { entityService };
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- export declare type UploadFileBody = {
2
+ export type UploadFileBody = {
3
3
  file_link_create: boolean;
4
4
  file?: File;
5
5
  title: string | undefined;
@@ -9,5 +9,6 @@ export declare type UploadFileBody = {
9
9
  declare const fileService: {
10
10
  uploadFile: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
11
11
  uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
12
+ downloadFile: (id: string, name: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
12
13
  };
13
14
  export { fileService };
package/build/api/file.js CHANGED
@@ -17,8 +17,21 @@ var uploadFileInfo = function (data, config) {
17
17
  var uploadFile = function (data, config) {
18
18
  return instance.post("".concat(ENDPOINT_PATHS.FILES_PATH), data, __assign({ headers: { 'Content-Type': 'multipart/form-data' } }, config));
19
19
  };
20
+ var downloadFile = function (id, name, config) {
21
+ return instance.get("".concat(ENDPOINT_PATHS.FILES_PATH, "/").concat(id, "/download"), __assign({ responseType: 'blob' }, config)).then(function (response) {
22
+ var url = window.URL.createObjectURL(response.data);
23
+ var link = document.createElement('a');
24
+ link.href = url;
25
+ link.download = name;
26
+ document.body.appendChild(link);
27
+ link.click();
28
+ window.URL.revokeObjectURL(url);
29
+ return response;
30
+ });
31
+ };
20
32
  var fileService = {
21
33
  uploadFile: uploadFile,
22
- uploadFileInfo: uploadFileInfo
34
+ uploadFileInfo: uploadFileInfo,
35
+ downloadFile: downloadFile
23
36
  };
24
37
  export { fileService };
@@ -3,13 +3,14 @@ import { ValidateOperatorBody } from './operator';
3
3
  import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody } from './auth';
4
4
  import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
5
5
  import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
6
- import { EntityInfoBody, EntityBankUpdateBody, BankDocumentInfo, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, UpdateEntityActivityBody, UpdateEntityCapitalBody } from './entity';
6
+ import { EntityInfoBody, EntityBankUpdateBody, BankDocumentInfo, UpdateEntityBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, UpdateEntityAOAFileBody } from './entity';
7
7
  import { CreateAccountBody, ExpressCreateAccountBody } from './account';
8
8
  import { DataElementBody } from './data';
9
9
  import { BrandListBody, UpdateBrandBody, UpdateIndividualBody, GetIndividualListBody } from './individual';
10
10
  import { UpdateBoardBody, RequestEmailBody } from './board';
11
11
  import { GetUserListBody } from './user';
12
12
  import { UploadFileBody } from './file';
13
+ import { DocumentUpdateBody, DocumentInfo, DocumentBody } from './document';
13
14
  declare const API: {
14
15
  locationService: {
15
16
  getIP: () => Promise<any>;
@@ -54,12 +55,12 @@ declare const API: {
54
55
  retrieveBankAccount: (id: string) => Promise<any>;
55
56
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
56
57
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
57
- updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
58
58
  retrieveEntity: (entity_id: string) => Promise<any>;
59
59
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
60
60
  updateEntityActivity: ({ id, ...data }: UpdateEntityActivityBody) => Promise<any>;
61
61
  retrieveEntityType: () => Promise<any>;
62
62
  updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
63
+ updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
63
64
  };
64
65
  availabilityServices: {
65
66
  checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -133,8 +134,14 @@ declare const API: {
133
134
  fileService: {
134
135
  uploadFile: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
135
136
  uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
137
+ downloadFile: (id: string, name: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
138
+ };
139
+ documentService: {
140
+ updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
141
+ addFilesToExistingDocument: ({ id, ...data }: DocumentBody) => Promise<any>;
142
+ removeFilesFromDocument: ({ id, ...data }: DocumentBody) => Promise<import("axios").AxiosResponse<any, any>>;
136
143
  };
137
144
  };
138
- export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody };
145
+ export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody };
139
146
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
140
147
  export default API;