initiative-plugin-sdk 9.0.0 → 10.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 +36 -13
- package/dist/contract.d.ts +66 -24
- package/dist/contract.js +6 -4
- package/dist/contract.js.map +1 -1
- package/dist/plugin-api.generated.d.ts +467 -636
- package/dist/plugin-api.generated.js +129 -204
- package/dist/plugin-api.generated.js.map +1 -1
- package/dist/validate.d.ts +4 -3
- package/dist/validate.js +14 -6
- package/dist/validate.js.map +1 -1
- package/manifest.contract.json +118 -13
- package/package.json +2 -2
- package/schemas/plugin-api.json +6093 -6758
- package/schemas/plugin-manifest.json +122 -21
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated by scripts/generate-plugin-api.mjs from schemas/plugin-api.json, the plug-in API
|
|
3
|
-
* taken from Initiative 0.77.1 (commit
|
|
3
|
+
* taken from Initiative 0.77.1 (commit d862d0ebd). Do not edit: regenerate.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Each operation a plug-in may call: its method, its path after `/api/v1/c/0`, the
|
|
7
7
|
* scope it needs, and the query parameters it takes as JSON.
|
|
8
8
|
*/
|
|
9
9
|
export const pluginApiOperations = {
|
|
10
|
-
create_subscription: { method: "POST", path: "/webhooks/subscriptions", scope: { per: "event_type", any_of: ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "
|
|
11
|
-
delete_subscription: { method: "DELETE", path: "/webhooks/subscriptions/{subscription_id}", scope: { per: "event_type", any_of: ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "
|
|
10
|
+
create_subscription: { method: "POST", path: "/webhooks/subscriptions", scope: { per: "event_type", any_of: ["calendars:read", "comments:read", "contacts:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "tags:read", "wikis:read"] } },
|
|
11
|
+
delete_subscription: { method: "DELETE", path: "/webhooks/subscriptions/{subscription_id}", scope: { per: "event_type", any_of: ["calendars:read", "comments:read", "contacts:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "tags:read", "wikis:read"] } },
|
|
12
12
|
list_projects: { method: "GET", path: "/projects/", scope: "projects:read" },
|
|
13
13
|
create_project: { method: "POST", path: "/projects/", scope: "projects:write" },
|
|
14
14
|
list_files: { method: "GET", path: "/files/", scope: "files:read" },
|
|
15
15
|
create_file: { method: "POST", path: "/files/", scope: "files:write" },
|
|
16
|
-
list_queues: { method: "GET", path: "/queues/", scope: "queues:read" },
|
|
17
|
-
create_queue: { method: "POST", path: "/queues/", scope: "queues:write" },
|
|
18
16
|
list_counter_groups: { method: "GET", path: "/counter-groups/", scope: "counter_groups:read" },
|
|
19
17
|
create_counter_group: { method: "POST", path: "/counter-groups/", scope: "counter_groups:write" },
|
|
20
18
|
list_calendars: { method: "GET", path: "/calendars/", scope: "calendars:read" },
|
|
@@ -23,6 +21,8 @@ export const pluginApiOperations = {
|
|
|
23
21
|
create_post: { method: "POST", path: "/posts/", scope: "posts:write" },
|
|
24
22
|
list_wikis: { method: "GET", path: "/wikis/", scope: "wikis:read" },
|
|
25
23
|
create_wiki: { method: "POST", path: "/wikis/", scope: "wikis:write" },
|
|
24
|
+
list_contacts: { method: "GET", path: "/contacts/", scope: "contacts:read" },
|
|
25
|
+
create_contact: { method: "POST", path: "/contacts/", scope: "contacts:write" },
|
|
26
26
|
list_collection_files: { method: "GET", path: "/collections/{collection_id}/files", scope: "files:read" },
|
|
27
27
|
add_collection_files: { method: "POST", path: "/collections/{collection_id}/files", scope: "files:write" },
|
|
28
28
|
remove_collection_files: { method: "DELETE", path: "/collections/{collection_id}/files", scope: "files:write" },
|
|
@@ -59,22 +59,8 @@ export const pluginApiOperations = {
|
|
|
59
59
|
read_collection: { method: "GET", path: "/collections/{collection_id}", scope: "files:read" },
|
|
60
60
|
delete_collection: { method: "DELETE", path: "/collections/{collection_id}", scope: "files:write" },
|
|
61
61
|
update_collection: { method: "PATCH", path: "/collections/{collection_id}", scope: "files:write" },
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
read_queue: { method: "GET", path: "/queues/{queue_id}", scope: "queues:read" },
|
|
65
|
-
update_queue: { method: "PATCH", path: "/queues/{queue_id}", scope: "queues:write" },
|
|
66
|
-
add_queue_item: { method: "POST", path: "/queues/{queue_id}/items", scope: "queues:write" },
|
|
67
|
-
start_queue: { method: "POST", path: "/queues/{queue_id}/start", scope: "queues:write" },
|
|
68
|
-
stop_queue: { method: "POST", path: "/queues/{queue_id}/stop", scope: "queues:write" },
|
|
69
|
-
advance_turn: { method: "POST", path: "/queues/{queue_id}/next", scope: "queues:write" },
|
|
70
|
-
previous_turn: { method: "POST", path: "/queues/{queue_id}/previous", scope: "queues:write" },
|
|
71
|
-
set_active_item: { method: "POST", path: "/queues/{queue_id}/set-active/{item_id}", scope: "queues:write" },
|
|
72
|
-
reset_queue: { method: "POST", path: "/queues/{queue_id}/reset", scope: "queues:write" },
|
|
73
|
-
hold_current_turn: { method: "POST", path: "/queues/{queue_id}/hold", scope: "queues:write" },
|
|
74
|
-
release_held_item: { method: "POST", path: "/queues/{queue_id}/release/{item_id}", scope: "queues:write" },
|
|
75
|
-
read_queue_item: { method: "GET", path: "/queue-items/{item_id}", scope: "queues:read" },
|
|
76
|
-
update_queue_item: { method: "PATCH", path: "/queue-items/{item_id}", scope: "queues:write" },
|
|
77
|
-
duplicate_queue_item: { method: "POST", path: "/queue-items/{item_id}/duplicate", scope: "queues:write" },
|
|
62
|
+
get_collection_file_metadata: { method: "GET", path: "/collections/{collection_id}/files/{file_id}/metadata", scope: "files:read" },
|
|
63
|
+
set_collection_file_metadata: { method: "PUT", path: "/collections/{collection_id}/files/{file_id}/metadata", scope: "files:write" },
|
|
78
64
|
read_counter_group: { method: "GET", path: "/counter-groups/{group_id}", scope: "counter_groups:read" },
|
|
79
65
|
update_counter_group: { method: "PATCH", path: "/counter-groups/{group_id}", scope: "counter_groups:write" },
|
|
80
66
|
add_counter: { method: "POST", path: "/counter-groups/{group_id}/counters", scope: "counter_groups:write" },
|
|
@@ -99,6 +85,8 @@ export const pluginApiOperations = {
|
|
|
99
85
|
update_wiki_page: { method: "PATCH", path: "/wiki-pages/{page_id}", scope: "wikis:write" },
|
|
100
86
|
duplicate_wiki_page: { method: "POST", path: "/wiki-pages/{page_id}/duplicate", scope: "wikis:write" },
|
|
101
87
|
move_wiki_page: { method: "POST", path: "/wiki-pages/{page_id}/move", scope: "wikis:write" },
|
|
88
|
+
read_contact: { method: "GET", path: "/contacts/{contact_id}", scope: "contacts:read" },
|
|
89
|
+
update_contact: { method: "PATCH", path: "/contacts/{contact_id}", scope: "contacts:write" },
|
|
102
90
|
read_calendar_event: { method: "GET", path: "/calendar-events/{event_id}", scope: "calendars:read" },
|
|
103
91
|
update_calendar_event: { method: "PATCH", path: "/calendar-events/{event_id}", scope: "calendars:write" },
|
|
104
92
|
create_calendar_event: { method: "POST", path: "/calendar-events/", scope: "calendars:write" },
|
|
@@ -112,25 +100,28 @@ export const pluginApiOperations = {
|
|
|
112
100
|
bulk_edit_tags: { method: "POST", path: "/tags/bulk", scope: "tags:write" },
|
|
113
101
|
set_project_grants: { method: "PUT", path: "/projects/{project_id}/grants", scope: "sharing:write" },
|
|
114
102
|
set_file_grants: { method: "PUT", path: "/files/{file_id}/grants", scope: "sharing:write" },
|
|
115
|
-
set_queue_grants: { method: "PUT", path: "/queues/{queue_id}/grants", scope: "sharing:write" },
|
|
116
103
|
set_counter_group_grants: { method: "PUT", path: "/counter-groups/{group_id}/grants", scope: "sharing:write" },
|
|
117
104
|
set_calendar_grants: { method: "PUT", path: "/calendars/{calendar_id}/grants", scope: "sharing:write" },
|
|
118
105
|
set_post_grants: { method: "PUT", path: "/posts/{post_id}/grants", scope: "sharing:write" },
|
|
119
106
|
set_wiki_grants: { method: "PUT", path: "/wikis/{wiki_id}/grants", scope: "sharing:write" },
|
|
107
|
+
set_contact_grants: { method: "PUT", path: "/contacts/{contact_id}/grants", scope: "sharing:write" },
|
|
120
108
|
duplicate_project: { method: "POST", path: "/projects/{project_id}/duplicate", scope: "projects:write" },
|
|
121
109
|
duplicate_file: { method: "POST", path: "/files/{file_id}/duplicate", scope: "files:write" },
|
|
122
|
-
duplicate_queue: { method: "POST", path: "/queues/{queue_id}/duplicate", scope: "queues:write" },
|
|
123
110
|
duplicate_counter_group: { method: "POST", path: "/counter-groups/{group_id}/duplicate", scope: "counter_groups:write" },
|
|
124
111
|
duplicate_calendar: { method: "POST", path: "/calendars/{calendar_id}/duplicate", scope: "calendars:write" },
|
|
125
112
|
duplicate_post: { method: "POST", path: "/posts/{post_id}/duplicate", scope: "posts:write" },
|
|
126
113
|
duplicate_wiki: { method: "POST", path: "/wikis/{wiki_id}/duplicate", scope: "wikis:write" },
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
114
|
+
duplicate_contact: { method: "POST", path: "/contacts/{contact_id}/duplicate", scope: "contacts:write" },
|
|
115
|
+
suggest_community: { method: "GET", path: "/search/suggest", scope: { per: "entity_type", any_of: ["calendars:read", "comments:read", "contacts:read", "counter_groups:read", "dashboards:read", "files:read", "posts:read", "projects:read", "tags:read", "wikis:read"] } },
|
|
116
|
+
list_property_definitions: { method: "GET", path: "/property-definitions/", scope: { per: "tool", any_of: ["calendars:read", "contacts:read", "counter_groups:read", "dashboards:read", "files:read", "posts:read", "projects:read", "properties:read", "wikis:read"] } },
|
|
117
|
+
create_property_definition: { method: "POST", path: "/property-definitions/", scope: { per: "owner's_scope", any_of: ["files:write", "projects:write", "properties:write"] } },
|
|
118
|
+
list_property_definitions_by_owner: { method: "GET", path: "/property-definitions/by-owner", scope: { per: "tool", any_of: ["calendars:read", "contacts:read", "counter_groups:read", "dashboards:read", "files:read", "posts:read", "projects:read", "properties:read", "wikis:read"] } },
|
|
119
|
+
delete_property_definitions: { method: "POST", path: "/property-definitions/bulk-delete", scope: { per: "owner's_scope", any_of: ["files:write", "projects:write", "properties:write"] } },
|
|
120
|
+
promote_property_definitions: { method: "POST", path: "/property-definitions/promote", scope: { per: "owner's_scope", any_of: ["files:write", "projects:write", "properties:write"] } },
|
|
121
|
+
delete_property_definition: { method: "DELETE", path: "/property-definitions/{definition_id}", scope: { per: "owner's_scope", any_of: ["files:write", "projects:write", "properties:write"] } },
|
|
122
|
+
update_property_definition: { method: "PATCH", path: "/property-definitions/{definition_id}", scope: { per: "owner's_scope", any_of: ["files:write", "projects:write", "properties:write"] } },
|
|
123
|
+
set_properties: { method: "PUT", path: "/properties/{target}/{entity_id}", scope: { by: "target", scopes: { calendar: "calendars:write", calendar_event: "calendars:write", collection: "files:write", contact: "contacts:write", counter: "counter_groups:write", counter_group: "counter_groups:write", dashboard: "dashboards:write", file: "files:write", post: "posts:write", project: "projects:write", task: "projects:write", wiki: "wikis:write", wiki_page: "wikis:write" } } },
|
|
124
|
+
archive_entity: { method: "POST", path: "/archive/{entity_type}/{entity_id}", scope: { by: "entity_type", scopes: { calendar: "calendars:write", collection: "files:write", contact: "contacts:write", counter_group: "counter_groups:write", dashboard: "dashboards:write", file: "files:write", post: "posts:write", project: "projects:write", task: "projects:write", wiki: "wikis:write" } } },
|
|
134
125
|
search_users: { method: "GET", path: "/users/search", scope: "members:read" },
|
|
135
126
|
read_member_avatar: { method: "GET", path: "/members/{person}/avatar/{digest}", scope: "members:read" },
|
|
136
127
|
};
|
|
@@ -143,7 +134,7 @@ export class PluginApi {
|
|
|
143
134
|
/**
|
|
144
135
|
* Register a new webhook subscription.
|
|
145
136
|
*
|
|
146
|
-
* `POST /webhooks/subscriptions`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `
|
|
137
|
+
* `POST /webhooks/subscriptions`, needs one of `calendars:read`, `comments:read`, `contacts:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `tags:read`, `wikis:read`.
|
|
147
138
|
*/
|
|
148
139
|
createSubscription(args) {
|
|
149
140
|
return this.call("create_subscription", args);
|
|
@@ -154,7 +145,7 @@ export class PluginApi {
|
|
|
154
145
|
* installed plug-in reaches only the subscriptions it registered, and any
|
|
155
146
|
* other is a 404.
|
|
156
147
|
*
|
|
157
|
-
* `DELETE /webhooks/subscriptions/{subscription_id}`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `
|
|
148
|
+
* `DELETE /webhooks/subscriptions/{subscription_id}`, needs one of `calendars:read`, `comments:read`, `contacts:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `tags:read`, `wikis:read`.
|
|
158
149
|
*/
|
|
159
150
|
deleteSubscription(args) {
|
|
160
151
|
return this.call("delete_subscription", args);
|
|
@@ -191,22 +182,6 @@ export class PluginApi {
|
|
|
191
182
|
createFile(args) {
|
|
192
183
|
return this.call("create_file", args);
|
|
193
184
|
}
|
|
194
|
-
/**
|
|
195
|
-
* List queues visible to the current user (guild admins see all).
|
|
196
|
-
*
|
|
197
|
-
* `GET /queues/`, needs `queues:read`.
|
|
198
|
-
*/
|
|
199
|
-
listQueues(args) {
|
|
200
|
-
return this.call("list_queues", args);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Create a new queue in an initiative.
|
|
204
|
-
*
|
|
205
|
-
* `POST /queues/`, needs `queues:write`.
|
|
206
|
-
*/
|
|
207
|
-
createQueue(args) {
|
|
208
|
-
return this.call("create_queue", args);
|
|
209
|
-
}
|
|
210
185
|
/**
|
|
211
186
|
* List Counter Groups
|
|
212
187
|
*
|
|
@@ -273,6 +248,22 @@ export class PluginApi {
|
|
|
273
248
|
createWiki(args) {
|
|
274
249
|
return this.call("create_wiki", args);
|
|
275
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* List contacts visible to the current user (guild admins see all).
|
|
253
|
+
*
|
|
254
|
+
* `GET /contacts/`, needs `contacts:read`.
|
|
255
|
+
*/
|
|
256
|
+
listContacts(args) {
|
|
257
|
+
return this.call("list_contacts", args);
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Create a contact.
|
|
261
|
+
*
|
|
262
|
+
* `POST /contacts/`, needs `contacts:write`.
|
|
263
|
+
*/
|
|
264
|
+
createContact(args) {
|
|
265
|
+
return this.call("create_contact", args);
|
|
266
|
+
}
|
|
276
267
|
/**
|
|
277
268
|
* The files in one collection the reader can open: the Files list, with its
|
|
278
269
|
* parameters, narrowed to the collection, each with when it was added to it.
|
|
@@ -285,7 +276,9 @@ export class PluginApi {
|
|
|
285
276
|
}
|
|
286
277
|
/**
|
|
287
278
|
* Put files in a collection: each a file of its initiative the reader can
|
|
288
|
-
* open
|
|
279
|
+
* open, starting with `metadata`'s values of the collection's metadata. One
|
|
280
|
+
* already in it stays as it is. A person gives each value the collection's
|
|
281
|
+
* file page requires.
|
|
289
282
|
*
|
|
290
283
|
* `POST /collections/{collection_id}/files`, needs `files:write`.
|
|
291
284
|
*/
|
|
@@ -481,7 +474,8 @@ export class PluginApi {
|
|
|
481
474
|
}
|
|
482
475
|
/**
|
|
483
476
|
* The initiatives the caller belongs to, or — for a guild admin asking for
|
|
484
|
-
* `scope=community` — every initiative in the guild
|
|
477
|
+
* `scope=community` — every initiative in the guild, which the admin rung's
|
|
478
|
+
* reach into all content already reads.
|
|
485
479
|
*
|
|
486
480
|
* `GET /initiatives/`, needs `initiatives:read`.
|
|
487
481
|
*/
|
|
@@ -532,7 +526,7 @@ export class PluginApi {
|
|
|
532
526
|
}
|
|
533
527
|
/**
|
|
534
528
|
* The ready-made shapes a new collection can start as, grouped, in the
|
|
535
|
-
* reader's language: the lists each shows and opens on, and its
|
|
529
|
+
* reader's language: the lists each shows and opens on, and its metadata.
|
|
536
530
|
*
|
|
537
531
|
* `GET /collections/shapes`, needs `files:read`.
|
|
538
532
|
*/
|
|
@@ -553,7 +547,7 @@ export class PluginApi {
|
|
|
553
547
|
* Make a collection of files. It starts with the files named, each one a file
|
|
554
548
|
* of the initiative the reader can open. Takes the initiative role's right to
|
|
555
549
|
* create files. It starts blank, as a ready-made `shape` with its words in
|
|
556
|
-
* the maker's language, or with the
|
|
550
|
+
* the maker's language, or with the metadata and lists of `shape_from`, a
|
|
557
551
|
* collection of the same initiative the maker sees.
|
|
558
552
|
*
|
|
559
553
|
* `POST /collections/`, needs `files:write`.
|
|
@@ -587,138 +581,25 @@ export class PluginApi {
|
|
|
587
581
|
return this.call("update_collection", args);
|
|
588
582
|
}
|
|
589
583
|
/**
|
|
590
|
-
* One file's values of the collection's
|
|
584
|
+
* One file's values of the collection's metadata, for a file in the
|
|
591
585
|
* collection the reader can open.
|
|
592
586
|
*
|
|
593
|
-
* `GET /collections/{collection_id}/files/{file_id}/
|
|
587
|
+
* `GET /collections/{collection_id}/files/{file_id}/metadata`, needs `files:read`.
|
|
594
588
|
*/
|
|
595
|
-
|
|
596
|
-
return this.call("
|
|
589
|
+
getCollectionFileMetadata(args) {
|
|
590
|
+
return this.call("get_collection_file_metadata", args);
|
|
597
591
|
}
|
|
598
592
|
/**
|
|
599
|
-
* Replace one file's values of the collection's
|
|
593
|
+
* Replace one file's values of the collection's metadata, or with `merge`
|
|
600
594
|
* write only the ones named, as `PUT /properties` does for a property. The
|
|
601
595
|
* file is one in the collection the reader can open, and the values are the
|
|
602
596
|
* collection's: they take the right to change the collection, not to edit the
|
|
603
597
|
* file. An empty list clears them all.
|
|
604
598
|
*
|
|
605
|
-
* `PUT /collections/{collection_id}/files/{file_id}/
|
|
606
|
-
*/
|
|
607
|
-
setCollectionFileFields(args) {
|
|
608
|
-
return this.call("set_collection_file_fields", args);
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* Read Queue
|
|
612
|
-
*
|
|
613
|
-
* `GET /queues/{queue_id}`, needs `queues:read`.
|
|
614
|
-
*/
|
|
615
|
-
readQueue(args) {
|
|
616
|
-
return this.call("read_queue", args);
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Update queue name/description. Requires write access.
|
|
620
|
-
*
|
|
621
|
-
* `PATCH /queues/{queue_id}`, needs `queues:write`.
|
|
622
|
-
*/
|
|
623
|
-
updateQueue(args) {
|
|
624
|
-
return this.call("update_queue", args);
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Add an item to a queue. Requires write access.
|
|
628
|
-
*
|
|
629
|
-
* `POST /queues/{queue_id}/items`, needs `queues:write`.
|
|
630
|
-
*/
|
|
631
|
-
addQueueItem(args) {
|
|
632
|
-
return this.call("add_queue_item", args);
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Start the queue: set active, reset to first item, round 1.
|
|
636
|
-
*
|
|
637
|
-
* `POST /queues/{queue_id}/start`, needs `queues:write`.
|
|
638
|
-
*/
|
|
639
|
-
startQueue(args) {
|
|
640
|
-
return this.call("start_queue", args);
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Stop the queue: set inactive but keep current position.
|
|
644
|
-
*
|
|
645
|
-
* `POST /queues/{queue_id}/stop`, needs `queues:write`.
|
|
646
|
-
*/
|
|
647
|
-
stopQueue(args) {
|
|
648
|
-
return this.call("stop_queue", args);
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* Advance to the next visible item. Wraps around and increments round.
|
|
652
|
-
*
|
|
653
|
-
* `POST /queues/{queue_id}/next`, needs `queues:write`.
|
|
654
|
-
*/
|
|
655
|
-
advanceTurn(args) {
|
|
656
|
-
return this.call("advance_turn", args);
|
|
657
|
-
}
|
|
658
|
-
/**
|
|
659
|
-
* Move to the previous visible item. Wraps around and decrements round.
|
|
660
|
-
*
|
|
661
|
-
* `POST /queues/{queue_id}/previous`, needs `queues:write`.
|
|
662
|
-
*/
|
|
663
|
-
previousTurn(args) {
|
|
664
|
-
return this.call("previous_turn", args);
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* Jump to a specific item in the queue.
|
|
668
|
-
*
|
|
669
|
-
* `POST /queues/{queue_id}/set-active/{item_id}`, needs `queues:write`.
|
|
670
|
-
*/
|
|
671
|
-
setActiveItem(args) {
|
|
672
|
-
return this.call("set_active_item", args);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Reset the queue to round 1, first visible item.
|
|
676
|
-
*
|
|
677
|
-
* `POST /queues/{queue_id}/reset`, needs `queues:write`.
|
|
678
|
-
*/
|
|
679
|
-
resetQueue(args) {
|
|
680
|
-
return this.call("reset_queue", args);
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* Hold the current turn — the item leaves the rotation until it acts.
|
|
684
|
-
*
|
|
685
|
-
* `POST /queues/{queue_id}/hold`, needs `queues:write`.
|
|
686
|
-
*/
|
|
687
|
-
holdCurrentTurn(args) {
|
|
688
|
-
return this.call("hold_current_turn", args);
|
|
689
|
-
}
|
|
690
|
-
/**
|
|
691
|
-
* Release a held item back into the rotation.
|
|
692
|
-
*
|
|
693
|
-
* `POST /queues/{queue_id}/release/{item_id}`, needs `queues:write`.
|
|
694
|
-
*/
|
|
695
|
-
releaseHeldItem(args) {
|
|
696
|
-
return this.call("release_held_item", args);
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* One queue item by id — the read-back for a `queue_items.*` event.
|
|
700
|
-
*
|
|
701
|
-
* `GET /queue-items/{item_id}`, needs `queues:read`.
|
|
702
|
-
*/
|
|
703
|
-
readQueueItem(args) {
|
|
704
|
-
return this.call("read_queue_item", args);
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Update a queue item. Requires write access on the queue.
|
|
708
|
-
*
|
|
709
|
-
* `PATCH /queue-items/{item_id}`, needs `queues:write`.
|
|
710
|
-
*/
|
|
711
|
-
updateQueueItem(args) {
|
|
712
|
-
return this.call("update_queue_item", args);
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* Copy the item beside itself, at the same place in the turn order, as
|
|
716
|
-
* "<label> (Copy)", with its person, tags, links and properties.
|
|
717
|
-
*
|
|
718
|
-
* `POST /queue-items/{item_id}/duplicate`, needs `queues:write`.
|
|
599
|
+
* `PUT /collections/{collection_id}/files/{file_id}/metadata`, needs `files:write`.
|
|
719
600
|
*/
|
|
720
|
-
|
|
721
|
-
return this.call("
|
|
601
|
+
setCollectionFileMetadata(args) {
|
|
602
|
+
return this.call("set_collection_file_metadata", args);
|
|
722
603
|
}
|
|
723
604
|
/**
|
|
724
605
|
* Read Counter Group
|
|
@@ -920,6 +801,22 @@ export class PluginApi {
|
|
|
920
801
|
moveWikiPage(args) {
|
|
921
802
|
return this.call("move_wiki_page", args);
|
|
922
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Read Contact
|
|
806
|
+
*
|
|
807
|
+
* `GET /contacts/{contact_id}`, needs `contacts:read`.
|
|
808
|
+
*/
|
|
809
|
+
readContact(args) {
|
|
810
|
+
return this.call("read_contact", args);
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Change a contact. A list sent replaces the one there.
|
|
814
|
+
*
|
|
815
|
+
* `PATCH /contacts/{contact_id}`, needs `contacts:write`.
|
|
816
|
+
*/
|
|
817
|
+
updateContact(args) {
|
|
818
|
+
return this.call("update_contact", args);
|
|
819
|
+
}
|
|
923
820
|
/**
|
|
924
821
|
* Read Calendar Event
|
|
925
822
|
*
|
|
@@ -1036,16 +933,6 @@ export class PluginApi {
|
|
|
1036
933
|
setFileGrants(args) {
|
|
1037
934
|
return this.call("set_file_grants", args);
|
|
1038
935
|
}
|
|
1039
|
-
/**
|
|
1040
|
-
* Replace the queue's entire sharing state in one call — the body is the full
|
|
1041
|
-
* list of grants (all-initiative-members / per-user / per-role). Every
|
|
1042
|
-
* non-owner grant is rebuilt from it; the owner is always preserved.
|
|
1043
|
-
*
|
|
1044
|
-
* `PUT /queues/{queue_id}/grants`, needs `sharing:write`.
|
|
1045
|
-
*/
|
|
1046
|
-
setQueueGrants(args) {
|
|
1047
|
-
return this.call("set_queue_grants", args);
|
|
1048
|
-
}
|
|
1049
936
|
/**
|
|
1050
937
|
* Replace the counter group's entire sharing state in one call — the body is
|
|
1051
938
|
* the full list of grants (all-initiative-members / per-user / per-role).
|
|
@@ -1086,6 +973,16 @@ export class PluginApi {
|
|
|
1086
973
|
setWikiGrants(args) {
|
|
1087
974
|
return this.call("set_wiki_grants", args);
|
|
1088
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* Replace the contact's entire sharing state in one call — the body is the
|
|
978
|
+
* full list of grants (all-initiative-members / per-user / per-role). Every
|
|
979
|
+
* non-owner grant is rebuilt from it; the owner is always preserved.
|
|
980
|
+
*
|
|
981
|
+
* `PUT /contacts/{contact_id}/grants`, needs `sharing:write`.
|
|
982
|
+
*/
|
|
983
|
+
setContactGrants(args) {
|
|
984
|
+
return this.call("set_contact_grants", args);
|
|
985
|
+
}
|
|
1089
986
|
/**
|
|
1090
987
|
* Copy it, with everything inside it, into an initiative: its own unless the
|
|
1091
988
|
* body names another. Read is enough to copy a template; anything else needs
|
|
@@ -1110,18 +1007,6 @@ export class PluginApi {
|
|
|
1110
1007
|
duplicateFile(args) {
|
|
1111
1008
|
return this.call("duplicate_file", args);
|
|
1112
1009
|
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Copy it, with everything inside it, into an initiative: its own unless the
|
|
1115
|
-
* body names another. Read is enough to copy a template; anything else needs
|
|
1116
|
-
* write. The copy is shared as its source is while it stays in the same
|
|
1117
|
-
* initiative, and carries the tags its maker may set: an installed plug-in's
|
|
1118
|
-
* copy carries them only when it holds the scope to tag.
|
|
1119
|
-
*
|
|
1120
|
-
* `POST /queues/{queue_id}/duplicate`, needs `queues:write`.
|
|
1121
|
-
*/
|
|
1122
|
-
duplicateQueue(args) {
|
|
1123
|
-
return this.call("duplicate_queue", args);
|
|
1124
|
-
}
|
|
1125
1010
|
/**
|
|
1126
1011
|
* Copy it, with everything inside it, into an initiative: its own unless the
|
|
1127
1012
|
* body names another. Read is enough to copy a template; anything else needs
|
|
@@ -1170,36 +1055,76 @@ export class PluginApi {
|
|
|
1170
1055
|
duplicateWiki(args) {
|
|
1171
1056
|
return this.call("duplicate_wiki", args);
|
|
1172
1057
|
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Copy it, with everything inside it, into an initiative: its own unless the
|
|
1060
|
+
* body names another. Read is enough to copy a template; anything else needs
|
|
1061
|
+
* write. The copy is shared as its source is while it stays in the same
|
|
1062
|
+
* initiative, and carries the tags its maker may set: an installed plug-in's
|
|
1063
|
+
* copy carries them only when it holds the scope to tag.
|
|
1064
|
+
*
|
|
1065
|
+
* `POST /contacts/{contact_id}/duplicate`, needs `contacts:write`.
|
|
1066
|
+
*/
|
|
1067
|
+
duplicateContact(args) {
|
|
1068
|
+
return this.call("duplicate_contact", args);
|
|
1069
|
+
}
|
|
1173
1070
|
/**
|
|
1174
1071
|
* Titles for the command palette — a way to reach one thing quickly.
|
|
1175
1072
|
*
|
|
1176
|
-
* `GET /search/suggest`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `
|
|
1073
|
+
* `GET /search/suggest`, needs one of `calendars:read`, `comments:read`, `contacts:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `tags:read`, `wikis:read`.
|
|
1177
1074
|
*/
|
|
1178
1075
|
suggestCommunity(args) {
|
|
1179
1076
|
return this.call("suggest_community", args);
|
|
1180
1077
|
}
|
|
1181
1078
|
/**
|
|
1182
|
-
* List property definitions.
|
|
1079
|
+
* List property definitions, or a project's or a collection's metadata.
|
|
1183
1080
|
*
|
|
1184
|
-
* `GET /property-definitions/`, needs one of `calendars:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `properties:read`, `
|
|
1081
|
+
* `GET /property-definitions/`, needs one of `calendars:read`, `contacts:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `properties:read`, `wikis:read`.
|
|
1185
1082
|
*/
|
|
1186
1083
|
listPropertyDefinitions(args) {
|
|
1187
1084
|
return this.call("list_property_definitions", args);
|
|
1188
1085
|
}
|
|
1189
1086
|
/**
|
|
1190
|
-
* Create a new property definition on an initiative, or with `
|
|
1191
|
-
*
|
|
1087
|
+
* Create a new property definition on an initiative, or with `project_id` or
|
|
1088
|
+
* `collection_id` that project's or collection's metadata.
|
|
1192
1089
|
*
|
|
1193
|
-
* `POST /property-definitions/`, needs one of `files:write`, `properties:write`.
|
|
1090
|
+
* `POST /property-definitions/`, needs one of `files:write`, `projects:write`, `properties:write`.
|
|
1194
1091
|
*/
|
|
1195
1092
|
createPropertyDefinition(args) {
|
|
1196
1093
|
return this.call("create_property_definition", args);
|
|
1197
1094
|
}
|
|
1095
|
+
/**
|
|
1096
|
+
* The initiative's metadata, then the properties of each of its projects and
|
|
1097
|
+
* each of its collections, under the owner's name.
|
|
1098
|
+
*
|
|
1099
|
+
* `GET /property-definitions/by-owner`, needs one of `calendars:read`, `contacts:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `properties:read`, `wikis:read`.
|
|
1100
|
+
*/
|
|
1101
|
+
listPropertyDefinitionsByOwner(args) {
|
|
1102
|
+
return this.call("list_property_definitions_by_owner", args);
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Delete several of the initiative's definitions at once, with every value of
|
|
1106
|
+
* each: all of them, or, when any may not be removed as deleting it alone
|
|
1107
|
+
* asks, none.
|
|
1108
|
+
*
|
|
1109
|
+
* `POST /property-definitions/bulk-delete`, needs one of `files:write`, `projects:write`, `properties:write`.
|
|
1110
|
+
*/
|
|
1111
|
+
deletePropertyDefinitions(args) {
|
|
1112
|
+
return this.call("delete_property_definitions", args);
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Merge properties of one type, from the initiative's projects and
|
|
1116
|
+
* collections, into one of its metadata named `name`, answering it.
|
|
1117
|
+
*
|
|
1118
|
+
* `POST /property-definitions/promote`, needs one of `files:write`, `projects:write`, `properties:write`.
|
|
1119
|
+
*/
|
|
1120
|
+
promotePropertyDefinitions(args) {
|
|
1121
|
+
return this.call("promote_property_definitions", args);
|
|
1122
|
+
}
|
|
1198
1123
|
/**
|
|
1199
1124
|
* Delete a property definition. Cascades to remove all attached values. A
|
|
1200
|
-
* collection's
|
|
1125
|
+
* project's or a collection's metadata is removed by whoever may define it.
|
|
1201
1126
|
*
|
|
1202
|
-
* `DELETE /property-definitions/{definition_id}`, needs one of `files:write`, `properties:write`.
|
|
1127
|
+
* `DELETE /property-definitions/{definition_id}`, needs one of `files:write`, `projects:write`, `properties:write`.
|
|
1203
1128
|
*/
|
|
1204
1129
|
deletePropertyDefinition(args) {
|
|
1205
1130
|
return this.call("delete_property_definition", args);
|
|
@@ -1207,7 +1132,7 @@ export class PluginApi {
|
|
|
1207
1132
|
/**
|
|
1208
1133
|
* Update a property definition.
|
|
1209
1134
|
*
|
|
1210
|
-
* `PATCH /property-definitions/{definition_id}`, needs one of `files:write`, `properties:write`.
|
|
1135
|
+
* `PATCH /property-definitions/{definition_id}`, needs one of `files:write`, `projects:write`, `properties:write`.
|
|
1211
1136
|
*/
|
|
1212
1137
|
updatePropertyDefinition(args) {
|
|
1213
1138
|
return this.call("update_property_definition", args);
|