@spawnco/sdk-types 0.0.32 → 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> {
@@ -127,6 +110,9 @@ interface SpawnServerSDK__V1<TConfig = any> {
127
110
  }>;
128
111
  };
129
112
  };
113
+ sparks: {
114
+ verifyPurchase(purchaseId: string): Promise<boolean>;
115
+ };
130
116
  config: {
131
117
  get(): Promise<TConfig>;
132
118
  version(): Promise<string>;
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> {
@@ -127,6 +110,9 @@ interface SpawnServerSDK__V1<TConfig = any> {
127
110
  }>;
128
111
  };
129
112
  };
113
+ sparks: {
114
+ verifyPurchase(purchaseId: string): Promise<boolean>;
115
+ };
130
116
  config: {
131
117
  get(): Promise<TConfig>;
132
118
  version(): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.32",
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
 
@@ -147,6 +123,10 @@ export interface SpawnServerSDK__V1<TConfig = any> {
147
123
  };
148
124
  };
149
125
 
126
+ sparks: {
127
+ verifyPurchase(purchaseId: string): Promise<boolean>;
128
+ };
129
+
150
130
  config: {
151
131
  get(): Promise<TConfig>;
152
132
  version(): Promise<string>;