@spotsdev/sdk 1.5.2 → 1.6.0

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": "@spotsdev/sdk",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "description": "Shared TypeScript SDK for Spots API - TanStack Query hooks, API client, and utilities",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -47,7 +47,7 @@
47
47
  "react": ">=18.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@spotsdev/types": "file:../spots-types"
50
+ "@spotsdev/types": "^1.4.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^20.0.0",
@@ -12,7 +12,7 @@ import {
12
12
  } from '@tanstack/react-query'
13
13
  import {getApiClient} from '../client'
14
14
  import {productKeys} from '../queries/products'
15
- import type {Product, ProductType, ProductStatus, ApiResponse} from '../types'
15
+ import type {Product, ProductType, ApiResponse} from '../types'
16
16
 
17
17
  // ============================================================================
18
18
  // TYPES
@@ -26,16 +26,11 @@ export interface CreateProductRequest {
26
26
  type: ProductType
27
27
  price: number
28
28
  currency?: string
29
- stockQuantity?: number
30
- lowStockThreshold?: number
31
- validFrom?: string
32
- validUntil?: string
33
- deliveryRadiusKm?: number
34
- prepTimeMinutes?: number
35
- maxCapacity?: number
36
- eventDate?: string
29
+ stock?: number // Maps to API's stockQuantity
30
+ validityDays?: number // For PASS type - number of days valid
31
+ eventDate?: string // For EVENT_TICKET type
37
32
  imageUrl?: string
38
- metadata?: Record<string, unknown>
33
+ isActive?: boolean // true = ACTIVE, false = DRAFT
39
34
  }
40
35
 
41
36
  /**
@@ -51,19 +46,15 @@ function generateSlug(name: string): string {
51
46
 
52
47
  export interface UpdateProductRequest {
53
48
  name?: string
49
+ slug?: string
54
50
  description?: string
55
51
  price?: number
56
- stockQuantity?: number
57
- lowStockThreshold?: number
58
- status?: ProductStatus
59
- validFrom?: string
60
- validUntil?: string
61
- deliveryRadiusKm?: number
62
- prepTimeMinutes?: number
63
- maxCapacity?: number
64
- eventDate?: string
52
+ type?: ProductType
53
+ stock?: number // Maps to API's stockQuantity
54
+ validityDays?: number // For PASS type - number of days valid
55
+ eventDate?: string // For EVENT_TICKET type
65
56
  imageUrl?: string
66
- metadata?: Record<string, unknown>
57
+ isActive?: boolean // true = ACTIVE, false = DRAFT (maps to status field)
67
58
  }
68
59
 
69
60
  // ============================================================================