@zennify/sdk-js 2.1.0 → 2.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zennify/sdk-js",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "A simple package to work with https://api.zennify.app",
5
5
  "main": "dist/main.js",
6
6
  "keywords": [],
package/src/main.ts CHANGED
@@ -16,9 +16,12 @@ export * from "./lib/api/index";
16
16
 
17
17
  export * from "./interfaces/Guild";
18
18
 
19
+ // Utilidades
20
+ type Body<T extends { body?: unknown }> = NonNullable<T["body"]>;
21
+
19
22
  // Usuários, media, tipos gerais
20
23
  export type ZennifyUser = GetUserResponse;
21
- export type MediaUpdatePayload = UploadStoreMediaData;
24
+ export type MediaUpdatePayload = Body<UploadStoreMediaData>;
22
25
 
23
26
  // Stores
24
27
  export type PartialStore = GetStoresResponse[number];
package/types/main.d.ts CHANGED
@@ -2,8 +2,11 @@ import { GetStoreDiscordPanelsResponse, GetStoreProductResponse, GetStoreProduct
2
2
  export * from "./images";
3
3
  export * from "./lib/api/index";
4
4
  export * from "./interfaces/Guild";
5
+ type Body<T extends {
6
+ body?: unknown;
7
+ }> = NonNullable<T["body"]>;
5
8
  export type ZennifyUser = GetUserResponse;
6
- export type MediaUpdatePayload = UploadStoreMediaData;
9
+ export type MediaUpdatePayload = Body<UploadStoreMediaData>;
7
10
  export type PartialStore = GetStoresResponse[number];
8
11
  export type FullStore = GetStoreResponse;
9
12
  export type StoreModerator = FullStore["moderators"][number];