You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement CRUD operations for documents in Dart, including create, update, and delete functionalities. Add new properties for document management and update package version to 0.2.0. Enhance existing actions for task management with version updates.
description: "Record a new doc that the user intends to write down. This will save the doc in Dart for later access, search, etc. By default the created doc will be in the Docs folder. More information can be included in the text. [See the documentation](https://app.dartai.com/api/v0/public/docs/#/Doc/createDoc)",
7
+
version: "0.0.1",
8
+
annotations: {
9
+
destructiveHint: false,
10
+
openWorldHint: true,
11
+
readOnlyHint: false,
12
+
},
13
+
type: "action",
14
+
props: {
15
+
dart,
16
+
title: {
17
+
propDefinition: [
18
+
dart,
19
+
"title",
20
+
],
21
+
},
22
+
folder: {
23
+
propDefinition: [
24
+
dart,
25
+
"folder",
26
+
],
27
+
},
28
+
text: {
29
+
propDefinition: [
30
+
dart,
31
+
"text",
32
+
],
33
+
},
34
+
},
35
+
asyncrun({ $ }){
36
+
constresponse=awaitthis.dart.createDoc({
37
+
$,
38
+
data: {
39
+
item: {
40
+
title: this.title,
41
+
folder: this.folder,
42
+
text: this.text,
43
+
},
44
+
},
45
+
});
46
+
47
+
$.export("$summary",`New doc successfully created with ID: ${response.item.id}`);
description: "Move an existing doc to the trash, where it can be recovered if needed. Nothing else about the doc will be changed. [See the documentation](https://app.dartai.com/api/v0/public/docs/#/Doc/deleteDoc)",
7
+
version: "0.0.1",
8
+
annotations: {
9
+
destructiveHint: false,
10
+
openWorldHint: true,
11
+
readOnlyHint: false,
12
+
},
13
+
type: "action",
14
+
props: {
15
+
dart,
16
+
docId: {
17
+
propDefinition: [
18
+
dart,
19
+
"docId",
20
+
],
21
+
},
22
+
},
23
+
asyncrun({ $ }){
24
+
constresponse=awaitthis.dart.deleteDoc({
25
+
$,
26
+
docId: this.docId,
27
+
});
28
+
29
+
$.export("$summary",`Successfully deleted doc with ID: ${this.docId}`);
Copy file name to clipboardExpand all lines: components/dart/actions/find-or-create-task/find-or-create-task.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ export default {
4
4
key: "dart-find-or-create-task",
5
5
name: "Find or Create Task",
6
6
description: "Checks for an existing task within a dartboard using the 'task-name'. If it doesn't exist, a new task is created. [See the documentation](https://app.itsdart.com/api/v0/docs/)",
description: "Update certain properties of an existing doc. This will save the doc in Dart for later access, search, etc. Any properties that are not specified will not be changed. [See the documentation](https://app.dartai.com/api/v0/public/docs/#/Doc/updateDoc)",
7
+
version: "0.0.1",
8
+
annotations: {
9
+
destructiveHint: false,
10
+
openWorldHint: true,
11
+
readOnlyHint: false,
12
+
},
13
+
type: "action",
14
+
props: {
15
+
dart,
16
+
docId: {
17
+
propDefinition: [
18
+
dart,
19
+
"docId",
20
+
],
21
+
},
22
+
title: {
23
+
propDefinition: [
24
+
dart,
25
+
"title",
26
+
],
27
+
optional: true,
28
+
},
29
+
folder: {
30
+
propDefinition: [
31
+
dart,
32
+
"folder",
33
+
],
34
+
},
35
+
text: {
36
+
propDefinition: [
37
+
dart,
38
+
"text",
39
+
],
40
+
},
41
+
},
42
+
asyncrun({ $ }){
43
+
constresponse=awaitthis.dart.updateDoc({
44
+
$,
45
+
data: {
46
+
item: {
47
+
id: this.docId,
48
+
title: this.title,
49
+
folder: this.folder,
50
+
text: this.text,
51
+
},
52
+
},
53
+
});
54
+
55
+
$.export("$summary",`Successfully updated doc with ID: ${this.docId}`);
0 commit comments