@kyro-cms/core 0.13.0 → 0.13.1
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 +145 -77
- package/dist/WebhookService-BOJMgjBm.d.cts +143 -0
- package/dist/WebhookService-CFe6Zd0_.d.cts +143 -0
- package/dist/WebhookService-CGxHtw7E.d.cts +143 -0
- package/dist/WebhookService-CNC1lYz7.d.ts +143 -0
- package/dist/WebhookService-CVXmjbtQ.d.cts +143 -0
- package/dist/WebhookService-Dk1lzSrG.d.cts +143 -0
- package/dist/WebhookService-I6hdue2Y.d.ts +143 -0
- package/dist/WebhookService-KnQ2UDlW.d.ts +143 -0
- package/dist/WebhookService-fk0FGRlk.d.ts +143 -0
- package/dist/WebhookService-vsFnWrOh.d.ts +143 -0
- package/dist/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +1 -1
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +1 -1
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/base-B-i-tjm1.d.ts +218 -0
- package/dist/base-B-siit_y.d.cts +218 -0
- package/dist/base-B8SyZI4D.d.ts +218 -0
- package/dist/base-BCgFt3Yx.d.ts +218 -0
- package/dist/base-BHRGJ40F.d.cts +218 -0
- package/dist/base-BaOJ5uWd.d.cts +218 -0
- package/dist/base-BfPaVEAE.d.cts +218 -0
- package/dist/base-BxrX5EPU.d.cts +218 -0
- package/dist/base-CcZIEll-.d.ts +218 -0
- package/dist/base-OYfoYPYP.d.ts +218 -0
- package/dist/chunk-E4H3ZZ7U.js +4 -0
- package/dist/chunk-FDKU7HJX.js +2 -0
- package/dist/chunk-GV2IB4WQ.cjs +56 -0
- package/dist/chunk-JZ7Z6WC2.cjs +3 -0
- package/dist/chunk-MFNN5DYG.cjs +1 -0
- package/dist/chunk-SMQ6736Y.js +57 -0
- package/dist/client.cjs +11 -11
- package/dist/client.d.cts +18 -1
- package/dist/client.d.ts +18 -1
- package/dist/client.js +11 -11
- package/dist/drizzle/index.d.cts +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/fields/index.d.cts +2 -2
- package/dist/fields/index.d.ts +2 -2
- package/dist/graphql/index.d.cts +3 -3
- package/dist/graphql/index.d.ts +3 -3
- package/dist/index-8Ino7vKq.d.ts +105 -0
- package/dist/index-ByOM1Y5x.d.ts +105 -0
- package/dist/index-C6xmtRio.d.cts +105 -0
- package/dist/index-CTI3K_uq.d.cts +105 -0
- package/dist/index-CTL4zv_u.d.ts +105 -0
- package/dist/index-CaDbioSg.d.ts +105 -0
- package/dist/index-DS3DpJli.d.cts +105 -0
- package/dist/index-NGnJpSgf.d.ts +105 -0
- package/dist/index-Zrg3sZ6R.d.cts +105 -0
- package/dist/index-rm7uyOK1.d.cts +105 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/mongodb/index.d.cts +3 -3
- package/dist/mongodb/index.d.ts +3 -3
- package/dist/rest/index.d.cts +4 -4
- package/dist/rest/index.d.ts +4 -4
- package/dist/templates/index.cjs +1 -1
- package/dist/templates/index.d.cts +2 -2
- package/dist/templates/index.d.ts +2 -2
- package/dist/templates/index.js +1 -1
- package/dist/trpc/index.d.cts +3 -3
- package/dist/trpc/index.d.ts +3 -3
- package/dist/types-6ShQp2EM.d.cts +839 -0
- package/dist/types-B9oXBEKI.d.cts +330 -0
- package/dist/types-B9oXBEKI.d.ts +330 -0
- package/dist/types-BCOhfwHC.d.ts +839 -0
- package/dist/types-BRDBNacn.d.ts +839 -0
- package/dist/types-C8yIAV6K.d.cts +839 -0
- package/dist/types-CORUQhY-.d.ts +839 -0
- package/dist/types-Cdssrcbz.d.cts +839 -0
- package/dist/types-CjGqxBd3.d.cts +330 -0
- package/dist/types-CjGqxBd3.d.ts +330 -0
- package/dist/types-DBGR-eQl.d.cts +839 -0
- package/dist/types-DxaK39ix.d.cts +330 -0
- package/dist/types-DxaK39ix.d.ts +330 -0
- package/dist/types-IeKFn7Ky.d.ts +839 -0
- package/dist/types-QglJ7PwT.d.cts +839 -0
- package/dist/types-zt5qIvje.d.ts +839 -0
- package/package.json +1 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { B as BaseAdapter } from './types-IeKFn7Ky.js';
|
|
2
|
+
|
|
3
|
+
declare const WEBHOOK_EVENTS: {
|
|
4
|
+
readonly COLLECTION_CREATE: "collection.create";
|
|
5
|
+
readonly COLLECTION_UPDATE: "collection.update";
|
|
6
|
+
readonly COLLECTION_DELETE: "collection.delete";
|
|
7
|
+
readonly MEDIA_UPLOAD: "media.upload";
|
|
8
|
+
readonly MEDIA_DELETE: "media.delete";
|
|
9
|
+
readonly AUTH_LOGIN: "auth.login";
|
|
10
|
+
readonly AUTH_REGISTER: "auth.register";
|
|
11
|
+
readonly AUTH_LOGOUT: "auth.logout";
|
|
12
|
+
readonly ORDER_CREATED: "order.created";
|
|
13
|
+
readonly ORDER_PAID: "order.paid";
|
|
14
|
+
readonly ORDER_SHIPPED: "order.shipped";
|
|
15
|
+
readonly ORDER_DELIVERED: "order.delivered";
|
|
16
|
+
};
|
|
17
|
+
type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
|
|
18
|
+
declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
|
|
19
|
+
type WebhookActionType = "generic" | "github-push";
|
|
20
|
+
interface WebhookActionConfig {
|
|
21
|
+
githubOwner?: string;
|
|
22
|
+
githubRepo?: string;
|
|
23
|
+
githubBranch?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WebhookConfig {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
events: WebhookEvent[];
|
|
30
|
+
collections?: string[];
|
|
31
|
+
status: "active" | "inactive" | "error";
|
|
32
|
+
secret?: string;
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
action?: WebhookActionType;
|
|
35
|
+
config?: WebhookActionConfig;
|
|
36
|
+
lastTriggered?: string;
|
|
37
|
+
lastError?: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface CreateWebhookData {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
events: (WebhookEvent | "create" | "update" | "delete")[];
|
|
45
|
+
collections?: string[];
|
|
46
|
+
status?: "active" | "inactive";
|
|
47
|
+
secret?: string;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
action?: WebhookActionType;
|
|
50
|
+
config?: WebhookActionConfig;
|
|
51
|
+
}
|
|
52
|
+
interface UpdateWebhookData {
|
|
53
|
+
name?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
events?: (WebhookEvent | "create" | "update" | "delete")[];
|
|
56
|
+
collections?: string[];
|
|
57
|
+
status?: "active" | "inactive" | "error";
|
|
58
|
+
secret?: string;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
action?: WebhookActionType;
|
|
61
|
+
config?: WebhookActionConfig;
|
|
62
|
+
lastTriggered?: string | null;
|
|
63
|
+
lastError?: string | null;
|
|
64
|
+
}
|
|
65
|
+
interface WebhookPayload {
|
|
66
|
+
id: string;
|
|
67
|
+
event: WebhookEvent;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
collection?: string;
|
|
70
|
+
operation?: "create" | "update" | "delete";
|
|
71
|
+
data?: unknown;
|
|
72
|
+
previousData?: unknown;
|
|
73
|
+
user?: {
|
|
74
|
+
id: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
role?: string;
|
|
77
|
+
};
|
|
78
|
+
tenantId?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
interface WebhookDelivery {
|
|
82
|
+
id: string;
|
|
83
|
+
webhookId: string;
|
|
84
|
+
event: WebhookEvent;
|
|
85
|
+
payload: WebhookPayload;
|
|
86
|
+
attempt: number;
|
|
87
|
+
status: "pending" | "success" | "failed" | "retrying";
|
|
88
|
+
responseStatus?: number;
|
|
89
|
+
responseBody?: string;
|
|
90
|
+
error?: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
deliveredAt?: string;
|
|
94
|
+
nextRetryAt?: string;
|
|
95
|
+
}
|
|
96
|
+
interface WebhookTriggerResult {
|
|
97
|
+
deliveryId: string;
|
|
98
|
+
webhookId: string;
|
|
99
|
+
event: WebhookEvent;
|
|
100
|
+
status: "queued" | "success" | "failed";
|
|
101
|
+
responseStatus?: number;
|
|
102
|
+
duration?: number;
|
|
103
|
+
error?: string;
|
|
104
|
+
}
|
|
105
|
+
declare const WEBHOOK_COLLECTION = "_webhooks";
|
|
106
|
+
declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
|
|
107
|
+
interface DeliveryResult {
|
|
108
|
+
success: boolean;
|
|
109
|
+
status: number;
|
|
110
|
+
statusText?: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
duration: number;
|
|
113
|
+
error?: string;
|
|
114
|
+
}
|
|
115
|
+
interface DeliveryOptions {
|
|
116
|
+
timeout?: number;
|
|
117
|
+
maxRetries?: number;
|
|
118
|
+
retryDelay?: number;
|
|
119
|
+
onRetry?: (attempt: number, error: string) => void;
|
|
120
|
+
onSuccess?: (result: DeliveryResult) => void;
|
|
121
|
+
onFailure?: (error: string) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class WebhookService {
|
|
125
|
+
private db;
|
|
126
|
+
constructor(db: BaseAdapter);
|
|
127
|
+
getWebhooks(filters?: {
|
|
128
|
+
status?: string;
|
|
129
|
+
event?: WebhookEvent;
|
|
130
|
+
}): Promise<WebhookConfig[]>;
|
|
131
|
+
getWebhookById(id: string): Promise<WebhookConfig | null>;
|
|
132
|
+
createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
|
|
133
|
+
updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
|
|
134
|
+
deleteWebhook(id: string): Promise<void>;
|
|
135
|
+
trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
|
|
136
|
+
triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
|
|
137
|
+
testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
|
|
138
|
+
getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
|
|
139
|
+
retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
|
|
140
|
+
}
|
|
141
|
+
declare function createWebhookService(db: BaseAdapter): WebhookService;
|
|
142
|
+
|
|
143
|
+
export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { B as BaseAdapter } from './types-zt5qIvje.js';
|
|
2
|
+
|
|
3
|
+
declare const WEBHOOK_EVENTS: {
|
|
4
|
+
readonly COLLECTION_CREATE: "collection.create";
|
|
5
|
+
readonly COLLECTION_UPDATE: "collection.update";
|
|
6
|
+
readonly COLLECTION_DELETE: "collection.delete";
|
|
7
|
+
readonly MEDIA_UPLOAD: "media.upload";
|
|
8
|
+
readonly MEDIA_DELETE: "media.delete";
|
|
9
|
+
readonly AUTH_LOGIN: "auth.login";
|
|
10
|
+
readonly AUTH_REGISTER: "auth.register";
|
|
11
|
+
readonly AUTH_LOGOUT: "auth.logout";
|
|
12
|
+
readonly ORDER_CREATED: "order.created";
|
|
13
|
+
readonly ORDER_PAID: "order.paid";
|
|
14
|
+
readonly ORDER_SHIPPED: "order.shipped";
|
|
15
|
+
readonly ORDER_DELIVERED: "order.delivered";
|
|
16
|
+
};
|
|
17
|
+
type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
|
|
18
|
+
declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
|
|
19
|
+
type WebhookActionType = "generic" | "github-push";
|
|
20
|
+
interface WebhookActionConfig {
|
|
21
|
+
githubOwner?: string;
|
|
22
|
+
githubRepo?: string;
|
|
23
|
+
githubBranch?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WebhookConfig {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
events: WebhookEvent[];
|
|
30
|
+
collections?: string[];
|
|
31
|
+
status: "active" | "inactive" | "error";
|
|
32
|
+
secret?: string;
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
action?: WebhookActionType;
|
|
35
|
+
config?: WebhookActionConfig;
|
|
36
|
+
lastTriggered?: string;
|
|
37
|
+
lastError?: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface CreateWebhookData {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
events: (WebhookEvent | "create" | "update" | "delete")[];
|
|
45
|
+
collections?: string[];
|
|
46
|
+
status?: "active" | "inactive";
|
|
47
|
+
secret?: string;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
action?: WebhookActionType;
|
|
50
|
+
config?: WebhookActionConfig;
|
|
51
|
+
}
|
|
52
|
+
interface UpdateWebhookData {
|
|
53
|
+
name?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
events?: (WebhookEvent | "create" | "update" | "delete")[];
|
|
56
|
+
collections?: string[];
|
|
57
|
+
status?: "active" | "inactive" | "error";
|
|
58
|
+
secret?: string;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
action?: WebhookActionType;
|
|
61
|
+
config?: WebhookActionConfig;
|
|
62
|
+
lastTriggered?: string | null;
|
|
63
|
+
lastError?: string | null;
|
|
64
|
+
}
|
|
65
|
+
interface WebhookPayload {
|
|
66
|
+
id: string;
|
|
67
|
+
event: WebhookEvent;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
collection?: string;
|
|
70
|
+
operation?: "create" | "update" | "delete";
|
|
71
|
+
data?: unknown;
|
|
72
|
+
previousData?: unknown;
|
|
73
|
+
user?: {
|
|
74
|
+
id: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
role?: string;
|
|
77
|
+
};
|
|
78
|
+
tenantId?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
interface WebhookDelivery {
|
|
82
|
+
id: string;
|
|
83
|
+
webhookId: string;
|
|
84
|
+
event: WebhookEvent;
|
|
85
|
+
payload: WebhookPayload;
|
|
86
|
+
attempt: number;
|
|
87
|
+
status: "pending" | "success" | "failed" | "retrying";
|
|
88
|
+
responseStatus?: number;
|
|
89
|
+
responseBody?: string;
|
|
90
|
+
error?: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
deliveredAt?: string;
|
|
94
|
+
nextRetryAt?: string;
|
|
95
|
+
}
|
|
96
|
+
interface WebhookTriggerResult {
|
|
97
|
+
deliveryId: string;
|
|
98
|
+
webhookId: string;
|
|
99
|
+
event: WebhookEvent;
|
|
100
|
+
status: "queued" | "success" | "failed";
|
|
101
|
+
responseStatus?: number;
|
|
102
|
+
duration?: number;
|
|
103
|
+
error?: string;
|
|
104
|
+
}
|
|
105
|
+
declare const WEBHOOK_COLLECTION = "_webhooks";
|
|
106
|
+
declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
|
|
107
|
+
interface DeliveryResult {
|
|
108
|
+
success: boolean;
|
|
109
|
+
status: number;
|
|
110
|
+
statusText?: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
duration: number;
|
|
113
|
+
error?: string;
|
|
114
|
+
}
|
|
115
|
+
interface DeliveryOptions {
|
|
116
|
+
timeout?: number;
|
|
117
|
+
maxRetries?: number;
|
|
118
|
+
retryDelay?: number;
|
|
119
|
+
onRetry?: (attempt: number, error: string) => void;
|
|
120
|
+
onSuccess?: (result: DeliveryResult) => void;
|
|
121
|
+
onFailure?: (error: string) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class WebhookService {
|
|
125
|
+
private db;
|
|
126
|
+
constructor(db: BaseAdapter);
|
|
127
|
+
getWebhooks(filters?: {
|
|
128
|
+
status?: string;
|
|
129
|
+
event?: WebhookEvent;
|
|
130
|
+
}): Promise<WebhookConfig[]>;
|
|
131
|
+
getWebhookById(id: string): Promise<WebhookConfig | null>;
|
|
132
|
+
createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
|
|
133
|
+
updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
|
|
134
|
+
deleteWebhook(id: string): Promise<void>;
|
|
135
|
+
trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
|
|
136
|
+
triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
|
|
137
|
+
testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
|
|
138
|
+
getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
|
|
139
|
+
retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
|
|
140
|
+
}
|
|
141
|
+
declare function createWebhookService(db: BaseAdapter): WebhookService;
|
|
142
|
+
|
|
143
|
+
export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { B as BaseAdapter } from './types-CORUQhY-.js';
|
|
2
|
+
|
|
3
|
+
declare const WEBHOOK_EVENTS: {
|
|
4
|
+
readonly COLLECTION_CREATE: "collection.create";
|
|
5
|
+
readonly COLLECTION_UPDATE: "collection.update";
|
|
6
|
+
readonly COLLECTION_DELETE: "collection.delete";
|
|
7
|
+
readonly MEDIA_UPLOAD: "media.upload";
|
|
8
|
+
readonly MEDIA_DELETE: "media.delete";
|
|
9
|
+
readonly AUTH_LOGIN: "auth.login";
|
|
10
|
+
readonly AUTH_REGISTER: "auth.register";
|
|
11
|
+
readonly AUTH_LOGOUT: "auth.logout";
|
|
12
|
+
readonly ORDER_CREATED: "order.created";
|
|
13
|
+
readonly ORDER_PAID: "order.paid";
|
|
14
|
+
readonly ORDER_SHIPPED: "order.shipped";
|
|
15
|
+
readonly ORDER_DELIVERED: "order.delivered";
|
|
16
|
+
};
|
|
17
|
+
type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
|
|
18
|
+
declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
|
|
19
|
+
type WebhookActionType = "generic" | "github-push";
|
|
20
|
+
interface WebhookActionConfig {
|
|
21
|
+
githubOwner?: string;
|
|
22
|
+
githubRepo?: string;
|
|
23
|
+
githubBranch?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WebhookConfig {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
events: WebhookEvent[];
|
|
30
|
+
collections?: string[];
|
|
31
|
+
status: "active" | "inactive" | "error";
|
|
32
|
+
secret?: string;
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
action?: WebhookActionType;
|
|
35
|
+
config?: WebhookActionConfig;
|
|
36
|
+
lastTriggered?: string;
|
|
37
|
+
lastError?: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface CreateWebhookData {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
events: (WebhookEvent | "create" | "update" | "delete")[];
|
|
45
|
+
collections?: string[];
|
|
46
|
+
status?: "active" | "inactive";
|
|
47
|
+
secret?: string;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
action?: WebhookActionType;
|
|
50
|
+
config?: WebhookActionConfig;
|
|
51
|
+
}
|
|
52
|
+
interface UpdateWebhookData {
|
|
53
|
+
name?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
events?: (WebhookEvent | "create" | "update" | "delete")[];
|
|
56
|
+
collections?: string[];
|
|
57
|
+
status?: "active" | "inactive" | "error";
|
|
58
|
+
secret?: string;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
action?: WebhookActionType;
|
|
61
|
+
config?: WebhookActionConfig;
|
|
62
|
+
lastTriggered?: string | null;
|
|
63
|
+
lastError?: string | null;
|
|
64
|
+
}
|
|
65
|
+
interface WebhookPayload {
|
|
66
|
+
id: string;
|
|
67
|
+
event: WebhookEvent;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
collection?: string;
|
|
70
|
+
operation?: "create" | "update" | "delete";
|
|
71
|
+
data?: unknown;
|
|
72
|
+
previousData?: unknown;
|
|
73
|
+
user?: {
|
|
74
|
+
id: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
role?: string;
|
|
77
|
+
};
|
|
78
|
+
tenantId?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
interface WebhookDelivery {
|
|
82
|
+
id: string;
|
|
83
|
+
webhookId: string;
|
|
84
|
+
event: WebhookEvent;
|
|
85
|
+
payload: WebhookPayload;
|
|
86
|
+
attempt: number;
|
|
87
|
+
status: "pending" | "success" | "failed" | "retrying";
|
|
88
|
+
responseStatus?: number;
|
|
89
|
+
responseBody?: string;
|
|
90
|
+
error?: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
deliveredAt?: string;
|
|
94
|
+
nextRetryAt?: string;
|
|
95
|
+
}
|
|
96
|
+
interface WebhookTriggerResult {
|
|
97
|
+
deliveryId: string;
|
|
98
|
+
webhookId: string;
|
|
99
|
+
event: WebhookEvent;
|
|
100
|
+
status: "queued" | "success" | "failed";
|
|
101
|
+
responseStatus?: number;
|
|
102
|
+
duration?: number;
|
|
103
|
+
error?: string;
|
|
104
|
+
}
|
|
105
|
+
declare const WEBHOOK_COLLECTION = "_webhooks";
|
|
106
|
+
declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
|
|
107
|
+
interface DeliveryResult {
|
|
108
|
+
success: boolean;
|
|
109
|
+
status: number;
|
|
110
|
+
statusText?: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
duration: number;
|
|
113
|
+
error?: string;
|
|
114
|
+
}
|
|
115
|
+
interface DeliveryOptions {
|
|
116
|
+
timeout?: number;
|
|
117
|
+
maxRetries?: number;
|
|
118
|
+
retryDelay?: number;
|
|
119
|
+
onRetry?: (attempt: number, error: string) => void;
|
|
120
|
+
onSuccess?: (result: DeliveryResult) => void;
|
|
121
|
+
onFailure?: (error: string) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class WebhookService {
|
|
125
|
+
private db;
|
|
126
|
+
constructor(db: BaseAdapter);
|
|
127
|
+
getWebhooks(filters?: {
|
|
128
|
+
status?: string;
|
|
129
|
+
event?: WebhookEvent;
|
|
130
|
+
}): Promise<WebhookConfig[]>;
|
|
131
|
+
getWebhookById(id: string): Promise<WebhookConfig | null>;
|
|
132
|
+
createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
|
|
133
|
+
updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
|
|
134
|
+
deleteWebhook(id: string): Promise<void>;
|
|
135
|
+
trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
|
|
136
|
+
triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
|
|
137
|
+
testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
|
|
138
|
+
getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
|
|
139
|
+
retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
|
|
140
|
+
}
|
|
141
|
+
declare function createWebhookService(db: BaseAdapter): WebhookService;
|
|
142
|
+
|
|
143
|
+
export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { B as BaseAdapter } from './types-BRDBNacn.js';
|
|
2
|
+
|
|
3
|
+
declare const WEBHOOK_EVENTS: {
|
|
4
|
+
readonly COLLECTION_CREATE: "collection.create";
|
|
5
|
+
readonly COLLECTION_UPDATE: "collection.update";
|
|
6
|
+
readonly COLLECTION_DELETE: "collection.delete";
|
|
7
|
+
readonly MEDIA_UPLOAD: "media.upload";
|
|
8
|
+
readonly MEDIA_DELETE: "media.delete";
|
|
9
|
+
readonly AUTH_LOGIN: "auth.login";
|
|
10
|
+
readonly AUTH_REGISTER: "auth.register";
|
|
11
|
+
readonly AUTH_LOGOUT: "auth.logout";
|
|
12
|
+
readonly ORDER_CREATED: "order.created";
|
|
13
|
+
readonly ORDER_PAID: "order.paid";
|
|
14
|
+
readonly ORDER_SHIPPED: "order.shipped";
|
|
15
|
+
readonly ORDER_DELIVERED: "order.delivered";
|
|
16
|
+
};
|
|
17
|
+
type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
|
|
18
|
+
declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
|
|
19
|
+
type WebhookActionType = "generic" | "github-push";
|
|
20
|
+
interface WebhookActionConfig {
|
|
21
|
+
githubOwner?: string;
|
|
22
|
+
githubRepo?: string;
|
|
23
|
+
githubBranch?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WebhookConfig {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
events: WebhookEvent[];
|
|
30
|
+
collections?: string[];
|
|
31
|
+
status: "active" | "inactive" | "error";
|
|
32
|
+
secret?: string;
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
action?: WebhookActionType;
|
|
35
|
+
config?: WebhookActionConfig;
|
|
36
|
+
lastTriggered?: string;
|
|
37
|
+
lastError?: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface CreateWebhookData {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
events: (WebhookEvent | "create" | "update" | "delete")[];
|
|
45
|
+
collections?: string[];
|
|
46
|
+
status?: "active" | "inactive";
|
|
47
|
+
secret?: string;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
action?: WebhookActionType;
|
|
50
|
+
config?: WebhookActionConfig;
|
|
51
|
+
}
|
|
52
|
+
interface UpdateWebhookData {
|
|
53
|
+
name?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
events?: (WebhookEvent | "create" | "update" | "delete")[];
|
|
56
|
+
collections?: string[];
|
|
57
|
+
status?: "active" | "inactive" | "error";
|
|
58
|
+
secret?: string;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
action?: WebhookActionType;
|
|
61
|
+
config?: WebhookActionConfig;
|
|
62
|
+
lastTriggered?: string | null;
|
|
63
|
+
lastError?: string | null;
|
|
64
|
+
}
|
|
65
|
+
interface WebhookPayload {
|
|
66
|
+
id: string;
|
|
67
|
+
event: WebhookEvent;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
collection?: string;
|
|
70
|
+
operation?: "create" | "update" | "delete";
|
|
71
|
+
data?: unknown;
|
|
72
|
+
previousData?: unknown;
|
|
73
|
+
user?: {
|
|
74
|
+
id: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
role?: string;
|
|
77
|
+
};
|
|
78
|
+
tenantId?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
interface WebhookDelivery {
|
|
82
|
+
id: string;
|
|
83
|
+
webhookId: string;
|
|
84
|
+
event: WebhookEvent;
|
|
85
|
+
payload: WebhookPayload;
|
|
86
|
+
attempt: number;
|
|
87
|
+
status: "pending" | "success" | "failed" | "retrying";
|
|
88
|
+
responseStatus?: number;
|
|
89
|
+
responseBody?: string;
|
|
90
|
+
error?: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
deliveredAt?: string;
|
|
94
|
+
nextRetryAt?: string;
|
|
95
|
+
}
|
|
96
|
+
interface WebhookTriggerResult {
|
|
97
|
+
deliveryId: string;
|
|
98
|
+
webhookId: string;
|
|
99
|
+
event: WebhookEvent;
|
|
100
|
+
status: "queued" | "success" | "failed";
|
|
101
|
+
responseStatus?: number;
|
|
102
|
+
duration?: number;
|
|
103
|
+
error?: string;
|
|
104
|
+
}
|
|
105
|
+
declare const WEBHOOK_COLLECTION = "_webhooks";
|
|
106
|
+
declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
|
|
107
|
+
interface DeliveryResult {
|
|
108
|
+
success: boolean;
|
|
109
|
+
status: number;
|
|
110
|
+
statusText?: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
duration: number;
|
|
113
|
+
error?: string;
|
|
114
|
+
}
|
|
115
|
+
interface DeliveryOptions {
|
|
116
|
+
timeout?: number;
|
|
117
|
+
maxRetries?: number;
|
|
118
|
+
retryDelay?: number;
|
|
119
|
+
onRetry?: (attempt: number, error: string) => void;
|
|
120
|
+
onSuccess?: (result: DeliveryResult) => void;
|
|
121
|
+
onFailure?: (error: string) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class WebhookService {
|
|
125
|
+
private db;
|
|
126
|
+
constructor(db: BaseAdapter);
|
|
127
|
+
getWebhooks(filters?: {
|
|
128
|
+
status?: string;
|
|
129
|
+
event?: WebhookEvent;
|
|
130
|
+
}): Promise<WebhookConfig[]>;
|
|
131
|
+
getWebhookById(id: string): Promise<WebhookConfig | null>;
|
|
132
|
+
createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
|
|
133
|
+
updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
|
|
134
|
+
deleteWebhook(id: string): Promise<void>;
|
|
135
|
+
trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
|
|
136
|
+
triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
|
|
137
|
+
testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
|
|
138
|
+
getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
|
|
139
|
+
retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
|
|
140
|
+
}
|
|
141
|
+
declare function createWebhookService(db: BaseAdapter): WebhookService;
|
|
142
|
+
|
|
143
|
+
export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMFNN5DYG_cjs=require('./chunk-MFNN5DYG.cjs');require('./chunk-GV2IB4WQ.cjs'),require('./chunk-3O3AVMWM.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-KMFLHGD5.cjs'),require('./chunk-262YP5XA.cjs'),require('./chunk-QO5ZWQA3.cjs'),require('./chunk-6MNLRAKM.cjs'),require('./chunk-Q5TFO66G.cjs'),require('./chunk-7NKNSRCB.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-OPTVCCQQ.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-SBNMXQNO.cjs'),require('./chunk-ZHA446FA.cjs'),require('./chunk-MDLJTZLV.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-N4FXLQE3.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-TCFL3UWT.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-RVBSJ4UQ.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-XFYSADHV.cjs'),require('./chunk-ZTLGK6R4.cjs'),require('./chunk-EYHD7HZE.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZUBJ6RLQ.cjs'),require('./chunk-7WMMKGEO.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();function n(e){return new Response(e.body,e)}var i={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function o(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function c(){try{return (await chunkMFNN5DYG_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??i.graphqlEnabled}catch{return true}}var d=async e=>{if(await chunkMFNN5DYG_cjs.b(e),!await c())return o();let s=await chunkMFNN5DYG_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(s)},f=async e=>{if(await chunkMFNN5DYG_cjs.b(e),!await c())return o();let s=await chunkMFNN5DYG_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(s)};exports.GET=f;exports.POST=d;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-FDKU7HJX.js';import'./chunk-SMQ6736Y.js';import'./chunk-ATI2UZ7U.js';import'./chunk-LWM4WABU.js';import'./chunk-D6SDGHY6.js';import'./chunk-RYHOWZLK.js';import'./chunk-X473JI7Z.js';import'./chunk-B4AC23SG.js';import'./chunk-3KZXF4US.js';import'./chunk-CH4TZZI5.js';import'./chunk-OLRCZ6E3.js';import'./chunk-N6MNQIQU.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-REQ622YC.js';import'./chunk-GQGFNTDZ.js';import'./chunk-KEITOXIP.js';import'./chunk-7MNDQU6K.js';import'./chunk-6NBZDW53.js';import'./chunk-JV4HJBXW.js';import'./chunk-ZAKYTBEN.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-3TAUNYEM.js';import'./chunk-N5POANYV.js';import'./chunk-2HA6EKXX.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-FK2BG4HU.js';import'./chunk-WXT2XW7T.js';import'./chunk-XIAJQLGS.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g();function n(e){return new Response(e.body,e)}var i={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function o(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function c(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??i.graphqlEnabled}catch{return true}}var f=async e=>{if(await b(e),!await c())return o();let s=await a.getGraphQL().fetch(e.request,e.locals);return n(s)},h=async e=>{if(await b(e),!await c())return o();let s=await a.getGraphQL().fetch(e.request,e.locals);return n(s)};export{h as GET,f as POST};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMFNN5DYG_cjs=require('./chunk-MFNN5DYG.cjs');require('./chunk-GV2IB4WQ.cjs'),require('./chunk-3O3AVMWM.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-KMFLHGD5.cjs'),require('./chunk-262YP5XA.cjs'),require('./chunk-QO5ZWQA3.cjs'),require('./chunk-6MNLRAKM.cjs'),require('./chunk-Q5TFO66G.cjs'),require('./chunk-7NKNSRCB.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-OPTVCCQQ.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-SBNMXQNO.cjs'),require('./chunk-ZHA446FA.cjs'),require('./chunk-MDLJTZLV.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-N4FXLQE3.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-TCFL3UWT.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-RVBSJ4UQ.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-XFYSADHV.cjs'),require('./chunk-ZTLGK6R4.cjs'),require('./chunk-EYHD7HZE.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZUBJ6RLQ.cjs'),require('./chunk-7WMMKGEO.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var s={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function o(){try{return (await chunkMFNN5DYG_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??s.trpcEnabled}catch{return true}}var p=async e=>(await chunkMFNN5DYG_cjs.b(e),await o()?chunkMFNN5DYG_cjs.a.getTRPC().fetch(e.request,e.locals):n());exports.ALL=p;
|
package/dist/api-handler-trpc.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-FDKU7HJX.js';import'./chunk-SMQ6736Y.js';import'./chunk-ATI2UZ7U.js';import'./chunk-LWM4WABU.js';import'./chunk-D6SDGHY6.js';import'./chunk-RYHOWZLK.js';import'./chunk-X473JI7Z.js';import'./chunk-B4AC23SG.js';import'./chunk-3KZXF4US.js';import'./chunk-CH4TZZI5.js';import'./chunk-OLRCZ6E3.js';import'./chunk-N6MNQIQU.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-REQ622YC.js';import'./chunk-GQGFNTDZ.js';import'./chunk-KEITOXIP.js';import'./chunk-7MNDQU6K.js';import'./chunk-6NBZDW53.js';import'./chunk-JV4HJBXW.js';import'./chunk-ZAKYTBEN.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-3TAUNYEM.js';import'./chunk-N5POANYV.js';import'./chunk-2HA6EKXX.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-FK2BG4HU.js';import'./chunk-WXT2XW7T.js';import'./chunk-XIAJQLGS.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g();function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var s={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function o(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??s.trpcEnabled}catch{return true}}var d=async e=>(await b(e),await o()?a.getTRPC().fetch(e.request,e.locals):n());export{d as ALL};
|
package/dist/api-handler.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMFNN5DYG_cjs=require('./chunk-MFNN5DYG.cjs');require('./chunk-GV2IB4WQ.cjs'),require('./chunk-3O3AVMWM.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-KMFLHGD5.cjs'),require('./chunk-262YP5XA.cjs'),require('./chunk-QO5ZWQA3.cjs'),require('./chunk-6MNLRAKM.cjs'),require('./chunk-Q5TFO66G.cjs'),require('./chunk-7NKNSRCB.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-OPTVCCQQ.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-SBNMXQNO.cjs'),require('./chunk-ZHA446FA.cjs'),require('./chunk-MDLJTZLV.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-N4FXLQE3.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-TCFL3UWT.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-RVBSJ4UQ.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-XFYSADHV.cjs'),require('./chunk-ZTLGK6R4.cjs'),require('./chunk-EYHD7HZE.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZUBJ6RLQ.cjs'),require('./chunk-7WMMKGEO.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"ALL",{enumerable:true,get:function(){return chunkMFNN5DYG_cjs.c}});Object.defineProperty(exports,"createKyroHandler",{enumerable:true,get:function(){return chunkMFNN5DYG_cjs.d}});Object.defineProperty(exports,"kyroInstance",{enumerable:true,get:function(){return chunkMFNN5DYG_cjs.a}});Object.defineProperty(exports,"warmKyroInstance",{enumerable:true,get:function(){return chunkMFNN5DYG_cjs.b}});
|
package/dist/api-handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as ALL,d as createKyroHandler,a as kyroInstance,b as warmKyroInstance}from'./chunk-
|
|
1
|
+
export{c as ALL,d as createKyroHandler,a as kyroInstance,b as warmKyroInstance}from'./chunk-FDKU7HJX.js';import'./chunk-SMQ6736Y.js';import'./chunk-ATI2UZ7U.js';import'./chunk-LWM4WABU.js';import'./chunk-D6SDGHY6.js';import'./chunk-RYHOWZLK.js';import'./chunk-X473JI7Z.js';import'./chunk-B4AC23SG.js';import'./chunk-3KZXF4US.js';import'./chunk-CH4TZZI5.js';import'./chunk-OLRCZ6E3.js';import'./chunk-N6MNQIQU.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-REQ622YC.js';import'./chunk-GQGFNTDZ.js';import'./chunk-KEITOXIP.js';import'./chunk-7MNDQU6K.js';import'./chunk-6NBZDW53.js';import'./chunk-JV4HJBXW.js';import'./chunk-ZAKYTBEN.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-3TAUNYEM.js';import'./chunk-N5POANYV.js';import'./chunk-2HA6EKXX.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-FK2BG4HU.js';import'./chunk-WXT2XW7T.js';import'./chunk-XIAJQLGS.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|