@stacksjs/types 0.64.6 → 0.65.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 (87) hide show
  1. package/dist/ai.d.ts +15 -0
  2. package/dist/analytics.d.ts +15 -0
  3. package/dist/api.d.ts +67 -0
  4. package/dist/app.d.ts +135 -0
  5. package/dist/auto-imports.d.ts +1 -0
  6. package/dist/binary.d.ts +11 -0
  7. package/dist/build.d.ts +2 -0
  8. package/dist/cache.d.ts +62 -0
  9. package/dist/cdn.d.ts +16 -0
  10. package/dist/chat.d.ts +3 -0
  11. package/dist/cli.d.ts +246 -0
  12. package/dist/cloud.d.ts +69 -0
  13. package/dist/components.d.ts +60 -0
  14. package/dist/configure.d.ts +12 -0
  15. package/dist/cron-jobs.d.ts +43 -0
  16. package/dist/database.d.ts +47 -0
  17. package/dist/dependencies.d.ts +62 -0
  18. package/dist/deploy.d.ts +16 -0
  19. package/dist/dns.d.ts +175 -0
  20. package/dist/docs.d.ts +22 -0
  21. package/dist/email.d.ts +11 -0
  22. package/dist/env.d.ts +0 -0
  23. package/dist/errors.d.ts +70 -0
  24. package/dist/events.d.ts +30 -0
  25. package/dist/exit-code.d.ts +10 -0
  26. package/dist/file-systems.d.ts +60 -0
  27. package/dist/git.d.ts +128 -0
  28. package/dist/hashing.d.ts +100 -0
  29. package/dist/helpers.d.ts +1 -0
  30. package/dist/i18n.d.ts +19 -0
  31. package/dist/index.d.ts +61 -0
  32. package/dist/index.js +3 -2
  33. package/dist/index.js.map +11 -10
  34. package/dist/inspect.d.ts +9 -0
  35. package/dist/layout.d.ts +0 -0
  36. package/dist/library.d.ts +142 -0
  37. package/dist/logging.d.ts +28 -0
  38. package/dist/manifest.d.ts +9 -0
  39. package/dist/model-names.d.ts +1 -0
  40. package/dist/model.d.ts +144 -0
  41. package/dist/native.d.ts +0 -0
  42. package/dist/notifications.d.ts +106 -0
  43. package/dist/pages.d.ts +10 -0
  44. package/dist/payments.d.ts +60 -0
  45. package/dist/ports.d.ts +20 -0
  46. package/dist/promise.d.ts +1 -0
  47. package/dist/push.d.ts +31 -0
  48. package/dist/pwa.d.ts +7 -0
  49. package/dist/queue.d.ts +34 -0
  50. package/dist/reactivity.d.ts +1 -0
  51. package/dist/request.d.ts +30 -0
  52. package/dist/router.d.ts +55 -0
  53. package/dist/scheduler.d.ts +1 -0
  54. package/dist/search-engine.d.ts +114 -0
  55. package/dist/security.d.ts +18 -0
  56. package/dist/server.d.ts +6 -0
  57. package/dist/services.d.ts +29 -0
  58. package/dist/settings-config.d.ts +9 -0
  59. package/dist/sms.d.ts +0 -0
  60. package/dist/ssg.d.ts +2 -0
  61. package/dist/stacks.d.ts +204 -0
  62. package/dist/storage.d.ts +12 -0
  63. package/dist/tables.d.ts +52 -0
  64. package/dist/team.d.ts +8 -0
  65. package/dist/ui.d.ts +165 -0
  66. package/dist/utils.d.ts +30 -0
  67. package/package.json +19 -19
  68. package/src/api.ts +6 -6
  69. package/src/app.ts +1 -1
  70. package/src/chat.ts +1 -1
  71. package/src/cli.ts +7 -3
  72. package/src/cloud.ts +1 -1
  73. package/src/cron-jobs.ts +1 -0
  74. package/src/deploy.ts +1 -0
  75. package/src/errors.ts +50 -51
  76. package/src/git.ts +1 -1
  77. package/src/helpers.ts +3 -2
  78. package/src/index.ts +8 -7
  79. package/src/model-names.ts +1 -10
  80. package/src/model.ts +35 -19
  81. package/src/notifications.ts +1 -5
  82. package/src/request.ts +16 -15
  83. package/src/router.ts +1 -0
  84. package/src/search-engine.ts +3 -3
  85. package/src/server.ts +16 -0
  86. package/src/settings-config.ts +2 -2
  87. package/src/stacks.ts +0 -1
@@ -0,0 +1,144 @@
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;
8
+ }
9
+ export interface ModelElement {
10
+ field: string;
11
+ default: string | number | boolean | Date | undefined | null;
12
+ unique: boolean;
13
+ fieldArray: FieldArrayElement | null;
14
+ }
15
+ export interface AuthOptions {
16
+ useTwoFactor?: boolean;
17
+ usePasskey?: boolean;
18
+ }
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>;
24
+ export interface SeedOptions {
25
+ count: number;
26
+ }
27
+ type LogAttribute = string;
28
+ interface ActivityLogOption {
29
+ exclude: LogAttribute[];
30
+ include: LogAttribute[];
31
+ logOnly: LogAttribute[];
32
+ }
33
+ interface BelongsToManyType {
34
+ model: ModelNames;
35
+ firstForeignKey?: string;
36
+ secondForeignKey?: string;
37
+ pivotTable?: string;
38
+ relationName?: string;
39
+ }
40
+ export interface ApiSettings {
41
+ uri: string;
42
+ middleware: string[];
43
+ routes: { [key in ApiRoutes] : Action } | string[];
44
+ openApi: boolean;
45
+ }
46
+ type ApiOptions = DeepPartial<ApiSettings>;
47
+ export interface TimestampOptions {
48
+ createdAt?: string;
49
+ updatedAt?: string;
50
+ deletedAt?: string;
51
+ }
52
+ interface ValidatorMessage {
53
+ [key: string]: string;
54
+ }
55
+ export interface SoftDeleteOptions {
56
+ deletedAt?: string;
57
+ }
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 };
115
+ }
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
+ };
128
+ }
129
+ export interface Attributes {
130
+ [key: string]: Attribute;
131
+ }
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 {};
File without changes
@@ -0,0 +1,106 @@
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
+ };
105
+ }
106
+ export type NotificationConfig = Partial<NotificationOptions>;
@@ -0,0 +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
+ }
@@ -0,0 +1,60 @@
1
+ export interface PaymentOptions {
2
+ driver: "stripe";
3
+ }
4
+ export type PaymentConfig = Partial<PaymentOptions>;
5
+ export interface ChargeOptions {
6
+ currency?: string;
7
+ source?: string;
8
+ description?: string;
9
+ chargeId?: string;
10
+ limit?: number;
11
+ metadata?: object;
12
+ searchOptions: {
13
+ query?: string;
14
+ limit?: number;
15
+ };
16
+ }
17
+ export interface CustomerOptions {
18
+ description?: string;
19
+ address?: string;
20
+ email?: string;
21
+ metadata?: object;
22
+ name?: string;
23
+ payment_method?: string;
24
+ shipping: string;
25
+ listOptions?: {
26
+ created?: object;
27
+ ending_before?: string;
28
+ limit?: number;
29
+ starting_after?: string;
30
+ test_clock?: string;
31
+ };
32
+ searchOptions?: {
33
+ query?: string;
34
+ limit?: number;
35
+ page?: number;
36
+ };
37
+ }
38
+ export interface DisputeOptions {
39
+ dp_id?: string;
40
+ metadata?: object;
41
+ listOptions?: {
42
+ charge?: string;
43
+ payment_intent?: string;
44
+ created?: string;
45
+ ending_before?: string;
46
+ limit?: number;
47
+ starting_after?: string;
48
+ };
49
+ }
50
+ export interface EventOptions {
51
+ event_id?: string;
52
+ listOptions?: {
53
+ created?: object;
54
+ delivery_success?: boolean;
55
+ ending_before?: string;
56
+ limit?: number;
57
+ starting_after?: string;
58
+ type?: string;
59
+ };
60
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * **Stacks Ports**
3
+ *
4
+ * This port is used by the Stacks servers when running your application, library, email services,
5
+ * and other services. You may change this port to any other port that is free
6
+ * on your machine, as long as the following 6 ports are also available.
7
+ */
8
+ export interface Ports {
9
+ frontend: number;
10
+ backend: number;
11
+ admin: number;
12
+ library: number;
13
+ desktop: number;
14
+ email: number;
15
+ docs: number;
16
+ inspect: number;
17
+ api: number;
18
+ systemTray: number;
19
+ database: number;
20
+ }
@@ -0,0 +1 @@
1
+ export type MaybePromise<T> = T | Promise<T>;
package/dist/push.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ export interface FCMPushNotificationOptions {
2
+ eventName: string;
3
+ to: { subscriberId: string };
4
+ payload: {
5
+ deviceTokens: Array<string>;
6
+ badge: boolean;
7
+ clickAction: string;
8
+ color: string;
9
+ icon: string;
10
+ sound: string;
11
+ };
12
+ }
13
+ export interface ExpoPushNotificationOptions {
14
+ eventName: string;
15
+ to: { subscriberId: string };
16
+ payload: {
17
+ to: string[];
18
+ data: object;
19
+ title: string;
20
+ body: string;
21
+ ttl: number;
22
+ expiration: number;
23
+ priority: "default" | "normal" | "high";
24
+ subtitle: string;
25
+ sound: "default" | null;
26
+ badge: number;
27
+ channelId: string;
28
+ categoryId: string;
29
+ mutableContent: boolean;
30
+ };
31
+ }
package/dist/pwa.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { Options } from "vite-plugin-pwa";
2
+ /**
3
+ * **PWA Options**
4
+ *
5
+ * The PWA options.
6
+ */
7
+ export type PwaOptions = Options;
@@ -0,0 +1,34 @@
1
+ import type { DeepPartial } from "./utils";
2
+ export interface QueueOptions {
3
+ default: "sync" | "database" | "redis" | "sqs";
4
+ connections: {
5
+ sync: { driver: "sync" };
6
+ database: {
7
+ driver: "database";
8
+ table: "jobs";
9
+ queue: "default";
10
+ retry_after: 90;
11
+ };
12
+ redis: {
13
+ driver: "redis";
14
+ connection: "default";
15
+ queue: "default";
16
+ retry_after: 90;
17
+ };
18
+ sqs: {
19
+ driver: "sqs";
20
+ key: "";
21
+ secret: "";
22
+ prefix: "";
23
+ suffix: "";
24
+ queue: "default";
25
+ region: "us-east-1";
26
+ };
27
+ };
28
+ failed: {
29
+ driver: "database";
30
+ database: "mysql";
31
+ table: "failed_jobs";
32
+ };
33
+ }
34
+ export type QueueConfig = DeepPartial<QueueOptions>;
@@ -0,0 +1 @@
1
+ export type { Ref } from "vue";
@@ -0,0 +1,30 @@
1
+ import type { VineType } from "@stacksjs/types";
2
+ export type * from "../../../types/requests";
3
+ interface RequestData {
4
+ [key: string]: any;
5
+ }
6
+ type RouteParams = { [key: string]: string | number } | null;
7
+ interface ValidationField {
8
+ rule: VineType;
9
+ message: Record<string, string>;
10
+ }
11
+ interface CustomAttributes {
12
+ [key: string]: ValidationField;
13
+ }
14
+ export interface RequestInstance {
15
+ addQuery: (url: URL) => void;
16
+ addBodies: (params: any) => void;
17
+ addParam: (param: RouteParams) => void;
18
+ get: <T>(element: T) => string | undefined;
19
+ header: (element: string) => string | number | boolean | null;
20
+ Header: (element: string) => string | number | boolean | null;
21
+ all: () => RequestData;
22
+ validate: (attributes: CustomAttributes) => void;
23
+ has: (element: string) => boolean;
24
+ isEmpty: () => boolean;
25
+ extractParamsFromRoute: (routePattern: string, pathname: string) => void;
26
+ getParam: (key: string) => number | string | null;
27
+ getParams: () => RouteParams;
28
+ getParamAsInt: (key: string) => number | null;
29
+ }
30
+ export {};
@@ -0,0 +1,55 @@
1
+ import type { Action } from "@stacksjs/actions";
2
+ type ActionPath = string;
3
+ export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "before" | "after" | "view";
4
+ export type RouteCallback = (params?: Record<string, any>) => any | string | object;
5
+ export interface Route {
6
+ name: string;
7
+ uri: string;
8
+ url: string;
9
+ path?: string;
10
+ prefix?: string;
11
+ method: HttpMethod;
12
+ pattern: RegExp;
13
+ callback: RouteCallback | ActionPath | Action | Promise<any>;
14
+ paramNames: string[];
15
+ middleware?: string | string[];
16
+ statusCode?: StatusCode;
17
+ }
18
+ export interface MiddlewareOptions {
19
+ name: string;
20
+ description?: string;
21
+ priority: number;
22
+ handle: Function;
23
+ }
24
+ export type StatusCode = 200 | 201 | 202 | 204 | 301 | 302 | 304 | 400 | 401 | 403 | 404 | 500;
25
+ export type RedirectCode = Extract<StatusCode, 301 | 302>;
26
+ export type RouteParam = { [key: string]: string | number } | null;
27
+ export type MiddlewareFn = () => void;
28
+ export interface Middlewares {
29
+ logger: MiddlewareFn;
30
+ auth: MiddlewareFn;
31
+ [key: string]: MiddlewareFn;
32
+ }
33
+ export interface RouteGroupOptions {
34
+ prefix?: string;
35
+ middleware?: Route["middleware"];
36
+ }
37
+ type Prefix = string;
38
+ export interface RouterInterface {
39
+ get: (url: Route["url"], callback: Route["callback"]) => this;
40
+ post: (url: Route["url"], callback: Route["callback"]) => this;
41
+ view: (url: Route["url"], callback: Route["callback"]) => this;
42
+ redirect: (url: Route["url"], callback: Route["callback"], status?: RedirectCode) => this;
43
+ delete: (url: Route["url"], callback: Route["callback"]) => this;
44
+ patch: (url: Route["url"], callback: Route["callback"]) => this;
45
+ put: (url: Route["url"], callback: Route["callback"]) => this;
46
+ email: (url: Route["url"]) => Promise<this>;
47
+ health: () => Promise<this>;
48
+ job: (url: Route["url"]) => Promise<this>;
49
+ action: (url: Route["url"]) => Promise<this>;
50
+ group: (options: Prefix | RouteGroupOptions, callback: () => void) => this;
51
+ name: (name: string) => this;
52
+ middleware: (middleware: Route["middleware"]) => this;
53
+ getRoutes: () => Promise<Route[]>;
54
+ }
55
+ export {};
@@ -0,0 +1 @@
1
+ export type { Schedule } from "@stacksjs/scheduler";
@@ -0,0 +1,114 @@
1
+ import type { EnqueuedTask, Hits, Index, IndexesResults, IndexOptions, MeiliSearch, Settings as MeilisearchOptions, DocumentOptions as RecordOptions, SearchParams, SearchResponse } from "meilisearch";
2
+ import type { MaybePromise } from ".";
3
+ type Search = any;
4
+ type Page = any;
5
+ type Pages = Page[];
6
+ type Filter = any;
7
+ type Filters = Filter[];
8
+ type Result = any;
9
+ type Results = Result[];
10
+ type SearchFilter = any;
11
+ type SearchFilters = SearchFilter[];
12
+ type Sorts = any;
13
+ type Sort = any;
14
+ export interface SearchEngineOptions {
15
+ /**
16
+ * **Search Engine Driver**
17
+ *
18
+ * The search engine to utilize.
19
+ *
20
+ * @default string 'opensearch'
21
+ * @see https://stacksjs.org/docs/search-engine
22
+ */
23
+ driver: "opensearch";
24
+ opensearch?: {
25
+ host: string;
26
+ protocol: number;
27
+ port: number;
28
+ auth: string;
29
+ };
30
+ filters?: { [key: string]: string };
31
+ /**
32
+ * The number of hits to be returned per page.
33
+ *
34
+ * @default number 20
35
+ */
36
+ perPage?: number;
37
+ }
38
+ export type SearchEngineConfig = Partial<SearchEngineOptions>;
39
+ export interface SearchEngineDriver {
40
+ client: MeiliSearch;
41
+ createIndex: (name: string, options?: IndexOptions) => MaybePromise<EnqueuedTask>;
42
+ getIndex: (name: string) => MaybePromise<Index>;
43
+ updateIndex: (name: string, options: IndexOptions) => MaybePromise<EnqueuedTask>;
44
+ deleteIndex: (name: string) => MaybePromise<EnqueuedTask>;
45
+ updateIndexSettings: (name: string, settings: SearchEngineOptions) => MaybePromise<EnqueuedTask>;
46
+ listAllIndexes: () => MaybePromise<IndexesResults<Index[]>>;
47
+ listAllIndices: () => MaybePromise<IndexesResults<Index[]>>;
48
+ getRecord: (key: string) => MaybePromise<any>;
49
+ getRecords: (key: string) => MaybePromise<RecordOptions>;
50
+ createRecord: (record: any, indexName: string, options: RecordOptions) => MaybePromise<EnqueuedTask>;
51
+ createRecords: (records: any, indexName: string, options: RecordOptions) => MaybePromise<EnqueuedTask>;
52
+ createOrReplaceRecord: (record: any, indexName: string, options: RecordOptions) => MaybePromise<EnqueuedTask>;
53
+ createOrUpdateRecord: (record: any, indexName: string, options: RecordOptions) => MaybePromise<EnqueuedTask>;
54
+ deleteRecord: (recordId: string | number, indexName: string) => MaybePromise<EnqueuedTask>;
55
+ deleteAllRecords: (indexName: string) => MaybePromise<EnqueuedTask>;
56
+ batchDeleteRecords: (recordIds: string[] | number[], indexName: string) => MaybePromise<EnqueuedTask>;
57
+ search: (query: string, indexName: string, options: SearchParams) => MaybePromise<Search>;
58
+ calculatePagination: Pages;
59
+ currentPage: Page;
60
+ filterName: string;
61
+ filters: Filters;
62
+ goToNextPage: () => Page;
63
+ goToPage: (pageNumber: number) => Page;
64
+ goToPrevPage: () => Page;
65
+ hits: Hits;
66
+ index: Index;
67
+ lastPage: Page;
68
+ perPage: number;
69
+ query: string;
70
+ results: Results;
71
+ searchFilters: SearchFilters;
72
+ searchParams: SearchParams;
73
+ setTotalHits: number;
74
+ sort: Sort;
75
+ sorts: Sorts;
76
+ totalPages: number;
77
+ }
78
+ /**
79
+ * This interface is used to unify the persisting of data to localStorage
80
+ */
81
+ export interface SearchEngineStorage {
82
+ /**
83
+ * The search engine index name.
84
+ * i.e. the type of table, like `users`, `posts`, `products`, etc.
85
+ */
86
+ index?: string;
87
+ /**
88
+ * The search engine results object.
89
+ */
90
+ results?: SearchResponse;
91
+ /**
92
+ * The search engine hits object.
93
+ */
94
+ hits?: Hits;
95
+ /**
96
+ * The number of hits to be returned per page.
97
+ *
98
+ * @default number 20
99
+ */
100
+ perPage: number;
101
+ /**
102
+ * The current page number.
103
+ *
104
+ * @default number 1
105
+ */
106
+ currentPage: number;
107
+ }
108
+ export interface SearchOptions {
109
+ searchable: string[];
110
+ sortable: string[];
111
+ filterable: string[];
112
+ options?: SearchEngineOptions;
113
+ }
114
+ export type { EnqueuedTask, Hits, Index, IndexesResults, IndexOptions, MeiliSearch, MeilisearchOptions, RecordOptions, SearchParams, SearchResponse };
@@ -0,0 +1,18 @@
1
+ import type { CountryCode } from "./cloud";
2
+ import type { DeepPartial } from "./utils";
3
+ export interface FirewallOptions {
4
+ enabled: boolean;
5
+ countryCodes: CountryCode[];
6
+ ipAddresses: string[];
7
+ queryString: string[];
8
+ httpHeaders: string[];
9
+ rateLimitPerMinute: number;
10
+ useIpReputationLists: boolean;
11
+ useKnownBadInputsRuleSet: boolean;
12
+ }
13
+ export type FirewallConfig = Partial<FirewallOptions>;
14
+ export interface SecurityOptions {
15
+ driver: "aws";
16
+ firewall: FirewallOptions;
17
+ }
18
+ export type SecurityConfig = DeepPartial<SecurityOptions>;
@@ -0,0 +1,6 @@
1
+ export interface ServerOptions {
2
+ type?: "frontend" | "backend" | "api" | "library" | "desktop" | "docs" | "email" | "admin" | "system-tray" | "database";
3
+ host?: string;
4
+ port?: number;
5
+ open?: boolean;
6
+ }
@@ -0,0 +1,29 @@
1
+ export interface ServicesOptions {
2
+ algolia?: {
3
+ appId: string;
4
+ apiKey: string;
5
+ };
6
+ godaddy?: {
7
+ apiKey: string;
8
+ apiSecret: string;
9
+ };
10
+ meilisearch?: {
11
+ appId: string;
12
+ apiKey: string;
13
+ };
14
+ lemonSqueezy?: {
15
+ appId: string;
16
+ apiKey: string;
17
+ };
18
+ stripe?: {
19
+ appId: string;
20
+ apiKey: string;
21
+ };
22
+ aws?: {
23
+ accountId: string;
24
+ appId: string;
25
+ apiKey: string;
26
+ region: string;
27
+ };
28
+ }
29
+ export type ServicesConfig = Partial<ServicesOptions>;
@@ -0,0 +1,9 @@
1
+ export interface SettingsMenuOption {
2
+ label: string;
3
+ path: string;
4
+ icon?: MenuIcon;
5
+ }
6
+ export interface MenuIcon {
7
+ name?: string;
8
+ source?: string;
9
+ }
package/dist/sms.d.ts ADDED
File without changes