@alpic-ai/api 0.0.0-dev.gd40ea9c → 0.0.0-dev.gd429d79

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 CHANGED
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
3
-
4
3
  //#region src/api.contract.d.ts
5
4
  type ApiContext = {
6
5
  request: Request & {
@@ -225,6 +224,17 @@ declare const contract: {
225
224
  v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
226
225
  environmentId: z.ZodString;
227
226
  token: z.ZodOptional<z.ZodString>;
227
+ settings: z.ZodOptional<z.ZodObject<{
228
+ installCommand: z.ZodOptional<z.ZodString>;
229
+ buildCommand: z.ZodOptional<z.ZodString>;
230
+ buildOutputDir: z.ZodOptional<z.ZodString>;
231
+ startCommand: z.ZodOptional<z.ZodString>;
232
+ transport: z.ZodEnum<{
233
+ stdio: "stdio";
234
+ sse: "sse";
235
+ streamablehttp: "streamablehttp";
236
+ }>;
237
+ }, z.core.$strip>>;
228
238
  }, z.core.$strip>, z.ZodObject<{
229
239
  id: z.ZodString;
230
240
  status: z.ZodEnum<{
package/dist/index.mjs CHANGED
@@ -342,8 +342,14 @@ z.union([
342
342
  protectedWithoutDiscoveryEnvironmentSchema
343
343
  ]);
344
344
  const allowedPlatformSchema = platformSchema;
345
+ const playgroundModelSchema = z.enum([
346
+ "global.anthropic.claude-haiku-4-5-20251001-v1:0",
347
+ "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
348
+ "openai.gpt-5.4",
349
+ "openai.gpt-5.5"
350
+ ]);
345
351
  const environmentDomainSchema = z.object({
346
- domain: z.string(),
352
+ name: z.string(),
347
353
  status: z.enum([
348
354
  "ongoing",
349
355
  "deployed",
@@ -361,6 +367,7 @@ const environmentSchema$1 = z.object({
361
367
  latestDeployment: deploymentSummarySchema.optional(),
362
368
  openaiAppsChallenge: z.string().nullable().optional(),
363
369
  isPlaygroundEnabled: z.boolean(),
370
+ playgroundModel: playgroundModelSchema,
364
371
  isIpWhitelistEnabled: z.boolean(),
365
372
  ipAllowlist: z.array(z.string()).nullable(),
366
373
  allowedPlatforms: z.array(allowedPlatformSchema),
@@ -373,7 +380,8 @@ z.object({
373
380
  sessionReplayEnabled: z.boolean(),
374
381
  collectRequestPayload: z.boolean(),
375
382
  collectResponsePayload: z.boolean(),
376
- collectErrorMessage: z.boolean()
383
+ collectErrorMessage: z.boolean(),
384
+ collectUserData: z.boolean()
377
385
  });
378
386
  z.object({
379
387
  id: z.string(),
@@ -508,15 +516,27 @@ z.object({
508
516
  environments: z.array(environmentWithDomainsSchema),
509
517
  productionEnvironment: environmentWithDomainsSchema.nullable()
510
518
  });
519
+ const domainFailureReasonSchema = z.enum([
520
+ "caa",
521
+ "dns",
522
+ "invalid_domain",
523
+ "other"
524
+ ]);
525
+ const projectDomainMappingSchema = z.object({
526
+ pathPrefix: z.string(),
527
+ environment: environmentSchema$1
528
+ });
511
529
  z.object({
512
- domain: z.string(),
530
+ name: z.string(),
513
531
  createdAt: z.coerce.date(),
514
532
  status: z.enum([
515
533
  "ongoing",
516
534
  "deployed",
517
535
  "failed"
518
536
  ]),
519
- environment: environmentSchema$1
537
+ failureReason: domainFailureReasonSchema.nullable(),
538
+ environment: environmentSchema$1,
539
+ mappings: z.array(projectDomainMappingSchema)
520
540
  });
521
541
  const serverFieldsSchema$1 = z.object({
522
542
  $schema: z.string(),
@@ -580,8 +600,9 @@ const positiveTestCaseSchema = z.object({
580
600
  }).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
581
601
  const screenshotEntrySchema = z.object({
582
602
  prompt: z.string(),
583
- url: z.url().or(z.literal(""))
603
+ url: z.url()
584
604
  }).describe("Each screenshot: the user prompt that produced it + the image URL.");
605
+ const screenshotDraftEntrySchema = screenshotEntrySchema.extend({ url: z.string() });
585
606
  /** Accepts either a valid email or URL. */
586
607
  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
608
  /** A URL field whose error spells out that the scheme is required. */
@@ -940,6 +961,17 @@ const chatgptSubmissionFormDataSchema = z.object({
940
961
  allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
941
962
  releaseNotes: z.string().describe("Publicly displayed on the app details page.")
942
963
  });
964
+ const chatgptSubmissionDraftSchema = chatgptSubmissionFormDataSchema.partial().extend({
965
+ tagline: z.string().optional(),
966
+ companyUrl: z.string().optional(),
967
+ supportChannel: z.string().optional(),
968
+ privacyPolicyUrl: z.string().optional(),
969
+ termsOfServiceUrl: z.string().optional(),
970
+ demoRecordingUrl: z.string().optional(),
971
+ serverUrl: z.string().optional(),
972
+ screenshots: z.array(screenshotDraftEntrySchema).optional(),
973
+ translations: z.array(chatgptTranslationSchema.extend({ tagline: z.string() })).optional()
974
+ });
943
975
  chatgptSubmissionFormDataSchema.pick({
944
976
  appName: true,
945
977
  developerName: true,
@@ -1018,8 +1050,8 @@ phrases like 'The best MCP server for...'. Example: 'Manage tasks and projects i
1018
1050
  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
1051
  claude.ai. Write it from a user perspective and be specific. Max 2000 characters.`),
1020
1052
  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.`),
1053
+ iconUrl: z.url().optional().describe(`Optional custom icon for the directory listing — a square SVG. By default the favicon from your MCP URL is used
1054
+ (recommended); upload a custom icon only to override it.`),
1023
1055
  documentation: z.url().describe(`A public URL pointing to documentation that helps users understand and use your connector. Must be publicly
1024
1056
  accessible without login. IT admins often review these when deciding whether to approve a server. Required to be live
1025
1057
  by your publish date.`),
@@ -1027,6 +1059,8 @@ by your publish date.`),
1027
1059
  used to notify you of security or compliance issues, so make sure it's actively monitored.`),
1028
1060
  privacyPolicy: z.url().describe(`URL to your privacy policy. Mandatory and displayed in the directory listing. Must be publicly accessible and cover
1029
1061
  what data you collect, how you use and store it, and whether you share it with third parties.`),
1062
+ screenshots: z.array(screenshotEntrySchema).optional().describe(`Carousel images shown on your connector's directory page (PNG). Each is paired with the user prompt that produced
1063
+ it. This is editable on the directory page only after the connector is submitted — optional here so you can prepare it.`),
1030
1064
  primaryUseCases: z.string().describe(`Describe the main tasks users will accomplish with this connector, and include a few example prompts a user might
1031
1065
  type. These may be shown publicly but are primarily used for internal review — reviewers test your server using them.`),
1032
1066
  connectionRequirements: z.string().describe(`What accounts, permissions, or setup a user needs before connecting (e.g. 'Requires a paid Acme account with admin
@@ -1064,6 +1098,21 @@ fully populated account.`),
1064
1098
  submission. Each is an attestation you are legally agreeing to by submitting.`),
1065
1099
  additionalNotes: z.string().optional().describe("Anything else the review team should know about your connector. Optional.")
1066
1100
  });
1101
+ const claudeSubmissionDraftSchema = claudeSubmissionFormDataSchema.partial().extend({
1102
+ serverUrl: z.string().optional(),
1103
+ name: z.string().optional(),
1104
+ slug: z.string().optional(),
1105
+ oneLiner: z.string().optional(),
1106
+ description: z.string().optional(),
1107
+ iconUrl: z.string().optional(),
1108
+ documentation: z.string().optional(),
1109
+ support: z.string().optional(),
1110
+ privacyPolicy: z.string().optional(),
1111
+ companyWebsite: z.string().optional(),
1112
+ primaryContactEmail: z.string().optional(),
1113
+ categories: z.array(claudeCategorySchema).optional(),
1114
+ screenshots: z.array(screenshotDraftEntrySchema).optional()
1115
+ });
1067
1116
  claudeSubmissionFormDataSchema.pick({
1068
1117
  serverUrl: true,
1069
1118
  name: true,
@@ -1104,14 +1153,14 @@ const submissionMetaFieldsSchema = z.object({
1104
1153
  });
1105
1154
  const claudeSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
1106
1155
  platform: z.literal("claudeai"),
1107
- formData: claudeSubmissionFormDataSchema.partial()
1156
+ formData: claudeSubmissionDraftSchema
1108
1157
  });
1109
1158
  const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
1110
1159
  platform: z.literal("chatgpt"),
1111
- formData: chatgptSubmissionFormDataSchema.partial()
1160
+ formData: chatgptSubmissionDraftSchema
1112
1161
  });
1113
1162
  z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
1114
- z.union([claudeSubmissionFormDataSchema.partial(), chatgptSubmissionFormDataSchema.partial()]);
1163
+ z.union([claudeSubmissionDraftSchema, chatgptSubmissionDraftSchema]);
1115
1164
  const subscriptionPlanSchema = z.enum([
1116
1165
  "pro",
1117
1166
  "business",
@@ -1495,7 +1544,8 @@ const deployEnvironmentContractV1 = oc.route({
1495
1544
  BAD_REQUEST: {}
1496
1545
  }).input(z.object({
1497
1546
  environmentId: z.string().describe("The ID of the environment to deploy"),
1498
- token: z.string().describe("The token to identify the source archive").optional()
1547
+ token: z.string().describe("The token to identify the source archive").optional(),
1548
+ settings: buildSettingsSchema.extend({ transport: transportSchema }).optional().describe("Project settings detected by the client from the source. When provided, the server skips downloading and extracting the source archive to detect them.")
1499
1549
  })).output(deploymentSchema);
1500
1550
  const uploadDeploymentArtifactContractV1 = oc.route({
1501
1551
  path: "/v1/deployments/upload",
@@ -1532,6 +1582,21 @@ const getDeploymentContractV1 = oc.route({
1532
1582
  tags: ["deployments"],
1533
1583
  successDescription: "The deployment details"
1534
1584
  }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
1585
+ const logEntrySchema = z.object({
1586
+ timestamp: z.coerce.date(),
1587
+ type: z.enum([
1588
+ "START",
1589
+ "END",
1590
+ "INFO",
1591
+ "ERROR",
1592
+ "WARNING",
1593
+ "DEBUG"
1594
+ ]),
1595
+ requestId: z.string(),
1596
+ content: z.string().optional(),
1597
+ method: z.string().optional(),
1598
+ durationInMs: z.number().optional()
1599
+ });
1535
1600
  const getLogsContractV1 = oc.route({
1536
1601
  path: "/v1/environments/{environmentId}/logs",
1537
1602
  method: "GET",
@@ -1556,21 +1621,7 @@ const getLogsContractV1 = oc.route({
1556
1621
  search: z.string().optional().describe("Filter pattern to search for in log content"),
1557
1622
  nextToken: z.string().optional().describe("Pagination token from a previous response")
1558
1623
  })).output(z.object({
1559
- logs: z.array(z.object({
1560
- timestamp: z.coerce.date(),
1561
- type: z.enum([
1562
- "START",
1563
- "END",
1564
- "INFO",
1565
- "ERROR",
1566
- "WARNING",
1567
- "DEBUG"
1568
- ]),
1569
- requestId: z.string(),
1570
- content: z.string().optional(),
1571
- method: z.string().optional(),
1572
- durationInMs: z.number().optional()
1573
- })),
1624
+ logs: z.array(logEntrySchema),
1574
1625
  nextToken: z.string().nullable()
1575
1626
  }));
1576
1627
  const getLatestLogsContractV1 = oc.route({
@@ -1593,21 +1644,7 @@ const getLatestLogsContractV1 = oc.route({
1593
1644
  "DEBUG"
1594
1645
  ])).optional().describe("Filter by log level"),
1595
1646
  search: z.string().optional().describe("Filter pattern to search for in log content")
1596
- })).output(z.object({ logs: z.array(z.object({
1597
- timestamp: z.coerce.date(),
1598
- type: z.enum([
1599
- "START",
1600
- "END",
1601
- "INFO",
1602
- "ERROR",
1603
- "WARNING",
1604
- "DEBUG"
1605
- ]),
1606
- requestId: z.string(),
1607
- content: z.string().optional(),
1608
- method: z.string().optional(),
1609
- durationInMs: z.number().optional()
1610
- })) }));
1647
+ })).output(z.object({ logs: z.array(logEntrySchema) }));
1611
1648
  const getDeploymentLogsContractV1 = oc.route({
1612
1649
  path: "/v1/deployments/{deploymentId}/logs",
1613
1650
  method: "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-dev.gd40ea9c",
3
+ "version": "0.0.0-dev.gd429d79",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -14,22 +14,38 @@
14
14
  "files": [
15
15
  "dist"
16
16
  ],
17
+ "nx": {
18
+ "targets": {
19
+ "build": {
20
+ "cache": true,
21
+ "inputs": [
22
+ "{projectRoot}/src/**/*",
23
+ "{projectRoot}/tsdown.config.ts",
24
+ "{projectRoot}/tsconfig.json",
25
+ "^default"
26
+ ],
27
+ "outputs": [
28
+ "{projectRoot}/dist"
29
+ ]
30
+ }
31
+ }
32
+ },
17
33
  "author": "Alpic",
18
34
  "license": "ISC",
19
35
  "dependencies": {
20
- "@orpc/contract": "^1.14.6",
36
+ "@orpc/contract": "^1.14.7",
21
37
  "ms": "^2.1.3",
22
38
  "zod": "^4.4.3"
23
39
  },
24
40
  "devDependencies": {
25
- "@orpc/openapi": "^1.14.6",
26
- "@orpc/zod": "^1.14.6",
41
+ "@orpc/openapi": "^1.14.7",
42
+ "@orpc/zod": "^1.14.7",
27
43
  "@total-typescript/tsconfig": "^1.0.4",
28
44
  "@types/ms": "^2.1.0",
29
45
  "shx": "^0.4.0",
30
- "tsdown": "^0.22.3",
46
+ "tsdown": "^0.22.5",
31
47
  "typescript": "^6.0.3",
32
- "vitest": "^4.1.9",
48
+ "vitest": "^4.1.10",
33
49
  "@alpic-ai/domains": "0.0.0"
34
50
  },
35
51
  "scripts": {
@@ -38,7 +54,7 @@
38
54
  "test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
39
55
  "test:unit": "vitest run",
40
56
  "test:format": "biome check --error-on-warnings .",
41
- "test:type": "tsc --noEmit",
57
+ "test:type": "tsgo --noEmit",
42
58
  "publish:npm": "pnpm publish --tag \"${NPM_TAG}\" --access public --no-git-checks"
43
59
  }
44
60
  }