@happyvertical/garrula 0.1.1 → 0.1.3
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/README.md +2 -0
- package/dist/Garrula.d.ts +10 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +119 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +48 -14
- package/dist/outbound/models.d.ts +3 -0
- package/dist/outbound/service.d.ts +8 -1
- package/dist/outbound/types.d.ts +35 -4
- package/dist/smrt-knowledge.json +26 -3
- package/dist/ui/admin/PersonaPolicyPanel.svelte +4 -8
- package/dist/ui/post-kinds.d.ts +8 -0
- package/dist/ui/post-kinds.js +1 -0
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/garrula",
|
|
5
|
-
"packageVersion": "0.1.
|
|
5
|
+
"packageVersion": "0.1.3",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/garrula:Garrula": {
|
|
8
8
|
"name": "garrula",
|
|
9
9
|
"className": "Garrula",
|
|
10
10
|
"qualifiedName": "@happyvertical/garrula:Garrula",
|
|
11
11
|
"collection": "agents",
|
|
12
|
-
"filePath": "/home/runner/
|
|
12
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/Garrula.ts",
|
|
13
13
|
"packageName": "@happyvertical/garrula",
|
|
14
14
|
"fields": {
|
|
15
15
|
"created_at": {
|
|
@@ -290,6 +290,28 @@
|
|
|
290
290
|
"isStatic": false,
|
|
291
291
|
"isPublic": true
|
|
292
292
|
},
|
|
293
|
+
"createDraft": {
|
|
294
|
+
"name": "createDraft",
|
|
295
|
+
"async": true,
|
|
296
|
+
"parameters": [
|
|
297
|
+
{
|
|
298
|
+
"name": "input",
|
|
299
|
+
"type": "CreateDraftInput",
|
|
300
|
+
"optional": false
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "options",
|
|
304
|
+
"type": "object",
|
|
305
|
+
"optional": true,
|
|
306
|
+
"memberTypes": [
|
|
307
|
+
"string"
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"returnType": "Promise<CreateDraftResult>",
|
|
312
|
+
"isStatic": false,
|
|
313
|
+
"isPublic": true
|
|
314
|
+
},
|
|
293
315
|
"listDrafts": {
|
|
294
316
|
"name": "listDrafts",
|
|
295
317
|
"async": true,
|
|
@@ -900,7 +922,7 @@
|
|
|
900
922
|
"qualifiedName": "@happyvertical/garrula:GarrulaOutboundSettings",
|
|
901
923
|
"collection": "garrulaoutboundsettingses",
|
|
902
924
|
"description": "One row per tenant: pause switch, cap, persona, source rules, autonomy, links.",
|
|
903
|
-
"filePath": "/home/runner/
|
|
925
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
904
926
|
"packageName": "@happyvertical/garrula",
|
|
905
927
|
"fields": {
|
|
906
928
|
"created_at": {
|
|
@@ -1131,7 +1153,7 @@
|
|
|
1131
1153
|
"className": "GarrulaOutboundSettingsCollection",
|
|
1132
1154
|
"qualifiedName": "@happyvertical/garrula:GarrulaOutboundSettingsCollection",
|
|
1133
1155
|
"collection": "garrulaoutboundsettingses",
|
|
1134
|
-
"filePath": "/home/runner/
|
|
1156
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1135
1157
|
"packageName": "@happyvertical/garrula",
|
|
1136
1158
|
"fields": {},
|
|
1137
1159
|
"methods": {},
|
|
@@ -1278,7 +1300,7 @@
|
|
|
1278
1300
|
"qualifiedName": "@happyvertical/garrula:GarrulaOutboundPost",
|
|
1279
1301
|
"collection": "garrulaoutboundposts",
|
|
1280
1302
|
"description": "The outbound lifecycle of one smrt-social SocialPost: state, kind, source and cited claims.",
|
|
1281
|
-
"filePath": "/home/runner/
|
|
1303
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1282
1304
|
"packageName": "@happyvertical/garrula",
|
|
1283
1305
|
"fields": {
|
|
1284
1306
|
"created_at": {
|
|
@@ -1336,6 +1358,10 @@
|
|
|
1336
1358
|
"required": false,
|
|
1337
1359
|
"default": []
|
|
1338
1360
|
},
|
|
1361
|
+
"createdBy": {
|
|
1362
|
+
"type": "text",
|
|
1363
|
+
"required": false
|
|
1364
|
+
},
|
|
1339
1365
|
"approvedBy": {
|
|
1340
1366
|
"type": "text",
|
|
1341
1367
|
"required": false
|
|
@@ -1367,7 +1393,7 @@
|
|
|
1367
1393
|
"validationRules": [],
|
|
1368
1394
|
"schema": {
|
|
1369
1395
|
"tableName": "garrula_outbound_posts",
|
|
1370
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"garrula_outbound_posts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"social_post_id\" TEXT,\n \"state\" TEXT,\n \"kind\" TEXT,\n \"source_event_id\" TEXT,\n \"source_kind\" TEXT,\n \"source_url\" TEXT,\n \"claims\" JSON DEFAULT '[]',\n \"approved_by\" TEXT,\n \"rejected_reason\" TEXT\n);",
|
|
1396
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"garrula_outbound_posts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"social_post_id\" TEXT,\n \"state\" TEXT,\n \"kind\" TEXT,\n \"source_event_id\" TEXT,\n \"source_kind\" TEXT,\n \"source_url\" TEXT,\n \"claims\" JSON DEFAULT '[]',\n \"created_by\" TEXT,\n \"approved_by\" TEXT,\n \"rejected_reason\" TEXT\n);",
|
|
1371
1397
|
"columns": {
|
|
1372
1398
|
"_sync_origin_device_id": {
|
|
1373
1399
|
"type": "TEXT"
|
|
@@ -1442,6 +1468,10 @@
|
|
|
1442
1468
|
"notNull": false,
|
|
1443
1469
|
"default": []
|
|
1444
1470
|
},
|
|
1471
|
+
"created_by": {
|
|
1472
|
+
"type": "TEXT",
|
|
1473
|
+
"notNull": false
|
|
1474
|
+
},
|
|
1445
1475
|
"approved_by": {
|
|
1446
1476
|
"type": "TEXT",
|
|
1447
1477
|
"notNull": false
|
|
@@ -1477,7 +1507,7 @@
|
|
|
1477
1507
|
]
|
|
1478
1508
|
}
|
|
1479
1509
|
],
|
|
1480
|
-
"version": "
|
|
1510
|
+
"version": "250ade04"
|
|
1481
1511
|
},
|
|
1482
1512
|
"importPath": "@happyvertical/garrula"
|
|
1483
1513
|
},
|
|
@@ -1486,7 +1516,7 @@
|
|
|
1486
1516
|
"className": "GarrulaOutboundPostCollection",
|
|
1487
1517
|
"qualifiedName": "@happyvertical/garrula:GarrulaOutboundPostCollection",
|
|
1488
1518
|
"collection": "garrulaoutboundposts",
|
|
1489
|
-
"filePath": "/home/runner/
|
|
1519
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1490
1520
|
"packageName": "@happyvertical/garrula",
|
|
1491
1521
|
"fields": {},
|
|
1492
1522
|
"methods": {},
|
|
@@ -1507,7 +1537,7 @@
|
|
|
1507
1537
|
],
|
|
1508
1538
|
"schema": {
|
|
1509
1539
|
"tableName": "garrula_outbound_posts",
|
|
1510
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"garrula_outbound_posts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"social_post_id\" TEXT,\n \"state\" TEXT,\n \"kind\" TEXT,\n \"source_event_id\" TEXT,\n \"source_kind\" TEXT,\n \"source_url\" TEXT,\n \"claims\" JSON DEFAULT '[]',\n \"approved_by\" TEXT,\n \"rejected_reason\" TEXT\n);",
|
|
1540
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"garrula_outbound_posts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"social_post_id\" TEXT,\n \"state\" TEXT,\n \"kind\" TEXT,\n \"source_event_id\" TEXT,\n \"source_kind\" TEXT,\n \"source_url\" TEXT,\n \"claims\" JSON DEFAULT '[]',\n \"created_by\" TEXT,\n \"approved_by\" TEXT,\n \"rejected_reason\" TEXT\n);",
|
|
1511
1541
|
"columns": {
|
|
1512
1542
|
"_sync_origin_device_id": {
|
|
1513
1543
|
"type": "TEXT"
|
|
@@ -1582,6 +1612,10 @@
|
|
|
1582
1612
|
"notNull": false,
|
|
1583
1613
|
"default": []
|
|
1584
1614
|
},
|
|
1615
|
+
"created_by": {
|
|
1616
|
+
"type": "TEXT",
|
|
1617
|
+
"notNull": false
|
|
1618
|
+
},
|
|
1585
1619
|
"approved_by": {
|
|
1586
1620
|
"type": "TEXT",
|
|
1587
1621
|
"notNull": false
|
|
@@ -1617,7 +1651,7 @@
|
|
|
1617
1651
|
]
|
|
1618
1652
|
}
|
|
1619
1653
|
],
|
|
1620
|
-
"version": "
|
|
1654
|
+
"version": "250ade04"
|
|
1621
1655
|
},
|
|
1622
1656
|
"importPath": "@happyvertical/garrula"
|
|
1623
1657
|
},
|
|
@@ -1627,7 +1661,7 @@
|
|
|
1627
1661
|
"qualifiedName": "@happyvertical/garrula:GarrulaSpendEntry",
|
|
1628
1662
|
"collection": "garrulaspendentries",
|
|
1629
1663
|
"description": "Spend ledger: one entry per publish attempt, per tenant per month.",
|
|
1630
|
-
"filePath": "/home/runner/
|
|
1664
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1631
1665
|
"packageName": "@happyvertical/garrula",
|
|
1632
1666
|
"fields": {
|
|
1633
1667
|
"created_at": {
|
|
@@ -1809,7 +1843,7 @@
|
|
|
1809
1843
|
"className": "GarrulaSpendEntryCollection",
|
|
1810
1844
|
"qualifiedName": "@happyvertical/garrula:GarrulaSpendEntryCollection",
|
|
1811
1845
|
"collection": "garrulaspendentries",
|
|
1812
|
-
"filePath": "/home/runner/
|
|
1846
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1813
1847
|
"packageName": "@happyvertical/garrula",
|
|
1814
1848
|
"fields": {},
|
|
1815
1849
|
"methods": {},
|
|
@@ -1934,7 +1968,7 @@
|
|
|
1934
1968
|
"qualifiedName": "@happyvertical/garrula:GarrulaSourceEvent",
|
|
1935
1969
|
"collection": "garrulasourceevents",
|
|
1936
1970
|
"description": "Dedupe ledger: an event id seen once never yields a second candidate.",
|
|
1937
|
-
"filePath": "/home/runner/
|
|
1971
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
1938
1972
|
"packageName": "@happyvertical/garrula",
|
|
1939
1973
|
"fields": {
|
|
1940
1974
|
"created_at": {
|
|
@@ -2094,7 +2128,7 @@
|
|
|
2094
2128
|
"className": "GarrulaSourceEventCollection",
|
|
2095
2129
|
"qualifiedName": "@happyvertical/garrula:GarrulaSourceEventCollection",
|
|
2096
2130
|
"collection": "garrulasourceevents",
|
|
2097
|
-
"filePath": "/home/runner/
|
|
2131
|
+
"filePath": "/home/runner/_work/garrula/garrula/src/outbound/models.ts",
|
|
2098
2132
|
"packageName": "@happyvertical/garrula",
|
|
2099
2133
|
"fields": {},
|
|
2100
2134
|
"methods": {},
|
|
@@ -38,6 +38,7 @@ export interface GarrulaOutboundPostOptions extends SmrtObjectOptions {
|
|
|
38
38
|
sourceKind?: SourceEventKind;
|
|
39
39
|
sourceUrl?: string | null;
|
|
40
40
|
claims?: DraftClaim[];
|
|
41
|
+
createdBy?: string | null;
|
|
41
42
|
approvedBy?: string | null;
|
|
42
43
|
rejectedReason?: string | null;
|
|
43
44
|
}
|
|
@@ -57,6 +58,8 @@ export declare class GarrulaOutboundPost extends SmrtObject {
|
|
|
57
58
|
sourceKind: string;
|
|
58
59
|
sourceUrl: string | null;
|
|
59
60
|
claims: DraftClaim[];
|
|
61
|
+
/** Who supplied a manual draft (`createDraft`); null for ingested drafts. */
|
|
62
|
+
createdBy: string | null;
|
|
60
63
|
approvedBy: string | null;
|
|
61
64
|
rejectedReason: string | null;
|
|
62
65
|
constructor(options?: GarrulaOutboundPostOptions);
|
|
@@ -2,7 +2,7 @@ import { GarrulaConfig } from '../config.js';
|
|
|
2
2
|
import { GarrulaCollections, GarrulaSocialPost } from '../types.js';
|
|
3
3
|
import { GarrulaOutboundPostCollection, GarrulaOutboundSettingsCollection, GarrulaSourceEventCollection, GarrulaSpendEntryCollection } from './models.js';
|
|
4
4
|
import { CostSource } from './rates.js';
|
|
5
|
-
import { DraftClaim, DraftingAI, IngestResult, OutboundDraft, OutboundPostKind, OutboundRefusal, OutboundSettings, OutboundSettingsPatch, OutboundState, SourceEvent, SpendSummary } from './types.js';
|
|
5
|
+
import { CreateDraftInput, CreateDraftResult, DraftClaim, DraftingAI, IngestResult, OutboundDraft, OutboundPostKind, OutboundRefusal, OutboundSettings, OutboundSettingsPatch, OutboundState, SourceEvent, SpendSummary } from './types.js';
|
|
6
6
|
export interface OutboundStores {
|
|
7
7
|
settings: GarrulaOutboundSettingsCollection;
|
|
8
8
|
posts: GarrulaOutboundPostCollection;
|
|
@@ -68,6 +68,13 @@ export declare class OutboundService {
|
|
|
68
68
|
getSettings(tenantId: string): Promise<OutboundSettings>;
|
|
69
69
|
updateSettings(tenantId: string, patch: OutboundSettingsPatch): Promise<OutboundSettings>;
|
|
70
70
|
ingestSourceEvent(tenantId: string, event: SourceEvent): Promise<IngestResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Create a pending-approval draft from text and evidence supplied by the
|
|
73
|
+
* host's caller. Tenant scoped and idempotent by `idempotencyKey`: a repeat
|
|
74
|
+
* returns the original drafts. It never approves, schedules or publishes, and
|
|
75
|
+
* ignores the autonomy settings; a person must still approve it.
|
|
76
|
+
*/
|
|
77
|
+
createDraft(tenantId: string, input: CreateDraftInput): Promise<CreateDraftResult>;
|
|
71
78
|
private targetAccounts;
|
|
72
79
|
private requireRow;
|
|
73
80
|
private loadPost;
|
package/dist/outbound/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OUTBOUND_POST_KINDS, OutboundPostKind } from '../ui/post-kinds.js';
|
|
1
2
|
/**
|
|
2
3
|
* Outbound pipeline types: release/changelog source events become cited
|
|
3
4
|
* drafts, which are approved, published under a spend cap, and recorded.
|
|
@@ -5,9 +6,10 @@
|
|
|
5
6
|
*/
|
|
6
7
|
/** What kind of upstream event a host hands in. */
|
|
7
8
|
export type SourceEventKind = "package-publish" | "merged-pr" | "docs-change";
|
|
8
|
-
/**
|
|
9
|
-
export type
|
|
10
|
-
|
|
9
|
+
/** Where an outbound post came from: an ingested event, or text supplied through `createDraft`. */
|
|
10
|
+
export type OutboundSourceKind = SourceEventKind | "manual";
|
|
11
|
+
/** Post types with their own autonomy setting (defined in `ui/post-kinds.ts`, which the admin panels load at runtime). */
|
|
12
|
+
export { OUTBOUND_POST_KINDS, type OutboundPostKind };
|
|
11
13
|
/**
|
|
12
14
|
* Plain data describing one upstream event. The host (a webhook, a job, a CLI)
|
|
13
15
|
* builds it; Garrula never polls GitHub or any registry.
|
|
@@ -98,7 +100,9 @@ export interface OutboundDraft {
|
|
|
98
100
|
/** The URL that may be published, depending on the account's link policy. */
|
|
99
101
|
linkUrl: string | null;
|
|
100
102
|
sourceEventId: string;
|
|
101
|
-
sourceKind:
|
|
103
|
+
sourceKind: OutboundSourceKind;
|
|
104
|
+
/** Who supplied the draft through `createDraft`; null for ingested drafts. */
|
|
105
|
+
createdBy?: string | null;
|
|
102
106
|
scheduledAt: Date | null;
|
|
103
107
|
publishedUrl: string | null;
|
|
104
108
|
error: string | null;
|
|
@@ -108,6 +112,33 @@ export interface OutboundDraft {
|
|
|
108
112
|
publishable: boolean;
|
|
109
113
|
createdAt: Date | null;
|
|
110
114
|
}
|
|
115
|
+
/** Text and evidence supplied by a caller (a person or an agent) instead of an ingested event. */
|
|
116
|
+
export interface CreateDraftInput {
|
|
117
|
+
/** The post text. Must fit `outboundMaxLength`. */
|
|
118
|
+
text: string;
|
|
119
|
+
/**
|
|
120
|
+
* The factual claims in the text, each with evidence (a URL or a changelog
|
|
121
|
+
* line). A post can only be approved and published when every claim has
|
|
122
|
+
* evidence; a draft without it is created but `publishable` is false.
|
|
123
|
+
*/
|
|
124
|
+
claims: DraftClaim[];
|
|
125
|
+
/** Caller-chosen key, unique per tenant: the same key never creates a second draft. */
|
|
126
|
+
idempotencyKey: string;
|
|
127
|
+
/** Audit label for who supplied the draft (the host's verified identity). */
|
|
128
|
+
createdBy: string;
|
|
129
|
+
kind?: OutboundPostKind;
|
|
130
|
+
/** URL to publish with the post; only used when the account's link policy is `include`. */
|
|
131
|
+
linkUrl?: string | null;
|
|
132
|
+
}
|
|
133
|
+
export type CreateDraftResult = {
|
|
134
|
+
outcome: "drafted";
|
|
135
|
+
drafts: OutboundDraft[];
|
|
136
|
+
} | {
|
|
137
|
+
outcome: "duplicate";
|
|
138
|
+
drafts: OutboundDraft[];
|
|
139
|
+
} | {
|
|
140
|
+
outcome: "no-accounts";
|
|
141
|
+
};
|
|
111
142
|
export type IngestResult = {
|
|
112
143
|
outcome: "drafted";
|
|
113
144
|
drafts: OutboundDraft[];
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/garrula",
|
|
6
|
-
"packageVersion": "0.1.
|
|
6
|
+
"packageVersion": "0.1.3",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "e7e64afc02c16ff1982bbbb78af6e73f329de47c79c0eca532b241c0a14c2cbd",
|
|
11
|
+
"packageJson": "538846d6076e6bf78dbd8d2e5e14b3c07e341522cc26d631b1f8aceaff9b2745",
|
|
12
12
|
"agents": "37df674b62c16b50b91bda6e6057f1da0c0e2169b9d13f31ac0cdabb88f0f3f5"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"methods": [
|
|
108
108
|
"approve",
|
|
109
109
|
"createArticleVideoPosts",
|
|
110
|
+
"createDraft",
|
|
110
111
|
"createStoryLinkPosts",
|
|
111
112
|
"editDraft",
|
|
112
113
|
"execute",
|
|
@@ -160,6 +161,15 @@
|
|
|
160
161
|
],
|
|
161
162
|
"returns": "Promise<GarrulaSocialPost[]>"
|
|
162
163
|
},
|
|
164
|
+
{
|
|
165
|
+
"name": "createDraft",
|
|
166
|
+
"async": true,
|
|
167
|
+
"params": [
|
|
168
|
+
"input: CreateDraftInput",
|
|
169
|
+
"options?: object"
|
|
170
|
+
],
|
|
171
|
+
"returns": "Promise<CreateDraftResult>"
|
|
172
|
+
},
|
|
163
173
|
{
|
|
164
174
|
"name": "createStoryLinkPosts",
|
|
165
175
|
"async": true,
|
|
@@ -446,6 +456,13 @@
|
|
|
446
456
|
"reason": "api is disabled",
|
|
447
457
|
"objectName": "@happyvertical/garrula:Garrula"
|
|
448
458
|
},
|
|
459
|
+
{
|
|
460
|
+
"kind": "api",
|
|
461
|
+
"operation": "createDraft",
|
|
462
|
+
"code": "api-disabled",
|
|
463
|
+
"reason": "api is disabled",
|
|
464
|
+
"objectName": "@happyvertical/garrula:Garrula"
|
|
465
|
+
},
|
|
449
466
|
{
|
|
450
467
|
"kind": "api",
|
|
451
468
|
"operation": "createStoryLinkPosts",
|
|
@@ -888,6 +905,12 @@
|
|
|
888
905
|
"columnType": "JSON",
|
|
889
906
|
"default": []
|
|
890
907
|
},
|
|
908
|
+
{
|
|
909
|
+
"name": "createdBy",
|
|
910
|
+
"type": "text",
|
|
911
|
+
"required": false,
|
|
912
|
+
"columnType": "TEXT"
|
|
913
|
+
},
|
|
891
914
|
{
|
|
892
915
|
"name": "approvedBy",
|
|
893
916
|
"type": "text",
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount } from "svelte";
|
|
3
2
|
import { Alert, Button } from "@happyvertical/smrt-ui";
|
|
4
3
|
import { Select, Textarea } from "@happyvertical/smrt-ui/forms";
|
|
5
4
|
import { PageHeader } from "@happyvertical/smrt-ui/layout";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type OutboundPostKind,
|
|
10
|
-
type OutboundSettings,
|
|
11
|
-
} from "../../outbound/types.js";
|
|
5
|
+
import { onMount } from "svelte";
|
|
6
|
+
import type { AutonomyMode, OutboundSettings } from "../../outbound/types.js";
|
|
7
|
+
import { OUTBOUND_POST_KINDS, type OutboundPostKind } from "../post-kinds.js";
|
|
12
8
|
import type { PersonaPolicyPanelProps } from "../types.js";
|
|
13
|
-
import StatusRegion from "./StatusRegion.svelte";
|
|
14
9
|
import { getGarrulaAdminContext, resolveAccess } from "./access.js";
|
|
15
10
|
import { errorMessage, parseLines } from "./format.js";
|
|
11
|
+
import StatusRegion from "./StatusRegion.svelte";
|
|
16
12
|
|
|
17
13
|
let { apiClient, readonly = false, tenant, permissions }: PersonaPolicyPanelProps = $props();
|
|
18
14
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post kinds with their own autonomy setting. This module lives under `src/ui`
|
|
3
|
+
* because the admin panels import it as a runtime value and `svelte-package`
|
|
4
|
+
* emits only `src/ui` into `dist/ui`; `src/outbound/types.ts` re-exports it so
|
|
5
|
+
* there is one source of truth.
|
|
6
|
+
*/
|
|
7
|
+
export type OutboundPostKind = "release" | "feature" | "docs";
|
|
8
|
+
export declare const OUTBOUND_POST_KINDS: readonly OutboundPostKind[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const OUTBOUND_POST_KINDS = ["release", "feature", "docs"];
|