@alpic-ai/api 0.0.0-staging.gc67971e → 0.0.0-staging.gc8bbd5f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +80 -59
- package/dist/index.mjs +388 -210
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _$_orpc_contract0 from "@orpc/contract";
|
|
3
2
|
import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
|
|
4
3
|
|
|
5
4
|
//#region src/api.contract.d.ts
|
|
@@ -16,7 +15,7 @@ declare const deploymentStatusSchema: z.ZodEnum<{
|
|
|
16
15
|
failed: "failed";
|
|
17
16
|
canceled: "canceled";
|
|
18
17
|
}>;
|
|
19
|
-
declare const createEnvironmentContractV1:
|
|
18
|
+
declare const createEnvironmentContractV1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
20
19
|
projectId: z.ZodString;
|
|
21
20
|
name: z.ZodString;
|
|
22
21
|
sourceBranch: z.ZodString;
|
|
@@ -29,17 +28,17 @@ declare const createEnvironmentContractV1: _$_orpc_contract0.ContractProcedureBu
|
|
|
29
28
|
id: z.ZodString;
|
|
30
29
|
name: z.ZodString;
|
|
31
30
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
32
|
-
urls: z.ZodArray<z.
|
|
31
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
33
32
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
34
33
|
projectId: z.ZodString;
|
|
35
|
-
}, z.core.$strip>,
|
|
34
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
36
35
|
NOT_FOUND: {};
|
|
37
36
|
BAD_REQUEST: {};
|
|
38
37
|
}>, Record<never, never>>;
|
|
39
38
|
declare const contract: {
|
|
40
39
|
teams: {
|
|
41
40
|
list: {
|
|
42
|
-
v1:
|
|
41
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
43
42
|
id: z.ZodString;
|
|
44
43
|
name: z.ZodString;
|
|
45
44
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -49,7 +48,7 @@ declare const contract: {
|
|
|
49
48
|
};
|
|
50
49
|
analytics: {
|
|
51
50
|
get: {
|
|
52
|
-
v1:
|
|
51
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
53
52
|
projectId: z.ZodString;
|
|
54
53
|
startTimestamp: z.ZodCoercedNumber<unknown>;
|
|
55
54
|
endTimestamp: z.ZodCoercedNumber<unknown>;
|
|
@@ -92,7 +91,7 @@ declare const contract: {
|
|
|
92
91
|
categories: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
93
92
|
}, z.core.$strip>>;
|
|
94
93
|
}, z.core.$strip>;
|
|
95
|
-
}, z.core.$strip>,
|
|
94
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
96
95
|
NOT_FOUND: {};
|
|
97
96
|
BAD_REQUEST: {};
|
|
98
97
|
}>, Record<never, never>>;
|
|
@@ -100,7 +99,7 @@ declare const contract: {
|
|
|
100
99
|
};
|
|
101
100
|
deployments: {
|
|
102
101
|
list: {
|
|
103
|
-
v1:
|
|
102
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
104
103
|
projectId: z.ZodString;
|
|
105
104
|
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
106
105
|
ongoing: "ongoing";
|
|
@@ -128,12 +127,12 @@ declare const contract: {
|
|
|
128
127
|
environmentName: z.ZodString;
|
|
129
128
|
isCurrent: z.ZodBoolean;
|
|
130
129
|
deploymentPageUrl: z.ZodNullable<z.ZodURL>;
|
|
131
|
-
}, z.core.$strip>>,
|
|
130
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
132
131
|
NOT_FOUND: {};
|
|
133
132
|
}>, Record<never, never>>;
|
|
134
133
|
};
|
|
135
134
|
get: {
|
|
136
|
-
v1:
|
|
135
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
137
136
|
deploymentId: z.ZodString;
|
|
138
137
|
}, z.core.$strip>, z.ZodObject<{
|
|
139
138
|
id: z.ZodString;
|
|
@@ -154,21 +153,24 @@ declare const contract: {
|
|
|
154
153
|
environmentName: z.ZodString;
|
|
155
154
|
isCurrent: z.ZodBoolean;
|
|
156
155
|
deploymentPageUrl: z.ZodNullable<z.ZodURL>;
|
|
157
|
-
}, z.core.$strip>,
|
|
156
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
158
157
|
NOT_FOUND: {};
|
|
159
158
|
}>, Record<never, never>>;
|
|
160
159
|
};
|
|
161
160
|
uploadArtifact: {
|
|
162
|
-
v1:
|
|
161
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
163
162
|
teamId: z.ZodOptional<z.ZodString>;
|
|
164
163
|
}, z.core.$strip>>, z.ZodObject<{
|
|
165
164
|
uploadUrl: z.ZodURL;
|
|
166
165
|
token: z.ZodString;
|
|
167
166
|
expiresAt: z.ZodCoercedDate<unknown>;
|
|
168
|
-
}, z.core.$strip>, Record<never, never>,
|
|
167
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
168
|
+
NOT_FOUND: {};
|
|
169
|
+
BAD_REQUEST: {};
|
|
170
|
+
}>, Record<never, never>>;
|
|
169
171
|
};
|
|
170
172
|
getLogs: {
|
|
171
|
-
v1:
|
|
173
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
172
174
|
deploymentId: z.ZodString;
|
|
173
175
|
}, z.core.$strip>, z.ZodObject<{
|
|
174
176
|
logs: z.ZodArray<z.ZodObject<{
|
|
@@ -176,14 +178,14 @@ declare const contract: {
|
|
|
176
178
|
content: z.ZodOptional<z.ZodString>;
|
|
177
179
|
}, z.core.$strip>>;
|
|
178
180
|
hasMoreLogs: z.ZodBoolean;
|
|
179
|
-
}, z.core.$strip>,
|
|
181
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
180
182
|
NOT_FOUND: {};
|
|
181
183
|
}>, Record<never, never>>;
|
|
182
184
|
};
|
|
183
185
|
};
|
|
184
186
|
environments: {
|
|
185
187
|
create: {
|
|
186
|
-
v1:
|
|
188
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
187
189
|
projectId: z.ZodString;
|
|
188
190
|
name: z.ZodString;
|
|
189
191
|
sourceBranch: z.ZodString;
|
|
@@ -196,16 +198,16 @@ declare const contract: {
|
|
|
196
198
|
id: z.ZodString;
|
|
197
199
|
name: z.ZodString;
|
|
198
200
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
199
|
-
urls: z.ZodArray<z.
|
|
201
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
200
202
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
201
203
|
projectId: z.ZodString;
|
|
202
|
-
}, z.core.$strip>,
|
|
204
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
203
205
|
NOT_FOUND: {};
|
|
204
206
|
BAD_REQUEST: {};
|
|
205
207
|
}>, Record<never, never>>;
|
|
206
208
|
};
|
|
207
209
|
get: {
|
|
208
|
-
v1:
|
|
210
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
209
211
|
environmentId: z.ZodString;
|
|
210
212
|
}, z.core.$strip>, z.ZodObject<{
|
|
211
213
|
id: z.ZodString;
|
|
@@ -215,12 +217,12 @@ declare const contract: {
|
|
|
215
217
|
domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
|
|
216
218
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
217
219
|
projectId: z.ZodString;
|
|
218
|
-
}, z.core.$strip>,
|
|
220
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
219
221
|
NOT_FOUND: {};
|
|
220
222
|
}>, Record<never, never>>;
|
|
221
223
|
};
|
|
222
224
|
deploy: {
|
|
223
|
-
v1:
|
|
225
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
224
226
|
environmentId: z.ZodString;
|
|
225
227
|
token: z.ZodOptional<z.ZodString>;
|
|
226
228
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -242,13 +244,13 @@ declare const contract: {
|
|
|
242
244
|
environmentName: z.ZodString;
|
|
243
245
|
isCurrent: z.ZodBoolean;
|
|
244
246
|
deploymentPageUrl: z.ZodNullable<z.ZodURL>;
|
|
245
|
-
}, z.core.$strip>,
|
|
247
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
246
248
|
NOT_FOUND: {};
|
|
247
249
|
BAD_REQUEST: {};
|
|
248
250
|
}>, Record<never, never>>;
|
|
249
251
|
};
|
|
250
252
|
getLogs: {
|
|
251
|
-
v1:
|
|
253
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
252
254
|
environmentId: z.ZodString;
|
|
253
255
|
since: z.ZodOptional<z.ZodString>;
|
|
254
256
|
until: z.ZodOptional<z.ZodString>;
|
|
@@ -278,13 +280,13 @@ declare const contract: {
|
|
|
278
280
|
durationInMs: z.ZodOptional<z.ZodNumber>;
|
|
279
281
|
}, z.core.$strip>>;
|
|
280
282
|
nextToken: z.ZodNullable<z.ZodString>;
|
|
281
|
-
}, z.core.$strip>,
|
|
283
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
282
284
|
NOT_FOUND: {};
|
|
283
285
|
BAD_REQUEST: {};
|
|
284
286
|
}>, Record<never, never>>;
|
|
285
287
|
};
|
|
286
288
|
getLatestLogs: {
|
|
287
|
-
v1:
|
|
289
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
288
290
|
environmentId: z.ZodString;
|
|
289
291
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
290
292
|
level: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -310,7 +312,7 @@ declare const contract: {
|
|
|
310
312
|
method: z.ZodOptional<z.ZodString>;
|
|
311
313
|
durationInMs: z.ZodOptional<z.ZodNumber>;
|
|
312
314
|
}, z.core.$strip>>;
|
|
313
|
-
}, z.core.$strip>,
|
|
315
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
314
316
|
NOT_FOUND: {};
|
|
315
317
|
BAD_REQUEST: {};
|
|
316
318
|
}>, Record<never, never>>;
|
|
@@ -318,7 +320,7 @@ declare const contract: {
|
|
|
318
320
|
};
|
|
319
321
|
environmentVariables: {
|
|
320
322
|
list: {
|
|
321
|
-
v1:
|
|
323
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
322
324
|
environmentId: z.ZodString;
|
|
323
325
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
324
326
|
id: z.ZodString;
|
|
@@ -326,12 +328,12 @@ declare const contract: {
|
|
|
326
328
|
value: z.ZodString;
|
|
327
329
|
isSecret: z.ZodBoolean;
|
|
328
330
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
329
|
-
}, z.core.$strip>>,
|
|
331
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
330
332
|
NOT_FOUND: {};
|
|
331
333
|
}>, Record<never, never>>;
|
|
332
334
|
};
|
|
333
335
|
create: {
|
|
334
|
-
v1:
|
|
336
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
335
337
|
environmentId: z.ZodString;
|
|
336
338
|
environmentVariables: z.ZodArray<z.ZodObject<{
|
|
337
339
|
key: z.ZodString;
|
|
@@ -340,37 +342,38 @@ declare const contract: {
|
|
|
340
342
|
}, z.core.$strip>>;
|
|
341
343
|
}, z.core.$strip>, z.ZodObject<{
|
|
342
344
|
success: z.ZodLiteral<true>;
|
|
343
|
-
}, z.core.$strip>,
|
|
345
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
344
346
|
NOT_FOUND: {};
|
|
345
347
|
BAD_REQUEST: {};
|
|
346
348
|
}>, Record<never, never>>;
|
|
347
349
|
};
|
|
348
350
|
update: {
|
|
349
|
-
v1:
|
|
351
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
350
352
|
environmentVariableId: z.ZodString;
|
|
351
353
|
key: z.ZodString;
|
|
352
354
|
value: z.ZodOptional<z.ZodString>;
|
|
353
355
|
isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
354
356
|
}, z.core.$strip>, z.ZodObject<{
|
|
355
357
|
success: z.ZodLiteral<true>;
|
|
356
|
-
}, z.core.$strip>,
|
|
358
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
357
359
|
NOT_FOUND: {};
|
|
358
360
|
BAD_REQUEST: {};
|
|
359
361
|
}>, Record<never, never>>;
|
|
360
362
|
};
|
|
361
363
|
delete: {
|
|
362
|
-
v1:
|
|
364
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
363
365
|
environmentVariableId: z.ZodString;
|
|
364
366
|
}, z.core.$strip>, z.ZodObject<{
|
|
365
367
|
success: z.ZodLiteral<true>;
|
|
366
|
-
}, z.core.$strip>,
|
|
368
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
367
369
|
NOT_FOUND: {};
|
|
370
|
+
BAD_REQUEST: {};
|
|
368
371
|
}>, Record<never, never>>;
|
|
369
372
|
};
|
|
370
373
|
};
|
|
371
374
|
projects: {
|
|
372
375
|
update: {
|
|
373
|
-
v1:
|
|
376
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
374
377
|
projectId: z.ZodString;
|
|
375
378
|
name: z.ZodOptional<z.ZodString>;
|
|
376
379
|
sourceRepository: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -442,13 +445,14 @@ declare const contract: {
|
|
|
442
445
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
443
446
|
}, z.core.$strip>>;
|
|
444
447
|
}, z.core.$strip>>;
|
|
445
|
-
}, z.core.$strip>,
|
|
448
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
446
449
|
NOT_FOUND: {};
|
|
447
450
|
BAD_REQUEST: {};
|
|
451
|
+
FORBIDDEN: {};
|
|
448
452
|
}>, Record<never, never>>;
|
|
449
453
|
};
|
|
450
454
|
get: {
|
|
451
|
-
v1:
|
|
455
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
452
456
|
projectId: z.ZodString;
|
|
453
457
|
}, z.core.$strip>, z.ZodObject<{
|
|
454
458
|
id: z.ZodString;
|
|
@@ -518,12 +522,12 @@ declare const contract: {
|
|
|
518
522
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
519
523
|
}, z.core.$strip>>;
|
|
520
524
|
}, z.core.$strip>>;
|
|
521
|
-
}, z.core.$strip>,
|
|
525
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
522
526
|
NOT_FOUND: {};
|
|
523
527
|
}>, Record<never, never>>;
|
|
524
528
|
};
|
|
525
529
|
list: {
|
|
526
|
-
v1:
|
|
530
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
527
531
|
teamId: z.ZodOptional<z.ZodString>;
|
|
528
532
|
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
529
533
|
id: z.ZodString;
|
|
@@ -593,10 +597,13 @@ declare const contract: {
|
|
|
593
597
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
594
598
|
}, z.core.$strip>>;
|
|
595
599
|
}, z.core.$strip>>;
|
|
596
|
-
}, z.core.$strip>>, Record<never, never>,
|
|
600
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
601
|
+
NOT_FOUND: {};
|
|
602
|
+
BAD_REQUEST: {};
|
|
603
|
+
}>, Record<never, never>>;
|
|
597
604
|
};
|
|
598
605
|
create: {
|
|
599
|
-
v1:
|
|
606
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
600
607
|
teamId: z.ZodOptional<z.ZodString>;
|
|
601
608
|
name: z.ZodString;
|
|
602
609
|
sourceRepository: z.ZodOptional<z.ZodString>;
|
|
@@ -654,24 +661,25 @@ declare const contract: {
|
|
|
654
661
|
installCommand: z.ZodNullable<z.ZodString>;
|
|
655
662
|
startCommand: z.ZodNullable<z.ZodString>;
|
|
656
663
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
657
|
-
}, z.core.$strip>,
|
|
664
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
658
665
|
NOT_FOUND: {};
|
|
659
666
|
BAD_REQUEST: {};
|
|
667
|
+
FORBIDDEN: {};
|
|
660
668
|
}>, Record<never, never>>;
|
|
661
669
|
};
|
|
662
670
|
delete: {
|
|
663
|
-
v1:
|
|
671
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
664
672
|
projectId: z.ZodString;
|
|
665
673
|
}, z.core.$strip>, z.ZodObject<{
|
|
666
674
|
success: z.ZodLiteral<true>;
|
|
667
|
-
}, z.core.$strip>,
|
|
675
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
668
676
|
NOT_FOUND: {};
|
|
669
677
|
}>, Record<never, never>>;
|
|
670
678
|
};
|
|
671
679
|
};
|
|
672
680
|
playground: {
|
|
673
681
|
get: {
|
|
674
|
-
v1:
|
|
682
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
675
683
|
environmentId: z.ZodString;
|
|
676
684
|
}, z.core.$strip>, z.ZodObject<{
|
|
677
685
|
isPlaygroundEnabled: z.ZodBoolean;
|
|
@@ -689,12 +697,12 @@ declare const contract: {
|
|
|
689
697
|
prompt: z.ZodString;
|
|
690
698
|
}, z.core.$strip>>;
|
|
691
699
|
}, z.core.$strip>>;
|
|
692
|
-
}, z.core.$strip>,
|
|
700
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
693
701
|
NOT_FOUND: {};
|
|
694
702
|
}>, Record<never, never>>;
|
|
695
703
|
};
|
|
696
704
|
upsert: {
|
|
697
|
-
v1:
|
|
705
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
698
706
|
environmentId: z.ZodString;
|
|
699
707
|
isPlaygroundEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
700
708
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -725,7 +733,7 @@ declare const contract: {
|
|
|
725
733
|
prompt: z.ZodString;
|
|
726
734
|
}, z.core.$strip>>;
|
|
727
735
|
}, z.core.$strip>>;
|
|
728
|
-
}, z.core.$strip>,
|
|
736
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
729
737
|
NOT_FOUND: {};
|
|
730
738
|
BAD_REQUEST: {};
|
|
731
739
|
}>, Record<never, never>>;
|
|
@@ -733,16 +741,18 @@ declare const contract: {
|
|
|
733
741
|
};
|
|
734
742
|
tunnels: {
|
|
735
743
|
getTicket: {
|
|
736
|
-
v1:
|
|
744
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
737
745
|
subdomain: z.ZodString;
|
|
738
746
|
ticket: z.ZodString;
|
|
739
747
|
tunnelHost: z.ZodString;
|
|
740
|
-
}, z.core.$strip>, Record<never, never>,
|
|
748
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
749
|
+
FORBIDDEN: {};
|
|
750
|
+
}>, Record<never, never>>;
|
|
741
751
|
};
|
|
742
752
|
};
|
|
743
753
|
distribution: {
|
|
744
754
|
publish: {
|
|
745
|
-
v1:
|
|
755
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
746
756
|
projectId: z.ZodString;
|
|
747
757
|
domain: z.ZodString;
|
|
748
758
|
title: z.ZodString;
|
|
@@ -774,13 +784,13 @@ declare const contract: {
|
|
|
774
784
|
}, z.core.$strip>>>;
|
|
775
785
|
}, z.core.$strip>>>;
|
|
776
786
|
}, z.core.$strip>;
|
|
777
|
-
}, z.core.$strip>,
|
|
787
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
778
788
|
NOT_FOUND: {};
|
|
779
789
|
BAD_REQUEST: {};
|
|
780
790
|
}>, Record<never, never>>;
|
|
781
791
|
};
|
|
782
792
|
get: {
|
|
783
|
-
v1:
|
|
793
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
784
794
|
projectId: z.ZodString;
|
|
785
795
|
domain: z.ZodString;
|
|
786
796
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -807,7 +817,7 @@ declare const contract: {
|
|
|
807
817
|
}, z.core.$strip>>>;
|
|
808
818
|
}, z.core.$strip>>>;
|
|
809
819
|
}, z.core.$strip>;
|
|
810
|
-
}, z.core.$strip>,
|
|
820
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
811
821
|
NOT_FOUND: {};
|
|
812
822
|
BAD_REQUEST: {};
|
|
813
823
|
}>, Record<never, never>>;
|
|
@@ -815,7 +825,7 @@ declare const contract: {
|
|
|
815
825
|
};
|
|
816
826
|
beacon: {
|
|
817
827
|
create: {
|
|
818
|
-
v1:
|
|
828
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
819
829
|
targetUrl: z.ZodURL;
|
|
820
830
|
teamId: z.ZodOptional<z.ZodString>;
|
|
821
831
|
projectId: z.ZodOptional<z.ZodString>;
|
|
@@ -828,7 +838,7 @@ declare const contract: {
|
|
|
828
838
|
}>>>;
|
|
829
839
|
}, z.core.$strip>, z.ZodObject<{
|
|
830
840
|
id: z.ZodString;
|
|
831
|
-
}, z.core.$strip>,
|
|
841
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
832
842
|
NOT_FOUND: {};
|
|
833
843
|
BAD_REQUEST: {};
|
|
834
844
|
DNS_RESOLUTION_FAILED: {
|
|
@@ -837,7 +847,7 @@ declare const contract: {
|
|
|
837
847
|
}>, Record<never, never>>;
|
|
838
848
|
};
|
|
839
849
|
get: {
|
|
840
|
-
v1:
|
|
850
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
841
851
|
auditId: z.ZodString;
|
|
842
852
|
}, z.core.$strip>, z.ZodObject<{
|
|
843
853
|
id: z.ZodString;
|
|
@@ -921,7 +931,7 @@ declare const contract: {
|
|
|
921
931
|
}, z.core.$strip>>;
|
|
922
932
|
}, z.core.$strip>;
|
|
923
933
|
}, z.core.$strip>>;
|
|
924
|
-
}, z.core.$strip>,
|
|
934
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
925
935
|
NOT_FOUND: {};
|
|
926
936
|
}>, Record<never, never>>;
|
|
927
937
|
};
|
|
@@ -930,6 +940,17 @@ declare const contract: {
|
|
|
930
940
|
type RouterInput = InferContractRouterInputs<typeof contract>;
|
|
931
941
|
type RouterOutput = InferContractRouterOutputs<typeof contract>;
|
|
932
942
|
//#endregion
|
|
943
|
+
//#region src/auth-scope.d.ts
|
|
944
|
+
/** Credential scope required by an API route. */
|
|
945
|
+
type AuthScope = "any" | "user";
|
|
946
|
+
/** Accepts an API key or OAuth access token (default for most routes). */
|
|
947
|
+
declare const AUTH_SCOPE_ANY = "any";
|
|
948
|
+
/** Requires a user OAuth access token; API keys are not accepted. */
|
|
949
|
+
declare const AUTH_SCOPE_USER = "user";
|
|
950
|
+
type RouteAuthMeta = {
|
|
951
|
+
authScope?: AuthScope;
|
|
952
|
+
};
|
|
953
|
+
//#endregion
|
|
933
954
|
//#region ../domains/src/platforms/schemas.d.ts
|
|
934
955
|
declare const platformSchema: z.ZodEnum<{
|
|
935
956
|
chatgpt: "chatgpt";
|
|
@@ -1009,4 +1030,4 @@ declare const serverFieldsSchema: z.ZodObject<{
|
|
|
1009
1030
|
}, z.core.$strip>>>;
|
|
1010
1031
|
}, z.core.$strip>;
|
|
1011
1032
|
//#endregion
|
|
1012
|
-
export { ApiContext, PLATFORM_LABELS, type Platform, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
|
|
1033
|
+
export { AUTH_SCOPE_ANY, AUTH_SCOPE_USER, ApiContext, AuthScope, PLATFORM_LABELS, type Platform, RouteAuthMeta, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import * as z$1 from "zod/v4";
|
|
3
3
|
import { oc } from "@orpc/contract";
|
|
4
4
|
import ms from "ms";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
6
6
|
/**
|
|
7
7
|
* Reusable URL validation that disallows javascript: scheme
|
|
8
8
|
*/
|
|
@@ -369,6 +369,12 @@ const environmentSchema$1 = z.object({
|
|
|
369
369
|
updatedAt: z.coerce.date()
|
|
370
370
|
});
|
|
371
371
|
const environmentWithDomainsSchema = environmentSchema$1.extend({ domains: z.array(environmentDomainSchema) });
|
|
372
|
+
z.object({
|
|
373
|
+
sessionReplayEnabled: z.boolean(),
|
|
374
|
+
collectRequestPayload: z.boolean(),
|
|
375
|
+
collectResponsePayload: z.boolean(),
|
|
376
|
+
collectErrorMessage: z.boolean()
|
|
377
|
+
});
|
|
372
378
|
z.object({
|
|
373
379
|
id: z.string(),
|
|
374
380
|
createdAt: z.coerce.date(),
|
|
@@ -567,10 +573,10 @@ const toolDefinitionSchema = z.object({
|
|
|
567
573
|
}).optional()
|
|
568
574
|
});
|
|
569
575
|
const positiveTestCaseSchema = z.object({
|
|
570
|
-
scenario: z.string(),
|
|
571
|
-
userPrompt: z.string(),
|
|
572
|
-
toolTriggered: z.string().optional(),
|
|
573
|
-
expectedOutput: z.string().optional()
|
|
576
|
+
scenario: z.string().describe("Short label for what this case demonstrates."),
|
|
577
|
+
userPrompt: z.string().describe("A realistic, standalone user message a reviewer can paste and run with no prior state or multi-turn setup. Vary phrasing and tone across cases."),
|
|
578
|
+
toolTriggered: z.string().optional().describe("The tool this prompt should invoke."),
|
|
579
|
+
expectedOutput: z.string().optional().describe("What the user should see, including post-interaction behaviour where relevant.")
|
|
574
580
|
}).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
|
|
575
581
|
const screenshotEntrySchema = z.object({
|
|
576
582
|
prompt: z.string(),
|
|
@@ -578,6 +584,8 @@ const screenshotEntrySchema = z.object({
|
|
|
578
584
|
}).describe("Each screenshot: the user prompt that produced it + the image URL.");
|
|
579
585
|
/** Accepts either a valid email or URL. */
|
|
580
586
|
const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
|
|
587
|
+
/** A URL field whose error spells out that the scheme is required. */
|
|
588
|
+
const urlField = z.url({ error: "Enter a full URL including https:// (e.g. https://example.com)" });
|
|
581
589
|
const chatgptCategorySchema = z.enum([
|
|
582
590
|
"BUSINESS",
|
|
583
591
|
"COLLABORATION",
|
|
@@ -594,7 +602,227 @@ const chatgptCategorySchema = z.enum([
|
|
|
594
602
|
"TRAVEL"
|
|
595
603
|
]);
|
|
596
604
|
const chatgptAuthenticationSchema = z.enum(["No auth needed", "OAuth 2.0"]);
|
|
597
|
-
const
|
|
605
|
+
const chatgptCountryCodeSchema = z.enum([
|
|
606
|
+
"AD",
|
|
607
|
+
"AE",
|
|
608
|
+
"AF",
|
|
609
|
+
"AG",
|
|
610
|
+
"AL",
|
|
611
|
+
"AM",
|
|
612
|
+
"AO",
|
|
613
|
+
"AR",
|
|
614
|
+
"AT",
|
|
615
|
+
"AU",
|
|
616
|
+
"AW",
|
|
617
|
+
"AX",
|
|
618
|
+
"AZ",
|
|
619
|
+
"BA",
|
|
620
|
+
"BB",
|
|
621
|
+
"BD",
|
|
622
|
+
"BE",
|
|
623
|
+
"BF",
|
|
624
|
+
"BG",
|
|
625
|
+
"BH",
|
|
626
|
+
"BI",
|
|
627
|
+
"BJ",
|
|
628
|
+
"BL",
|
|
629
|
+
"BM",
|
|
630
|
+
"BN",
|
|
631
|
+
"BO",
|
|
632
|
+
"BR",
|
|
633
|
+
"BS",
|
|
634
|
+
"BT",
|
|
635
|
+
"BW",
|
|
636
|
+
"BZ",
|
|
637
|
+
"CA",
|
|
638
|
+
"CD",
|
|
639
|
+
"CF",
|
|
640
|
+
"CG",
|
|
641
|
+
"CH",
|
|
642
|
+
"CI",
|
|
643
|
+
"CL",
|
|
644
|
+
"CM",
|
|
645
|
+
"CO",
|
|
646
|
+
"CR",
|
|
647
|
+
"CV",
|
|
648
|
+
"CY",
|
|
649
|
+
"CZ",
|
|
650
|
+
"DE",
|
|
651
|
+
"DJ",
|
|
652
|
+
"DK",
|
|
653
|
+
"DM",
|
|
654
|
+
"DO",
|
|
655
|
+
"DZ",
|
|
656
|
+
"EC",
|
|
657
|
+
"EE",
|
|
658
|
+
"EG",
|
|
659
|
+
"ER",
|
|
660
|
+
"ES",
|
|
661
|
+
"ET",
|
|
662
|
+
"FI",
|
|
663
|
+
"FJ",
|
|
664
|
+
"FM",
|
|
665
|
+
"FO",
|
|
666
|
+
"FR",
|
|
667
|
+
"GA",
|
|
668
|
+
"GB",
|
|
669
|
+
"GD",
|
|
670
|
+
"GE",
|
|
671
|
+
"GF",
|
|
672
|
+
"GH",
|
|
673
|
+
"GL",
|
|
674
|
+
"GM",
|
|
675
|
+
"GN",
|
|
676
|
+
"GP",
|
|
677
|
+
"GQ",
|
|
678
|
+
"GR",
|
|
679
|
+
"GT",
|
|
680
|
+
"GW",
|
|
681
|
+
"GY",
|
|
682
|
+
"HN",
|
|
683
|
+
"HR",
|
|
684
|
+
"HT",
|
|
685
|
+
"HU",
|
|
686
|
+
"ID",
|
|
687
|
+
"IE",
|
|
688
|
+
"IL",
|
|
689
|
+
"IN",
|
|
690
|
+
"IQ",
|
|
691
|
+
"IS",
|
|
692
|
+
"IT",
|
|
693
|
+
"JM",
|
|
694
|
+
"JO",
|
|
695
|
+
"JP",
|
|
696
|
+
"KE",
|
|
697
|
+
"KG",
|
|
698
|
+
"KH",
|
|
699
|
+
"KI",
|
|
700
|
+
"KM",
|
|
701
|
+
"KN",
|
|
702
|
+
"KR",
|
|
703
|
+
"KW",
|
|
704
|
+
"KY",
|
|
705
|
+
"KZ",
|
|
706
|
+
"LA",
|
|
707
|
+
"LB",
|
|
708
|
+
"LC",
|
|
709
|
+
"LI",
|
|
710
|
+
"LK",
|
|
711
|
+
"LR",
|
|
712
|
+
"LS",
|
|
713
|
+
"LT",
|
|
714
|
+
"LU",
|
|
715
|
+
"LV",
|
|
716
|
+
"LY",
|
|
717
|
+
"MA",
|
|
718
|
+
"MC",
|
|
719
|
+
"MD",
|
|
720
|
+
"ME",
|
|
721
|
+
"MF",
|
|
722
|
+
"MG",
|
|
723
|
+
"MH",
|
|
724
|
+
"MK",
|
|
725
|
+
"ML",
|
|
726
|
+
"MM",
|
|
727
|
+
"MN",
|
|
728
|
+
"MQ",
|
|
729
|
+
"MR",
|
|
730
|
+
"MT",
|
|
731
|
+
"MU",
|
|
732
|
+
"MV",
|
|
733
|
+
"MW",
|
|
734
|
+
"MX",
|
|
735
|
+
"MY",
|
|
736
|
+
"MZ",
|
|
737
|
+
"NA",
|
|
738
|
+
"NC",
|
|
739
|
+
"NE",
|
|
740
|
+
"NG",
|
|
741
|
+
"NI",
|
|
742
|
+
"NL",
|
|
743
|
+
"NO",
|
|
744
|
+
"NP",
|
|
745
|
+
"NR",
|
|
746
|
+
"NZ",
|
|
747
|
+
"OM",
|
|
748
|
+
"PA",
|
|
749
|
+
"PE",
|
|
750
|
+
"PF",
|
|
751
|
+
"PG",
|
|
752
|
+
"PH",
|
|
753
|
+
"PK",
|
|
754
|
+
"PL",
|
|
755
|
+
"PM",
|
|
756
|
+
"PS",
|
|
757
|
+
"PT",
|
|
758
|
+
"PW",
|
|
759
|
+
"PY",
|
|
760
|
+
"QA",
|
|
761
|
+
"RE",
|
|
762
|
+
"RO",
|
|
763
|
+
"RS",
|
|
764
|
+
"RW",
|
|
765
|
+
"SA",
|
|
766
|
+
"SB",
|
|
767
|
+
"SC",
|
|
768
|
+
"SD",
|
|
769
|
+
"SE",
|
|
770
|
+
"SG",
|
|
771
|
+
"SH",
|
|
772
|
+
"SI",
|
|
773
|
+
"SJ",
|
|
774
|
+
"SK",
|
|
775
|
+
"SL",
|
|
776
|
+
"SM",
|
|
777
|
+
"SN",
|
|
778
|
+
"SO",
|
|
779
|
+
"SR",
|
|
780
|
+
"SS",
|
|
781
|
+
"ST",
|
|
782
|
+
"SV",
|
|
783
|
+
"SZ",
|
|
784
|
+
"TD",
|
|
785
|
+
"TF",
|
|
786
|
+
"TG",
|
|
787
|
+
"TH",
|
|
788
|
+
"TJ",
|
|
789
|
+
"TL",
|
|
790
|
+
"TM",
|
|
791
|
+
"TN",
|
|
792
|
+
"TO",
|
|
793
|
+
"TR",
|
|
794
|
+
"TT",
|
|
795
|
+
"TV",
|
|
796
|
+
"TW",
|
|
797
|
+
"TZ",
|
|
798
|
+
"UA",
|
|
799
|
+
"UG",
|
|
800
|
+
"US",
|
|
801
|
+
"UY",
|
|
802
|
+
"UZ",
|
|
803
|
+
"VA",
|
|
804
|
+
"VC",
|
|
805
|
+
"VN",
|
|
806
|
+
"VU",
|
|
807
|
+
"WF",
|
|
808
|
+
"WS",
|
|
809
|
+
"YE",
|
|
810
|
+
"YT",
|
|
811
|
+
"ZA",
|
|
812
|
+
"ZM",
|
|
813
|
+
"ZW"
|
|
814
|
+
]);
|
|
815
|
+
const chatgptAllowedCountriesSchema = z.discriminatedUnion("mode", [
|
|
816
|
+
z.object({ mode: z.literal("all") }),
|
|
817
|
+
z.object({
|
|
818
|
+
mode: z.literal("allow"),
|
|
819
|
+
countries: z.array(chatgptCountryCodeSchema)
|
|
820
|
+
}),
|
|
821
|
+
z.object({
|
|
822
|
+
mode: z.literal("block"),
|
|
823
|
+
countries: z.array(chatgptCountryCodeSchema)
|
|
824
|
+
})
|
|
825
|
+
]);
|
|
598
826
|
const chatgptTranslationLocaleSchema = z.enum([
|
|
599
827
|
"am",
|
|
600
828
|
"ar",
|
|
@@ -666,10 +894,10 @@ const negativeTestCaseSchema = z.object({
|
|
|
666
894
|
}).partial().describe("Each case: Scenario + User prompt (the app should NOT trigger).");
|
|
667
895
|
const chatgptToolJustificationSchema = z.object({
|
|
668
896
|
toolName: z.string(),
|
|
669
|
-
readOnlyJustification: z.string(),
|
|
670
|
-
openWorldJustification: z.string(),
|
|
671
|
-
destructiveJustification: z.string()
|
|
672
|
-
}).describe("Per-tool justification of each MCP annotation value (one sentence per hint).");
|
|
897
|
+
readOnlyJustification: z.string().describe("One sentence on what the tool reads and returns."),
|
|
898
|
+
openWorldJustification: z.string().describe("One sentence on whether the tool reaches external systems beyond your own service."),
|
|
899
|
+
destructiveJustification: z.string().describe("One sentence on whether the tool changes data. For a read-only tool, state the full triad: \"No data is created, modified, or deleted.\"")
|
|
900
|
+
}).describe("Per-tool justification of each MCP annotation value (one specific sentence per hint).");
|
|
673
901
|
/**
|
|
674
902
|
* Base copy fields, defined once and reused by both the submission form and per-locale
|
|
675
903
|
* translations so the constraints (tagline ≤ 30 chars) never drift. The translation generation
|
|
@@ -691,25 +919,25 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
691
919
|
logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
|
|
692
920
|
logoDark: z.string().optional().describe("Optional dark-mode logo icon. Square PNG, same specs as the light icon. Leave empty if the light icon also works on dark backgrounds."),
|
|
693
921
|
appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
|
|
694
|
-
tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value
|
|
695
|
-
description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
|
|
922
|
+
tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value, 30 chars max. Avoid generic superlatives like \"the best …\"."),
|
|
923
|
+
description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page. End it by naming the product categories or intents the app does NOT cover, so ChatGPT learns when not to route to it (define exclusions by absent categories or wrong intents, never by naming other brands)."),
|
|
696
924
|
category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
|
|
697
925
|
developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
|
|
698
|
-
companyUrl:
|
|
926
|
+
companyUrl: urlField.describe("Your company's main website URL."),
|
|
699
927
|
supportChannel: supportChannelSchema.describe("Customer support URL or email address."),
|
|
700
|
-
privacyPolicyUrl:
|
|
701
|
-
termsOfServiceUrl:
|
|
702
|
-
demoRecordingUrl:
|
|
928
|
+
privacyPolicyUrl: urlField.describe("URL to your privacy policy."),
|
|
929
|
+
termsOfServiceUrl: urlField.describe("URL to the app's terms of service."),
|
|
930
|
+
demoRecordingUrl: urlField.describe("URL to a video demonstrating the app, recorded via OpenAI Developer Mode. Cover all main use cases on web, iOS, and Android."),
|
|
703
931
|
appCommerceAndPurchasing: z.boolean().describe("Checkbox: 'My app links or directs users out of ChatGPT to make purchases.' Defaults to false. Verify the app does not offer digital goods."),
|
|
704
|
-
serverUrl:
|
|
932
|
+
serverUrl: urlField.describe("URL of the MCP server."),
|
|
705
933
|
authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
|
|
706
934
|
tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
|
|
707
|
-
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values."),
|
|
708
|
-
testCases: z.array(positiveTestCaseSchema).describe("At least 5 positive test cases. Each: Scenario, User prompt, Tool triggered, Expected output.
|
|
709
|
-
negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases
|
|
710
|
-
screenshots: z.array(screenshotEntrySchema).describe("In-app screenshots paired with the user prompt that produced them. Widget apps must show the widget UI; non-widget apps show the model response. Min 1, max
|
|
935
|
+
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values. One short, specific sentence per hint describing what the tool actually does."),
|
|
936
|
+
testCases: z.array(positiveTestCaseSchema).describe("At least 5 positive test cases. Each: Scenario, User prompt, Tool triggered, Expected output. Collectively cover the full capability across different flow stages (initial search or browse, market or locale handling, post-interaction detail, an action ChatGPT performs on the user's behalf, and a conversion or secondary tool) rather than five variations of the same first step."),
|
|
937
|
+
negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases: prompts where the app should NOT trigger but the model might think it is relevant. These become production routing metadata that teaches ChatGPT when to stay silent, so pick tight near-misses: a product category the app does not carry, the right brand or domain but an intent the app does not serve, or a boundary with a sibling app."),
|
|
938
|
+
screenshots: z.array(screenshotEntrySchema.extend({ prompt: z.string().max(75, { error: "Screenshot prompts are limited to 75 characters." }) })).max(3).describe("In-app screenshots paired with the user prompt that produced them (each prompt is 75 characters max). Widget apps must show the widget UI; non-widget apps show the model response. Min 1, max 3 entries, all public. Images: 706px wide, 400–860px tall, PNG."),
|
|
711
939
|
translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
|
|
712
|
-
allowedCountries: chatgptAllowedCountriesSchema.describe("
|
|
940
|
+
allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
|
|
713
941
|
releaseNotes: z.string().describe("Publicly displayed on the app details page.")
|
|
714
942
|
});
|
|
715
943
|
chatgptSubmissionFormDataSchema.pick({
|
|
@@ -728,7 +956,7 @@ chatgptSubmissionFormDataSchema.pick({
|
|
|
728
956
|
toolJustifications: true
|
|
729
957
|
}).extend({ tagline: clampStringField(chatgptSubmissionFormDataSchema.shape.tagline) });
|
|
730
958
|
const claudeCategorySchema = z.enum([
|
|
731
|
-
"
|
|
959
|
+
"Productivity",
|
|
732
960
|
"Communication",
|
|
733
961
|
"Data & Analytics",
|
|
734
962
|
"Development tools",
|
|
@@ -736,208 +964,141 @@ const claudeCategorySchema = z.enum([
|
|
|
736
964
|
"Consumer Health",
|
|
737
965
|
"Health & Life Sciences",
|
|
738
966
|
"Media & Entertainment",
|
|
739
|
-
"Commerce & Shopping"
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
"
|
|
743
|
-
"
|
|
744
|
-
"
|
|
967
|
+
"Commerce & Shopping",
|
|
968
|
+
"Legal",
|
|
969
|
+
"Sales and marketing",
|
|
970
|
+
"Creative",
|
|
971
|
+
"Nonprofit",
|
|
972
|
+
"Education",
|
|
973
|
+
"Other"
|
|
745
974
|
]);
|
|
746
|
-
const
|
|
747
|
-
z.enum(["Static OAuth Client", "Dynamic OAuth Client (DCR / CIMD)"]);
|
|
975
|
+
const claudeCategoryDescription = `The categories used to filter connectors in the directory UI. Select up to 5 that best describe your connector.`;
|
|
748
976
|
const claudeReadWriteCapabilitiesSchema = z.enum([
|
|
749
|
-
"
|
|
750
|
-
"
|
|
751
|
-
"
|
|
977
|
+
"read_only",
|
|
978
|
+
"write_only",
|
|
979
|
+
"read_write"
|
|
752
980
|
]);
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
"
|
|
756
|
-
"
|
|
757
|
-
"
|
|
758
|
-
"
|
|
759
|
-
]);
|
|
760
|
-
const claudeThirdPartySchema = z.enum([
|
|
761
|
-
"Web access: Fetches information from the open web (e.g., web scraping, search engines, or browsing arbitrary URLs, not just connecting to a specific API)",
|
|
762
|
-
"Third-party AI model integration: Sends data to or receives data from a generative AI model other than Claude",
|
|
763
|
-
"Third-party data retrieval: Connects to external services that themselves retrieve data from other sources (e.g., workflow automation platforms or other services that aggregate or relay data from multiple third-party sources)",
|
|
764
|
-
"Third-party data modification: Can connect to external services that themselves create, update, or delete data in other sources (e.g., workflow automation platforms or other services that write to multiple third-party sources)",
|
|
765
|
-
"N/A"
|
|
981
|
+
const claudeAuthenticationSchema = z.enum([
|
|
982
|
+
"oauth_dcr",
|
|
983
|
+
"oauth_cimd",
|
|
984
|
+
"oauth_anthropic_creds",
|
|
985
|
+
"custom_connection",
|
|
986
|
+
"none"
|
|
766
987
|
]);
|
|
767
|
-
const
|
|
768
|
-
"
|
|
769
|
-
"
|
|
770
|
-
"
|
|
771
|
-
"GDPR compliant (if applicable)"
|
|
988
|
+
const claudeApiOwnershipSchema = z.enum([
|
|
989
|
+
"first_party",
|
|
990
|
+
"proxied",
|
|
991
|
+
"third_party"
|
|
772
992
|
]);
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
"
|
|
776
|
-
"
|
|
993
|
+
const claudeYesNoOtherSchema = z.union([z.boolean(), z.object({ other: z.string() })]);
|
|
994
|
+
const claudePolicyAcknowledgementSchema = z.enum([
|
|
995
|
+
"I have read and understand the MCP Directory developer guidelines.",
|
|
996
|
+
"My server calls our own first-party APIs (or APIs we legitimately proxy with permission).",
|
|
997
|
+
"My connector does not transfer money, cryptocurrency, or other financial assets on a user's behalf.",
|
|
998
|
+
"My connector does not use AI models to generate images, video, or audio.",
|
|
999
|
+
"Tool descriptions contain no instructions about model behavior, other tools, or external instruction sources, and no hidden or encoded text.",
|
|
1000
|
+
"My connector does not collect conversation data beyond what is needed for its function.",
|
|
1001
|
+
"Public documentation for this connector will be live by the publish date."
|
|
777
1002
|
]);
|
|
778
1003
|
/**
|
|
779
|
-
* Field order mirrors the
|
|
780
|
-
*
|
|
1004
|
+
* Field order mirrors the claude.ai directory submission wizard
|
|
1005
|
+
* (`claude.ai/admin-settings/directory/submissions/new`), grouped by step.
|
|
1006
|
+
* When adding/removing/reordering fields, keep this in sync with the wizard.
|
|
781
1007
|
*/
|
|
782
1008
|
const claudeSubmissionFormDataSchema = z.object({
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
(
|
|
793
|
-
|
|
794
|
-
(
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
•
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
• '
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
Select 'No' for the vast majority of business/productivity/dev tools. When in doubt, select 'No'. This field triggers additional compliance review if 'Yes'.`),
|
|
841
|
-
category: claudeCategorySchema.describe(`Select the category that best describes your connector. This determines where it appears in the directory's browse experience. Choose the most specific fit:
|
|
842
|
-
• Business & Productivity — project management, CRM, HR, office tools
|
|
843
|
-
• Communication — email, chat, messaging, notifications
|
|
844
|
-
• Data & Analytics — dashboards, reporting, databases, BI tools
|
|
845
|
-
• Development tools — code repositories, CI/CD, issue trackers, monitoring
|
|
846
|
-
• Financial Services — accounting, invoicing, fintech (note: financial transaction execution is not permitted)
|
|
847
|
-
• Consumer Health — fitness, wellness, personal health tracking
|
|
848
|
-
• Health & Life Sciences — clinical, pharma, medical professional tools
|
|
849
|
-
• Media & Entertainment — content, publishing, streaming
|
|
850
|
-
• Commerce & Shopping — e-commerce, inventory, orders
|
|
851
|
-
Anthropic's submission form only accepts a single category.`),
|
|
852
|
-
sponsoredContentsOrAdvertisement: claudeSponsoredContentSchema.describe(`Be honest here — advertising is not permitted in the Connectors Directory per Anthropic's policy. Select the option that accurately describes your server:
|
|
853
|
-
• 'No, there is no sponsored content or advertisements' — the results your server returns are not influenced by paid placement or sponsorship. This is what almost all connectors should select.
|
|
854
|
-
• 'Yes, there are banner ads or other paid visual elements' — your UI includes visual ads. NOTE: this will likely lead to rejection, as Anthropic prohibits advertising in Claude.
|
|
855
|
-
• 'Yes, the returned content or ranking of returned content is impacted by sponsorship or ad placement' — paid results affect what you return. NOTE: this also likely leads to rejection.
|
|
856
|
-
If your server returns organic results from a platform that has ads in its own UI (but your API results are not affected by ads), select 'No'.`),
|
|
857
|
-
authentication: claudeAuthenticationSchema.describe("How users authenticate with the server. No auth / OAuth 2.0 / Custom URL (not supported)."),
|
|
858
|
-
transportSupport: z.array(claudeTransportSchema).describe(`Select all transport protocols your server supports:
|
|
859
|
-
• 'Streamable HTTP' — the modern, recommended transport. Anthropic strongly recommends implementing this. This is the future-proof option and should be your default.
|
|
860
|
-
• 'SSE (Server-Sent Events)' — the older transport. SSE may be deprecated by Anthropic later in 2025/2026. If you currently only support SSE, you should plan to migrate to Streamable HTTP.
|
|
861
|
-
If you support both, select both. If you're building from scratch, implement Streamable HTTP only.`),
|
|
862
|
-
serverDocumentationLink: z.url().describe(`A public URL pointing to documentation that helps users understand and use your connector. This is displayed in the Directory listing and must be publicly accessible without login. Minimum requirements for the docs page:
|
|
863
|
-
• What the connector does and its key capabilities
|
|
864
|
-
• How to connect/set it up (step by step)
|
|
865
|
-
• What each tool does (or at least the main ones)
|
|
866
|
-
• How to troubleshoot common issues
|
|
867
|
-
• A support contact or channel
|
|
868
|
-
Acceptable formats: a dedicated docs page, a help center article, a README on GitHub, or a blog post — as long as it's comprehensive. Note: Anthropic requires public documentation to be live by your publish date.`),
|
|
869
|
-
privacyPolicyUrl: z.url().describe(`URL to your privacy policy. This is mandatory and displayed in the directory listing. Missing or incomplete privacy policies result in immediate rejection. Your privacy policy must cover:
|
|
870
|
-
• What data you collect (and how)
|
|
871
|
-
• How you use the collected data
|
|
872
|
-
• Where and how long you store it
|
|
873
|
-
• Whether you share data with third parties (and who)
|
|
874
|
-
• How users can contact you about data concerns
|
|
875
|
-
The policy must be publicly accessible. If you don't have one yet, create one before submitting — there are free generators online, but make sure it accurately reflects your actual practices. If you're GDPR-compliant, your policy should reflect that.`),
|
|
876
|
-
supportChannel: supportChannelSchema.describe(`A URL or email address where users can get help with your connector. This is displayed in the Directory listing. Acceptable options:
|
|
877
|
-
• Email address (e.g. support@myapp.com)
|
|
878
|
-
• Link to a GitHub Issues page
|
|
879
|
-
• Link to a help center or support article
|
|
880
|
-
• Link to a Discord/Slack community
|
|
881
|
-
• Link to your documentation's troubleshooting section
|
|
882
|
-
Also uses this to notify you of security or compliance issues, so make sure it's actively monitored.`),
|
|
883
|
-
testingCredentials: z.string().describe(`Provide login credentials for a test account that Anthropic reviewers can use to verify your server works end-to-end. Critical requirements:
|
|
884
|
-
• The account must have sample/demo data loaded — reviewers need to actually test your tools with real data.
|
|
885
|
-
• No 2FA — reviewers can't receive SMS codes. Disable 2FA on this account.
|
|
886
|
-
• If your service uses Google OAuth or another OAuth that requires email verification, use mcp-review@anthropic.com as the account email — Anthropic has access to this inbox.
|
|
887
|
-
• Credentials must remain valid for at least 30 days from submission.
|
|
888
|
-
• If your service requires API keys instead of a password, provide those.
|
|
889
|
-
Format suggestion: Username/email: xxx | Password: xxx | Any other notes`),
|
|
890
|
-
tools: z.array(toolDefinitionSchema).describe(`A comma-separated list of all tools your MCP server exposes. Use the format: tool_name (Human-Readable Name). The tool_name is the internal identifier (snake_case, max 64 characters). The Human-Readable Name is what users see.
|
|
891
|
-
Example: list_issues (List Issues), create_issue (Create Issue), update_issue (Update Issue), delete_issue (Delete Issue), search_issues (Search Issues)
|
|
892
|
-
Reviewers test every single tool you list here — don't list tools that don't work. Also: do not have a single catch-all tool like api_request(method, endpoint) — Anthropic rejects these. Each action should be its own purpose-built tool.`),
|
|
893
|
-
toolTitlesAnnotationsConfirmed: z.boolean().describe(`This is a compliance confirmation — check both boxes only if you have actually implemented these in your server code:
|
|
894
|
-
• 'I've specified user-friendly titles for all tools' — every tool has a 'title' annotation (a human-readable label, different from the tool name).
|
|
895
|
-
• 'I've specified accurate tool annotations for all tools' — every tool has the correct annotation: readOnlyHint: true for read operations (search, get, list, fetch), OR destructiveHint: true for write operations (create, update, delete, send).
|
|
896
|
-
This is the #1 reason submissions get rejected (30% of all rejections). Do not check these boxes without actually having implemented the annotations. See MCP spec for how to add them.`),
|
|
897
|
-
testedSurfaces: z.array(claudeTestedSurfaceSchema).describe(`Confirm testing is complete and your server works as intended in these surfaces. Select every surface you've verified. Claude.ai (web) and Claude Desktop are the usual targets for remote MCP servers; Claude Code and Cowork compatibility is not required. Anthropic requires at least two surfaces.`),
|
|
898
|
-
logoLight: z.string().describe(`Your connector's logo for light backgrounds. Requirements:
|
|
899
|
-
• Format: SVG only
|
|
900
|
-
• Aspect ratio: square (1:1)
|
|
901
|
-
• Should work on a light background
|
|
902
|
-
• Provide via URL (Google Drive link is fine) or upload directly
|
|
903
|
-
Tip: use a simple, recognizable icon — not a full wordmark. The logo appears at small sizes in the directory grid.`),
|
|
904
|
-
logoDark: z.string().optional().describe(`Optional dark-mode variant of the connector logo. Same specs as the light variant (SVG, square 1:1) but designed to read on a dark background. Leave empty if the light logo already works on dark.`),
|
|
905
|
-
screenshots: z.array(screenshotEntrySchema).describe(`Screenshots or promotional images of your connector in action within Claude. Strongly recommended for all connectors, and required for MCP Apps (interactive UI). Guidelines:
|
|
906
|
-
• 3–5 images is ideal
|
|
907
|
-
• Minimum 1000px width, PNG format preferred
|
|
908
|
-
• Each screenshot is paired with the user prompt that produced it
|
|
909
|
-
• Crop to just the relevant part of the Claude interface (the tool response area)
|
|
910
|
-
• Show your connector doing something impressive and useful — real data, real results
|
|
911
|
-
• If you're an MCP App, include screenshots of your interactive UI elements
|
|
912
|
-
These images appear in your directory listing and are a key factor in driving user installs.`)
|
|
1009
|
+
serverUrl: z.url().describe(`The full https:// URL where your MCP server is hosted and reachable. In the claude.ai wizard this is read live
|
|
1010
|
+
from the custom connector you select — the connection is used to verify the URL and the tool list at submission time.
|
|
1011
|
+
The server must be publicly accessible without VPN or whitelisting.`),
|
|
1012
|
+
name: z.string().max(100).describe(`The public display name for your connector as it appears in the directory. Use your brand/product name. You must
|
|
1013
|
+
own or have the right to use this name. Max 100 characters.`),
|
|
1014
|
+
slug: z.string().max(50).regex(/^[a-z0-9-]+$/).describe(`URL-safe identifier for your connector's directory page. Lowercase letters, numbers, and hyphens only.
|
|
1015
|
+
PERMANENT after submission — it cannot be changed. Pre-filled from the name. Max 50 characters.`),
|
|
1016
|
+
oneLiner: z.string().max(200).describe(`A short tagline shown below your connector name in the directory listing. Max 200 characters. Avoid generic
|
|
1017
|
+
phrases like 'The best MCP server for...'. Example: 'Manage tasks and projects in Linear'.`),
|
|
1018
|
+
description: z.string().max(2e3).describe(`A description of what your connector does and its key features, shown on the connector's detail page in
|
|
1019
|
+
claude.ai. Write it from a user perspective and be specific. Max 2000 characters.`),
|
|
1020
|
+
categories: z.array(claudeCategorySchema).max(5).describe(claudeCategoryDescription),
|
|
1021
|
+
iconUrl: z.url().optional().describe(`Optional custom icon URL for the directory listing. By default the favicon from your MCP URL is used (recommended).
|
|
1022
|
+
Set this only if you want to override the favicon.`),
|
|
1023
|
+
documentation: z.url().describe(`A public URL pointing to documentation that helps users understand and use your connector. Must be publicly
|
|
1024
|
+
accessible without login. IT admins often review these when deciding whether to approve a server. Required to be live
|
|
1025
|
+
by your publish date.`),
|
|
1026
|
+
support: supportChannelSchema.describe(`A support URL or email address where users can get help with your connector. Displayed in the directory listing and
|
|
1027
|
+
used to notify you of security or compliance issues, so make sure it's actively monitored.`),
|
|
1028
|
+
privacyPolicy: z.url().describe(`URL to your privacy policy. Mandatory and displayed in the directory listing. Must be publicly accessible and cover
|
|
1029
|
+
what data you collect, how you use and store it, and whether you share it with third parties.`),
|
|
1030
|
+
primaryUseCases: z.string().describe(`Describe the main tasks users will accomplish with this connector, and include a few example prompts a user might
|
|
1031
|
+
type. These may be shown publicly but are primarily used for internal review — reviewers test your server using them.`),
|
|
1032
|
+
connectionRequirements: z.string().describe(`What accounts, permissions, or setup a user needs before connecting (e.g. 'Requires a paid Acme account with admin
|
|
1033
|
+
permissions'). If there are genuinely no special requirements, say so explicitly.`),
|
|
1034
|
+
readWriteCapabilities: claudeReadWriteCapabilitiesSchema.describe(`What your server can do:
|
|
1035
|
+
• 'read_only': retrieves data but never modifies it.
|
|
1036
|
+
• 'write_only': creates or modifies data but does not read it.
|
|
1037
|
+
• 'read_write': both retrieves and modifies data (most common).`),
|
|
1038
|
+
companyName: z.string().describe("The company or organization behind this connector — its legal name or publicly known product name."),
|
|
1039
|
+
companyWebsite: z.url().describe("The company's main website URL, e.g. https://example.com."),
|
|
1040
|
+
primaryContactName: z.string().describe("Full name of the person Anthropic should contact about this submission. Receives review feedback and follow-up questions."),
|
|
1041
|
+
primaryContactEmail: z.email().describe("Email for the primary contact (pre-filled from the Claude account). Anthropic uses this to communicate about your submission."),
|
|
1042
|
+
primaryContactRole: z.string().optional().describe("The primary contact's role at the company (e.g. 'Engineer', 'Product Manager'). Optional."),
|
|
1043
|
+
anthropicPointOfContact: z.string().optional().describe("If you've been working with someone at Anthropic, their name or email. Optional, can expedite review."),
|
|
1044
|
+
authentication: claudeAuthenticationSchema.describe(`How users authenticate with your server:
|
|
1045
|
+
• 'oauth_dcr': OAuth 2.0 + Dynamic Client Registration (RFC 7591) — clients register themselves.
|
|
1046
|
+
• 'oauth_cimd': OAuth 2.0 + Client ID Metadata Document — a published client_id metadata document.
|
|
1047
|
+
• 'oauth_anthropic_creds': OAuth 2.0 with Anthropic-held client credentials (a static client_id, and secret if needed).
|
|
1048
|
+
• 'custom_connection': users supply their own URL or client details at connection time (e.g. Snowflake).
|
|
1049
|
+
• 'none': no authentication (authless) — anyone can connect and call tools without credentials.`),
|
|
1050
|
+
partialAuth: z.boolean().optional().describe("Whether some tools return 401 and prompt for auth on demand while the server otherwise starts authless (partial auth)."),
|
|
1051
|
+
apiOwnership: claudeApiOwnershipSchema.describe(`How your connector relates to the API it calls:
|
|
1052
|
+
• 'first_party': the MCP server calls your own production APIs.
|
|
1053
|
+
• 'proxied': calls go to a third-party API you're authorized to integrate (e.g. a Zapier-style integration).
|
|
1054
|
+
• 'third_party': calls a third-party API you don't control — typically blocks listing; explain in 'additionalNotes'.`),
|
|
1055
|
+
personalHealthData: claudeYesNoOtherSchema.describe(`Whether this connector accesses, processes, or stores personal health information.
|
|
1056
|
+
No → false, Yes → true, or { other: explanation } when it depends on configuration.`),
|
|
1057
|
+
sponsoredContent: claudeYesNoOtherSchema.describe(`Whether this connector surfaces sponsored, promoted, or advertising content (prohibited in directory connectors).
|
|
1058
|
+
No → false, Yes → true, or { other: explanation }.`),
|
|
1059
|
+
testInstructions: z.string().optional().describe(`Clear test-account setup and access instructions for reviewers: every link, credential, and step needed to access
|
|
1060
|
+
the MCP server autonomously. For accounts that need to be populated, provide test credentials granting access to a
|
|
1061
|
+
fully populated account.`),
|
|
1062
|
+
selfTested: z.boolean().optional().describe("Confirmation that you have run every tool via MCP Inspector or as a custom connector in Claude."),
|
|
1063
|
+
policyAcknowledgements: z.array(claudePolicyAcknowledgementSchema).describe(`Anthropic directory policy acknowledgements. All items must be acknowledged before the claude.ai wizard allows
|
|
1064
|
+
submission. Each is an attestation you are legally agreeing to by submitting.`),
|
|
1065
|
+
additionalNotes: z.string().optional().describe("Anything else the review team should know about your connector. Optional.")
|
|
913
1066
|
});
|
|
914
1067
|
claudeSubmissionFormDataSchema.pick({
|
|
915
|
-
companyName: true,
|
|
916
|
-
appName: true,
|
|
917
|
-
mcpUrlType: true,
|
|
918
1068
|
serverUrl: true,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
transportSupport: true,
|
|
1069
|
+
name: true,
|
|
1070
|
+
slug: true,
|
|
1071
|
+
companyName: true,
|
|
923
1072
|
primaryContactEmail: true,
|
|
924
1073
|
primaryContactName: true,
|
|
1074
|
+
readWriteCapabilities: true,
|
|
925
1075
|
authentication: true,
|
|
926
|
-
|
|
927
|
-
|
|
1076
|
+
apiOwnership: true,
|
|
1077
|
+
personalHealthData: true
|
|
928
1078
|
}).extend({
|
|
929
1079
|
connectionRequirements: claudeSubmissionFormDataSchema.shape.connectionRequirements.optional(),
|
|
930
|
-
|
|
1080
|
+
testInstructions: claudeSubmissionFormDataSchema.shape.testInstructions.optional()
|
|
1081
|
+
});
|
|
1082
|
+
/**
|
|
1083
|
+
* Narrative fields the LLM-backed generation step produces for Claude submissions.
|
|
1084
|
+
* This schema accepts the slightly loose shape returned by AI generation, then normalizes it into
|
|
1085
|
+
* the strict form shape. Keep transforms here rather than in callers so generation leniency is
|
|
1086
|
+
* colocated with the Claude contract.
|
|
1087
|
+
*/
|
|
1088
|
+
const claudeAiGeneratedFormDataRawSchema = z.object({
|
|
1089
|
+
oneLiner: claudeSubmissionFormDataSchema.shape.oneLiner,
|
|
1090
|
+
description: claudeSubmissionFormDataSchema.shape.description,
|
|
1091
|
+
categories: z.array(claudeCategorySchema).describe(claudeCategoryDescription),
|
|
1092
|
+
primaryUseCases: claudeSubmissionFormDataSchema.shape.primaryUseCases
|
|
1093
|
+
});
|
|
1094
|
+
claudeAiGeneratedFormDataRawSchema.extend({
|
|
1095
|
+
oneLiner: clampStringField(claudeSubmissionFormDataSchema.shape.oneLiner),
|
|
1096
|
+
categories: claudeAiGeneratedFormDataRawSchema.shape.categories.transform((categories) => categories.slice(0, 5))
|
|
931
1097
|
});
|
|
932
|
-
claudeSubmissionFormDataSchema.pick({
|
|
933
|
-
tagline: true,
|
|
934
|
-
description: true,
|
|
935
|
-
category: true,
|
|
936
|
-
testCases: true
|
|
937
|
-
}).extend({ tagline: clampStringField(claudeSubmissionFormDataSchema.shape.tagline) });
|
|
938
1098
|
const submissionMetaFieldsSchema = z.object({
|
|
939
1099
|
id: z.string(),
|
|
940
1100
|
environmentId: z.string(),
|
|
1101
|
+
auditId: z.string().nullable(),
|
|
941
1102
|
createdAt: z.coerce.date(),
|
|
942
1103
|
updatedAt: z.coerce.date()
|
|
943
1104
|
});
|
|
@@ -974,6 +1135,12 @@ z.object({
|
|
|
974
1135
|
partnerDiscount: partnerDiscountSchema.nullable()
|
|
975
1136
|
});
|
|
976
1137
|
//#endregion
|
|
1138
|
+
//#region src/auth-scope.ts
|
|
1139
|
+
/** Accepts an API key or OAuth access token (default for most routes). */
|
|
1140
|
+
const AUTH_SCOPE_ANY = "any";
|
|
1141
|
+
/** Requires a user OAuth access token; API keys are not accepted. */
|
|
1142
|
+
const AUTH_SCOPE_USER = "user";
|
|
1143
|
+
//#endregion
|
|
977
1144
|
//#region src/schemas.ts
|
|
978
1145
|
const RESERVED_KEYS = [
|
|
979
1146
|
"_HANDLER",
|
|
@@ -1113,7 +1280,7 @@ const createEnvironmentContractV1 = oc.route({
|
|
|
1113
1280
|
id: z.string(),
|
|
1114
1281
|
name: z.string(),
|
|
1115
1282
|
sourceBranch: z.string().nullable().describe("The branch used to build the environment"),
|
|
1116
|
-
urls: z.array(z.
|
|
1283
|
+
urls: z.array(z.url()).describe("The URLs of the MCP server"),
|
|
1117
1284
|
createdAt: z.coerce.date(),
|
|
1118
1285
|
projectId: z.string().describe("The ID of the project the environment belongs to")
|
|
1119
1286
|
}));
|
|
@@ -1189,6 +1356,9 @@ const listProjectsContractV1 = oc.route({
|
|
|
1189
1356
|
description: "List all projects for a team",
|
|
1190
1357
|
tags: ["projects"],
|
|
1191
1358
|
successDescription: "The list of projects"
|
|
1359
|
+
}).errors({
|
|
1360
|
+
NOT_FOUND: {},
|
|
1361
|
+
BAD_REQUEST: {}
|
|
1192
1362
|
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
|
|
1193
1363
|
const createProjectContractV1 = oc.route({
|
|
1194
1364
|
path: "/v1/projects",
|
|
@@ -1199,7 +1369,8 @@ const createProjectContractV1 = oc.route({
|
|
|
1199
1369
|
successDescription: "The project has been created successfully"
|
|
1200
1370
|
}).errors({
|
|
1201
1371
|
NOT_FOUND: {},
|
|
1202
|
-
BAD_REQUEST: {}
|
|
1372
|
+
BAD_REQUEST: {},
|
|
1373
|
+
FORBIDDEN: {}
|
|
1203
1374
|
}).input(z.object({
|
|
1204
1375
|
teamId: z.string().optional(),
|
|
1205
1376
|
name: z.string().trim().min(1).max(100),
|
|
@@ -1284,7 +1455,10 @@ const deleteEnvironmentVariableContractV1 = oc.route({
|
|
|
1284
1455
|
description: "Delete an environment variable by ID",
|
|
1285
1456
|
tags: ["environments"],
|
|
1286
1457
|
successDescription: "The environment variable has been deleted successfully"
|
|
1287
|
-
}).errors({
|
|
1458
|
+
}).errors({
|
|
1459
|
+
NOT_FOUND: {},
|
|
1460
|
+
BAD_REQUEST: {}
|
|
1461
|
+
}).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
|
|
1288
1462
|
const deleteProjectContractV1 = oc.route({
|
|
1289
1463
|
path: "/v1/projects/{projectId}",
|
|
1290
1464
|
method: "DELETE",
|
|
@@ -1302,7 +1476,8 @@ const updateProjectContractV1 = oc.route({
|
|
|
1302
1476
|
successDescription: "The project has been updated successfully"
|
|
1303
1477
|
}).errors({
|
|
1304
1478
|
NOT_FOUND: {},
|
|
1305
|
-
BAD_REQUEST: {}
|
|
1479
|
+
BAD_REQUEST: {},
|
|
1480
|
+
FORBIDDEN: {}
|
|
1306
1481
|
}).input(z.object({
|
|
1307
1482
|
projectId: z.string().describe("The ID of the project"),
|
|
1308
1483
|
name: z.string().min(1).max(100).optional().describe("The new name for the project"),
|
|
@@ -1329,6 +1504,9 @@ const uploadDeploymentArtifactContractV1 = oc.route({
|
|
|
1329
1504
|
description: "Return a presigned S3 URL to upload a deployment artifact",
|
|
1330
1505
|
tags: ["deployments"],
|
|
1331
1506
|
successDescription: "The presigned upload URL has been generated successfully"
|
|
1507
|
+
}).errors({
|
|
1508
|
+
NOT_FOUND: {},
|
|
1509
|
+
BAD_REQUEST: {}
|
|
1332
1510
|
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
|
|
1333
1511
|
uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
1334
1512
|
token: z.string().describe("Token to identify the source archive"),
|
|
@@ -1502,7 +1680,7 @@ const getTunnelTicketContractV1 = oc.route({
|
|
|
1502
1680
|
description: "Get a signed ticket for establishing a tunnel connection. Requires user authentication (API keys are not supported).",
|
|
1503
1681
|
tags: ["tunnels"],
|
|
1504
1682
|
successDescription: "The tunnel ticket"
|
|
1505
|
-
}).output(z.object({
|
|
1683
|
+
}).meta({ authScope: AUTH_SCOPE_USER }).errors({ FORBIDDEN: {} }).output(z.object({
|
|
1506
1684
|
subdomain: z.string().describe("The subdomain assigned to the user"),
|
|
1507
1685
|
ticket: z.string().describe("The signed tunnel ticket"),
|
|
1508
1686
|
tunnelHost: z.string().describe("The tunnel host to connect to")
|
|
@@ -1656,4 +1834,4 @@ const contract = {
|
|
|
1656
1834
|
}
|
|
1657
1835
|
};
|
|
1658
1836
|
//#endregion
|
|
1659
|
-
export { PLATFORM_LABELS, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
|
|
1837
|
+
export { AUTH_SCOPE_ANY, AUTH_SCOPE_USER, PLATFORM_LABELS, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-staging.
|
|
3
|
+
"version": "0.0.0-staging.gc8bbd5f",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"author": "Alpic",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@orpc/contract": "^1.14.
|
|
20
|
+
"@orpc/contract": "^1.14.6",
|
|
21
21
|
"ms": "^2.1.3",
|
|
22
22
|
"zod": "^4.4.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@orpc/openapi": "^1.14.
|
|
26
|
-
"@orpc/zod": "^1.14.
|
|
25
|
+
"@orpc/openapi": "^1.14.6",
|
|
26
|
+
"@orpc/zod": "^1.14.6",
|
|
27
27
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
28
28
|
"@types/ms": "^2.1.0",
|
|
29
29
|
"shx": "^0.4.0",
|
|
30
|
-
"tsdown": "^0.22.
|
|
30
|
+
"tsdown": "^0.22.3",
|
|
31
31
|
"typescript": "^6.0.3",
|
|
32
|
-
"vitest": "^4.1.
|
|
32
|
+
"vitest": "^4.1.9",
|
|
33
33
|
"@alpic-ai/domains": "0.0.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|