@spawnco/sdk-types 0.0.33 → 0.0.34

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,13 +81,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
81
81
  }>;
82
82
  };
83
83
  sparks: {
84
- purchase(purchaseId: string): Promise<{
85
- success: boolean;
86
- transactionId?: string;
87
- cancelled?: boolean;
88
- error?: string;
89
- }>;
90
- buyItem(itemType: 'currency' | 'item' | 'upgrade' | 'unlock', itemConfig: {
84
+ buyItem(itemConfig: {
91
85
  id: string;
92
86
  name: string;
93
87
  description?: string;
@@ -101,17 +95,6 @@ interface SpawnClientSDK__V1<TConfig = any> {
101
95
  cancelled?: boolean;
102
96
  error?: string;
103
97
  }>;
104
- requestPurchase(purchaseOptions: {
105
- itemId: string;
106
- itemName: string;
107
- itemDescription?: string;
108
- priceSparks: number;
109
- metadata?: Record<string, unknown>;
110
- }): Promise<{
111
- success: boolean;
112
- transactionId?: string;
113
- cancelled?: boolean;
114
- }>;
115
98
  };
116
99
  }
117
100
  interface SpawnServerSDK__V1<TConfig = any> {
package/dist/index.d.ts CHANGED
@@ -81,13 +81,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
81
81
  }>;
82
82
  };
83
83
  sparks: {
84
- purchase(purchaseId: string): Promise<{
85
- success: boolean;
86
- transactionId?: string;
87
- cancelled?: boolean;
88
- error?: string;
89
- }>;
90
- buyItem(itemType: 'currency' | 'item' | 'upgrade' | 'unlock', itemConfig: {
84
+ buyItem(itemConfig: {
91
85
  id: string;
92
86
  name: string;
93
87
  description?: string;
@@ -101,17 +95,6 @@ interface SpawnClientSDK__V1<TConfig = any> {
101
95
  cancelled?: boolean;
102
96
  error?: string;
103
97
  }>;
104
- requestPurchase(purchaseOptions: {
105
- itemId: string;
106
- itemName: string;
107
- itemDescription?: string;
108
- priceSparks: number;
109
- metadata?: Record<string, unknown>;
110
- }): Promise<{
111
- success: boolean;
112
- transactionId?: string;
113
- cancelled?: boolean;
114
- }>;
115
98
  };
116
99
  }
117
100
  interface SpawnServerSDK__V1<TConfig = any> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
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,36 +106,12 @@ export interface SpawnClientSDK__V1<TConfig = any> {
106
106
  };
107
107
 
108
108
  sparks: {
109
- purchase(purchaseId: string): Promise<{
109
+ buyItem(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;
113
113
  error?: string;
114
114
  }>;
115
-
116
- buyItem(
117
- itemType: 'currency' | 'item' | 'upgrade' | 'unlock',
118
- itemConfig: {
119
- id: string;
120
- name: string;
121
- description?: string;
122
- price: number;
123
- amount?: number;
124
- data?: Record<string, unknown>;
125
- imageUrl?: string;
126
- }
127
- ): Promise<{
128
- success: boolean;
129
- transactionId?: string;
130
- cancelled?: boolean;
131
- error?: string;
132
- }>;
133
-
134
- requestPurchase(purchaseOptions: { itemId: string; itemName: string; itemDescription?: string; priceSparks: number; metadata?: Record<string, unknown> }): Promise<{
135
- success: boolean;
136
- transactionId?: string;
137
- cancelled?: boolean;
138
- }>;
139
115
  };
140
116
  }
141
117