-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi.d.ts
More file actions
483 lines (477 loc) · 13.9 KB
/
Copy pathapi.d.ts
File metadata and controls
483 lines (477 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
import type * as admin from "../admin.js";
import type * as batchGeneration from "../batchGeneration.js";
import type * as cloudflareDispatch from "../cloudflareDispatch.js";
import type * as cloudflareWorkerHttp from "../cloudflareWorkerHttp.js";
import type * as contentAnalysis from "../contentAnalysis.js";
import type * as crons from "../crons.js";
import type * as detailsMigration from "../detailsMigration.js";
import type * as favorites from "../favorites.js";
import type * as follows from "../follows.js";
import type * as generatedImages from "../generatedImages.js";
import type * as http from "../http.js";
import type * as lib_batchGenerationState from "../lib/batchGenerationState.js";
import type * as lib_cloudflareWorkerHttp from "../lib/cloudflareWorkerHttp.js";
import type * as lib_crypto from "../lib/crypto.js";
import type * as lib_dirtberryCrop from "../lib/dirtberryCrop.js";
import type * as lib_groq from "../lib/groq.js";
import type * as lib_nsfwDetection from "../lib/nsfwDetection.js";
import type * as lib_openrouter from "../lib/openrouter.js";
import type * as lib_pollinations from "../lib/pollinations.js";
import type * as lib_promptInference from "../lib/promptInference.js";
import type * as lib_providerHealth from "../lib/providerHealth.js";
import type * as lib_providerHealthFunctions from "../lib/providerHealthFunctions.js";
import type * as lib_retry from "../lib/retry.js";
import type * as lib_stripeHelpers from "../lib/stripeHelpers.js";
import type * as lib_subscription from "../lib/subscription.js";
import type * as lib_visionAnalysis from "../lib/visionAnalysis.js";
import type * as musicGenerations from "../musicGenerations.js";
import type * as orphanCleanup from "../orphanCleanup.js";
import type * as orphanCleanupQueries from "../orphanCleanupQueries.js";
import type * as promptInference from "../promptInference.js";
import type * as promptLibrary from "../promptLibrary.js";
import type * as rateLimits from "../rateLimits.js";
import type * as referenceImages from "../referenceImages.js";
import type * as secondaryAssets from "../secondaryAssets.js";
import type * as sensitivityMigration from "../sensitivityMigration.js";
import type * as singleGeneration from "../singleGeneration.js";
import type * as stripe from "../stripe.js";
import type * as system_check from "../system_check.js";
import type * as tempTagStats from "../tempTagStats.js";
import type * as troubleshoot_v2 from "../troubleshoot_v2.js";
import type * as usernameGenerator from "../usernameGenerator.js";
import type * as users from "../users.js";
import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";
declare const fullApi: ApiFromModules<{
admin: typeof admin;
batchGeneration: typeof batchGeneration;
cloudflareDispatch: typeof cloudflareDispatch;
cloudflareWorkerHttp: typeof cloudflareWorkerHttp;
contentAnalysis: typeof contentAnalysis;
crons: typeof crons;
detailsMigration: typeof detailsMigration;
favorites: typeof favorites;
follows: typeof follows;
generatedImages: typeof generatedImages;
http: typeof http;
"lib/batchGenerationState": typeof lib_batchGenerationState;
"lib/cloudflareWorkerHttp": typeof lib_cloudflareWorkerHttp;
"lib/crypto": typeof lib_crypto;
"lib/dirtberryCrop": typeof lib_dirtberryCrop;
"lib/groq": typeof lib_groq;
"lib/nsfwDetection": typeof lib_nsfwDetection;
"lib/openrouter": typeof lib_openrouter;
"lib/pollinations": typeof lib_pollinations;
"lib/promptInference": typeof lib_promptInference;
"lib/providerHealth": typeof lib_providerHealth;
"lib/providerHealthFunctions": typeof lib_providerHealthFunctions;
"lib/retry": typeof lib_retry;
"lib/stripeHelpers": typeof lib_stripeHelpers;
"lib/subscription": typeof lib_subscription;
"lib/visionAnalysis": typeof lib_visionAnalysis;
musicGenerations: typeof musicGenerations;
orphanCleanup: typeof orphanCleanup;
orphanCleanupQueries: typeof orphanCleanupQueries;
promptInference: typeof promptInference;
promptLibrary: typeof promptLibrary;
rateLimits: typeof rateLimits;
referenceImages: typeof referenceImages;
secondaryAssets: typeof secondaryAssets;
sensitivityMigration: typeof sensitivityMigration;
singleGeneration: typeof singleGeneration;
stripe: typeof stripe;
system_check: typeof system_check;
tempTagStats: typeof tempTagStats;
troubleshoot_v2: typeof troubleshoot_v2;
usernameGenerator: typeof usernameGenerator;
users: typeof users;
}>;
/**
* A utility for referencing Convex functions in your app's public API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
export declare const api: FilterApi<
typeof fullApi,
FunctionReference<any, "public">
>;
/**
* A utility for referencing Convex functions in your app's internal API.
*
* Usage:
* ```js
* const myFunctionReference = internal.myModule.myFunction;
* ```
*/
export declare const internal: FilterApi<
typeof fullApi,
FunctionReference<any, "internal">
>;
export declare const components: {
stripe: {
private: {
handleCheckoutSessionCompleted: FunctionReference<
"mutation",
"internal",
{
metadata?: any;
mode: string;
stripeCheckoutSessionId: string;
stripeCustomerId?: string;
},
null
>;
handleCustomerCreated: FunctionReference<
"mutation",
"internal",
{
email?: string;
metadata?: any;
name?: string;
stripeCustomerId: string;
},
null
>;
handleCustomerUpdated: FunctionReference<
"mutation",
"internal",
{
email?: string;
metadata?: any;
name?: string;
stripeCustomerId: string;
},
null
>;
handleInvoiceCreated: FunctionReference<
"mutation",
"internal",
{
amountDue: number;
amountPaid: number;
created: number;
status: string;
stripeCustomerId: string;
stripeInvoiceId: string;
stripeSubscriptionId?: string;
},
null
>;
handleInvoicePaid: FunctionReference<
"mutation",
"internal",
{ amountPaid: number; stripeInvoiceId: string },
null
>;
handleInvoicePaymentFailed: FunctionReference<
"mutation",
"internal",
{ stripeInvoiceId: string },
null
>;
handlePaymentIntentSucceeded: FunctionReference<
"mutation",
"internal",
{
amount: number;
created: number;
currency: string;
metadata?: any;
status: string;
stripeCustomerId?: string;
stripePaymentIntentId: string;
},
null
>;
handleSubscriptionCreated: FunctionReference<
"mutation",
"internal",
{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
priceId: string;
quantity?: number;
status: string;
stripeCustomerId: string;
stripeSubscriptionId: string;
},
null
>;
handleSubscriptionDeleted: FunctionReference<
"mutation",
"internal",
{ stripeSubscriptionId: string },
null
>;
handleSubscriptionUpdated: FunctionReference<
"mutation",
"internal",
{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
priceId?: string;
quantity?: number;
status: string;
stripeSubscriptionId: string;
},
null
>;
updatePaymentCustomer: FunctionReference<
"mutation",
"internal",
{ stripeCustomerId: string; stripePaymentIntentId: string },
null
>;
updateSubscriptionQuantityInternal: FunctionReference<
"mutation",
"internal",
{ quantity: number; stripeSubscriptionId: string },
null
>;
};
public: {
createOrUpdateCustomer: FunctionReference<
"mutation",
"internal",
{
email?: string;
metadata?: any;
name?: string;
stripeCustomerId: string;
},
string
>;
getCustomer: FunctionReference<
"query",
"internal",
{ stripeCustomerId: string },
{
email?: string;
metadata?: any;
name?: string;
stripeCustomerId: string;
} | null
>;
getPayment: FunctionReference<
"query",
"internal",
{ stripePaymentIntentId: string },
{
amount: number;
created: number;
currency: string;
metadata?: any;
orgId?: string;
status: string;
stripeCustomerId?: string;
stripePaymentIntentId: string;
userId?: string;
} | null
>;
getSubscription: FunctionReference<
"query",
"internal",
{ stripeSubscriptionId: string },
{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
orgId?: string;
priceId: string;
quantity?: number;
status: string;
stripeCustomerId: string;
stripeSubscriptionId: string;
userId?: string;
} | null
>;
getSubscriptionByOrgId: FunctionReference<
"query",
"internal",
{ orgId: string },
{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
orgId?: string;
priceId: string;
quantity?: number;
status: string;
stripeCustomerId: string;
stripeSubscriptionId: string;
userId?: string;
} | null
>;
listInvoices: FunctionReference<
"query",
"internal",
{ stripeCustomerId: string },
Array<{
amountDue: number;
amountPaid: number;
created: number;
orgId?: string;
status: string;
stripeCustomerId: string;
stripeInvoiceId: string;
stripeSubscriptionId?: string;
userId?: string;
}>
>;
listInvoicesByOrgId: FunctionReference<
"query",
"internal",
{ orgId: string },
Array<{
amountDue: number;
amountPaid: number;
created: number;
orgId?: string;
status: string;
stripeCustomerId: string;
stripeInvoiceId: string;
stripeSubscriptionId?: string;
userId?: string;
}>
>;
listInvoicesByUserId: FunctionReference<
"query",
"internal",
{ userId: string },
Array<{
amountDue: number;
amountPaid: number;
created: number;
orgId?: string;
status: string;
stripeCustomerId: string;
stripeInvoiceId: string;
stripeSubscriptionId?: string;
userId?: string;
}>
>;
listPayments: FunctionReference<
"query",
"internal",
{ stripeCustomerId: string },
Array<{
amount: number;
created: number;
currency: string;
metadata?: any;
orgId?: string;
status: string;
stripeCustomerId?: string;
stripePaymentIntentId: string;
userId?: string;
}>
>;
listPaymentsByOrgId: FunctionReference<
"query",
"internal",
{ orgId: string },
Array<{
amount: number;
created: number;
currency: string;
metadata?: any;
orgId?: string;
status: string;
stripeCustomerId?: string;
stripePaymentIntentId: string;
userId?: string;
}>
>;
listPaymentsByUserId: FunctionReference<
"query",
"internal",
{ userId: string },
Array<{
amount: number;
created: number;
currency: string;
metadata?: any;
orgId?: string;
status: string;
stripeCustomerId?: string;
stripePaymentIntentId: string;
userId?: string;
}>
>;
listSubscriptions: FunctionReference<
"query",
"internal",
{ stripeCustomerId: string },
Array<{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
orgId?: string;
priceId: string;
quantity?: number;
status: string;
stripeCustomerId: string;
stripeSubscriptionId: string;
userId?: string;
}>
>;
listSubscriptionsByUserId: FunctionReference<
"query",
"internal",
{ userId: string },
Array<{
cancelAt?: number;
cancelAtPeriodEnd: boolean;
currentPeriodEnd: number;
metadata?: any;
orgId?: string;
priceId: string;
quantity?: number;
status: string;
stripeCustomerId: string;
stripeSubscriptionId: string;
userId?: string;
}>
>;
updateSubscriptionMetadata: FunctionReference<
"mutation",
"internal",
{
metadata: any;
orgId?: string;
stripeSubscriptionId: string;
userId?: string;
},
null
>;
updateSubscriptionQuantity: FunctionReference<
"action",
"internal",
{ apiKey: string; quantity: number; stripeSubscriptionId: string },
null
>;
};
};
};