@shipeasy/devtools-core 1.0.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/LICENSE +40 -0
- package/README.md +19 -0
- package/dist/api.d.mts +143 -0
- package/dist/api.d.ts +143 -0
- package/dist/api.js +10 -0
- package/dist/api.mjs +10 -0
- package/dist/auth.d.mts +57 -0
- package/dist/auth.d.ts +57 -0
- package/dist/auth.js +12 -0
- package/dist/auth.mjs +12 -0
- package/dist/chunk-2B75JLTX.js +25 -0
- package/dist/chunk-5VQLXGNR.mjs +101 -0
- package/dist/chunk-6SU5REDK.mjs +2848 -0
- package/dist/chunk-7NO55TFC.mjs +25 -0
- package/dist/chunk-GUTBZI2O.js +2848 -0
- package/dist/chunk-I2KLQ2HA.js +22 -0
- package/dist/chunk-KPO3R7ND.js +28 -0
- package/dist/chunk-LCRTLHGL.js +101 -0
- package/dist/chunk-LZDNBMH6.mjs +1394 -0
- package/dist/chunk-MK56AKZR.js +178 -0
- package/dist/chunk-RANNOC72.js +72 -0
- package/dist/chunk-RH6X24HG.mjs +28 -0
- package/dist/chunk-U5DDQYSF.mjs +22 -0
- package/dist/chunk-VHYOR3XA.mjs +178 -0
- package/dist/chunk-WP2TWHG3.mjs +72 -0
- package/dist/chunk-YQHCUZGP.js +1394 -0
- package/dist/feedback-state.d.mts +29 -0
- package/dist/feedback-state.d.ts +29 -0
- package/dist/feedback-state.js +9 -0
- package/dist/feedback-state.mjs +9 -0
- package/dist/forms.d.mts +95 -0
- package/dist/forms.d.ts +95 -0
- package/dist/forms.js +21 -0
- package/dist/forms.mjs +21 -0
- package/dist/gate-flow.d.mts +41 -0
- package/dist/gate-flow.d.ts +41 -0
- package/dist/gate-flow.js +17 -0
- package/dist/gate-flow.mjs +17 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +86 -0
- package/dist/index.mjs +86 -0
- package/dist/public-report.d.mts +56 -0
- package/dist/public-report.d.ts +56 -0
- package/dist/public-report.js +12 -0
- package/dist/public-report.mjs +12 -0
- package/dist/self-report.d.mts +25 -0
- package/dist/self-report.d.ts +25 -0
- package/dist/self-report.js +73 -0
- package/dist/self-report.mjs +73 -0
- package/dist/types-D0sroUDD.d.mts +278 -0
- package/dist/types-D0sroUDD.d.ts +278 -0
- package/dist/zod.gen-DTKpgw-T.d.mts +64 -0
- package/dist/zod.gen-DTKpgw-T.d.ts +64 -0
- package/package.json +58 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
type UniverseParam = {
|
|
2
|
+
/**
|
|
3
|
+
* Param key, referenced by `groups[].params` on every experiment in the universe.
|
|
4
|
+
*/
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* Scalar type of the param's value.
|
|
8
|
+
*/
|
|
9
|
+
type: 'bool' | 'string' | 'int' | 'number';
|
|
10
|
+
/**
|
|
11
|
+
* Universe-wide default. Returned when the assigned variant doesn't override this param (resolution: variant override → universe default).
|
|
12
|
+
*/
|
|
13
|
+
default: unknown;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The universe's ordered config schema — the single source of truth for its params.
|
|
17
|
+
*/
|
|
18
|
+
type UniverseParamSchema = Array<UniverseParam>;
|
|
19
|
+
type ListUniversesResponse = {
|
|
20
|
+
data: Array<{
|
|
21
|
+
/**
|
|
22
|
+
* Stable opaque universe id.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Stable universe key. Single segment or `folder.name`. Lowercase letters, digits, `_` or `-`; max 128 chars. Immutable after create.
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable blurb shown in the universe picker/hovercard.
|
|
31
|
+
*/
|
|
32
|
+
description?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Unit of randomisation. Snake-case in request (`unit_type`), camelCase in response.
|
|
35
|
+
*/
|
|
36
|
+
unitType: string;
|
|
37
|
+
/**
|
|
38
|
+
* Reserved holdout bucket range, or `null` if none.
|
|
39
|
+
*/
|
|
40
|
+
holdoutRange: [
|
|
41
|
+
number,
|
|
42
|
+
number
|
|
43
|
+
] | null;
|
|
44
|
+
/**
|
|
45
|
+
* Basis points of headroom seeded into each new experiment's reserved tail (0 = none).
|
|
46
|
+
*/
|
|
47
|
+
recommendedHeadroom?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The universe-owned config schema, or `null` on pre-rework universes not yet seeded.
|
|
50
|
+
*/
|
|
51
|
+
paramSchema?: UniverseParamSchema | null;
|
|
52
|
+
/**
|
|
53
|
+
* ISO-8601 timestamp of creation.
|
|
54
|
+
*/
|
|
55
|
+
createdAt: string;
|
|
56
|
+
}>;
|
|
57
|
+
next_cursor: string | null;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** Prod defaults; both overridable per client (local dev, staging). */
|
|
61
|
+
declare const DEFAULT_ADMIN_BASE_URL = "https://shipeasy.ai";
|
|
62
|
+
declare const DEFAULT_EDGE_BASE_URL = "https://api.shipeasy.ai";
|
|
63
|
+
/** A completed device-auth login: the minted admin key + the project it binds. */
|
|
64
|
+
interface DevtoolsSession {
|
|
65
|
+
/** Raw admin SDK key (`sdk_admin_*`). Store securely (Keychain/Keystore). */
|
|
66
|
+
token: string;
|
|
67
|
+
projectId: string;
|
|
68
|
+
userEmail: string | null;
|
|
69
|
+
projectName: string | null;
|
|
70
|
+
}
|
|
71
|
+
interface ProjectModules {
|
|
72
|
+
translations: boolean;
|
|
73
|
+
configs: boolean;
|
|
74
|
+
gates: boolean;
|
|
75
|
+
experiments: boolean;
|
|
76
|
+
feedback: boolean;
|
|
77
|
+
user: boolean;
|
|
78
|
+
events: boolean;
|
|
79
|
+
}
|
|
80
|
+
interface ProjectRecord {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
domain: string | null;
|
|
84
|
+
modules: ProjectModules;
|
|
85
|
+
}
|
|
86
|
+
/** One attribute predicate inside a gate condition (e.g. `plan is one of
|
|
87
|
+
* ["business"]`). Mirrors the admin `GateRule`. */
|
|
88
|
+
interface GateRule {
|
|
89
|
+
attr: string;
|
|
90
|
+
op: string;
|
|
91
|
+
value: unknown;
|
|
92
|
+
}
|
|
93
|
+
/** One entry in a gate's ordered gatekeeper stack — evaluated top-to-bottom,
|
|
94
|
+
* first match wins. A subset of the admin `StackedGateEntry` (the fields the
|
|
95
|
+
* overlay renders). */
|
|
96
|
+
interface GateStackEntry {
|
|
97
|
+
id?: string;
|
|
98
|
+
type?: "condition" | "rollout";
|
|
99
|
+
name?: string;
|
|
100
|
+
/** all rules must match ("all", default) vs any ("any"). */
|
|
101
|
+
pass?: "all" | "any";
|
|
102
|
+
rules?: GateRule[];
|
|
103
|
+
/** 0–10000 basis points. */
|
|
104
|
+
rolloutPct?: number;
|
|
105
|
+
bucketBy?: string;
|
|
106
|
+
locked?: boolean;
|
|
107
|
+
/** True when this condition is a whitelist (its rule's value is the list). */
|
|
108
|
+
whitelist?: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface GateRecord {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
killswitch: boolean;
|
|
115
|
+
rolloutPct: number;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
/** Legacy flat targeting rules (pre-stack gates). */
|
|
118
|
+
rules?: GateRule[] | null;
|
|
119
|
+
/** The gatekeeper stack (modern gates). Present → drives the flow view. */
|
|
120
|
+
stack?: GateStackEntry[] | null;
|
|
121
|
+
}
|
|
122
|
+
/** Permissive default schema. Used when a config record arrives without one. */
|
|
123
|
+
declare const PERMISSIVE_CONFIG_SCHEMA: Record<string, unknown>;
|
|
124
|
+
interface ConfigRecord {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
valueJson: unknown;
|
|
128
|
+
/** JSON Schema describing the value shape. Always type="object" post-migration. */
|
|
129
|
+
schema: Record<string, unknown>;
|
|
130
|
+
updatedAt: string;
|
|
131
|
+
}
|
|
132
|
+
/** One experiment variant (group): its label, split weight, and the per-variant
|
|
133
|
+
* param overrides delivered when a caller is hashed into it (a subset of the
|
|
134
|
+
* universe's param schema; unset keys inherit the universe default). */
|
|
135
|
+
interface ExperimentVariant {
|
|
136
|
+
name: string;
|
|
137
|
+
/** Allocation weight in basis points (0–10000). */
|
|
138
|
+
weight: number;
|
|
139
|
+
params?: Record<string, unknown> | null;
|
|
140
|
+
}
|
|
141
|
+
interface ExperimentRecord {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
/** Name of the universe this experiment runs in. */
|
|
145
|
+
universe: string;
|
|
146
|
+
status: "draft" | "running" | "stopped" | "archived";
|
|
147
|
+
groups: ExperimentVariant[];
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
description?: string | null;
|
|
150
|
+
hypothesis?: string | null;
|
|
151
|
+
ownerEmail?: string | null;
|
|
152
|
+
audience?: string | null;
|
|
153
|
+
/** Unit of randomisation override, or null to inherit the universe's. */
|
|
154
|
+
bucketBy?: string | null;
|
|
155
|
+
/** Share of the gated audience allocated, in basis points (0–10000). */
|
|
156
|
+
allocationPct?: number;
|
|
157
|
+
/** ISO-8601 timestamp of the last transition to `running`, or null. */
|
|
158
|
+
startedAt?: string | null;
|
|
159
|
+
minSampleSize?: number;
|
|
160
|
+
}
|
|
161
|
+
interface ProfileRecord {
|
|
162
|
+
id: string;
|
|
163
|
+
name: string;
|
|
164
|
+
createdAt: string;
|
|
165
|
+
/** 1 when this is the project's default profile (D1 returns the int flag). */
|
|
166
|
+
isDefault?: number;
|
|
167
|
+
}
|
|
168
|
+
type UniverseRecord = ListUniversesResponse["data"][number];
|
|
169
|
+
interface KeyRecord {
|
|
170
|
+
id: string;
|
|
171
|
+
key: string;
|
|
172
|
+
value: string;
|
|
173
|
+
profileId: string | null;
|
|
174
|
+
createdAt: string;
|
|
175
|
+
}
|
|
176
|
+
interface DraftRecord {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
profileId: string;
|
|
180
|
+
status: string;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
}
|
|
183
|
+
/** Subset of the server's `connector_data` the devtools read. The admin
|
|
184
|
+
* endpoints return the full blob; we only type the fields the overlays render:
|
|
185
|
+
* the linked GitHub issue/PR (with the PR's merged marker), and the agent
|
|
186
|
+
* trace Jarvis records as it works an item. All fields are tolerated absent. */
|
|
187
|
+
interface FeedbackConnectorData {
|
|
188
|
+
github?: {
|
|
189
|
+
issue?: {
|
|
190
|
+
number: number;
|
|
191
|
+
url: string;
|
|
192
|
+
};
|
|
193
|
+
pr?: {
|
|
194
|
+
number: number;
|
|
195
|
+
url: string;
|
|
196
|
+
/** Merged markers — any of these present means the PR landed. */
|
|
197
|
+
merged?: boolean;
|
|
198
|
+
mergedAt?: string | null;
|
|
199
|
+
state?: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
/** Agent (Jarvis) trace — present once the AI has acted on the item.
|
|
203
|
+
* `awaitingReply` / `state: "awaiting_reply"` means it posted a question
|
|
204
|
+
* back and is waiting on a human. */
|
|
205
|
+
agent?: {
|
|
206
|
+
state?: string;
|
|
207
|
+
awaitingReply?: boolean;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
type BugStatus = "open" | "pending_approval" | "triaged" | "in_progress" | "ready_for_qa" | "resolved" | "wont_fix";
|
|
211
|
+
/** Lowest tier is `nice_to_have`; shared by bugs + feature requests. */
|
|
212
|
+
type BugPriority = "nice_to_have" | "medium" | "high" | "critical";
|
|
213
|
+
interface BugRecord {
|
|
214
|
+
id: string;
|
|
215
|
+
title: string;
|
|
216
|
+
status: BugStatus;
|
|
217
|
+
priority: BugPriority | null;
|
|
218
|
+
reporterEmail: string | null;
|
|
219
|
+
pageUrl: string | null;
|
|
220
|
+
createdAt: string;
|
|
221
|
+
connectorData?: FeedbackConnectorData | null;
|
|
222
|
+
}
|
|
223
|
+
interface AttachmentRecord {
|
|
224
|
+
id: string;
|
|
225
|
+
kind: "screenshot" | "recording" | "file";
|
|
226
|
+
filename: string;
|
|
227
|
+
mimeType: string;
|
|
228
|
+
sizeBytes: number;
|
|
229
|
+
createdAt: string;
|
|
230
|
+
}
|
|
231
|
+
interface BugDetail extends BugRecord {
|
|
232
|
+
stepsToReproduce: string;
|
|
233
|
+
actualResult: string;
|
|
234
|
+
expectedResult: string;
|
|
235
|
+
attachments: AttachmentRecord[];
|
|
236
|
+
}
|
|
237
|
+
/** The queue-item type. `bug`/`feature_request` are user-fileable; `error` and
|
|
238
|
+
* `alert` are auto-filed system tickets the overlay now also lists. */
|
|
239
|
+
type OpsItemType = "bug" | "feature_request" | "error" | "alert" | "measure_plan";
|
|
240
|
+
/** Generic ops-item detail — the enriched GET response, permissive across all
|
|
241
|
+
* types (bug/feature content fields present only for those types; empty for
|
|
242
|
+
* auto-filed error/alert tickets). */
|
|
243
|
+
interface OpsItemDetail extends BugRecord {
|
|
244
|
+
type?: OpsItemType;
|
|
245
|
+
/** Auto-filed tickets carry the originating record's key (error fingerprint,
|
|
246
|
+
* alert dedupe key), or null for human-filed bugs/features. */
|
|
247
|
+
sourceRef?: string | null;
|
|
248
|
+
stepsToReproduce?: string;
|
|
249
|
+
actualResult?: string;
|
|
250
|
+
expectedResult?: string;
|
|
251
|
+
description?: string;
|
|
252
|
+
useCase?: string;
|
|
253
|
+
attachments: AttachmentRecord[];
|
|
254
|
+
}
|
|
255
|
+
interface FeatureRequestRecord {
|
|
256
|
+
id: string;
|
|
257
|
+
title: string;
|
|
258
|
+
status: BugStatus;
|
|
259
|
+
priority: BugPriority | null;
|
|
260
|
+
reporterEmail: string | null;
|
|
261
|
+
pageUrl: string | null;
|
|
262
|
+
createdAt: string;
|
|
263
|
+
connectorData?: FeedbackConnectorData | null;
|
|
264
|
+
}
|
|
265
|
+
interface FeatureRequestDetail extends FeatureRequestRecord {
|
|
266
|
+
description: string;
|
|
267
|
+
useCase: string;
|
|
268
|
+
attachments: AttachmentRecord[];
|
|
269
|
+
}
|
|
270
|
+
interface AttachmentUploadResult {
|
|
271
|
+
id: string;
|
|
272
|
+
filename: string;
|
|
273
|
+
kind: "screenshot" | "recording" | "file";
|
|
274
|
+
mimeType: string;
|
|
275
|
+
sizeBytes: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export { type AttachmentRecord as A, type BugDetail as B, type ConfigRecord as C, DEFAULT_ADMIN_BASE_URL as D, type ExperimentRecord as E, type FeatureRequestDetail as F, type GateRecord as G, type KeyRecord as K, type OpsItemDetail as O, PERMISSIVE_CONFIG_SCHEMA as P, type UniverseRecord as U, type AttachmentUploadResult as a, type BugPriority as b, type BugRecord as c, type BugStatus as d, DEFAULT_EDGE_BASE_URL as e, type DevtoolsSession as f, type DraftRecord as g, type FeatureRequestRecord as h, type FeedbackConnectorData as i, type GateRule as j, type GateStackEntry as k, type OpsItemType as l, type ProfileRecord as m, type ProjectModules as n, type ProjectRecord as o };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Bug-kind fields for `POST /api/admin/ops` (sent with `type: bug`).
|
|
5
|
+
*/
|
|
6
|
+
declare const zCreateBugRequest: z.ZodObject<{
|
|
7
|
+
type: z.ZodEnum<{
|
|
8
|
+
bug: "bug";
|
|
9
|
+
}>;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
stepsToReproduce: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
actualResult: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
13
|
+
expectedResult: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
15
|
+
nice_to_have: "nice_to_have";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
critical: "critical";
|
|
19
|
+
}>>>;
|
|
20
|
+
reporterEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
21
|
+
pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
22
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
viewport: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
25
|
+
notify: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodObject<{
|
|
26
|
+
slackChannel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
31
|
+
}, z.core.$strip>>>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type CreateBugRequestInput = z.infer<typeof zCreateBugRequest>;
|
|
34
|
+
/**
|
|
35
|
+
* Feature-request-kind fields for `POST /api/admin/ops` (sent with `type: feature_request`).
|
|
36
|
+
*/
|
|
37
|
+
declare const zCreateFeatureRequestRequest: z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<{
|
|
39
|
+
feature_request: "feature_request";
|
|
40
|
+
}>;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
useCase: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
45
|
+
nice_to_have: "nice_to_have";
|
|
46
|
+
medium: "medium";
|
|
47
|
+
high: "high";
|
|
48
|
+
critical: "critical";
|
|
49
|
+
}>>>;
|
|
50
|
+
reporterEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
51
|
+
pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
52
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
54
|
+
notify: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodObject<{
|
|
55
|
+
slackChannel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
60
|
+
}, z.core.$strip>>>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
type CreateFeatureRequestRequestInput = z.infer<typeof zCreateFeatureRequestRequest>;
|
|
63
|
+
|
|
64
|
+
export { type CreateBugRequestInput as C, type CreateFeatureRequestRequestInput as a, zCreateFeatureRequestRequest as b, zCreateBugRequest as z };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Bug-kind fields for `POST /api/admin/ops` (sent with `type: bug`).
|
|
5
|
+
*/
|
|
6
|
+
declare const zCreateBugRequest: z.ZodObject<{
|
|
7
|
+
type: z.ZodEnum<{
|
|
8
|
+
bug: "bug";
|
|
9
|
+
}>;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
stepsToReproduce: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
actualResult: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
13
|
+
expectedResult: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
15
|
+
nice_to_have: "nice_to_have";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
critical: "critical";
|
|
19
|
+
}>>>;
|
|
20
|
+
reporterEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
21
|
+
pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
22
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
viewport: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
25
|
+
notify: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodObject<{
|
|
26
|
+
slackChannel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
31
|
+
}, z.core.$strip>>>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type CreateBugRequestInput = z.infer<typeof zCreateBugRequest>;
|
|
34
|
+
/**
|
|
35
|
+
* Feature-request-kind fields for `POST /api/admin/ops` (sent with `type: feature_request`).
|
|
36
|
+
*/
|
|
37
|
+
declare const zCreateFeatureRequestRequest: z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<{
|
|
39
|
+
feature_request: "feature_request";
|
|
40
|
+
}>;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
useCase: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
45
|
+
nice_to_have: "nice_to_have";
|
|
46
|
+
medium: "medium";
|
|
47
|
+
high: "high";
|
|
48
|
+
critical: "critical";
|
|
49
|
+
}>>>;
|
|
50
|
+
reporterEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
51
|
+
pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
52
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
54
|
+
notify: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodObject<{
|
|
55
|
+
slackChannel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
60
|
+
}, z.core.$strip>>>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
type CreateFeatureRequestRequestInput = z.infer<typeof zCreateFeatureRequestRequest>;
|
|
63
|
+
|
|
64
|
+
export { type CreateBugRequestInput as C, type CreateFeatureRequestRequestInput as a, zCreateFeatureRequestRequest as b, zCreateBugRequest as z };
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shipeasy/devtools-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Headless core for the Shipeasy devtools overlays \u2014 admin API client, PKCE device auth, public bug intake, form schemas.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"homepage": "https://shipeasy.ai",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/shipeasy-ai/sdk-ts.git",
|
|
10
|
+
"directory": "packages/devtools-core"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./*": {
|
|
22
|
+
"types": "./dist/*.d.ts",
|
|
23
|
+
"import": "./dist/*.mjs",
|
|
24
|
+
"default": "./dist/*.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsup",
|
|
34
|
+
"type-check": "tsc --noEmit",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"gen:devtools": "openapi-ts",
|
|
37
|
+
"refresh:spec": "node scripts/refresh-devtools-spec.mjs"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@shipeasy/sdk": ">=8.0.0",
|
|
41
|
+
"zod": ">=4"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@hey-api/openapi-ts": "^0.99.0",
|
|
45
|
+
"@shipeasy/sdk": "workspace:*",
|
|
46
|
+
"@types/node": "^26.0.1",
|
|
47
|
+
"tsup": "^8.3.0",
|
|
48
|
+
"typescript": "^6.0.3",
|
|
49
|
+
"vitest": "^4.1.9",
|
|
50
|
+
"zod": "^4.3.6"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=20"
|
|
57
|
+
}
|
|
58
|
+
}
|