@alpic-ai/api 0.0.0-staging.gd0c984f → 0.0.0-staging.gdb93d26
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 +1 -1
- package/dist/index.mjs +108 -7
- package/package.json +1 -10
package/dist/index.d.mts
CHANGED
|
@@ -212,7 +212,7 @@ declare const contract: {
|
|
|
212
212
|
name: z.ZodString;
|
|
213
213
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
214
214
|
mcpServerUrl: z.ZodString;
|
|
215
|
-
domains: z.ZodArray<z.
|
|
215
|
+
domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
|
|
216
216
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
217
217
|
projectId: z.ZodString;
|
|
218
218
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
package/dist/index.mjs
CHANGED
|
@@ -92,6 +92,86 @@ z.object({
|
|
|
92
92
|
content: z.string(),
|
|
93
93
|
source: z.enum(["model", "user"])
|
|
94
94
|
});
|
|
95
|
+
const intentCategoryColorSchema = z.enum([
|
|
96
|
+
"red",
|
|
97
|
+
"orange",
|
|
98
|
+
"yellow",
|
|
99
|
+
"green",
|
|
100
|
+
"blue",
|
|
101
|
+
"purple",
|
|
102
|
+
"pink",
|
|
103
|
+
"gray"
|
|
104
|
+
]);
|
|
105
|
+
intentCategoryColorSchema.options;
|
|
106
|
+
const intentCategorySchema = z.object({
|
|
107
|
+
id: z.string(),
|
|
108
|
+
createdAt: z.coerce.date(),
|
|
109
|
+
environmentId: z.string(),
|
|
110
|
+
name: z.string(),
|
|
111
|
+
color: intentCategoryColorSchema
|
|
112
|
+
});
|
|
113
|
+
z.object({
|
|
114
|
+
id: z.string(),
|
|
115
|
+
name: z.string(),
|
|
116
|
+
color: intentCategoryColorSchema,
|
|
117
|
+
intentCount: z.number().int().nonnegative()
|
|
118
|
+
});
|
|
119
|
+
z.object({
|
|
120
|
+
id: z.string(),
|
|
121
|
+
createdAt: z.coerce.date(),
|
|
122
|
+
environmentId: z.string(),
|
|
123
|
+
toolName: z.string(),
|
|
124
|
+
message: z.string(),
|
|
125
|
+
categories: z.array(intentCategorySchema)
|
|
126
|
+
});
|
|
127
|
+
const signalCategorySchema = z.object({
|
|
128
|
+
id: z.string(),
|
|
129
|
+
name: z.string(),
|
|
130
|
+
color: intentCategoryColorSchema
|
|
131
|
+
});
|
|
132
|
+
z.discriminatedUnion("kind", [
|
|
133
|
+
z.object({
|
|
134
|
+
kind: z.literal("new"),
|
|
135
|
+
category: signalCategorySchema,
|
|
136
|
+
currentCount: z.number().int().nonnegative(),
|
|
137
|
+
currentShare: z.number()
|
|
138
|
+
}),
|
|
139
|
+
z.object({
|
|
140
|
+
kind: z.literal("resurging"),
|
|
141
|
+
category: signalCategorySchema,
|
|
142
|
+
currentCount: z.number().int().nonnegative(),
|
|
143
|
+
daysQuiet: z.number(),
|
|
144
|
+
currentShare: z.number()
|
|
145
|
+
}),
|
|
146
|
+
z.object({
|
|
147
|
+
kind: z.literal("spike"),
|
|
148
|
+
category: signalCategorySchema,
|
|
149
|
+
currentCount: z.number().int().nonnegative(),
|
|
150
|
+
previousCount: z.number().int().nonnegative(),
|
|
151
|
+
currentShare: z.number(),
|
|
152
|
+
previousShare: z.number(),
|
|
153
|
+
changeRatio: z.number()
|
|
154
|
+
}),
|
|
155
|
+
z.object({
|
|
156
|
+
kind: z.literal("declining"),
|
|
157
|
+
category: signalCategorySchema,
|
|
158
|
+
currentCount: z.number().int().nonnegative(),
|
|
159
|
+
previousCount: z.number().int().nonnegative(),
|
|
160
|
+
currentShare: z.number(),
|
|
161
|
+
previousShare: z.number(),
|
|
162
|
+
changeRatio: z.number()
|
|
163
|
+
})
|
|
164
|
+
]);
|
|
165
|
+
z.discriminatedUnion("kind", [z.object({
|
|
166
|
+
kind: z.literal("existing"),
|
|
167
|
+
categoryId: z.string(),
|
|
168
|
+
categoryName: z.string(),
|
|
169
|
+
intentIds: z.array(z.string())
|
|
170
|
+
}), z.object({
|
|
171
|
+
kind: z.literal("new"),
|
|
172
|
+
categoryName: z.string(),
|
|
173
|
+
intentIds: z.array(z.string())
|
|
174
|
+
})]);
|
|
95
175
|
z.object({
|
|
96
176
|
id: z.string(),
|
|
97
177
|
teamId: z.string(),
|
|
@@ -134,6 +214,10 @@ const positiveTestCaseSchema = z.object({
|
|
|
134
214
|
toolTriggered: z.string().optional(),
|
|
135
215
|
expectedOutput: z.string().optional()
|
|
136
216
|
}).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
|
|
217
|
+
const screenshotEntrySchema = z.object({
|
|
218
|
+
prompt: z.string(),
|
|
219
|
+
url: z.url()
|
|
220
|
+
}).describe("Each screenshot: the user prompt that produced it + the image URL.");
|
|
137
221
|
/** Accepts either a valid email or URL. */
|
|
138
222
|
const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
|
|
139
223
|
const chatgptCategorySchema = z.enum([
|
|
@@ -174,7 +258,7 @@ const chatgptTranslationSchema = z.object({
|
|
|
174
258
|
*/
|
|
175
259
|
const chatgptSubmissionFormDataSchema = z.object({
|
|
176
260
|
logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
|
|
177
|
-
logoDark: z.string().describe("
|
|
261
|
+
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."),
|
|
178
262
|
appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
|
|
179
263
|
tagline: z.string().max(30).describe("Plain-language phrase focused on function and user value. 30 chars max."),
|
|
180
264
|
description: z.string().describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
|
|
@@ -192,7 +276,7 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
192
276
|
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values."),
|
|
193
277
|
testCases: z.array(positiveTestCaseSchema).describe("At least 5 positive test cases. Each: Scenario, User prompt, Tool triggered, Expected output. Coverage over all major use cases."),
|
|
194
278
|
negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases — prompts where the app should NOT trigger but the model might think it's relevant."),
|
|
195
|
-
screenshots: z.array(
|
|
279
|
+
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."),
|
|
196
280
|
translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
|
|
197
281
|
allowedCountries: chatgptAllowedCountriesSchema.describe("'Allow all' or restrict to a specific list. See OpenAI's supported countries list."),
|
|
198
282
|
releaseNotes: z.string().describe("Publicly displayed on the app details page.")
|
|
@@ -372,19 +456,20 @@ Reviewers test every single tool you list here — don't list tools that don't w
|
|
|
372
456
|
• 'I've specified user-friendly titles for all tools' — every tool has a 'title' annotation (a human-readable label, different from the tool name).
|
|
373
457
|
• '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).
|
|
374
458
|
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.`),
|
|
375
|
-
logoLight: z.string().describe(`Your connector's logo
|
|
459
|
+
logoLight: z.string().describe(`Your connector's logo for light backgrounds. Requirements:
|
|
376
460
|
• Format: SVG only
|
|
377
461
|
• Aspect ratio: square (1:1)
|
|
378
|
-
• Should work on
|
|
462
|
+
• Should work on a light background
|
|
379
463
|
• Provide via URL (Google Drive link is fine) or upload directly
|
|
380
464
|
Tip: use a simple, recognizable icon — not a full wordmark. The logo appears at small sizes in the directory grid.`),
|
|
381
|
-
|
|
465
|
+
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.`),
|
|
466
|
+
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:
|
|
382
467
|
• 3–5 images is ideal
|
|
383
468
|
• Minimum 1000px width, PNG format preferred
|
|
469
|
+
• Each screenshot is paired with the user prompt that produced it
|
|
384
470
|
• Crop to just the relevant part of the Claude interface (the tool response area)
|
|
385
471
|
• Show your connector doing something impressive and useful — real data, real results
|
|
386
472
|
• If you're an MCP App, include screenshots of your interactive UI elements
|
|
387
|
-
• Videos are also welcome
|
|
388
473
|
These images appear in your directory listing and are a key factor in driving user installs.`)
|
|
389
474
|
});
|
|
390
475
|
claudeSubmissionFormDataSchema.pick({
|
|
@@ -427,6 +512,22 @@ const subscriptionPlanSchema = z.enum([
|
|
|
427
512
|
"enterprise"
|
|
428
513
|
]);
|
|
429
514
|
z.object({ plan: subscriptionPlanSchema.nullable() });
|
|
515
|
+
const customerCreditsSchema = z.object({
|
|
516
|
+
balanceInCents: z.number(),
|
|
517
|
+
expiresAt: z.number().nullable(),
|
|
518
|
+
currency: z.string()
|
|
519
|
+
});
|
|
520
|
+
const customerUsageSchema = z.object({
|
|
521
|
+
amountInCents: z.number(),
|
|
522
|
+
currency: z.string(),
|
|
523
|
+
periodEnd: z.number()
|
|
524
|
+
});
|
|
525
|
+
const partnerDiscountSchema = z.object({ endsAt: z.number() });
|
|
526
|
+
z.object({
|
|
527
|
+
customerCredits: customerCreditsSchema.nullable(),
|
|
528
|
+
customerUsage: customerUsageSchema.nullable(),
|
|
529
|
+
partnerDiscount: partnerDiscountSchema.nullable()
|
|
530
|
+
});
|
|
430
531
|
//#endregion
|
|
431
532
|
//#region src/schemas.ts
|
|
432
533
|
const RESERVED_KEYS = [
|
|
@@ -583,7 +684,7 @@ const getEnvironmentContractV1 = oc.route({
|
|
|
583
684
|
name: z.string(),
|
|
584
685
|
sourceBranch: z.string().nullable(),
|
|
585
686
|
mcpServerUrl: z.string(),
|
|
586
|
-
domains: z.array(z.
|
|
687
|
+
domains: z.array(z.hostname()),
|
|
587
688
|
createdAt: z.coerce.date(),
|
|
588
689
|
projectId: z.string()
|
|
589
690
|
}));
|
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.gdb93d26",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
-
"nx": {
|
|
18
|
-
"targets": {
|
|
19
|
-
"build": {
|
|
20
|
-
"dependsOn": [
|
|
21
|
-
"^build"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
17
|
"author": "Alpic",
|
|
27
18
|
"license": "ISC",
|
|
28
19
|
"dependencies": {
|