@activepieces/piece-dub 0.0.2 → 0.0.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.
- package/package.json +7 -12
- package/src/index.js +33 -42
- package/src/index.d.ts +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-link.d.ts +0 -28
- package/src/lib/actions/create-link.js +0 -222
- package/src/lib/actions/create-link.js.map +0 -1
- package/src/lib/actions/delete-link.d.ts +0 -3
- package/src/lib/actions/delete-link.js +0 -35
- package/src/lib/actions/delete-link.js.map +0 -1
- package/src/lib/actions/get-link.d.ts +0 -7
- package/src/lib/actions/get-link.js +0 -84
- package/src/lib/actions/get-link.js.map +0 -1
- package/src/lib/actions/list-links.d.ts +0 -10
- package/src/lib/actions/list-links.js +0 -105
- package/src/lib/actions/list-links.js.map +0 -1
- package/src/lib/actions/update-link.d.ts +0 -27
- package/src/lib/actions/update-link.js +0 -209
- package/src/lib/actions/update-link.js.map +0 -1
- package/src/lib/auth.d.ts +0 -2
- package/src/lib/auth.js +0 -56
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/common.d.ts +0 -53
- package/src/lib/common/common.js +0 -26
- package/src/lib/common/common.js.map +0 -1
- package/src/lib/triggers/link-clicked.d.ts +0 -10
- package/src/lib/triggers/link-clicked.js +0 -76
- package/src/lib/triggers/link-clicked.js.map +0 -1
- package/src/lib/triggers/link-created.d.ts +0 -10
- package/src/lib/triggers/link-created.js +0 -62
- package/src/lib/triggers/link-created.js.map +0 -1
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLink = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
exports.createLink = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'create_link',
|
|
10
|
-
displayName: 'Create Link',
|
|
11
|
-
description: 'Create a new shortened link in your Dub workspace.',
|
|
12
|
-
auth: auth_1.dubAuth,
|
|
13
|
-
props: {
|
|
14
|
-
url: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Destination URL',
|
|
16
|
-
description: 'The full destination URL the short link should redirect to.',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
domain: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Domain',
|
|
21
|
-
description: 'The domain to use for the short link (e.g. `dub.sh`). If omitted, the primary workspace domain is used.',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
key: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Short Link Slug',
|
|
26
|
-
description: 'Custom slug for the short link (e.g. `my-promo`). If omitted, a random 7-character slug is generated.',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
externalId: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'External ID',
|
|
31
|
-
description: 'Your internal database ID for this link. Must be unique per workspace. Useful for looking up the link later.',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
title: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Title',
|
|
36
|
-
description: 'A human-readable title for the link (used in the Dub dashboard).',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
description: pieces_framework_1.Property.LongText({
|
|
40
|
-
displayName: 'Description',
|
|
41
|
-
description: 'A short description of what the link points to.',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
image: pieces_framework_1.Property.ShortText({
|
|
45
|
-
displayName: 'OG Image URL',
|
|
46
|
-
description: 'Custom link preview image (og:image). Used when Custom Link Previews (`proxy`) is enabled.',
|
|
47
|
-
required: false,
|
|
48
|
-
}),
|
|
49
|
-
video: pieces_framework_1.Property.ShortText({
|
|
50
|
-
displayName: 'OG Video URL',
|
|
51
|
-
description: 'Custom link preview video (og:video). Used when Custom Link Previews (`proxy`) is enabled.',
|
|
52
|
-
required: false,
|
|
53
|
-
}),
|
|
54
|
-
tags: pieces_framework_1.Property.Array({
|
|
55
|
-
displayName: 'Tag Names',
|
|
56
|
-
description: 'List of tag names to attach to this link.',
|
|
57
|
-
required: false,
|
|
58
|
-
}),
|
|
59
|
-
folderId: pieces_framework_1.Property.ShortText({
|
|
60
|
-
displayName: 'Folder ID',
|
|
61
|
-
description: 'The unique ID of an existing folder to assign this link to.',
|
|
62
|
-
required: false,
|
|
63
|
-
}),
|
|
64
|
-
expiresAt: pieces_framework_1.Property.ShortText({
|
|
65
|
-
displayName: 'Expires At',
|
|
66
|
-
description: 'ISO 8601 datetime when the link should expire (e.g. `2025-12-31T23:59:59Z`). Expired links redirect to the expiration URL.',
|
|
67
|
-
required: false,
|
|
68
|
-
}),
|
|
69
|
-
expiredUrl: pieces_framework_1.Property.ShortText({
|
|
70
|
-
displayName: 'Expired URL',
|
|
71
|
-
description: 'URL to redirect to after the link expires.',
|
|
72
|
-
required: false,
|
|
73
|
-
}),
|
|
74
|
-
password: pieces_framework_1.Property.ShortText({
|
|
75
|
-
displayName: 'Password',
|
|
76
|
-
description: 'Password-protect the link. Visitors must enter this password before being redirected.',
|
|
77
|
-
required: false,
|
|
78
|
-
}),
|
|
79
|
-
trackConversion: pieces_framework_1.Property.Checkbox({
|
|
80
|
-
displayName: 'Track Conversions',
|
|
81
|
-
description: 'Whether to track conversions for this link.',
|
|
82
|
-
required: false,
|
|
83
|
-
defaultValue: false,
|
|
84
|
-
}),
|
|
85
|
-
proxy: pieces_framework_1.Property.Checkbox({
|
|
86
|
-
displayName: 'Custom Link Previews',
|
|
87
|
-
description: 'Enable Custom Link Previews (og:title, og:description, og:image) for this link.',
|
|
88
|
-
required: false,
|
|
89
|
-
defaultValue: false,
|
|
90
|
-
}),
|
|
91
|
-
rewrite: pieces_framework_1.Property.Checkbox({
|
|
92
|
-
displayName: 'Cloaked URL (URL Rewriting)',
|
|
93
|
-
description: 'Cloak the destination URL — visitors see the short link URL in the browser.',
|
|
94
|
-
required: false,
|
|
95
|
-
defaultValue: false,
|
|
96
|
-
}),
|
|
97
|
-
doIndex: pieces_framework_1.Property.Checkbox({
|
|
98
|
-
displayName: 'Allow Search Engine Indexing',
|
|
99
|
-
description: 'Allow search engines to index this short link.',
|
|
100
|
-
required: false,
|
|
101
|
-
defaultValue: false,
|
|
102
|
-
}),
|
|
103
|
-
archived: pieces_framework_1.Property.Checkbox({
|
|
104
|
-
displayName: 'Archived',
|
|
105
|
-
description: 'Archive this link immediately after creation.',
|
|
106
|
-
required: false,
|
|
107
|
-
defaultValue: false,
|
|
108
|
-
}),
|
|
109
|
-
ios: pieces_framework_1.Property.ShortText({
|
|
110
|
-
displayName: 'iOS Redirect URL',
|
|
111
|
-
description: 'Redirect iOS device visitors to this URL instead.',
|
|
112
|
-
required: false,
|
|
113
|
-
}),
|
|
114
|
-
android: pieces_framework_1.Property.ShortText({
|
|
115
|
-
displayName: 'Android Redirect URL',
|
|
116
|
-
description: 'Redirect Android device visitors to this URL instead.',
|
|
117
|
-
required: false,
|
|
118
|
-
}),
|
|
119
|
-
comments: pieces_framework_1.Property.LongText({
|
|
120
|
-
displayName: 'Comments',
|
|
121
|
-
description: 'Internal notes about this link (not shown to visitors).',
|
|
122
|
-
required: false,
|
|
123
|
-
}),
|
|
124
|
-
// UTM parameters
|
|
125
|
-
utm_source: pieces_framework_1.Property.ShortText({
|
|
126
|
-
displayName: 'UTM Source',
|
|
127
|
-
description: 'UTM source parameter (e.g. `newsletter`, `twitter`).',
|
|
128
|
-
required: false,
|
|
129
|
-
}),
|
|
130
|
-
utm_medium: pieces_framework_1.Property.ShortText({
|
|
131
|
-
displayName: 'UTM Medium',
|
|
132
|
-
description: 'UTM medium parameter (e.g. `email`, `social`).',
|
|
133
|
-
required: false,
|
|
134
|
-
}),
|
|
135
|
-
utm_campaign: pieces_framework_1.Property.ShortText({
|
|
136
|
-
displayName: 'UTM Campaign',
|
|
137
|
-
description: 'UTM campaign parameter (e.g. `spring-sale`).',
|
|
138
|
-
required: false,
|
|
139
|
-
}),
|
|
140
|
-
utm_term: pieces_framework_1.Property.ShortText({
|
|
141
|
-
displayName: 'UTM Term',
|
|
142
|
-
description: 'UTM term parameter for paid search keywords.',
|
|
143
|
-
required: false,
|
|
144
|
-
}),
|
|
145
|
-
utm_content: pieces_framework_1.Property.ShortText({
|
|
146
|
-
displayName: 'UTM Content',
|
|
147
|
-
description: 'UTM content parameter for A/B testing.',
|
|
148
|
-
required: false,
|
|
149
|
-
}),
|
|
150
|
-
},
|
|
151
|
-
run(context) {
|
|
152
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const { auth, propsValue } = context;
|
|
154
|
-
// Build body, omitting undefined/null/empty values
|
|
155
|
-
const body = {
|
|
156
|
-
url: propsValue.url,
|
|
157
|
-
};
|
|
158
|
-
if (propsValue.domain)
|
|
159
|
-
body['domain'] = propsValue.domain;
|
|
160
|
-
if (propsValue.key)
|
|
161
|
-
body['key'] = propsValue.key;
|
|
162
|
-
if (propsValue.externalId)
|
|
163
|
-
body['externalId'] = propsValue.externalId;
|
|
164
|
-
if (propsValue.title)
|
|
165
|
-
body['title'] = propsValue.title;
|
|
166
|
-
if (propsValue.description)
|
|
167
|
-
body['description'] = propsValue.description;
|
|
168
|
-
if (propsValue.image)
|
|
169
|
-
body['image'] = propsValue.image;
|
|
170
|
-
if (propsValue.video)
|
|
171
|
-
body['video'] = propsValue.video;
|
|
172
|
-
if (propsValue.tags && propsValue.tags.length > 0) {
|
|
173
|
-
body['tagNames'] = propsValue.tags;
|
|
174
|
-
}
|
|
175
|
-
if (propsValue.folderId)
|
|
176
|
-
body['folderId'] = propsValue.folderId;
|
|
177
|
-
if (propsValue.expiresAt)
|
|
178
|
-
body['expiresAt'] = propsValue.expiresAt;
|
|
179
|
-
if (propsValue.expiredUrl)
|
|
180
|
-
body['expiredUrl'] = propsValue.expiredUrl;
|
|
181
|
-
if (propsValue.password)
|
|
182
|
-
body['password'] = propsValue.password;
|
|
183
|
-
if (propsValue.trackConversion)
|
|
184
|
-
body['trackConversion'] = propsValue.trackConversion;
|
|
185
|
-
if (propsValue.proxy)
|
|
186
|
-
body['proxy'] = propsValue.proxy;
|
|
187
|
-
if (propsValue.rewrite)
|
|
188
|
-
body['rewrite'] = propsValue.rewrite;
|
|
189
|
-
if (propsValue.doIndex)
|
|
190
|
-
body['doIndex'] = propsValue.doIndex;
|
|
191
|
-
if (propsValue.archived)
|
|
192
|
-
body['archived'] = propsValue.archived;
|
|
193
|
-
if (propsValue.ios)
|
|
194
|
-
body['ios'] = propsValue.ios;
|
|
195
|
-
if (propsValue.android)
|
|
196
|
-
body['android'] = propsValue.android;
|
|
197
|
-
if (propsValue.comments)
|
|
198
|
-
body['comments'] = propsValue.comments;
|
|
199
|
-
if (propsValue.utm_source)
|
|
200
|
-
body['utm_source'] = propsValue.utm_source;
|
|
201
|
-
if (propsValue.utm_medium)
|
|
202
|
-
body['utm_medium'] = propsValue.utm_medium;
|
|
203
|
-
if (propsValue.utm_campaign)
|
|
204
|
-
body['utm_campaign'] = propsValue.utm_campaign;
|
|
205
|
-
if (propsValue.utm_term)
|
|
206
|
-
body['utm_term'] = propsValue.utm_term;
|
|
207
|
-
if (propsValue.utm_content)
|
|
208
|
-
body['utm_content'] = propsValue.utm_content;
|
|
209
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
210
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
211
|
-
url: `${auth_1.DUB_API_BASE}/links`,
|
|
212
|
-
headers: {
|
|
213
|
-
Authorization: `Bearer ${auth.secret_text}`,
|
|
214
|
-
'Content-Type': 'application/json',
|
|
215
|
-
},
|
|
216
|
-
body,
|
|
217
|
-
});
|
|
218
|
-
return response.body;
|
|
219
|
-
});
|
|
220
|
-
},
|
|
221
|
-
});
|
|
222
|
-
//# sourceMappingURL=create-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAgD;AAGnC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,oDAAoD;IACjE,IAAI,EAAE,cAAO;IACb,KAAK,EAAE;QACL,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,6DAA6D;YAC1E,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,yGAAyG;YAC3G,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EACT,uGAAuG;YACzG,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,8GAA8G;YAChH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,4FAA4F;YACz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AAU;gBAAE,IAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC;YACtE,IAAI,UAAU,CAAC,YAAY;gBAAE,IAAI,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC;YAC5E,IAAI,UAAU,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC;YAChE,IAAI,UAAU,CAAC,WAAW;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC;YAEzE,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAU;gBACrD,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,mBAAY,QAAQ;gBAC5B,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;oBAC3C,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteLink = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
exports.deleteLink = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'delete_link',
|
|
10
|
-
displayName: 'Delete Link',
|
|
11
|
-
description: 'Permanently delete a Dub link. This action cannot be undone.',
|
|
12
|
-
auth: auth_1.dubAuth,
|
|
13
|
-
props: {
|
|
14
|
-
linkId: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Link ID',
|
|
16
|
-
description: 'The ID of the link to delete (e.g. `clv3g2...`). Find this from the Create Link or List Links actions.',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const { auth, propsValue } = context;
|
|
23
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
24
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
25
|
-
url: `${auth_1.DUB_API_BASE}/links/${propsValue.linkId}`,
|
|
26
|
-
headers: {
|
|
27
|
-
Authorization: `Bearer ${auth.secret_text}`,
|
|
28
|
-
'Content-Type': 'application/json',
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
return response.body;
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=delete-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAgD;AAEnC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8DAA8D;IAC3E,IAAI,EAAE,cAAO;IACb,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,wGAAwG;YACrH,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;YAErC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiB;gBAC5D,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,GAAG,mBAAY,UAAU,UAAU,CAAC,MAAM,EAAE;gBACjD,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;oBAC3C,cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const getLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
lookupMethod: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
3
|
-
linkId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
externalId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
}>;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLink = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
exports.getLink = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'get_link',
|
|
10
|
-
displayName: 'Get Link',
|
|
11
|
-
description: 'Retrieve details of a specific Dub link by its ID, external ID, or domain + key.',
|
|
12
|
-
auth: auth_1.dubAuth,
|
|
13
|
-
props: {
|
|
14
|
-
lookupMethod: pieces_framework_1.Property.StaticDropdown({
|
|
15
|
-
displayName: 'Look Up By',
|
|
16
|
-
description: 'How to identify the link you want to retrieve.',
|
|
17
|
-
required: true,
|
|
18
|
-
defaultValue: 'linkId',
|
|
19
|
-
options: {
|
|
20
|
-
options: [
|
|
21
|
-
{ label: 'Link ID', value: 'linkId' },
|
|
22
|
-
{ label: 'External ID', value: 'externalId' },
|
|
23
|
-
{ label: 'Domain + Key', value: 'domainKey' },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
}),
|
|
27
|
-
linkId: pieces_framework_1.Property.ShortText({
|
|
28
|
-
displayName: 'Link ID',
|
|
29
|
-
description: 'The Dub-generated link ID (e.g. `clv3g2...`). Used when Look Up By = Link ID.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
externalId: pieces_framework_1.Property.ShortText({
|
|
33
|
-
displayName: 'External ID',
|
|
34
|
-
description: 'Your internal ID for the link. Pass with prefix `ext_` (e.g. `ext_123456`). Used when Look Up By = External ID.',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
domain: pieces_framework_1.Property.ShortText({
|
|
38
|
-
displayName: 'Domain',
|
|
39
|
-
description: 'The domain of the link (e.g. `dub.sh`). Used when Look Up By = Domain + Key.',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
key: pieces_framework_1.Property.ShortText({
|
|
43
|
-
displayName: 'Key (Slug)',
|
|
44
|
-
description: 'The slug of the link (e.g. `my-promo`). Used when Look Up By = Domain + Key.',
|
|
45
|
-
required: false,
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
run(context) {
|
|
49
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const { auth, propsValue } = context;
|
|
51
|
-
const { lookupMethod, linkId, externalId, domain, key } = propsValue;
|
|
52
|
-
let url;
|
|
53
|
-
switch (lookupMethod) {
|
|
54
|
-
case 'linkId':
|
|
55
|
-
if (!linkId)
|
|
56
|
-
throw new Error('Link ID is required when Look Up By = Link ID.');
|
|
57
|
-
url = `${auth_1.DUB_API_BASE}/links/${linkId}`;
|
|
58
|
-
break;
|
|
59
|
-
case 'externalId':
|
|
60
|
-
if (!externalId)
|
|
61
|
-
throw new Error('External ID is required when Look Up By = External ID.');
|
|
62
|
-
url = `${auth_1.DUB_API_BASE}/links/info?externalId=${encodeURIComponent(externalId)}`;
|
|
63
|
-
break;
|
|
64
|
-
case 'domainKey':
|
|
65
|
-
if (!domain || !key)
|
|
66
|
-
throw new Error('Both Domain and Key are required when Look Up By = Domain + Key.');
|
|
67
|
-
url = `${auth_1.DUB_API_BASE}/links/info?domain=${encodeURIComponent(domain)}&key=${encodeURIComponent(key)}`;
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
throw new Error(`Unsupported lookup method: ${lookupMethod}`);
|
|
71
|
-
}
|
|
72
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
73
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
74
|
-
url,
|
|
75
|
-
headers: {
|
|
76
|
-
Authorization: `Bearer ${auth.secret_text}`,
|
|
77
|
-
'Content-Type': 'application/json',
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
return response.body;
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=get-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAgD;AAGnC,QAAA,OAAO,GAAG,IAAA,+BAAY,EAAC;IAClC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,kFAAkF;IAC/F,IAAI,EAAE,cAAO;IACb,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACpC,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACrC,EAAE,KA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,EAAE,CAAC;oBAChF,MAAM;gBACR,KAAK,WAAW;oBACd,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG;wBACjB,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;oBACtF,GAAG,GAAG,GAAG,mBAAY,sBAAsB,kBAAkB,CAAC,MAAM,CAAC,QAAQ,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACvG,MAAM;gBACR;oBACE,MAAM,IAAI,KAAK,CAAC,8BAA8B,YAAY,EAAE,CAAC,CAAC;YAClE,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAU;gBACrD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG;gBACH,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;oBAC3C,cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const listLinks: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
3
|
-
tagNames: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
4
|
-
search: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
userId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
showArchived: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
page: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
pageSize: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
9
|
-
sort: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
10
|
-
}>;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listLinks = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
exports.listLinks = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'list_links',
|
|
10
|
-
displayName: 'List Links',
|
|
11
|
-
description: 'Retrieve a paginated list of links in your Dub workspace.',
|
|
12
|
-
auth: auth_1.dubAuth,
|
|
13
|
-
props: {
|
|
14
|
-
domain: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Domain Filter',
|
|
16
|
-
description: 'Filter by a specific domain (e.g. `dub.sh`). Leave empty to return all domains.',
|
|
17
|
-
required: false,
|
|
18
|
-
}),
|
|
19
|
-
tagNames: pieces_framework_1.Property.Array({
|
|
20
|
-
displayName: 'Tag Name Filter',
|
|
21
|
-
description: 'Filter by one or more tag names.',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
search: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Search Query',
|
|
26
|
-
description: 'Search links by their URL, title, or slug.',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
userId: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'User ID Filter',
|
|
31
|
-
description: 'Filter links created by a specific user ID.',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
showArchived: pieces_framework_1.Property.Checkbox({
|
|
35
|
-
displayName: 'Include Archived Links',
|
|
36
|
-
description: 'Whether to include archived links in the results.',
|
|
37
|
-
required: false,
|
|
38
|
-
defaultValue: false,
|
|
39
|
-
}),
|
|
40
|
-
page: pieces_framework_1.Property.Number({
|
|
41
|
-
displayName: 'Page',
|
|
42
|
-
description: 'Page number for pagination (starts at 1).',
|
|
43
|
-
required: false,
|
|
44
|
-
defaultValue: 1,
|
|
45
|
-
}),
|
|
46
|
-
pageSize: pieces_framework_1.Property.Number({
|
|
47
|
-
displayName: 'Page Size',
|
|
48
|
-
description: 'Number of links to return per page (1–100). Default is 100.',
|
|
49
|
-
required: false,
|
|
50
|
-
defaultValue: 100,
|
|
51
|
-
}),
|
|
52
|
-
sort: pieces_framework_1.Property.StaticDropdown({
|
|
53
|
-
displayName: 'Sort By',
|
|
54
|
-
description: 'Field to sort results by.',
|
|
55
|
-
required: false,
|
|
56
|
-
defaultValue: 'createdAt',
|
|
57
|
-
options: {
|
|
58
|
-
options: [
|
|
59
|
-
{ label: 'Created At (newest first)', value: 'createdAt' },
|
|
60
|
-
{ label: 'Clicks (most clicks first)', value: 'clicks' },
|
|
61
|
-
{ label: 'Last Clicked', value: 'lastClicked' },
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
run(context) {
|
|
67
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const { auth, propsValue } = context;
|
|
69
|
-
// Use URLSearchParams so we can append multiple tagName values
|
|
70
|
-
const params = new URLSearchParams();
|
|
71
|
-
if (propsValue.domain)
|
|
72
|
-
params.set('domain', propsValue.domain);
|
|
73
|
-
if (propsValue.search)
|
|
74
|
-
params.set('search', propsValue.search);
|
|
75
|
-
if (propsValue.userId)
|
|
76
|
-
params.set('userId', propsValue.userId);
|
|
77
|
-
if (propsValue.showArchived)
|
|
78
|
-
params.set('showArchived', 'true');
|
|
79
|
-
if (propsValue.page)
|
|
80
|
-
params.set('page', String(propsValue.page));
|
|
81
|
-
if (propsValue.pageSize)
|
|
82
|
-
params.set('pageSize', String(propsValue.pageSize));
|
|
83
|
-
if (propsValue.sort)
|
|
84
|
-
params.set('sort', propsValue.sort);
|
|
85
|
-
// Append each tag as a separate tagName param so all survive serialisation
|
|
86
|
-
if (propsValue.tagNames && propsValue.tagNames.length > 0) {
|
|
87
|
-
for (const tag of propsValue.tagNames) {
|
|
88
|
-
params.append('tagName', tag);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const queryString = params.toString();
|
|
92
|
-
const url = `${auth_1.DUB_API_BASE}/links${queryString ? `?${queryString}` : ''}`;
|
|
93
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
94
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
95
|
-
url,
|
|
96
|
-
headers: {
|
|
97
|
-
Authorization: `Bearer ${auth.secret_text}`,
|
|
98
|
-
'Content-Type': 'application/json',
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
return response.body;
|
|
102
|
-
});
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
//# sourceMappingURL=list-links.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-links.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-links.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAgD;AAEnC,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,2DAA2D;IACxE,IAAI,EAAE,cAAO;IACb,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,iFAAiF;YAC9F,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACvB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,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cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const updateLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
linkId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
7
|
-
image: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
video: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
10
|
-
folderId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
expiresAt: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
expiredUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
password: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
-
trackConversion: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
15
|
-
proxy: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
16
|
-
rewrite: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
17
|
-
doIndex: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
18
|
-
archived: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
19
|
-
ios: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
-
android: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
21
|
-
comments: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
22
|
-
utm_source: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
23
|
-
utm_medium: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
24
|
-
utm_campaign: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
25
|
-
utm_term: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
26
|
-
utm_content: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
27
|
-
}>;
|