wabe 0.6.3 → 0.6.5
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/README.md +2 -1
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/interface.d.ts +9 -0
- package/dist/authentication/OTP.d.ts +8 -0
- package/dist/authentication/Session.d.ts +21 -0
- package/dist/authentication/defaultAuthentication.d.ts +3 -0
- package/dist/authentication/index.d.ts +2 -0
- package/dist/authentication/interface.d.ts +118 -0
- package/dist/authentication/oauth/GitHub.d.ts +13 -0
- package/dist/authentication/oauth/Google.d.ts +13 -0
- package/dist/authentication/oauth/Oauth2Client.d.ts +33 -0
- package/dist/authentication/oauth/index.d.ts +2 -0
- package/dist/authentication/oauth/utils.d.ts +14 -0
- package/dist/authentication/providers/EmailOTP.d.ts +11 -0
- package/dist/authentication/providers/EmailPassword.d.ts +13 -0
- package/dist/authentication/providers/GitHub.d.ts +12 -0
- package/dist/authentication/providers/Google.d.ts +12 -0
- package/dist/authentication/providers/OAuth.d.ts +6 -0
- package/dist/authentication/providers/PhonePassword.d.ts +13 -0
- package/dist/authentication/providers/index.d.ts +5 -0
- package/dist/authentication/resolvers/refreshResolver.d.ts +1 -0
- package/dist/authentication/resolvers/signInWithResolver.d.ts +1 -0
- package/dist/authentication/resolvers/signOutResolver.d.ts +1 -0
- package/dist/authentication/resolvers/signUpWithResolver.d.ts +1 -0
- package/dist/authentication/resolvers/verifyChallenge.d.ts +1 -0
- package/dist/authentication/roles.d.ts +1 -0
- package/dist/authentication/srp/processSRPChallenge.d.ts +1 -0
- package/dist/authentication/srp/signInWithSRP.d.ts +1 -0
- package/dist/authentication/srp/signUpWithSRP.d.ts +1 -0
- package/dist/authentication/utils.d.ts +8 -0
- package/dist/cron/index.d.ts +32 -0
- package/dist/database/adapters/MongoAdapter.d.ts +64 -0
- package/dist/database/adapters/adaptersInterface.d.ts +263 -0
- package/dist/database/adapters/index.d.ts +2 -0
- package/dist/database/controllers/DatabaseController.d.ts +90 -0
- package/dist/database/controllers/index.d.ts +1 -0
- package/dist/database/index.d.ts +10 -0
- package/dist/email/DevAdapter.d.ts +4 -0
- package/dist/email/EmailController.d.ts +6 -0
- package/dist/email/index.d.ts +2 -0
- package/dist/email/interface.d.ts +35 -0
- package/dist/email/templates/sendOtpCode.d.ts +1 -0
- package/dist/files/FileController.d.ts +10 -0
- package/dist/files/FileDevAdapter.d.ts +8 -0
- package/dist/files/hookDeleteFile.d.ts +1 -0
- package/dist/files/hookReadFile.d.ts +1 -0
- package/dist/files/hookUploadFile.d.ts +2 -0
- package/dist/files/index.d.ts +2 -0
- package/dist/files/interface.d.ts +30 -0
- package/dist/graphql/GraphQLSchema.d.ts +75 -0
- package/dist/graphql/index.d.ts +2 -0
- package/dist/graphql/parser.d.ts +38 -0
- package/dist/graphql/pointerAndRelationFunction.d.ts +20 -0
- package/dist/graphql/resolvers.d.ts +20 -0
- package/dist/graphql/types.d.ts +18 -0
- package/dist/hooks/HookObject.d.ts +39 -0
- package/dist/hooks/authentication.d.ts +2 -0
- package/dist/hooks/defaultFields.d.ts +3 -0
- package/dist/hooks/deleteSession.d.ts +1 -0
- package/dist/hooks/index.d.ts +41 -0
- package/dist/hooks/permissions.d.ts +6 -0
- package/dist/hooks/protected.d.ts +3 -0
- package/dist/hooks/searchableFields.d.ts +3 -0
- package/dist/hooks/session.d.ts +3 -0
- package/dist/hooks/setEmail.d.ts +2 -0
- package/dist/hooks/setupAcl.d.ts +2 -0
- package/dist/index.d.ts +11 -1459
- package/dist/index.js +486 -76812
- package/dist/payment/DevAdapter.d.ts +17 -0
- package/dist/payment/PaymentController.d.ts +19 -0
- package/dist/payment/index.d.ts +2 -0
- package/dist/payment/interface.d.ts +235 -0
- package/dist/schema/Schema.d.ts +164 -0
- package/dist/schema/defaultResolvers.d.ts +7 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/resolvers/meResolver.d.ts +1 -0
- package/dist/schema/resolvers/resetPassword.d.ts +1 -0
- package/dist/schema/resolvers/sendEmail.d.ts +1 -0
- package/dist/schema/resolvers/sendOtpCode.d.ts +1 -0
- package/dist/server/defaultHandlers.d.ts +1 -0
- package/dist/server/generateCodegen.d.ts +1 -0
- package/dist/server/index.d.ts +77 -0
- package/dist/server/routes/authHandler.d.ts +2 -0
- package/dist/server/routes/index.d.ts +8 -0
- package/dist/utils/export.d.ts +2 -0
- package/dist/utils/helper.d.ts +21 -0
- package/dist/utils/index.d.ts +17 -0
- package/generated/schema.graphql +126 -21
- package/generated/wabe.ts +135 -25
- package/package.json +8 -7
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const AnyScalarType: unknown;
|
|
2
|
+
export declare const DateScalarType: unknown;
|
|
3
|
+
export declare const EmailScalarType: unknown;
|
|
4
|
+
export declare const PhoneScalarType: unknown;
|
|
5
|
+
export declare const FileScalarType: unknown;
|
|
6
|
+
export declare const SearchScalarType: unknown;
|
|
7
|
+
export declare const SearchWhereInput: unknown;
|
|
8
|
+
export declare const AnyWhereInput: unknown;
|
|
9
|
+
export declare const FileWhereInput: unknown;
|
|
10
|
+
export declare const ArrayWhereInput: unknown;
|
|
11
|
+
export declare const DateWhereInput: unknown;
|
|
12
|
+
export declare const EmailWhereInput: unknown;
|
|
13
|
+
export declare const PhoneWhereInput: unknown;
|
|
14
|
+
export declare const IdWhereInput: unknown;
|
|
15
|
+
export declare const StringWhereInput: unknown;
|
|
16
|
+
export declare const IntWhereInput: unknown;
|
|
17
|
+
export declare const FloatWhereInput: unknown;
|
|
18
|
+
export declare const BooleanWhereInput: unknown;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OperationType } from ".";
|
|
2
|
+
import type { RoleEnum } from "../../generated/wabe";
|
|
3
|
+
import type { MutationData, OutputType, Select } from "../database";
|
|
4
|
+
import type { WabeTypes } from "../server";
|
|
5
|
+
import type { WabeContext } from "../server/interface";
|
|
6
|
+
type AddACLOpptions = {
|
|
7
|
+
userId?: string
|
|
8
|
+
role?: RoleEnum
|
|
9
|
+
read: boolean
|
|
10
|
+
write: boolean
|
|
11
|
+
} | null;
|
|
12
|
+
export declare class HookObject<
|
|
13
|
+
T extends WabeTypes,
|
|
14
|
+
K extends keyof WabeTypes["types"]
|
|
15
|
+
> {
|
|
16
|
+
className: K;
|
|
17
|
+
private newData;
|
|
18
|
+
private operationType;
|
|
19
|
+
context: WabeContext<T>;
|
|
20
|
+
object: OutputType<T, K, keyof T["types"][K]>;
|
|
21
|
+
originalObject: OutputType<T, K, keyof T["types"][K]> | undefined;
|
|
22
|
+
select: Select;
|
|
23
|
+
constructor({ newData, className, operationType, context, object, originalObject, select }: {
|
|
24
|
+
className: K
|
|
25
|
+
newData?: MutationData<T, K, keyof T["types"][K]>
|
|
26
|
+
operationType: OperationType
|
|
27
|
+
context: WabeContext<T>
|
|
28
|
+
object: OutputType<T, K, keyof T["types"][K]>
|
|
29
|
+
originalObject?: OutputType<T, K, keyof T["types"][K]>
|
|
30
|
+
select: Select
|
|
31
|
+
});
|
|
32
|
+
getUser();
|
|
33
|
+
isFieldUpdated(field: keyof T["types"][K]);
|
|
34
|
+
upsertNewData(field: keyof T["types"][K], value: any);
|
|
35
|
+
getNewData(): MutationData<T, K, keyof T["types"][K]>;
|
|
36
|
+
fetch(): Promise<OutputType<T, K, keyof T["types"][K]>>;
|
|
37
|
+
addACL(type: "users" | "roles", options: AddACLOpptions);
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultDeleteSessionOnDeleteUser: unknown;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { MutationData, OutputType, Select } from "../database";
|
|
2
|
+
import type { WabeTypes } from "../server";
|
|
3
|
+
import type { WabeContext } from "../server/interface";
|
|
4
|
+
import type { DevWabeTypes } from "../utils/helper";
|
|
5
|
+
import { HookObject } from "./HookObject";
|
|
6
|
+
export declare enum OperationType {
|
|
7
|
+
AfterCreate = "afterCreate",
|
|
8
|
+
AfterUpdate = "afterUpdate",
|
|
9
|
+
AfterDelete = "afterDelete",
|
|
10
|
+
AfterRead = "afterRead",
|
|
11
|
+
BeforeCreate = "beforeCreate",
|
|
12
|
+
BeforeUpdate = "beforeUpdate",
|
|
13
|
+
BeforeDelete = "beforeDelete",
|
|
14
|
+
BeforeRead = "beforeRead",
|
|
15
|
+
}
|
|
16
|
+
export type Hook<
|
|
17
|
+
T extends WabeTypes,
|
|
18
|
+
K extends keyof WabeTypes["types"]
|
|
19
|
+
> = {
|
|
20
|
+
operationType: OperationType
|
|
21
|
+
className?: K
|
|
22
|
+
priority: number
|
|
23
|
+
callback: (hookObject: HookObject<T, K>) => Promise<void> | void
|
|
24
|
+
};
|
|
25
|
+
export declare const _findHooksByPriority: unknown;
|
|
26
|
+
export declare const initializeHook: <
|
|
27
|
+
T extends WabeTypes,
|
|
28
|
+
K extends keyof T["types"]
|
|
29
|
+
>({ className, newData, context, select }: {
|
|
30
|
+
className: K
|
|
31
|
+
newData?: MutationData<DevWabeTypes, any, any>
|
|
32
|
+
select: Select
|
|
33
|
+
context: WabeContext<any>
|
|
34
|
+
}) => {
|
|
35
|
+
runOnSingleObject: (options: {
|
|
36
|
+
operationType: OperationType
|
|
37
|
+
id?: string
|
|
38
|
+
originalObject?: OutputType<DevWabeTypes, any, any>
|
|
39
|
+
}) => Promise<MutationData<T, K, any>>
|
|
40
|
+
};
|
|
41
|
+
export declare const getDefaultHooks: () => Hook<any, any>[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const _getPermissionPropertiesOfAClass: unknown;
|
|
2
|
+
export declare const _checkCLP: unknown;
|
|
3
|
+
export declare const defaultCheckPermissionOnRead: unknown;
|
|
4
|
+
export declare const defaultCheckPermissionOnCreate: unknown;
|
|
5
|
+
export declare const defaultCheckPermissionOnUpdate: unknown;
|
|
6
|
+
export declare const defaultCheckPermissionOnDelete: unknown;
|