mstate-cli 0.2.2 → 0.2.4

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.
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "add_photo",
3
+ "type": "MANUAL",
4
+ "as": "photo",
5
+ "meta": {
6
+ "title": "Add Photo",
7
+ "startCollectionName": "add_photo",
8
+ "displayName": "Add Photo",
9
+ "icon": "https://firebasestorage.googleapis.com/v0/b/mobioffice-dev.appspot.com/o/action_icon%2Fattendances.svg?alt=media&token=dd1766c8-687c-4243-8466-e26b26621dcf",
10
+ "workflowName": "demo/maintenance_request",
11
+ "mstate": true,
12
+ "responseSentToMstate": true,
13
+ "actionType": "worklog",
14
+ "name": "add_photo",
15
+ "showDone": true,
16
+ "id": "123",
17
+ "actionHandlerAPI": "",
18
+ "actionCompleteText": "Photo added Successfully",
19
+ "require_location": false,
20
+ "order": 0
21
+ },
22
+ "steps": []
23
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "change_assignee",
3
+ "type": "MANUAL",
4
+ "as": "assignee",
5
+ "meta": {
6
+ "title": "Change Assignee",
7
+ "startCollectionName": "change_assignee",
8
+ "displayName": "Change Assignee",
9
+ "icon": "https://firebasestorage.googleapis.com/v0/b/mobioffice-dev.appspot.com/o/action_icon%2Fattendances.svg?alt=media&token=dd1766c8-687c-4243-8466-e26b26621dcf",
10
+ "workflowName": "demo/maintenance_request",
11
+ "mstate": true,
12
+ "responseSentToMstate": true,
13
+ "actionType": "worklog",
14
+ "name": "change_assignee",
15
+ "showDone": true,
16
+ "id": "789",
17
+ "actionHandlerAPI": "",
18
+ "actionCompleteText": "Assignee Changed Successfully",
19
+ "require_location": false,
20
+ "order": 0
21
+ },
22
+ "steps": [
23
+ {
24
+ "id": "1",
25
+ "module": "USER_INPUT",
26
+ "config": {
27
+ "data": {
28
+ "id": "1",
29
+ "buttonActionText": "Next",
30
+ "fieldType": "dropDown",
31
+ "field": {
32
+ "keyForAPI": "data",
33
+ "isRequired": true,
34
+ "label": "Select Assignee",
35
+ "hint": "Select Assignee",
36
+ "value": "",
37
+ "request": {
38
+ "method": "GET",
39
+ "url": "EVAL -- CONCAT(env.DOUBLE_TICK_URL, '/workspace/GetWorkspaceMembersByWorkspaceID', '?WorkspaceID=', env.DOUBLE_TICK_WORKSPACE_ID)",
40
+ "headers": {
41
+ "secret-key": "EVAL -- env.DOUBLE_TICK_SECRET"
42
+ }
43
+ },
44
+ "mapper": {
45
+ "target": "Table",
46
+ "id": "ID",
47
+ "label": "Name"
48
+ },
49
+ "placeholder": "Select"
50
+ },
51
+ "label": "Select Assignee",
52
+ "order": 1
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "change_status",
3
+ "type": "MANUAL",
4
+ "as": "status",
5
+ "meta": {
6
+ "title": "Change Status",
7
+ "startCollectionName": "change_status",
8
+ "displayName": "Change Status",
9
+ "icon": "https://firebasestorage.googleapis.com/v0/b/mobioffice-dev.appspot.com/o/action_icon%2Fattendances.svg?alt=media&token=dd1766c8-687c-4243-8466-e26b26621dcf",
10
+ "workflowName": "demo/maintenance_request",
11
+ "mstate": true,
12
+ "responseSentToMstate": true,
13
+ "actionType": "worklog",
14
+ "name": "change_status",
15
+ "showDone": true,
16
+ "id": "456",
17
+ "actionHandlerAPI": "",
18
+ "actionCompleteText": "Status Changed Successfully",
19
+ "require_location": false,
20
+ "order": 0
21
+ },
22
+ "steps": [
23
+ {
24
+ "id": "1",
25
+ "module": "USER_INPUT",
26
+ "config": {
27
+ "data": {
28
+ "id": "1",
29
+ "buttonActionText": "Next",
30
+ "fieldType": "dropDown",
31
+ "field": {
32
+ "keyForAPI": "data",
33
+ "isRequired": true,
34
+ "label": "Select Status",
35
+ "hint": "Select Status",
36
+ "value": "",
37
+ "request": {
38
+ "method": "GET",
39
+ "url": "EVAL -- CONCAT(env.DOUBLE_TICK_URL, '/workspace/GetStatusByWorkspaceID', '?WorkspaceID=', env.DOUBLE_TICK_WORKSPACE_ID, '&FlowID=', env.DOUBLE_TICK_WORKFLOW_ID)",
40
+ "headers": {
41
+ "secret-key": "EVAL -- env.DOUBLE_TICK_SECRET"
42
+ }
43
+ },
44
+ "mapper": {
45
+ "target": "Table",
46
+ "id": "ID",
47
+ "label": "Name"
48
+ },
49
+ "placeholder": "Select"
50
+ },
51
+ "label": "Select Status",
52
+ "order": 1
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "steps": [
3
+ {
4
+ "config": {
5
+ "as": "ticket",
6
+ "operation": "create",
7
+ "secretKey": "EVAL -- env.DOUBLE_TICK_SECRET",
8
+ "payload": {
9
+ "workspaceID": "EVAL -- env.DOUBLE_TICK_WORKSPACE_ID",
10
+ "title": "EVAL -- CONCAT(input.payload.machine.ProjectName , ' | ', input.payload.summary)",
11
+ "description": "EVAL -- input.payload.summary",
12
+ "workflow": "EVAL -- env.DOUBLE_TICK_WORKFLOW_ID",
13
+ "areaID": "EVAL -- input.payload.machine.ID",
14
+ "LabelIds": "EVAL -- MAP_VALUE(input.payload.reasons, 'ID')",
15
+ "assignedTo": "EVAL -- OR(input.payload.userDetail.phone, env.DOUBLE_TICK_ADMIN)",
16
+ "TaskMain": {
17
+ "ReportedByID": "EVAL -- OR(input.payload.userDetail.phone, env.DOUBLE_TICK_ADMIN)",
18
+ "StatusID": "EVAL -- env.DOUBLE_TICK_DEFAULT_STATUS_ID"
19
+ }
20
+ }
21
+ },
22
+ "id": "1",
23
+ "module": "DOUBLE_TICK"
24
+ }
25
+ ],
26
+ "name": "create_ticket",
27
+ "type": "CHAINED"
28
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "edit_collaborator",
3
+ "type": "MANUAL",
4
+ "as": "cc",
5
+ "meta": {
6
+ "title": "Edit Collaborator",
7
+ "startCollectionName": "edit_collaborator",
8
+ "displayName": "Edit Collaborator",
9
+ "icon": "https://firebasestorage.googleapis.com/v0/b/mobioffice-dev.appspot.com/o/action_icon%2Fattendances.svg?alt=media&token=dd1766c8-687c-4243-8466-e26b26621dcf",
10
+ "workflowName": "demo/maintenance_request",
11
+ "mstate": true,
12
+ "responseSentToMstate": true,
13
+ "actionType": "worklog",
14
+ "name": "edit_collaborator",
15
+ "showDone": true,
16
+ "id": "987",
17
+ "actionHandlerAPI": "",
18
+ "actionCompleteText": "Collaborator Edited Successfully",
19
+ "require_location": false,
20
+ "order": 0
21
+ },
22
+ "steps": [
23
+ {
24
+ "id": "1",
25
+ "module": "USER_INPUT",
26
+ "config": {
27
+ "data": {
28
+ "id": "1",
29
+ "buttonActionText": "Next",
30
+ "fieldType": "checkBox",
31
+ "field": {
32
+ "keyForAPI": "data",
33
+ "isRequired": true,
34
+ "label": "Select Collaborator",
35
+ "hint": "Select Collaborator",
36
+ "value": "",
37
+ "request": {
38
+ "method": "GET",
39
+ "url": "EVAL -- CONCAT(env.DOUBLE_TICK_URL, '/workspace/GetWorkspaceMembersByWorkspaceID', '?WorkspaceID=', env.DOUBLE_TICK_WORKSPACE_ID)",
40
+ "headers": {
41
+ "secret-key": "EVAL -- env.DOUBLE_TICK_SECRET"
42
+ }
43
+ },
44
+ "mapper": {
45
+ "target": "Table",
46
+ "id": "ID",
47
+ "label": "Name"
48
+ },
49
+ "placeholder": "Select"
50
+ },
51
+ "label": "Select Collaborator",
52
+ "order": 1
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "handle_update_ticket",
3
+ "type": "CHAINED",
4
+ "steps": [
5
+ {
6
+ "id": "1",
7
+ "module": "DOUBLE_TICK",
8
+ "config": {
9
+ "operation": "update",
10
+ "secretKey": "EVAL -- env.DOUBLE_TICK_SECRET",
11
+ "payload": {
12
+ "ticketID": "EVAL -- ticket.data.TaskID",
13
+ "assignedTo": "EVAL -- assignee.payload.data.EmailID",
14
+ "workspaceID": "EVAL -- env.DOUBLE_TICK_WORKSPACE_ID",
15
+ "StatusID": "EVAL -- status.payload.data.ID",
16
+ "CollaboratorIDs": "EVAL -- cc.payload.data.test"
17
+ }
18
+ }
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "steps": [
3
+ {
4
+ "config": {
5
+ "as": "userDetail",
6
+ "key": "userDetail"
7
+ },
8
+ "id": "0",
9
+ "module": "CUSTOM_FIELD"
10
+ },
11
+ {
12
+ "config": {
13
+ "data": {
14
+ "id": "1",
15
+ "buttonActionText": "Next",
16
+ "fieldType": "dropDown",
17
+ "field": {
18
+ "keyForAPI": "machine",
19
+ "isRequired": true,
20
+ "label": "Select Machine",
21
+ "hint": "Select Select Machine",
22
+ "value": "",
23
+ "request": {
24
+ "method": "GET",
25
+ "url": "EVAL -- CONCAT(env.DOUBLE_TICK_URL, '/workspace/GetWorkspaceProjectsByWorkspaceID', '?WorkspaceID=', env.DOUBLE_TICK_WORKSPACE_ID)",
26
+ "headers": {
27
+ "secret-key": "EVAL -- env.DOUBLE_TICK_SECRET"
28
+ }
29
+ },
30
+ "mapper": {
31
+ "target": "Table",
32
+ "id": "ID",
33
+ "label": "ProjectName"
34
+ },
35
+ "placeholder": "Select"
36
+ },
37
+ "label": "Select Machine",
38
+ "order": 1
39
+ }
40
+ },
41
+ "id": "1",
42
+ "module": "USER_INPUT"
43
+ },
44
+ {
45
+ "config": {
46
+ "data": {
47
+ "id": "2",
48
+ "buttonActionText": "Next",
49
+ "fieldType": "checkBox",
50
+ "field": {
51
+ "keyForAPI": "reasons",
52
+ "isRequired": true,
53
+ "label": "Breakdown Reason",
54
+ "hint": "Select Breakdown Reason",
55
+ "value": "",
56
+ "request": {
57
+ "method": "GET",
58
+ "url": "EVAL -- CONCAT(env.DOUBLE_TICK_URL, '/workspace/GetWorkspaceLabelByWorkspaceID', '?WorkspaceID=', env.DOUBLE_TICK_WORKSPACE_ID)",
59
+ "headers": {
60
+ "secret-key": "EVAL -- env.DOUBLE_TICK_SECRET"
61
+ }
62
+ },
63
+ "mapper": {
64
+ "target": "Table",
65
+ "id": "ID",
66
+ "label": "Name"
67
+ },
68
+ "placeholder": "Select"
69
+ },
70
+ "label": "Breakdown Reason",
71
+ "order": 2
72
+ }
73
+ },
74
+ "id": "2",
75
+ "module": "USER_INPUT"
76
+ },
77
+ {
78
+ "config": {
79
+ "data": {
80
+ "id": "3",
81
+ "buttonActionText": "Next",
82
+ "fieldType": "inputField",
83
+ "field": {
84
+ "keyForAPI": "summary",
85
+ "isRequired": true,
86
+ "label": "Breakdown Summary",
87
+ "value": "",
88
+ "placeholder": "Type here..."
89
+ },
90
+ "inputType": "text",
91
+ "label": "Breakdown Summary",
92
+ "order": 3
93
+ }
94
+ },
95
+ "id": "3",
96
+ "module": "USER_INPUT"
97
+ },
98
+ {
99
+ "config": {
100
+ "data": {
101
+ "buttonActionText": "Done",
102
+ "fieldType": "summary",
103
+ "field": {
104
+ "hint": "",
105
+ "icon": "",
106
+ "label": "Summary",
107
+ "value": "",
108
+ "id": "sum-3-6"
109
+ },
110
+ "id": "sum-3-6",
111
+ "label": "Summary",
112
+ "order": 8,
113
+ "type": "summary"
114
+ }
115
+ },
116
+ "id": "7",
117
+ "module": "USER_INPUT"
118
+ }
119
+ ],
120
+ "name": "submit_form",
121
+ "type": "MANUAL",
122
+ "as": "input",
123
+ "meta": {
124
+ "title": "Maintenance request",
125
+ "startCollectionName": "submit_form",
126
+ "displayName": "Maintenance request",
127
+ "icon": "https://firebasestorage.googleapis.com/v0/b/mobioffice-dev.appspot.com/o/action_icon%2Fattendances.svg?alt=media&token=dd1766c8-687c-4243-8466-e26b26621dcf",
128
+ "workflowName": "demo/maintenance_request",
129
+ "mstate": true,
130
+ "responseSentToMstate": true,
131
+ "actionType": "worklog",
132
+ "name": "submit_form",
133
+ "showDone": true,
134
+ "id": "7akmz33czirblvIsLwFX",
135
+ "actionHandlerAPI": "",
136
+ "actionCompleteText": "Maintenance request send Successfully",
137
+ "require_location": false,
138
+ "order": 0
139
+ }
140
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "DOUBLE_TICK_ADMIN": "919104338810",
3
+ "DOUBLE_TICK_SECRET": "lrnQuWRvVIqrdFmSh2YhtXnPaOmtdA",
4
+ "DOUBLE_TICK_WORKSPACE_ID": 17,
5
+ "DOUBLE_TICK_WORKFLOW_ID": 21,
6
+ "DOUBLE_TICK_DEFAULT_STATUS_ID": 112,
7
+ "DOUBLE_TICK_URL": "https://dev-api.task-management.mobioffice.io/api"
8
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "maintenance_request",
3
+ "version": "v1",
4
+ "maxChainCount": 5,
5
+ "states": [
6
+ {
7
+ "name": "maintenance_request_form",
8
+ "actions": [
9
+ {
10
+ "name": "submit_form",
11
+ "on": {
12
+ "done": {
13
+ "name": "create_ticket",
14
+ "type": "ACTION"
15
+ }
16
+ }
17
+ },
18
+ {
19
+ "name": "create_ticket",
20
+ "on": {
21
+ "done": {
22
+ "name": "handle_ticket_action",
23
+ "type": "STATE"
24
+ }
25
+ }
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ "name": "handle_ticket_action",
31
+ "actions": [
32
+ {
33
+ "name": "change_status",
34
+ "on": {
35
+ "done": {
36
+ "name": "handle_update_ticket",
37
+ "type": "ACTION"
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "name": "change_assignee",
43
+ "on": {
44
+ "done": {
45
+ "name": "handle_update_ticket",
46
+ "type": "ACTION"
47
+ }
48
+ }
49
+ },
50
+ {
51
+ "name": "edit_collaborator",
52
+ "on": {
53
+ "done": {
54
+ "name": "handle_update_ticket",
55
+ "type": "ACTION"
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "name": "add_photo",
61
+ "on": {
62
+ "done": {
63
+ "name": "handle_ticket_action",
64
+ "type": "STATE"
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "name": "handle_update_ticket",
70
+ "on": {
71
+ "done": {
72
+ "name": "handle_ticket_action",
73
+ "type": "STATE"
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "name": "final",
81
+ "actions": []
82
+ }
83
+ ]
84
+ }