@authenty/authapi-types 1.0.13 → 1.0.14

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
@@ -566,7 +566,7 @@ export declare namespace AuthApi {
566
566
  checkSession: () => Promise<responses.auth.checkSession.GET>;
567
567
  };
568
568
  checkHealth(): Promise<boolean>;
569
- user: {
569
+ users: {
570
570
  list: () => Promise<responses.ApiResponse<responses.users.GET>>;
571
571
  get: (userId: number, includePurchases?: boolean) => Promise<responses.ApiResponse<responses.user.GET>>;
572
572
  update: (userId: number, userData: Partial<objects.LocalUser>) => Promise<responses.ApiResponse<responses.user.PUT>>;
@@ -577,7 +577,7 @@ export declare namespace AuthApi {
577
577
  updateAdmin: (userId: number, isAdmin: boolean) => Promise<responses.ApiResponse<responses.user.updateAdmin.PUT>>;
578
578
  license: (userId: number) => Promise<responses.ApiResponse<responses.user.license.PUT>>;
579
579
  };
580
- purchase: {
580
+ purchases: {
581
581
  new: (paymentMethodId: number, userId: number) => Promise<responses.ApiResponse<responses.purchase.create.POST>>;
582
582
  sync: (purchaseId: number, userId: number, async?: boolean) => Promise<responses.ApiResponse<responses.purchase.id.sync.POST>>;
583
583
  update: (userId: number, purchase: objects.Purchase) => Promise<responses.ApiResponse<responses.purchase.PUT>>;
package/dist/index.js CHANGED
@@ -117,7 +117,7 @@ var AuthApi;
117
117
  return this.request('GET', 'auth', {}, { retryAttempts: 2, retryDelay: 1000 });
118
118
  }
119
119
  };
120
- this.user = {
120
+ this.users = {
121
121
  list: async () => {
122
122
  return await this.request('GET', 'users', {});
123
123
  },
@@ -137,7 +137,7 @@ var AuthApi;
137
137
  return await this.request('GET', `user/${userId}/license`, {});
138
138
  }
139
139
  };
140
- this.purchase = {
140
+ this.purchases = {
141
141
  new: async (paymentMethodId, userId) => {
142
142
  return await this.request('POST', `user/${userId}/purchase/new/${paymentMethodId}`, {});
143
143
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authenty/authapi-types",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
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
@@ -785,7 +785,7 @@ export namespace AuthApi {
785
785
  return true;
786
786
  }
787
787
 
788
- public user = {
788
+ public users = {
789
789
  list: async () => {
790
790
  return await this.request<responses.users.GET>('GET', 'users', {});
791
791
  },
@@ -806,7 +806,7 @@ export namespace AuthApi {
806
806
  }
807
807
  }
808
808
 
809
- public purchase = {
809
+ public purchases = {
810
810
  new: async (paymentMethodId: number, userId: number) => {
811
811
  return await this.request<responses.purchase.create.POST>('POST', `user/${userId}/purchase/new/${paymentMethodId}`, {});
812
812
  },