@alpic-ai/api 1.104.0 → 1.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -637,6 +637,68 @@ declare const contract: {
637
637
  }>, Record<never, never>>;
638
638
  };
639
639
  };
640
+ playground: {
641
+ get: {
642
+ v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
643
+ environmentId: z.ZodString;
644
+ }, z.core.$strip>, z.ZodObject<{
645
+ isPlaygroundEnabled: z.ZodBoolean;
646
+ serverMetadata: z.ZodNullable<z.ZodObject<{
647
+ name: z.ZodString;
648
+ description: z.ZodString;
649
+ headers: z.ZodArray<z.ZodObject<{
650
+ name: z.ZodString;
651
+ description: z.ZodString;
652
+ isRequired: z.ZodBoolean;
653
+ isSecret: z.ZodBoolean;
654
+ }, z.core.$strip>>;
655
+ examplePrompts: z.ZodArray<z.ZodObject<{
656
+ title: z.ZodString;
657
+ prompt: z.ZodString;
658
+ }, z.core.$strip>>;
659
+ }, z.core.$strip>>;
660
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
661
+ NOT_FOUND: {};
662
+ }>, Record<never, never>>;
663
+ };
664
+ upsert: {
665
+ v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
666
+ environmentId: z.ZodString;
667
+ isPlaygroundEnabled: z.ZodOptional<z.ZodBoolean>;
668
+ name: z.ZodOptional<z.ZodString>;
669
+ description: z.ZodOptional<z.ZodString>;
670
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
671
+ name: z.ZodString;
672
+ description: z.ZodString;
673
+ isRequired: z.ZodDefault<z.ZodBoolean>;
674
+ isSecret: z.ZodDefault<z.ZodBoolean>;
675
+ }, z.core.$strip>>>;
676
+ examplePrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
677
+ title: z.ZodString;
678
+ prompt: z.ZodString;
679
+ }, z.core.$strip>>>;
680
+ }, z.core.$strip>, z.ZodObject<{
681
+ isPlaygroundEnabled: z.ZodBoolean;
682
+ serverMetadata: z.ZodNullable<z.ZodObject<{
683
+ name: z.ZodString;
684
+ description: z.ZodString;
685
+ headers: z.ZodArray<z.ZodObject<{
686
+ name: z.ZodString;
687
+ description: z.ZodString;
688
+ isRequired: z.ZodBoolean;
689
+ isSecret: z.ZodBoolean;
690
+ }, z.core.$strip>>;
691
+ examplePrompts: z.ZodArray<z.ZodObject<{
692
+ title: z.ZodString;
693
+ prompt: z.ZodString;
694
+ }, z.core.$strip>>;
695
+ }, z.core.$strip>>;
696
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
697
+ NOT_FOUND: {};
698
+ BAD_REQUEST: {};
699
+ }>, Record<never, never>>;
700
+ };
701
+ };
640
702
  tunnels: {
641
703
  getTicket: {
642
704
  v1: _$_orpc_contract0.ContractProcedureBuilderWithOutput<_$_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
@@ -999,6 +1061,16 @@ declare const auditReportSchema: z.ZodObject<{
999
1061
  }, z.core.$strip>>;
1000
1062
  }, z.core.$strip>;
1001
1063
  type AuditReport = z.infer<typeof auditReportSchema>;
1064
+ declare const playgroundHeaderSchema: z.ZodObject<{
1065
+ name: z.ZodString;
1066
+ description: z.ZodString;
1067
+ isRequired: z.ZodDefault<z.ZodBoolean>;
1068
+ isSecret: z.ZodDefault<z.ZodBoolean>;
1069
+ }, z.core.$strip>;
1070
+ declare const playgroundExamplePromptSchema: z.ZodObject<{
1071
+ title: z.ZodString;
1072
+ prompt: z.ZodString;
1073
+ }, z.core.$strip>;
1002
1074
  declare const serverFieldsSchema: z.ZodObject<{
1003
1075
  $schema: z.ZodString;
1004
1076
  name: z.ZodString;
@@ -1023,4 +1095,4 @@ declare const serverFieldsSchema: z.ZodObject<{
1023
1095
  }, z.core.$strip>>>;
1024
1096
  }, z.core.$strip>;
1025
1097
  //#endregion
1026
- export { ApiContext, AuditReport, CheckCategory, CheckDetail, CheckResult, CheckScope, CheckSeverity, Platform, RouterInput, RouterOutput, Runtime, Transport, analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, runtimeSchema, serverFieldsSchema, transportSchema };
1098
+ export { ApiContext, AuditReport, CheckCategory, CheckDetail, CheckResult, CheckScope, CheckSeverity, Platform, RouterInput, RouterOutput, Runtime, Transport, analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema };
package/dist/index.mjs CHANGED
@@ -123,6 +123,16 @@ const auditReportSchema = z.object({
123
123
  claudeai: z.object({ url: z.string() }).optional()
124
124
  }).optional()
125
125
  });
126
+ const playgroundHeaderSchema = z.object({
127
+ name: z.string().min(1).max(100),
128
+ description: z.string().max(200),
129
+ isRequired: z.boolean().default(false),
130
+ isSecret: z.boolean().default(false)
131
+ });
132
+ const playgroundExamplePromptSchema = z.object({
133
+ title: z.string().min(1).max(100),
134
+ prompt: z.string().min(1).max(500)
135
+ });
126
136
  const serverFieldsSchema = z.object({
127
137
  $schema: z.string(),
128
138
  name: z.string(),
@@ -590,6 +600,47 @@ const getServerInfoContractV1 = oc.route({
590
600
  projectId: z.string(),
591
601
  domain: z.string()
592
602
  })).output(z.object({ serverFields: serverFieldsSchema }));
603
+ const playgroundServerMetadataOutputSchema = z.object({
604
+ name: z.string(),
605
+ description: z.string(),
606
+ headers: z.array(z.object({
607
+ name: z.string(),
608
+ description: z.string(),
609
+ isRequired: z.boolean(),
610
+ isSecret: z.boolean()
611
+ })),
612
+ examplePrompts: z.array(playgroundExamplePromptSchema)
613
+ });
614
+ const playgroundOutputSchema = z.object({
615
+ isPlaygroundEnabled: z.boolean(),
616
+ serverMetadata: playgroundServerMetadataOutputSchema.nullable()
617
+ });
618
+ const getPlaygroundContractV1 = oc.route({
619
+ path: "/v1/environments/{environmentId}/playground",
620
+ method: "GET",
621
+ summary: "Get playground configuration",
622
+ description: "Get the playground configuration for an environment",
623
+ tags: ["environments"],
624
+ successDescription: "The playground configuration"
625
+ }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(playgroundOutputSchema);
626
+ const upsertPlaygroundContractV1 = oc.route({
627
+ path: "/v1/environments/{environmentId}/playground",
628
+ method: "PUT",
629
+ summary: "Update playground configuration",
630
+ description: "Update the playground configuration for an environment. All fields are optional — only provided fields are updated.",
631
+ tags: ["environments"],
632
+ successDescription: "The updated playground configuration"
633
+ }).errors({
634
+ NOT_FOUND: {},
635
+ BAD_REQUEST: {}
636
+ }).input(z.object({
637
+ environmentId: z.string().describe("The ID of the environment"),
638
+ isPlaygroundEnabled: z.boolean().optional(),
639
+ name: z.string().min(1).max(100).optional(),
640
+ description: z.string().min(1).max(500).optional(),
641
+ headers: z.array(playgroundHeaderSchema).optional(),
642
+ examplePrompts: z.array(playgroundExamplePromptSchema).max(3).optional()
643
+ })).output(playgroundOutputSchema);
593
644
  const createBeaconContractV1 = oc.route({
594
645
  path: "/v1/beacon/analyses",
595
646
  method: "POST",
@@ -648,6 +699,10 @@ const contract = {
648
699
  create: { v1: createProjectContractV1 },
649
700
  delete: { v1: deleteProjectContractV1 }
650
701
  },
702
+ playground: {
703
+ get: { v1: getPlaygroundContractV1 },
704
+ upsert: { v1: upsertPlaygroundContractV1 }
705
+ },
651
706
  tunnels: { getTicket: { v1: getTunnelTicketContractV1 } },
652
707
  distribution: {
653
708
  publish: { v1: publishServerContractV1 },
@@ -659,4 +714,4 @@ const contract = {
659
714
  }
660
715
  };
661
716
  //#endregion
662
- export { analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, runtimeSchema, serverFieldsSchema, transportSchema };
717
+ export { analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.104.0",
3
+ "version": "1.105.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "@types/ms": "^2.1.0",
27
27
  "shx": "^0.4.0",
28
28
  "tsdown": "^0.21.7",
29
- "typescript": "^5.9.3",
29
+ "typescript": "^6.0.2",
30
30
  "vitest": "^4.1.2"
31
31
  },
32
32
  "scripts": {