@dakkitor/api-contracts 1.5.0 → 1.7.0
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/abilities/abilities.contract.d.ts +6 -2
- package/dist/abilities/abilities.contract.d.ts.map +1 -1
- package/dist/abilities/abilities.contract.js +45 -1
- package/dist/abilities/abilities.contract.spec.js +98 -0
- package/dist/abilities/first-agent.abilities.json +8 -14
- package/dist/abilities/outreach.abilities.json +25 -0
- package/dist/abilities/second-agent.abilities.json +4 -13
- package/dist/actives/actives.contract.d.ts +3618 -3479
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/actives/actives.contract.js +2 -0
- package/dist/actives/actives.contract.spec.d.ts +2 -0
- package/dist/actives/actives.contract.spec.d.ts.map +1 -0
- package/dist/actives/actives.contract.spec.js +35 -0
- package/dist/agent-client-links/agent-client-links.contract.d.ts +1087 -1087
- package/dist/auth/auth.contract.d.ts +108 -108
- package/dist/bookings/bookings.contract.d.ts +6644 -6452
- package/dist/bookings/bookings.contract.d.ts.map +1 -1
- package/dist/call-history/call-history.contract.d.ts +718 -718
- package/dist/calls-feed/calls-feed.contract.d.ts +86 -86
- package/dist/client-contacts/client-contacts.contract.d.ts +469 -469
- package/dist/clients/clients.contract.d.ts +203 -203
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +2713 -2713
- package/dist/collaborations/collaborations.contract.d.ts +2270 -2270
- package/dist/common/common-schemas.d.ts +12 -12
- package/dist/companies/companies.contract.d.ts +74 -74
- package/dist/crews/crews.contract.d.ts +253 -253
- package/dist/cron-executions/cron-executions.contract.d.ts +182 -182
- package/dist/curated-worker-leads/candidate-coordination.contract.d.ts +2723 -2723
- package/dist/curated-worker-leads/candidate-edit-session.contract.d.ts +378 -378
- package/dist/curated-worker-leads/consent-queue.contract.d.ts +1117 -1087
- package/dist/curated-worker-leads/consent-queue.contract.d.ts.map +1 -1
- package/dist/curated-worker-leads/curated-worker-lead-config.contract.d.ts +16 -16
- package/dist/curated-worker-leads/curated-worker-leads.contract.d.ts +2 -2
- package/dist/curated-worker-leads/jobs-tab.contract.d.ts +5818 -5372
- package/dist/curated-worker-leads/jobs-tab.contract.d.ts.map +1 -1
- package/dist/curated-worker-leads/jobs-tab.contract.js +34 -1
- package/dist/curated-worker-leads/lead-agent-area.contract.d.ts +4 -4
- package/dist/curated-worker-leads/outreach-pool-summary.contract.spec.d.ts +2 -0
- package/dist/curated-worker-leads/outreach-pool-summary.contract.spec.d.ts.map +1 -0
- package/dist/curated-worker-leads/outreach-pool-summary.contract.spec.js +39 -0
- package/dist/curated-worker-leads/owned-jobs-tab.contract.d.ts +148 -148
- package/dist/curated-workers/curated-workers.contract.d.ts +789 -789
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +2 -2
- package/dist/dashboards/dashboard-widgets.contract.d.ts +180 -180
- package/dist/dashboards/dashboard.contract.d.ts +12 -12
- package/dist/document-intake/document-intake.contract.d.ts +601 -601
- package/dist/export-jobs/export-jobs.contract.d.ts +694 -694
- package/dist/exports-events/exports-events.schemas.d.ts +4 -4
- package/dist/files/files.contract.d.ts +74 -74
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/interactions/interactions.contract.d.ts +6 -6
- package/dist/job-clusters/job-clusters.contract.d.ts +112 -112
- package/dist/jobs/job-moderation-fields.spec.d.ts +2 -0
- package/dist/jobs/job-moderation-fields.spec.d.ts.map +1 -0
- package/dist/jobs/job-moderation-fields.spec.js +72 -0
- package/dist/jobs/jobs.contract.d.ts +4773 -4525
- package/dist/jobs/jobs.contract.d.ts.map +1 -1
- package/dist/jobs/jobs.contract.js +48 -0
- package/dist/kpi-impersonation/kpi-impersonation.contract.d.ts +141 -141
- package/dist/lead-assignments/lead-assignments.contract.d.ts +911 -911
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +209 -209
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +77 -77
- package/dist/leads/leads.contract.d.ts +283 -283
- package/dist/locations/locations.contract.d.ts +49 -49
- package/dist/notifications/notifications.contract.d.ts +67 -67
- package/dist/offices/offices.contract.d.ts +34 -34
- package/dist/outreach/__tests__/outreach-contract-additions.spec.js +11 -0
- package/dist/outreach/__tests__/outreach-requests.contract.spec.js +50 -0
- package/dist/outreach/__tests__/outreach-routes.test.js +14 -3
- package/dist/outreach/lab-outreach.contract.d.ts +1110 -0
- package/dist/outreach/lab-outreach.contract.d.ts.map +1 -0
- package/dist/outreach/lab-outreach.contract.js +174 -0
- package/dist/outreach/lab-outreach.contract.spec.d.ts +2 -0
- package/dist/outreach/lab-outreach.contract.spec.d.ts.map +1 -0
- package/dist/outreach/lab-outreach.contract.spec.js +90 -0
- package/dist/outreach/outreach-requests.contract.d.ts +946 -217
- package/dist/outreach/outreach-requests.contract.d.ts.map +1 -1
- package/dist/outreach/outreach-requests.contract.js +23 -3
- package/dist/outreach/outreach-requests.schemas.d.ts +65 -10
- package/dist/outreach/outreach-requests.schemas.d.ts.map +1 -1
- package/dist/outreach/outreach-requests.schemas.js +6 -0
- package/dist/outreach/outreach.contract.d.ts +300 -38
- package/dist/outreach/outreach.contract.d.ts.map +1 -1
- package/dist/outreach/outreach.contract.js +18 -0
- package/dist/outreach/outreach.contract.spec.d.ts +2 -0
- package/dist/outreach/outreach.contract.spec.d.ts.map +1 -0
- package/dist/outreach/outreach.contract.spec.js +57 -0
- package/dist/outreach/outreach.schemas.d.ts +2 -2
- package/dist/own-research/own-research.contract.d.ts +775 -775
- package/dist/postcodes/postcodes.contract.d.ts +24 -24
- package/dist/proofs/proof-type.enum.d.ts +4 -4
- package/dist/proofs/proofs.contract.d.ts +363 -363
- package/dist/proofs/proofs.dtos.d.ts +124 -124
- package/dist/qualifications/qualifications.contract.d.ts +38 -38
- package/dist/relay-pods/relay-lab-fleet.contract.d.ts +829 -0
- package/dist/relay-pods/relay-lab-fleet.contract.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.contract.js +79 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.d.ts +2 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.js +146 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.d.ts +443 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.js +138 -0
- package/dist/relay-pods/relay-pod-sessions.contract.d.ts +680 -0
- package/dist/relay-pods/relay-pod-sessions.contract.d.ts.map +1 -0
- package/dist/relay-pods/relay-pod-sessions.contract.js +67 -0
- package/dist/relay-pods/relay-pod-sessions.contract.spec.d.ts +2 -0
- package/dist/relay-pods/relay-pod-sessions.contract.spec.d.ts.map +1 -0
- package/dist/relay-pods/relay-pod-sessions.contract.spec.js +129 -0
- package/dist/relay-pods/relay-pods.contract.d.ts +1569 -0
- package/dist/relay-pods/relay-pods.contract.d.ts.map +1 -0
- package/dist/relay-pods/relay-pods.contract.js +188 -0
- package/dist/relay-pods/relay-pods.contract.spec.d.ts +2 -0
- package/dist/relay-pods/relay-pods.contract.spec.d.ts.map +1 -0
- package/dist/relay-pods/relay-pods.contract.spec.js +141 -0
- package/dist/relay-pods/relay-pods.schemas.d.ts +415 -0
- package/dist/relay-pods/relay-pods.schemas.d.ts.map +1 -0
- package/dist/relay-pods/relay-pods.schemas.js +112 -0
- package/dist/shared/live-booking.schema.d.ts +4 -4
- package/dist/shared/summary-schemas.d.ts +6 -6
- package/dist/sheets-sync/sheets-sync.contract.d.ts +939 -939
- package/dist/telegram/telegram.contract.d.ts +22 -22
- package/dist/trades/trades.contract.d.ts +90 -90
- package/dist/user-access-grants/user-access-grants.contract.d.ts +165 -165
- package/dist/users/__tests__/assignable-roles.spec.d.ts +2 -0
- package/dist/users/__tests__/assignable-roles.spec.d.ts.map +1 -0
- package/dist/users/__tests__/assignable-roles.spec.js +41 -0
- package/dist/users/users.contract.d.ts +399 -393
- package/dist/users/users.contract.d.ts.map +1 -1
- package/dist/users/users.contract.js +11 -0
- package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts +585 -527
- package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts.map +1 -1
- package/dist/worker-merge-proposals/worker-merge-proposals.contract.d.ts +278 -236
- package/dist/worker-merge-proposals/worker-merge-proposals.contract.d.ts.map +1 -1
- package/dist/worker-merge-proposals/worker-merge-proposals.contract.js +1 -0
- package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.d.ts +153 -153
- package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.schemas.d.ts +59 -59
- package/dist/workers/workers.contract.d.ts +2919 -2919
- package/package.json +1 -1
- package/dist/bookings/bookings.contract.spec.d.ts +0 -2
- package/dist/bookings/bookings.contract.spec.d.ts.map +0 -1
- package/dist/bookings/bookings.contract.spec.js +0 -11
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RelayPodStatusSchema: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
|
|
3
|
+
export declare const RelayPodSummarySchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
ownerUserId: z.ZodString;
|
|
8
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
9
|
+
publicBaseUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
status: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
id: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
ownerUserId: string;
|
|
16
|
+
ownerName: string | null;
|
|
17
|
+
publicBaseUrl: string;
|
|
18
|
+
status: "ACTIVE" | "INACTIVE";
|
|
19
|
+
}, {
|
|
20
|
+
id: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
ownerUserId: string;
|
|
24
|
+
ownerName: string | null;
|
|
25
|
+
publicBaseUrl: string;
|
|
26
|
+
status: "ACTIVE" | "INACTIVE";
|
|
27
|
+
}>;
|
|
28
|
+
export declare const RelayPodCredentialMetadataSchema: z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
tokenIdentifier: z.ZodString;
|
|
31
|
+
createdAt: z.ZodString;
|
|
32
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
33
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
34
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
35
|
+
}, "strict", z.ZodTypeAny, {
|
|
36
|
+
id: string;
|
|
37
|
+
tokenIdentifier: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
expiresAt: string | null;
|
|
40
|
+
revokedAt: string | null;
|
|
41
|
+
lastUsedAt: string | null;
|
|
42
|
+
}, {
|
|
43
|
+
id: string;
|
|
44
|
+
tokenIdentifier: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
expiresAt: string | null;
|
|
47
|
+
revokedAt: string | null;
|
|
48
|
+
lastUsedAt: string | null;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const RelayPodCredentialCreatedSchema: z.ZodObject<{
|
|
51
|
+
credential: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
tokenIdentifier: z.ZodString;
|
|
54
|
+
createdAt: z.ZodString;
|
|
55
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
56
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
57
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
58
|
+
}, "strict", z.ZodTypeAny, {
|
|
59
|
+
id: string;
|
|
60
|
+
tokenIdentifier: string;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
expiresAt: string | null;
|
|
63
|
+
revokedAt: string | null;
|
|
64
|
+
lastUsedAt: string | null;
|
|
65
|
+
}, {
|
|
66
|
+
id: string;
|
|
67
|
+
tokenIdentifier: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
expiresAt: string | null;
|
|
70
|
+
revokedAt: string | null;
|
|
71
|
+
lastUsedAt: string | null;
|
|
72
|
+
}>;
|
|
73
|
+
token: z.ZodString;
|
|
74
|
+
}, "strict", z.ZodTypeAny, {
|
|
75
|
+
credential: {
|
|
76
|
+
id: string;
|
|
77
|
+
tokenIdentifier: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
expiresAt: string | null;
|
|
80
|
+
revokedAt: string | null;
|
|
81
|
+
lastUsedAt: string | null;
|
|
82
|
+
};
|
|
83
|
+
token: string;
|
|
84
|
+
}, {
|
|
85
|
+
credential: {
|
|
86
|
+
id: string;
|
|
87
|
+
tokenIdentifier: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
expiresAt: string | null;
|
|
90
|
+
revokedAt: string | null;
|
|
91
|
+
lastUsedAt: string | null;
|
|
92
|
+
};
|
|
93
|
+
token: string;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const RelayPodSchema: z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
slug: z.ZodString;
|
|
98
|
+
displayName: z.ZodString;
|
|
99
|
+
ownerUserId: z.ZodString;
|
|
100
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
101
|
+
publicBaseUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
102
|
+
status: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
|
|
103
|
+
} & {
|
|
104
|
+
credentials: z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
tokenIdentifier: z.ZodString;
|
|
107
|
+
createdAt: z.ZodString;
|
|
108
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
109
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
110
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
111
|
+
}, "strict", z.ZodTypeAny, {
|
|
112
|
+
id: string;
|
|
113
|
+
tokenIdentifier: string;
|
|
114
|
+
createdAt: string;
|
|
115
|
+
expiresAt: string | null;
|
|
116
|
+
revokedAt: string | null;
|
|
117
|
+
lastUsedAt: string | null;
|
|
118
|
+
}, {
|
|
119
|
+
id: string;
|
|
120
|
+
tokenIdentifier: string;
|
|
121
|
+
createdAt: string;
|
|
122
|
+
expiresAt: string | null;
|
|
123
|
+
revokedAt: string | null;
|
|
124
|
+
lastUsedAt: string | null;
|
|
125
|
+
}>, "many">;
|
|
126
|
+
createdAt: z.ZodString;
|
|
127
|
+
updatedAt: z.ZodString;
|
|
128
|
+
}, "strict", z.ZodTypeAny, {
|
|
129
|
+
id: string;
|
|
130
|
+
slug: string;
|
|
131
|
+
displayName: string;
|
|
132
|
+
ownerUserId: string;
|
|
133
|
+
ownerName: string | null;
|
|
134
|
+
publicBaseUrl: string;
|
|
135
|
+
status: "ACTIVE" | "INACTIVE";
|
|
136
|
+
createdAt: string;
|
|
137
|
+
credentials: {
|
|
138
|
+
id: string;
|
|
139
|
+
tokenIdentifier: string;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
expiresAt: string | null;
|
|
142
|
+
revokedAt: string | null;
|
|
143
|
+
lastUsedAt: string | null;
|
|
144
|
+
}[];
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
}, {
|
|
147
|
+
id: string;
|
|
148
|
+
slug: string;
|
|
149
|
+
displayName: string;
|
|
150
|
+
ownerUserId: string;
|
|
151
|
+
ownerName: string | null;
|
|
152
|
+
publicBaseUrl: string;
|
|
153
|
+
status: "ACTIVE" | "INACTIVE";
|
|
154
|
+
createdAt: string;
|
|
155
|
+
credentials: {
|
|
156
|
+
id: string;
|
|
157
|
+
tokenIdentifier: string;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
expiresAt: string | null;
|
|
160
|
+
revokedAt: string | null;
|
|
161
|
+
lastUsedAt: string | null;
|
|
162
|
+
}[];
|
|
163
|
+
updatedAt: string;
|
|
164
|
+
}>;
|
|
165
|
+
export declare const RelayAbilityConditionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>;
|
|
166
|
+
export declare const RelayAbilityRuleSchema: z.ZodObject<{
|
|
167
|
+
action: z.ZodString;
|
|
168
|
+
subject: z.ZodString;
|
|
169
|
+
conditions: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
|
|
170
|
+
inverted: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
}, "strict", z.ZodTypeAny, {
|
|
172
|
+
action: string;
|
|
173
|
+
subject: string;
|
|
174
|
+
conditions?: Record<string, unknown> | undefined;
|
|
175
|
+
inverted?: boolean | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
action: string;
|
|
178
|
+
subject: string;
|
|
179
|
+
conditions?: Record<string, unknown> | undefined;
|
|
180
|
+
inverted?: boolean | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
export declare const RelayPodSessionExchangeSchema: z.ZodObject<{
|
|
183
|
+
sessionId: z.ZodString;
|
|
184
|
+
expiresAt: z.ZodString;
|
|
185
|
+
accessType: z.ZodEnum<["OWNER", "ADMIN"]>;
|
|
186
|
+
user: z.ZodObject<{
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
email: z.ZodString;
|
|
189
|
+
displayName: z.ZodString;
|
|
190
|
+
impersonatedBy: z.ZodNullable<z.ZodString>;
|
|
191
|
+
}, "strict", z.ZodTypeAny, {
|
|
192
|
+
id: string;
|
|
193
|
+
displayName: string;
|
|
194
|
+
email: string;
|
|
195
|
+
impersonatedBy: string | null;
|
|
196
|
+
}, {
|
|
197
|
+
id: string;
|
|
198
|
+
displayName: string;
|
|
199
|
+
email: string;
|
|
200
|
+
impersonatedBy: string | null;
|
|
201
|
+
}>;
|
|
202
|
+
pod: z.ZodObject<{
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
slug: z.ZodString;
|
|
205
|
+
displayName: z.ZodString;
|
|
206
|
+
ownerUserId: z.ZodString;
|
|
207
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
208
|
+
publicBaseUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
209
|
+
status: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
|
|
210
|
+
}, "strict", z.ZodTypeAny, {
|
|
211
|
+
id: string;
|
|
212
|
+
slug: string;
|
|
213
|
+
displayName: string;
|
|
214
|
+
ownerUserId: string;
|
|
215
|
+
ownerName: string | null;
|
|
216
|
+
publicBaseUrl: string;
|
|
217
|
+
status: "ACTIVE" | "INACTIVE";
|
|
218
|
+
}, {
|
|
219
|
+
id: string;
|
|
220
|
+
slug: string;
|
|
221
|
+
displayName: string;
|
|
222
|
+
ownerUserId: string;
|
|
223
|
+
ownerName: string | null;
|
|
224
|
+
publicBaseUrl: string;
|
|
225
|
+
status: "ACTIVE" | "INACTIVE";
|
|
226
|
+
}>;
|
|
227
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
228
|
+
action: z.ZodString;
|
|
229
|
+
subject: z.ZodString;
|
|
230
|
+
conditions: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
|
|
231
|
+
inverted: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
}, "strict", z.ZodTypeAny, {
|
|
233
|
+
action: string;
|
|
234
|
+
subject: string;
|
|
235
|
+
conditions?: Record<string, unknown> | undefined;
|
|
236
|
+
inverted?: boolean | undefined;
|
|
237
|
+
}, {
|
|
238
|
+
action: string;
|
|
239
|
+
subject: string;
|
|
240
|
+
conditions?: Record<string, unknown> | undefined;
|
|
241
|
+
inverted?: boolean | undefined;
|
|
242
|
+
}>, "many">;
|
|
243
|
+
}, "strict", z.ZodTypeAny, {
|
|
244
|
+
expiresAt: string;
|
|
245
|
+
sessionId: string;
|
|
246
|
+
accessType: "OWNER" | "ADMIN";
|
|
247
|
+
user: {
|
|
248
|
+
id: string;
|
|
249
|
+
displayName: string;
|
|
250
|
+
email: string;
|
|
251
|
+
impersonatedBy: string | null;
|
|
252
|
+
};
|
|
253
|
+
pod: {
|
|
254
|
+
id: string;
|
|
255
|
+
slug: string;
|
|
256
|
+
displayName: string;
|
|
257
|
+
ownerUserId: string;
|
|
258
|
+
ownerName: string | null;
|
|
259
|
+
publicBaseUrl: string;
|
|
260
|
+
status: "ACTIVE" | "INACTIVE";
|
|
261
|
+
};
|
|
262
|
+
rules: {
|
|
263
|
+
action: string;
|
|
264
|
+
subject: string;
|
|
265
|
+
conditions?: Record<string, unknown> | undefined;
|
|
266
|
+
inverted?: boolean | undefined;
|
|
267
|
+
}[];
|
|
268
|
+
}, {
|
|
269
|
+
expiresAt: string;
|
|
270
|
+
sessionId: string;
|
|
271
|
+
accessType: "OWNER" | "ADMIN";
|
|
272
|
+
user: {
|
|
273
|
+
id: string;
|
|
274
|
+
displayName: string;
|
|
275
|
+
email: string;
|
|
276
|
+
impersonatedBy: string | null;
|
|
277
|
+
};
|
|
278
|
+
pod: {
|
|
279
|
+
id: string;
|
|
280
|
+
slug: string;
|
|
281
|
+
displayName: string;
|
|
282
|
+
ownerUserId: string;
|
|
283
|
+
ownerName: string | null;
|
|
284
|
+
publicBaseUrl: string;
|
|
285
|
+
status: "ACTIVE" | "INACTIVE";
|
|
286
|
+
};
|
|
287
|
+
rules: {
|
|
288
|
+
action: string;
|
|
289
|
+
subject: string;
|
|
290
|
+
conditions?: Record<string, unknown> | undefined;
|
|
291
|
+
inverted?: boolean | undefined;
|
|
292
|
+
}[];
|
|
293
|
+
}>;
|
|
294
|
+
export declare const RelayPodSessionValidationSchema: z.ZodObject<{
|
|
295
|
+
sessionId: z.ZodString;
|
|
296
|
+
expiresAt: z.ZodString;
|
|
297
|
+
accessType: z.ZodEnum<["OWNER", "ADMIN"]>;
|
|
298
|
+
user: z.ZodObject<{
|
|
299
|
+
id: z.ZodString;
|
|
300
|
+
email: z.ZodString;
|
|
301
|
+
displayName: z.ZodString;
|
|
302
|
+
impersonatedBy: z.ZodNullable<z.ZodString>;
|
|
303
|
+
}, "strict", z.ZodTypeAny, {
|
|
304
|
+
id: string;
|
|
305
|
+
displayName: string;
|
|
306
|
+
email: string;
|
|
307
|
+
impersonatedBy: string | null;
|
|
308
|
+
}, {
|
|
309
|
+
id: string;
|
|
310
|
+
displayName: string;
|
|
311
|
+
email: string;
|
|
312
|
+
impersonatedBy: string | null;
|
|
313
|
+
}>;
|
|
314
|
+
pod: z.ZodObject<{
|
|
315
|
+
id: z.ZodString;
|
|
316
|
+
slug: z.ZodString;
|
|
317
|
+
displayName: z.ZodString;
|
|
318
|
+
ownerUserId: z.ZodString;
|
|
319
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
320
|
+
publicBaseUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
321
|
+
status: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
|
|
322
|
+
}, "strict", z.ZodTypeAny, {
|
|
323
|
+
id: string;
|
|
324
|
+
slug: string;
|
|
325
|
+
displayName: string;
|
|
326
|
+
ownerUserId: string;
|
|
327
|
+
ownerName: string | null;
|
|
328
|
+
publicBaseUrl: string;
|
|
329
|
+
status: "ACTIVE" | "INACTIVE";
|
|
330
|
+
}, {
|
|
331
|
+
id: string;
|
|
332
|
+
slug: string;
|
|
333
|
+
displayName: string;
|
|
334
|
+
ownerUserId: string;
|
|
335
|
+
ownerName: string | null;
|
|
336
|
+
publicBaseUrl: string;
|
|
337
|
+
status: "ACTIVE" | "INACTIVE";
|
|
338
|
+
}>;
|
|
339
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
340
|
+
action: z.ZodString;
|
|
341
|
+
subject: z.ZodString;
|
|
342
|
+
conditions: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
|
|
343
|
+
inverted: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
}, "strict", z.ZodTypeAny, {
|
|
345
|
+
action: string;
|
|
346
|
+
subject: string;
|
|
347
|
+
conditions?: Record<string, unknown> | undefined;
|
|
348
|
+
inverted?: boolean | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
action: string;
|
|
351
|
+
subject: string;
|
|
352
|
+
conditions?: Record<string, unknown> | undefined;
|
|
353
|
+
inverted?: boolean | undefined;
|
|
354
|
+
}>, "many">;
|
|
355
|
+
}, "strict", z.ZodTypeAny, {
|
|
356
|
+
expiresAt: string;
|
|
357
|
+
sessionId: string;
|
|
358
|
+
accessType: "OWNER" | "ADMIN";
|
|
359
|
+
user: {
|
|
360
|
+
id: string;
|
|
361
|
+
displayName: string;
|
|
362
|
+
email: string;
|
|
363
|
+
impersonatedBy: string | null;
|
|
364
|
+
};
|
|
365
|
+
pod: {
|
|
366
|
+
id: string;
|
|
367
|
+
slug: string;
|
|
368
|
+
displayName: string;
|
|
369
|
+
ownerUserId: string;
|
|
370
|
+
ownerName: string | null;
|
|
371
|
+
publicBaseUrl: string;
|
|
372
|
+
status: "ACTIVE" | "INACTIVE";
|
|
373
|
+
};
|
|
374
|
+
rules: {
|
|
375
|
+
action: string;
|
|
376
|
+
subject: string;
|
|
377
|
+
conditions?: Record<string, unknown> | undefined;
|
|
378
|
+
inverted?: boolean | undefined;
|
|
379
|
+
}[];
|
|
380
|
+
}, {
|
|
381
|
+
expiresAt: string;
|
|
382
|
+
sessionId: string;
|
|
383
|
+
accessType: "OWNER" | "ADMIN";
|
|
384
|
+
user: {
|
|
385
|
+
id: string;
|
|
386
|
+
displayName: string;
|
|
387
|
+
email: string;
|
|
388
|
+
impersonatedBy: string | null;
|
|
389
|
+
};
|
|
390
|
+
pod: {
|
|
391
|
+
id: string;
|
|
392
|
+
slug: string;
|
|
393
|
+
displayName: string;
|
|
394
|
+
ownerUserId: string;
|
|
395
|
+
ownerName: string | null;
|
|
396
|
+
publicBaseUrl: string;
|
|
397
|
+
status: "ACTIVE" | "INACTIVE";
|
|
398
|
+
};
|
|
399
|
+
rules: {
|
|
400
|
+
action: string;
|
|
401
|
+
subject: string;
|
|
402
|
+
conditions?: Record<string, unknown> | undefined;
|
|
403
|
+
inverted?: boolean | undefined;
|
|
404
|
+
}[];
|
|
405
|
+
}>;
|
|
406
|
+
export type RelayPodStatus = z.infer<typeof RelayPodStatusSchema>;
|
|
407
|
+
export type RelayPodSummary = z.infer<typeof RelayPodSummarySchema>;
|
|
408
|
+
export type RelayPodCredentialMetadata = z.infer<typeof RelayPodCredentialMetadataSchema>;
|
|
409
|
+
export type RelayPodCredentialCreated = z.infer<typeof RelayPodCredentialCreatedSchema>;
|
|
410
|
+
export type RelayPod = z.infer<typeof RelayPodSchema>;
|
|
411
|
+
export type RelayAbilityConditions = z.infer<typeof RelayAbilityConditionsSchema>;
|
|
412
|
+
export type RelayAbilityRule = z.infer<typeof RelayAbilityRuleSchema>;
|
|
413
|
+
export type RelayPodSessionExchange = z.infer<typeof RelayPodSessionExchangeSchema>;
|
|
414
|
+
export type RelayPodSessionValidation = z.infer<typeof RelayPodSessionValidationSchema>;
|
|
415
|
+
//# sourceMappingURL=relay-pods.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relay-pods.schemas.d.ts","sourceRoot":"","sources":["../../contracts/relay-pods/relay-pods.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB,mCAEM,CAAC;AAExC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAgBM,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;EAUM,CAAC;AAEpD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMM,CAAC;AAEnD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMM,CAAC;AAiClC,eAAO,MAAM,4BAA4B,wGASrC,CAAC;AAEL,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAQM,CAAC;AAkB1C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGM,CAAC;AAEjD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGM,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RelayPodSessionValidationSchema = exports.RelayPodSessionExchangeSchema = exports.RelayAbilityRuleSchema = exports.RelayAbilityConditionsSchema = exports.RelayPodSchema = exports.RelayPodCredentialCreatedSchema = exports.RelayPodCredentialMetadataSchema = exports.RelayPodSummarySchema = exports.RelayPodStatusSchema = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
7
|
+
exports.RelayPodStatusSchema = zod_1.z
|
|
8
|
+
.enum(['ACTIVE', 'INACTIVE'])
|
|
9
|
+
.openapi({ title: 'RelayPodStatus' });
|
|
10
|
+
exports.RelayPodSummarySchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
id: zod_1.z.string().uuid(),
|
|
13
|
+
slug: zod_1.z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
14
|
+
displayName: zod_1.z.string().min(1).max(100),
|
|
15
|
+
ownerUserId: zod_1.z.string().uuid(),
|
|
16
|
+
ownerName: zod_1.z.string().nullable(),
|
|
17
|
+
publicBaseUrl: zod_1.z
|
|
18
|
+
.string()
|
|
19
|
+
.url()
|
|
20
|
+
.refine((url) => new URL(url).protocol === 'https:', {
|
|
21
|
+
message: 'Relay pod URLs must use HTTPS',
|
|
22
|
+
}),
|
|
23
|
+
status: exports.RelayPodStatusSchema,
|
|
24
|
+
})
|
|
25
|
+
.strict()
|
|
26
|
+
.openapi({ title: 'RelayPodSummary' });
|
|
27
|
+
exports.RelayPodCredentialMetadataSchema = zod_1.z
|
|
28
|
+
.object({
|
|
29
|
+
id: zod_1.z.string().uuid(),
|
|
30
|
+
tokenIdentifier: zod_1.z.string().min(1),
|
|
31
|
+
createdAt: zod_1.z.string().datetime(),
|
|
32
|
+
expiresAt: zod_1.z.string().datetime().nullable(),
|
|
33
|
+
revokedAt: zod_1.z.string().datetime().nullable(),
|
|
34
|
+
lastUsedAt: zod_1.z.string().datetime().nullable(),
|
|
35
|
+
})
|
|
36
|
+
.strict()
|
|
37
|
+
.openapi({ title: 'RelayPodCredentialMetadata' });
|
|
38
|
+
exports.RelayPodCredentialCreatedSchema = zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
credential: exports.RelayPodCredentialMetadataSchema,
|
|
41
|
+
token: zod_1.z.string().min(1),
|
|
42
|
+
})
|
|
43
|
+
.strict()
|
|
44
|
+
.openapi({ title: 'RelayPodCredentialCreated' });
|
|
45
|
+
exports.RelayPodSchema = exports.RelayPodSummarySchema.extend({
|
|
46
|
+
credentials: zod_1.z.array(exports.RelayPodCredentialMetadataSchema),
|
|
47
|
+
createdAt: zod_1.z.string().datetime(),
|
|
48
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
49
|
+
})
|
|
50
|
+
.strict()
|
|
51
|
+
.openapi({ title: 'RelayPod' });
|
|
52
|
+
const FORBIDDEN_RELAY_CONDITION_KEYS = new Set([
|
|
53
|
+
'secretHash',
|
|
54
|
+
'codeHash',
|
|
55
|
+
'token',
|
|
56
|
+
]);
|
|
57
|
+
function containsForbiddenRelayConditionKey(value, seen = new WeakSet()) {
|
|
58
|
+
if (value === null || typeof value !== 'object') {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
if (seen.has(value)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
seen.add(value);
|
|
65
|
+
if (Array.isArray(value)) {
|
|
66
|
+
return value.some((entry) => containsForbiddenRelayConditionKey(entry, seen));
|
|
67
|
+
}
|
|
68
|
+
return Object.entries(value).some(([key, entry]) => FORBIDDEN_RELAY_CONDITION_KEYS.has(key) ||
|
|
69
|
+
containsForbiddenRelayConditionKey(entry, seen));
|
|
70
|
+
}
|
|
71
|
+
exports.RelayAbilityConditionsSchema = zod_1.z
|
|
72
|
+
.record(zod_1.z.unknown())
|
|
73
|
+
.superRefine((conditions, context) => {
|
|
74
|
+
if (containsForbiddenRelayConditionKey(conditions)) {
|
|
75
|
+
context.addIssue({
|
|
76
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
77
|
+
message: 'Relay ability conditions must not contain secret material',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
exports.RelayAbilityRuleSchema = zod_1.z
|
|
82
|
+
.object({
|
|
83
|
+
action: zod_1.z.string().min(1),
|
|
84
|
+
subject: zod_1.z.string().min(1),
|
|
85
|
+
conditions: exports.RelayAbilityConditionsSchema.optional(),
|
|
86
|
+
inverted: zod_1.z.boolean().optional(),
|
|
87
|
+
})
|
|
88
|
+
.strict()
|
|
89
|
+
.openapi({ title: 'RelayAbilityRule' });
|
|
90
|
+
const RelayPodSessionSnapshotShape = {
|
|
91
|
+
sessionId: zod_1.z.string().uuid(),
|
|
92
|
+
expiresAt: zod_1.z.string().datetime(),
|
|
93
|
+
accessType: zod_1.z.enum(['OWNER', 'ADMIN']),
|
|
94
|
+
user: zod_1.z
|
|
95
|
+
.object({
|
|
96
|
+
id: zod_1.z.string().uuid(),
|
|
97
|
+
email: zod_1.z.string().email(),
|
|
98
|
+
displayName: zod_1.z.string(),
|
|
99
|
+
impersonatedBy: zod_1.z.string().uuid().nullable(),
|
|
100
|
+
})
|
|
101
|
+
.strict(),
|
|
102
|
+
pod: exports.RelayPodSummarySchema,
|
|
103
|
+
rules: zod_1.z.array(exports.RelayAbilityRuleSchema),
|
|
104
|
+
};
|
|
105
|
+
exports.RelayPodSessionExchangeSchema = zod_1.z
|
|
106
|
+
.object(RelayPodSessionSnapshotShape)
|
|
107
|
+
.strict()
|
|
108
|
+
.openapi({ title: 'RelayPodSessionExchange' });
|
|
109
|
+
exports.RelayPodSessionValidationSchema = zod_1.z
|
|
110
|
+
.object(RelayPodSessionSnapshotShape)
|
|
111
|
+
.strict()
|
|
112
|
+
.openapi({ title: 'RelayPodSessionValidation' });
|
|
@@ -23,12 +23,12 @@ export declare const LiveBookingSummarySchema: z.ZodObject<{
|
|
|
23
23
|
lastName: z.ZodString;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
id: string;
|
|
26
|
-
lastName: string;
|
|
27
26
|
firstName: string;
|
|
27
|
+
lastName: string;
|
|
28
28
|
}, {
|
|
29
29
|
id: string;
|
|
30
|
-
lastName: string;
|
|
31
30
|
firstName: string;
|
|
31
|
+
lastName: string;
|
|
32
32
|
}>>;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
34
|
startDate: string | null;
|
|
@@ -38,8 +38,8 @@ export declare const LiveBookingSummarySchema: z.ZodObject<{
|
|
|
38
38
|
isActive: boolean;
|
|
39
39
|
bookedBy: {
|
|
40
40
|
id: string;
|
|
41
|
-
lastName: string;
|
|
42
41
|
firstName: string;
|
|
42
|
+
lastName: string;
|
|
43
43
|
} | null;
|
|
44
44
|
}, {
|
|
45
45
|
startDate: string | null;
|
|
@@ -49,8 +49,8 @@ export declare const LiveBookingSummarySchema: z.ZodObject<{
|
|
|
49
49
|
isActive: boolean;
|
|
50
50
|
bookedBy: {
|
|
51
51
|
id: string;
|
|
52
|
-
lastName: string;
|
|
53
52
|
firstName: string;
|
|
53
|
+
lastName: string;
|
|
54
54
|
} | null;
|
|
55
55
|
}>;
|
|
56
56
|
export type LiveBookingSummary = z.infer<typeof LiveBookingSummarySchema>;
|
|
@@ -83,14 +83,14 @@ export declare const LocationSummarySchema: z.ZodObject<{
|
|
|
83
83
|
address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
84
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
85
|
postcode?: string | null | undefined;
|
|
86
|
-
postTown?: string | null | undefined;
|
|
87
|
-
adminDistrict?: string | null | undefined;
|
|
88
86
|
address?: string | null | undefined;
|
|
87
|
+
adminDistrict?: string | null | undefined;
|
|
88
|
+
postTown?: string | null | undefined;
|
|
89
89
|
}, {
|
|
90
90
|
postcode?: string | null | undefined;
|
|
91
|
-
postTown?: string | null | undefined;
|
|
92
|
-
adminDistrict?: string | null | undefined;
|
|
93
91
|
address?: string | null | undefined;
|
|
92
|
+
adminDistrict?: string | null | undefined;
|
|
93
|
+
postTown?: string | null | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
export declare const CollaborationSummarySchema: z.ZodObject<{
|
|
96
96
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -161,8 +161,8 @@ export declare const CollaborationSummarySchema: z.ZodObject<{
|
|
|
161
161
|
deletedAt?: string | Date | null | undefined;
|
|
162
162
|
}>>>;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
id?: string | null | undefined;
|
|
165
164
|
status?: string | null | undefined;
|
|
165
|
+
id?: string | null | undefined;
|
|
166
166
|
userId?: string | null | undefined;
|
|
167
167
|
client?: {
|
|
168
168
|
id: string;
|
|
@@ -185,8 +185,8 @@ export declare const CollaborationSummarySchema: z.ZodObject<{
|
|
|
185
185
|
deletedAt?: string | null | undefined;
|
|
186
186
|
} | null | undefined;
|
|
187
187
|
}, {
|
|
188
|
-
id?: string | null | undefined;
|
|
189
188
|
status?: string | null | undefined;
|
|
189
|
+
id?: string | null | undefined;
|
|
190
190
|
userId?: string | null | undefined;
|
|
191
191
|
client?: {
|
|
192
192
|
id: string;
|