@stacksjs/types 0.70.23 → 0.70.26

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 (161) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/src/ai.d.ts +37 -0
  3. package/dist/src/analytics.d.ts +36 -0
  4. package/dist/src/api.d.ts +26 -0
  5. package/dist/src/app.d.ts +28 -0
  6. package/dist/src/attributes.d.ts +1 -0
  7. package/dist/src/auth.d.ts +49 -0
  8. package/dist/src/auto-imports.d.ts +8 -0
  9. package/dist/{binary.d.ts → src/binary.d.ts} +4 -1
  10. package/dist/src/cache.d.ts +79 -0
  11. package/dist/{cdn.d.ts → src/cdn.d.ts} +1 -1
  12. package/dist/{chat.d.ts → src/chat.d.ts} +29 -48
  13. package/dist/src/cli.d.ts +308 -0
  14. package/dist/{cloud.d.ts → src/cloud.d.ts} +81 -26
  15. package/dist/{components.d.ts → src/components.d.ts} +1 -4
  16. package/dist/{configure.d.ts → src/configure.d.ts} +1 -1
  17. package/dist/{cron-jobs.d.ts → src/cron-jobs.d.ts} +33 -37
  18. package/dist/src/dashboard.d.ts +33 -0
  19. package/dist/{database.d.ts → src/database.d.ts} +20 -12
  20. package/dist/src/dependencies.d.ts +17 -0
  21. package/dist/src/deploy.d.ts +16 -0
  22. package/dist/{dns.d.ts → src/dns.d.ts} +59 -59
  23. package/dist/src/docs.d.ts +23 -0
  24. package/dist/src/email.d.ts +201 -0
  25. package/dist/src/env.d.ts +1 -0
  26. package/dist/{errors.d.ts → src/errors.d.ts} +17 -24
  27. package/dist/src/events.d.ts +31 -0
  28. package/dist/src/exit-code.d.ts +10 -0
  29. package/dist/{file-systems.d.ts → src/file-systems.d.ts} +10 -6
  30. package/dist/{git.d.ts → src/git.d.ts} +9 -6
  31. package/dist/src/hashing.d.ts +57 -0
  32. package/dist/src/helpers.d.ts +1 -0
  33. package/dist/src/i18n.d.ts +65 -0
  34. package/dist/src/index.d.ts +70 -0
  35. package/dist/{library.d.ts → src/library.d.ts} +31 -33
  36. package/dist/src/logging.d.ts +12 -0
  37. package/dist/{manifest.d.ts → src/manifest.d.ts} +4 -1
  38. package/dist/src/model-names.d.ts +1 -0
  39. package/dist/src/model.d.ts +251 -0
  40. package/dist/{notifications.d.ts → src/notifications.d.ts} +1 -26
  41. package/dist/src/oauth.d.ts +290 -0
  42. package/dist/{pages.d.ts → src/pages.d.ts} +1 -1
  43. package/dist/src/payments.d.ts +322 -0
  44. package/dist/src/phone.d.ts +52 -0
  45. package/dist/src/ports.d.ts +20 -0
  46. package/dist/src/promise.d.ts +1 -0
  47. package/dist/src/push.d.ts +108 -0
  48. package/dist/src/queue.d.ts +310 -0
  49. package/dist/src/reactivity.d.ts +1 -0
  50. package/dist/src/realtime.d.ts +443 -0
  51. package/dist/src/request.d.ts +154 -0
  52. package/dist/{response.d.ts → src/response.d.ts} +1 -1
  53. package/dist/src/router.d.ts +105 -0
  54. package/dist/{saas.d.ts → src/saas.d.ts} +2 -2
  55. package/dist/src/scheduler.d.ts +1 -0
  56. package/dist/{search-engine.d.ts → src/search-engine.d.ts} +41 -45
  57. package/dist/{security.d.ts → src/security.d.ts} +4 -8
  58. package/dist/{server.d.ts → src/server.d.ts} +1 -1
  59. package/dist/src/services.d.ts +140 -0
  60. package/dist/{settings-config.d.ts → src/settings-config.d.ts} +1 -1
  61. package/dist/src/sms.d.ts +144 -0
  62. package/dist/src/stack-extensions.d.ts +137 -0
  63. package/dist/src/stacks.d.ts +40 -0
  64. package/dist/src/storage.d.ts +105 -0
  65. package/dist/src/table-names.d.ts +1 -0
  66. package/dist/src/tables.d.ts +34 -0
  67. package/dist/src/team.d.ts +7 -0
  68. package/dist/src/ui.d.ts +55 -0
  69. package/dist/src/utils.d.ts +39 -0
  70. package/package.json +13 -32
  71. package/src/ai.ts +20 -6
  72. package/src/analytics.ts +38 -1
  73. package/src/app.ts +38 -0
  74. package/src/attributes.ts +5 -1
  75. package/src/auth.ts +122 -0
  76. package/src/auto-imports.ts +8 -1
  77. package/src/cache.ts +226 -69
  78. package/src/chat.ts +0 -20
  79. package/src/cli.ts +24 -9
  80. package/src/cloud.ts +40 -1
  81. package/src/components.ts +3 -5
  82. package/src/cron-jobs.ts +1 -1
  83. package/src/dashboard.ts +40 -0
  84. package/src/database.ts +18 -2
  85. package/src/dns.ts +1 -1
  86. package/src/docs.ts +3 -3
  87. package/src/email.ts +303 -13
  88. package/src/errors.ts +2 -3
  89. package/src/events.ts +10 -5
  90. package/src/git.ts +3 -3
  91. package/src/hashing.ts +15 -19
  92. package/src/i18n.ts +105 -3
  93. package/src/index.ts +9 -5
  94. package/src/library.ts +0 -5
  95. package/src/model-names.ts +1 -1
  96. package/src/model.ts +87 -10
  97. package/src/oauth.ts +488 -0
  98. package/src/payments.ts +370 -27
  99. package/src/phone.ts +62 -0
  100. package/src/push.ts +107 -0
  101. package/src/queue.ts +386 -28
  102. package/src/reactivity.ts +1 -1
  103. package/src/realtime.ts +584 -0
  104. package/src/request.ts +344 -22
  105. package/src/router.ts +62 -4
  106. package/src/search-engine.ts +13 -13
  107. package/src/services.ts +100 -5
  108. package/src/sms.ts +263 -3
  109. package/src/stack-extensions.ts +184 -0
  110. package/src/stacks.ts +34 -4
  111. package/src/storage.ts +140 -6
  112. package/src/table-names.ts +1 -1
  113. package/src/ui.ts +20 -12
  114. package/src/utils.ts +1 -1
  115. package/dist/ai.d.ts +0 -20
  116. package/dist/analytics.d.ts +0 -13
  117. package/dist/api.d.ts +0 -26
  118. package/dist/app.d.ts +0 -32
  119. package/dist/attributes.d.ts +0 -1
  120. package/dist/auto-imports.d.ts +0 -1
  121. package/dist/build.d.ts +0 -2
  122. package/dist/cache.d.ts +0 -49
  123. package/dist/cli.d.ts +0 -310
  124. package/dist/dependencies.d.ts +0 -16
  125. package/dist/deploy.d.ts +0 -10
  126. package/dist/docs.d.ts +0 -26
  127. package/dist/email.d.ts +0 -107
  128. package/dist/events.d.ts +0 -5
  129. package/dist/exit-code.d.ts +0 -5
  130. package/dist/hashing.d.ts +0 -36
  131. package/dist/helpers.d.ts +0 -1
  132. package/dist/i18n.d.ts +0 -11
  133. package/dist/index.d.ts +0 -65
  134. package/dist/inspect.d.ts +0 -3
  135. package/dist/logging.d.ts +0 -6
  136. package/dist/model-names.d.ts +0 -1
  137. package/dist/model.d.ts +0 -232
  138. package/dist/payments.d.ts +0 -94
  139. package/dist/ports.d.ts +0 -13
  140. package/dist/promise.d.ts +0 -1
  141. package/dist/push.d.ts +0 -35
  142. package/dist/pwa.d.ts +0 -3
  143. package/dist/queue.d.ts +0 -45
  144. package/dist/reactivity.d.ts +0 -1
  145. package/dist/request.d.ts +0 -49
  146. package/dist/router.d.ts +0 -65
  147. package/dist/scheduler.d.ts +0 -1
  148. package/dist/services.d.ts +0 -81
  149. package/dist/ssg.d.ts +0 -3
  150. package/dist/stacks.d.ts +0 -54
  151. package/dist/storage.d.ts +0 -31
  152. package/dist/table-names.d.ts +0 -1
  153. package/dist/tables.d.ts +0 -34
  154. package/dist/team.d.ts +0 -8
  155. package/dist/ui.d.ts +0 -47
  156. package/dist/utils.d.ts +0 -27
  157. package/src/build.ts +0 -2
  158. package/src/inspect.ts +0 -10
  159. package/src/layout.ts +0 -8
  160. package/src/pwa.ts +0 -8
  161. package/src/ssg.ts +0 -3
@@ -1,6 +1,6 @@
1
1
  export declare interface ARecord {
2
2
  name: string | '@' | '*'
3
- address: string
3
+ address: string
4
4
  ttl?: number | 'auto'
5
5
  }
6
6
  export declare interface CNameRecord {
@@ -12,7 +12,7 @@ export declare interface MXRecord {
12
12
  name: string | '@'
13
13
  mailServer: string
14
14
  ttl: number | 'auto'
15
- priority: number
15
+ priority: number
16
16
  }
17
17
  export declare interface TxtRecord {
18
18
  name: string | '@'
@@ -21,13 +21,59 @@ export declare interface TxtRecord {
21
21
  }
22
22
  export declare interface AAAARecord {
23
23
  name: string | '@' | '*'
24
- address: string
24
+ address: string
25
25
  ttl: number | 'auto'
26
26
  }
27
- export declare type DnsRecord = ARecord | CNameRecord | MXRecord | TxtRecord | AAAARecord
28
-
29
- type CountryCode =
30
- | 'AC'
27
+ export declare interface ExtraParam {
28
+ Name: ExtraParamName
29
+ Value: ExtraParamValue
30
+ }
31
+ export declare interface ContactInfo extends ContactDetail {
32
+ admin?: ContactDetail
33
+ tech?: ContactDetail
34
+ }
35
+ /**
36
+ * **DNS Options**
37
+ *
38
+ * This configuration defines all of your DNS options. Because Stacks is fully-typed,
39
+ * you may hover any of the options below and the definitions will be provided. In case
40
+ * you have any questions, feel free to reach out via Discord or GitHub Discussions.
41
+ *
42
+ * @see https://stacksjs.com/docs/dns
43
+ */
44
+ export declare interface DnsOptions {
45
+ driver: 'aws'
46
+ a: ARecord[]
47
+ aaaa: AAAARecord[]
48
+ cname: CNameRecord[]
49
+ mx: MXRecord[]
50
+ txt: TxtRecord[]
51
+ nameservers: string[]
52
+ contactInfo: Partial<ContactInfo>
53
+ redirects: string[]
54
+ }
55
+ export declare interface ContactDetail {
56
+ firstName: string
57
+ lastName: string
58
+ contactType: 'PERSON' | 'COMPANY' | 'ASSOCIATION' | 'PUBLIC_BODY' | 'RESELLER' | string
59
+ organizationName: string
60
+ addressLine1: string
61
+ addressLine2: string
62
+ city: string
63
+ state: string
64
+ countryCode: CountryCode
65
+ zip: string
66
+ phoneNumber: string
67
+ email: string
68
+ fax: string
69
+ extraParams: string
70
+ privacy: boolean
71
+ privacyAdmin: boolean
72
+ privacyTech: boolean
73
+ privacyRegistrant: boolean
74
+ }
75
+ export type DnsRecord = ARecord | CNameRecord | MXRecord | TxtRecord | AAAARecord;
76
+ declare type CountryCode = | 'AC'
31
77
  | 'AD'
32
78
  | 'AE'
33
79
  | 'AF'
@@ -278,15 +324,9 @@ type CountryCode =
278
324
  | 'ZA'
279
325
  | 'ZM'
280
326
  | 'ZW'
281
- | string
282
-
283
- export interface ExtraParam {
284
- Name: ExtraParamName
285
- Value: ExtraParamValue
286
- }
287
- export type ExtraParamList = ExtraParam[]
288
- export type ExtraParamName =
289
- | 'DUNS_NUMBER'
327
+ | string;
328
+ export type ExtraParamList = ExtraParam[];
329
+ export type ExtraParamName = | 'DUNS_NUMBER'
290
330
  | 'BRAND_NUMBER'
291
331
  | 'BIRTH_DEPARTMENT'
292
332
  | 'BIRTH_DATE_IN_YYYY_MM_DD'
@@ -317,46 +357,6 @@ export type ExtraParamName =
317
357
  | 'UK_COMPANY_NUMBER'
318
358
  | 'EU_COUNTRY_OF_CITIZENSHIP'
319
359
  | 'AU_PRIORITY_TOKEN'
320
- | string
321
- export type ExtraParamValue = string
322
-
323
- export interface ContactInfo extends ContactDetail {
324
- admin?: ContactDetail
325
- tech?: ContactDetail
326
- }
327
-
328
- export interface DnsOptions {
329
- driver: 'aws'
330
- a: ARecord[]
331
- aaaa: AAAARecord[]
332
- cname: CNameRecord[]
333
- mx: MXRecord[]
334
- txt: TxtRecord[]
335
- nameservers: string[]
336
- contactInfo: Partial<ContactInfo>
337
- redirects: string[]
338
- }
339
-
340
- export type DnsConfig = Partial<DnsOptions>
341
-
342
- export interface ContactDetail {
343
- firstName: string
344
- lastName: string
345
- contactType: 'PERSON' | 'COMPANY' | 'ASSOCIATION' | 'PUBLIC_BODY' | 'RESELLER' | string
346
- organizationName: string
347
- addressLine1: string
348
- addressLine2: string
349
- city: string
350
- state: string
351
- countryCode: CountryCode
352
- zip: string
353
- phoneNumber: string
354
- email: string
355
- fax: string
356
- extraParams: string
357
-
358
- privacy: boolean
359
- privacyAdmin: boolean
360
- privacyTech: boolean
361
- privacyRegistrant: boolean
362
- }
360
+ | string;
361
+ export type ExtraParamValue = string;
362
+ export type DnsConfig = Partial<DnsOptions>;
@@ -0,0 +1,23 @@
1
+ import type { BunPressOptions } from '@stacksjs/bunpress';
2
+ export declare interface DocsUserConfig extends BunPressOptions {
3
+ deploy?: boolean
4
+ }
5
+ export declare interface SocialLink {
6
+ icon: SocialLinkIcon
7
+ link: string
8
+ ariaLabel?: string
9
+ }
10
+ export type DocsConfig = DocsUserConfig;
11
+ export type DocsOptions = Partial<DocsConfig>;
12
+ export declare enum SocialLinkIcon {
13
+ Bluesky = 'bluesky',
14
+ Discord = 'discord',
15
+ Facebook = 'facebook',
16
+ GitHub = 'github',
17
+ Instagram = 'instagram',
18
+ LinkedIn = 'linkedin',
19
+ Mastodon = 'mastodon',
20
+ Slack = 'slack',
21
+ Twitter = 'twitter',
22
+ YouTube = 'youtube',
23
+ }
@@ -0,0 +1,201 @@
1
+ /**
2
+ * i18n bag passed to STX email templates at render time. Stacks emails
3
+ * are STX, not vue-email — keys/values are user-defined per template.
4
+ * The shape is intentionally open: each template declares its own
5
+ * placeholders and the renderer interpolates them as-is.
6
+ */
7
+ export declare interface I18n {
8
+ [key: string]: unknown
9
+ }
10
+ export declare interface AutoResponderConfig {
11
+ enabled: boolean
12
+ subject: string
13
+ body: string
14
+ schedule?: {
15
+ start?: string
16
+ end?: string
17
+ }
18
+ }
19
+ export declare interface EmailFilterRule {
20
+ field: 'from' | 'to' | 'subject' | 'body'
21
+ operator: 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'regex'
22
+ value: string
23
+ action: 'move' | 'delete' | 'forward' | 'label'
24
+ actionValue?: string
25
+ }
26
+ export declare interface MailboxConfig {
27
+ email?: string
28
+ address?: string
29
+ displayName?: string
30
+ password?: string
31
+ forwardTo?: string[]
32
+ autoResponder?: AutoResponderConfig
33
+ filters?: EmailFilterRule[]
34
+ }
35
+ export declare interface MailServerInstanceConfig {
36
+ type?: 't4g.nano' | 't4g.micro' | 't4g.small' | 't4g.medium' | 't3.nano' | 't3.micro' | 't3.small' | 't3.medium' | 't3.large' | 't3.xlarge'
37
+ spot?: boolean
38
+ diskSize?: number
39
+ keyPair?: string
40
+ }
41
+ export declare interface MailServerPortsConfig {
42
+ smtp?: number
43
+ smtps?: number
44
+ submission?: number
45
+ imap?: number
46
+ imaps?: number
47
+ pop3?: number
48
+ pop3s?: number
49
+ smtpStartTls?: number
50
+ }
51
+ export declare interface MailServerFeaturesConfig {
52
+ imap?: boolean
53
+ pop3?: boolean
54
+ webmail?: boolean
55
+ calDAV?: boolean
56
+ cardDAV?: boolean
57
+ activeSync?: boolean
58
+ }
59
+ /**
60
+ * Patterns for matching emails to categories
61
+ */
62
+ export declare interface CategoryPatterns {
63
+ domains?: string[]
64
+ substrings?: string[]
65
+ headers?: Record<string, string[]>
66
+ }
67
+ /**
68
+ * Configuration for automatic email categorization
69
+ */
70
+ export declare interface EmailCategorizationConfig {
71
+ enabled?: boolean
72
+ social?: CategoryPatterns
73
+ forums?: CategoryPatterns
74
+ updates?: CategoryPatterns
75
+ promotions?: CategoryPatterns
76
+ }
77
+ export declare interface EmailServerConfig {
78
+ enabled: boolean
79
+ scan?: boolean
80
+ mode?: 'serverless' | 'server'
81
+ storage?: {
82
+ bucket?: string
83
+ retentionDays?: number
84
+ archiveAfterDays?: number
85
+ }
86
+ forwarding?: Record<string, string[]>
87
+ autoResponders?: AutoResponderConfig[]
88
+ instance?: MailServerInstanceConfig
89
+ ports?: MailServerPortsConfig
90
+ features?: MailServerFeaturesConfig
91
+ subdomain?: string
92
+ categorization?: EmailCategorizationConfig
93
+ }
94
+ export declare interface EmailNotificationsConfig {
95
+ newEmail?: boolean
96
+ bounces?: boolean
97
+ complaints?: boolean
98
+ }
99
+ export declare interface EmailOptions {
100
+ from: {
101
+ name: string
102
+ address: string
103
+ }
104
+ mailboxes: string[] | MailboxConfig[]
105
+ domain?: string
106
+ url: string
107
+ charset: string
108
+ server: EmailServerConfig
109
+ notifications?: EmailNotificationsConfig
110
+ default: 'log' | 'ses' | 'sendgrid' | 'mailgun' | 'mailtrap' | 'smtp'
111
+ }
112
+ export declare interface MailtrapConfig extends EmailDriverConfig {
113
+ token: string
114
+ inboxId?: number
115
+ }
116
+ export declare interface EmailResult {
117
+ message: string
118
+ success: boolean
119
+ provider: string
120
+ messageId?: string
121
+ metadata?: Record<string, unknown>
122
+ }
123
+ // Base configuration interface
124
+ export declare interface EmailDriverConfig {
125
+ maxRetries?: number
126
+ retryTimeout?: number
127
+ }
128
+ /** Options for email template rendering */
129
+ export declare interface EmailTemplateOptions {
130
+ variables?: Record<string, string | number | boolean | undefined | null>
131
+ layout?: string | false
132
+ subject?: string
133
+ }
134
+ // Email driver interface
135
+ export declare interface EmailDriver {
136
+ name: string
137
+ send: (message: EmailMessage, options?: EmailTemplateOptions) => Promise<EmailResult>
138
+ configure: (config: EmailDriverConfig) => void
139
+ }
140
+ export declare interface EmailMessage {
141
+ from?: EmailAddress
142
+ to: string | string[] | EmailAddress[]
143
+ cc?: string | string[] | EmailAddress[]
144
+ bcc?: string | string[] | EmailAddress[]
145
+ subject: string
146
+ template?: string
147
+ html?: string
148
+ text?: string
149
+ attachments?: EmailAttachment[]
150
+ headers?: Record<string, string>
151
+ onSuccess?: () => Promise<{ message: string }> | { message: string }
152
+ onError?: (error: Error) => Promise<{ message: string }> | { message: string }
153
+ handle?: () => Promise<{ message: string }> | { message: string }
154
+ }
155
+ // Email interfaces
156
+ export declare interface EmailAddress {
157
+ address: string
158
+ name?: string
159
+ }
160
+ export declare interface EmailAttachment {
161
+ filename: string
162
+ content: string | Uint8Array
163
+ contentType?: string
164
+ encoding?: 'base64' | 'binary' | 'hex' | 'utf8'
165
+ }
166
+ // Helper functions for all drivers
167
+ export declare interface SESConfig extends EmailDriverConfig {
168
+ region: string
169
+ credentials?: {
170
+ accessKeyId: string
171
+ secretAccessKey: string
172
+ }
173
+ }
174
+ // SendGrid implementation
175
+ export declare interface SendGridConfig extends EmailDriverConfig {
176
+ apiKey: string
177
+ }
178
+ export declare interface RenderOptions {
179
+ props?: Record<string, unknown>
180
+ i18n?: I18n
181
+ }
182
+ export declare interface MailtrapSuccessResponse {
183
+ success: boolean
184
+ message_ids: string[]
185
+ errors?: never
186
+ }
187
+ export declare interface MailtrapErrorResponse {
188
+ success: false
189
+ errors: {
190
+ email?: string[]
191
+ message?: string[]
192
+ [key: string]: string[] | undefined
193
+ }
194
+ message_ids?: never
195
+ }
196
+ /**
197
+ * Email category types for automatic email categorization (Gmail-style)
198
+ */
199
+ export type EmailCategory = 'social' | 'forums' | 'updates' | 'promotions' | 'primary';
200
+ export type EmailConfig = Partial<EmailOptions>;
201
+ export type MailtrapResponse = MailtrapSuccessResponse | MailtrapErrorResponse;
@@ -0,0 +1 @@
1
+
@@ -1,14 +1,11 @@
1
- export declare type CommandError = Error
2
-
3
- export interface ErrorResponse {
4
- status: number
5
- errors: string | object
6
- stack?: string
1
+ export declare interface ErrorResponse {
2
+ status: number
3
+ errors: string | object
4
+ stack?: string
7
5
  name: string
8
6
  message: string
9
7
  }
10
-
11
- export interface ErrorOptions {
8
+ export declare interface ErrorOptions {
12
9
  messages: {
13
10
  'string': string
14
11
  'email': string
@@ -17,7 +14,6 @@ export interface ErrorOptions {
17
14
  'activeUrl': string
18
15
  'alpha': string
19
16
  'alphaNumeric': string
20
- 'minLength': string
21
17
  'maxLength': string
22
18
  'fixedLength': string
23
19
  'confirmed': string
@@ -38,9 +34,7 @@ export interface ErrorOptions {
38
34
  'mobile': string
39
35
  'passport': string
40
36
  'postalCode': string
41
-
42
37
  'boolean': string
43
-
44
38
  'number': string
45
39
  'min': string
46
40
  'max': string
@@ -49,7 +43,6 @@ export interface ErrorOptions {
49
43
  'negative': string
50
44
  'decimal': string
51
45
  'withoutDecimals': string
52
-
53
46
  'date': string
54
47
  'date.equals': string
55
48
  'date.after': string
@@ -59,33 +52,33 @@ export interface ErrorOptions {
59
52
  'date.sameAs': string
60
53
  'date.notSameAs': string
61
54
  'date.afterField': string
62
-
63
55
  'accepted': string
64
-
65
56
  'enum': string
66
-
67
57
  'literal': string
68
-
69
58
  'object': string
70
-
71
59
  'record': string
72
- 'record.minLength': string
60
+ 'record.min': string
73
61
  'record.maxLength': string
74
62
  'record.fixedLength': string
75
-
76
63
  'array': string
77
- 'array.minLength': string
64
+ 'array.min': string
78
65
  'array.maxLength': string
79
66
  'array.fixedLength': string
80
67
  'notEmpty': string
81
68
  'distinct': string
82
-
83
69
  'tuple': string
84
-
85
70
  'union': string
86
71
  'unionGroup': string
87
72
  'unionOfTypes': string
88
73
  }
89
74
  }
90
-
91
- export type ErrorConfig = Partial<ErrorOptions>
75
+ // export declare class ValidationError extends Error {
76
+ // messages: any
77
+ // status: number
78
+ // code: string
79
+ // constructor(messages: any, options?: ErrorOptions)
80
+ // get [Symbol.toStringTag](): string
81
+ // toString(): string
82
+ // }
83
+ export type CommandError = Error;
84
+ export type ErrorConfig = Partial<ErrorOptions>;
@@ -0,0 +1,31 @@
1
+ export type * from '../../../types/events';
2
+ /**
3
+ * **Events**
4
+ *
5
+ * This configuration defines all of your events. Because Stacks is fully-typed, you may
6
+ * hover any of the options below and the definitions will be provided. In case you
7
+ * have any questions, feel free to reach out via Discord or GitHub Discussions.
8
+ *
9
+ * @example To fire an event, you may use any of the following approaches:
10
+ * ```ts
11
+ * dispatch('user:registered', { name: 'Chris', email: 'chris@stacksjs.com' })
12
+ *
13
+ * // alternatively, you may use the following:
14
+ * useEvent('user:registered', { name: 'Chris', email: 'chris@stacksjs.com' })
15
+ * events.emit('user:registered', { name: 'Chris', email: 'chris@stacksjs.com' })
16
+ * useEvents.emit('user:registered', { name: 'Chris', email: 'chris@stacksjs.com' })
17
+ * ```
18
+ *
19
+ * @example To capture an event, you may use any of the following approaches:
20
+ * ```ts
21
+ * listen('user:registered', (user) => sendWelcomeEmail(user))
22
+ *
23
+ * // alternatively, you may use the following:
24
+ * useListen('user:registered', (user) => sendWelcomeEmail(user))
25
+ * events.on('user:registered', (user) => sendWelcomeEmail(user))
26
+ * useEvents.on('user:registered', (user) => sendWelcomeEmail(user))
27
+ * ```
28
+ */
29
+ export declare interface Events {
30
+ [key: string]: string[]
31
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * CLI exit codes.
3
+ *
4
+ * @see https://nodejs.org/api/process.html#process_exit_codes
5
+ */
6
+ export declare enum ExitCode {
7
+ Success = 0,
8
+ FatalError = 1,
9
+ InvalidArgument = 9,
10
+ }
@@ -1,13 +1,22 @@
1
+ /**
2
+ * Describes a plain-text file.
3
+ */
1
4
  export declare interface TextFile {
2
5
  path: string
3
6
  data: string
4
7
  }
8
+ /**
9
+ * Describes a JSON file.
10
+ */
5
11
  export declare interface JsonFile {
6
12
  path: string
7
13
  data: unknown
8
14
  indent: string
9
15
  newline: string | undefined
10
16
  }
17
+ /**
18
+ * Describes a package.json file.
19
+ */
11
20
  export declare interface PackageJson {
12
21
  engines: {
13
22
  node: string
@@ -23,29 +32,24 @@ export declare interface FileSystemOptions {
23
32
  driver: 'local'
24
33
  root: string
25
34
  }
26
-
27
35
  public: {
28
36
  driver: 'public'
29
37
  root: string
30
38
  visibility?: 'public'
31
39
  }
32
-
33
40
  private: {
34
41
  driver: 'private'
35
42
  root: string
36
43
  visibility?: 'private'
37
44
  }
38
-
39
45
  efs: {
40
46
  driver: 'local'
41
47
  root: string
42
48
  }
43
-
44
49
  s3: {
45
50
  driver: 's3'
46
51
  root: string
47
52
  }
48
-
49
53
  [key: string]: {
50
54
  driver: string
51
55
  root: string
@@ -53,4 +57,4 @@ export declare interface FileSystemOptions {
53
57
  }
54
58
  }
55
59
  }
56
- export declare type FileSystemConfig = Partial<FileSystemOptions>
60
+ export type FileSystemConfig = Partial<FileSystemOptions>;
@@ -1,14 +1,18 @@
1
+ /**
2
+ * **Git Options**
3
+ *
4
+ * This configuration defines all of your git options. Because Stacks is fully-typed, you may
5
+ * 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
+ */
1
8
  export declare interface GitOptions {
2
9
  hooks: GitHooks
3
-
4
10
  scopes: string[]
5
-
6
11
  types: {
7
12
  value: string
8
13
  name: string
9
14
  emoji: string
10
15
  }[]
11
-
12
16
  messages: {
13
17
  type: string
14
18
  scope: string
@@ -52,6 +56,5 @@ declare interface Hooks {
52
56
  'p4-pre-submit'?: string
53
57
  'post-index-change'?: string
54
58
  }
55
- export declare type GitConfig = Partial<GitOptions>
56
-
57
- export interface GitHooks extends Hooks {}
59
+ export declare interface GitHooks extends Hooks {}
60
+ export type GitConfig = Partial<GitOptions>;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The Stacks runtime provides secure Bcrypt & Argon2 hashing for storing user passwords.
3
+ * If you are using one of the Laravel application starter kits, Bcrypt will be used for
4
+ * registration and authentication by default.
5
+ *
6
+ * Bcrypt is a great choice for hashing passwords because its "work factor" is adjustable, which
7
+ * means that the time it takes to generate a hash can be increased as hardware power increases.
8
+ * When hashing passwords, slow is good. The longer an algorithm takes to hash a password, the
9
+ * longer it takes malicious users to generate "rainbow tables" of all possible string hash
10
+ * values that may be used in brute force attacks against applications.
11
+ *
12
+ * @see https://stacksjs.com/docs/hashing
13
+ */
14
+ export declare interface HashingOptions {
15
+ driver: 'argon2' | 'argon2id' | 'argon2i' | 'argon2d' | 'bcrypt'
16
+ bcrypt?: BcryptOptions
17
+ argon2?: ArgonOptions
18
+ }
19
+ /**
20
+ * **Bcrypt Options**
21
+ *
22
+ * Here you may specify the configuration options that should be used when
23
+ * passwords are hashed using the Bcrypt algorithm. This will allow you
24
+ * to control the amount of time it takes to hash the given password.
25
+ *
26
+ * @see https://stacksjs.com/docs/hashing
27
+ */
28
+ export declare interface BcryptOptions {
29
+ rounds: number
30
+ }
31
+ /**
32
+ * **Argon Options**
33
+ *
34
+ * Here you may specify the configuration options that should be used when
35
+ * passwords are hashed using the Argon algorithm. These will allow you
36
+ * to control the amount of time it takes to hash the given password.
37
+ *
38
+ * @see https://stacksjs.com/docs/hashing
39
+ */
40
+ export declare interface ArgonOptions {
41
+ memory?: number
42
+ time?: number
43
+ }
44
+ export type HashingConfig = Partial<HashingOptions>;
45
+ export type HashAlgorithm = | 'md4'
46
+ | 'md5'
47
+ | 'sha1'
48
+ | 'sha256'
49
+ | 'sha384'
50
+ | 'sha512'
51
+ | 'ripemd128'
52
+ | 'ripemd160'
53
+ | 'tiger128'
54
+ | 'tiger160'
55
+ | 'tiger192'
56
+ | 'crc32'
57
+ | 'crc32b';
@@ -0,0 +1 @@
1
+ export declare function getTypeName(v: any): string;