wabe 0.5.6 → 0.5.8
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/dist/index.d.ts +19 -9
- package/dist/index.js +6379 -2602
- package/package.json +3 -4
- package/dist/argon2.linux-x64-gnu-mv01cvnq.node +0 -0
- package/dist/argon2.linux-x64-musl-aaw3xv61.node +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/// <reference types="react" />
|
|
4
4
|
|
|
5
|
-
import { Context, Wobe, WobeHandler, WobeResponse } from 'wobe';
|
|
5
|
+
import { Context, CorsOptions, Wobe, WobeHandler, WobeResponse } from 'wobe';
|
|
6
6
|
|
|
7
7
|
export type Scalars = {
|
|
8
8
|
ID: {
|
|
@@ -683,18 +683,18 @@ export declare const _findHooksByPriority: <T extends unknown>({ className, oper
|
|
|
683
683
|
}) => Promise<Hook<any, any>[]>;
|
|
684
684
|
export declare const initializeHook: <T extends WabeTypes, K extends keyof T["types"]>({ className, newData, context, }: {
|
|
685
685
|
className: K;
|
|
686
|
-
newData?: MutationData<DevWabeTypes, any, any
|
|
686
|
+
newData?: MutationData<DevWabeTypes, any, any>;
|
|
687
687
|
context: WabeContext<any>;
|
|
688
688
|
}) => {
|
|
689
689
|
runOnSingleObject: ({ operationType, id, object: inputObject, }: {
|
|
690
690
|
operationType: OperationType;
|
|
691
|
-
id?: string
|
|
692
|
-
object?: OutputType<DevWabeTypes, any, any
|
|
691
|
+
id?: string;
|
|
692
|
+
object?: OutputType<DevWabeTypes, any, any>;
|
|
693
693
|
}) => Promise<MutationData<T, K, any>>;
|
|
694
694
|
runOnMultipleObjects: ({ operationType, where, objects: inputObjects, }: {
|
|
695
695
|
operationType: OperationType;
|
|
696
|
-
where?: WhereType<any, any
|
|
697
|
-
objects?: OutputType<DevWabeTypes, any, any>[]
|
|
696
|
+
where?: WhereType<any, any>;
|
|
697
|
+
objects?: OutputType<DevWabeTypes, any, any>[];
|
|
698
698
|
}) => Promise<{
|
|
699
699
|
objects: never[];
|
|
700
700
|
newData: MutationData<DevWabeTypes, any, any>[];
|
|
@@ -1255,7 +1255,8 @@ declare class PaymentController implements PaymentAdapter {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
export interface WabeConfig<T extends WabeTypes> {
|
|
1257
1257
|
port: number;
|
|
1258
|
-
|
|
1258
|
+
hostname?: string;
|
|
1259
|
+
corsOptions?: CorsOptions;
|
|
1259
1260
|
schema?: SchemaInterface<T>;
|
|
1260
1261
|
database: DatabaseConfig;
|
|
1261
1262
|
codegen?: {
|
|
@@ -1289,7 +1290,7 @@ export declare class Wabe<T extends WabeTypes> {
|
|
|
1289
1290
|
server: Wobe<WobeCustomContext<T>>;
|
|
1290
1291
|
config: WabeConfig<T>;
|
|
1291
1292
|
controllers: WabeControllers<T>;
|
|
1292
|
-
constructor({ port, schema, database, authentication, rootKey, codegen, hooks, file, email, payment, routes,
|
|
1293
|
+
constructor({ port, hostname, corsOptions, schema, database, authentication, rootKey, codegen, hooks, file, email, payment, routes, }: WabeConfig<T>);
|
|
1293
1294
|
loadRoleEnum(): void;
|
|
1294
1295
|
loadAuthenticationMethods(): void;
|
|
1295
1296
|
loadHooks(): void;
|
|
@@ -1380,8 +1381,17 @@ export declare class PaymentDevAdapter implements PaymentAdapter {
|
|
|
1380
1381
|
}>;
|
|
1381
1382
|
validateWebhook(): Promise<{
|
|
1382
1383
|
isValid: boolean;
|
|
1383
|
-
payload: {
|
|
1384
|
+
payload: {
|
|
1385
|
+
type: string;
|
|
1386
|
+
};
|
|
1384
1387
|
}>;
|
|
1388
|
+
createCustomer(): Promise<string>;
|
|
1389
|
+
createPayment(): Promise<string>;
|
|
1390
|
+
cancelSubscription(): Promise<void>;
|
|
1391
|
+
getInvoices(): Promise<never[]>;
|
|
1392
|
+
getTotalRevenue(): Promise<number>;
|
|
1393
|
+
getAllTransactions(): Promise<never[]>;
|
|
1394
|
+
getHypotheticalSubscriptionRevenue(): Promise<number>;
|
|
1385
1395
|
}
|
|
1386
1396
|
|
|
1387
1397
|
export {
|