@bid-scents/shared-sdk 1.0.0 → 1.0.2

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 CHANGED
@@ -8,7 +8,7 @@ A modular and reusable SDK for the Bid-Scents Marketplace, built with TypeScript
8
8
 
9
9
  ### 1. Clone and Initialize
10
10
  ```bash
11
- git clone https://github.com/Shawarmaa/shared-sdk.git
11
+ git clone https://github.com/BidScents/shared-sdk.git
12
12
  cd shared-sdk
13
13
  bun install # or npm install
14
14
  ```
@@ -3,12 +3,17 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
3
3
  export { OpenAPI } from './core/OpenAPI';
4
4
  export type { OpenAPIConfig } from './core/OpenAPI';
5
5
  export type { CheckUniqueUsernameResponse } from './models/CheckUniqueUsernameResponse';
6
+ export type { HomepageResponse } from './models/HomepageResponse';
6
7
  export type { HTTPValidationError } from './models/HTTPValidationError';
8
+ export type { ListingCard } from './models/ListingCard';
9
+ export { ListingType } from './models/ListingType';
7
10
  export type { LoginResponse } from './models/LoginResponse';
8
11
  export type { OnboardRequest } from './models/OnboardRequest';
9
12
  export type { OnboardResponse } from './models/OnboardResponse';
13
+ export type { Seller } from './models/Seller';
10
14
  export type { User } from './models/User';
11
15
  export type { ValidationError } from './models/ValidationError';
12
16
  export { AuthService } from './services/AuthService';
13
17
  export { DefaultService } from './services/DefaultService';
18
+ export { HomepageService } from './services/HomepageService';
14
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;A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EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/api/index.js CHANGED
@@ -5,5 +5,7 @@
5
5
  export { ApiError } from './core/ApiError';
6
6
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
7
7
  export { OpenAPI } from './core/OpenAPI';
8
+ export { ListingType } from './models/ListingType';
8
9
  export { AuthService } from './services/AuthService';
9
10
  export { DefaultService } from './services/DefaultService';
11
+ export { HomepageService } from './services/HomepageService';
@@ -0,0 +1,24 @@
1
+ import type { ListingCard } from './ListingCard';
2
+ export type HomepageResponse = {
3
+ /**
4
+ * List of featured sections. Each entry is a list for one section
5
+ */
6
+ featured: Array<ListingCard>;
7
+ /**
8
+ * Recent auction listings
9
+ */
10
+ recent_auctions: Array<ListingCard>;
11
+ /**
12
+ * Recent fixed price or negotiable listings
13
+ */
14
+ recent_listings: Array<ListingCard>;
15
+ /**
16
+ * Listings from sellers you follow
17
+ */
18
+ sellers_you_follow?: (Array<ListingCard> | null);
19
+ /**
20
+ * Recent swap listings (wishlist)
21
+ */
22
+ recent_swaps: Array<ListingCard>;
23
+ };
24
+ //# sourceMappingURL=HomepageResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomepageResponse.d.ts","sourceRoot":"","sources":["../../../src/api/models/HomepageResponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,eAAe,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;IACjD;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CACpC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,57 @@
1
+ import type { ListingType } from './ListingType';
2
+ import type { Seller } from './Seller';
3
+ export type ListingCard = {
4
+ /**
5
+ * Unique identifier for the listing
6
+ */
7
+ id: string;
8
+ /**
9
+ * Name of the listing
10
+ */
11
+ name: string;
12
+ /**
13
+ * Brand of the listing
14
+ */
15
+ brand: string;
16
+ /**
17
+ * Remaining volume percentage of the listing
18
+ */
19
+ remaining_percentage: number;
20
+ /**
21
+ * Price of the listing
22
+ */
23
+ price: number;
24
+ /**
25
+ * URL of the listing image
26
+ */
27
+ image_url: string;
28
+ /**
29
+ * Number of favorites for the listing
30
+ */
31
+ favorites_count: number;
32
+ /**
33
+ * Seller information for the listing
34
+ */
35
+ seller: Seller;
36
+ /**
37
+ * Type of the listing (e.g., FIXED_PRICE, NEGOTIABLE)
38
+ */
39
+ listing_type?: (ListingType | null);
40
+ /**
41
+ * Current bid amount for auction listings
42
+ */
43
+ current_bid?: (number | null);
44
+ /**
45
+ * Number of bids for auction listings
46
+ */
47
+ bid_count?: (number | null);
48
+ /**
49
+ * End time for auction listings, in ISO 8601 format
50
+ */
51
+ ends_at?: (string | null);
52
+ /**
53
+ * Description for wishlist
54
+ */
55
+ description?: (string | null);
56
+ };
57
+ //# sourceMappingURL=ListingCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListingCard.d.ts","sourceRoot":"","sources":["../../../src/api/models/ListingCard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACjC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare enum ListingType {
2
+ FIXED_PRICE = "FIXED_PRICE",
3
+ NEGOTIABLE = "NEGOTIABLE",
4
+ AUCTION = "AUCTION",
5
+ SWAP = "SWAP"
6
+ }
7
+ //# sourceMappingURL=ListingType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListingType.d.ts","sourceRoot":"","sources":["../../../src/api/models/ListingType.ts"],"names":[],"mappings":"AAIA,oBAAY,WAAW;IACnB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,IAAI,SAAS;CAChB"}
@@ -0,0 +1,11 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var ListingType;
6
+ (function (ListingType) {
7
+ ListingType["FIXED_PRICE"] = "FIXED_PRICE";
8
+ ListingType["NEGOTIABLE"] = "NEGOTIABLE";
9
+ ListingType["AUCTION"] = "AUCTION";
10
+ ListingType["SWAP"] = "SWAP";
11
+ })(ListingType || (ListingType = {}));
@@ -0,0 +1,11 @@
1
+ export type Seller = {
2
+ /**
3
+ * Unique identifier for the seller
4
+ */
5
+ id: string;
6
+ /**
7
+ * Username of the seller
8
+ */
9
+ username: string;
10
+ };
11
+ //# sourceMappingURL=Seller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Seller.d.ts","sourceRoot":"","sources":["../../../src/api/models/Seller.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACjB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { HomepageResponse } from '../models/HomepageResponse';
2
+ import type { CancelablePromise } from '../core/CancelablePromise';
3
+ export declare class HomepageService {
4
+ /**
5
+ * Get Homepage
6
+ * Get the homepage data including featured sections, recent auctions, listings, and swaps.
7
+ * @returns HomepageResponse Successful Response
8
+ * @throws ApiError
9
+ */
10
+ static getHomepageV1HomepageGet(): CancelablePromise<HomepageResponse>;
11
+ }
12
+ //# sourceMappingURL=HomepageService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomepageService.d.ts","sourceRoot":"","sources":["../../../src/api/services/HomepageService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,eAAe;IACxB;;;;;OAKG;WACW,wBAAwB,IAAI,iBAAiB,CAAC,gBAAgB,CAAC;CAMhF"}
@@ -0,0 +1,16 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class HomepageService {
4
+ /**
5
+ * Get Homepage
6
+ * Get the homepage data including featured sections, recent auctions, listings, and swaps.
7
+ * @returns HomepageResponse Successful Response
8
+ * @throws ApiError
9
+ */
10
+ static getHomepageV1HomepageGet() {
11
+ return __request(OpenAPI, {
12
+ method: 'GET',
13
+ url: '/v1/homepage/',
14
+ });
15
+ }
16
+ }
@@ -1,2 +1,3 @@
1
1
  export { useAuthStore } from './auth';
2
+ export { useLoadingStore } from './loading';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
@@ -1,2 +1,3 @@
1
1
  // Central export for all Zustand stores.
2
2
  export { useAuthStore } from './auth';
3
+ export { useLoadingStore } from './loading';
@@ -0,0 +1,8 @@
1
+ interface LoadingState {
2
+ isLoading: boolean;
3
+ showLoading: () => void;
4
+ hideLoading: () => void;
5
+ }
6
+ export declare const useLoadingStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LoadingState>>;
7
+ export {};
8
+ //# sourceMappingURL=loading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../src/stores/loading.ts"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,eAAO,MAAM,eAAe,2EAIzB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { create } from 'zustand';
2
+ export const useLoadingStore = create((set) => ({
3
+ isLoading: false,
4
+ showLoading: () => set({ isLoading: true }),
5
+ hideLoading: () => set({ isLoading: false }),
6
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bid-scents/shared-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Shared SDK for marketplace applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",