-
Notifications
You must be signed in to change notification settings - Fork 13
/
parameters.ts
186 lines (181 loc) · 5.41 KB
/
parameters.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import { getWorkflowSubmissionUrl } from "./utils/getWorkflowSubmissionUrl";
// Sample parameters to test the nodemaker CLI or to replace with your own.
export const metaParameters: MetaParameters = {
serviceName: "Nodemaker News",
authType: "OAuth2",
nodeColor: "#ff6600",
apiUrl: "http://api.nodemaker.com/",
};
export const regularNodeParameters: RegularNodeParameters = {
Article: [
{
name: "Get",
description: "Get a Nodemaker News article",
endpoint: "articles/:articleId",
requestMethod: "GET",
fields: [
{
name: "Article ID",
description: "The ID of the Nodemaker News article to be returned",
type: "string",
default: "",
},
{
name: "Additional Fields",
type: "collection",
description: "",
default: {},
options: [
{
name: "Include comments",
type: "boolean",
default: false,
description: "Whether to include all the comments in the article",
},
],
},
],
},
{
name: "Get All",
description: "Get all Nodemaker News articles",
endpoint: "search?",
requestMethod: "GET",
fields: [
{
name: "Return All",
description: "Whether to return all results or only up to a limit",
type: "boolean",
default: false,
},
{
name: "Limit",
description:
"Limit of Nodemaker News articles to be returned for the query",
type: "number",
default: 5,
extraDisplayRestriction: { "Return All": true },
},
{
name: "Additional Fields",
type: "collection",
description: "",
default: {},
options: [
{
name: "Keyword",
description: "The keyword for filtering the results of the query",
type: "multiOptions",
default: "",
options: [
{
name: "Feature1",
description: "Some description",
},
{
name: "Feature2",
description: "Some other description",
},
],
},
{
name: "Tags",
description: "Tags for filtering the results of the query",
type: "multiOptions",
default: {},
options: [
{
name: "Story",
description: "Returns query results filtered by story tag",
},
{
name: "Comment",
description: "Returns query results filtered by comment tag",
},
{
name: "Poll",
description: "Returns query results filtered by poll tag",
},
{
name: "Show Nodemaker News",
description: "Returns query results filtered by Show HN tag",
},
{
name: "Ask Nodemaker News",
description: "Returns query results filtered by Ask HN tag",
},
{
name: "Front Page",
description:
"Returns query results filtered by Front Page tag",
},
],
},
],
},
],
},
],
User: [
{
name: "Get",
description: "Get a Nodemaker News user",
endpoint: "users/:username",
requestMethod: "GET",
fields: [
{
name: "Username",
description: "The Nodemaker News user to be returned",
type: "string",
default: "",
},
],
},
],
};
export const docsParameters: DocsParameters = {
serviceName: "Nodemaker News",
serviceUrl: "https://news.ycombinator.com",
introDescription:
"a social news website focusing on computer science and entrepreneurship",
exampleUsage: "get an article from Nodemaker News",
workflowUrl: getWorkflowSubmissionUrl(),
};
export const triggerNodeParameters: TriggerNodeParameters = {
webhookEndpoint: "/automations/hooks",
webhookProperties: [
{
displayName: "Event",
name: "event",
type: "options",
required: true,
default: "subscriberActivated",
description:
"The events that can trigger the webhook and whether they are enabled.",
options: [
{
name: "Subscriber Activated",
value: "subscriberActivated",
description:
"Whether the webhook is triggered when a subscriber is activated.",
},
{
name: "Link Clicked",
value: "linkClicked",
description:
"Whether the webhook is triggered when a link is clicked.",
fields: [
{
displayName: "Initiating Link",
name: "link",
type: "string",
required: true,
default: "",
description: "The URL of the initiating link",
},
],
},
],
},
],
};