@stacksjs/types 0.70.22 → 0.70.25

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 +94 -11
  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 +63 -5
  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 -226
  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
package/dist/request.d.ts DELETED
@@ -1,49 +0,0 @@
1
- import type { VineType } from '@stacksjs/types';
2
-
3
- export declare type * from '../../../types/requests'
4
- interface RequestData {
5
- [key: string]: any
6
- }
7
-
8
- type RouteParams = { [key: string]: string | number } | null
9
-
10
- interface ValidationField {
11
- rule: VineType
12
- message: Record<string, string>
13
- }
14
-
15
- interface CustomAttributes {
16
- [key: string]: ValidationField
17
- }
18
-
19
- export interface RequestInstance {
20
- addQuery: (url: URL) => void
21
-
22
- addBodies: (params: any) => void
23
-
24
- addParam: (param: RouteParams) => void
25
-
26
- get: <T>(element: string, defaultValue?: T) => T
27
-
28
- header: (element: string) => string | number | boolean | null
29
-
30
- Header: (element: string) => string | number | boolean | null
31
-
32
- all: () => RequestData
33
-
34
- validate: (attributes: CustomAttributes) => void
35
-
36
- has: (element: string) => boolean
37
-
38
- isEmpty: () => boolean
39
-
40
- extractParamsFromRoute: (routePattern: string, pathname: string) => void
41
-
42
- getParam: (key: string) => number | string | null
43
-
44
- route: (key: string) => number | string | null
45
-
46
- getParams: () => RouteParams
47
-
48
- getParamAsInt: (key: string) => number | null
49
- }
package/dist/router.d.ts DELETED
@@ -1,65 +0,0 @@
1
- import type { Action } from '@stacksjs/actions';
2
-
3
- declare type ActionPath = string
4
- export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'before' | 'after' | 'view'
5
-
6
- export type RouteCallback = (params?: Record<string, any>) => any | string | object
7
-
8
- export interface Route {
9
- name: string
10
- uri: string
11
- url: string
12
- path?: string
13
- prefix?: string
14
- method: HttpMethod
15
- pattern: RegExp
16
- callback: RouteCallback | ActionPath | Action | Promise<any>
17
- paramNames: string[]
18
- middleware?: string | string[]
19
- statusCode?: StatusCode
20
- }
21
-
22
- export interface MiddlewareOptions {
23
- name: string
24
- description?: string
25
- priority: number
26
- handle: () => Promise<void>
27
- }
28
-
29
- export type StatusCode = 200 | 201 | 202 | 204 | 301 | 302 | 304 | 400 | 401 | 403 | 404 | 500
30
- export type RedirectCode = Extract<StatusCode, 301 | 302>
31
-
32
- export type RouteParam = { [key: string]: string | number } | null
33
-
34
- export type MiddlewareFn = () => void
35
-
36
- export interface Middlewares {
37
- logger: MiddlewareFn
38
- auth: MiddlewareFn
39
- [key: string]: MiddlewareFn
40
- }
41
-
42
- export interface RouteGroupOptions {
43
- prefix?: string
44
- middleware?: Route['middleware']
45
- }
46
-
47
- type Prefix = string
48
-
49
- export interface RouterInterface {
50
- get: (url: Route['url'], callback: Route['callback']) => this
51
- post: (url: Route['url'], callback: Route['callback']) => this
52
- view: (url: Route['url'], callback: Route['callback']) => this
53
- redirect: (url: Route['url'], callback: Route['callback'], status?: RedirectCode) => this
54
- delete: (url: Route['url'], callback: Route['callback']) => this
55
- patch: (url: Route['url'], callback: Route['callback']) => this
56
- put: (url: Route['url'], callback: Route['callback']) => this
57
- email: (url: Route['url']) => Promise<this>
58
- health: () => Promise<this>
59
- job: (url: Route['url']) => Promise<this>
60
- action: (url: Route['url']) => Promise<this>
61
- group: (options: Prefix | RouteGroupOptions, callback: () => void) => this
62
- name: (name: string) => this
63
- middleware: (middleware: Route['middleware']) => this
64
- getRoutes: () => Promise<Route[]>
65
- }
@@ -1 +0,0 @@
1
- export type { Schedule } from '@stacksjs/scheduler'
@@ -1,81 +0,0 @@
1
- export declare interface ServicesOptions {
2
- algolia?: {
3
- appId: string
4
- apiKey: string
5
- }
6
-
7
- aws?: {
8
- accountId: string
9
- appId: string
10
- apiKey: string
11
- region: string
12
- }
13
-
14
- godaddy?: {
15
- apiKey: string
16
- apiSecret: string
17
- }
18
-
19
- hetzner: {
20
- appId: string
21
- apiKey: string
22
- }
23
-
24
- digitalOcean: {
25
- appId: string
26
- apiKey: string
27
- }
28
-
29
-
30
- mailgun?: {
31
- apiKey?: string
32
- domain?: string
33
- endpoint?: string
34
- maxRetries?: number
35
- retryTimeout?: number
36
- }
37
-
38
- mailtrap?: {
39
- token: string
40
- host: string
41
- inboxId?: string | number
42
- maxRetries?: number
43
- retryTimeout?: number
44
- }
45
-
46
- meilisearch?: {
47
- appId: string
48
- apiKey: string
49
- }
50
-
51
- sendgrid?: {
52
- apiKey?: string
53
- maxRetries?: number
54
- retryTimeout?: number
55
- }
56
-
57
- ses?: {
58
- region: string
59
- credentials: {
60
- accessKeyId?: string
61
- secretAccessKey?: string
62
- }
63
- maxRetries?: number
64
- retryTimeout?: number
65
- }
66
-
67
- slack?: {
68
- appId: string
69
- clientId: string
70
- secretKey: string
71
- maxRetries?: number
72
- retryTimeout?: number
73
- }
74
-
75
- stripe?: {
76
- appId: string
77
- apiKey: string
78
- }
79
-
80
- }
81
- export declare type ServicesConfig = Partial<ServicesOptions>
package/dist/ssg.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { ViteSSGContext } from '.';
2
-
3
- export declare type UserModule = (ctx: ViteSSGContext) => void
package/dist/stacks.d.ts DELETED
@@ -1,54 +0,0 @@
1
- export declare interface StacksOptions {
2
- ai: AiConfig
3
-
4
- analytics: AnalyticsConfig
5
-
6
- app: AppConfig
7
-
8
- cache: CacheConfig
9
-
10
- cli: BinaryConfig
11
-
12
- cloud: CloudConfig
13
-
14
- database: DatabaseConfig
15
-
16
- dns: DnsConfig
17
-
18
- docs: DocsConfig
19
-
20
- email: EmailConfig
21
-
22
- errors: ErrorConfig
23
-
24
- git: GitConfig
25
-
26
- hashing: HashingConfig
27
-
28
- library: LibraryConfig
29
-
30
- logging: LoggingConfig
31
-
32
- notification: NotificationConfig
33
-
34
- payment: PaymentConfig
35
-
36
- ports: Ports
37
-
38
- queue: QueueConfig
39
-
40
- saas: SaasConfig
41
-
42
- security: SecurityConfig
43
-
44
- searchEngine: SearchEngineConfig
45
-
46
- services: ServicesConfig
47
-
48
- storage: StorageConfig
49
-
50
- team: Team
51
-
52
- ui: UiConfig
53
- }
54
- export declare type StacksConfig = Partial<StacksOptions>
package/dist/storage.d.ts DELETED
@@ -1,31 +0,0 @@
1
- import type { Buffer } from 'node:buffer';
2
- import type { ChecksumOptions, DirectoryListing, FileContents, MimeTypeOptions, PublicUrlOptions, StatEntry, TemporaryUrlOptions } from '@flystorage/file-storage';
3
-
4
- export declare interface StorageOptions {
5
- driver: 's3' | 'efs' | 'local'
6
- }
7
- export declare type StorageConfig = Partial<StorageOptions>
8
-
9
- export interface StorageDriver {
10
- list: (path: string, options?: any) => DirectoryListing
11
- changeVisibility: (path: string, visibility: string) => Promise<void>
12
- visibility: (path: string) => Promise<string>
13
- fileExists: (path: string) => Promise<boolean>
14
- directoryExists: (path: string) => Promise<boolean>
15
- publicUrl: (path: string, options: PublicUrlOptions) => Promise<string>
16
- temporaryUrl: (path: string, options: TemporaryUrlOptions) => Promise<string>
17
- checksum: (path: string, options: ChecksumOptions) => Promise<string>
18
- mimeType: (path: string, options: MimeTypeOptions) => Promise<string>
19
- lastModified: (path: string) => Promise<number>
20
- fileSize: (path: string) => Promise<number>
21
- read: (path: string) => Promise<FileContents>
22
- readToString: (path: string) => Promise<string>
23
- readToBuffer: (path: string) => Promise<Buffer>
24
- readToUint8Array: (path: string) => Promise<Uint8Array>
25
- deleteFile: (path: string) => Promise<void>
26
- copyFile: (from: string, to: string) => Promise<void>
27
- moveFile: (from: string, to: string) => Promise<void>
28
- stat: (path: string) => Promise<StatEntry>
29
- createDirectory: (path: string) => Promise<void>
30
- write: (path: string, contents: FileContents) => Promise<void>
31
- }
@@ -1 +0,0 @@
1
- export declare type TableNames = 'projects' | 'subscriber_emails' | 'personal_access_tokens' | 'team_users' | 'teams' | 'subscribers' | 'deployments' | 'releases' | 'team_users' | 'users' | 'posts' | 'categories' | 'payments' | 'drivers' | 'waitlist_products' | 'digital_deliveries' | 'manufacturers' | 'order_items' | 'shipping_zones' | 'customers' | 'products' | 'product_variants' | 'license_keys' | 'waitlist_restaurants' | 'reviews' | 'product_units' | 'gift_cards' | 'orders' | 'coupons' | 'tax_rates' | 'transactions' | 'loyalty_points' | 'product_items' | 'loyalty_rewards' | 'shipping_methods' | 'shipping_rates' | 'delivery_routes' | 'failed_jobs' | 'payment_methods' | 'payment_transactions' | 'requests' | 'jobs' | 'subscriptions' | 'payment_products' | 'errors'
package/dist/tables.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import type { Hits, SearchResponse } from 'meilisearch';
2
-
3
- export declare interface TableStore {
4
- index: string
5
- results?: SearchResponse<Record<string, any>>
6
- hits?: Hits
7
-
8
- columns: string[]
9
- source?: string
10
- password?: string
11
- searchable?: string | boolean
12
- query?: string
13
- sortable?: string | boolean
14
- sort?: string
15
- sorts?: string | string[]
16
- filterable?: string | boolean
17
- filters?: string | string[]
18
- filterValue?: any[]
19
- actionable?: string | boolean
20
- actions?: string | string[]
21
- perPage: number
22
- selectable?: string | boolean
23
- selectedRows?: number[] | string[]
24
- selectedAll?: boolean
25
- goToNextPage: number
26
- goToPage: number
27
- goToPrevPage: number
28
- lastPageNumber: number
29
- searchFilters?: object
30
- searchParams?: object
31
- setTotalHits: number
32
-
33
- currentPage: number
34
- }
package/dist/team.d.ts DELETED
@@ -1,8 +0,0 @@
1
- declare type TeamMemberName = string
2
- type Email = string
3
- type TeamMembers = Record<TeamMemberName, Email>
4
-
5
- export interface Team {
6
- name: string
7
- members?: TeamMembers
8
- }
package/dist/ui.d.ts DELETED
@@ -1,47 +0,0 @@
1
- import type { UserConfig } from '@unocss/core';
2
- import type { UserShortcuts } from 'unocss';
3
-
4
- export declare type Font = 'inter' | 'mona' | 'hubot'
5
- export type Icon = 'heroicons' | 'hugeicons'
6
- export type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
7
- export type Shortcuts = UserShortcuts
8
-
9
- export interface FontInfo {
10
- title: string
11
- text: string
12
- }
13
-
14
- export interface WebFontMeta {
15
- name: string
16
- weights?: (string | number)[]
17
- italic?: boolean
18
- provider?: WebFontsProviders
19
- }
20
-
21
- export interface UiOptions {
22
- shortcuts: Shortcuts
23
-
24
- safelist: string
25
-
26
- trigger?: string
27
-
28
- classPrefix?: string
29
-
30
- hashFn?: (str: string) => string
31
-
32
- reset?: ResetPreset
33
-
34
- fonts?: any
35
-
36
- useWebFonts?: boolean | WebFontsProviders
37
-
38
- icons: Icon | Icon[]
39
-
40
- theme: UserConfig['theme']
41
- variants: UserConfig['variants']
42
- layers: UserConfig['layers']
43
- }
44
-
45
- export type UiConfig = Partial<UiOptions>
46
-
47
- export type ResetPreset = 'tailwind' | 'normalize' | 'sanitize' | 'eric-meyer' | 'antfu' | null
package/dist/utils.d.ts DELETED
@@ -1,27 +0,0 @@
1
- export declare type Nullable<T> = T | null | undefined
2
-
3
- export type Fn<T = void> = () => T
4
-
5
- export type Arrayable<T> = T | Array<T>
6
-
7
- export type Constructor<T = void> = new (...args: any[]) => T
8
-
9
- export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void
10
- ? I
11
- : never
12
-
13
- export type MergeInsertions<T> = T extends object ? { [K in keyof T]: MergeInsertions<T[K]> } : T
14
-
15
- export type DeepMerge<F, S> = MergeInsertions<{
16
- [K in keyof F | keyof S]: K extends keyof S & keyof F
17
- ? DeepMerge<F[K], S[K]>
18
- : K extends keyof S
19
- ? S[K]
20
- : K extends keyof F
21
- ? F[K]
22
- : never
23
- }>
24
-
25
- export type DeepPartial<T> = {
26
- [P in keyof T]?: DeepPartial<T[P]>
27
- }
package/src/build.ts DELETED
@@ -1,2 +0,0 @@
1
- export type { UserConfig as ViteConfig } from 'vite'
2
- export type { ViteSSGContext } from 'vite-ssg'
package/src/inspect.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { Options } from 'vite-plugin-inspect'
2
-
3
- /**
4
- * **Inspect Options**
5
- *
6
- * The inspect options.
7
- *
8
- * @see https://github.com/intlify/bundle-tools/blob/main/packages/vite-plugin-vue-i18n/src/options.ts
9
- */
10
- export type InspectOptions = Options
package/src/layout.ts DELETED
@@ -1,8 +0,0 @@
1
- // import type { UserOptions } from 'vite-plugin-vue-layouts'
2
- //
3
- // /**
4
- // * **Layout Options**
5
- // *
6
- // * The layout options.
7
- // */
8
- // export type LayoutOptions = UserOptions
package/src/pwa.ts DELETED
@@ -1,8 +0,0 @@
1
- import type { Options } from 'vite-plugin-pwa'
2
-
3
- /**
4
- * **PWA Options**
5
- *
6
- * The PWA options.
7
- */
8
- export type PwaOptions = Options
package/src/ssg.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { ViteSSGContext } from '.'
2
-
3
- export type UserModule = (ctx: ViteSSGContext) => void