@authenty/authapi-types 1.0.49 → 1.0.51

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
@@ -985,7 +985,7 @@ export declare namespace AuthApi {
985
985
  }) => Promise<responses.ApiResponse<responses.admin.purchases.search.POST>>;
986
986
  };
987
987
  articles: {
988
- list: () => Promise<responses.ApiResponse<responses.articles.GET>>;
988
+ list: (includeInactive?: boolean, includeDeleted?: boolean) => Promise<responses.ApiResponse<responses.articles.GET>>;
989
989
  get: (articleId: number, includeDeleted: boolean) => Promise<responses.ApiResponse<objects.Article>>;
990
990
  create: (articleData: objects.Article) => Promise<responses.ApiResponse<responses.article.POST>>;
991
991
  update: (articleId: number, articleData: objects.Article) => Promise<responses.ApiResponse<objects.Article>>;
package/dist/index.js CHANGED
@@ -262,8 +262,8 @@ var AuthApi;
262
262
  }
263
263
  },
264
264
  articles: {
265
- list: async () => {
266
- return await this.request('GET', 'articles', {});
265
+ list: async (includeInactive = true, includeDeleted) => {
266
+ return await this.request('GET', 'articles', { includeInactive, includeDeleted });
267
267
  },
268
268
  get: async (articleId, includeDeleted) => {
269
269
  return await this.request('GET', `article/${articleId}`, { includeDeleted });
@@ -405,7 +405,7 @@ var AuthApi;
405
405
  const fetchOptions = {
406
406
  method,
407
407
  headers: {
408
- 'Content-Type': 'application/json',
408
+ ...(method !== 'DELETE' ? { 'Content-Type': 'application/json' } : {}), //TODO revisar isso!
409
409
  ...headers
410
410
  },
411
411
  credentials: 'include'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authenty/authapi-types",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
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
@@ -1008,7 +1008,7 @@ export namespace AuthApi {
1008
1008
  const fetchOptions: RequestInit = {
1009
1009
  method,
1010
1010
  headers: {
1011
- 'Content-Type': 'application/json',
1011
+ ...(method!=='DELETE' ? {'Content-Type': 'application/json'} : {}),//TODO revisar isso!
1012
1012
  ...headers
1013
1013
  },
1014
1014
  credentials: 'include'
@@ -1296,8 +1296,8 @@ export namespace AuthApi {
1296
1296
 
1297
1297
  articles: {
1298
1298
 
1299
- list: async () => {
1300
- return await this.request<responses.articles.GET>('GET', 'articles', {});
1299
+ list: async (includeInactive:boolean=true, includeDeleted?:boolean) => {
1300
+ return await this.request<responses.articles.GET>('GET', 'articles', {includeInactive, includeDeleted});
1301
1301
  },
1302
1302
  get: async (articleId:number, includeDeleted:boolean) => {
1303
1303
  return await this.request<responses.article.$articleId.GET>('GET', `article/${articleId}`, {includeDeleted});
@@ -1309,7 +1309,7 @@ export namespace AuthApi {
1309
1309
  return await this.request<responses.article.$articleId.PUT>('PUT', `article/${articleId}`, articleData);
1310
1310
  },
1311
1311
  delete: async (articleId: number) => {
1312
- return await this.request<responses.article.$articleId.DELETE>('DELETE', `article/${articleId}`, {});
1312
+ return await this.request<responses.article.$articleId.DELETE>('DELETE', `article/${articleId}`,{});
1313
1313
  }
1314
1314
  },
1315
1315