@alpic-ai/api 0.0.0-staging.geb6c146 → 0.0.0-staging.gf0dc7b2

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
@@ -29,7 +29,7 @@ declare const createEnvironmentContractV1: _$_orpc_contract0.ContractProcedureBu
29
29
  id: z.ZodString;
30
30
  name: z.ZodString;
31
31
  sourceBranch: z.ZodNullable<z.ZodString>;
32
- urls: z.ZodArray<z.ZodString>;
32
+ urls: z.ZodArray<z.ZodURL>;
33
33
  createdAt: z.ZodCoercedDate<unknown>;
34
34
  projectId: z.ZodString;
35
35
  }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
@@ -165,7 +165,10 @@ declare const contract: {
165
165
  uploadUrl: z.ZodURL;
166
166
  token: z.ZodString;
167
167
  expiresAt: z.ZodCoercedDate<unknown>;
168
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
168
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
169
+ NOT_FOUND: {};
170
+ BAD_REQUEST: {};
171
+ }>, Record<never, never>>;
169
172
  };
170
173
  getLogs: {
171
174
  v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -196,7 +199,7 @@ declare const contract: {
196
199
  id: z.ZodString;
197
200
  name: z.ZodString;
198
201
  sourceBranch: z.ZodNullable<z.ZodString>;
199
- urls: z.ZodArray<z.ZodString>;
202
+ urls: z.ZodArray<z.ZodURL>;
200
203
  createdAt: z.ZodCoercedDate<unknown>;
201
204
  projectId: z.ZodString;
202
205
  }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
@@ -365,6 +368,7 @@ declare const contract: {
365
368
  success: z.ZodLiteral<true>;
366
369
  }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
367
370
  NOT_FOUND: {};
371
+ BAD_REQUEST: {};
368
372
  }>, Record<never, never>>;
369
373
  };
370
374
  };
@@ -593,7 +597,10 @@ 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>, Record<never, never>>;
600
+ }, z.core.$strip>>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
601
+ NOT_FOUND: {};
602
+ BAD_REQUEST: {};
603
+ }>, Record<never, never>>;
597
604
  };
598
605
  create: {
599
606
  v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -737,7 +744,9 @@ declare const contract: {
737
744
  subdomain: z.ZodString;
738
745
  ticket: z.ZodString;
739
746
  tunnelHost: z.ZodString;
740
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
747
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
748
+ FORBIDDEN: {};
749
+ }>, Record<never, never>>;
741
750
  };
742
751
  };
743
752
  distribution: {
package/dist/index.mjs CHANGED
@@ -594,7 +594,292 @@ const chatgptCategorySchema = z.enum([
594
594
  "TRAVEL"
595
595
  ]);
596
596
  const chatgptAuthenticationSchema = z.enum(["No auth needed", "OAuth 2.0"]);
597
- const chatgptAllowedCountriesSchema = z.enum(["Allow all", "Restrict to specific countries"]);
597
+ const chatgptCountryCodeSchema = z.enum([
598
+ "AD",
599
+ "AE",
600
+ "AF",
601
+ "AG",
602
+ "AL",
603
+ "AM",
604
+ "AO",
605
+ "AR",
606
+ "AT",
607
+ "AU",
608
+ "AW",
609
+ "AX",
610
+ "AZ",
611
+ "BA",
612
+ "BB",
613
+ "BD",
614
+ "BE",
615
+ "BF",
616
+ "BG",
617
+ "BH",
618
+ "BI",
619
+ "BJ",
620
+ "BL",
621
+ "BM",
622
+ "BN",
623
+ "BO",
624
+ "BR",
625
+ "BS",
626
+ "BT",
627
+ "BW",
628
+ "BZ",
629
+ "CA",
630
+ "CD",
631
+ "CF",
632
+ "CG",
633
+ "CH",
634
+ "CI",
635
+ "CL",
636
+ "CM",
637
+ "CO",
638
+ "CR",
639
+ "CV",
640
+ "CY",
641
+ "CZ",
642
+ "DE",
643
+ "DJ",
644
+ "DK",
645
+ "DM",
646
+ "DO",
647
+ "DZ",
648
+ "EC",
649
+ "EE",
650
+ "EG",
651
+ "ER",
652
+ "ES",
653
+ "ET",
654
+ "FI",
655
+ "FJ",
656
+ "FM",
657
+ "FO",
658
+ "FR",
659
+ "GA",
660
+ "GB",
661
+ "GD",
662
+ "GE",
663
+ "GF",
664
+ "GH",
665
+ "GL",
666
+ "GM",
667
+ "GN",
668
+ "GP",
669
+ "GQ",
670
+ "GR",
671
+ "GT",
672
+ "GW",
673
+ "GY",
674
+ "HN",
675
+ "HR",
676
+ "HT",
677
+ "HU",
678
+ "ID",
679
+ "IE",
680
+ "IL",
681
+ "IN",
682
+ "IQ",
683
+ "IS",
684
+ "IT",
685
+ "JM",
686
+ "JO",
687
+ "JP",
688
+ "KE",
689
+ "KG",
690
+ "KH",
691
+ "KI",
692
+ "KM",
693
+ "KN",
694
+ "KR",
695
+ "KW",
696
+ "KY",
697
+ "KZ",
698
+ "LA",
699
+ "LB",
700
+ "LC",
701
+ "LI",
702
+ "LK",
703
+ "LR",
704
+ "LS",
705
+ "LT",
706
+ "LU",
707
+ "LV",
708
+ "LY",
709
+ "MA",
710
+ "MC",
711
+ "MD",
712
+ "ME",
713
+ "MF",
714
+ "MG",
715
+ "MH",
716
+ "MK",
717
+ "ML",
718
+ "MM",
719
+ "MN",
720
+ "MQ",
721
+ "MR",
722
+ "MT",
723
+ "MU",
724
+ "MV",
725
+ "MW",
726
+ "MX",
727
+ "MY",
728
+ "MZ",
729
+ "NA",
730
+ "NC",
731
+ "NE",
732
+ "NG",
733
+ "NI",
734
+ "NL",
735
+ "NO",
736
+ "NP",
737
+ "NR",
738
+ "NZ",
739
+ "OM",
740
+ "PA",
741
+ "PE",
742
+ "PF",
743
+ "PG",
744
+ "PH",
745
+ "PK",
746
+ "PL",
747
+ "PM",
748
+ "PS",
749
+ "PT",
750
+ "PW",
751
+ "PY",
752
+ "QA",
753
+ "RE",
754
+ "RO",
755
+ "RS",
756
+ "RW",
757
+ "SA",
758
+ "SB",
759
+ "SC",
760
+ "SD",
761
+ "SE",
762
+ "SG",
763
+ "SH",
764
+ "SI",
765
+ "SJ",
766
+ "SK",
767
+ "SL",
768
+ "SM",
769
+ "SN",
770
+ "SO",
771
+ "SR",
772
+ "SS",
773
+ "ST",
774
+ "SV",
775
+ "SZ",
776
+ "TD",
777
+ "TF",
778
+ "TG",
779
+ "TH",
780
+ "TJ",
781
+ "TL",
782
+ "TM",
783
+ "TN",
784
+ "TO",
785
+ "TR",
786
+ "TT",
787
+ "TV",
788
+ "TW",
789
+ "TZ",
790
+ "UA",
791
+ "UG",
792
+ "US",
793
+ "UY",
794
+ "UZ",
795
+ "VA",
796
+ "VC",
797
+ "VN",
798
+ "VU",
799
+ "WF",
800
+ "WS",
801
+ "YE",
802
+ "YT",
803
+ "ZA",
804
+ "ZM",
805
+ "ZW"
806
+ ]);
807
+ const chatgptAllowedCountriesSchema = z.discriminatedUnion("mode", [
808
+ z.object({ mode: z.literal("all") }),
809
+ z.object({
810
+ mode: z.literal("allow"),
811
+ countries: z.array(chatgptCountryCodeSchema)
812
+ }),
813
+ z.object({
814
+ mode: z.literal("block"),
815
+ countries: z.array(chatgptCountryCodeSchema)
816
+ })
817
+ ]);
818
+ const chatgptTranslationLocaleSchema = z.enum([
819
+ "am",
820
+ "ar",
821
+ "bg-BG",
822
+ "bn-BD",
823
+ "bs-BA",
824
+ "ca-ES",
825
+ "cs-CZ",
826
+ "da-DK",
827
+ "de-DE",
828
+ "el-GR",
829
+ "es-419",
830
+ "es-ES",
831
+ "et-EE",
832
+ "fi-FI",
833
+ "fr-CA",
834
+ "fr-FR",
835
+ "gu-IN",
836
+ "hi-IN",
837
+ "hr-HR",
838
+ "hu-HU",
839
+ "hy-AM",
840
+ "id-ID",
841
+ "is-IS",
842
+ "it-IT",
843
+ "ja-JP",
844
+ "ka-GE",
845
+ "kk",
846
+ "kn-IN",
847
+ "ko-KR",
848
+ "lt",
849
+ "lv-LV",
850
+ "mk-MK",
851
+ "ml",
852
+ "mn",
853
+ "mr-IN",
854
+ "ms-MY",
855
+ "my-MM",
856
+ "nb-NO",
857
+ "nl-NL",
858
+ "pa",
859
+ "pl-PL",
860
+ "pt-BR",
861
+ "pt-PT",
862
+ "ro-RO",
863
+ "ru-RU",
864
+ "sk-SK",
865
+ "sl-SI",
866
+ "so-SO",
867
+ "sq-AL",
868
+ "sr-RS",
869
+ "sv-SE",
870
+ "sw-TZ",
871
+ "ta-IN",
872
+ "te-IN",
873
+ "th-TH",
874
+ "tl",
875
+ "tr-TR",
876
+ "uk-UA",
877
+ "ur",
878
+ "vi-VN",
879
+ "zh-CN",
880
+ "zh-HK",
881
+ "zh-TW"
882
+ ]);
598
883
  const negativeTestCaseSchema = z.object({
599
884
  scenario: z.string(),
600
885
  userPrompt: z.string()
@@ -605,11 +890,19 @@ const chatgptToolJustificationSchema = z.object({
605
890
  openWorldJustification: z.string(),
606
891
  destructiveJustification: z.string()
607
892
  }).describe("Per-tool justification of each MCP annotation value (one sentence per hint).");
893
+ /**
894
+ * Base copy fields, defined once and reused by both the submission form and per-locale
895
+ * translations so the constraints (tagline ≤ 30 chars) never drift. The translation generation
896
+ * path wraps these in {@link clampStringField} since the LLM tends to overshoot the limit.
897
+ */
898
+ const chatgptTaglineSchema = z.string().max(30);
899
+ const chatgptDescriptionSchema = z.string();
608
900
  const chatgptTranslationSchema = z.object({
609
- locale: z.string(),
610
- tagline: z.string().optional(),
611
- description: z.string().optional()
901
+ locale: chatgptTranslationLocaleSchema,
902
+ tagline: chatgptTaglineSchema,
903
+ description: chatgptDescriptionSchema
612
904
  }).describe("Locale-scoped override for tagline + description. English (US) is the default.");
905
+ chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema) });
613
906
  /**
614
907
  * Field order mirrors the ChatGPT (OpenAI) submission spreadsheet, grouped by section.
615
908
  * When adding/removing/reordering fields, keep this in sync with the sheet.
@@ -618,8 +911,8 @@ const chatgptSubmissionFormDataSchema = z.object({
618
911
  logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
619
912
  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."),
620
913
  appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
621
- tagline: z.string().max(30).describe("Plain-language phrase focused on function and user value. 30 chars max."),
622
- description: z.string().describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
914
+ tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value. 30 chars max."),
915
+ description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
623
916
  category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
624
917
  developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
625
918
  companyUrl: z.url().describe("Your company's main website URL."),
@@ -636,7 +929,7 @@ const chatgptSubmissionFormDataSchema = z.object({
636
929
  negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases — prompts where the app should NOT trigger but the model might think it's relevant."),
637
930
  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 4 entries. First three are public. Images: 706px wide, 400–860px tall, PNG."),
638
931
  translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
639
- allowedCountries: chatgptAllowedCountriesSchema.describe("'Allow all' or restrict to a specific list. See OpenAI's supported countries list."),
932
+ allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
640
933
  releaseNotes: z.string().describe("Publicly displayed on the app details page.")
641
934
  });
642
935
  chatgptSubmissionFormDataSchema.pick({
@@ -1040,7 +1333,7 @@ const createEnvironmentContractV1 = oc.route({
1040
1333
  id: z.string(),
1041
1334
  name: z.string(),
1042
1335
  sourceBranch: z.string().nullable().describe("The branch used to build the environment"),
1043
- urls: z.array(z.string().url()).describe("The URLs of the MCP server"),
1336
+ urls: z.array(z.url()).describe("The URLs of the MCP server"),
1044
1337
  createdAt: z.coerce.date(),
1045
1338
  projectId: z.string().describe("The ID of the project the environment belongs to")
1046
1339
  }));
@@ -1116,6 +1409,9 @@ const listProjectsContractV1 = oc.route({
1116
1409
  description: "List all projects for a team",
1117
1410
  tags: ["projects"],
1118
1411
  successDescription: "The list of projects"
1412
+ }).errors({
1413
+ NOT_FOUND: {},
1414
+ BAD_REQUEST: {}
1119
1415
  }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
1120
1416
  const createProjectContractV1 = oc.route({
1121
1417
  path: "/v1/projects",
@@ -1211,7 +1507,10 @@ const deleteEnvironmentVariableContractV1 = oc.route({
1211
1507
  description: "Delete an environment variable by ID",
1212
1508
  tags: ["environments"],
1213
1509
  successDescription: "The environment variable has been deleted successfully"
1214
- }).errors({ NOT_FOUND: {} }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1510
+ }).errors({
1511
+ NOT_FOUND: {},
1512
+ BAD_REQUEST: {}
1513
+ }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1215
1514
  const deleteProjectContractV1 = oc.route({
1216
1515
  path: "/v1/projects/{projectId}",
1217
1516
  method: "DELETE",
@@ -1256,6 +1555,9 @@ const uploadDeploymentArtifactContractV1 = oc.route({
1256
1555
  description: "Return a presigned S3 URL to upload a deployment artifact",
1257
1556
  tags: ["deployments"],
1258
1557
  successDescription: "The presigned upload URL has been generated successfully"
1558
+ }).errors({
1559
+ NOT_FOUND: {},
1560
+ BAD_REQUEST: {}
1259
1561
  }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
1260
1562
  uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
1261
1563
  token: z.string().describe("Token to identify the source archive"),
@@ -1429,7 +1731,7 @@ const getTunnelTicketContractV1 = oc.route({
1429
1731
  description: "Get a signed ticket for establishing a tunnel connection. Requires user authentication (API keys are not supported).",
1430
1732
  tags: ["tunnels"],
1431
1733
  successDescription: "The tunnel ticket"
1432
- }).output(z.object({
1734
+ }).errors({ FORBIDDEN: {} }).output(z.object({
1433
1735
  subdomain: z.string().describe("The subdomain assigned to the user"),
1434
1736
  ticket: z.string().describe("The signed tunnel ticket"),
1435
1737
  tunnelHost: z.string().describe("The tunnel host to connect to")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.geb6c146",
3
+ "version": "0.0.0-staging.gf0dc7b2",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",