@stacksjs/types 0.70.87 → 0.70.88

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 +2 -2
  2. package/dist/ai.d.ts +0 -37
  3. package/dist/analytics.d.ts +0 -36
  4. package/dist/api.d.ts +0 -26
  5. package/dist/app.d.ts +0 -28
  6. package/dist/attributes.d.ts +0 -1
  7. package/dist/auth.d.ts +0 -56
  8. package/dist/auto-imports.d.ts +0 -8
  9. package/dist/binary.d.ts +0 -11
  10. package/dist/cache.d.ts +0 -88
  11. package/dist/cdn.d.ts +0 -4
  12. package/dist/chat.d.ts +0 -69
  13. package/dist/cli.d.ts +0 -316
  14. package/dist/cloud.d.ts +0 -366
  15. package/dist/cms.d.ts +0 -12
  16. package/dist/commerce.d.ts +0 -14
  17. package/dist/components.d.ts +0 -9
  18. package/dist/configure.d.ts +0 -12
  19. package/dist/cors.d.ts +0 -47
  20. package/dist/cron-jobs.d.ts +0 -61
  21. package/dist/dashboard.d.ts +0 -108
  22. package/dist/database.d.ts +0 -76
  23. package/dist/dependencies.d.ts +0 -17
  24. package/dist/deploy.d.ts +0 -16
  25. package/dist/dns.d.ts +0 -362
  26. package/dist/docs.d.ts +0 -23
  27. package/dist/email.d.ts +0 -207
  28. package/dist/env.d.ts +0 -1
  29. package/dist/errors.d.ts +0 -84
  30. package/dist/events.d.ts +0 -31
  31. package/dist/exit-code.d.ts +0 -10
  32. package/dist/file-systems.d.ts +0 -60
  33. package/dist/git.d.ts +0 -60
  34. package/dist/hashing.d.ts +0 -57
  35. package/dist/helpers.d.ts +0 -1
  36. package/dist/i18n.d.ts +0 -65
  37. package/dist/index.d.ts +0 -79
  38. package/dist/index.js +0 -2
  39. package/dist/library.d.ts +0 -799
  40. package/dist/logging.d.ts +0 -15
  41. package/dist/manifest.d.ts +0 -9
  42. package/dist/marketing.d.ts +0 -12
  43. package/dist/model-dashboard-augmentation.d.ts +0 -8
  44. package/dist/model-names.d.ts +0 -1
  45. package/dist/model.d.ts +0 -256
  46. package/dist/monitoring.d.ts +0 -12
  47. package/dist/notifications.d.ts +0 -126
  48. package/dist/oauth.d.ts +0 -290
  49. package/dist/pages.d.ts +0 -10
  50. package/dist/payments.d.ts +0 -322
  51. package/dist/phone.d.ts +0 -65
  52. package/dist/ports.d.ts +0 -20
  53. package/dist/promise.d.ts +0 -1
  54. package/dist/push.d.ts +0 -108
  55. package/dist/queue.d.ts +0 -312
  56. package/dist/reactivity.d.ts +0 -1
  57. package/dist/realtime.d.ts +0 -443
  58. package/dist/request.d.ts +0 -265
  59. package/dist/response.d.ts +0 -15
  60. package/dist/router.d.ts +0 -105
  61. package/dist/saas.d.ts +0 -32
  62. package/dist/scheduler.d.ts +0 -1
  63. package/dist/search-engine.d.ts +0 -129
  64. package/dist/security.d.ts +0 -18
  65. package/dist/server.d.ts +0 -16
  66. package/dist/services.d.ts +0 -149
  67. package/dist/settings-config.d.ts +0 -9
  68. package/dist/sms.d.ts +0 -144
  69. package/dist/stack-extensions.d.ts +0 -137
  70. package/dist/stacks.d.ts +0 -45
  71. package/dist/storage.d.ts +0 -104
  72. package/dist/table-names.d.ts +0 -1
  73. package/dist/tables.d.ts +0 -34
  74. package/dist/team.d.ts +0 -7
  75. package/dist/ui.d.ts +0 -55
  76. package/dist/utils.d.ts +0 -39
package/dist/logging.d.ts DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * **Logging Options**
3
- *
4
- * This configuration defines all of your logging options. Because Stacks is fully-typed, you
5
- * may hover any of the options below and the definitions will be provided. In case you
6
- * have any questions, feel free to reach out via Discord or GitHub Discussions.
7
- */
8
- export declare interface LoggingOptions {
9
- logsPath: string
10
- deploymentsPath: string
11
- level?: 'debug' | 'info' | 'success' | 'warning' | 'error'
12
- format?: 'json' | 'text'
13
- writeToFile?: boolean
14
- }
15
- export type LoggingConfig = Partial<LoggingOptions>;
@@ -1,9 +0,0 @@
1
- /**
2
- * The npm package manifest (package.json)
3
- */
4
- export declare interface Manifest {
5
- name: string
6
- version: string
7
- description: string
8
- [key: string]: unknown
9
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * **Marketing Options**
3
- *
4
- * Top-level feature gate for the marketing bundle (`/api/email/subscribe`,
5
- * `/api/contact`, Campaign / EmailList / SocialPost). Stays inert at boot
6
- * when `enabled` is `false`.
7
- */
8
- export declare interface MarketingOptions {
9
- enabled?: boolean
10
- env?: string[]
11
- }
12
- export type MarketingConfig = Partial<MarketingOptions>;
@@ -1,8 +0,0 @@
1
- import type { DashboardModelOptions } from './dashboard';
2
- // Re-export for `import type { DashboardModelOptions } from '@stacksjs/types'`.
3
- export type { DashboardModelOptions };
4
- declare module 'bun-query-builder' {
5
- interface BrowserModelDefinition {
6
- readonly dashboard?: DashboardModelOptions
7
- }
8
- }
@@ -1 +0,0 @@
1
- export type ModelNames = 'Tag' | 'PaymentProduct' | 'FailedJob' | 'SocialPost' | 'PaymentMethod' | 'Campaign' | 'PaymentTransaction' | 'Request' | 'Activity' | 'EmailList' | 'Notification' | 'Job' | 'Log' | 'Subscription' | 'Error' | 'Comment' | 'User' | 'Websocket' | 'Page' | 'Author' | 'Post' | 'PrintDevice' | 'Category' | 'Payment' | 'Driver' | 'WaitlistProduct' | 'DigitalDelivery' | 'Manufacturer' | 'OrderItem' | 'ShippingZone' | 'Customer' | 'Product' | 'Receipt' | 'ProductVariant' | 'LicenseKey' | 'WaitlistRestaurant' | 'Review' | 'ProductUnit' | 'GiftCard' | 'Order' | 'Coupon' | 'TaxRate' | 'Transaction' | 'LoyaltyPoint' | 'LoyaltyReward' | 'ShippingMethod' | 'ShippingRate' | 'Cart' | 'DeliveryRoute' | 'CartItem';
package/dist/model.d.ts DELETED
@@ -1,256 +0,0 @@
1
- import type { DeepPartial } from '.';
2
- import type { Faker } from '@stacksjs/faker';
3
- import type { ModelNames, TableNames } from '@stacksjs/types';
4
- import type { SearchOptions } from './search-engine';
5
- import type { ValidationType } from '@stacksjs/ts-validation';
6
- /**
7
- * Helper to define a model with proper type inference.
8
- * Compatible with bun-query-builder's defineModel pattern.
9
- *
10
- * @example
11
- * ```ts
12
- * export default defineModel({
13
- * name: 'User',
14
- * table: 'users',
15
- * primaryKey: 'id',
16
- * attributes: {
17
- * name: { validation: { rule: schema.string() } },
18
- * email: { validation: { rule: schema.string().email() }, unique: true },
19
- * },
20
- * traits: {
21
- * useTimestamps: true,
22
- * useApi: true,
23
- * },
24
- * })
25
- * ```
26
- */
27
- export declare function defineModel<const T extends Model>(model: T): T;
28
- /**
29
- * Helper to define multiple models with proper type inference.
30
- * Useful for building a typed database schema.
31
- *
32
- * @example
33
- * ```ts
34
- * const models = defineModels({ User, Post, Comment })
35
- * ```
36
- */
37
- export declare function defineModels<const T extends Record<string, Model>>(models: T): T;
38
- export declare interface BaseRelation {
39
- foreignKey?: string
40
- relationName?: string
41
- }
42
- export declare interface Relation<T = string> extends BaseRelation {
43
- model: T
44
- }
45
- export declare interface HasOne<T = string> extends Array<Relation<T>> {}
46
- export declare interface MorphTo {
47
- name: string
48
- }
49
- export declare interface MorphOne<T = string> extends BaseRelation {
50
- model: T
51
- morphName?: string
52
- type?: string
53
- id?: string
54
- }
55
- export declare interface MorphMany<T = string> extends MorphOne<T> {}
56
- export declare interface HasMany<T = string> extends Array<Relation<T>> {}
57
- export declare interface BelongsTo<T = string> extends Array<Relation<T>> {}
58
- export declare interface BelongsToMany<T = string> extends Array<BaseBelongsToMany<T> | T> {}
59
- export declare interface HasOneThrough<T = string> extends Array<BaseHasOneThrough<T> | T> {}
60
- export declare interface BaseBelongsToMany<T = string> {
61
- model: T
62
- firstForeignKey?: string
63
- secondForeignKey?: string
64
- pivotTable?: string
65
- }
66
- export declare interface BaseHasOneThrough<T = string> {
67
- model: T
68
- through: T
69
- foreignKey?: string
70
- throughForeignKey?: string
71
- relationName?: string
72
- }
73
- export declare interface BaseHasManyThrough<T = string> {
74
- model: T
75
- through: T
76
- foreignKey?: string
77
- throughForeignKey?: string
78
- relationName?: string
79
- }
80
- export declare interface HasManyThrough<T = string> extends Array<BaseHasManyThrough<T> | T> {}
81
- export declare interface MorphToMany<T = string> extends Array<T> {}
82
- export declare interface MorphedByMany<T = string> extends Array<T> {}
83
- export declare interface FieldArrayElement {
84
- entity: string
85
- charValue?: string | null
86
- }
87
- export declare interface ModelElement {
88
- field: string
89
- default: string | number | boolean | Date | undefined | null
90
- unique: boolean
91
- fillable: boolean
92
- hidden: boolean
93
- required: boolean
94
- fieldArray: FieldArrayElement | null
95
- }
96
- export declare interface UserAuthOptions {
97
- useTwoFactor?: boolean
98
- usePasskey?: boolean
99
- }
100
- export declare interface LikeableOptions {
101
- table?: string
102
- foreignKey?: string
103
- }
104
- export declare interface SeedOptions {
105
- count: number
106
- fixtures?: Array<Record<string, unknown>>
107
- }
108
- declare interface ActivityLogOption {
109
- exclude: LogAttribute[]
110
- include: LogAttribute[]
111
- logOnly: LogAttribute[]
112
- }
113
- export declare interface Relations {
114
- hasOne: HasOne<ModelNames> | ModelNames[]
115
- hasMany: HasMany<ModelNames> | ModelNames[]
116
- belongsTo: BelongsTo<ModelNames> | ModelNames[]
117
- belongsToMany: BelongsToMany<ModelNames> | ModelNames[]
118
- }
119
- export declare interface ApiSettings {
120
- uri: string
121
- middleware: string[]
122
- routes:
123
- | {
124
- [key in ApiRoutes]: Action
125
- }
126
- | string[]
127
- openApi: boolean
128
- }
129
- export declare interface TimestampOptions {
130
- createdAt?: string
131
- updatedAt?: string
132
- deletedAt?: string
133
- }
134
- declare interface ValidatorMessage {
135
- [key: string]: string
136
- }
137
- export declare interface SoftDeleteOptions {
138
- deletedAt?: string
139
- }
140
- declare interface Base {}
141
- /**
142
- * Model.
143
- */
144
- export declare interface ModelOptions extends Base {
145
- name: string
146
- description?: string
147
- table?: string
148
- primaryKey?: string
149
- autoIncrement?: boolean
150
- indexes?: CompositeIndex[]
151
- dashboard?: {
152
- highlight?: boolean | number
153
- }
154
- traits?: {
155
- useUuid?: boolean
156
- useTimestamps?: boolean | TimestampOptions
157
- timestampable?: boolean | TimestampOptions
158
- useSoftDeletes?: boolean | SoftDeleteOptions
159
- softDeletable?: boolean | SoftDeleteOptions
160
- categorizable?: boolean
161
- taggable?: boolean
162
- commentables?: boolean
163
- useAuth?: boolean | UserAuthOptions
164
- authenticatable?: boolean | UserAuthOptions
165
- useSeeder?: boolean | SeedOptions
166
- seedable?: boolean | SeedOptions
167
- useSearch?: boolean | SearchOptions
168
- useSocials?: SocialOptions
169
- searchable?: boolean | SearchOptions
170
- useApi?: ApiOptions | boolean
171
- observe?: string[] | boolean
172
- billable?: boolean
173
- useActivityLog?: boolean | ActivityLogOption
174
- likeable?: boolean | LikeableOptions
175
- }
176
- attributes?: AttributesElements
177
- hasOne?: HasOne<ModelNames> | ModelNames[]
178
- hasMany?: HasMany<ModelNames> | ModelNames[]
179
- belongsTo?: BelongsTo<ModelNames> | ModelNames[]
180
- belongsToMany?: BelongsToMany<ModelNames> | ModelNames[]
181
- hasOneThrough?: HasOneThrough<ModelNames> | ModelNames[]
182
- hasManyThrough?: HasManyThrough<ModelNames> | ModelNames[]
183
- morphOne?: MorphOne<ModelNames> | ModelNames
184
- morphMany?: MorphMany<ModelNames>[] | ModelNames[]
185
- morphTo?: MorphTo
186
- morphToMany?: MorphToMany<ModelNames> | ModelNames[]
187
- morphedByMany?: MorphedByMany<ModelNames> | ModelNames[]
188
- scopes?: {
189
- [key: string]: (value: any) => any
190
- }
191
- get?: {
192
- [key: string]: (value: any) => any
193
- }
194
- set?: {
195
- [key: string]: (value: any) => any
196
- }
197
- }
198
- export declare interface Attribute {
199
- type?: string
200
- nullable?: boolean
201
- default?: string | number | boolean | Date
202
- unique?: boolean
203
- order?: number
204
- hidden?: boolean
205
- fillable?: boolean
206
- guarded?: boolean
207
- factory?: (faker: Faker) => any
208
- validation: {
209
- rule: ValidationType
210
- message?: ValidatorMessage
211
- }
212
- }
213
- export declare interface CompositeIndex {
214
- name: string
215
- columns: string[]
216
- unique?: boolean
217
- where?: string
218
- }
219
- export declare interface AttributesElements {
220
- [key: string]: Attribute
221
- }
222
- export declare interface RelationConfig {
223
- relationship: string
224
- model: string
225
- table: TableNames
226
- relationModel?: string
227
- relationTable?: string
228
- foreignKey: string
229
- modelKey: string
230
- pivotKey?: string
231
- pivotForeign?: string
232
- relationName?: string
233
- throughModel?: string
234
- throughForeignKey?: string
235
- pivotTable: TableNames
236
- }
237
- /**
238
- * Model definition type - compatible with bun-query-builder
239
- *
240
- * Models can be defined in app/Models/ (userland; overrides defaults by name)
241
- * or storage/framework/defaults/app/Models/ (framework defaults), and are used
242
- * to generate the ORM classes, migrations, and API routes.
243
- */
244
- export type Model = Partial<ModelOptions>;
245
- declare type ActionPath = string;
246
- declare type ActionName = string;
247
- declare type Action = ActionPath | ActionName | undefined;
248
- export type ApiRoutes = 'index' | 'show' | 'store' | 'update' | 'destroy';
249
- export type SocialProviders = 'google' | 'github' | 'apple' | 'twitter' | 'facebook';
250
- declare type LogAttribute = string;
251
- export type SocialOptions = SocialProviders[];
252
- declare type ApiOptions = DeepPartial<ApiSettings>;
253
- /**
254
- * Type alias for a collection of models
255
- */
256
- export type ModelRecord = Record<string, Model>;
@@ -1,12 +0,0 @@
1
- /**
2
- * **Monitoring Options**
3
- *
4
- * Top-level feature gate for the monitoring bundle (Error model +
5
- * error-tracking views and actions). Stays inert at boot when `enabled`
6
- * is `false`.
7
- */
8
- export declare interface MonitoringOptions {
9
- enabled?: boolean
10
- env?: string[]
11
- }
12
- export type MonitoringConfig = Partial<MonitoringOptions>;
@@ -1,126 +0,0 @@
1
- export declare interface NotificationOptions {
2
- default: 'email' | 'sms' | 'chat' | string
3
- email: {
4
- default:
5
- | 'emailjs'
6
- | 'mailgun'
7
- | 'mailjet'
8
- | 'mandrill'
9
- | 'netcore'
10
- | 'nodemailer'
11
- | 'postmark'
12
- | 'sendgrid'
13
- | 'ses'
14
- | string
15
- from: {
16
- name: string
17
- address: string
18
- }
19
- drivers: {
20
- smtp: {
21
- host: string
22
- port: number
23
- secure: boolean
24
- auth: {
25
- user: string
26
- pass: string
27
- }
28
- }
29
- sendgrid: {
30
- key: string
31
- senderName: string
32
- }
33
- emailjs: {
34
- host: string
35
- user: string
36
- password: string
37
- port: number
38
- secure: boolean
39
- }
40
- mailgun: {
41
- key: string
42
- domain: string
43
- username: string
44
- }
45
- mailjet: {
46
- key: string
47
- secret: string
48
- }
49
- mandrill: {
50
- key: string
51
- }
52
- netcore: {
53
- key: string
54
- }
55
- nodemailer: {
56
- host: string
57
- user: string
58
- password: string
59
- port: number
60
- secure: boolean
61
- }
62
- postmark: {
63
- key: string
64
- }
65
- ses: {
66
- region: string
67
- key: string
68
- secret: string
69
- }
70
- }
71
- }
72
- sms: {
73
- default: 'twilio' | 'nexmo' | 'gupshup' | 'plivo' | 'sms77' | 'sns' | 'telnyx' | 'termii' | string
74
- from: string
75
- drivers: {
76
- twilio: {
77
- sid: string
78
- authToken: string
79
- }
80
- nexmo: {
81
- key: string
82
- secret: string
83
- }
84
- gupshup: {
85
- user: string
86
- password: string
87
- }
88
- plivo: {
89
- sid: string
90
- authToken: string
91
- }
92
- sms77: {
93
- key: string
94
- }
95
- sns: {
96
- region: string
97
- key: string
98
- secret: string
99
- }
100
- telnyx: {
101
- key: string
102
- messageProfileId: string
103
- }
104
- termii: {
105
- key: string
106
- }
107
- }
108
- }
109
- chat: {
110
- default: 'slack' | 'msTeams' | 'discord' | string
111
- from: string
112
- drivers: {
113
- slack?: {
114
- appId: string
115
- clientId: string
116
- secret: string
117
- }
118
- msTeams?: {
119
- appId: string
120
- clientId: string
121
- secret: string
122
- }
123
- }
124
- }
125
- }
126
- export type NotificationConfig = Partial<NotificationOptions>;