@spawnco/sdk-types 0.0.34 → 0.0.36

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.mts CHANGED
@@ -81,7 +81,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
81
81
  }>;
82
82
  };
83
83
  sparks: {
84
- buyItem(itemConfig: {
84
+ purchase(itemConfig: {
85
85
  id: string;
86
86
  name: string;
87
87
  description?: string;
@@ -111,7 +111,10 @@ interface SpawnServerSDK__V1<TConfig = any> {
111
111
  };
112
112
  };
113
113
  sparks: {
114
- verifyPurchase(purchaseId: string): Promise<boolean>;
114
+ verifyPurchase({ purchaseId, price }: {
115
+ purchaseId: string;
116
+ price: number;
117
+ }): Promise<boolean>;
115
118
  };
116
119
  config: {
117
120
  get(): Promise<TConfig>;
package/dist/index.d.ts CHANGED
@@ -81,7 +81,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
81
81
  }>;
82
82
  };
83
83
  sparks: {
84
- buyItem(itemConfig: {
84
+ purchase(itemConfig: {
85
85
  id: string;
86
86
  name: string;
87
87
  description?: string;
@@ -111,7 +111,10 @@ interface SpawnServerSDK__V1<TConfig = any> {
111
111
  };
112
112
  };
113
113
  sparks: {
114
- verifyPurchase(purchaseId: string): Promise<boolean>;
114
+ verifyPurchase({ purchaseId, price }: {
115
+ purchaseId: string;
116
+ price: number;
117
+ }): Promise<boolean>;
115
118
  };
116
119
  config: {
117
120
  get(): Promise<TConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "TypeScript type definitions for Spawn SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/v1.ts CHANGED
@@ -106,7 +106,7 @@ export interface SpawnClientSDK__V1<TConfig = any> {
106
106
  };
107
107
 
108
108
  sparks: {
109
- buyItem(itemConfig: { id: string; name: string; description?: string; price: number; amount?: number; data?: Record<string, unknown>; imageUrl?: string }): Promise<{
109
+ purchase(itemConfig: { id: string; name: string; description?: string; price: number; amount?: number; data?: Record<string, unknown>; imageUrl?: string }): Promise<{
110
110
  success: boolean;
111
111
  transactionId?: string;
112
112
  cancelled?: boolean;
@@ -124,7 +124,7 @@ export interface SpawnServerSDK__V1<TConfig = any> {
124
124
  };
125
125
 
126
126
  sparks: {
127
- verifyPurchase(purchaseId: string): Promise<boolean>;
127
+ verifyPurchase({ purchaseId, price }: { purchaseId: string; price: number }): Promise<boolean>;
128
128
  };
129
129
 
130
130
  config: {