@agnocon/piece-bitly 0.1.7
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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/archive-bitlink.d.ts +11 -0
- package/dist/lib/actions/archive-bitlink.d.ts.map +1 -0
- package/dist/lib/actions/archive-bitlink.js +54 -0
- package/dist/lib/actions/archive-bitlink.js.map +1 -0
- package/dist/lib/actions/create-bitlink.d.ts +34 -0
- package/dist/lib/actions/create-bitlink.d.ts.map +1 -0
- package/dist/lib/actions/create-bitlink.js +134 -0
- package/dist/lib/actions/create-bitlink.js.map +1 -0
- package/dist/lib/actions/create-qr-code.d.ts +39 -0
- package/dist/lib/actions/create-qr-code.d.ts.map +1 -0
- package/dist/lib/actions/create-qr-code.js +383 -0
- package/dist/lib/actions/create-qr-code.js.map +1 -0
- package/dist/lib/actions/get-bitlink-details.d.ts +11 -0
- package/dist/lib/actions/get-bitlink-details.d.ts.map +1 -0
- package/dist/lib/actions/get-bitlink-details.js +50 -0
- package/dist/lib/actions/get-bitlink-details.js.map +1 -0
- package/dist/lib/actions/update-bitlink.d.ts +18 -0
- package/dist/lib/actions/update-bitlink.d.ts.map +1 -0
- package/dist/lib/actions/update-bitlink.js +135 -0
- package/dist/lib/actions/update-bitlink.js.map +1 -0
- package/dist/lib/common/auth.d.ts +4 -0
- package/dist/lib/common/auth.d.ts.map +1 -0
- package/dist/lib/common/auth.js +44 -0
- package/dist/lib/common/auth.js.map +1 -0
- package/dist/lib/common/client.d.ts +13 -0
- package/dist/lib/common/client.d.ts.map +1 -0
- package/dist/lib/common/client.js +69 -0
- package/dist/lib/common/client.js.map +1 -0
- package/dist/lib/common/props.d.ts +10 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +118 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/triggers/new-bitlink-created.d.ts +43 -0
- package/dist/lib/triggers/new-bitlink-created.d.ts.map +1 -0
- package/dist/lib/triggers/new-bitlink-created.js +312 -0
- package/dist/lib/triggers/new-bitlink-created.js.map +1 -0
- package/package.json +46 -0
- package/src/index.ts +38 -0
- package/src/lib/actions/archive-bitlink.ts +59 -0
- package/src/lib/actions/create-bitlink.ts +158 -0
- package/src/lib/actions/create-qr-code.ts +398 -0
- package/src/lib/actions/get-bitlink-details.ts +54 -0
- package/src/lib/actions/update-bitlink.ts +153 -0
- package/src/lib/common/auth.ts +37 -0
- package/src/lib/common/client.ts +122 -0
- package/src/lib/common/props.ts +123 -0
- package/src/lib/triggers/new-bitlink-created.ts +361 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createQrCodeAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bitly/src/lib/actions/create-qr-code.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
8
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const auth_1 = require("../common/auth");
|
|
11
|
+
const props_1 = require("../common/props");
|
|
12
|
+
exports.createQrCodeAction = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.bitlyAuth,
|
|
14
|
+
name: 'create_qr_code',
|
|
15
|
+
displayName: 'Create QR Code',
|
|
16
|
+
description: 'Generate a customized QR code for a Bitlink.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Creates a styled QR code that points either to a raw long URL or to an existing Bitlink (selected via the destination type), with extensive optional customization of colors, dot patterns, corners, gradients, frames, branding, and error correction. Use to generate a scannable QR for a destination. Not idempotent: each call creates a new QR code.', idempotent: false },
|
|
19
|
+
props: {
|
|
20
|
+
group_guid: props_1.groupGuid,
|
|
21
|
+
destination_type: pieces_framework_1.Property.StaticDropdown({
|
|
22
|
+
displayName: 'Destination Type',
|
|
23
|
+
required: true,
|
|
24
|
+
defaultValue: 'long_url',
|
|
25
|
+
options: {
|
|
26
|
+
options: [
|
|
27
|
+
{ label: 'Long URL', value: 'long_url' },
|
|
28
|
+
{ label: 'Existing Bitlink', value: 'bitlink_id' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
destination: pieces_framework_1.Property.DynamicProperties({
|
|
33
|
+
auth: auth_1.bitlyAuth,
|
|
34
|
+
displayName: 'Destination',
|
|
35
|
+
required: true,
|
|
36
|
+
refreshers: ['destination_type'],
|
|
37
|
+
props: (propsValue) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const destination_type = propsValue['destination_type'];
|
|
39
|
+
const props = {};
|
|
40
|
+
if (destination_type === 'long_url') {
|
|
41
|
+
props['long_url'] = pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'Long URL',
|
|
43
|
+
required: true,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
else if (destination_type === 'bitlink_id') {
|
|
47
|
+
props['bitlink_id'] = pieces_framework_1.Property.ShortText({
|
|
48
|
+
displayName: 'Bitlink (e.g., bit.ly/xyz)',
|
|
49
|
+
required: true,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return props;
|
|
53
|
+
}),
|
|
54
|
+
}),
|
|
55
|
+
title: pieces_framework_1.Property.ShortText({
|
|
56
|
+
displayName: 'Title',
|
|
57
|
+
description: 'Internal title for the QR Code.',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
archived: pieces_framework_1.Property.Checkbox({
|
|
61
|
+
displayName: 'Archive on Create',
|
|
62
|
+
description: 'Archive the QR code upon creation.',
|
|
63
|
+
required: false,
|
|
64
|
+
}),
|
|
65
|
+
background_color: pieces_framework_1.Property.ShortText({
|
|
66
|
+
displayName: 'Style: Background Color',
|
|
67
|
+
description: 'Hex code (e.g., #FFFFFF)',
|
|
68
|
+
required: false,
|
|
69
|
+
}),
|
|
70
|
+
dot_pattern_color: pieces_framework_1.Property.ShortText({
|
|
71
|
+
displayName: 'Style: Dot Pattern Color',
|
|
72
|
+
description: 'Hex code (e.g., #000000)',
|
|
73
|
+
required: false,
|
|
74
|
+
}),
|
|
75
|
+
dot_pattern_type: pieces_framework_1.Property.StaticDropdown({
|
|
76
|
+
displayName: 'Style: Dot Pattern Type',
|
|
77
|
+
required: false,
|
|
78
|
+
options: {
|
|
79
|
+
options: [
|
|
80
|
+
{ label: 'Standard', value: 'standard' },
|
|
81
|
+
{ label: 'Circle', value: 'circle' },
|
|
82
|
+
{ label: 'Block', value: 'block' },
|
|
83
|
+
{ label: 'Blob', value: 'blob' },
|
|
84
|
+
{ label: 'Rounded', value: 'rounded' },
|
|
85
|
+
{ label: 'Vertical', value: 'vertical' },
|
|
86
|
+
{ label: 'Horizontal', value: 'horizontal' },
|
|
87
|
+
{ label: 'Triangle', value: 'triangle' },
|
|
88
|
+
{ label: 'Heart', value: 'heart' },
|
|
89
|
+
{ label: 'Star', value: 'star' },
|
|
90
|
+
{ label: 'Diamond', value: 'diamond' },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
}),
|
|
94
|
+
corner_1_shape: pieces_framework_1.Property.StaticDropdown({
|
|
95
|
+
displayName: 'Corner 1 (Top-Left): Shape',
|
|
96
|
+
required: false,
|
|
97
|
+
options: {
|
|
98
|
+
options: [
|
|
99
|
+
{ label: 'Standard', value: 'standard' },
|
|
100
|
+
{ label: 'Slightly Round', value: 'slightly_round' },
|
|
101
|
+
{ label: 'Rounded', value: 'rounded' },
|
|
102
|
+
{ label: 'Extra Round', value: 'extra_round' },
|
|
103
|
+
{ label: 'Leaf', value: 'leaf' },
|
|
104
|
+
{ label: 'Leaf Inner', value: 'leaf_inner' },
|
|
105
|
+
{ label: 'Leaf Outer', value: 'leaf_outer' },
|
|
106
|
+
{ label: 'Target', value: 'target' },
|
|
107
|
+
{ label: 'Concave', value: 'concave' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
}),
|
|
111
|
+
corner_1_inner_color: pieces_framework_1.Property.ShortText({
|
|
112
|
+
displayName: 'Corner 1 (Top-Left): Inner Color',
|
|
113
|
+
required: false,
|
|
114
|
+
}),
|
|
115
|
+
corner_1_outer_color: pieces_framework_1.Property.ShortText({
|
|
116
|
+
displayName: 'Corner 1 (Top-Left): Outer Color',
|
|
117
|
+
required: false,
|
|
118
|
+
}),
|
|
119
|
+
corner_2_shape: pieces_framework_1.Property.StaticDropdown({
|
|
120
|
+
displayName: 'Corner 2 (Top-Right): Shape',
|
|
121
|
+
required: false,
|
|
122
|
+
options: {
|
|
123
|
+
options: [
|
|
124
|
+
{ label: 'Standard', value: 'standard' },
|
|
125
|
+
{ label: 'Slightly Round', value: 'slightly_round' },
|
|
126
|
+
{ label: 'Rounded', value: 'rounded' },
|
|
127
|
+
{ label: 'Extra Round', value: 'extra_round' },
|
|
128
|
+
{ label: 'Leaf', value: 'leaf' },
|
|
129
|
+
{ label: 'Leaf Inner', value: 'leaf_inner' },
|
|
130
|
+
{ label: 'Leaf Outer', value: 'leaf_outer' },
|
|
131
|
+
{ label: 'Target', value: 'target' },
|
|
132
|
+
{ label: 'Concave', value: 'concave' },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
}),
|
|
136
|
+
corner_2_inner_color: pieces_framework_1.Property.ShortText({
|
|
137
|
+
displayName: 'Corner 2 (Top-Right): Inner Color',
|
|
138
|
+
required: false,
|
|
139
|
+
}),
|
|
140
|
+
corner_2_outer_color: pieces_framework_1.Property.ShortText({
|
|
141
|
+
displayName: 'Corner 2 (Top-Right): Outer Color',
|
|
142
|
+
required: false,
|
|
143
|
+
}),
|
|
144
|
+
corner_3_shape: pieces_framework_1.Property.StaticDropdown({
|
|
145
|
+
displayName: 'Corner 3 (Bottom-Right): Shape',
|
|
146
|
+
required: false,
|
|
147
|
+
options: {
|
|
148
|
+
options: [
|
|
149
|
+
{ label: 'Standard', value: 'standard' },
|
|
150
|
+
{ label: 'Slightly Round', value: 'slightly_round' },
|
|
151
|
+
{ label: 'Rounded', value: 'rounded' },
|
|
152
|
+
{ label: 'Extra Round', value: 'extra_round' },
|
|
153
|
+
{ label: 'Leaf', value: 'leaf' },
|
|
154
|
+
{ label: 'Leaf Inner', value: 'leaf_inner' },
|
|
155
|
+
{ label: 'Leaf Outer', value: 'leaf_outer' },
|
|
156
|
+
{ label: 'Target', value: 'target' },
|
|
157
|
+
{ label: 'Concave', value: 'concave' },
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
}),
|
|
161
|
+
corner_3_inner_color: pieces_framework_1.Property.ShortText({
|
|
162
|
+
displayName: 'Corner 3 (Bottom-Right): Inner Color',
|
|
163
|
+
required: false,
|
|
164
|
+
}),
|
|
165
|
+
corner_3_outer_color: pieces_framework_1.Property.ShortText({
|
|
166
|
+
displayName: 'Corner 3 (Bottom-Right): Outer Color',
|
|
167
|
+
required: false,
|
|
168
|
+
}),
|
|
169
|
+
gradient_style: pieces_framework_1.Property.StaticDropdown({
|
|
170
|
+
displayName: 'Gradient: Style',
|
|
171
|
+
required: false,
|
|
172
|
+
options: {
|
|
173
|
+
options: [
|
|
174
|
+
{ label: 'No Gradient', value: 'no_gradient' },
|
|
175
|
+
{ label: 'Linear', value: 'linear' },
|
|
176
|
+
{ label: 'Radial', value: 'radial' },
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
}),
|
|
180
|
+
gradient_color_1: pieces_framework_1.Property.ShortText({
|
|
181
|
+
displayName: 'Gradient: Color 1',
|
|
182
|
+
description: 'First gradient color (hex code)',
|
|
183
|
+
required: false,
|
|
184
|
+
}),
|
|
185
|
+
gradient_color_2: pieces_framework_1.Property.ShortText({
|
|
186
|
+
displayName: 'Gradient: Color 2',
|
|
187
|
+
description: 'Second gradient color (hex code)',
|
|
188
|
+
required: false,
|
|
189
|
+
}),
|
|
190
|
+
gradient_angle: pieces_framework_1.Property.Number({
|
|
191
|
+
displayName: 'Gradient: Angle (for Linear)',
|
|
192
|
+
required: false,
|
|
193
|
+
}),
|
|
194
|
+
gradient_exclude_corners: pieces_framework_1.Property.Checkbox({
|
|
195
|
+
displayName: 'Gradient: Exclude Corners',
|
|
196
|
+
required: false,
|
|
197
|
+
}),
|
|
198
|
+
frame_id: pieces_framework_1.Property.StaticDropdown({
|
|
199
|
+
displayName: 'Frame: Type',
|
|
200
|
+
required: false,
|
|
201
|
+
options: {
|
|
202
|
+
options: [
|
|
203
|
+
{ label: 'None', value: 'none' },
|
|
204
|
+
{ label: 'Border Only', value: 'border_only' },
|
|
205
|
+
{ label: 'Text Bottom', value: 'text_bottom' },
|
|
206
|
+
{ label: 'Tooltip Bottom', value: 'tooltip_bottom' },
|
|
207
|
+
{ label: 'Arrow', value: 'arrow' },
|
|
208
|
+
{ label: 'Text Top', value: 'text_top' },
|
|
209
|
+
{ label: 'Text Bottom In Frame', value: 'text_bottom_in_frame' },
|
|
210
|
+
{ label: 'Script', value: 'script' },
|
|
211
|
+
{ label: 'Text Top and Bottom', value: 'text_top_and_bottom' },
|
|
212
|
+
{ label: 'URL', value: 'url' },
|
|
213
|
+
{ label: 'Instagram', value: 'instagram' },
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
}),
|
|
217
|
+
frame_primary_color: pieces_framework_1.Property.ShortText({
|
|
218
|
+
displayName: 'Frame: Primary Color',
|
|
219
|
+
required: false,
|
|
220
|
+
}),
|
|
221
|
+
frame_secondary_color: pieces_framework_1.Property.ShortText({
|
|
222
|
+
displayName: 'Frame: Secondary Color',
|
|
223
|
+
required: false,
|
|
224
|
+
}),
|
|
225
|
+
frame_background_color: pieces_framework_1.Property.ShortText({
|
|
226
|
+
displayName: 'Frame: Background Color',
|
|
227
|
+
required: false,
|
|
228
|
+
}),
|
|
229
|
+
frame_text: pieces_framework_1.Property.ShortText({
|
|
230
|
+
displayName: 'Frame: Text',
|
|
231
|
+
description: 'Primary text for frames that support it.',
|
|
232
|
+
required: false,
|
|
233
|
+
}),
|
|
234
|
+
logo_image_guid: pieces_framework_1.Property.ShortText({
|
|
235
|
+
displayName: 'Branding: Logo Image GUID',
|
|
236
|
+
description: 'A GUID for a logo image previously uploaded to Bitly.',
|
|
237
|
+
required: false,
|
|
238
|
+
}),
|
|
239
|
+
bitly_brand: pieces_framework_1.Property.Checkbox({
|
|
240
|
+
displayName: 'Branding: Show Bitly Logo',
|
|
241
|
+
description: 'Show the Bitly logo in the bottom right corner.',
|
|
242
|
+
required: false,
|
|
243
|
+
defaultValue: true,
|
|
244
|
+
}),
|
|
245
|
+
error_correction: pieces_framework_1.Property.StaticDropdown({
|
|
246
|
+
displayName: 'Specs: Error Correction',
|
|
247
|
+
required: false,
|
|
248
|
+
options: {
|
|
249
|
+
options: [
|
|
250
|
+
{ label: 'Low (1)', value: 1 },
|
|
251
|
+
{ label: 'Medium (2)', value: 2 },
|
|
252
|
+
{ label: 'Quartile (3)', value: 3 },
|
|
253
|
+
{ label: 'High (4)', value: 4 },
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
257
|
+
},
|
|
258
|
+
run(context) {
|
|
259
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
261
|
+
const props = context.propsValue;
|
|
262
|
+
try {
|
|
263
|
+
const body = {
|
|
264
|
+
group_guid: props.group_guid,
|
|
265
|
+
destination: Object.assign({}, props.destination),
|
|
266
|
+
};
|
|
267
|
+
if (props.title)
|
|
268
|
+
body.title = props.title;
|
|
269
|
+
if (props.archived)
|
|
270
|
+
body.archived = props.archived;
|
|
271
|
+
const customizations = {};
|
|
272
|
+
if (props.background_color)
|
|
273
|
+
customizations.background_color = props.background_color;
|
|
274
|
+
if (props.dot_pattern_color)
|
|
275
|
+
customizations.dot_pattern_color = props.dot_pattern_color;
|
|
276
|
+
if (props.dot_pattern_type)
|
|
277
|
+
customizations.dot_pattern_type = props.dot_pattern_type;
|
|
278
|
+
const corners = {};
|
|
279
|
+
if (props.corner_1_shape ||
|
|
280
|
+
props.corner_1_inner_color ||
|
|
281
|
+
props.corner_1_outer_color)
|
|
282
|
+
corners.corner_1 = {
|
|
283
|
+
shape: props.corner_1_shape,
|
|
284
|
+
inner_color: props.corner_1_inner_color,
|
|
285
|
+
outer_color: props.corner_1_outer_color,
|
|
286
|
+
};
|
|
287
|
+
if (props.corner_2_shape ||
|
|
288
|
+
props.corner_2_inner_color ||
|
|
289
|
+
props.corner_2_outer_color)
|
|
290
|
+
corners.corner_2 = {
|
|
291
|
+
shape: props.corner_2_shape,
|
|
292
|
+
inner_color: props.corner_2_inner_color,
|
|
293
|
+
outer_color: props.corner_2_outer_color,
|
|
294
|
+
};
|
|
295
|
+
if (props.corner_3_shape ||
|
|
296
|
+
props.corner_3_inner_color ||
|
|
297
|
+
props.corner_3_outer_color)
|
|
298
|
+
corners.corner_3 = {
|
|
299
|
+
shape: props.corner_3_shape,
|
|
300
|
+
inner_color: props.corner_3_inner_color,
|
|
301
|
+
outer_color: props.corner_3_outer_color,
|
|
302
|
+
};
|
|
303
|
+
if (Object.keys(corners).length > 0)
|
|
304
|
+
customizations.corners = corners;
|
|
305
|
+
const gradient = {};
|
|
306
|
+
if (props.gradient_style)
|
|
307
|
+
gradient.style = props.gradient_style;
|
|
308
|
+
if (props.gradient_angle)
|
|
309
|
+
gradient.angle = props.gradient_angle;
|
|
310
|
+
if (props.gradient_exclude_corners)
|
|
311
|
+
gradient.exclude_corners = props.gradient_exclude_corners;
|
|
312
|
+
// Build gradient colors array from individual color inputs
|
|
313
|
+
if (props.gradient_color_1 || props.gradient_color_2) {
|
|
314
|
+
const colors = [];
|
|
315
|
+
if (props.gradient_color_1) {
|
|
316
|
+
colors.push({ color: props.gradient_color_1, offset: 0 });
|
|
317
|
+
}
|
|
318
|
+
if (props.gradient_color_2) {
|
|
319
|
+
colors.push({ color: props.gradient_color_2, offset: 100 });
|
|
320
|
+
}
|
|
321
|
+
gradient.colors = colors;
|
|
322
|
+
}
|
|
323
|
+
if (Object.keys(gradient).length > 0)
|
|
324
|
+
customizations.gradient = gradient;
|
|
325
|
+
const frame = {};
|
|
326
|
+
if (props.frame_id)
|
|
327
|
+
frame.id = props.frame_id;
|
|
328
|
+
const frameColors = {};
|
|
329
|
+
if (props.frame_primary_color)
|
|
330
|
+
frameColors.primary = props.frame_primary_color;
|
|
331
|
+
if (props.frame_secondary_color)
|
|
332
|
+
frameColors.secondary = props.frame_secondary_color;
|
|
333
|
+
if (props.frame_background_color)
|
|
334
|
+
frameColors.background = props.frame_background_color;
|
|
335
|
+
if (Object.keys(frameColors).length > 0)
|
|
336
|
+
frame.colors = frameColors;
|
|
337
|
+
if (props.frame_text)
|
|
338
|
+
frame.text = { primary: { content: props.frame_text } };
|
|
339
|
+
if (Object.keys(frame).length > 0)
|
|
340
|
+
customizations.frame = frame;
|
|
341
|
+
const branding = {};
|
|
342
|
+
if (props.bitly_brand !== undefined)
|
|
343
|
+
branding.bitly_brand = props.bitly_brand;
|
|
344
|
+
if (Object.keys(branding).length > 0)
|
|
345
|
+
customizations.branding = branding;
|
|
346
|
+
const logo = {};
|
|
347
|
+
if (props.logo_image_guid)
|
|
348
|
+
logo.image_guid = props.logo_image_guid;
|
|
349
|
+
if (Object.keys(logo).length > 0)
|
|
350
|
+
customizations.logo = logo;
|
|
351
|
+
const specSettings = {};
|
|
352
|
+
if (props.error_correction)
|
|
353
|
+
specSettings.error_correction = props.error_correction;
|
|
354
|
+
if (Object.keys(specSettings).length > 0)
|
|
355
|
+
customizations.spec_settings = specSettings;
|
|
356
|
+
if (Object.keys(customizations).length > 0)
|
|
357
|
+
body.render_customizations = customizations;
|
|
358
|
+
return yield (0, client_1.bitlyApiCall)({
|
|
359
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
360
|
+
auth: context.auth.props,
|
|
361
|
+
resourceUri: '/qr-codes',
|
|
362
|
+
body,
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
const errorMessage = ((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.description) ||
|
|
367
|
+
((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.message) ||
|
|
368
|
+
error.message;
|
|
369
|
+
if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 429) {
|
|
370
|
+
throw new Error('Rate limit exceeded. Please wait before trying again.');
|
|
371
|
+
}
|
|
372
|
+
if (((_f = error.response) === null || _f === void 0 ? void 0 : _f.status) === 422) {
|
|
373
|
+
throw new Error(`Unprocessable Entity: ${errorMessage}. Please check the format of your Long URL or other inputs.`);
|
|
374
|
+
}
|
|
375
|
+
if (((_g = error.response) === null || _g === void 0 ? void 0 : _g.status) === 401 || ((_h = error.response) === null || _h === void 0 ? void 0 : _h.status) === 403) {
|
|
376
|
+
throw new Error(`Authentication failed or forbidden: ${errorMessage}. Please check your Access Token and permissions.`);
|
|
377
|
+
}
|
|
378
|
+
throw new Error(`Failed to create QR Code: ${errorMessage || 'Unknown error occurred'}`);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
});
|
|
383
|
+
//# sourceMappingURL=create-qr-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-qr-code.js","sourceRoot":"","sources":["../../../src/lib/actions/create-qr-code.ts"],"names":[],"mappings":";;;;AAAA,sGAAsG;AACtG,qEAAqE;AACrE,0DAAoD;AACpD,gEAImC;AACnC,6CAAgD;AAChD,yCAA2C;AAC3C,2CAA4C;AAE/B,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,gBAAS;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,YAAY,IAAI,wBAAwB,EAAE,CACxE,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getBitlinkDetailsAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
group_guid: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
bitlink: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
8
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
9
|
+
}>>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=get-bitlink-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bitlink-details.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/get-bitlink-details.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,uBAAuB;;;;;;;;;EA+ClC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBitlinkDetailsAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bitly/src/lib/actions/get-bitlink-details.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
8
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const auth_1 = require("../common/auth");
|
|
11
|
+
const props_1 = require("../common/props");
|
|
12
|
+
exports.getBitlinkDetailsAction = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.bitlyAuth,
|
|
14
|
+
name: 'get_bitlink_details',
|
|
15
|
+
displayName: 'Get Bitlink Details',
|
|
16
|
+
description: 'Retrieve metadata for a Bitlink.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Retrieves metadata for a single Bitlink (title, long URL, tags, archive status, timestamps) identified by its Bitlink ID. Use to look up the current state of a known short link. Idempotent read-only lookup.', idempotent: true },
|
|
19
|
+
props: {
|
|
20
|
+
group_guid: props_1.groupGuid,
|
|
21
|
+
bitlink: props_1.bitlinkDropdown,
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26
|
+
const { bitlink } = context.propsValue;
|
|
27
|
+
try {
|
|
28
|
+
return yield (0, client_1.bitlyApiCall)({
|
|
29
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
30
|
+
auth: context.auth.props,
|
|
31
|
+
resourceUri: `/bitlinks/${bitlink}`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
const errorMessage = ((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.description) || ((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.message) || error.message;
|
|
36
|
+
if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 429) {
|
|
37
|
+
throw new Error('Rate limit exceeded. Please wait before trying again.');
|
|
38
|
+
}
|
|
39
|
+
if (((_f = error.response) === null || _f === void 0 ? void 0 : _f.status) === 404) {
|
|
40
|
+
throw new Error(`Bitlink not found: ${errorMessage}. Please verify the link ID is correct.`);
|
|
41
|
+
}
|
|
42
|
+
if (((_g = error.response) === null || _g === void 0 ? void 0 : _g.status) === 401 || ((_h = error.response) === null || _h === void 0 ? void 0 : _h.status) === 403) {
|
|
43
|
+
throw new Error(`Authentication failed or forbidden: ${errorMessage}. Please check your Access Token and permissions.`);
|
|
44
|
+
}
|
|
45
|
+
throw new Error(`Failed to get Bitlink details: ${errorMessage || 'Unknown error occurred'}`);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=get-bitlink-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bitlink-details.js","sourceRoot":"","sources":["../../../src/lib/actions/get-bitlink-details.ts"],"names":[],"mappings":";;;;AAAA,2GAA2G;AAC3G,qEAAqE;AACrE,0DAAoD;AACpD,gEAAmE;AACnE,6CAAgD;AAChD,yCAA2C;AAC3C,2CAA6D;AAEhD,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,kCAAkC;IAC/C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,gNAAgN,EAAE,UAAU,EAAE,IAAI,EAAE;IAC/P,KAAK,EAAE;QACH,UAAU,EAAE,iBAAS;QACrB,OAAO,EAAE,uBAAe;KAC3B;IACK,GAAG,CAAC,OAAO;;;YACb,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvC,IAAI,CAAC;gBACD,OAAO,MAAM,IAAA,qBAAY,EAAC;oBACtB,MAAM,EAAE,0BAAU,CAAC,GAAG;oBACtB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;oBACxB,WAAW,EAAE,aAAa,OAAO,EAAE;iBACtC,CAAC,CAAC;YAEP,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBAClB,MAAM,YAAY,GAAG,CAAA,MAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,0CAAE,WAAW,MAAI,MAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,0CAAE,OAAO,CAAA,IAAI,KAAK,CAAC,OAAO,CAAC;gBAEzG,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACX,uDAAuD,CAC1D,CAAC;gBACN,CAAC;gBAED,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACX,sBAAsB,YAAY,yCAAyC,CAC9E,CAAC;gBACN,CAAC;gBAED,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACnE,MAAM,IAAI,KAAK,CACX,uCAAuC,YAAY,mDAAmD,CACzG,CAAC;gBACN,CAAC;gBAED,MAAM,IAAI,KAAK,CACX,kCAAkC,YAAY,IAAI,wBAAwB,EAAE,CAC/E,CAAC;YACN,CAAC;QACL,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const updateBitlinkAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
}>, {
|
|
4
|
+
group_guid: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
5
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
6
|
+
}>>;
|
|
7
|
+
bitlink: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
8
|
+
accessToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
9
|
+
}>>;
|
|
10
|
+
title: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
archived: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
12
|
+
tags: import("@agnocon/pieces-framework").ArrayProperty<false>;
|
|
13
|
+
app_uri_path: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
install_url: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
15
|
+
os: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
16
|
+
install_type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=update-bitlink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-bitlink.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/update-bitlink.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;EAkJ9B,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateBitlinkAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bitly/src/lib/actions/update-bitlink.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
8
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
9
|
+
const client_1 = require("../common/client");
|
|
10
|
+
const auth_1 = require("../common/auth");
|
|
11
|
+
const props_1 = require("../common/props");
|
|
12
|
+
exports.updateBitlinkAction = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: auth_1.bitlyAuth,
|
|
14
|
+
name: 'update_bitlink',
|
|
15
|
+
displayName: 'Update Bitlink',
|
|
16
|
+
description: 'Modify properties of an existing Bitlink.',
|
|
17
|
+
audience: 'both',
|
|
18
|
+
aiMetadata: { description: 'Updates properties of an existing Bitlink identified by its Bitlink ID, including title, archive status, tags (overwrites existing), and mobile app deeplinks. Use to edit or re-tag a known short link; at least one field must be provided. Idempotent: applying the same values repeatedly yields the same final state.', idempotent: true },
|
|
19
|
+
props: {
|
|
20
|
+
group_guid: props_1.groupGuid,
|
|
21
|
+
bitlink: props_1.bitlinkDropdown,
|
|
22
|
+
title: pieces_framework_1.Property.ShortText({
|
|
23
|
+
displayName: 'Title',
|
|
24
|
+
description: 'New title for the Bitlink.',
|
|
25
|
+
required: false,
|
|
26
|
+
}),
|
|
27
|
+
archived: pieces_framework_1.Property.Checkbox({
|
|
28
|
+
displayName: 'Archived',
|
|
29
|
+
description: 'Archive or unarchive the Bitlink.',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
tags: pieces_framework_1.Property.Array({
|
|
33
|
+
displayName: 'Tags',
|
|
34
|
+
description: 'Tags to apply (overwrites existing tags).',
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
// Mobile App Deeplink Configuration
|
|
38
|
+
app_uri_path: pieces_framework_1.Property.ShortText({
|
|
39
|
+
displayName: 'App URI Path',
|
|
40
|
+
description: 'Path within the mobile app (e.g., /product/123).',
|
|
41
|
+
required: false,
|
|
42
|
+
}),
|
|
43
|
+
install_url: pieces_framework_1.Property.LongText({
|
|
44
|
+
displayName: 'App Install URL',
|
|
45
|
+
description: 'URL where users can install the mobile app.',
|
|
46
|
+
required: false,
|
|
47
|
+
}),
|
|
48
|
+
os: pieces_framework_1.Property.StaticDropdown({
|
|
49
|
+
displayName: 'Mobile OS',
|
|
50
|
+
description: 'Target mobile operating system.',
|
|
51
|
+
required: false,
|
|
52
|
+
options: {
|
|
53
|
+
disabled: false,
|
|
54
|
+
options: [
|
|
55
|
+
{ label: 'iOS', value: 'ios' },
|
|
56
|
+
{ label: 'Android', value: 'android' },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
install_type: pieces_framework_1.Property.StaticDropdown({
|
|
61
|
+
displayName: 'Install Type',
|
|
62
|
+
description: 'How to handle app installation.',
|
|
63
|
+
required: false,
|
|
64
|
+
options: {
|
|
65
|
+
disabled: false,
|
|
66
|
+
options: [
|
|
67
|
+
{ label: 'No Install', value: 'no_install' },
|
|
68
|
+
{ label: 'Auto Install', value: 'auto_install' },
|
|
69
|
+
{ label: 'Promote Install', value: 'promote_install' },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
run(context) {
|
|
75
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
77
|
+
const { bitlink, title, archived, tags, app_uri_path, install_url, os, install_type } = context.propsValue;
|
|
78
|
+
try {
|
|
79
|
+
const body = {};
|
|
80
|
+
if (title !== undefined && title !== null) {
|
|
81
|
+
body['title'] = title;
|
|
82
|
+
}
|
|
83
|
+
if (archived !== undefined && archived !== null) {
|
|
84
|
+
body['archived'] = archived;
|
|
85
|
+
}
|
|
86
|
+
if (tags !== undefined && tags !== null && Array.isArray(tags)) {
|
|
87
|
+
body['tags'] = tags;
|
|
88
|
+
}
|
|
89
|
+
// Build deeplinks array if app configuration is provided
|
|
90
|
+
if (app_uri_path || install_url || os || install_type) {
|
|
91
|
+
const deeplink = {};
|
|
92
|
+
if (app_uri_path)
|
|
93
|
+
deeplink['app_uri_path'] = app_uri_path;
|
|
94
|
+
if (install_url)
|
|
95
|
+
deeplink['install_url'] = install_url;
|
|
96
|
+
if (os)
|
|
97
|
+
deeplink['os'] = os;
|
|
98
|
+
if (install_type)
|
|
99
|
+
deeplink['install_type'] = install_type;
|
|
100
|
+
if (Object.keys(deeplink).length > 0) {
|
|
101
|
+
body['deeplinks'] = [deeplink];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (Object.keys(body).length === 0) {
|
|
105
|
+
throw new Error('No fields were provided to update. Please provide a title, tags, archive status, or deeplinks.');
|
|
106
|
+
}
|
|
107
|
+
return yield (0, client_1.bitlyApiCall)({
|
|
108
|
+
method: pieces_common_1.HttpMethod.PATCH,
|
|
109
|
+
auth: context.auth.props,
|
|
110
|
+
resourceUri: `/bitlinks/${bitlink}`,
|
|
111
|
+
body,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
const errorMessage = ((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.description) ||
|
|
116
|
+
((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.message) ||
|
|
117
|
+
error.message;
|
|
118
|
+
if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 429) {
|
|
119
|
+
throw new Error('Rate limit exceeded. Please wait before trying again.');
|
|
120
|
+
}
|
|
121
|
+
if (((_f = error.response) === null || _f === void 0 ? void 0 : _f.status) === 404) {
|
|
122
|
+
throw new Error(`Bitlink not found: ${errorMessage}. Please verify the link (e.g., 'bit.ly/xyz123') is correct.`);
|
|
123
|
+
}
|
|
124
|
+
if (((_g = error.response) === null || _g === void 0 ? void 0 : _g.status) === 401 || ((_h = error.response) === null || _h === void 0 ? void 0 : _h.status) === 403) {
|
|
125
|
+
throw new Error(`Authentication failed or forbidden: ${errorMessage}. Please check your Access Token and permissions.`);
|
|
126
|
+
}
|
|
127
|
+
if (error.message.includes('Invalid JSON format')) {
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
throw new Error(`Failed to update Bitlink: ${errorMessage || 'Unknown error occurred'}`);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
//# sourceMappingURL=update-bitlink.js.map
|
|
@@ -0,0 +1 @@
|
|
|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