@domino-sdk/relay-cli 0.5.0 → 0.7.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/cli/capabilities.json +98 -14
- package/cli/commands/agents.mjs +20 -8
- package/cli/commands/hosting.mjs +65 -11
- package/cli/commands/inspect.mjs +16 -9
- package/cli/commands/project.mjs +19 -13
- package/cli/commands/staging.mjs +42 -7
- package/cli/dev.mjs +1 -1
- package/cli/output.mjs +76 -0
- package/cli/prompts.mjs +92 -0
- package/cli/runtime.mjs +8 -6
- package/cli/select-project.mjs +64 -0
- package/cli/skills/domino/references/authoring.md +55 -2
- package/cli/skills/domino/references/existing-app.md +2 -0
- package/cli/skills/domino/references/participant-api.md +12 -1
- package/cli.mjs +2 -1
- package/dist/index.d.ts +1369 -33
- package/dist/index.js +38 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
+
import { pointLedgerSchema } from "@domino-sdk/relay";
|
|
3
|
+
import { rewardDeliveriesSchema } from "@domino-sdk/relay";
|
|
4
|
+
import {
|
|
5
|
+
observationInputSchema,
|
|
6
|
+
observationReceiptSchema
|
|
7
|
+
} from "@domino-sdk/relay";
|
|
2
8
|
import {
|
|
3
9
|
publishedReferralSchema,
|
|
4
10
|
referralManagementSchema,
|
|
@@ -264,10 +270,11 @@ var permissionSchema = z3.enum([
|
|
|
264
270
|
"handover",
|
|
265
271
|
"inventory",
|
|
266
272
|
"access",
|
|
267
|
-
"points"
|
|
273
|
+
"points",
|
|
274
|
+
"observe"
|
|
268
275
|
]);
|
|
269
276
|
var rolePermissions = {
|
|
270
|
-
editor: ["read", "publish", "inventory", "points"],
|
|
277
|
+
editor: ["read", "publish", "inventory", "points", "observe"],
|
|
271
278
|
reviewer: ["read", "review"],
|
|
272
279
|
staff: ["read", "confirm", "handover"]
|
|
273
280
|
};
|
|
@@ -349,6 +356,10 @@ var memberSchema = z3.object({
|
|
|
349
356
|
rewards: z3.number(),
|
|
350
357
|
lastActivity: z3.number().nullable()
|
|
351
358
|
});
|
|
359
|
+
var personSchema = z3.object({
|
|
360
|
+
id: z3.string(),
|
|
361
|
+
accounts: z3.array(memberAccountSchema).default([])
|
|
362
|
+
});
|
|
352
363
|
var metricsSchema = z3.object({
|
|
353
364
|
quests: z3.number(),
|
|
354
365
|
members: z3.number(),
|
|
@@ -385,6 +396,7 @@ var auditRecordSchema = z3.object({
|
|
|
385
396
|
var pageSchema = z3.object({
|
|
386
397
|
snapshot: snapshotSchema,
|
|
387
398
|
members: z3.array(memberSchema),
|
|
399
|
+
people: z3.array(personSchema).default([]),
|
|
388
400
|
metrics: metricsSchema,
|
|
389
401
|
total: z3.number(),
|
|
390
402
|
offset: z3.number(),
|
|
@@ -467,6 +479,21 @@ function createManagementClient(options) {
|
|
|
467
479
|
return {
|
|
468
480
|
raw,
|
|
469
481
|
request,
|
|
482
|
+
observations: {
|
|
483
|
+
submit: (input) => request(
|
|
484
|
+
"/observations",
|
|
485
|
+
observationReceiptSchema,
|
|
486
|
+
observationInputSchema.parse(input)
|
|
487
|
+
)
|
|
488
|
+
},
|
|
489
|
+
pointLedgers: {
|
|
490
|
+
list: () => request("/point-ledgers", z3.array(pointLedgerSchema)),
|
|
491
|
+
save: (input) => request(
|
|
492
|
+
"/point-ledgers",
|
|
493
|
+
pointLedgerSchema,
|
|
494
|
+
pointLedgerSchema.parse(input)
|
|
495
|
+
)
|
|
496
|
+
},
|
|
470
497
|
points: {
|
|
471
498
|
update: (input) => request(
|
|
472
499
|
"/points",
|
|
@@ -600,10 +627,18 @@ function createManagementClient(options) {
|
|
|
600
627
|
readiness: () => request("/readiness", readinessSchema),
|
|
601
628
|
access: () => request("/access", accessSchema),
|
|
602
629
|
createProject: (input) => request("/projects", projectSchema, input),
|
|
630
|
+
people: (members) => request(
|
|
631
|
+
`/people?${new URLSearchParams({ ids: members.join(",") })}`,
|
|
632
|
+
z3.array(personSchema)
|
|
633
|
+
),
|
|
603
634
|
page: (page, query) => request(
|
|
604
635
|
`/${page}?${new URLSearchParams(Object.entries(query).map(([k, v]) => [k, String(v)]))}`,
|
|
605
636
|
pageSchema
|
|
606
637
|
),
|
|
638
|
+
rewardDeliveries: (member) => request(
|
|
639
|
+
"/reward-deliveries" + (member ? "?member=" + encodeURIComponent(member) : ""),
|
|
640
|
+
rewardDeliveriesSchema
|
|
641
|
+
),
|
|
607
642
|
member: (id) => request(`/members/${encodeURIComponent(id)}`, memberDetailSchema)
|
|
608
643
|
};
|
|
609
644
|
}
|
|
@@ -638,6 +673,7 @@ export {
|
|
|
638
673
|
operationSchema,
|
|
639
674
|
pageSchema,
|
|
640
675
|
permissionSchema,
|
|
676
|
+
personSchema,
|
|
641
677
|
projectInputSchema,
|
|
642
678
|
projectSchema,
|
|
643
679
|
projectSetupSchema,
|
package/package.json
CHANGED