@authenty/authapi-types 1.0.45 → 1.0.48
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 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -10
- package/package.json +1 -1
- package/src/index.ts +2 -10
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -909,7 +909,7 @@ export declare namespace AuthApi {
|
|
|
909
909
|
delete: (purchaseId: number, userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchase.$purchaseId.DELETE>>;
|
|
910
910
|
listForUser: (userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchases.GET>>;
|
|
911
911
|
list: (page?: number, pageSize?: number) => Promise<responses.ApiResponse<responses.admin.purchases.search.POST>>;
|
|
912
|
-
getFromGateway: (purchaseId: number, userId: number
|
|
912
|
+
getFromGateway: (purchaseId: number, userId: number) => Promise<responses.ApiResponse<objects.PaymentSystem.PG_Purchase>>;
|
|
913
913
|
};
|
|
914
914
|
products: {
|
|
915
915
|
list: () => Promise<responses.ApiResponse<responses.products.GET>>;
|
package/dist/index.js
CHANGED
|
@@ -125,15 +125,6 @@ var AuthApi;
|
|
|
125
125
|
* Verifica a sessão atual
|
|
126
126
|
*/
|
|
127
127
|
checkSession: async () => {
|
|
128
|
-
if (!this.bearer) {
|
|
129
|
-
return {
|
|
130
|
-
conex: true,
|
|
131
|
-
reqStat: 401,
|
|
132
|
-
success: false,
|
|
133
|
-
data: {},
|
|
134
|
-
msg: 'Token not found'
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
128
|
return this.request('GET', 'auth', {}, { retryAttempts: 2, retryDelay: 1000 });
|
|
138
129
|
}
|
|
139
130
|
};
|
|
@@ -190,7 +181,7 @@ var AuthApi;
|
|
|
190
181
|
list: async (page = 1, pageSize = 10) => {
|
|
191
182
|
return await this.request('GET', `admin/purchases/search`, { page, pageSize });
|
|
192
183
|
},
|
|
193
|
-
getFromGateway: async (purchaseId, userId
|
|
184
|
+
getFromGateway: async (purchaseId, userId) => {
|
|
194
185
|
return await this.request('GET', `user/${userId}/purchase/${purchaseId}/getFromGateway`, {});
|
|
195
186
|
},
|
|
196
187
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -861,6 +861,7 @@ export namespace AuthApi {
|
|
|
861
861
|
* Client para comunicação com a API de autenticação
|
|
862
862
|
*/
|
|
863
863
|
export class Client {
|
|
864
|
+
|
|
864
865
|
private baseURL: string;
|
|
865
866
|
private bearer: string = '';
|
|
866
867
|
private pin1: string = '';
|
|
@@ -1091,15 +1092,6 @@ export namespace AuthApi {
|
|
|
1091
1092
|
* Verifica a sessão atual
|
|
1092
1093
|
*/
|
|
1093
1094
|
checkSession: async () => {
|
|
1094
|
-
if (!this.bearer) {
|
|
1095
|
-
return {
|
|
1096
|
-
conex: true,
|
|
1097
|
-
reqStat: 401,
|
|
1098
|
-
success: false,
|
|
1099
|
-
data: {},
|
|
1100
|
-
msg: 'Token not found'
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
1095
|
return this.request<responses.auth.GET>('GET', 'auth', {}, { retryAttempts: 2, retryDelay: 1000 });
|
|
1104
1096
|
}
|
|
1105
1097
|
}
|
|
@@ -1173,7 +1165,7 @@ export namespace AuthApi {
|
|
|
1173
1165
|
list: async (page: number = 1, pageSize: number = 10) => {
|
|
1174
1166
|
return await this.request<responses.admin.purchases.search.POST>('GET', `admin/purchases/search`, { page, pageSize });
|
|
1175
1167
|
},
|
|
1176
|
-
getFromGateway: async (purchaseId: number, userId: number
|
|
1168
|
+
getFromGateway: async (purchaseId: number, userId: number) => {
|
|
1177
1169
|
return await this.request<responses.user.$userId.purchase.$purchaseId.getFromGateway.GET>('GET', `user/${userId}/purchase/${purchaseId}/getFromGateway`, {});
|
|
1178
1170
|
},
|
|
1179
1171
|
}
|