@alpic-ai/api 0.0.0-staging.g948c39e → 0.0.0-staging.g9571c6e

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,20 +1,20 @@
1
1
  import { z } from "zod";
2
2
  import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
3
3
  //#region src/api.contract.d.ts
4
- type ApiContext = {
4
+ export type ApiContext = {
5
5
  request: Request & {
6
6
  teamIds: string[];
7
7
  defaultTeamId: string | undefined;
8
8
  awsCognitoUserSub: string | undefined;
9
9
  };
10
10
  };
11
- declare const deploymentStatusSchema: z.ZodEnum<{
11
+ export declare const deploymentStatusSchema: z.ZodEnum<{
12
12
  ongoing: "ongoing";
13
13
  deployed: "deployed";
14
14
  failed: "failed";
15
15
  canceled: "canceled";
16
16
  }>;
17
- declare const createEnvironmentContractV1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
17
+ export declare const createEnvironmentContractV1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
18
18
  projectId: z.ZodString;
19
19
  name: z.ZodString;
20
20
  sourceBranch: z.ZodString;
@@ -35,7 +35,7 @@ declare const createEnvironmentContractV1: import("@orpc/contract").ContractProc
35
35
  }>, {
36
36
  NOT_FOUND: {};
37
37
  }>, Record<never, never>>;
38
- declare const contract: {
38
+ export declare const contract: {
39
39
  teams: {
40
40
  list: {
41
41
  v1: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
@@ -322,8 +322,8 @@ declare const contract: {
322
322
  environmentId: z.ZodString;
323
323
  content: z.ZodString;
324
324
  source: z.ZodEnum<{
325
- user: "user";
326
325
  model: "model";
326
+ user: "user";
327
327
  }>;
328
328
  clientName: z.ZodNullable<z.ZodString>;
329
329
  clientId: z.ZodNullable<z.ZodString>;
@@ -1234,7 +1234,7 @@ declare const contract: {
1234
1234
  };
1235
1235
  };
1236
1236
  };
1237
- declare const contractForDocs: {
1237
+ export declare const contractForDocs: {
1238
1238
  deployments: {
1239
1239
  list: {
1240
1240
  v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -1601,8 +1601,8 @@ declare const contractForDocs: {
1601
1601
  environmentId: z.ZodString;
1602
1602
  content: z.ZodString;
1603
1603
  source: z.ZodEnum<{
1604
- user: "user";
1605
1604
  model: "model";
1605
+ user: "user";
1606
1606
  }>;
1607
1607
  clientName: z.ZodNullable<z.ZodString>;
1608
1608
  clientId: z.ZodNullable<z.ZodString>;
@@ -2420,22 +2420,22 @@ declare const contractForDocs: {
2420
2420
  };
2421
2421
  };
2422
2422
  };
2423
- type RouterInput = InferContractRouterInputs<typeof contract>;
2424
- type RouterOutput = InferContractRouterOutputs<typeof contract>;
2423
+ export type RouterInput = InferContractRouterInputs<typeof contract>;
2424
+ export type RouterOutput = InferContractRouterOutputs<typeof contract>;
2425
2425
  //#endregion
2426
2426
  //#region src/auth-scope.d.ts
2427
2427
  /** Credential scope required by an API route. */
2428
- type AuthScope = "any" | "user";
2428
+ export type AuthScope = "any" | "user";
2429
2429
  /** Accepts an API key or OAuth access token (default for most routes). */
2430
- declare const AUTH_SCOPE_ANY = "any";
2430
+ export declare const AUTH_SCOPE_ANY = "any";
2431
2431
  /** Requires a user OAuth access token; API keys are not accepted. */
2432
- declare const AUTH_SCOPE_USER = "user";
2433
- type RouteAuthMeta = {
2432
+ export declare const AUTH_SCOPE_USER = "user";
2433
+ export type RouteAuthMeta = {
2434
2434
  authScope?: AuthScope;
2435
2435
  };
2436
2436
  //#endregion
2437
2437
  //#region ../domains/src/intents/schemas.d.ts
2438
- declare const intentCategoryColorSchema: z.ZodEnum<{
2438
+ export declare const intentCategoryColorSchema: z.ZodEnum<{
2439
2439
  red: "red";
2440
2440
  orange: "orange";
2441
2441
  yellow: "yellow";
@@ -2446,7 +2446,7 @@ declare const intentCategoryColorSchema: z.ZodEnum<{
2446
2446
  gray: "gray";
2447
2447
  }>;
2448
2448
  type IntentCategoryColor = z.infer<typeof intentCategoryColorSchema>;
2449
- declare const INTENT_CATEGORY_COLORS: ("red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "gray")[];
2449
+ export declare const INTENT_CATEGORY_COLORS: ("red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "gray")[];
2450
2450
  //#endregion
2451
2451
  //#region ../domains/src/platforms/schemas.d.ts
2452
2452
  declare const platformSchema: z.ZodEnum<{
@@ -2454,56 +2454,56 @@ declare const platformSchema: z.ZodEnum<{
2454
2454
  claudeai: "claudeai";
2455
2455
  }>;
2456
2456
  type Platform = z.infer<typeof platformSchema>;
2457
- declare const PLATFORM_LABELS: Record<Platform, string>;
2457
+ export declare const PLATFORM_LABELS: Record<Platform, string>;
2458
2458
  //#endregion
2459
2459
  //#region ../domains/src/projects/schemas.d.ts
2460
- declare const runtimeSchema: z.ZodEnum<{
2460
+ export declare const runtimeSchema: z.ZodEnum<{
2461
2461
  "python3.13": "python3.13";
2462
2462
  "python3.14": "python3.14";
2463
2463
  node22: "node22";
2464
2464
  node24: "node24";
2465
2465
  }>;
2466
- declare const transportSchema: z.ZodEnum<{
2466
+ export declare const transportSchema: z.ZodEnum<{
2467
2467
  stdio: "stdio";
2468
2468
  sse: "sse";
2469
2469
  streamablehttp: "streamablehttp";
2470
2470
  }>;
2471
2471
  //#endregion
2472
2472
  //#region src/schemas.d.ts
2473
- type Runtime = z.infer<typeof runtimeSchema>;
2474
- type Transport = z.infer<typeof transportSchema>;
2475
- declare const environmentVariableSchema: z.ZodObject<{
2473
+ export type Runtime = z.infer<typeof runtimeSchema>;
2474
+ export type Transport = z.infer<typeof transportSchema>;
2475
+ export declare const environmentVariableSchema: z.ZodObject<{
2476
2476
  key: z.ZodString;
2477
2477
  value: z.ZodString;
2478
2478
  isSecret: z.ZodDefault<z.ZodBoolean>;
2479
2479
  }, z.core.$strip>;
2480
- declare const environmentVariablesSchema: z.ZodArray<z.ZodObject<{
2480
+ export declare const environmentVariablesSchema: z.ZodArray<z.ZodObject<{
2481
2481
  key: z.ZodString;
2482
2482
  value: z.ZodString;
2483
2483
  isSecret: z.ZodDefault<z.ZodBoolean>;
2484
2484
  }, z.core.$strip>>;
2485
- declare const updateEnvironmentVariableSchema: z.ZodObject<{
2485
+ export declare const updateEnvironmentVariableSchema: z.ZodObject<{
2486
2486
  key: z.ZodString;
2487
2487
  value: z.ZodOptional<z.ZodString>;
2488
2488
  isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2489
2489
  }, z.core.$strip>;
2490
- declare const buildSettingsSchema: z.ZodObject<{
2490
+ export declare const buildSettingsSchema: z.ZodObject<{
2491
2491
  installCommand: z.ZodOptional<z.ZodString>;
2492
2492
  buildCommand: z.ZodOptional<z.ZodString>;
2493
2493
  buildOutputDir: z.ZodOptional<z.ZodString>;
2494
2494
  startCommand: z.ZodOptional<z.ZodString>;
2495
2495
  }, z.core.$strip>;
2496
- declare const playgroundHeaderSchema: z.ZodObject<{
2496
+ export declare const playgroundHeaderSchema: z.ZodObject<{
2497
2497
  name: z.ZodString;
2498
2498
  description: z.ZodString;
2499
2499
  isRequired: z.ZodDefault<z.ZodBoolean>;
2500
2500
  isSecret: z.ZodDefault<z.ZodBoolean>;
2501
2501
  }, z.core.$strip>;
2502
- declare const playgroundExamplePromptSchema: z.ZodObject<{
2502
+ export declare const playgroundExamplePromptSchema: z.ZodObject<{
2503
2503
  title: z.ZodString;
2504
2504
  prompt: z.ZodString;
2505
2505
  }, z.core.$strip>;
2506
- declare const serverFieldsSchema: z.ZodObject<{
2506
+ export declare const serverFieldsSchema: z.ZodObject<{
2507
2507
  $schema: z.ZodString;
2508
2508
  name: z.ZodString;
2509
2509
  description: z.ZodString;
@@ -2527,4 +2527,4 @@ declare const serverFieldsSchema: z.ZodObject<{
2527
2527
  }, z.core.$strip>>>;
2528
2528
  }, z.core.$strip>;
2529
2529
  //#endregion
2530
- export { AUTH_SCOPE_ANY, AUTH_SCOPE_USER, ApiContext, AuthScope, INTENT_CATEGORY_COLORS, type IntentCategoryColor, PLATFORM_LABELS, type Platform, RouteAuthMeta, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, contractForDocs, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, intentCategoryColorSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
2530
+ export type { IntentCategoryColor, Platform };
package/dist/index.mjs CHANGED
@@ -1447,10 +1447,53 @@ function provenanceByField(prefillShape, aiGeneratedShape) {
1447
1447
  return byField;
1448
1448
  }
1449
1449
  provenanceByField(claudePrefillFormDataSchema.shape, claudeAiGeneratedFormDataSchema.shape), provenanceByField(chatgptPrefillFormDataSchema.shape, chatgptAiGeneratedFormDataSchema.shape);
1450
+ const urlVerificationOutcomeSchema = z.enum([
1451
+ "pass",
1452
+ "fail",
1453
+ "unverified"
1454
+ ]);
1455
+ const VERIFIABLE_URL_FIELDS = {
1456
+ chatgpt: ["privacyPolicyUrl", "termsOfServiceUrl"],
1457
+ claudeai: ["privacyPolicy"]
1458
+ };
1459
+ const verifiableUrlFieldSchema = z.enum([...VERIFIABLE_URL_FIELDS.chatgpt, ...VERIFIABLE_URL_FIELDS.claudeai]);
1460
+ const policyDisclosureSchema = z.enum([
1461
+ "dataCategories",
1462
+ "purposesOfUse",
1463
+ "recipients",
1464
+ "retention"
1465
+ ]);
1466
+ const urlVerificationFieldResultSchema = z.object({
1467
+ field: verifiableUrlFieldSchema,
1468
+ url: z.string(),
1469
+ outcome: urlVerificationOutcomeSchema,
1470
+ reason: z.string(),
1471
+ concerns: z.array(z.string()).optional(),
1472
+ scrapedWith: z.enum(["fetch", "firecrawl"]).optional()
1473
+ });
1474
+ const urlVerificationSchema = z.object({
1475
+ verifiedAt: z.coerce.date(),
1476
+ results: z.array(urlVerificationFieldResultSchema)
1477
+ });
1478
+ const pageKindSchema = z.enum([
1479
+ "expectedDocument",
1480
+ "errorPage",
1481
+ "loginWall",
1482
+ "parkedDomain",
1483
+ "comingSoon",
1484
+ "marketingPage",
1485
+ "unrelatedDocument"
1486
+ ]);
1487
+ z.object({
1488
+ pageKind: pageKindSchema.describe("What the page actually is. Use 'expectedDocument' only when it is genuinely the document the field claims."),
1489
+ reason: z.string().max(200).describe("One sentence naming what the page is, addressed to the developer who entered the URL."),
1490
+ missingDisclosures: z.array(policyDisclosureSchema).describe("For a privacy policy only: which of the four required disclosures the text does not cover. Empty for every other page kind.")
1491
+ });
1450
1492
  const submissionMetaFieldsSchema = z.object({
1451
1493
  id: z.string(),
1452
1494
  environmentId: z.string(),
1453
1495
  auditId: z.string().nullable(),
1496
+ urlVerification: urlVerificationSchema.nullable().default(null),
1454
1497
  createdAt: z.coerce.date(),
1455
1498
  updatedAt: z.coerce.date()
1456
1499
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.g948c39e",
3
+ "version": "0.0.0-staging.g9571c6e",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -44,7 +44,7 @@
44
44
  "@total-typescript/tsconfig": "^1.0.4",
45
45
  "@types/ms": "^2.1.0",
46
46
  "shx": "^0.4.0",
47
- "tsdown": "^0.22.14",
47
+ "tsdown": "^0.23.0",
48
48
  "typescript": "^6.0.3",
49
49
  "vitest": "^4.1.11"
50
50
  },