@fiado/api-invoker 1.3.76 → 1.3.78

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.
@@ -33,6 +33,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
33
33
  updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
34
34
  updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
35
35
  createCard(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
36
+ createCardVirtualOrPhysical(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
36
37
  replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
37
38
  reissueCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
38
39
  createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
@@ -93,6 +93,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
93
93
  const url = `${this.baseUrl}/cards/create`;
94
94
  return await this.httpRequest.put(url, request);
95
95
  }
96
+ async createCardVirtualOrPhysical(request) {
97
+ const url = `${this.baseUrl}cards/cardholders/${request.externalUserId}`;
98
+ return await this.httpRequest.post(url, request);
99
+ }
96
100
  async replaceCard(externalCardId, request) {
97
101
  const url = `${this.baseUrl}/cards/${externalCardId}/replace`;
98
102
  return await this.httpRequest.put(url, request);
@@ -26,6 +26,7 @@ export interface ICentralPaymentsConnectorApi {
26
26
  updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
27
27
  updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
28
28
  createCard(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
29
+ createCardVirtualOrPhysical(CreateBankAccountCardRequest: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
29
30
  replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
30
31
  reissueCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
31
32
  createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
@@ -11,5 +11,9 @@ export declare class GroupApi implements IGroupApi {
11
11
  groups: GroupResponse[];
12
12
  }[]>>;
13
13
  findByCategory(categoryId: string): Promise<any>;
14
+ findAll(params: {
15
+ index?: string;
16
+ pageSize?: number;
17
+ }): Promise<any>;
14
18
  members(params: GroupAddDirectoryRequest): Promise<any>;
15
19
  }
@@ -42,6 +42,21 @@ let GroupApi = class GroupApi {
42
42
  const url = `${this.baseUrl}groups/categories/${categoryId}`;
43
43
  return await this.httpRequest.get(`${url}`);
44
44
  }
45
+ async findAll(params) {
46
+ let queryParams = [];
47
+ let queryParamsString = '';
48
+ if (params.index) {
49
+ queryParams.push(`index=${params.index}`);
50
+ }
51
+ if (params.pageSize) {
52
+ queryParams.push(`pageSize=${params.pageSize}`);
53
+ }
54
+ if (queryParams.length > 0) {
55
+ queryParamsString = `?${queryParams.join('&')}`;
56
+ }
57
+ const url = `${this.baseUrl}groups/all${queryParamsString}`;
58
+ return await this.httpRequest.get(`${url}`);
59
+ }
45
60
  async members(params) {
46
61
  const url = `${this.baseUrl}members`;
47
62
  return await this.httpRequest.post(`${url}`, params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.76",
3
+ "version": "1.3.78",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -159,6 +159,11 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
159
159
  return await this.httpRequest.put(url, request);
160
160
  }
161
161
 
162
+ async createCardVirtualOrPhysical(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>> {
163
+ const url = `${this.baseUrl}cards/cardholders/${request.externalUserId}`;
164
+ return await this.httpRequest.post(url, request);
165
+ }
166
+
162
167
  async replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>> {
163
168
  const url = `${this.baseUrl}/cards/${externalCardId}/replace`;
164
169
  return await this.httpRequest.put(url, request);
@@ -92,6 +92,8 @@ export interface ICentralPaymentsConnectorApi {
92
92
 
93
93
  createCard(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
94
94
 
95
+ createCardVirtualOrPhysical(CreateBankAccountCardRequest: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
96
+
95
97
  replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
96
98
 
97
99
  reissueCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
@@ -37,6 +37,27 @@ export class GroupApi implements IGroupApi {
37
37
  return await this.httpRequest.get(`${url}`);
38
38
  }
39
39
 
40
+ async findAll(params: {index?:string,pageSize?:number}): Promise<any> {
41
+
42
+ let queryParams = [];
43
+ let queryParamsString = '';
44
+ if (params.index) {
45
+ queryParams.push(`index=${params.index}`);
46
+ }
47
+
48
+ if (params.pageSize) {
49
+ queryParams.push(`pageSize=${params.pageSize}`);
50
+ }
51
+
52
+ if (queryParams.length > 0) {
53
+ queryParamsString = `?${queryParams.join('&')}`;
54
+ }
55
+
56
+ const url = `${this.baseUrl}groups/all${queryParamsString}`;
57
+ return await this.httpRequest.get(`${url}`);
58
+ }
59
+
60
+
40
61
  async members(params: GroupAddDirectoryRequest): Promise<any> {
41
62
  const url = `${this.baseUrl}members`;
42
63
  return await this.httpRequest.post(`${url}`,params);