@stacksjs/types 0.70.86 → 0.70.87
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/package.json +19 -5
- package/src/ai.ts +0 -41
- package/src/analytics.ts +0 -58
- package/src/api.ts +0 -77
- package/src/app.ts +0 -189
- package/src/attributes.ts +0 -5
- package/src/auth.ts +0 -161
- package/src/auto-imports.ts +0 -8
- package/src/binary.ts +0 -13
- package/src/cache.ts +0 -325
- package/src/cdn.ts +0 -17
- package/src/chat.ts +0 -193
- package/src/cli.ts +0 -445
- package/src/cloud.ts +0 -381
- package/src/cms.ts +0 -14
- package/src/commerce.ts +0 -18
- package/src/components.ts +0 -62
- package/src/configure.ts +0 -13
- package/src/cors.ts +0 -86
- package/src/cron-jobs.ts +0 -146
- package/src/dashboard.ts +0 -218
- package/src/database.ts +0 -117
- package/src/dependencies.ts +0 -69
- package/src/deploy.ts +0 -17
- package/src/dns.ts +0 -470
- package/src/docs.ts +0 -27
- package/src/email.ts +0 -511
- package/src/env.ts +0 -1
- package/src/errors.ts +0 -110
- package/src/events.ts +0 -37
- package/src/exit-code.ts +0 -10
- package/src/file-systems.ts +0 -70
- package/src/git.ts +0 -133
- package/src/hashing.ts +0 -127
- package/src/helpers.ts +0 -9
- package/src/i18n.ts +0 -121
- package/src/index.ts +0 -80
- package/src/library.ts +0 -911
- package/src/logging.ts +0 -62
- package/src/manifest.ts +0 -9
- package/src/marketing.ts +0 -14
- package/src/model-dashboard-augmentation.ts +0 -51
- package/src/model-names.ts +0 -1
- package/src/model.ts +0 -353
- package/src/monitoring.ts +0 -14
- package/src/native.ts +0 -0
- package/src/notifications.ts +0 -153
- package/src/oauth.ts +0 -488
- package/src/pages.ts +0 -10
- package/src/payments.ts +0 -440
- package/src/phone.ts +0 -78
- package/src/ports.ts +0 -20
- package/src/promise.ts +0 -1
- package/src/push.ts +0 -143
- package/src/queue.ts +0 -413
- package/src/reactivity.ts +0 -1
- package/src/realtime.ts +0 -584
- package/src/request.ts +0 -541
- package/src/response.ts +0 -16
- package/src/router.ts +0 -124
- package/src/saas.ts +0 -33
- package/src/scheduler.ts +0 -1
- package/src/search-engine.ts +0 -251
- package/src/security.ts +0 -23
- package/src/server.ts +0 -16
- package/src/services.ts +0 -211
- package/src/settings-config.ts +0 -10
- package/src/sms.ts +0 -265
- package/src/stack-extensions.ts +0 -184
- package/src/stacks.ts +0 -339
- package/src/storage.ts +0 -173
- package/src/table-names.ts +0 -1
- package/src/tables.ts +0 -57
- package/src/team.ts +0 -8
- package/src/ui.ts +0 -197
- package/src/utils.ts +0 -46
package/src/payments.ts
DELETED
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Payment Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for the payments module.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type Stripe from 'stripe'
|
|
8
|
-
|
|
9
|
-
// =============================================================================
|
|
10
|
-
// Configuration Types
|
|
11
|
-
// =============================================================================
|
|
12
|
-
|
|
13
|
-
export interface PaymentOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Payment provider
|
|
16
|
-
*/
|
|
17
|
-
driver: 'stripe'
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Stripe configuration
|
|
21
|
-
*/
|
|
22
|
-
stripe: StripeConfig
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Default currency (ISO 4217 code)
|
|
26
|
-
*/
|
|
27
|
-
currency?: string
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Webhook configuration
|
|
31
|
-
*/
|
|
32
|
-
webhook?: WebhookConfig
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface StripeConfig {
|
|
36
|
-
/**
|
|
37
|
-
* Stripe publishable key (client-side)
|
|
38
|
-
*/
|
|
39
|
-
publishableKey: string
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Stripe secret key (server-side)
|
|
43
|
-
*/
|
|
44
|
-
secretKey: string
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Stripe API version
|
|
48
|
-
*/
|
|
49
|
-
apiVersion?: string
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Webhook signing secret
|
|
53
|
-
*/
|
|
54
|
-
webhookSecret?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface WebhookConfig {
|
|
58
|
-
/**
|
|
59
|
-
* Webhook endpoint secret
|
|
60
|
-
*/
|
|
61
|
-
secret: string
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Tolerance in seconds for webhook timestamp verification
|
|
65
|
-
*/
|
|
66
|
-
tolerance?: number
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type PaymentConfig = Partial<PaymentOptions>
|
|
70
|
-
|
|
71
|
-
// =============================================================================
|
|
72
|
-
// Customer Types
|
|
73
|
-
// =============================================================================
|
|
74
|
-
|
|
75
|
-
export interface StripeCustomerOptions {
|
|
76
|
-
address?: {
|
|
77
|
-
line1?: string
|
|
78
|
-
line2?: string
|
|
79
|
-
city?: string
|
|
80
|
-
state?: string
|
|
81
|
-
postal_code?: string
|
|
82
|
-
country?: string
|
|
83
|
-
}
|
|
84
|
-
name?: string
|
|
85
|
-
phone?: string
|
|
86
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>
|
|
87
|
-
email?: string
|
|
88
|
-
preferred_locales?: string[]
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface CustomerOptions {
|
|
92
|
-
description?: string
|
|
93
|
-
address?: string
|
|
94
|
-
email?: string
|
|
95
|
-
metadata?: Record<string, string>
|
|
96
|
-
name?: string
|
|
97
|
-
payment_method?: string
|
|
98
|
-
shipping?: ShippingInfo
|
|
99
|
-
listOptions?: {
|
|
100
|
-
created?: Record<string, unknown>
|
|
101
|
-
ending_before?: string
|
|
102
|
-
limit?: number
|
|
103
|
-
starting_after?: string
|
|
104
|
-
test_clock?: string
|
|
105
|
-
}
|
|
106
|
-
searchOptions?: {
|
|
107
|
-
query?: string
|
|
108
|
-
limit?: number
|
|
109
|
-
page?: number
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface ShippingInfo {
|
|
114
|
-
address: {
|
|
115
|
-
line1: string
|
|
116
|
-
line2?: string
|
|
117
|
-
city?: string
|
|
118
|
-
state?: string
|
|
119
|
-
postal_code?: string
|
|
120
|
-
country?: string
|
|
121
|
-
}
|
|
122
|
-
name: string
|
|
123
|
-
phone?: string
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// =============================================================================
|
|
127
|
-
// Charge Types
|
|
128
|
-
// =============================================================================
|
|
129
|
-
|
|
130
|
-
export interface ChargeOptions {
|
|
131
|
-
currency?: string
|
|
132
|
-
source?: string
|
|
133
|
-
description?: string
|
|
134
|
-
chargeId?: string
|
|
135
|
-
limit?: number
|
|
136
|
-
metadata?: Record<string, string>
|
|
137
|
-
searchOptions?: {
|
|
138
|
-
query?: string
|
|
139
|
-
limit?: number
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface ChargeResult {
|
|
144
|
-
id: string
|
|
145
|
-
amount: number
|
|
146
|
-
currency: string
|
|
147
|
-
status: 'succeeded' | 'pending' | 'failed'
|
|
148
|
-
paymentMethod?: string
|
|
149
|
-
receiptUrl?: string
|
|
150
|
-
refunded: boolean
|
|
151
|
-
refundedAmount?: number
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// =============================================================================
|
|
155
|
-
// Checkout Types
|
|
156
|
-
// =============================================================================
|
|
157
|
-
|
|
158
|
-
export interface CheckoutLineItem {
|
|
159
|
-
priceId: string
|
|
160
|
-
quantity: number
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface CheckoutOptions extends Partial<Stripe.Checkout.SessionCreateParams> {
|
|
164
|
-
/**
|
|
165
|
-
* Enable automatic tax calculation
|
|
166
|
-
*/
|
|
167
|
-
enableTax?: boolean
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Allow promotion codes
|
|
171
|
-
*/
|
|
172
|
-
allowPromotions?: boolean
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface CheckoutSessionResult {
|
|
176
|
-
id: string
|
|
177
|
-
url: string | null
|
|
178
|
-
status: string
|
|
179
|
-
customerId?: string
|
|
180
|
-
subscriptionId?: string
|
|
181
|
-
paymentIntentId?: string
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// =============================================================================
|
|
185
|
-
// Subscription Types
|
|
186
|
-
// =============================================================================
|
|
187
|
-
|
|
188
|
-
export interface SubscriptionOptions {
|
|
189
|
-
/**
|
|
190
|
-
* Subscription type/name
|
|
191
|
-
*/
|
|
192
|
-
type: string
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Price lookup key
|
|
196
|
-
*/
|
|
197
|
-
lookupKey: string
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Trial period in days
|
|
201
|
-
*/
|
|
202
|
-
trialDays?: number
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Coupon or promotion code
|
|
206
|
-
*/
|
|
207
|
-
coupon?: string
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Additional metadata
|
|
211
|
-
*/
|
|
212
|
-
metadata?: Record<string, string>
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export interface SubscriptionResult {
|
|
216
|
-
id: string
|
|
217
|
-
status: SubscriptionStatus
|
|
218
|
-
currentPeriodEnd: Date
|
|
219
|
-
cancelAtPeriodEnd: boolean
|
|
220
|
-
items: SubscriptionItem[]
|
|
221
|
-
latestInvoiceId?: string
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export type SubscriptionStatus =
|
|
225
|
-
| 'active'
|
|
226
|
-
| 'canceled'
|
|
227
|
-
| 'incomplete'
|
|
228
|
-
| 'incomplete_expired'
|
|
229
|
-
| 'past_due'
|
|
230
|
-
| 'paused'
|
|
231
|
-
| 'trialing'
|
|
232
|
-
| 'unpaid'
|
|
233
|
-
|
|
234
|
-
export interface SubscriptionItem {
|
|
235
|
-
id: string
|
|
236
|
-
priceId: string
|
|
237
|
-
productId: string
|
|
238
|
-
quantity: number
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// =============================================================================
|
|
242
|
-
// Invoice Types
|
|
243
|
-
// =============================================================================
|
|
244
|
-
|
|
245
|
-
export interface InvoiceResult {
|
|
246
|
-
id: string
|
|
247
|
-
number: string | null
|
|
248
|
-
status: InvoiceStatus
|
|
249
|
-
amountDue: number
|
|
250
|
-
amountPaid: number
|
|
251
|
-
currency: string
|
|
252
|
-
dueDate: Date | null
|
|
253
|
-
paidAt: Date | null
|
|
254
|
-
hostedInvoiceUrl: string | null
|
|
255
|
-
pdfUrl: string | null
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export type InvoiceStatus =
|
|
259
|
-
| 'draft'
|
|
260
|
-
| 'open'
|
|
261
|
-
| 'paid'
|
|
262
|
-
| 'uncollectible'
|
|
263
|
-
| 'void'
|
|
264
|
-
|
|
265
|
-
// =============================================================================
|
|
266
|
-
// Payment Method Types
|
|
267
|
-
// =============================================================================
|
|
268
|
-
|
|
269
|
-
export interface PaymentMethodResult {
|
|
270
|
-
id: string
|
|
271
|
-
type: PaymentMethodType
|
|
272
|
-
card?: CardDetails
|
|
273
|
-
isDefault: boolean
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export type PaymentMethodType =
|
|
277
|
-
| 'card'
|
|
278
|
-
| 'bank_account'
|
|
279
|
-
| 'sepa_debit'
|
|
280
|
-
| 'ideal'
|
|
281
|
-
| 'sofort'
|
|
282
|
-
| 'giropay'
|
|
283
|
-
|
|
284
|
-
export interface CardDetails {
|
|
285
|
-
brand: string
|
|
286
|
-
last4: string
|
|
287
|
-
expMonth: number
|
|
288
|
-
expYear: number
|
|
289
|
-
funding: 'credit' | 'debit' | 'prepaid' | 'unknown'
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// =============================================================================
|
|
293
|
-
// Product & Price Types
|
|
294
|
-
// =============================================================================
|
|
295
|
-
|
|
296
|
-
export interface ProductOptions {
|
|
297
|
-
name: string
|
|
298
|
-
description?: string
|
|
299
|
-
images?: string[]
|
|
300
|
-
metadata?: Record<string, string>
|
|
301
|
-
active?: boolean
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export interface PriceOptions {
|
|
305
|
-
productId: string
|
|
306
|
-
unitAmount: number
|
|
307
|
-
currency?: string
|
|
308
|
-
recurring?: {
|
|
309
|
-
interval: 'day' | 'week' | 'month' | 'year'
|
|
310
|
-
intervalCount?: number
|
|
311
|
-
}
|
|
312
|
-
lookupKey?: string
|
|
313
|
-
metadata?: Record<string, string>
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// =============================================================================
|
|
317
|
-
// Coupon Types
|
|
318
|
-
// =============================================================================
|
|
319
|
-
|
|
320
|
-
export interface CouponOptions {
|
|
321
|
-
id?: string
|
|
322
|
-
name?: string
|
|
323
|
-
percentOff?: number
|
|
324
|
-
amountOff?: number
|
|
325
|
-
currency?: string
|
|
326
|
-
duration: 'forever' | 'once' | 'repeating'
|
|
327
|
-
durationInMonths?: number
|
|
328
|
-
maxRedemptions?: number
|
|
329
|
-
redeemBy?: Date
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export interface PromotionCodeOptions {
|
|
333
|
-
couponId: string
|
|
334
|
-
code: string
|
|
335
|
-
maxRedemptions?: number
|
|
336
|
-
expiresAt?: Date
|
|
337
|
-
firstTimeTransaction?: boolean
|
|
338
|
-
minimumAmount?: number
|
|
339
|
-
minimumAmountCurrency?: string
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// =============================================================================
|
|
343
|
-
// Webhook Types
|
|
344
|
-
// =============================================================================
|
|
345
|
-
|
|
346
|
-
export type WebhookEventType =
|
|
347
|
-
| 'payment_intent.succeeded'
|
|
348
|
-
| 'payment_intent.payment_failed'
|
|
349
|
-
| 'payment_intent.created'
|
|
350
|
-
| 'payment_intent.canceled'
|
|
351
|
-
| 'customer.subscription.created'
|
|
352
|
-
| 'customer.subscription.updated'
|
|
353
|
-
| 'customer.subscription.deleted'
|
|
354
|
-
| 'customer.subscription.trial_will_end'
|
|
355
|
-
| 'customer.created'
|
|
356
|
-
| 'customer.updated'
|
|
357
|
-
| 'customer.deleted'
|
|
358
|
-
| 'invoice.paid'
|
|
359
|
-
| 'invoice.payment_failed'
|
|
360
|
-
| 'invoice.finalized'
|
|
361
|
-
| 'invoice.created'
|
|
362
|
-
| 'checkout.session.completed'
|
|
363
|
-
| 'checkout.session.expired'
|
|
364
|
-
| 'charge.succeeded'
|
|
365
|
-
| 'charge.failed'
|
|
366
|
-
| 'charge.refunded'
|
|
367
|
-
| 'charge.dispute.created'
|
|
368
|
-
| 'charge.dispute.closed'
|
|
369
|
-
| 'payment_method.attached'
|
|
370
|
-
| 'payment_method.detached'
|
|
371
|
-
| 'setup_intent.succeeded'
|
|
372
|
-
| 'setup_intent.setup_failed'
|
|
373
|
-
|
|
374
|
-
export interface WebhookEvent<T = unknown> {
|
|
375
|
-
id: string
|
|
376
|
-
type: WebhookEventType
|
|
377
|
-
data: {
|
|
378
|
-
object: T
|
|
379
|
-
previousAttributes?: Partial<T>
|
|
380
|
-
}
|
|
381
|
-
created: number
|
|
382
|
-
livemode: boolean
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export interface WebhookHandlerResult {
|
|
386
|
-
handled: boolean
|
|
387
|
-
eventType: string
|
|
388
|
-
error?: string
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// =============================================================================
|
|
392
|
-
// Dispute Types
|
|
393
|
-
// =============================================================================
|
|
394
|
-
|
|
395
|
-
export interface DisputeOptions {
|
|
396
|
-
dp_id?: string
|
|
397
|
-
metadata?: Record<string, string>
|
|
398
|
-
listOptions?: {
|
|
399
|
-
charge?: string
|
|
400
|
-
payment_intent?: string
|
|
401
|
-
created?: string
|
|
402
|
-
ending_before?: string
|
|
403
|
-
limit?: number
|
|
404
|
-
starting_after?: string
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
// =============================================================================
|
|
409
|
-
// Event Types
|
|
410
|
-
// =============================================================================
|
|
411
|
-
|
|
412
|
-
export interface EventOptions {
|
|
413
|
-
event_id?: string
|
|
414
|
-
listOptions?: {
|
|
415
|
-
created?: Record<string, unknown>
|
|
416
|
-
delivery_success?: boolean
|
|
417
|
-
ending_before?: string
|
|
418
|
-
limit?: number
|
|
419
|
-
starting_after?: string
|
|
420
|
-
type?: string
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// =============================================================================
|
|
425
|
-
// Utility Types
|
|
426
|
-
// =============================================================================
|
|
427
|
-
|
|
428
|
-
export interface PaginatedResult<T> {
|
|
429
|
-
data: T[]
|
|
430
|
-
hasMore: boolean
|
|
431
|
-
totalCount?: number
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
export interface AmountBreakdown {
|
|
435
|
-
subtotal: number
|
|
436
|
-
tax: number
|
|
437
|
-
discount: number
|
|
438
|
-
total: number
|
|
439
|
-
currency: string
|
|
440
|
-
}
|
package/src/phone.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phone/Voice Service Configuration Types
|
|
3
|
-
* Powered by Amazon Connect
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface PhoneNumberConfig {
|
|
7
|
-
type: 'TOLL_FREE' | 'DID' | 'UIFN'
|
|
8
|
-
countryCode: string
|
|
9
|
-
description?: string
|
|
10
|
-
contactFlowId?: string
|
|
11
|
-
notifyOnCall?: string[] // team member emails/phones
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface PhoneNotificationConfig {
|
|
15
|
-
enabled: boolean
|
|
16
|
-
channels: ('email' | 'sms' | 'slack' | 'webhook')[]
|
|
17
|
-
webhookUrl?: string
|
|
18
|
-
slackChannel?: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface BusinessHoursSchedule {
|
|
22
|
-
day: 'SUNDAY' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY'
|
|
23
|
-
start: string // HH:MM format
|
|
24
|
-
end: string // HH:MM format
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface BusinessHoursConfig {
|
|
28
|
-
timezone: string
|
|
29
|
-
schedule: BusinessHoursSchedule[]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface VoicemailConfig {
|
|
33
|
-
enabled: boolean
|
|
34
|
-
transcription: boolean
|
|
35
|
-
maxDurationSeconds: number
|
|
36
|
-
greeting?: string
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface PhoneInstanceConfig {
|
|
40
|
-
alias: string
|
|
41
|
-
inboundCallsEnabled: boolean
|
|
42
|
-
outboundCallsEnabled: boolean
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface PhoneNotificationsConfig {
|
|
46
|
-
incomingCall?: PhoneNotificationConfig
|
|
47
|
-
missedCall?: PhoneNotificationConfig
|
|
48
|
-
voicemail?: PhoneNotificationConfig
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type CallForwardingCondition = 'always' | 'business_hours' | 'after_hours'
|
|
52
|
-
|
|
53
|
-
export interface CallForwardingRule {
|
|
54
|
-
name: string
|
|
55
|
-
condition: CallForwardingCondition
|
|
56
|
-
forwardTo: string
|
|
57
|
-
ringTimeout: number
|
|
58
|
-
priority: number
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface CallForwardingConfig {
|
|
62
|
-
enabled: boolean
|
|
63
|
-
rules: CallForwardingRule[]
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface PhoneOptions {
|
|
67
|
-
enabled: boolean
|
|
68
|
-
provider: 'connect' // Amazon Connect
|
|
69
|
-
|
|
70
|
-
instance?: PhoneInstanceConfig
|
|
71
|
-
phoneNumbers: PhoneNumberConfig[]
|
|
72
|
-
notifications: PhoneNotificationsConfig
|
|
73
|
-
voicemail: VoicemailConfig
|
|
74
|
-
forwarding?: CallForwardingConfig
|
|
75
|
-
businessHours?: BusinessHoursConfig
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export type PhoneConfig = Partial<PhoneOptions>
|
package/src/ports.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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 // proxies api
|
|
11
|
-
admin: number
|
|
12
|
-
library: number
|
|
13
|
-
desktop: number
|
|
14
|
-
email: number
|
|
15
|
-
docs: number
|
|
16
|
-
inspect: number
|
|
17
|
-
api: number // the bun server
|
|
18
|
-
systemTray: number
|
|
19
|
-
database: number // i.e. DynamoDB local
|
|
20
|
-
}
|
package/src/promise.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type MaybePromise<T> = T | Promise<T>
|
package/src/push.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Push Notification Configuration Types
|
|
3
|
-
* Supports APNs (Apple) and FCM (Firebase/Google)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Apple Push Notification Service (APNs) configuration
|
|
8
|
-
*/
|
|
9
|
-
export interface APNsProviderConfig {
|
|
10
|
-
/** APNs Key ID from Apple Developer Portal */
|
|
11
|
-
keyId: string
|
|
12
|
-
/** Team ID from Apple Developer Portal */
|
|
13
|
-
teamId: string
|
|
14
|
-
/** Path to the private key file (p8) or the key content */
|
|
15
|
-
privateKey: string
|
|
16
|
-
/** iOS app bundle ID (e.g., com.example.app) */
|
|
17
|
-
bundleId: string
|
|
18
|
-
/** Use production APNs server (default: false for sandbox) */
|
|
19
|
-
production?: boolean
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Firebase Cloud Messaging (FCM) configuration
|
|
24
|
-
*/
|
|
25
|
-
export interface FCMProviderConfig {
|
|
26
|
-
/** Firebase project ID */
|
|
27
|
-
projectId: string
|
|
28
|
-
/** Service account client email */
|
|
29
|
-
clientEmail: string
|
|
30
|
-
/** Service account private key (PEM format) */
|
|
31
|
-
privateKey: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Push notification provider configuration
|
|
36
|
-
*/
|
|
37
|
-
export interface PushProviderOptions {
|
|
38
|
-
/** APNs configuration (optional) */
|
|
39
|
-
apns?: APNsProviderConfig
|
|
40
|
-
/** FCM configuration (optional) */
|
|
41
|
-
fcm?: FCMProviderConfig
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Push notification options
|
|
46
|
-
*/
|
|
47
|
-
export interface PushOptions {
|
|
48
|
-
/** Enable push notifications */
|
|
49
|
-
enabled: boolean
|
|
50
|
-
/** Default provider to use */
|
|
51
|
-
defaultProvider?: 'apns' | 'fcm'
|
|
52
|
-
/** Provider configurations */
|
|
53
|
-
providers: PushProviderOptions
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Push notification configuration type
|
|
58
|
-
*/
|
|
59
|
-
export type PushConfig = Partial<PushOptions>
|
|
60
|
-
|
|
61
|
-
// Legacy types for backwards compatibility
|
|
62
|
-
export interface FCMPushNotificationOptions {
|
|
63
|
-
eventName: string
|
|
64
|
-
to: {
|
|
65
|
-
subscriberId: string
|
|
66
|
-
}
|
|
67
|
-
payload: {
|
|
68
|
-
deviceTokens: Array<string>
|
|
69
|
-
badge: boolean
|
|
70
|
-
clickAction: string
|
|
71
|
-
color: string
|
|
72
|
-
icon: string
|
|
73
|
-
sound: string
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface ExpoPushNotificationOptions {
|
|
78
|
-
eventName: string
|
|
79
|
-
to: {
|
|
80
|
-
subscriberId: string
|
|
81
|
-
}
|
|
82
|
-
payload: {
|
|
83
|
-
to: string[]
|
|
84
|
-
data: object
|
|
85
|
-
title: string
|
|
86
|
-
body: string
|
|
87
|
-
ttl: number
|
|
88
|
-
expiration: number
|
|
89
|
-
priority: 'default' | 'normal' | 'high'
|
|
90
|
-
subtitle: string
|
|
91
|
-
sound: 'default' | null
|
|
92
|
-
badge: number
|
|
93
|
-
channelId: string
|
|
94
|
-
categoryId: string
|
|
95
|
-
mutableContent: boolean
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Result from a push notification operation
|
|
101
|
-
*/
|
|
102
|
-
export interface PushResult {
|
|
103
|
-
/** Whether the operation was successful */
|
|
104
|
-
success: boolean
|
|
105
|
-
/** The provider that handled the notification */
|
|
106
|
-
provider: string
|
|
107
|
-
/** Human-readable message about the result */
|
|
108
|
-
message: string
|
|
109
|
-
/** Message ID returned from the provider */
|
|
110
|
-
messageId?: string
|
|
111
|
-
/** Additional provider-specific data */
|
|
112
|
-
data?: Record<string, any>
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Push message structure
|
|
117
|
-
*/
|
|
118
|
-
export interface PushMessage {
|
|
119
|
-
/** Device token(s) to send to */
|
|
120
|
-
to: string | string[]
|
|
121
|
-
/** Notification title */
|
|
122
|
-
title?: string
|
|
123
|
-
/** Notification body */
|
|
124
|
-
body: string
|
|
125
|
-
/** Additional data payload */
|
|
126
|
-
data?: Record<string, any>
|
|
127
|
-
/** Badge count */
|
|
128
|
-
badge?: number
|
|
129
|
-
/** Sound to play */
|
|
130
|
-
sound?: 'default' | null
|
|
131
|
-
/** Message priority */
|
|
132
|
-
priority?: 'default' | 'normal' | 'high'
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Push ticket from Expo
|
|
137
|
-
*/
|
|
138
|
-
export interface PushTicket {
|
|
139
|
-
id?: string
|
|
140
|
-
status: 'ok' | 'error'
|
|
141
|
-
message?: string
|
|
142
|
-
details?: Record<string, any>
|
|
143
|
-
}
|