api-client-fideicomisos 1.17.0 → 1.19.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/dist/client.d.ts CHANGED
@@ -115,7 +115,10 @@ export function client(options: any): {
115
115
  getByIdMember: ({ memberId }: {
116
116
  memberId: any;
117
117
  }) => any;
118
- getMembers: () => any;
118
+ getMembers: ({ page, pageSize }: {
119
+ page?: number | undefined;
120
+ pageSize?: number | undefined;
121
+ }) => any;
119
122
  updateMember: ({ jwtToken, memberId, data }: {
120
123
  jwtToken: any;
121
124
  memberId: any;
@@ -158,8 +161,10 @@ export function client(options: any): {
158
161
  getById: ({ projectId }: {
159
162
  projectId: any;
160
163
  }) => any;
161
- getProjects: ({ jwtToken }: {
164
+ getProjects: ({ jwtToken, page, pageSize }: {
162
165
  jwtToken: any;
166
+ page?: number | undefined;
167
+ pageSize?: number | undefined;
163
168
  }) => any;
164
169
  updateProjects: ({ jwtToken, projectId, data }: {
165
170
  jwtToken: any;
@@ -340,8 +345,10 @@ export function client(options: any): {
340
345
  }) => any;
341
346
  };
342
347
  contacts: {
343
- getAll: ({ jwtToken }: {
348
+ getAll: ({ jwtToken, page, pageSize }: {
344
349
  jwtToken: any;
350
+ page?: number | undefined;
351
+ pageSize?: number | undefined;
345
352
  }) => any;
346
353
  createClient: ({ jwtToken, data }: {
347
354
  jwtToken: any;
package/dist/client.js CHANGED
@@ -100,7 +100,7 @@ function generalEndpoints(baseURL) {
100
100
  }
101
101
  function client(options) {
102
102
  var env = options.env;
103
- var baseURL = env === "prod" ? "https://fideicomosos-sandbox.teo.coop.ar/" : env === "sandbox" ? "https://fideicomosos-sandbox.teo.coop.ar/" : "http://localhost:1337/";
103
+ var baseURL = env === "prod" ? "https://api-fideicomisos-prod.teocoop.site/" : env === "sandbox" ? "https://fideicomosos-sandbox.teo.coop.ar/" : "http://localhost:1337/";
104
104
  return {
105
105
  frontend: frontendEndpoints(baseURL),
106
106
  auth: authEndpoint(baseURL),
@@ -2,8 +2,10 @@ export = contacts;
2
2
  declare function contacts({ client }: {
3
3
  client: any;
4
4
  }): {
5
- getAll: ({ jwtToken }: {
5
+ getAll: ({ jwtToken, page, pageSize }: {
6
6
  jwtToken: any;
7
+ page?: number | undefined;
8
+ pageSize?: number | undefined;
7
9
  }) => any;
8
10
  createClient: ({ jwtToken, data }: {
9
11
  jwtToken: any;
@@ -3,9 +3,17 @@
3
3
  function contacts(_ref) {
4
4
  var client = _ref.client;
5
5
  function getAll(_ref2) {
6
- var jwtToken = _ref2.jwtToken;
6
+ var jwtToken = _ref2.jwtToken,
7
+ _ref2$page = _ref2.page,
8
+ page = _ref2$page === void 0 ? 1 : _ref2$page,
9
+ _ref2$pageSize = _ref2.pageSize,
10
+ pageSize = _ref2$pageSize === void 0 ? 10 : _ref2$pageSize;
11
+ var query = new URLSearchParams({
12
+ "pagination[page]": page,
13
+ "pagination[pageSize]": pageSize
14
+ }).toString();
7
15
  return client({
8
- url: "/api/contacts",
16
+ url: "/api/contacts?".concat(query),
9
17
  method: "get",
10
18
  headers: {
11
19
  Authorization: "Bearer ".concat(jwtToken)
@@ -12,7 +12,10 @@ declare function institucional({ client }: {
12
12
  getByIdMember: ({ memberId }: {
13
13
  memberId: any;
14
14
  }) => any;
15
- getMembers: () => any;
15
+ getMembers: ({ page, pageSize }: {
16
+ page?: number | undefined;
17
+ pageSize?: number | undefined;
18
+ }) => any;
16
19
  updateMember: ({ jwtToken, memberId, data }: {
17
20
  jwtToken: any;
18
21
  memberId: any;
@@ -58,16 +58,24 @@ function institucional(_ref) {
58
58
  method: "get"
59
59
  });
60
60
  }
61
- function getMembers() {
61
+ function getMembers(_ref7) {
62
+ var _ref7$page = _ref7.page,
63
+ page = _ref7$page === void 0 ? 1 : _ref7$page,
64
+ _ref7$pageSize = _ref7.pageSize,
65
+ pageSize = _ref7$pageSize === void 0 ? 10 : _ref7$pageSize;
66
+ var query = new URLSearchParams({
67
+ "pagination[page]": page,
68
+ "pagination[pageSize]": pageSize
69
+ }).toString();
62
70
  return client({
63
- url: "/api/member-teams",
71
+ url: "/api/member-teams?".concat(query),
64
72
  method: "get"
65
73
  });
66
74
  }
67
- function updateMember(_ref7) {
68
- var jwtToken = _ref7.jwtToken,
69
- memberId = _ref7.memberId,
70
- data = _ref7.data;
75
+ function updateMember(_ref8) {
76
+ var jwtToken = _ref8.jwtToken,
77
+ memberId = _ref8.memberId,
78
+ data = _ref8.data;
71
79
  return client({
72
80
  url: "/api/member-teams/".concat(memberId),
73
81
  method: "put",
@@ -77,9 +85,9 @@ function institucional(_ref) {
77
85
  data: data
78
86
  });
79
87
  }
80
- function createMember(_ref8) {
81
- var jwtToken = _ref8.jwtToken,
82
- data = _ref8.data;
88
+ function createMember(_ref9) {
89
+ var jwtToken = _ref9.jwtToken,
90
+ data = _ref9.data;
83
91
  return client({
84
92
  url: "/api/member-teams",
85
93
  method: "post",
@@ -89,9 +97,9 @@ function institucional(_ref) {
89
97
  data: data
90
98
  });
91
99
  }
92
- function deleteMember(_ref9) {
93
- var jwtToken = _ref9.jwtToken,
94
- memberId = _ref9.memberId;
100
+ function deleteMember(_ref0) {
101
+ var jwtToken = _ref0.jwtToken,
102
+ memberId = _ref0.memberId;
95
103
  return client({
96
104
  url: "/api/member-teams/".concat(memberId),
97
105
  method: "delete",
@@ -102,8 +110,8 @@ function institucional(_ref) {
102
110
  }
103
111
  // ------------------AREAS-------------------
104
112
 
105
- function getByIdArea(_ref0) {
106
- var areaId = _ref0.areaId;
113
+ function getByIdArea(_ref1) {
114
+ var areaId = _ref1.areaId;
107
115
  return client({
108
116
  url: "/api/areas-teams/".concat(areaId),
109
117
  method: "get"
@@ -115,10 +123,10 @@ function institucional(_ref) {
115
123
  method: "get"
116
124
  });
117
125
  }
118
- function updateArea(_ref1) {
119
- var jwtToken = _ref1.jwtToken,
120
- areaId = _ref1.areaId,
121
- data = _ref1.data;
126
+ function updateArea(_ref10) {
127
+ var jwtToken = _ref10.jwtToken,
128
+ areaId = _ref10.areaId,
129
+ data = _ref10.data;
122
130
  return client({
123
131
  url: "/api/areas-teams/".concat(areaId),
124
132
  method: "put",
@@ -128,9 +136,9 @@ function institucional(_ref) {
128
136
  data: data
129
137
  });
130
138
  }
131
- function createArea(_ref10) {
132
- var jwtToken = _ref10.jwtToken,
133
- data = _ref10.data;
139
+ function createArea(_ref11) {
140
+ var jwtToken = _ref11.jwtToken,
141
+ data = _ref11.data;
134
142
  return client({
135
143
  url: "/api/areas-teams",
136
144
  method: "post",
@@ -140,9 +148,9 @@ function institucional(_ref) {
140
148
  data: data
141
149
  });
142
150
  }
143
- function deleteArea(_ref11) {
144
- var jwtToken = _ref11.jwtToken,
145
- areaId = _ref11.areaId;
151
+ function deleteArea(_ref12) {
152
+ var jwtToken = _ref12.jwtToken,
153
+ areaId = _ref12.areaId;
146
154
  return client({
147
155
  url: "/api/areas-teams/".concat(areaId),
148
156
  method: "delete",
@@ -5,8 +5,10 @@ declare function companies({ client }: {
5
5
  getById: ({ projectId }: {
6
6
  projectId: any;
7
7
  }) => any;
8
- getProjects: ({ jwtToken }: {
8
+ getProjects: ({ jwtToken, page, pageSize }: {
9
9
  jwtToken: any;
10
+ page?: number | undefined;
11
+ pageSize?: number | undefined;
10
12
  }) => any;
11
13
  updateProjects: ({ jwtToken, projectId, data }: {
12
14
  jwtToken: any;
@@ -11,12 +11,20 @@ function companies(_ref) {
11
11
  });
12
12
  }
13
13
  function getProjects(_ref3) {
14
- var jwtToken = _ref3.jwtToken;
14
+ var jwtToken = _ref3.jwtToken,
15
+ _ref3$page = _ref3.page,
16
+ page = _ref3$page === void 0 ? 1 : _ref3$page,
17
+ _ref3$pageSize = _ref3.pageSize,
18
+ pageSize = _ref3$pageSize === void 0 ? 10 : _ref3$pageSize;
15
19
  return client({
16
20
  url: "/api/projects-admin",
17
21
  method: "get",
18
22
  headers: {
19
23
  Authorization: "Bearer ".concat(jwtToken)
24
+ },
25
+ params: {
26
+ page: page,
27
+ pageSize: pageSize
20
28
  }
21
29
  });
22
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-client-fideicomisos",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "Api client Banco Provincia Fideicomisos",
5
5
  "homepage": "https://github.com/TeoCoop/api-client-fideicomisos.git",
6
6
  "bugs": {
package/src/client.js CHANGED
@@ -67,7 +67,7 @@ export function client(options) {
67
67
  const { env } = options;
68
68
  const baseURL =
69
69
  env === "prod"
70
- ? "https://fideicomosos-sandbox.teo.coop.ar/"
70
+ ? "https://api-fideicomisos-prod.teocoop.site/"
71
71
  : env === "sandbox"
72
72
  ? "https://fideicomosos-sandbox.teo.coop.ar/"
73
73
  : "http://localhost:1337/";
@@ -1,7 +1,12 @@
1
1
  function contacts({ client }) {
2
- function getAll({ jwtToken }) {
2
+ function getAll({ jwtToken, page = 1, pageSize = 10 }) {
3
+ const query = new URLSearchParams({
4
+ "pagination[page]": page,
5
+ "pagination[pageSize]": pageSize,
6
+ }).toString();
7
+
3
8
  return client({
4
- url: `/api/contacts`,
9
+ url: `/api/contacts?${query}`,
5
10
  method: "get",
6
11
  headers: {
7
12
  Authorization: `Bearer ${jwtToken}`,
@@ -48,9 +48,13 @@ function institucional({ client }) {
48
48
  method: "get",
49
49
  });
50
50
  }
51
- function getMembers() {
51
+ function getMembers({ page = 1, pageSize = 10 }) {
52
+ const query = new URLSearchParams({
53
+ "pagination[page]": page,
54
+ "pagination[pageSize]": pageSize,
55
+ }).toString();
52
56
  return client({
53
- url: `/api/member-teams`,
57
+ url: `/api/member-teams?${query}`,
54
58
  method: "get",
55
59
  });
56
60
  }
@@ -7,13 +7,17 @@ function companies({ client }) {
7
7
  });
8
8
  }
9
9
 
10
- function getProjects({ jwtToken }) {
10
+ function getProjects({ jwtToken, page = 1, pageSize = 10 }) {
11
11
  return client({
12
12
  url: `/api/projects-admin`,
13
13
  method: "get",
14
14
  headers: {
15
15
  Authorization: `Bearer ${jwtToken}`,
16
16
  },
17
+ params: {
18
+ page,
19
+ pageSize,
20
+ },
17
21
  });
18
22
  }
19
23
  function updateProjects({ jwtToken, projectId, data }) {