@stacksjs/types 0.70.88 → 0.70.90

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 (77) hide show
  1. package/dist/ai.d.ts +37 -0
  2. package/dist/analytics.d.ts +36 -0
  3. package/dist/api.d.ts +26 -0
  4. package/dist/app.d.ts +28 -0
  5. package/dist/attributes.d.ts +1 -0
  6. package/dist/auth.d.ts +62 -0
  7. package/dist/auto-imports.d.ts +8 -0
  8. package/dist/binary.d.ts +11 -0
  9. package/dist/cache.d.ts +88 -0
  10. package/dist/cdn.d.ts +4 -0
  11. package/dist/chat.d.ts +69 -0
  12. package/dist/cli.d.ts +316 -0
  13. package/dist/cloud.d.ts +366 -0
  14. package/dist/cms.d.ts +12 -0
  15. package/dist/commerce.d.ts +14 -0
  16. package/dist/components.d.ts +9 -0
  17. package/dist/configure.d.ts +12 -0
  18. package/dist/cors.d.ts +47 -0
  19. package/dist/cron-jobs.d.ts +61 -0
  20. package/dist/dashboard.d.ts +108 -0
  21. package/dist/database.d.ts +76 -0
  22. package/dist/dependencies.d.ts +17 -0
  23. package/dist/deploy.d.ts +16 -0
  24. package/dist/dns.d.ts +362 -0
  25. package/dist/docs.d.ts +23 -0
  26. package/dist/email.d.ts +207 -0
  27. package/dist/env.d.ts +1 -0
  28. package/dist/errors.d.ts +84 -0
  29. package/dist/events.d.ts +31 -0
  30. package/dist/exit-code.d.ts +10 -0
  31. package/dist/feature-flags.d.ts +17 -0
  32. package/dist/file-systems.d.ts +60 -0
  33. package/dist/git.d.ts +60 -0
  34. package/dist/hashing.d.ts +57 -0
  35. package/dist/helpers.d.ts +1 -0
  36. package/dist/i18n.d.ts +65 -0
  37. package/dist/index.d.ts +80 -0
  38. package/dist/index.js +2 -0
  39. package/dist/library.d.ts +799 -0
  40. package/dist/logging.d.ts +15 -0
  41. package/dist/manifest.d.ts +9 -0
  42. package/dist/marketing.d.ts +12 -0
  43. package/dist/model-dashboard-augmentation.d.ts +8 -0
  44. package/dist/model-names.d.ts +1 -0
  45. package/dist/model.d.ts +256 -0
  46. package/dist/monitoring.d.ts +12 -0
  47. package/dist/notifications.d.ts +126 -0
  48. package/dist/oauth.d.ts +290 -0
  49. package/dist/pages.d.ts +10 -0
  50. package/dist/payments.d.ts +322 -0
  51. package/dist/phone.d.ts +65 -0
  52. package/dist/ports.d.ts +20 -0
  53. package/dist/promise.d.ts +1 -0
  54. package/dist/push.d.ts +108 -0
  55. package/dist/queue.d.ts +312 -0
  56. package/dist/reactivity.d.ts +1 -0
  57. package/dist/realtime.d.ts +443 -0
  58. package/dist/request.d.ts +265 -0
  59. package/dist/response.d.ts +15 -0
  60. package/dist/router.d.ts +105 -0
  61. package/dist/saas.d.ts +32 -0
  62. package/dist/scheduler.d.ts +1 -0
  63. package/dist/search-engine.d.ts +129 -0
  64. package/dist/security.d.ts +18 -0
  65. package/dist/server.d.ts +16 -0
  66. package/dist/services.d.ts +149 -0
  67. package/dist/settings-config.d.ts +9 -0
  68. package/dist/sms.d.ts +144 -0
  69. package/dist/stack-extensions.d.ts +137 -0
  70. package/dist/stacks.d.ts +46 -0
  71. package/dist/storage.d.ts +104 -0
  72. package/dist/table-names.d.ts +1 -0
  73. package/dist/tables.d.ts +34 -0
  74. package/dist/team.d.ts +7 -0
  75. package/dist/ui.d.ts +55 -0
  76. package/dist/utils.d.ts +39 -0
  77. package/package.json +3 -3
@@ -0,0 +1,290 @@
1
+ /**
2
+ * Type guard to check if a value is an AccessToken.
3
+ */
4
+ export declare function isAccessToken(value: unknown): value is AccessToken;
5
+ /**
6
+ * Type guard to check if a value is a PersonalAccessToken.
7
+ */
8
+ export declare function isPersonalAccessToken(value: unknown): value is PersonalAccessToken;
9
+ /**
10
+ * Type guard to check if a value is an OAuthClient.
11
+ */
12
+ export declare function isOAuthClient(value: unknown): value is OAuthClient;
13
+ /**
14
+ * Access token entity with full metadata.
15
+ * Represents a token after being retrieved from the database.
16
+ */
17
+ export declare interface AccessToken {
18
+ readonly id: number
19
+ readonly userId: number
20
+ readonly clientId: number
21
+ readonly name: string
22
+ readonly scopes: TokenScopes
23
+ readonly revoked: boolean
24
+ readonly expiresAt: Date | null
25
+ readonly createdAt: Date
26
+ readonly updatedAt: Date
27
+ }
28
+ /**
29
+ * Personal access token with additional metadata.
30
+ * Extended version used in the Auth class.
31
+ */
32
+ export declare interface PersonalAccessToken extends AccessToken {
33
+ readonly abilities: TokenScopes
34
+ readonly plainTextToken?: AuthToken
35
+ }
36
+ /**
37
+ * Mutable version of AccessToken for internal use.
38
+ */
39
+ export declare interface MutableAccessToken {
40
+ id: number
41
+ userId: number
42
+ clientId: number
43
+ name: string
44
+ scopes: TokenScopes
45
+ revoked: boolean
46
+ expiresAt: Date | null
47
+ createdAt: Date
48
+ updatedAt: Date
49
+ }
50
+ /**
51
+ * Refresh token entity for obtaining new access tokens.
52
+ */
53
+ export declare interface RefreshToken {
54
+ readonly id: number
55
+ readonly accessTokenId: number
56
+ readonly revoked: boolean
57
+ readonly expiresAt: Date | null
58
+ readonly createdAt: Date
59
+ }
60
+ /**
61
+ * OAuth client entity representing an authorized application.
62
+ */
63
+ export declare interface OAuthClient {
64
+ readonly id: number
65
+ readonly name: string
66
+ readonly secret: ClientSecret | string
67
+ readonly provider: string | null
68
+ readonly redirect: string
69
+ readonly personalAccessClient: boolean
70
+ readonly passwordClient: boolean
71
+ readonly revoked: boolean
72
+ readonly createdAt: Date
73
+ readonly updatedAt: Date | null
74
+ }
75
+ /**
76
+ * Raw database row for oauth_access_tokens table.
77
+ * Use this when working with raw SQL queries.
78
+ */
79
+ export declare interface OAuthAccessTokenRow {
80
+ id: number
81
+ user_id: number
82
+ oauth_client_id: number
83
+ token: string
84
+ name: string | null
85
+ scopes: string | null
86
+ revoked: boolean | number
87
+ expires_at: string | null
88
+ created_at: string | null
89
+ updated_at: string | null
90
+ }
91
+ /**
92
+ * Raw database row for oauth_refresh_tokens table.
93
+ */
94
+ export declare interface OAuthRefreshTokenRow {
95
+ id: number
96
+ access_token_id: number
97
+ token: string
98
+ revoked: boolean | number
99
+ expires_at: string | null
100
+ created_at: string | null
101
+ }
102
+ /**
103
+ * Raw database row for oauth_clients table.
104
+ */
105
+ export declare interface OAuthClientRow {
106
+ id: number
107
+ name: string
108
+ secret: string
109
+ provider: string | null
110
+ redirect: string
111
+ personal_access_client: boolean | number
112
+ password_client: boolean | number
113
+ revoked: boolean | number
114
+ created_at: string | null
115
+ updated_at: string | null
116
+ }
117
+ /**
118
+ * Options for creating a new token.
119
+ */
120
+ export declare interface TokenCreateOptions {
121
+ name?: string
122
+ abilities?: TokenScopes
123
+ scopes?: TokenScopes
124
+ expiresAt?: Date
125
+ expiresInMinutes?: number
126
+ withRefreshToken?: boolean
127
+ refreshExpiresInDays?: number
128
+ }
129
+ /**
130
+ * Result returned when creating a personal access token.
131
+ */
132
+ export declare interface PersonalAccessTokenResult {
133
+ readonly accessToken: AccessToken
134
+ readonly plainTextToken: AuthToken | string
135
+ readonly refreshToken?: RefreshTokenString | string
136
+ readonly expiresIn: number
137
+ }
138
+ /**
139
+ * Result returned when creating a token via the Auth class.
140
+ */
141
+ export declare interface NewAccessToken {
142
+ readonly accessToken: PersonalAccessToken
143
+ readonly plainTextToken: AuthToken
144
+ readonly refreshToken?: string
145
+ readonly expiresIn?: number
146
+ }
147
+ /**
148
+ * Result returned when refreshing a token.
149
+ */
150
+ export declare interface RefreshTokenResult {
151
+ readonly accessToken: AccessToken
152
+ readonly plainTextToken: AuthToken | string
153
+ readonly refreshToken: RefreshTokenString | string
154
+ readonly expiresIn: number
155
+ }
156
+ /**
157
+ * Options for creating a new OAuth client.
158
+ */
159
+ export declare interface CreateClientOptions {
160
+ name: string
161
+ redirect: string
162
+ userId?: number
163
+ personalAccessClient?: boolean
164
+ passwordClient?: boolean
165
+ provider?: string
166
+ }
167
+ /**
168
+ * Result returned when creating a new OAuth client.
169
+ */
170
+ export declare interface CreateClientResult {
171
+ readonly client: OAuthClient
172
+ readonly plainTextSecret: ClientSecret | string
173
+ }
174
+ /**
175
+ * Result of token validation.
176
+ */
177
+ export declare interface TokenValidationResult {
178
+ readonly valid: boolean
179
+ readonly token?: AccessToken
180
+ readonly error?: string
181
+ readonly rotated?: boolean
182
+ readonly newToken?: AuthToken
183
+ }
184
+ /**
185
+ * Token payload extracted from JWT-like tokens.
186
+ */
187
+ export declare interface TokenPayload {
188
+ readonly sub: number
189
+ readonly iat: number
190
+ readonly exp: number
191
+ readonly jti: string
192
+ }
193
+ /**
194
+ * User credentials for authentication.
195
+ */
196
+ export declare interface AuthCredentials {
197
+ email?: string
198
+ password?: string
199
+ [key: string]: string | undefined
200
+ }
201
+ /**
202
+ * Login result containing user and token.
203
+ */
204
+ export declare interface LoginResult<TUser = unknown> {
205
+ readonly user: TUser
206
+ readonly token: AuthToken
207
+ }
208
+ /**
209
+ * SQL syntax configuration based on database driver.
210
+ */
211
+ export declare interface DatabaseSqlSyntax {
212
+ readonly now: string
213
+ readonly boolTrue: string
214
+ readonly boolFalse: string
215
+ readonly autoIncrement: string
216
+ readonly primaryKey: string
217
+ readonly param: (index: number) => string
218
+ }
219
+ /**
220
+ * Token with user attached.
221
+ */
222
+ export declare interface TokenWithUser<TUser = unknown> extends AccessToken {
223
+ readonly user: TUser
224
+ }
225
+ /**
226
+ * Branded type for authentication tokens.
227
+ * Using a branded type ensures tokens are not accidentally confused with regular strings.
228
+ *
229
+ * @example
230
+ * ```typescript
231
+ * const token: AuthToken = 'abc123' as AuthToken
232
+ * // or use createAuthToken helper
233
+ * ```
234
+ */
235
+ export type AuthToken = string & { readonly __brand: 'AuthToken' }
236
+ /**
237
+ * Branded type for refresh tokens.
238
+ * Distinct from AuthToken to prevent accidental misuse.
239
+ */
240
+ export type RefreshTokenString = string & { readonly __brand: 'RefreshToken' }
241
+ /**
242
+ * Branded type for OAuth client secrets.
243
+ */
244
+ export type ClientSecret = string & { readonly __brand: 'ClientSecret' }
245
+ /**
246
+ * Branded type for hashed token values stored in database.
247
+ */
248
+ export type HashedToken = string & { readonly __brand: 'HashedToken' }
249
+ /**
250
+ * Common OAuth scopes/abilities.
251
+ * Use these predefined scopes or define custom ones.
252
+ */
253
+ export type CommonScope = | '*' // Wildcard - all permissions
254
+ | 'read'
255
+ | 'write'
256
+ | 'delete'
257
+ | 'admin'
258
+ | 'user:read'
259
+ | 'user:write'
260
+ | 'posts:read'
261
+ | 'posts:write'
262
+ | 'posts:delete';
263
+ /**
264
+ * Token scope - can be common scopes or custom string scopes.
265
+ */
266
+ export type TokenScope = CommonScope | (string & {});
267
+ /**
268
+ * Array of token scopes/abilities.
269
+ */
270
+ export type TokenScopes = TokenScope[];
271
+ /**
272
+ * OAuth client types for different authentication flows.
273
+ */
274
+ export type OAuthClientType = 'personal_access' | 'password' | 'authorization_code' | 'client_credentials';
275
+ /**
276
+ * Supported database drivers for OAuth tables.
277
+ */
278
+ export type DatabaseDriver = 'postgres' | 'mysql' | 'sqlite';
279
+ /**
280
+ * Make specific properties of a type optional.
281
+ */
282
+ export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
283
+ /**
284
+ * Make specific properties of a type required.
285
+ */
286
+ export type RequiredBy<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
287
+ /**
288
+ * Extract the user type from a generic context.
289
+ */
290
+ export type ExtractUser<T> = T extends { user: infer U } ? U : never;
@@ -0,0 +1,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
+ }
@@ -0,0 +1,322 @@
1
+ import type Stripe from 'stripe';
2
+ // =============================================================================
3
+ // Configuration Types
4
+ // =============================================================================
5
+ export declare interface PaymentOptions {
6
+ driver: 'stripe'
7
+ stripe: StripeConfig
8
+ currency?: string
9
+ webhook?: WebhookConfig
10
+ }
11
+ export declare interface StripeConfig {
12
+ publishableKey: string
13
+ secretKey: string
14
+ apiVersion?: string
15
+ webhookSecret?: string
16
+ }
17
+ export declare interface WebhookConfig {
18
+ secret: string
19
+ tolerance?: number
20
+ }
21
+ // =============================================================================
22
+ // Customer Types
23
+ // =============================================================================
24
+ export declare interface StripeCustomerOptions {
25
+ address?: {
26
+ line1?: string
27
+ line2?: string
28
+ city?: string
29
+ state?: string
30
+ postal_code?: string
31
+ country?: string
32
+ }
33
+ name?: string
34
+ phone?: string
35
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>
36
+ email?: string
37
+ preferred_locales?: string[]
38
+ }
39
+ export declare interface CustomerOptions {
40
+ description?: string
41
+ address?: string
42
+ email?: string
43
+ metadata?: Record<string, string>
44
+ name?: string
45
+ payment_method?: string
46
+ shipping?: ShippingInfo
47
+ listOptions?: {
48
+ created?: Record<string, unknown>
49
+ ending_before?: string
50
+ limit?: number
51
+ starting_after?: string
52
+ test_clock?: string
53
+ }
54
+ searchOptions?: {
55
+ query?: string
56
+ limit?: number
57
+ page?: number
58
+ }
59
+ }
60
+ export declare interface ShippingInfo {
61
+ address: {
62
+ line1: string
63
+ line2?: string
64
+ city?: string
65
+ state?: string
66
+ postal_code?: string
67
+ country?: string
68
+ }
69
+ name: string
70
+ phone?: string
71
+ }
72
+ // =============================================================================
73
+ // Charge Types
74
+ // =============================================================================
75
+ export declare interface ChargeOptions {
76
+ currency?: string
77
+ source?: string
78
+ description?: string
79
+ chargeId?: string
80
+ limit?: number
81
+ metadata?: Record<string, string>
82
+ searchOptions?: {
83
+ query?: string
84
+ limit?: number
85
+ }
86
+ }
87
+ export declare interface ChargeResult {
88
+ id: string
89
+ amount: number
90
+ currency: string
91
+ status: 'succeeded' | 'pending' | 'failed'
92
+ paymentMethod?: string
93
+ receiptUrl?: string
94
+ refunded: boolean
95
+ refundedAmount?: number
96
+ }
97
+ // =============================================================================
98
+ // Checkout Types
99
+ // =============================================================================
100
+ export declare interface CheckoutLineItem {
101
+ priceId: string
102
+ quantity: number
103
+ }
104
+ export declare interface CheckoutOptions extends Partial<Stripe.Checkout.SessionCreateParams> {
105
+ enableTax?: boolean
106
+ allowPromotions?: boolean
107
+ }
108
+ export declare interface CheckoutSessionResult {
109
+ id: string
110
+ url: string | null
111
+ status: string
112
+ customerId?: string
113
+ subscriptionId?: string
114
+ paymentIntentId?: string
115
+ }
116
+ // =============================================================================
117
+ // Subscription Types
118
+ // =============================================================================
119
+ export declare interface SubscriptionOptions {
120
+ type: string
121
+ lookupKey: string
122
+ trialDays?: number
123
+ coupon?: string
124
+ metadata?: Record<string, string>
125
+ }
126
+ export declare interface SubscriptionResult {
127
+ id: string
128
+ status: SubscriptionStatus
129
+ currentPeriodEnd: Date
130
+ cancelAtPeriodEnd: boolean
131
+ items: SubscriptionItem[]
132
+ latestInvoiceId?: string
133
+ }
134
+ export declare interface SubscriptionItem {
135
+ id: string
136
+ priceId: string
137
+ productId: string
138
+ quantity: number
139
+ }
140
+ // =============================================================================
141
+ // Invoice Types
142
+ // =============================================================================
143
+ export declare interface InvoiceResult {
144
+ id: string
145
+ number: string | null
146
+ status: InvoiceStatus
147
+ amountDue: number
148
+ amountPaid: number
149
+ currency: string
150
+ dueDate: Date | null
151
+ paidAt: Date | null
152
+ hostedInvoiceUrl: string | null
153
+ pdfUrl: string | null
154
+ }
155
+ // =============================================================================
156
+ // Payment Method Types
157
+ // =============================================================================
158
+ export declare interface PaymentMethodResult {
159
+ id: string
160
+ type: PaymentMethodType
161
+ card?: CardDetails
162
+ isDefault: boolean
163
+ }
164
+ export declare interface CardDetails {
165
+ brand: string
166
+ last4: string
167
+ expMonth: number
168
+ expYear: number
169
+ funding: 'credit' | 'debit' | 'prepaid' | 'unknown'
170
+ }
171
+ // =============================================================================
172
+ // Product & Price Types
173
+ // =============================================================================
174
+ export declare interface ProductOptions {
175
+ name: string
176
+ description?: string
177
+ images?: string[]
178
+ metadata?: Record<string, string>
179
+ active?: boolean
180
+ }
181
+ export declare interface PriceOptions {
182
+ productId: string
183
+ unitAmount: number
184
+ currency?: string
185
+ recurring?: {
186
+ interval: 'day' | 'week' | 'month' | 'year'
187
+ intervalCount?: number
188
+ }
189
+ lookupKey?: string
190
+ metadata?: Record<string, string>
191
+ }
192
+ // =============================================================================
193
+ // Coupon Types
194
+ // =============================================================================
195
+ export declare interface CouponOptions {
196
+ id?: string
197
+ name?: string
198
+ percentOff?: number
199
+ amountOff?: number
200
+ currency?: string
201
+ duration: 'forever' | 'once' | 'repeating'
202
+ durationInMonths?: number
203
+ maxRedemptions?: number
204
+ redeemBy?: Date
205
+ }
206
+ export declare interface PromotionCodeOptions {
207
+ couponId: string
208
+ code: string
209
+ maxRedemptions?: number
210
+ expiresAt?: Date
211
+ firstTimeTransaction?: boolean
212
+ minimumAmount?: number
213
+ minimumAmountCurrency?: string
214
+ }
215
+ export declare interface WebhookEvent<T = unknown> {
216
+ id: string
217
+ type: WebhookEventType
218
+ data: {
219
+ object: T
220
+ previousAttributes?: Partial<T>
221
+ }
222
+ created: number
223
+ livemode: boolean
224
+ }
225
+ export declare interface WebhookHandlerResult {
226
+ handled: boolean
227
+ eventType: string
228
+ error?: string
229
+ }
230
+ // =============================================================================
231
+ // Dispute Types
232
+ // =============================================================================
233
+ export declare interface DisputeOptions {
234
+ dp_id?: string
235
+ metadata?: Record<string, string>
236
+ listOptions?: {
237
+ charge?: string
238
+ payment_intent?: string
239
+ created?: string
240
+ ending_before?: string
241
+ limit?: number
242
+ starting_after?: string
243
+ }
244
+ }
245
+ // =============================================================================
246
+ // Event Types
247
+ // =============================================================================
248
+ export declare interface EventOptions {
249
+ event_id?: string
250
+ listOptions?: {
251
+ created?: Record<string, unknown>
252
+ delivery_success?: boolean
253
+ ending_before?: string
254
+ limit?: number
255
+ starting_after?: string
256
+ type?: string
257
+ }
258
+ }
259
+ // =============================================================================
260
+ // Utility Types
261
+ // =============================================================================
262
+ export declare interface PaginatedResult<T> {
263
+ data: T[]
264
+ hasMore: boolean
265
+ totalCount?: number
266
+ }
267
+ export declare interface AmountBreakdown {
268
+ subtotal: number
269
+ tax: number
270
+ discount: number
271
+ total: number
272
+ currency: string
273
+ }
274
+ export type PaymentConfig = Partial<PaymentOptions>;
275
+ export type SubscriptionStatus = | 'active'
276
+ | 'canceled'
277
+ | 'incomplete'
278
+ | 'incomplete_expired'
279
+ | 'past_due'
280
+ | 'paused'
281
+ | 'trialing'
282
+ | 'unpaid';
283
+ export type InvoiceStatus = | 'draft'
284
+ | 'open'
285
+ | 'paid'
286
+ | 'uncollectible'
287
+ | 'void';
288
+ export type PaymentMethodType = | 'card'
289
+ | 'bank_account'
290
+ | 'sepa_debit'
291
+ | 'ideal'
292
+ | 'sofort'
293
+ | 'giropay';
294
+ // =============================================================================
295
+ // Webhook Types
296
+ // =============================================================================
297
+ export type WebhookEventType = | 'payment_intent.succeeded'
298
+ | 'payment_intent.payment_failed'
299
+ | 'payment_intent.created'
300
+ | 'payment_intent.canceled'
301
+ | 'customer.subscription.created'
302
+ | 'customer.subscription.updated'
303
+ | 'customer.subscription.deleted'
304
+ | 'customer.subscription.trial_will_end'
305
+ | 'customer.created'
306
+ | 'customer.updated'
307
+ | 'customer.deleted'
308
+ | 'invoice.paid'
309
+ | 'invoice.payment_failed'
310
+ | 'invoice.finalized'
311
+ | 'invoice.created'
312
+ | 'checkout.session.completed'
313
+ | 'checkout.session.expired'
314
+ | 'charge.succeeded'
315
+ | 'charge.failed'
316
+ | 'charge.refunded'
317
+ | 'charge.dispute.created'
318
+ | 'charge.dispute.closed'
319
+ | 'payment_method.attached'
320
+ | 'payment_method.detached'
321
+ | 'setup_intent.succeeded'
322
+ | 'setup_intent.setup_failed';
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Phone/Voice Service Configuration Types
3
+ * Powered by Amazon Connect
4
+ */
5
+ export declare interface PhoneNumberConfig {
6
+ type: 'TOLL_FREE' | 'DID' | 'UIFN'
7
+ countryCode: string
8
+ description?: string
9
+ contactFlowId?: string
10
+ notifyOnCall?: string[]
11
+ }
12
+ export declare interface PhoneNotificationConfig {
13
+ enabled: boolean
14
+ channels: ('email' | 'sms' | 'slack' | 'webhook')[]
15
+ webhookUrl?: string
16
+ slackChannel?: string
17
+ }
18
+ export declare interface BusinessHoursSchedule {
19
+ day: 'SUNDAY' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY'
20
+ start: string
21
+ end: string
22
+ }
23
+ export declare interface BusinessHoursConfig {
24
+ timezone: string
25
+ schedule: BusinessHoursSchedule[]
26
+ }
27
+ export declare interface VoicemailConfig {
28
+ enabled: boolean
29
+ transcription: boolean
30
+ maxDurationSeconds: number
31
+ greeting?: string
32
+ }
33
+ export declare interface PhoneInstanceConfig {
34
+ alias: string
35
+ inboundCallsEnabled: boolean
36
+ outboundCallsEnabled: boolean
37
+ }
38
+ export declare interface PhoneNotificationsConfig {
39
+ incomingCall?: PhoneNotificationConfig
40
+ missedCall?: PhoneNotificationConfig
41
+ voicemail?: PhoneNotificationConfig
42
+ }
43
+ export declare interface CallForwardingRule {
44
+ name: string
45
+ condition: CallForwardingCondition
46
+ forwardTo: string
47
+ ringTimeout: number
48
+ priority: number
49
+ }
50
+ export declare interface CallForwardingConfig {
51
+ enabled: boolean
52
+ rules: CallForwardingRule[]
53
+ }
54
+ export declare interface PhoneOptions {
55
+ enabled: boolean
56
+ provider: 'connect'
57
+ instance?: PhoneInstanceConfig
58
+ phoneNumbers: PhoneNumberConfig[]
59
+ notifications: PhoneNotificationsConfig
60
+ voicemail: VoicemailConfig
61
+ forwarding?: CallForwardingConfig
62
+ businessHours?: BusinessHoursConfig
63
+ }
64
+ export type CallForwardingCondition = 'always' | 'business_hours' | 'after_hours';
65
+ export type PhoneConfig = Partial<PhoneOptions>;
@@ -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 declare 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>;