@modelence/react-query 1.2.4 → 1.2.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.
Files changed (42) hide show
  1. package/package.json +2 -2
  2. package/.yalc/modelence/README.md +0 -86
  3. package/.yalc/modelence/dist/bin/modelence.js +0 -5
  4. package/.yalc/modelence/dist/bin/modelence.js.map +0 -1
  5. package/.yalc/modelence/dist/chunk-3S2FFBNS.js +0 -2
  6. package/.yalc/modelence/dist/chunk-3S2FFBNS.js.map +0 -1
  7. package/.yalc/modelence/dist/chunk-55J6XMHW.js +0 -2
  8. package/.yalc/modelence/dist/chunk-55J6XMHW.js.map +0 -1
  9. package/.yalc/modelence/dist/chunk-C3UESBRX.js +0 -2
  10. package/.yalc/modelence/dist/chunk-C3UESBRX.js.map +0 -1
  11. package/.yalc/modelence/dist/chunk-DO5TZLF5.js +0 -2
  12. package/.yalc/modelence/dist/chunk-DO5TZLF5.js.map +0 -1
  13. package/.yalc/modelence/dist/chunk-KTGXKFME.js +0 -3
  14. package/.yalc/modelence/dist/chunk-KTGXKFME.js.map +0 -1
  15. package/.yalc/modelence/dist/chunk-PB6WQQ4L.js +0 -3
  16. package/.yalc/modelence/dist/chunk-PB6WQQ4L.js.map +0 -1
  17. package/.yalc/modelence/dist/client.d.ts +0 -135
  18. package/.yalc/modelence/dist/client.js +0 -2
  19. package/.yalc/modelence/dist/client.js.map +0 -1
  20. package/.yalc/modelence/dist/index-CwdohC5n.d.ts +0 -15
  21. package/.yalc/modelence/dist/index.d.ts +0 -31
  22. package/.yalc/modelence/dist/index.js +0 -2
  23. package/.yalc/modelence/dist/index.js.map +0 -1
  24. package/.yalc/modelence/dist/mongo.d.ts +0 -5
  25. package/.yalc/modelence/dist/mongo.js +0 -2
  26. package/.yalc/modelence/dist/mongo.js.map +0 -1
  27. package/.yalc/modelence/dist/package-46B3WEOU.js +0 -2
  28. package/.yalc/modelence/dist/package-46B3WEOU.js.map +0 -1
  29. package/.yalc/modelence/dist/server.d.ts +0 -599
  30. package/.yalc/modelence/dist/server.js +0 -19
  31. package/.yalc/modelence/dist/server.js.map +0 -1
  32. package/.yalc/modelence/dist/telemetry.d.ts +0 -11
  33. package/.yalc/modelence/dist/telemetry.js +0 -2
  34. package/.yalc/modelence/dist/telemetry.js.map +0 -1
  35. package/.yalc/modelence/dist/types-BOFsm7A2.d.ts +0 -155
  36. package/.yalc/modelence/dist/types-V9eDnP35.d.ts +0 -646
  37. package/.yalc/modelence/dist/types.d.ts +0 -7
  38. package/.yalc/modelence/dist/types.js +0 -2
  39. package/.yalc/modelence/dist/types.js.map +0 -1
  40. package/.yalc/modelence/package.json +0 -83
  41. package/.yalc/modelence/yalc.sig +0 -1
  42. package/yalc.lock +0 -10
@@ -1,11 +0,0 @@
1
- declare function logDebug(message: string, args: object): void;
2
- declare function logInfo(message: string, args: object): void;
3
- declare function logError(message: string, args: object): void;
4
- interface WrappedTransaction {
5
- end(result?: string, context?: Record<string, unknown>): void;
6
- setContext(context: Record<string, unknown>): void;
7
- }
8
- declare function startTransaction(type: 'method' | 'cron' | 'ai' | 'custom' | 'route', name: string, context?: Record<string, unknown>): WrappedTransaction;
9
- declare function captureError(error: Error): void;
10
-
11
- export { captureError, logDebug, logError, logInfo, startTransaction };
@@ -1,2 +0,0 @@
1
- export{l as captureError,h as logDebug,j as logError,i as logInfo,k as startTransaction}from'./chunk-PB6WQQ4L.js';//# sourceMappingURL=telemetry.js.map
2
- //# sourceMappingURL=telemetry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"telemetry.js"}
@@ -1,155 +0,0 @@
1
- import { Server } from 'http';
2
- import { Document, ObjectId } from 'mongodb';
3
-
4
- type ConfigType = 'text' | 'string' | 'number' | 'boolean' | 'secret';
5
- type ConfigKey = string;
6
- type ConfigParams = {
7
- type: ConfigType;
8
- default: ValueType<ConfigType>;
9
- isPublic: boolean;
10
- };
11
- type AppConfig = {
12
- key: ConfigKey;
13
- value: ValueType<ConfigType>;
14
- type: ConfigType;
15
- };
16
- type ConfigSchema = {
17
- [key: string]: ConfigParams;
18
- };
19
- type Configs = Record<ConfigKey, AppConfig>;
20
- type ValueType<T> = T extends 'number' ? number : T extends 'string' ? string : T extends 'text' ? string : T extends 'boolean' ? boolean : T extends 'secret' ? string : never;
21
-
22
- type User = Document;
23
- type UserInfo = {
24
- id: string;
25
- handle: string;
26
- roles: string[];
27
- hasRole: (role: string) => boolean;
28
- requireRole: (role: string) => void;
29
- };
30
- type Role = string;
31
- type DefaultRoles = Record<'authenticated' | 'unauthenticated', Role | null>;
32
- type Session = {
33
- authToken: string;
34
- expiresAt: Date;
35
- userId: ObjectId | null;
36
- };
37
- type Permission = string;
38
- type RoleDefinition = {
39
- description?: string;
40
- permissions: Permission[];
41
- };
42
- type AuthProvider = 'google' | 'github' | 'email';
43
- type AuthSuccessProps = {
44
- provider: AuthProvider;
45
- user: User;
46
- session: Session | null;
47
- connectionInfo: ConnectionInfo;
48
- };
49
- type AuthErrorProps = {
50
- provider: AuthProvider;
51
- error: Error;
52
- session: Session | null;
53
- connectionInfo: ConnectionInfo;
54
- };
55
-
56
- type ClientInfo = {
57
- screenWidth: number;
58
- screenHeight: number;
59
- windowWidth: number;
60
- windowHeight: number;
61
- pixelRatio: number;
62
- orientation: string | null;
63
- };
64
- type ConnectionInfo = {
65
- ip?: string;
66
- userAgent?: string;
67
- acceptLanguage?: string;
68
- referrer?: string;
69
- baseUrl?: string;
70
- };
71
- type Context = {
72
- session: Session | null;
73
- user: UserInfo | null;
74
- roles: string[];
75
- clientInfo: ClientInfo;
76
- connectionInfo: ConnectionInfo;
77
- };
78
- type Args = Record<string, unknown>;
79
- type Handler<T = unknown> = (args: Args, context: Context) => Promise<T> | T;
80
- type MethodType = 'query' | 'mutation';
81
- type MethodDefinition<T = unknown> = {
82
- permissions?: Permission[];
83
- handler: Handler<T>;
84
- } | Handler<T>;
85
- type Method<T = unknown> = {
86
- type: MethodType;
87
- name: string;
88
- permissions: Permission[];
89
- handler: Handler<T>;
90
- };
91
-
92
- type canAccessChannel = (props: {
93
- user: User | null;
94
- session: Session | null;
95
- roles: string[];
96
- }) => Promise<boolean>;
97
- declare class ServerChannel<T = unknown> {
98
- readonly category: string;
99
- readonly canAccessChannel: canAccessChannel | null;
100
- constructor(category: string, canAccessChannel?: canAccessChannel);
101
- broadcast(id: string, data: T): void;
102
- }
103
-
104
- declare class ClientChannel<T = unknown> {
105
- readonly category: string;
106
- private readonly onMessage;
107
- constructor(category: string, onMessage: (data: T) => void);
108
- init(): void;
109
- joinChannel(id: string): void;
110
- leaveChannel(id: string): void;
111
- }
112
-
113
- interface WebsocketServerProvider {
114
- init(props: {
115
- httpServer: Server;
116
- channels: ServerChannel[];
117
- }): Promise<void>;
118
- broadcast<T>(props: {
119
- category: string;
120
- id: string;
121
- data: T;
122
- }): void;
123
- }
124
- interface WebsocketClientProvider {
125
- init(props: {
126
- channels?: ClientChannel[];
127
- }): void;
128
- on<T>(props: {
129
- category: string;
130
- listener: (data: T) => void;
131
- }): void;
132
- once<T>(props: {
133
- category: string;
134
- listener: (data: T) => void;
135
- }): void;
136
- off<T>(props: {
137
- category: string;
138
- listener: (data: T) => void;
139
- }): void;
140
- emit(props: {
141
- eventName: string;
142
- category: string;
143
- id: string;
144
- }): void;
145
- joinChannel(props: {
146
- category: string;
147
- id: string;
148
- }): void;
149
- leaveChannel(props: {
150
- category: string;
151
- id: string;
152
- }): void;
153
- }
154
-
155
- export { type AuthSuccessProps as A, type ConfigSchema as C, type DefaultRoles as D, type Handler as H, type MethodDefinition as M, type Permission as P, type RoleDefinition as R, ServerChannel as S, type User as U, type WebsocketServerProvider as W, type WebsocketClientProvider as a, type ConfigKey as b, ClientChannel as c, type AuthErrorProps as d, type AppConfig as e, type Session as f, type UserInfo as g, type Role as h, type Context as i, type ClientInfo as j, type ConnectionInfo as k, type Args as l, type MethodType as m, type Method as n, type ConfigType as o, type Configs as p, type AuthProvider as q };