initiative-plugin-sdk 5.0.0 → 6.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/README.md +121 -6
- package/dist/client.d.ts +31 -3
- package/dist/client.js +34 -1
- package/dist/client.js.map +1 -1
- package/dist/contract.d.ts +259 -4
- package/dist/contract.js +28 -2
- package/dist/contract.js.map +1 -1
- package/dist/define.d.ts +27 -3
- package/dist/define.js +5 -2
- package/dist/define.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +2 -0
- package/dist/jsx-dev-runtime.js +3 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.d.ts +28 -0
- package/dist/jsx-runtime.js +20 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/manifest.d.ts +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/parts.d.ts +43 -0
- package/dist/parts.js +63 -0
- package/dist/parts.js.map +1 -0
- package/dist/plugin-api.generated.d.ts +1 -3
- package/dist/plugin-api.generated.js +1 -1
- package/dist/plugin-api.generated.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +10 -2
- package/dist/server.js.map +1 -1
- package/dist/tokens.d.ts +11 -1
- package/dist/tokens.js +26 -5
- package/dist/tokens.js.map +1 -1
- package/dist/validate.d.ts +4 -2
- package/dist/validate.js +86 -6
- package/dist/validate.js.map +1 -1
- package/manifest.contract.json +439 -3
- package/package.json +15 -3
- package/schemas/plugin-api.json +3 -36
- package/schemas/plugin-manifest.json +435 -2
package/dist/contract.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* from, and the shape of every object it defines, so this package's types
|
|
9
9
|
* cannot describe a manifest the schema refuses, nor miss a term it allows.
|
|
10
10
|
*/
|
|
11
|
-
export type Feature = "dashboards" | "endpoints" | "pages" | "widgets";
|
|
11
|
+
export type Feature = "actions" | "dashboards" | "endpoints" | "fields" | "pages" | "parts" | "widgets";
|
|
12
12
|
export declare const FEATURES: readonly Feature[];
|
|
13
13
|
export type Protocol = 1;
|
|
14
14
|
export declare const PROTOCOLS: readonly Protocol[];
|
|
@@ -48,6 +48,12 @@ export type SurfaceScope = "community" | "initiative";
|
|
|
48
48
|
export declare const SURFACE_SCOPES: readonly SurfaceScope[];
|
|
49
49
|
export type PageCapability = "camera" | "clipboard-read" | "clipboard-write" | "display-capture" | "fullscreen" | "geolocation" | "microphone";
|
|
50
50
|
export declare const PAGE_CAPABILITIES: readonly PageCapability[];
|
|
51
|
+
export type ItemKind = "task" | "calendar_event" | "queue_item" | "counter" | "gallery_image" | "post";
|
|
52
|
+
export declare const ITEM_KINDS: readonly ItemKind[];
|
|
53
|
+
export type FieldKind = "text" | "number" | "date" | "datetime" | "link" | "badge" | "progress" | "checkbox";
|
|
54
|
+
export declare const FIELD_KINDS: readonly FieldKind[];
|
|
55
|
+
export type Tone = "accent" | "positive" | "negative" | "warning" | "neutral" | "muted";
|
|
56
|
+
export declare const TONES: readonly Tone[];
|
|
51
57
|
export type ListingKind = "plugin" | "dashboard";
|
|
52
58
|
export declare const LISTING_KINDS: readonly ListingKind[];
|
|
53
59
|
export type HttpMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
@@ -80,6 +86,19 @@ export declare const CAPS: {
|
|
|
80
86
|
readonly returnsPerEndpoint: 24;
|
|
81
87
|
readonly pages: 12;
|
|
82
88
|
readonly pageCapabilities: 8;
|
|
89
|
+
readonly fields: 32;
|
|
90
|
+
readonly parts: 16;
|
|
91
|
+
readonly actions: 16;
|
|
92
|
+
readonly partNodes: 50;
|
|
93
|
+
readonly partDepth: 4;
|
|
94
|
+
readonly metadataKeyLength: 64;
|
|
95
|
+
readonly metadataValueBytes: 8192;
|
|
96
|
+
readonly metadataLookupLength: 255;
|
|
97
|
+
readonly metadataKeysPerObject: 32;
|
|
98
|
+
readonly metadataBytesPerObject: 65536;
|
|
99
|
+
readonly installMetadataKeys: 256;
|
|
100
|
+
readonly installMetadataBytes: 1048576;
|
|
101
|
+
readonly partsPlacedPerItem: 3;
|
|
83
102
|
readonly bundledDashboards: 8;
|
|
84
103
|
readonly dashboardWidgets: 50;
|
|
85
104
|
readonly dashboardGridColumns: 12;
|
|
@@ -147,6 +166,7 @@ export declare const CHARSETS: {
|
|
|
147
166
|
readonly version: "0123456789.-+abcdefghijklmnopqrstuvwxyz";
|
|
148
167
|
readonly artwork: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/._-";
|
|
149
168
|
readonly queryName: "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~";
|
|
169
|
+
readonly metadataKey: "._0123456789abcdefghijklmnopqrstuvwxyz";
|
|
150
170
|
};
|
|
151
171
|
/**
|
|
152
172
|
* Every field the contract declares, by the object that owns it.
|
|
@@ -174,6 +194,15 @@ export declare const FIELDS: {
|
|
|
174
194
|
readonly endpoint: readonly ["id", "label", "description", "returns", "group", "needs_subject", "direction", "params", "actors", "admin_only", "public", "requires", "cache_ttl_seconds", "identity", "unavailable", "request", "steps", "map", "errors"];
|
|
175
195
|
readonly widget: readonly ["id", "meta", "module_source", "endpoints", "sample_data", "requires"];
|
|
176
196
|
readonly page: readonly ["id", "path", "name", "scopes", "admin_only", "capabilities", "requires"];
|
|
197
|
+
readonly field: readonly ["key", "name", "kind", "on", "description", "tone", "requires"];
|
|
198
|
+
readonly sectionNode: readonly ["type", "props", "children"];
|
|
199
|
+
readonly stackNode: readonly ["type", "props", "children"];
|
|
200
|
+
readonly fieldNode: readonly ["type", "props"];
|
|
201
|
+
readonly valueNode: readonly ["type", "props"];
|
|
202
|
+
readonly textNode: readonly ["type", "props"];
|
|
203
|
+
readonly buttonNode: readonly ["type", "props"];
|
|
204
|
+
readonly part: readonly ["id", "name", "on", "tree", "description", "requires"];
|
|
205
|
+
readonly action: readonly ["id", "name", "endpoint", "on", "confirm", "menu", "requires"];
|
|
177
206
|
readonly bundledDashboard: readonly ["uid", "public_id", "name", "description", "layout", "widgets"];
|
|
178
207
|
readonly bundledDashboardWidget: readonly ["id", "type", "title", "grid", "binding"];
|
|
179
208
|
readonly endpointIdentity: readonly ["kind", "key"];
|
|
@@ -190,7 +219,7 @@ export declare const FIELDS: {
|
|
|
190
219
|
readonly healthState: readonly ["status", "when", "state"];
|
|
191
220
|
readonly webhookEvent: readonly ["when", "emit", "map"];
|
|
192
221
|
readonly webhookStatus: readonly ["when", "connection", "state"];
|
|
193
|
-
readonly manifest: readonly ["plugin_kind", "service", "features", "default_name", "minimum_age", "min_plugin_api", "hosts", "auth", "vendor", "connections", "webhooks", "schedules", "endpoints", "community_summary", "widgets", "pages", "dashboards"];
|
|
222
|
+
readonly manifest: readonly ["plugin_kind", "service", "features", "default_name", "minimum_age", "min_plugin_api", "hosts", "auth", "vendor", "connections", "webhooks", "schedules", "endpoints", "community_summary", "widgets", "pages", "dashboards", "fields", "parts", "actions"];
|
|
194
223
|
};
|
|
195
224
|
export type Identifier = string;
|
|
196
225
|
/**
|
|
@@ -813,6 +842,212 @@ export interface Page {
|
|
|
813
842
|
capabilities?: PageCapability[];
|
|
814
843
|
requires?: Requires;
|
|
815
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* A key the plug-in keeps a value under, on an item or on its own install: a
|
|
847
|
+
* lowercase letter, then lowercase letters, digits, '_' and '.'.
|
|
848
|
+
*/
|
|
849
|
+
export type MetadataKey = string;
|
|
850
|
+
/**
|
|
851
|
+
* How one of the plug-in's metadata keys is shown on Initiative's items. The
|
|
852
|
+
* plug-in keeps the value in Initiative, through its installation token;
|
|
853
|
+
* Initiative draws it with its own component for `kind` and computes its plain
|
|
854
|
+
* text itself, so a field filters, sorts and exports with no call to the
|
|
855
|
+
* plug-in. Which views show it is chosen by the community's managers, never by
|
|
856
|
+
* the plug-in. Initiative holds what is kept, and these caps are enforced there
|
|
857
|
+
* rather than here: a value of at most 8192 bytes as JSON, with a string of at
|
|
858
|
+
* most 255 characters to be found by; at most 32 keys and 65536 bytes on one
|
|
859
|
+
* item, and 256 keys and 1048576 bytes on the install.
|
|
860
|
+
*/
|
|
861
|
+
export interface Field {
|
|
862
|
+
/**
|
|
863
|
+
* The metadata key whose value this shows. Unique among this manifest's
|
|
864
|
+
* fields.
|
|
865
|
+
*/
|
|
866
|
+
key: MetadataKey;
|
|
867
|
+
/**
|
|
868
|
+
* The field's label.
|
|
869
|
+
*/
|
|
870
|
+
name: LocalizedText;
|
|
871
|
+
/**
|
|
872
|
+
* What the value is, and so how it is drawn: 'text' a string; 'number' a
|
|
873
|
+
* number; 'date' a 'YYYY-MM-DD' string; 'datetime' an ISO 8601 string with
|
|
874
|
+
* its offset; 'link' {url, text?}; 'badge' {text, tone?}; 'progress' {value,
|
|
875
|
+
* max}; 'checkbox' a boolean.
|
|
876
|
+
*/
|
|
877
|
+
kind: FieldKind;
|
|
878
|
+
/**
|
|
879
|
+
* The item kinds it is offered on.
|
|
880
|
+
*/
|
|
881
|
+
on: ItemKind[];
|
|
882
|
+
/**
|
|
883
|
+
* The one line the view editor's Add picker shows beside the name.
|
|
884
|
+
*/
|
|
885
|
+
description?: LocalizedText;
|
|
886
|
+
/**
|
|
887
|
+
* A badge's tone when its value names none.
|
|
888
|
+
*/
|
|
889
|
+
tone?: Tone;
|
|
890
|
+
requires?: Requires;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* One node of a part: one of Initiative's own components, told apart by 'type',
|
|
894
|
+
* with its props and, for a section or a stack, the nodes inside it.
|
|
895
|
+
*/
|
|
896
|
+
export type PartNode = SectionNode | StackNode | FieldNode | ValueNode | TextNode | ButtonNode;
|
|
897
|
+
/**
|
|
898
|
+
* A titled group, which the reader may fold.
|
|
899
|
+
*/
|
|
900
|
+
export interface SectionNode {
|
|
901
|
+
type: "section";
|
|
902
|
+
props?: {
|
|
903
|
+
title?: LocalizedText;
|
|
904
|
+
/**
|
|
905
|
+
* Drawn folded until the reader opens it.
|
|
906
|
+
*/
|
|
907
|
+
collapsed?: boolean;
|
|
908
|
+
};
|
|
909
|
+
/**
|
|
910
|
+
* Drawn in order, inside this one.
|
|
911
|
+
*/
|
|
912
|
+
children?: PartNode[];
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Nodes side by side or one above another.
|
|
916
|
+
*/
|
|
917
|
+
export interface StackNode {
|
|
918
|
+
type: "stack";
|
|
919
|
+
props?: {
|
|
920
|
+
direction?: "row" | "column";
|
|
921
|
+
/**
|
|
922
|
+
* The space between the nodes. Absent: Initiative's own.
|
|
923
|
+
*/
|
|
924
|
+
gap?: "none" | "small" | "medium" | "large";
|
|
925
|
+
/**
|
|
926
|
+
* A row runs onto a second line rather than past its edge.
|
|
927
|
+
*/
|
|
928
|
+
wrap?: boolean;
|
|
929
|
+
};
|
|
930
|
+
/**
|
|
931
|
+
* Drawn in order, inside this one.
|
|
932
|
+
*/
|
|
933
|
+
children?: PartNode[];
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* A field's label and its value.
|
|
937
|
+
*/
|
|
938
|
+
export interface FieldNode {
|
|
939
|
+
type: "field";
|
|
940
|
+
props: {
|
|
941
|
+
/**
|
|
942
|
+
* One of this manifest's fields, by its key, offered on every item kind the
|
|
943
|
+
* part is.
|
|
944
|
+
*/
|
|
945
|
+
field: MetadataKey;
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* A field's value alone.
|
|
950
|
+
*/
|
|
951
|
+
export interface ValueNode {
|
|
952
|
+
type: "value";
|
|
953
|
+
props: {
|
|
954
|
+
/**
|
|
955
|
+
* One of this manifest's fields, by its key, offered on every item kind the
|
|
956
|
+
* part is.
|
|
957
|
+
*/
|
|
958
|
+
field: MetadataKey;
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Words the plug-in wrote.
|
|
963
|
+
*/
|
|
964
|
+
export interface TextNode {
|
|
965
|
+
type: "text";
|
|
966
|
+
props: {
|
|
967
|
+
text: LocalizedText;
|
|
968
|
+
tone?: Tone;
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* A button that runs one of this plug-in's actions on the item, labelled with
|
|
973
|
+
* the action's name.
|
|
974
|
+
*/
|
|
975
|
+
export interface ButtonNode {
|
|
976
|
+
type: "button";
|
|
977
|
+
props: {
|
|
978
|
+
/**
|
|
979
|
+
* One of this manifest's actions, by its id, offered on every item kind the
|
|
980
|
+
* part is.
|
|
981
|
+
*/
|
|
982
|
+
action: Identifier;
|
|
983
|
+
variant?: "primary" | "secondary" | "ghost";
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* A piece of an item's page or view, built from Initiative's own components and
|
|
988
|
+
* bound to this plug-in's fields and actions. Data only: Initiative draws each
|
|
989
|
+
* node, and no plug-in code runs in the reader's browser. Which views show it
|
|
990
|
+
* is chosen by the community's managers, never by the plug-in, and Initiative
|
|
991
|
+
* places at most 3 of a plug-in's parts on one item.
|
|
992
|
+
*/
|
|
993
|
+
export interface Part {
|
|
994
|
+
/**
|
|
995
|
+
* Unique among this manifest's parts.
|
|
996
|
+
*/
|
|
997
|
+
id: Identifier;
|
|
998
|
+
/**
|
|
999
|
+
* What the view editor calls it.
|
|
1000
|
+
*/
|
|
1001
|
+
name: LocalizedText;
|
|
1002
|
+
/**
|
|
1003
|
+
* The item kinds it is offered on.
|
|
1004
|
+
*/
|
|
1005
|
+
on: ItemKind[];
|
|
1006
|
+
/**
|
|
1007
|
+
* What is drawn: at most 50 nodes, at most 4 deep.
|
|
1008
|
+
*/
|
|
1009
|
+
tree: PartNode;
|
|
1010
|
+
/**
|
|
1011
|
+
* The one line the view editor's Add picker shows beside the name.
|
|
1012
|
+
*/
|
|
1013
|
+
description?: LocalizedText;
|
|
1014
|
+
requires?: Requires;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Something a reader runs on one item, from a part's button or the item's own
|
|
1018
|
+
* menu. Initiative only connects: it calls the write endpoint as the
|
|
1019
|
+
* installation, with the reader as 'viewer' and the item as 'subject' in the
|
|
1020
|
+
* call's token, and the endpoint does the work, usually writing the plug-in's
|
|
1021
|
+
* metadata. Initiative then answers the reader with the item's metadata as it
|
|
1022
|
+
* stands.
|
|
1023
|
+
*/
|
|
1024
|
+
export interface Action {
|
|
1025
|
+
/**
|
|
1026
|
+
* Unique among this manifest's actions.
|
|
1027
|
+
*/
|
|
1028
|
+
id: Identifier;
|
|
1029
|
+
/**
|
|
1030
|
+
* The button's or the menu entry's label.
|
|
1031
|
+
*/
|
|
1032
|
+
name: LocalizedText;
|
|
1033
|
+
/**
|
|
1034
|
+
* A write endpoint this manifest declares.
|
|
1035
|
+
*/
|
|
1036
|
+
endpoint: NamespacedId;
|
|
1037
|
+
/**
|
|
1038
|
+
* The item kinds it is offered on.
|
|
1039
|
+
*/
|
|
1040
|
+
on: ItemKind[];
|
|
1041
|
+
/**
|
|
1042
|
+
* A question Initiative asks before running it. Absent: it runs at once.
|
|
1043
|
+
*/
|
|
1044
|
+
confirm?: LocalizedText;
|
|
1045
|
+
/**
|
|
1046
|
+
* Also offered in the item's own menu.
|
|
1047
|
+
*/
|
|
1048
|
+
menu?: boolean;
|
|
1049
|
+
requires?: Requires;
|
|
1050
|
+
}
|
|
816
1051
|
export interface BundledDashboard {
|
|
817
1052
|
/**
|
|
818
1053
|
* This dashboard's own catalog id — publisher-assigned, immutable, never
|
|
@@ -1183,8 +1418,10 @@ export interface WebhookStatus {
|
|
|
1183
1418
|
* in both directions, UTF-8 byte-size caps, the rules tying a connection's flow
|
|
1184
1419
|
* and token to its scope and fields, what a webhooks block names, what a vendor
|
|
1185
1420
|
* setup writes to, whether every expression parses, what a declarative request
|
|
1186
|
-
* and its steps name,
|
|
1187
|
-
*
|
|
1421
|
+
* and its steps name, the bounds and unique ids of schedules, the unique keys
|
|
1422
|
+
* and ids of fields, parts and actions, what a part's nodes and an action name,
|
|
1423
|
+
* and a part's size and depth are enforced by the platform on publish and are
|
|
1424
|
+
* not expressible here.
|
|
1188
1425
|
*/
|
|
1189
1426
|
export interface Manifest {
|
|
1190
1427
|
/**
|
|
@@ -1277,4 +1514,22 @@ export interface Manifest {
|
|
|
1277
1514
|
* communities that install the plug-in.
|
|
1278
1515
|
*/
|
|
1279
1516
|
dashboards?: BundledDashboard[];
|
|
1517
|
+
/**
|
|
1518
|
+
* How the plug-in's metadata is shown on items. A container plug-in's only: a
|
|
1519
|
+
* declarative plug-in holds no installation token, so it keeps no metadata to
|
|
1520
|
+
* show.
|
|
1521
|
+
*/
|
|
1522
|
+
fields?: Field[];
|
|
1523
|
+
/**
|
|
1524
|
+
* Pieces of items' pages and views, built from Initiative's components and
|
|
1525
|
+
* bound to the plug-in's fields and actions. A container plug-in's only, as
|
|
1526
|
+
* fields are.
|
|
1527
|
+
*/
|
|
1528
|
+
parts?: Part[];
|
|
1529
|
+
/**
|
|
1530
|
+
* What a reader may run on an item, each one of the plug-in's write
|
|
1531
|
+
* endpoints. A container plug-in's only: a declarative plug-in has no handler
|
|
1532
|
+
* to do an action's work.
|
|
1533
|
+
*/
|
|
1534
|
+
actions?: Action[];
|
|
1280
1535
|
}
|
package/dist/contract.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* from, and the shape of every object it defines, so this package's types
|
|
9
9
|
* cannot describe a manifest the schema refuses, nor miss a term it allows.
|
|
10
10
|
*/
|
|
11
|
-
export const FEATURES = ["dashboards", "endpoints", "pages", "widgets"];
|
|
11
|
+
export const FEATURES = ["actions", "dashboards", "endpoints", "fields", "pages", "parts", "widgets"];
|
|
12
12
|
export const PROTOCOLS = [1];
|
|
13
13
|
export const CONNECTION_SCOPES = ["interactive", "static"];
|
|
14
14
|
export const FLOW_TYPES = ["oauth2"];
|
|
@@ -28,6 +28,9 @@ export const ACTOR_KINDS = ["installation", "member"];
|
|
|
28
28
|
export const SCOPES = ["projects:read", "projects:write", "files:read", "files:write", "queues:read", "queues:write", "counter_groups:read", "counter_groups:write", "calendars:read", "calendars:write", "dashboards:read", "dashboards:write", "posts:read", "posts:write", "galleries:read", "galleries:write", "wikis:read", "wikis:write", "comments:read", "comments:write", "relationships:read", "relationships:write", "tags:read", "tags:write", "properties:read", "properties:write", "sharing:read", "sharing:write", "members:read", "initiatives:read", "initiatives:moderate", "community:admin"];
|
|
29
29
|
export const SURFACE_SCOPES = ["community", "initiative"];
|
|
30
30
|
export const PAGE_CAPABILITIES = ["camera", "clipboard-read", "clipboard-write", "display-capture", "fullscreen", "geolocation", "microphone"];
|
|
31
|
+
export const ITEM_KINDS = ["task", "calendar_event", "queue_item", "counter", "gallery_image", "post"];
|
|
32
|
+
export const FIELD_KINDS = ["text", "number", "date", "datetime", "link", "badge", "progress", "checkbox"];
|
|
33
|
+
export const TONES = ["accent", "positive", "negative", "warning", "neutral", "muted"];
|
|
31
34
|
export const LISTING_KINDS = ["plugin", "dashboard"];
|
|
32
35
|
export const HTTP_METHODS = ["DELETE", "GET", "PATCH", "POST", "PUT"];
|
|
33
36
|
export const PAGE_LIMITS = ["refuse", "truncate"];
|
|
@@ -54,6 +57,19 @@ export const CAPS = {
|
|
|
54
57
|
returnsPerEndpoint: 24,
|
|
55
58
|
pages: 12,
|
|
56
59
|
pageCapabilities: 8,
|
|
60
|
+
fields: 32,
|
|
61
|
+
parts: 16,
|
|
62
|
+
actions: 16,
|
|
63
|
+
partNodes: 50,
|
|
64
|
+
partDepth: 4,
|
|
65
|
+
metadataKeyLength: 64,
|
|
66
|
+
metadataValueBytes: 8192,
|
|
67
|
+
metadataLookupLength: 255,
|
|
68
|
+
metadataKeysPerObject: 32,
|
|
69
|
+
metadataBytesPerObject: 65536,
|
|
70
|
+
installMetadataKeys: 256,
|
|
71
|
+
installMetadataBytes: 1048576,
|
|
72
|
+
partsPlacedPerItem: 3,
|
|
57
73
|
bundledDashboards: 8,
|
|
58
74
|
dashboardWidgets: 50,
|
|
59
75
|
dashboardGridColumns: 12,
|
|
@@ -121,6 +137,7 @@ export const CHARSETS = {
|
|
|
121
137
|
version: "0123456789.-+abcdefghijklmnopqrstuvwxyz",
|
|
122
138
|
artwork: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/._-",
|
|
123
139
|
queryName: "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~",
|
|
140
|
+
metadataKey: "._0123456789abcdefghijklmnopqrstuvwxyz",
|
|
124
141
|
};
|
|
125
142
|
/**
|
|
126
143
|
* Every field the contract declares, by the object that owns it.
|
|
@@ -148,6 +165,15 @@ export const FIELDS = {
|
|
|
148
165
|
endpoint: ["id", "label", "description", "returns", "group", "needs_subject", "direction", "params", "actors", "admin_only", "public", "requires", "cache_ttl_seconds", "identity", "unavailable", "request", "steps", "map", "errors"],
|
|
149
166
|
widget: ["id", "meta", "module_source", "endpoints", "sample_data", "requires"],
|
|
150
167
|
page: ["id", "path", "name", "scopes", "admin_only", "capabilities", "requires"],
|
|
168
|
+
field: ["key", "name", "kind", "on", "description", "tone", "requires"],
|
|
169
|
+
sectionNode: ["type", "props", "children"],
|
|
170
|
+
stackNode: ["type", "props", "children"],
|
|
171
|
+
fieldNode: ["type", "props"],
|
|
172
|
+
valueNode: ["type", "props"],
|
|
173
|
+
textNode: ["type", "props"],
|
|
174
|
+
buttonNode: ["type", "props"],
|
|
175
|
+
part: ["id", "name", "on", "tree", "description", "requires"],
|
|
176
|
+
action: ["id", "name", "endpoint", "on", "confirm", "menu", "requires"],
|
|
151
177
|
bundledDashboard: ["uid", "public_id", "name", "description", "layout", "widgets"],
|
|
152
178
|
bundledDashboardWidget: ["id", "type", "title", "grid", "binding"],
|
|
153
179
|
endpointIdentity: ["kind", "key"],
|
|
@@ -164,6 +190,6 @@ export const FIELDS = {
|
|
|
164
190
|
healthState: ["status", "when", "state"],
|
|
165
191
|
webhookEvent: ["when", "emit", "map"],
|
|
166
192
|
webhookStatus: ["when", "connection", "state"],
|
|
167
|
-
manifest: ["plugin_kind", "service", "features", "default_name", "minimum_age", "min_plugin_api", "hosts", "auth", "vendor", "connections", "webhooks", "schedules", "endpoints", "community_summary", "widgets", "pages", "dashboards"],
|
|
193
|
+
manifest: ["plugin_kind", "service", "features", "default_name", "minimum_age", "min_plugin_api", "hosts", "auth", "vendor", "connections", "webhooks", "schedules", "endpoints", "community_summary", "widgets", "pages", "dashboards", "fields", "parts", "actions"],
|
|
168
194
|
};
|
|
169
195
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AAG1H,MAAM,CAAC,MAAM,SAAS,GAAwB,CAAC,CAAC,CAAC,CAAC;AAGlD,MAAM,CAAC,MAAM,iBAAiB,GAA+B,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAGvF,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,CAAC,CAAC;AAG1D,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,YAAY,CAAC,CAAC;AAGhE,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAG3F,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAG1E,MAAM,CAAC,MA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AAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC;IAChE,gBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;IAChD,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IACxC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;IACrC,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC;IAC9C,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;CAC9P,CAAC"}
|
package/dist/define.d.ts
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
*
|
|
18
18
|
* Endpoints are named by their key. The manifest id is `plugin.<publicId>.<key>`,
|
|
19
19
|
* and everywhere a definition refers to an endpoint (a widget, a sample, a
|
|
20
|
-
* parameter's `options_from`, a bundled dashboard, `communitySummary
|
|
21
|
-
* key.
|
|
20
|
+
* parameter's `options_from`, a bundled dashboard, `communitySummary`, an
|
|
21
|
+
* action) it uses the key.
|
|
22
22
|
*/
|
|
23
|
-
import type { ActorKind, PluginScope, BundledDashboard, BundledDashboardWidget, Connection, Page, Endpoint, EndpointParam, EndpointReturn, ErrorRule, Expression, Manifest, RequestStep, ReturnValueType, Scope, Vendor, VendorAuth, VendorRequest, WebhookEvent, Webhooks, Widget } from "./contract.js";
|
|
23
|
+
import type { Action, ActorKind, PluginScope, BundledDashboard, BundledDashboardWidget, Connection, Page, Endpoint, EndpointParam, EndpointReturn, ErrorRule, Expression, Field, ItemKind, Manifest, Part, RequestStep, ReturnValueType, Scope, Vendor, VendorAuth, VendorRequest, WebhookEvent, Webhooks, Widget } from "./contract.js";
|
|
24
24
|
import type { Client } from "./client.js";
|
|
25
25
|
/**
|
|
26
26
|
* What every handler is handed as `context`: the value given to `createPlugin`.
|
|
@@ -72,6 +72,11 @@ export type Actor = {
|
|
|
72
72
|
kind: "member";
|
|
73
73
|
member: string;
|
|
74
74
|
};
|
|
75
|
+
/** One of Initiative's items, by its kind and id. */
|
|
76
|
+
export interface ItemRef {
|
|
77
|
+
type: ItemKind;
|
|
78
|
+
id: number;
|
|
79
|
+
}
|
|
75
80
|
/** What every handler is handed. */
|
|
76
81
|
export interface Call {
|
|
77
82
|
/** The installation: the community, by the reference this plug-in's install knows it by. */
|
|
@@ -92,6 +97,10 @@ export interface EndpointCall<P> extends Call {
|
|
|
92
97
|
initiative: number | null;
|
|
93
98
|
/** Connection id → the handle Initiative gives a token for, where the call depends on one. */
|
|
94
99
|
connections: Record<string, string>;
|
|
100
|
+
/** On a call one of the plug-in's actions made: the reader who ran it, by this installation's reference for them. */
|
|
101
|
+
viewer: string | null;
|
|
102
|
+
/** On a call one of the plug-in's actions made: the item it was run on. */
|
|
103
|
+
subject: ItemRef | null;
|
|
95
104
|
}
|
|
96
105
|
/** What a handler answers with. `actor` says whose credential ran it; absent, the call's actor. */
|
|
97
106
|
export interface Outcome<R> {
|
|
@@ -212,6 +221,11 @@ type ReadName<E> = {
|
|
|
212
221
|
direction: "read";
|
|
213
222
|
} ? K : never;
|
|
214
223
|
}[keyof E] & string;
|
|
224
|
+
type WriteName<E> = {
|
|
225
|
+
[K in keyof E]: E[K] extends {
|
|
226
|
+
direction: "write";
|
|
227
|
+
} ? K : never;
|
|
228
|
+
}[keyof E] & string;
|
|
215
229
|
type EmitName<E> = {
|
|
216
230
|
[K in keyof E]: E[K] extends {
|
|
217
231
|
direction: "emit";
|
|
@@ -240,6 +254,10 @@ export interface WidgetDeclaration<E> extends Omit<Widget, "id" | "module_source
|
|
|
240
254
|
[K in ReadName<E>]?: Result<ReturnsOf<E[K]>>;
|
|
241
255
|
};
|
|
242
256
|
}
|
|
257
|
+
/** Something a reader runs on one item. `endpoint` names a write endpoint by its key. */
|
|
258
|
+
export interface ActionDeclaration<E> extends Omit<Action, "id" | "endpoint"> {
|
|
259
|
+
endpoint: WriteName<E>;
|
|
260
|
+
}
|
|
243
261
|
export interface DashboardDeclaration<E, W> extends Omit<BundledDashboard, "widgets"> {
|
|
244
262
|
widgets: Array<Omit<BundledDashboardWidget, "type" | "binding"> & {
|
|
245
263
|
type: keyof W & string;
|
|
@@ -323,6 +341,12 @@ export interface PluginDefinition<E, W> {
|
|
|
323
341
|
/** Pages and panels, keyed by page id. */
|
|
324
342
|
pages?: Record<string, PageDeclaration>;
|
|
325
343
|
dashboards?: DashboardDeclaration<E, W>[];
|
|
344
|
+
/** How the plug-in's metadata is shown on items, keyed by metadata key. */
|
|
345
|
+
fields?: Record<string, Omit<Field, "key">>;
|
|
346
|
+
/** Pieces of items' pages and views, keyed by part id. A `tree` may be written as JSX (`initiative-plugin-sdk/parts`). */
|
|
347
|
+
parts?: Record<string, Omit<Part, "id">>;
|
|
348
|
+
/** What a reader may run on an item, keyed by action id. */
|
|
349
|
+
actions?: Record<string, ActionDeclaration<E>>;
|
|
326
350
|
listing?: ListingDeclaration;
|
|
327
351
|
}
|
|
328
352
|
/** Any plug-in's definition, as the server and the build read it. */
|
package/dist/define.js
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*
|
|
18
18
|
* Endpoints are named by their key. The manifest id is `plugin.<publicId>.<key>`,
|
|
19
19
|
* and everywhere a definition refers to an endpoint (a widget, a sample, a
|
|
20
|
-
* parameter's `options_from`, a bundled dashboard, `communitySummary
|
|
21
|
-
* key.
|
|
20
|
+
* parameter's `options_from`, a bundled dashboard, `communitySummary`, an
|
|
21
|
+
* action) it uses the key.
|
|
22
22
|
*/
|
|
23
23
|
import { FEATURES } from "./contract.js";
|
|
24
24
|
export function defineEndpoint(endpoint) {
|
|
@@ -62,6 +62,9 @@ export function manifestOf(plugin, modules = {}) {
|
|
|
62
62
|
binding: { ...widget.binding, endpoint_id: id(widget.binding.endpoint_id) },
|
|
63
63
|
})),
|
|
64
64
|
})),
|
|
65
|
+
fields: listOf(plugin.fields, (key, field) => ({ key, ...field })),
|
|
66
|
+
parts: listOf(plugin.parts, (key, part) => ({ id: key, ...part })),
|
|
67
|
+
actions: listOf(plugin.actions, (key, action) => ({ id: key, ...action, endpoint: id(action.endpoint) })),
|
|
65
68
|
};
|
|
66
69
|
const present = Object.fromEntries(Object.entries(blocks).filter(([, value]) => value !== undefined));
|
|
67
70
|
return {
|
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA6BH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA0IzC,MAAM,UAAU,cAAc,CAAC,QAA6B;IAC1D,OAAO,QAAQ,CAAC;AAClB,CAAC;AA2ND,kCAAkC;AAClC,MAAM,UAAU,YAAY,CAG1B,UAAkC;IAClC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,UAAU,CAAC,MAA4B,EAAE,IAAY;IACnE,OAAO,UAAU,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAiB,EAAE,OAAO,GAA2B,EAAE;IAChF,MAAM,EAAE,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,MAAM,MAAM,GAAsB;QAChC,MAAM,EAAE,MAAM,CAAC,MAAM;QACr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],"names":[],"mappings":"AAAA,8GAA8G;AAE9G,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAY,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `initiative-plugin-sdk/jsx-runtime`: JSX for a part's tree, with no React.
|
|
3
|
+
*
|
|
4
|
+
* Point TypeScript and esbuild at it with `"jsx": "react-jsx"` and
|
|
5
|
+
* `"jsxImportSource": "initiative-plugin-sdk"`, or with a file's own
|
|
6
|
+
* `@jsxImportSource initiative-plugin-sdk` pragma. Each element calls its
|
|
7
|
+
* component from `initiative-plugin-sdk/parts`, which builds the node; the
|
|
8
|
+
* build evaluates the definition, so the manifest holds only the data. `key`
|
|
9
|
+
* is JSX's own and is not passed on.
|
|
10
|
+
*/
|
|
11
|
+
import type { PartNode } from "./contract.js";
|
|
12
|
+
import { Fragment } from "./parts.js";
|
|
13
|
+
export { Fragment };
|
|
14
|
+
type Component = (props: any) => PartNode | PartNode[];
|
|
15
|
+
export declare function jsx(type: Component, props: Record<string, unknown>): PartNode | PartNode[];
|
|
16
|
+
export { jsx as jsxs };
|
|
17
|
+
export declare namespace JSX {
|
|
18
|
+
type Element = PartNode;
|
|
19
|
+
type ElementType = Component;
|
|
20
|
+
interface ElementChildrenAttribute {
|
|
21
|
+
children: {};
|
|
22
|
+
}
|
|
23
|
+
interface IntrinsicAttributes {
|
|
24
|
+
key?: string | number;
|
|
25
|
+
}
|
|
26
|
+
interface IntrinsicElements {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `initiative-plugin-sdk/jsx-runtime`: JSX for a part's tree, with no React.
|
|
3
|
+
*
|
|
4
|
+
* Point TypeScript and esbuild at it with `"jsx": "react-jsx"` and
|
|
5
|
+
* `"jsxImportSource": "initiative-plugin-sdk"`, or with a file's own
|
|
6
|
+
* `@jsxImportSource initiative-plugin-sdk` pragma. Each element calls its
|
|
7
|
+
* component from `initiative-plugin-sdk/parts`, which builds the node; the
|
|
8
|
+
* build evaluates the definition, so the manifest holds only the data. `key`
|
|
9
|
+
* is JSX's own and is not passed on.
|
|
10
|
+
*/
|
|
11
|
+
import { Fragment } from "./parts.js";
|
|
12
|
+
export { Fragment };
|
|
13
|
+
export function jsx(type, props) {
|
|
14
|
+
if (typeof type !== "function") {
|
|
15
|
+
throw new TypeError(`<${String(type)}> is not a part: build one from initiative-plugin-sdk/parts`);
|
|
16
|
+
}
|
|
17
|
+
return type(props);
|
|
18
|
+
}
|
|
19
|
+
export { jsx as jsxs };
|
|
20
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAIpB,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,KAA8B;IACjE,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,SAAS,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IACrG,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC;AAED,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC"}
|
package/dist/manifest.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* which plug-in API contract a manifest's `min_plugin_api` runs on.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./contract.js";
|
|
7
|
-
export { definePlugin, defineEndpoint, type Actor, type AfterConnectAnswer, type AfterConnectCall, type PluginContext, type PluginDefinition, type Call, type CallableEndpoint, type DashboardDeclaration, type EmittedEndpoint, type EndpointCall, type EndpointDeclaration, type Handoff, type Hooks, type ListingDeclaration, type Outcome, type PageCall, type PageDeclaration, type Params, type ParamSpec, type ParamValue, type Result, type ReturnSpec, type RevokeCall, type ScheduleCall, type ScheduleDeclaration, type WebhookCall, type WidgetDeclaration, } from "./define.js";
|
|
7
|
+
export { definePlugin, defineEndpoint, type ActionDeclaration, type Actor, type AfterConnectAnswer, type AfterConnectCall, type PluginContext, type PluginDefinition, type Call, type CallableEndpoint, type DashboardDeclaration, type EmittedEndpoint, type EndpointCall, type EndpointDeclaration, type Handoff, type Hooks, type ItemRef, type ListingDeclaration, type Outcome, type PageCall, type PageDeclaration, type Params, type ParamSpec, type ParamValue, type Result, type ReturnSpec, type RevokeCall, type ScheduleCall, type ScheduleDeclaration, type WebhookCall, type WidgetDeclaration, } from "./define.js";
|
|
8
8
|
export { MANIFEST_PATH, manifestSchema, validateDocument, validateManifest, type PluginDocument, type ValidationProblem, } from "./validate.js";
|
|
9
9
|
export { pluginApiCompatible } from "./plugin-api.js";
|
|
10
10
|
export type { Jwks, PublicJwk } from "./keys.js";
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,cAAc,
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,cAAc,GA8Bf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
|