@stacksjs/types 0.67.0 → 0.68.0

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/dist/ai.d.ts +17 -14
  2. package/dist/analytics.d.ts +12 -14
  3. package/dist/api.d.ts +25 -66
  4. package/dist/app.d.ts +29 -134
  5. package/dist/auto-imports.d.ts +1 -1
  6. package/dist/binary.d.ts +7 -10
  7. package/dist/build.d.ts +2 -2
  8. package/dist/cache.d.ts +48 -77
  9. package/dist/cdn.d.ts +3 -15
  10. package/dist/chat.d.ts +2 -2
  11. package/dist/cli.d.ts +252 -239
  12. package/dist/cloud.d.ts +305 -68
  13. package/dist/components.d.ts +11 -59
  14. package/dist/configure.d.ts +11 -11
  15. package/dist/cron-jobs.d.ts +34 -41
  16. package/dist/database.d.ts +50 -45
  17. package/dist/dependencies.d.ts +15 -61
  18. package/dist/deploy.d.ts +10 -16
  19. package/dist/dns.d.ts +349 -167
  20. package/dist/docs.d.ts +20 -19
  21. package/dist/email.d.ts +15 -10
  22. package/dist/errors.d.ts +87 -69
  23. package/dist/events.d.ts +3 -30
  24. package/dist/exit-code.d.ts +4 -9
  25. package/dist/file-systems.d.ts +52 -56
  26. package/dist/git.d.ts +54 -126
  27. package/dist/hashing.d.ts +30 -97
  28. package/dist/helpers.d.ts +1 -1
  29. package/dist/i18n.d.ts +10 -18
  30. package/dist/index.d.ts +62 -61
  31. package/dist/index.js +1 -1
  32. package/dist/inspect.d.ts +3 -9
  33. package/dist/library.d.ts +798 -139
  34. package/dist/logging.d.ts +5 -27
  35. package/dist/manifest.d.ts +6 -9
  36. package/dist/model-names.d.ts +1 -1
  37. package/dist/model.d.ts +150 -130
  38. package/dist/notifications.d.ts +150 -105
  39. package/dist/pages.d.ts +10 -10
  40. package/dist/payments.d.ts +84 -55
  41. package/dist/ports.d.ts +13 -20
  42. package/dist/promise.d.ts +1 -1
  43. package/dist/push.d.ts +34 -30
  44. package/dist/pwa.d.ts +3 -7
  45. package/dist/queue.d.ts +36 -33
  46. package/dist/reactivity.d.ts +1 -1
  47. package/dist/request.d.ts +39 -26
  48. package/dist/router.d.ts +51 -51
  49. package/dist/saas.d.ts +32 -0
  50. package/dist/scheduler.d.ts +1 -1
  51. package/dist/search-engine.d.ts +85 -111
  52. package/dist/security.d.ts +18 -16
  53. package/dist/server.d.ts +16 -6
  54. package/dist/services.d.ts +34 -28
  55. package/dist/settings-config.d.ts +8 -8
  56. package/dist/ssg.d.ts +3 -2
  57. package/dist/stacks.d.ts +53 -203
  58. package/dist/storage.d.ts +29 -36
  59. package/dist/tables.d.ts +34 -52
  60. package/dist/team.d.ts +7 -8
  61. package/dist/ui.d.ts +39 -162
  62. package/dist/utils.d.ts +20 -30
  63. package/package.json +8 -8
  64. package/src/cli.ts +2 -0
  65. package/src/cloud.ts +16 -4
  66. package/src/errors.ts +8 -0
  67. package/src/index.ts +1 -0
  68. package/src/model-names.ts +1 -1
  69. package/src/model.ts +6 -0
  70. package/src/payments.ts +32 -0
  71. package/src/saas.ts +33 -0
  72. package/src/stacks.ts +10 -0
  73. package/dist/env.d.ts +0 -0
  74. package/dist/layout.d.ts +0 -0
  75. package/dist/native.d.ts +0 -0
  76. package/dist/sms.d.ts +0 -0
package/dist/logging.d.ts CHANGED
@@ -1,28 +1,6 @@
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 interface LoggingOptions {
9
- /**
10
- * **Log File Path**
11
- *
12
- * The path to the log file. This will be used to write logs to a file. If you do not want to
13
- * write logs to a file, you may set this to `null`.
14
- *
15
- * @default 'storage/logs/console.log'
16
- */
17
- logsPath: string;
18
- /**
19
- * **Deployments Path**
20
- *
21
- * The path to the deployments folder. This will be used to write deployment logs to a file.
22
- * If you do not want to write deployment logs to a file, you may set this to `null`.
23
- *
24
- * @default 'storage/logs/deployments.log'
25
- */
26
- deploymentsPath: string;
1
+ export declare interface LoggingOptions {
2
+ logsPath: string
3
+
4
+ deploymentsPath: string
27
5
  }
28
- export type LoggingConfig = Partial<LoggingOptions>;
6
+ export declare type LoggingConfig = Partial<LoggingOptions>
@@ -1,9 +1,6 @@
1
- /**
2
- * The npm package manifest (package.json)
3
- */
4
- export interface Manifest {
5
- name: string;
6
- version: string;
7
- description: string;
8
- [key: string]: unknown;
9
- }
1
+ export declare interface Manifest {
2
+ name: string
3
+ version: string
4
+ description: string
5
+ [key: string]: unknown
6
+ }
@@ -1 +1 @@
1
- export type ModelNames = "Project" | "SubscriberEmail" | "AccessToken" | "Team" | "Subscriber" | "Deployment" | "Release" | "User" | "Post";
1
+ export declare type ModelNames = 'Project' | 'SubscriberEmail' | 'AccessToken' | 'Team' | 'Subscriber' | 'Deployment' | 'Release' | 'User' | 'Post' | 'Subscription' | 'Error'
package/dist/model.d.ts CHANGED
@@ -1,144 +1,164 @@
1
- import type { ModelNames } from "@stacksjs/types";
2
- import type { VineBoolean, VineNumber, VineString } from "@vinejs/vine";
3
- import type { DeepPartial, Nullable, SearchOptions } from ".";
4
- export type Model = Partial<ModelOptions>;
5
- export interface FieldArrayElement {
6
- entity: string;
7
- charValue?: string | null;
1
+ import type { DeepPartial, Nullable, SearchOptions } from '.';
2
+ import type { ModelNames } from '@stacksjs/types';
3
+ import type { VineBoolean, VineNumber, VineString } from '@vinejs/vine';
4
+
5
+ export declare type Model = Partial<ModelOptions>
6
+ export declare interface FieldArrayElement {
7
+ entity: string
8
+ charValue?: string | null
8
9
  }
9
- export interface ModelElement {
10
- field: string;
11
- default: string | number | boolean | Date | undefined | null;
12
- unique: boolean;
13
- fieldArray: FieldArrayElement | null;
10
+ export declare interface ModelElement {
11
+ field: string
12
+ default: string | number | boolean | Date | undefined | null
13
+ unique: boolean
14
+ fieldArray: FieldArrayElement | null
14
15
  }
15
- export interface AuthOptions {
16
- useTwoFactor?: boolean;
17
- usePasskey?: boolean;
16
+ export declare interface AuthOptions {
17
+ useTwoFactor?: boolean
18
+ usePasskey?: boolean
18
19
  }
19
- type ActionPath = string;
20
- type ActionName = string;
21
- type Action = ActionPath | ActionName | undefined;
22
- export type ApiRoutes = "index" | "show" | "store" | "update" | "destroy";
23
- export type VineType = VineString | VineNumber | VineBoolean | Date | Nullable<any>;
20
+ declare type ActionPath = string
21
+ type ActionName = string
22
+ type Action = ActionPath | ActionName | undefined
23
+ export declare type ApiRoutes = 'index' | 'show' | 'store' | 'update' | 'destroy'
24
+ export declare type VineType = VineString | VineNumber | VineBoolean | Date | Nullable<any>
24
25
  export interface SeedOptions {
25
- count: number;
26
+ count: number
26
27
  }
27
- type LogAttribute = string;
28
- interface ActivityLogOption {
29
- exclude: LogAttribute[];
30
- include: LogAttribute[];
31
- logOnly: LogAttribute[];
28
+ declare type LogAttribute = string
29
+ declare interface ActivityLogOption {
30
+ exclude: LogAttribute[]
31
+ include: LogAttribute[]
32
+ logOnly: LogAttribute[]
32
33
  }
33
- interface BelongsToManyType {
34
- model: ModelNames;
35
- firstForeignKey?: string;
36
- secondForeignKey?: string;
37
- pivotTable?: string;
38
- relationName?: string;
34
+ declare interface BelongsToManyType {
35
+ model: ModelNames
36
+ firstForeignKey?: string
37
+ secondForeignKey?: string
38
+ pivotTable?: string
39
+ relationName?: string
39
40
  }
40
- export interface ApiSettings {
41
- uri: string;
42
- middleware: string[];
43
- routes: { [key in ApiRoutes] : Action } | string[];
44
- openApi: boolean;
41
+ export declare interface ApiSettings {
42
+ uri: string
43
+ middleware: string[]
44
+ routes:
45
+ | {
46
+ [key in ApiRoutes]: Action
47
+ }
48
+ | string[]
49
+ openApi: boolean
45
50
  }
46
- type ApiOptions = DeepPartial<ApiSettings>;
47
- export interface TimestampOptions {
48
- createdAt?: string;
49
- updatedAt?: string;
50
- deletedAt?: string;
51
+ declare type ApiOptions = DeepPartial<ApiSettings>
52
+ export declare interface TimestampOptions {
53
+ createdAt?: string
54
+ updatedAt?: string
55
+ deletedAt?: string
51
56
  }
52
- interface ValidatorMessage {
53
- [key: string]: string;
57
+ declare interface ValidatorMessage {
58
+ [key: string]: string
54
59
  }
55
- export interface SoftDeleteOptions {
56
- deletedAt?: string;
60
+ export declare interface SoftDeleteOptions {
61
+ deletedAt?: string
57
62
  }
58
- interface Base {}
59
- /**
60
- * Model.
61
- */
62
- export interface ModelOptions extends Base {
63
- /**
64
- * The name of the model.
65
- *
66
- * @default string - The file name of the model.
67
- */
68
- name: string;
69
- table?: string;
70
- primaryKey?: string;
71
- autoIncrement?: boolean;
72
- dashboard?: { highlight?: boolean | number };
73
- traits?: {
74
- useUuid?: boolean;
75
- useTimestamps?: boolean | TimestampOptions;
76
- timestampable?: boolean | TimestampOptions;
77
- useSoftDeletes?: boolean | SoftDeleteOptions;
78
- softDeletable?: boolean | SoftDeleteOptions;
79
- useAuth?: boolean | AuthOptions;
80
- authenticatable?: boolean | AuthOptions;
81
- useSeeder?: boolean | SeedOptions;
82
- seedable?: boolean | SeedOptions;
83
- useSearch?: boolean | SearchOptions;
84
- searchable?: boolean | SearchOptions;
85
- useApi?: ApiOptions | boolean;
86
- observe?: string[] | boolean;
87
- useActivityLog?: boolean | ActivityLogOption;
88
- };
89
- attributes?: Attributes;
90
- hasOne?: {
91
- model: ModelNames;
92
- foreignKey?: string;
93
- relationName?: string;
94
- }[] | string[];
95
- hasMany?: {
96
- model: ModelNames;
97
- foreignKey?: string;
98
- relationName?: string;
99
- }[] | ModelNames[];
100
- belongsTo?: {
101
- model: ModelNames;
102
- foreignKey?: string;
103
- relationName?: string;
104
- }[] | ModelNames[];
105
- belongsToMany?: BelongsToManyType[] | ModelNames[];
106
- hasOneThrough?: {
107
- model: ModelNames;
108
- through: ModelNames;
109
- foreignKey?: string;
110
- throughForeignKey?: string;
111
- relationName?: string;
112
- }[];
113
- get?: { [key: string]: (value: any) => any };
114
- set?: { [key: string]: (value: any) => any };
63
+ declare interface Base {}
64
+ export declare interface ModelOptions extends Base {
65
+ name: string
66
+ table?: string
67
+ primaryKey?: string
68
+ autoIncrement?: boolean
69
+ dashboard?: {
70
+ highlight?: boolean | number
71
+ }
72
+
73
+ traits?: {
74
+ useUuid?: boolean
75
+ useTimestamps?: boolean | TimestampOptions
76
+ timestampable?: boolean | TimestampOptions
77
+ useSoftDeletes?: boolean | SoftDeleteOptions
78
+ softDeletable?: boolean | SoftDeleteOptions
79
+
80
+ useAuth?: boolean | AuthOptions
81
+ authenticatable?: boolean | AuthOptions
82
+ useSeeder?: boolean | SeedOptions
83
+ seedable?: boolean | SeedOptions
84
+ useSearch?: boolean | SearchOptions
85
+ searchable?: boolean | SearchOptions
86
+ useApi?: ApiOptions | boolean
87
+ observe?: string[] | boolean
88
+ billable?: boolean
89
+ useActivityLog?: boolean | ActivityLogOption
90
+ }
91
+
92
+ attributes?: Attributes
93
+
94
+ hasOne?:
95
+ | {
96
+ model: ModelNames
97
+ foreignKey?: string
98
+ relationName?: string
99
+ }[]
100
+ | string[]
101
+ hasMany?:
102
+ | {
103
+ model: ModelNames
104
+ foreignKey?: string
105
+ relationName?: string
106
+ }[]
107
+ | ModelNames[]
108
+ belongsTo?:
109
+ | {
110
+ model: ModelNames
111
+ foreignKey?: string
112
+ relationName?: string
113
+ }[]
114
+ | ModelNames[]
115
+ belongsToMany?: BelongsToManyType[] | ModelNames[]
116
+ hasOneThrough?: {
117
+ model: ModelNames
118
+ through: ModelNames
119
+ foreignKey?: string
120
+ throughForeignKey?: string
121
+ relationName?: string
122
+ }[]
123
+
124
+ scopes?: {
125
+ [key: string]: (value: any) => any
126
+ }
127
+
128
+ get?: {
129
+ [key: string]: (value: any) => any
130
+ }
131
+
132
+ set?: {
133
+ [key: string]: (value: any) => any
134
+ }
115
135
  }
116
- export interface Attribute {
117
- default?: string | number | boolean | Date;
118
- unique?: boolean;
119
- order?: number;
120
- required?: boolean;
121
- hidden?: boolean;
122
- fillable?: boolean;
123
- factory?: () => any;
124
- validation?: {
125
- rule: VineType;
126
- message: ValidatorMessage;
127
- };
136
+ export declare interface Attribute {
137
+ default?: string | number | boolean | Date
138
+ unique?: boolean
139
+ order?: number
140
+ required?: boolean
141
+ hidden?: boolean
142
+ fillable?: boolean
143
+ factory?: () => any
144
+ validation?: {
145
+ rule: VineType
146
+ message: ValidatorMessage
147
+ }
128
148
  }
129
- export interface Attributes {
130
- [key: string]: Attribute;
149
+ export declare interface Attributes {
150
+ [key: string]: Attribute
131
151
  }
132
- export interface RelationConfig {
133
- relationship: string;
134
- model: string;
135
- table: string;
136
- relationModel?: string;
137
- relationTable?: string;
138
- foreignKey: string;
139
- relationName?: string;
140
- throughModel?: string;
141
- throughForeignKey?: string;
142
- pivotTable: string;
143
- }
144
- export {};
152
+ export declare interface RelationConfig {
153
+ relationship: string
154
+ model: string
155
+ table: string
156
+ relationModel?: string
157
+ relationTable?: string
158
+ foreignKey: string
159
+ modelKey: string
160
+ relationName?: string
161
+ throughModel?: string
162
+ throughForeignKey?: string
163
+ pivotTable: string
164
+ }
@@ -1,106 +1,151 @@
1
- export interface NotificationOptions {
2
- default: "email" | "sms" | "chat" | string;
3
- email: {
4
- default: "emailjs" | "mailgun" | "mailjet" | "mandrill" | "netcore" | "nodemailer" | "postmark" | "sendgrid" | "ses" | string;
5
- from: {
6
- name: string;
7
- address: string;
8
- };
9
- drivers: {
10
- smtp: {
11
- host: string;
12
- port: number;
13
- secure: boolean;
14
- auth: {
15
- user: string;
16
- pass: string;
17
- };
18
- };
19
- sendgrid: {
20
- key: string;
21
- senderName: string;
22
- };
23
- emailjs: {
24
- host: string;
25
- user: string;
26
- password: string;
27
- port: number;
28
- secure: boolean;
29
- };
30
- mailgun: {
31
- key: string;
32
- domain: string;
33
- username: string;
34
- };
35
- mailjet: {
36
- key: string;
37
- secret: string;
38
- };
39
- mandrill: { key: string };
40
- netcore: { key: string };
41
- nodemailer: {
42
- host: string;
43
- user: string;
44
- password: string;
45
- port: number;
46
- secure: boolean;
47
- };
48
- postmark: { key: string };
49
- ses: {
50
- region: string;
51
- key: string;
52
- secret: string;
53
- };
54
- };
55
- };
56
- sms: {
57
- default: "twilio" | "nexmo" | "gupshup" | "plivo" | "sms77" | "sns" | "telnyx" | "termii" | string;
58
- from: string;
59
- drivers: {
60
- twilio: {
61
- sid: string;
62
- authToken: string;
63
- };
64
- nexmo: {
65
- key: string;
66
- secret: string;
67
- };
68
- gupshup: {
69
- user: string;
70
- password: string;
71
- };
72
- plivo: {
73
- sid: string;
74
- authToken: string;
75
- };
76
- sms77: { key: string };
77
- sns: {
78
- region: string;
79
- key: string;
80
- secret: string;
81
- };
82
- telnyx: {
83
- key: string;
84
- messageProfileId: string;
85
- };
86
- termii: { key: string };
87
- };
88
- };
89
- chat: {
90
- default: "slack" | "msTeams" | "discord" | string;
91
- from: string;
92
- drivers: {
93
- slack?: {
94
- appId: string;
95
- clientId: string;
96
- secret: string;
97
- };
98
- msTeams?: {
99
- appId: string;
100
- clientId: string;
101
- secret: string;
102
- };
103
- };
104
- };
1
+ export declare interface NotificationOptions {
2
+ default: 'email' | 'sms' | 'chat' | string
3
+
4
+ email: {
5
+ default:
6
+ | 'emailjs'
7
+ | 'mailgun'
8
+ | 'mailjet'
9
+ | 'mandrill'
10
+ | 'netcore'
11
+ | 'nodemailer'
12
+ | 'postmark'
13
+ | 'sendgrid'
14
+ | 'ses'
15
+ | string
16
+
17
+ from: {
18
+ name: string
19
+ address: string
20
+ }
21
+
22
+ drivers: {
23
+ smtp: {
24
+ host: string
25
+ port: number
26
+ secure: boolean
27
+ auth: {
28
+ user: string
29
+ pass: string
30
+ }
31
+ }
32
+
33
+ sendgrid: {
34
+ key: string
35
+ senderName: string
36
+ }
37
+
38
+ emailjs: {
39
+ host: string
40
+ user: string
41
+ password: string
42
+ port: number
43
+ secure: boolean
44
+ }
45
+
46
+ mailgun: {
47
+ key: string
48
+ domain: string
49
+ username: string
50
+ }
51
+
52
+ mailjet: {
53
+ key: string
54
+ secret: string
55
+ }
56
+
57
+ mandrill: {
58
+ key: string
59
+ }
60
+
61
+ netcore: {
62
+ key: string
63
+ }
64
+
65
+ nodemailer: {
66
+ host: string
67
+ user: string
68
+ password: string
69
+ port: number
70
+ secure: boolean
71
+ }
72
+
73
+ postmark: {
74
+ key: string
75
+ }
76
+
77
+ ses: {
78
+ region: string
79
+ key: string
80
+ secret: string
81
+ }
82
+ }
83
+ }
84
+
85
+ sms: {
86
+ default: 'twilio' | 'nexmo' | 'gupshup' | 'plivo' | 'sms77' | 'sns' | 'telnyx' | 'termii' | string
87
+ from: string
88
+
89
+ drivers: {
90
+ twilio: {
91
+ sid: string
92
+ authToken: string
93
+ }
94
+
95
+ nexmo: {
96
+ key: string
97
+ secret: string
98
+ }
99
+
100
+ gupshup: {
101
+ user: string
102
+ password: string
103
+ }
104
+
105
+ plivo: {
106
+ sid: string
107
+ authToken: string
108
+ }
109
+
110
+ sms77: {
111
+ key: string
112
+ }
113
+
114
+ sns: {
115
+ region: string
116
+ key: string
117
+ secret: string
118
+ }
119
+
120
+ telnyx: {
121
+ key: string
122
+ messageProfileId: string
123
+ }
124
+
125
+ termii: {
126
+ key: string
127
+ }
128
+ }
129
+ }
130
+
131
+ chat: {
132
+ default: 'slack' | 'msTeams' | 'discord' | string
133
+ from: string
134
+
135
+ drivers: {
136
+ slack?: {
137
+ appId: string
138
+ clientId: string
139
+ secret: string
140
+ }
141
+
142
+ msTeams?: {
143
+ appId: string
144
+ clientId: string
145
+ secret: string
146
+ }
147
+
148
+ }
149
+ }
105
150
  }
106
- export type NotificationConfig = Partial<NotificationOptions>;
151
+ export declare type NotificationConfig = Partial<NotificationOptions>
package/dist/pages.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export interface PagesOption {
2
- onboarding: {
3
- path: string;
4
- pages: string[];
5
- };
6
- settings: {
7
- path: string;
8
- pages: string[];
9
- };
10
- }
1
+ export declare interface PagesOption {
2
+ onboarding: {
3
+ path: string
4
+ pages: string[]
5
+ }
6
+ settings: {
7
+ path: string
8
+ pages: string[]
9
+ }
10
+ }