@stacksjs/types 0.70.86 → 0.70.87

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.
Files changed (76) hide show
  1. package/package.json +19 -5
  2. package/src/ai.ts +0 -41
  3. package/src/analytics.ts +0 -58
  4. package/src/api.ts +0 -77
  5. package/src/app.ts +0 -189
  6. package/src/attributes.ts +0 -5
  7. package/src/auth.ts +0 -161
  8. package/src/auto-imports.ts +0 -8
  9. package/src/binary.ts +0 -13
  10. package/src/cache.ts +0 -325
  11. package/src/cdn.ts +0 -17
  12. package/src/chat.ts +0 -193
  13. package/src/cli.ts +0 -445
  14. package/src/cloud.ts +0 -381
  15. package/src/cms.ts +0 -14
  16. package/src/commerce.ts +0 -18
  17. package/src/components.ts +0 -62
  18. package/src/configure.ts +0 -13
  19. package/src/cors.ts +0 -86
  20. package/src/cron-jobs.ts +0 -146
  21. package/src/dashboard.ts +0 -218
  22. package/src/database.ts +0 -117
  23. package/src/dependencies.ts +0 -69
  24. package/src/deploy.ts +0 -17
  25. package/src/dns.ts +0 -470
  26. package/src/docs.ts +0 -27
  27. package/src/email.ts +0 -511
  28. package/src/env.ts +0 -1
  29. package/src/errors.ts +0 -110
  30. package/src/events.ts +0 -37
  31. package/src/exit-code.ts +0 -10
  32. package/src/file-systems.ts +0 -70
  33. package/src/git.ts +0 -133
  34. package/src/hashing.ts +0 -127
  35. package/src/helpers.ts +0 -9
  36. package/src/i18n.ts +0 -121
  37. package/src/index.ts +0 -80
  38. package/src/library.ts +0 -911
  39. package/src/logging.ts +0 -62
  40. package/src/manifest.ts +0 -9
  41. package/src/marketing.ts +0 -14
  42. package/src/model-dashboard-augmentation.ts +0 -51
  43. package/src/model-names.ts +0 -1
  44. package/src/model.ts +0 -353
  45. package/src/monitoring.ts +0 -14
  46. package/src/native.ts +0 -0
  47. package/src/notifications.ts +0 -153
  48. package/src/oauth.ts +0 -488
  49. package/src/pages.ts +0 -10
  50. package/src/payments.ts +0 -440
  51. package/src/phone.ts +0 -78
  52. package/src/ports.ts +0 -20
  53. package/src/promise.ts +0 -1
  54. package/src/push.ts +0 -143
  55. package/src/queue.ts +0 -413
  56. package/src/reactivity.ts +0 -1
  57. package/src/realtime.ts +0 -584
  58. package/src/request.ts +0 -541
  59. package/src/response.ts +0 -16
  60. package/src/router.ts +0 -124
  61. package/src/saas.ts +0 -33
  62. package/src/scheduler.ts +0 -1
  63. package/src/search-engine.ts +0 -251
  64. package/src/security.ts +0 -23
  65. package/src/server.ts +0 -16
  66. package/src/services.ts +0 -211
  67. package/src/settings-config.ts +0 -10
  68. package/src/sms.ts +0 -265
  69. package/src/stack-extensions.ts +0 -184
  70. package/src/stacks.ts +0 -339
  71. package/src/storage.ts +0 -173
  72. package/src/table-names.ts +0 -1
  73. package/src/tables.ts +0 -57
  74. package/src/team.ts +0 -8
  75. package/src/ui.ts +0 -197
  76. package/src/utils.ts +0 -46
package/src/cache.ts DELETED
@@ -1,325 +0,0 @@
1
- /**
2
- * Cache Options - Configuration for the caching system
3
- */
4
- export interface CacheOptions {
5
- /**
6
- * **Cache Driver**
7
- *
8
- * The cache driver that will be used by your application to store
9
- * cached data. Supports 'memory', 'redis', and 'singlestore' drivers.
10
- *
11
- * The 'singlestore' driver persists cache entries in a SingleStore
12
- * rowstore table (with epoch-based TTL) — useful when you want a single
13
- * SingleStore cluster to back both your primary data and your cache.
14
- *
15
- * @default "memory"
16
- */
17
- driver: 'memory' | 'redis' | 'singlestore'
18
-
19
- /**
20
- * **Cache Prefix**
21
- *
22
- * The prefix used when storing items in the cache. Useful when
23
- * multiple applications share the same cache driver.
24
- *
25
- * @default "stacks"
26
- */
27
- prefix: string
28
-
29
- /**
30
- * **Cache TTL**
31
- *
32
- * Default time to live for items stored in the cache (in seconds).
33
- * Use 0 for no expiration.
34
- *
35
- * @default 3600
36
- */
37
- ttl: number
38
-
39
- /**
40
- * **Max Keys**
41
- *
42
- * Maximum number of keys to store in the cache.
43
- * Use -1 for unlimited.
44
- *
45
- * @default -1
46
- */
47
- maxKeys?: number
48
-
49
- /**
50
- * **Use Clones**
51
- *
52
- * Whether to clone values when getting/setting.
53
- * Disable for better performance with immutable data.
54
- *
55
- * @default true
56
- */
57
- useClones?: boolean
58
-
59
- /**
60
- * **Driver-specific configurations**
61
- */
62
- drivers: {
63
- redis?: {
64
- /**
65
- * Redis connection URL
66
- * @example "redis://localhost:6379"
67
- */
68
- url?: string
69
-
70
- /**
71
- * Redis Host
72
- * @default "localhost"
73
- */
74
- host: string
75
-
76
- /**
77
- * Redis Port
78
- * @default 6379
79
- */
80
- port: number
81
-
82
- /**
83
- * Redis Username
84
- */
85
- username?: string
86
-
87
- /**
88
- * Redis Password
89
- */
90
- password?: string
91
-
92
- /**
93
- * Redis Database number
94
- * @default 0
95
- */
96
- database?: number
97
-
98
- /**
99
- * Enable TLS
100
- * @default false
101
- */
102
- tls?: boolean
103
- }
104
-
105
- memory?: {
106
- /**
107
- * Maximum number of keys
108
- * @default -1
109
- */
110
- maxKeys?: number
111
-
112
- /**
113
- * Check period for expired keys (in seconds)
114
- * @default 600
115
- */
116
- checkPeriod?: number
117
-
118
- /**
119
- * Delete keys on expire
120
- * @default true
121
- */
122
- deleteOnExpire?: boolean
123
- }
124
-
125
- singlestore?: {
126
- /**
127
- * SingleStore host (MySQL wire protocol)
128
- * @default "127.0.0.1"
129
- */
130
- host?: string
131
-
132
- /**
133
- * SingleStore port
134
- * @default 3306
135
- */
136
- port?: number
137
-
138
- /**
139
- * SingleStore username
140
- * @default "root"
141
- */
142
- username?: string
143
-
144
- /**
145
- * SingleStore password
146
- */
147
- password?: string
148
-
149
- /**
150
- * Database that holds the cache table
151
- * @default "stacks"
152
- */
153
- database?: string
154
-
155
- /**
156
- * Table used to store cache entries
157
- * @default "stacks_cache"
158
- */
159
- table?: string
160
-
161
- /**
162
- * Enable TLS (required by managed SingleStore / Helios)
163
- * @default false
164
- */
165
- ssl?: boolean
166
- }
167
- }
168
- }
169
-
170
- export type CacheConfig = Partial<CacheOptions>
171
-
172
- /**
173
- * Cache Driver Interface - Defines the API for all cache implementations
174
- */
175
- export interface CacheDriver {
176
- /**
177
- * Get a cached value
178
- */
179
- get: <T>(key: string) => Promise<T | undefined>
180
-
181
- /**
182
- * Get multiple cached values
183
- */
184
- mget: <T>(keys: string[]) => Promise<Record<string, T>>
185
-
186
- /**
187
- * Set a cached value with optional TTL (in seconds)
188
- */
189
- set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
190
-
191
- /**
192
- * Set multiple cached values
193
- */
194
- mset: <T>(entries: Array<{ key: string, value: T, ttl?: number }>) => Promise<boolean>
195
-
196
- /**
197
- * Set a cached value that never expires
198
- */
199
- setForever: <T>(key: string, value: T) => Promise<boolean>
200
-
201
- /**
202
- * Get a value or set it if not cached
203
- */
204
- getOrSet: <T>(key: string, fetcher: () => T | Promise<T>, ttl?: number) => Promise<T>
205
-
206
- /**
207
- * Delete one or more keys
208
- */
209
- del: (keys: string | string[]) => Promise<number>
210
-
211
- /**
212
- * Check if a key exists
213
- */
214
- has: (key: string) => Promise<boolean>
215
-
216
- /**
217
- * Check if a key is missing
218
- */
219
- missing: (key: string) => Promise<boolean>
220
-
221
- /**
222
- * Delete a single key (alias for del)
223
- */
224
- remove: (key: string) => Promise<void>
225
-
226
- /**
227
- * Delete multiple keys
228
- */
229
- deleteMany: (keys: string[]) => Promise<number>
230
-
231
- /**
232
- * Clear all cached values
233
- */
234
- clear: () => Promise<void>
235
-
236
- /**
237
- * Clear all cached values (alias for clear)
238
- */
239
- flush: () => Promise<void>
240
-
241
- /**
242
- * Get all keys matching a pattern
243
- */
244
- keys: (pattern?: string) => Promise<string[]>
245
-
246
- /**
247
- * Get the TTL of a key (in seconds)
248
- */
249
- getTtl: (key: string) => Promise<number | undefined>
250
-
251
- /**
252
- * Set/update the TTL of a key
253
- */
254
- ttl: (key: string, ttl: number) => Promise<boolean>
255
-
256
- /**
257
- * Get a value and delete it atomically
258
- */
259
- take: <T>(key: string) => Promise<T | undefined>
260
-
261
- /**
262
- * Get a cached value or compute and store it (Laravel-style).
263
- * TTL comes before callback (Laravel convention).
264
- */
265
- remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
266
-
267
- /**
268
- * Get a cached value or compute and store it forever (no expiration).
269
- */
270
- rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
271
-
272
- /**
273
- * Get cache statistics
274
- */
275
- getStats: () => Promise<CacheStats>
276
-
277
- /**
278
- * Close the cache connection
279
- */
280
- close: () => Promise<void>
281
-
282
- /**
283
- * Disconnect from the cache (alias for close)
284
- */
285
- disconnect: () => Promise<void>
286
-
287
- /**
288
- * Tag-aware writes. The returned scope mirrors the cache API but
289
- * indexes every write under the supplied tag(s) so a single
290
- * `flush()` can invalidate cascading entries together.
291
- *
292
- * @example
293
- * ```ts
294
- * await cache.tags(['user:42']).put('user:42:feed', payload, 300)
295
- * await cache.tags(['user:42']).flush()
296
- * ```
297
- */
298
- tags?: (tags: readonly string[]) => TaggedCacheScope
299
- }
300
-
301
- /**
302
- * Returned by `cache.tags(tags)`. Tag-scoped writes/reads with a
303
- * cascading `flush()`.
304
- */
305
- export interface TaggedCacheScope {
306
- put: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
307
- set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
308
- setForever: <T>(key: string, value: T) => Promise<boolean>
309
- remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
310
- rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
311
- get: <T>(key: string) => Promise<T | undefined>
312
- has: (key: string) => Promise<boolean>
313
- flush: () => Promise<number>
314
- }
315
-
316
- /**
317
- * Cache Statistics
318
- */
319
- export interface CacheStats {
320
- hits: number
321
- misses: number
322
- keys: number
323
- size?: number
324
- hitRate?: number
325
- }
package/src/cdn.ts DELETED
@@ -1,17 +0,0 @@
1
- export interface CdnOptions {
2
- /**
3
- * **CDN Driver**
4
- *
5
- * This value determines the default CDN driver that will be used when interacting with the
6
- * CDN service. This value may be overridden when interacting with the CDN service.
7
- *
8
- * @default "cloudfront"
9
- * @example "cloudfront"
10
- * @example "fastly" wip
11
- *
12
- * @see https://stacks.js.org/docs/cdn
13
- */
14
- driver: string
15
- }
16
-
17
- export type CdnConfig = Partial<CdnOptions>
package/src/chat.ts DELETED
@@ -1,193 +0,0 @@
1
- export type ChatConfig = ChatOptions
2
-
3
- // Chat Message Types
4
-
5
- /**
6
- * Configuration options for chat drivers
7
- */
8
- export interface ChatDriverConfig {
9
- /**
10
- * Maximum number of retry attempts
11
- */
12
- maxRetries?: number
13
-
14
- /**
15
- * Timeout between retry attempts in milliseconds
16
- */
17
- retryTimeout?: number
18
-
19
- /**
20
- * Any additional driver-specific configuration
21
- */
22
- [key: string]: any
23
- }
24
-
25
- /**
26
- * Base chat message interface
27
- */
28
- export interface ChatMessage {
29
- /**
30
- * Recipient(s) of the message
31
- * This could be channel ID, user ID, or other identifier
32
- */
33
- to: string | string[]
34
-
35
- /**
36
- * Optional sender information
37
- */
38
- from?: {
39
- id?: string
40
- name?: string
41
- avatar?: string
42
- }
43
-
44
- /**
45
- * Optional message subject or title
46
- */
47
- subject?: string
48
-
49
- /**
50
- * Message content in plain text
51
- */
52
- content?: string
53
-
54
- /**
55
- * Template to be used for rendering the message
56
- */
57
- template?: string
58
-
59
- /**
60
- * Template data
61
- */
62
- data?: Record<string, any>
63
-
64
- /**
65
- * Any attachments to include with the message
66
- */
67
- attachments?: ChatAttachment[]
68
-
69
- /**
70
- * Callback triggered on successful message delivery
71
- */
72
- onSuccess?: () => void | Promise<void> | Partial<ChatResult>
73
-
74
- /**
75
- * Callback triggered on message delivery failure
76
- */
77
- onError?: (error: Error) => void | Promise<void> | Partial<ChatResult>
78
-
79
- /**
80
- * General handler for both success and error cases
81
- */
82
- handle?: () => void | Promise<void> | Partial<ChatResult>
83
-
84
- /**
85
- * Custom fields for platform-specific options
86
- */
87
- [key: string]: any
88
- }
89
-
90
- /**
91
- * Structure for message attachments
92
- */
93
- export interface ChatAttachment {
94
- /**
95
- * Filename of the attachment
96
- */
97
- filename: string
98
-
99
- /**
100
- * Content of the attachment
101
- */
102
- content: string | Uint8Array
103
-
104
- /**
105
- * MIME type of the attachment
106
- */
107
- contentType: string
108
-
109
- /**
110
- * Additional options for the attachment
111
- */
112
- options?: Record<string, any>
113
- }
114
-
115
- /**
116
- * Standard result object for chat operations
117
- */
118
- export interface ChatResult {
119
- /**
120
- * Indicates whether the operation was successful
121
- */
122
- success: boolean
123
-
124
- /**
125
- * Human-readable message about the result
126
- */
127
- message: string
128
-
129
- /**
130
- * Name of the provider that handled the message
131
- */
132
- provider: string
133
-
134
- /**
135
- * Optional message ID returned from the provider
136
- */
137
- messageId?: string
138
-
139
- /**
140
- * Any additional provider-specific response data
141
- */
142
- data?: Record<string, any>
143
- }
144
-
145
- /**
146
- * Chat driver options
147
- */
148
- export type ChatOptions = Record<string, any>
149
-
150
- /**
151
- * Base chat driver interface
152
- */
153
- export interface ChatDriver {
154
- /**
155
- * Name of the chat provider
156
- */
157
- name: string
158
-
159
- /**
160
- * Configure the driver
161
- */
162
- configure: (config: ChatDriverConfig) => void
163
-
164
- /**
165
- * Send a message
166
- */
167
- send: (message: ChatMessage, options?: ChatOptions) => Promise<ChatResult>
168
- }
169
-
170
- /**
171
- * Slack-specific response
172
- */
173
- export interface SlackResponse {
174
- /**
175
- * ID of the sent message
176
- */
177
- id: string
178
-
179
- /**
180
- * Channel where the message was sent
181
- */
182
- channel?: string
183
-
184
- /**
185
- * Timestamp of the message
186
- */
187
- ts?: string
188
-
189
- /**
190
- * Any additional response data
191
- */
192
- [key: string]: any
193
- }