@stacksjs/types 0.75.261 → 0.75.263
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/email.d.ts +21 -3
- package/dist/model.d.ts +2 -1
- package/dist/security.d.ts +4 -2
- package/package.json +5 -5
package/dist/email.d.ts
CHANGED
|
@@ -127,13 +127,21 @@ export declare interface MailtrapConfig extends EmailDriverConfig {
|
|
|
127
127
|
token: string
|
|
128
128
|
inboxId?: number
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
declare interface EmailResultFields {
|
|
131
131
|
message: string
|
|
132
|
-
success: boolean
|
|
133
132
|
provider: string
|
|
134
|
-
messageId?: string
|
|
135
133
|
metadata?: Record<string, unknown>
|
|
136
134
|
}
|
|
135
|
+
/** A delivery the provider accepted. What `mail.sendOrFail()` resolves with. */
|
|
136
|
+
export declare interface EmailSent extends EmailResultFields {
|
|
137
|
+
success: true
|
|
138
|
+
messageId?: string
|
|
139
|
+
}
|
|
140
|
+
/** A delivery that did not happen: unreachable host, rejected, suppressed. */
|
|
141
|
+
export declare interface EmailFailed extends EmailResultFields {
|
|
142
|
+
success: false
|
|
143
|
+
messageId?: undefined
|
|
144
|
+
}
|
|
137
145
|
// Base configuration interface
|
|
138
146
|
export declare interface EmailDriverConfig {
|
|
139
147
|
maxRetries?: number
|
|
@@ -221,4 +229,14 @@ export type MailboxUserBackend = { driver: 'external' } | {
|
|
|
221
229
|
region?: string
|
|
222
230
|
}
|
|
223
231
|
export type EmailConfig = Partial<EmailOptions>;
|
|
232
|
+
/**
|
|
233
|
+
* The outcome `mail.send()` resolves with, either way.
|
|
234
|
+
*
|
|
235
|
+
* `send()` does not throw when delivery fails; it resolves with `success:
|
|
236
|
+
* false`. A union rather than one shape with a boolean, so a caller has to
|
|
237
|
+
* narrow on `success` before it can treat the result as sent, and so
|
|
238
|
+
* `sendOrFail()` can say in its type that it only ever resolves with a sent one
|
|
239
|
+
* (stacksjs/stacks#2930).
|
|
240
|
+
*/
|
|
241
|
+
export type EmailResult = EmailSent | EmailFailed;
|
|
224
242
|
export type MailtrapResponse = MailtrapSuccessResponse | MailtrapErrorResponse;
|
package/dist/model.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export declare interface ShardingOptions {
|
|
|
143
143
|
export declare interface SeedOptions {
|
|
144
144
|
count: number
|
|
145
145
|
fixtures?: Array<Record<string, unknown>>
|
|
146
|
+
after?: string[]
|
|
146
147
|
}
|
|
147
148
|
/** Which attributes `traits.useActivityLog` records. See the trait's docblock. */
|
|
148
149
|
declare interface ActivityLogOption {
|
|
@@ -267,7 +268,7 @@ export declare interface Attribute {
|
|
|
267
268
|
guarded?: boolean
|
|
268
269
|
personal?: PersonalAttribute
|
|
269
270
|
foreignKey?: boolean | ForeignKeyConfig
|
|
270
|
-
factory?: (faker: Faker, attributes: Readonly<Record<string, unknown
|
|
271
|
+
factory?: (faker: Faker, attributes: Readonly<Record<string, unknown>>, context: { pick: (model: string, column?: string) => Promise<unknown> }) => any
|
|
271
272
|
validation: {
|
|
272
273
|
rule: ValidationType
|
|
273
274
|
message?: ValidatorMessage
|
package/dist/security.d.ts
CHANGED
|
@@ -55,8 +55,10 @@ export type ApiRowScopingPolicy = 'warn' | 'deny';
|
|
|
55
55
|
/**
|
|
56
56
|
* Which models publish the REST API their `useApi` trait describes.
|
|
57
57
|
*
|
|
58
|
-
* - `'all'`
|
|
59
|
-
* - `'own'` - only the app's models in `app/Models`, overrides
|
|
58
|
+
* - `'all'` - every `useApi` model, the framework's own included.
|
|
59
|
+
* - `'own'` (the default) - only the app's models in `app/Models`, overrides
|
|
60
|
+
* included. It was `'all'` until stacksjs/stacks#2954, which published ~80
|
|
61
|
+
* framework models' APIs over tables most apps never migrate.
|
|
60
62
|
* - `'none'` - no generated model APIs.
|
|
61
63
|
* - a list of model names - exactly those; `'own'` may be one of them, to mean
|
|
62
64
|
* the app's models plus the named framework ones.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.75.
|
|
4
|
+
"version": "0.75.263",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@stacksjs/bunpress": "^0.2.15",
|
|
66
66
|
"@stacksjs/clapp": "^0.2.12",
|
|
67
|
-
"@stacksjs/events": "0.75.
|
|
68
|
-
"@stacksjs/strings": "0.75.
|
|
69
|
-
"@stacksjs/stx": "0.2.
|
|
67
|
+
"@stacksjs/events": "0.75.263",
|
|
68
|
+
"@stacksjs/strings": "0.75.263",
|
|
69
|
+
"@stacksjs/stx": "0.2.661",
|
|
70
70
|
"@stacksjs/ts-validation": "^0.5.6",
|
|
71
71
|
"bun-query-builder": "^0.3.8"
|
|
72
72
|
},
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@stacksjs/validation": "0.75.
|
|
82
|
+
"@stacksjs/validation": "0.75.263",
|
|
83
83
|
"better-dx": "^0.2.24",
|
|
84
84
|
"meilisearch": "^0.62.0"
|
|
85
85
|
},
|