@authenty/authapi-types 1.0.22 → 1.0.23

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/index.d.ts CHANGED
@@ -769,7 +769,8 @@ export declare namespace AuthApi {
769
769
  update: (userId: number, purchase: objects.Purchase) => Promise<responses.ApiResponse<objects.Purchase>>;
770
770
  cancel: (purchaseId: number, userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchase.$purchaseId.cancel.POST>>;
771
771
  delete: (purchaseId: number, userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchase.$purchaseId.DELETE>>;
772
- list: (userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchases.GET>>;
772
+ listForUser: (userId: number) => Promise<responses.ApiResponse<responses.user.$userId.purchases.GET>>;
773
+ list: (page?: number, pageSize?: number) => Promise<responses.ApiResponse<responses.admin.purchases.search.POST>>;
773
774
  getFromGateway: (purchaseId: number, userId: number, async?: boolean) => Promise<responses.ApiResponse<objects.PaymentSystem.PG_Purchase>>;
774
775
  };
775
776
  products: {
package/dist/index.js CHANGED
@@ -184,9 +184,12 @@ var AuthApi;
184
184
  delete: async (purchaseId, userId) => {
185
185
  return await this.request('DELETE', `user/${userId}/purchase/${purchaseId}`, {});
186
186
  },
187
- list: async (userId) => {
187
+ listForUser: async (userId) => {
188
188
  return await this.request('GET', `user/${userId}/purchases`, {});
189
189
  },
190
+ list: async (page = 1, pageSize = 10) => {
191
+ return await this.request('GET', `admin/purchases/search`, { page, pageSize });
192
+ },
190
193
  getFromGateway: async (purchaseId, userId, async = false) => {
191
194
  return await this.request('GET', `user/${userId}/purchase/${purchaseId}/getFromGateway`, {});
192
195
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authenty/authapi-types",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Shared types for Authenty API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1016,9 +1016,12 @@ export namespace AuthApi {
1016
1016
  delete: async (purchaseId: number, userId: number) => {
1017
1017
  return await this.request<responses.user.$userId.purchase.$purchaseId.DELETE>('DELETE', `user/${userId}/purchase/${purchaseId}`, { });
1018
1018
  },
1019
- list: async (userId: number) => {
1019
+ listForUser: async (userId: number) => {
1020
1020
  return await this.request<responses.user.$userId.purchases.GET>('GET', `user/${userId}/purchases`, { });
1021
1021
  },
1022
+ list: async (page: number=1, pageSize: number=10) => {
1023
+ return await this.request<responses.admin.purchases.search.POST>('GET', `admin/purchases/search`, { page, pageSize});
1024
+ },
1022
1025
  getFromGateway: async (purchaseId: number, userId: number, async: boolean = false) => {
1023
1026
  return await this.request<responses.user.$userId.purchase.$purchaseId.getFromGateway.GET>('GET', `user/${userId}/purchase/${purchaseId}/getFromGateway`, {});
1024
1027
  },