@taskmagic/apps-placid 0.0.1

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.
Files changed (38) hide show
  1. package/README.md +7 -0
  2. package/package.json +48 -0
  3. package/src/index.d.ts +1 -0
  4. package/src/index.js +45 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/convert-file-to-url.d.ts +4 -0
  7. package/src/lib/actions/convert-file-to-url.js +66 -0
  8. package/src/lib/actions/convert-file-to-url.js.map +1 -0
  9. package/src/lib/actions/create-image.d.ts +9 -0
  10. package/src/lib/actions/create-image.js +62 -0
  11. package/src/lib/actions/create-image.js.map +1 -0
  12. package/src/lib/actions/create-pdf.d.ts +9 -0
  13. package/src/lib/actions/create-pdf.js +65 -0
  14. package/src/lib/actions/create-pdf.js.map +1 -0
  15. package/src/lib/actions/create-video.d.ts +9 -0
  16. package/src/lib/actions/create-video.js +58 -0
  17. package/src/lib/actions/create-video.js.map +1 -0
  18. package/src/lib/actions/get-image.d.ts +3 -0
  19. package/src/lib/actions/get-image.js +28 -0
  20. package/src/lib/actions/get-image.js.map +1 -0
  21. package/src/lib/actions/get-pdf.d.ts +3 -0
  22. package/src/lib/actions/get-pdf.js +28 -0
  23. package/src/lib/actions/get-pdf.js.map +1 -0
  24. package/src/lib/actions/get-video.d.ts +3 -0
  25. package/src/lib/actions/get-video.js +28 -0
  26. package/src/lib/actions/get-video.js.map +1 -0
  27. package/src/lib/auth.d.ts +1 -0
  28. package/src/lib/auth.js +43 -0
  29. package/src/lib/auth.js.map +1 -0
  30. package/src/lib/common/client.d.ts +15 -0
  31. package/src/lib/common/client.js +243 -0
  32. package/src/lib/common/client.js.map +1 -0
  33. package/src/lib/common/index.d.ts +73 -0
  34. package/src/lib/common/index.js +5 -0
  35. package/src/lib/common/index.js.map +1 -0
  36. package/src/lib/common/props.d.ts +9 -0
  37. package/src/lib/common/props.js +211 -0
  38. package/src/lib/common/props.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # apps-placid
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running lint
6
+
7
+ Run `nx lint apps-placid` to execute the lint via [ESLint](https://eslint.org/).
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@taskmagic/apps-placid",
3
+ "version": "0.0.1",
4
+ "dependencies": {
5
+ "@anthropic-ai/sdk": "0.33.1",
6
+ "@sinclair/typebox": "0.34.11",
7
+ "axios": "1.17.0",
8
+ "axios-retry": "4.4.1",
9
+ "deepmerge-ts": "7.1.0",
10
+ "form-data": "4.0.5",
11
+ "mime-types": "2.1.35",
12
+ "nanoid": "3.3.8",
13
+ "openai": "4.67.1",
14
+ "replicate": "0.34.1",
15
+ "semver": "7.6.0",
16
+ "zod": "3.25.76",
17
+ "@taskmagic/pieces-common": "0.4.4",
18
+ "@taskmagic/pieces-framework": "0.7.46",
19
+ "@taskmagic/shared": "0.10.171",
20
+ "tslib": "1.14.1"
21
+ },
22
+ "overrides": {
23
+ "cross-spawn": "7.0.6",
24
+ "elliptic": "^6.6.1",
25
+ "fast-xml-parser": "^4.4.1",
26
+ "protobufjs": "^7.5.5",
27
+ "tmp": "^0.2.4",
28
+ "koa": "^2.16.4",
29
+ "picomatch": "^4.0.4",
30
+ "langsmith": "^0.6.0",
31
+ "serialize-javascript": "^6.0.2",
32
+ "elevenlabs": {
33
+ "form-data": "^4.0.4"
34
+ },
35
+ "@tryfabric/martian": {
36
+ "@notionhq/client": "$@notionhq/client"
37
+ },
38
+ "vite": {
39
+ "rollup": "npm:@rollup/wasm-node@^4.61.1"
40
+ }
41
+ },
42
+ "resolutions": {
43
+ "rollup": "npm:@rollup/wasm-node@^4.61.1"
44
+ },
45
+ "types": "./src/index.d.ts",
46
+ "main": "./src/index.js",
47
+ "type": "commonjs"
48
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const placid: import("@taskmagic/pieces-framework").Piece<import("@taskmagic/pieces-framework").SecretTextProperty<true>>;
package/src/index.js ADDED
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.placid = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@taskmagic/pieces-common");
6
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
7
+ const shared_1 = require("@taskmagic/shared");
8
+ const create_image_1 = require("./lib/actions/create-image");
9
+ const create_pdf_1 = require("./lib/actions/create-pdf");
10
+ const create_video_1 = require("./lib/actions/create-video");
11
+ const convert_file_to_url_1 = require("./lib/actions/convert-file-to-url");
12
+ const get_image_1 = require("./lib/actions/get-image");
13
+ const get_pdf_1 = require("./lib/actions/get-pdf");
14
+ const get_video_1 = require("./lib/actions/get-video");
15
+ const common_1 = require("./lib/common");
16
+ const auth_1 = require("./lib/auth");
17
+ exports.placid = (0, pieces_framework_1.createPiece)({
18
+ displayName: 'Placid',
19
+ description: 'Creative automation engine that generates dynamic images, PDFs, and videos from templates and data.',
20
+ minimumSupportedRelease: '0.30.0',
21
+ logoUrl: 'https://cdn.activepieces.com/pieces/placid.png',
22
+ categories: [shared_1.PieceCategory.CONTENT_AND_FILES, shared_1.PieceCategory.MARKETING],
23
+ auth: auth_1.placidAuth,
24
+ actions: [
25
+ create_image_1.createImage,
26
+ create_pdf_1.createPdf,
27
+ create_video_1.createVideo,
28
+ convert_file_to_url_1.convertFileToUrl,
29
+ get_image_1.getImage,
30
+ get_pdf_1.getPdf,
31
+ get_video_1.getVideo,
32
+ (0, pieces_common_1.createCustomApiCallAction)({
33
+ auth: auth_1.placidAuth,
34
+ baseUrl: () => common_1.PLACID_BASE_URL,
35
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
36
+ return ({
37
+ Authorization: `Bearer ${auth}`,
38
+ });
39
+ }),
40
+ }),
41
+ ],
42
+ triggers: [],
43
+ authors: ['MAVRICK-1'],
44
+ });
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/placid/src/index.ts"],"names":[],"mappings":";;;;AAAA,4DAEkC;AAClC,kEAA0D;AAC1D,8CAAkD;AAClD,6DAAyD;AACzD,yDAAqD;AACrD,6DAAyD;AACzD,2EAAqE;AACrE,uDAAmD;AACnD,mDAA+C;AAC/C,uDAAmD;AACnD,yCAA+C;AAC/C,qCAAwC;AAE3B,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IACjC,WAAW,EAAE,QAAQ;IACrB,WAAW,EACV,qGAAqG;IACtG,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,gDAAgD;IACzD,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,EAAE,sBAAa,CAAC,SAAS,CAAC;IACtE,IAAI,EAAE,iBAAU;IAChB,OAAO,EAAE;QACR,0BAAW;QACX,sBAAS;QACT,0BAAW;QACX,sCAAgB;QAChB,oBAAQ;QACR,gBAAM;QACN,oBAAQ;QACR,IAAA,yCAAyB,EAAC;YACzB,IAAI,EAAE,iBAAU;YAChB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAe;YAC9B,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC7B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAC/B,CAAC,CAAA;cAAA;SACF,CAAC;KACF;IACD,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,CAAC,WAAW,CAAC;CACtB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const convertFileToUrl: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ file: import("@taskmagic/pieces-framework").FileProperty<true>;
3
+ filename: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
4
+ }>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertFileToUrl = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const pieces_common_1 = require("@taskmagic/pieces-common");
8
+ const common_1 = require("../common");
9
+ const form_data_1 = tslib_1.__importDefault(require("form-data"));
10
+ exports.convertFileToUrl = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.placidAuth,
12
+ name: 'convert_file_to_url',
13
+ displayName: 'Convert File to URL',
14
+ description: 'Convert uploaded file(s) into media URL(s) consumable by Placid templates.',
15
+ props: {
16
+ file: pieces_framework_1.Property.File({
17
+ displayName: 'File',
18
+ description: 'The file to convert to a URL.',
19
+ required: true,
20
+ }),
21
+ filename: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Filename',
23
+ description: 'Optional custom filename for the uploaded file.',
24
+ required: false,
25
+ }),
26
+ },
27
+ run(context) {
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ var _a, _b, _c;
30
+ const { file, filename } = context.propsValue;
31
+ const formData = new form_data_1.default();
32
+ // Convert base64 to buffer for form-data
33
+ const buffer = Buffer.from(file.base64, 'base64');
34
+ formData.append('file', buffer, {
35
+ filename: filename || file.filename,
36
+ contentType: file.extension ? `application/${file.extension}` : 'application/octet-stream',
37
+ });
38
+ try {
39
+ const response = yield pieces_common_1.httpClient.sendRequest({
40
+ method: pieces_common_1.HttpMethod.POST,
41
+ url: `${common_1.PLACID_BASE_URL}/media`,
42
+ body: formData,
43
+ authentication: {
44
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
45
+ token: context.auth,
46
+ },
47
+ headers: Object.assign({}, formData.getHeaders()),
48
+ });
49
+ return response.body;
50
+ }
51
+ catch (error) {
52
+ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
53
+ throw new Error('File upload not supported. This feature may not be available for demo accounts or may require a paid Placid plan. Please check your account permissions.');
54
+ }
55
+ if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 413) {
56
+ throw new Error('File too large. Please check Placid file size limits.');
57
+ }
58
+ if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 403) {
59
+ throw new Error('File upload access forbidden. This feature may require additional permissions in your Placid account.');
60
+ }
61
+ throw error;
62
+ }
63
+ });
64
+ },
65
+ });
66
+ //# sourceMappingURL=convert-file-to-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-file-to-url.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/convert-file-to-url.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,4DAAsF;AACtF,sCAA4C;AAC5C,kEAAiC;AAEpB,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,4EAA4E;IACzF,KAAK,EAAE;QACN,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACnB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;;YAChB,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE9C,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;YAEhC,yCAAyC;YACzC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAClD,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE;gBAC/B,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,QAAQ;gBACnC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,0BAA0B;aAC1F,CAAC,CAAC;YAEH,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;oBAC7C,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,GAAG,wBAAe,QAAQ;oBAC/B,IAAI,EAAE,QAAQ;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;wBACrC,KAAK,EAAE,OAAO,CAAC,IAAc;qBAC7B;oBACD,OAAO,oBACH,QAAQ,CAAC,UAAU,EAAE,CACxB;iBACD,CAAC,CAAC;gBAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACtB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACrB,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CACd,0JAA0J,CAC1J,CAAC;gBACH,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;gBAC1E,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CACd,uGAAuG,CACvG,CAAC;gBACH,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const createImage: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ template: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
3
+ layers: import("@taskmagic/pieces-framework").DynamicProperties<false>;
4
+ outputDpi: import("@taskmagic/pieces-framework").StaticDropdownProperty<number, false>;
5
+ outputFilename: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
6
+ webhook_success: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
7
+ create_now: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
8
+ passthrough: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
9
+ }>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createImage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ const props_1 = require("../common/props");
9
+ const shared_1 = require("@taskmagic/shared");
10
+ exports.createImage = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.placidAuth,
12
+ name: 'create_image',
13
+ displayName: 'Create Image',
14
+ description: 'Generates a dynamic image from a specified template using input data.',
15
+ props: {
16
+ template: props_1.imageTemplateDropdown,
17
+ layers: (0, props_1.templateLayersProperty)('image'),
18
+ outputDpi: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Output DPI',
20
+ required: false,
21
+ options: {
22
+ disabled: false,
23
+ options: [
24
+ { label: '72 DPI', value: 72 },
25
+ { label: '150 DPI', value: 150 },
26
+ { label: '300 DPI', value: 300 },
27
+ ],
28
+ },
29
+ }),
30
+ outputFilename: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Output File Name',
32
+ required: false,
33
+ }),
34
+ webhook_success: props_1.webhookProperty,
35
+ create_now: props_1.createNowProperty,
36
+ passthrough: props_1.passthroughProperty,
37
+ },
38
+ run(context) {
39
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
+ var _a;
41
+ const { template, webhook_success, create_now, passthrough, outputDpi, outputFilename } = context.propsValue;
42
+ const layers = (_a = context.propsValue.layers) !== null && _a !== void 0 ? _a : {};
43
+ const modifiedLayers = {};
44
+ for (const [key, value] of Object.entries(layers)) {
45
+ if (value === '' || (0, shared_1.isNil)(value))
46
+ continue;
47
+ const [mainKey, subKey] = key.split(':::');
48
+ if (!mainKey || !subKey)
49
+ continue;
50
+ if (!modifiedLayers[mainKey]) {
51
+ modifiedLayers[mainKey] = {};
52
+ }
53
+ modifiedLayers[mainKey][subKey] = value;
54
+ }
55
+ const client = new client_1.PlacidClient(context.auth);
56
+ const modifications = Object.assign(Object.assign({}, (outputFilename && { filename: outputFilename })), (outputDpi && { dpi: outputDpi }));
57
+ const request = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ template_uuid: template }, (modifiedLayers && { layers: modifiedLayers })), (webhook_success && { webhook_success })), (create_now !== undefined && { create_now })), (passthrough && { passthrough })), (Object.keys(modifications).length && { modifications }));
58
+ return yield client.createImage(request);
59
+ });
60
+ },
61
+ });
62
+ //# sourceMappingURL=create-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-image.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/create-image.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAChD,2CAMyB;AACzB,8CAA0C;AAG7B,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,uEAAuE;IACpF,KAAK,EAAE;QACN,QAAQ,EAAE,6BAAqB;QAC/B,MAAM,EAAE,IAAA,8BAAsB,EAAC,OAAO,CAAC;QACvC,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAClC,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACR,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACR,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;oBAC9B,EAAE,KAAK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EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,GAChD,CAAC,SAAS,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CACpC,CAAC;YAEF,MAAM,OAAO,2EACZ,aAAa,EAAE,QAAQ,IACpB,CAAC,cAAc,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,GAC9C,CAAC,eAAe,IAAI,EAAE,eAAe,EAAE,CAAC,GACxC,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC,GAC5C,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,CAAC,GAChC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,IAAI,EAAE,aAAa,EAAE,CAAC,CAC3D,CAAC;YAEF,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const createPdf: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ template: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
3
+ layers: import("@taskmagic/pieces-framework").DynamicProperties<false>;
4
+ outputDpi: import("@taskmagic/pieces-framework").StaticDropdownProperty<number, false>;
5
+ outputFilename: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
6
+ webhook_success: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
7
+ create_now: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
8
+ passthrough: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
9
+ }>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPdf = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ const props_1 = require("../common/props");
9
+ const shared_1 = require("@taskmagic/shared");
10
+ exports.createPdf = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.placidAuth,
12
+ name: 'create_pdf',
13
+ displayName: 'Create PDF',
14
+ description: 'Generates a PDF document from a specified template.',
15
+ props: {
16
+ template: props_1.pdfTemplateDropdown,
17
+ layers: (0, props_1.templateLayersProperty)('pdf'),
18
+ outputDpi: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Output DPI',
20
+ required: false,
21
+ options: {
22
+ disabled: false,
23
+ options: [
24
+ { label: '96 DPI', value: 96 },
25
+ { label: '150 DPI', value: 150 },
26
+ { label: '300 DPI', value: 300 },
27
+ ],
28
+ },
29
+ }),
30
+ outputFilename: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Output File Name',
32
+ required: false,
33
+ }),
34
+ webhook_success: props_1.webhookProperty,
35
+ create_now: props_1.createNowProperty,
36
+ passthrough: props_1.passthroughProperty,
37
+ },
38
+ run(context) {
39
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
+ var _a;
41
+ const { template, outputDpi, outputFilename, webhook_success, create_now, passthrough } = context.propsValue;
42
+ const layers = (_a = context.propsValue.layers) !== null && _a !== void 0 ? _a : {};
43
+ const modifiedLayers = {};
44
+ for (const [key, value] of Object.entries(layers)) {
45
+ if (value === '' || (0, shared_1.isNil)(value))
46
+ continue;
47
+ const [mainKey, subKey] = key.split(':::');
48
+ if (!mainKey || !subKey)
49
+ continue;
50
+ if (!modifiedLayers[mainKey]) {
51
+ modifiedLayers[mainKey] = {};
52
+ }
53
+ modifiedLayers[mainKey][subKey] = value;
54
+ }
55
+ const client = new client_1.PlacidClient(context.auth);
56
+ const modifications = Object.assign(Object.assign({}, (outputFilename && { filename: outputFilename })), (outputDpi && { dpi: outputDpi }));
57
+ // PDFs require a pages array structure
58
+ const request = Object.assign(Object.assign(Object.assign(Object.assign({ pages: [
59
+ Object.assign({ template_uuid: template }, (modifiedLayers && { layers: modifiedLayers })),
60
+ ] }, (Object.keys(modifications).length && { modifications })), (webhook_success && { webhook_success })), (create_now !== undefined && { create_now })), (passthrough && { passthrough }));
61
+ return yield client.createPdf(request);
62
+ });
63
+ },
64
+ });
65
+ //# sourceMappingURL=create-pdf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-pdf.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/create-pdf.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAChD,2CAMyB;AACzB,8CAA0C;AAG7B,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE;QACN,QAAQ,EAAE,2BAAmB;QAC7B,MAAM,EAAE,IAAA,8BAAsB,EAAC,KAAK,CAAC;QACrC,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAClC,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACR,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACR,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;oBAC9B,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;oBAChC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;iBAChC;aACD;SACD,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,eAAe,EAAE,uBAAe;QAChC,UAAU,EAAE,yBAAiB;QAC7B,WAAW,EAAE,2BAAmB;KAChC;IACK,GAAG,CAAC,OAAO;;;YAChB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE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UAAU,EAAE,CAAC,GAC5C,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,CAAC,CACnC,CAAC;YAEF,OAAO,MAAM,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const createVideo: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ template: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
3
+ layers: import("@taskmagic/pieces-framework").DynamicProperties<false>;
4
+ outputFps: import("@taskmagic/pieces-framework").NumberProperty<false>;
5
+ outputFilename: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
6
+ webhook_success: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
7
+ create_now: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
8
+ passthrough: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
9
+ }>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createVideo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ const props_1 = require("../common/props");
9
+ const shared_1 = require("@taskmagic/shared");
10
+ exports.createVideo = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.placidAuth,
12
+ name: 'create_video',
13
+ displayName: 'Create Video',
14
+ description: 'Produces a video based on a template.',
15
+ props: {
16
+ template: props_1.videoTemplateDropdown,
17
+ layers: (0, props_1.templateLayersProperty)('video'),
18
+ outputFps: pieces_framework_1.Property.Number({
19
+ displayName: 'Output FPS',
20
+ required: false,
21
+ defaultValue: 25,
22
+ }),
23
+ outputFilename: pieces_framework_1.Property.ShortText({
24
+ displayName: 'Output File Name',
25
+ required: false,
26
+ }),
27
+ webhook_success: props_1.webhookProperty,
28
+ create_now: props_1.createNowProperty,
29
+ passthrough: props_1.passthroughProperty,
30
+ },
31
+ run(context) {
32
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
33
+ var _a;
34
+ const { template, outputFps, outputFilename, webhook_success, create_now, passthrough } = context.propsValue;
35
+ const layers = (_a = context.propsValue.layers) !== null && _a !== void 0 ? _a : {};
36
+ const modifiedLayers = {};
37
+ for (const [key, value] of Object.entries(layers)) {
38
+ if (value === '' || (0, shared_1.isNil)(value))
39
+ continue;
40
+ const [mainKey, subKey] = key.split(':::');
41
+ if (!mainKey || !subKey)
42
+ continue;
43
+ if (!modifiedLayers[mainKey]) {
44
+ modifiedLayers[mainKey] = {};
45
+ }
46
+ modifiedLayers[mainKey][subKey] = value;
47
+ }
48
+ const client = new client_1.PlacidClient(context.auth);
49
+ const modifications = Object.assign(Object.assign({}, (outputFilename && { filename: outputFilename })), (outputFps && { fps: outputFps }));
50
+ // Videos require a clips array structure
51
+ const request = Object.assign(Object.assign(Object.assign(Object.assign({ clips: [
52
+ Object.assign({ template_uuid: template }, (modifiedLayers && { layers: modifiedLayers })),
53
+ ] }, (Object.keys(modifications).length && { modifications })), (webhook_success && { webhook_success })), (create_now !== undefined && { create_now })), (passthrough && { passthrough }));
54
+ return yield client.createVideo(request);
55
+ });
56
+ },
57
+ });
58
+ //# sourceMappingURL=create-video.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-video.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/create-video.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAChD,2CAMyB;AACzB,8CAA0C;AAG7B,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACN,QAAQ,EAAE,6BAAqB;QAC/B,MAAM,EAAE,IAAA,8BAAsB,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f,CAAC,cAAc,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,GAChD,CAAC,SAAS,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CACpC,CAAC;YAEF,yCAAyC;YACzC,MAAM,OAAO,6DACZ,KAAK,EAAE;oCAEL,aAAa,EAAE,QAAQ,IACpB,CAAC,cAAc,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;iBAElD,IACE,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,IAAI,EAAE,aAAa,EAAE,CAAC,GACxD,CAAC,eAAe,IAAI,EAAE,eAAe,EAAE,CAAC,GACxC,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC,GAC5C,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,CAAC,CACnC,CAAC;YAEF,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const getImage: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ imageId: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
3
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getImage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ exports.getImage = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.placidAuth,
10
+ name: 'get_image',
11
+ displayName: 'Get Image',
12
+ description: 'Retrieves a generated image by its ID.',
13
+ props: {
14
+ imageId: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Image ID',
16
+ description: 'The ID of the image to retrieve.',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { imageId } = context.propsValue;
23
+ const client = new client_1.PlacidClient(context.auth);
24
+ return yield client.getImage(imageId);
25
+ });
26
+ },
27
+ });
28
+ //# sourceMappingURL=get-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-image.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/get-image.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAEnC,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACN,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACvC,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC,OAAO,CAAC,IAAc,CAAC,CAAC;YACxD,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const getPdf: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ pdfId: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
3
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPdf = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ exports.getPdf = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.placidAuth,
10
+ name: 'get_pdf',
11
+ displayName: 'Get PDF',
12
+ description: 'Retrieves the generated PDF by its ID.',
13
+ props: {
14
+ pdfId: pieces_framework_1.Property.ShortText({
15
+ displayName: 'PDF ID',
16
+ description: 'The ID of the PDF to retrieve',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { pdfId } = context.propsValue;
23
+ const client = new client_1.PlacidClient(context.auth);
24
+ return yield client.getPdf(pdfId);
25
+ });
26
+ },
27
+ });
28
+ //# sourceMappingURL=get-pdf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pdf.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/get-pdf.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAEnC,QAAA,MAAM,GAAG,IAAA,+BAAY,EAAC;IAClC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACN,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACrC,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC,OAAO,CAAC,IAAc,CAAC,CAAC;YACxD,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const getVideo: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ videoId: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
3
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVideo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ exports.getVideo = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.placidAuth,
10
+ name: 'get_video',
11
+ displayName: 'Get Video',
12
+ description: 'Retrieves the generated video by its ID.',
13
+ props: {
14
+ videoId: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Video ID',
16
+ description: 'The ID of the video to retrieve.',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { videoId } = context.propsValue;
23
+ const client = new client_1.PlacidClient(context.auth);
24
+ return yield client.getVideo(videoId);
25
+ });
26
+ },
27
+ });
28
+ //# sourceMappingURL=get-video.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-video.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/actions/get-video.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,kCAAqC;AACrC,6CAAgD;AAEnC,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE;QACN,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACvC,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC,OAAO,CAAC,IAAc,CAAC,CAAC;YACxD,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const placidAuth: import("@taskmagic/pieces-framework").SecretTextProperty<true>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.placidAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const pieces_common_1 = require("@taskmagic/pieces-common");
7
+ const common_1 = require("./common");
8
+ exports.placidAuth = pieces_framework_1.PieceAuth.SecretText({
9
+ description: `
10
+ To obtain your Placid API token:
11
+
12
+ 1. Log in to [placid.app](https://placid.app/login).
13
+ 2. Go to Projects overview.
14
+ 3. Select your desired project.
15
+ 4. Click "API Tokens" in the left menu.
16
+ 5. Copy your API token.
17
+
18
+ The token is project-specific and will only work with templates from that project.`,
19
+ displayName: 'API Token',
20
+ required: true,
21
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
22
+ try {
23
+ yield pieces_common_1.httpClient.sendRequest({
24
+ url: `${common_1.PLACID_BASE_URL}/templates`,
25
+ method: pieces_common_1.HttpMethod.GET,
26
+ authentication: {
27
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
28
+ token: auth,
29
+ },
30
+ });
31
+ return {
32
+ valid: true,
33
+ };
34
+ }
35
+ catch (e) {
36
+ return {
37
+ valid: false,
38
+ error: 'Invalid API token or failed to connect to Placid API',
39
+ };
40
+ }
41
+ }),
42
+ });
43
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/placid/src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,kEAAwD;AACxD,4DAAsF;AACtF,qCAA2C;AAE9B,QAAA,UAAU,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,WAAW,EAAE;;;;;;;;;mFASqE;IAClF,WAAW,EAAE,WAAW;IACxB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACxB,IAAI,CAAC;YACJ,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5B,GAAG,EAAE,GAAG,wBAAe,YAAY;gBACnC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,cAAc,EAAE;oBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAc;iBACrB;aACD,CAAC,CAAC;YACH,OAAO;gBACN,KAAK,EAAE,IAAI;aACX,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO;gBACN,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,sDAAsD;aAC7D,CAAC;QACH,CAAC;IACF,CAAC,CAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PlacidTemplate, PlacidImage, PlacidCreateImageRequest, PlacidCreatePdfRequest, PlacidCreateVideoRequest } from './index';
2
+ export declare class PlacidClient {
3
+ private apiKey;
4
+ constructor(apiKey: string);
5
+ listTemplates(): Promise<PlacidTemplate[]>;
6
+ getTemplate(templateId: string): Promise<PlacidTemplate>;
7
+ createImage(request: PlacidCreateImageRequest): Promise<PlacidImage>;
8
+ getImage(imageId: string): Promise<PlacidImage>;
9
+ deleteImage(imageId: string): Promise<void>;
10
+ createPdf(request: PlacidCreatePdfRequest): Promise<PlacidImage>;
11
+ createVideo(request: PlacidCreateVideoRequest): Promise<PlacidImage>;
12
+ pollForCompletion(id: string, type: 'image' | 'pdf' | 'video'): Promise<PlacidImage>;
13
+ getPdf(pdfId: string): Promise<PlacidImage>;
14
+ getVideo(videoId: string): Promise<PlacidImage>;
15
+ }
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlacidClient = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@taskmagic/pieces-common");
6
+ const index_1 = require("./index");
7
+ class PlacidClient {
8
+ constructor(apiKey) {
9
+ this.apiKey = apiKey;
10
+ }
11
+ listTemplates() {
12
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ const templates = [];
14
+ let nextUrl = `${index_1.PLACID_BASE_URL}/templates`;
15
+ do {
16
+ const response = yield pieces_common_1.httpClient.sendRequest({
17
+ method: pieces_common_1.HttpMethod.GET,
18
+ url: nextUrl,
19
+ authentication: {
20
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
21
+ token: this.apiKey,
22
+ },
23
+ });
24
+ const { data, links } = response.body;
25
+ templates.push(...data);
26
+ nextUrl = links.next;
27
+ } while (nextUrl);
28
+ return templates;
29
+ });
30
+ }
31
+ getTemplate(templateId) {
32
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
33
+ const response = yield pieces_common_1.httpClient.sendRequest({
34
+ method: pieces_common_1.HttpMethod.GET,
35
+ url: `${index_1.PLACID_BASE_URL}/templates/${templateId}`,
36
+ authentication: {
37
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
38
+ token: this.apiKey,
39
+ },
40
+ });
41
+ return response.body;
42
+ });
43
+ }
44
+ createImage(request) {
45
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ const response = yield pieces_common_1.httpClient.sendRequest({
47
+ method: pieces_common_1.HttpMethod.POST,
48
+ url: `${index_1.PLACID_BASE_URL}/images`,
49
+ body: request,
50
+ authentication: {
51
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
52
+ token: this.apiKey,
53
+ },
54
+ });
55
+ const result = response.body;
56
+ // If create_now is true, poll until completion
57
+ if (request.create_now && result.status === 'queued') {
58
+ return yield this.pollForCompletion(result.id, 'image');
59
+ }
60
+ return result;
61
+ });
62
+ }
63
+ getImage(imageId) {
64
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
+ var _a, _b, _c;
66
+ try {
67
+ const response = yield pieces_common_1.httpClient.sendRequest({
68
+ method: pieces_common_1.HttpMethod.GET,
69
+ url: `${index_1.PLACID_BASE_URL}/images/${imageId}`,
70
+ authentication: {
71
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
72
+ token: this.apiKey,
73
+ },
74
+ });
75
+ return response.body;
76
+ }
77
+ catch (error) {
78
+ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
79
+ throw new Error(`Image with ID ${imageId} not found. Please verify the image ID exists in your Placid account.`);
80
+ }
81
+ if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
82
+ throw new Error(`Access forbidden for image ID ${imageId}. This image may not belong to your account or may have been deleted.`);
83
+ }
84
+ if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 500) {
85
+ throw new Error(`Server error while retrieving image ID ${imageId}. Please try again later or contact support.`);
86
+ }
87
+ throw error;
88
+ }
89
+ });
90
+ }
91
+ deleteImage(imageId) {
92
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
+ yield pieces_common_1.httpClient.sendRequest({
94
+ method: pieces_common_1.HttpMethod.DELETE,
95
+ url: `${index_1.PLACID_BASE_URL}/images/${imageId}`,
96
+ authentication: {
97
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
98
+ token: this.apiKey,
99
+ },
100
+ });
101
+ });
102
+ }
103
+ createPdf(request) {
104
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
105
+ const response = yield pieces_common_1.httpClient.sendRequest({
106
+ method: pieces_common_1.HttpMethod.POST,
107
+ url: `${index_1.PLACID_BASE_URL}/pdfs`,
108
+ body: request,
109
+ authentication: {
110
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
111
+ token: this.apiKey,
112
+ },
113
+ });
114
+ const result = response.body;
115
+ // If create_now is true, poll until completion
116
+ if (request.create_now && result.status === 'queued') {
117
+ return yield this.pollForCompletion(result.id, 'pdf');
118
+ }
119
+ return result;
120
+ });
121
+ }
122
+ createVideo(request) {
123
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
124
+ const response = yield pieces_common_1.httpClient.sendRequest({
125
+ method: pieces_common_1.HttpMethod.POST,
126
+ url: `${index_1.PLACID_BASE_URL}/videos`,
127
+ body: request,
128
+ authentication: {
129
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
130
+ token: this.apiKey,
131
+ },
132
+ });
133
+ const result = response.body;
134
+ // If create_now is true, poll until completion
135
+ if (request.create_now && result.status === 'queued') {
136
+ return yield this.pollForCompletion(result.id, 'video');
137
+ }
138
+ return result;
139
+ });
140
+ }
141
+ pollForCompletion(id, type) {
142
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
143
+ const maxAttempts = 30; // 5 minutes max (10 second intervals)
144
+ const interval = 10000; // 10 seconds
145
+ for (let attempt = 0; attempt < maxAttempts; attempt++) {
146
+ try {
147
+ // Wait before polling (except first attempt)
148
+ if (attempt > 0) {
149
+ yield new Promise((resolve) => setTimeout(resolve, interval));
150
+ }
151
+ // Get current status
152
+ let result;
153
+ switch (type) {
154
+ case 'image':
155
+ result = yield this.getImage(id);
156
+ break;
157
+ case 'pdf':
158
+ result = yield this.getPdf(id);
159
+ break;
160
+ case 'video':
161
+ result = yield this.getVideo(id);
162
+ break;
163
+ }
164
+ // Check if completed
165
+ if (result.status === 'finished') {
166
+ return result;
167
+ }
168
+ // Check if failed
169
+ if (result.status === 'error') {
170
+ throw new Error(`${type} generation failed: ${result.error_message || 'Unknown error'}`);
171
+ }
172
+ // Continue polling if still queued/processing
173
+ }
174
+ catch (error) {
175
+ // If it's the last attempt, throw the error
176
+ if (attempt === maxAttempts - 1) {
177
+ throw new Error(`Polling timeout: ${type} generation took too long`);
178
+ }
179
+ // Otherwise, continue polling
180
+ }
181
+ }
182
+ throw new Error(`Polling timeout: ${type} generation took too long`);
183
+ });
184
+ }
185
+ getPdf(pdfId) {
186
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
187
+ var _a, _b, _c;
188
+ try {
189
+ const response = yield pieces_common_1.httpClient.sendRequest({
190
+ method: pieces_common_1.HttpMethod.GET,
191
+ url: `${index_1.PLACID_BASE_URL}/pdfs/${pdfId}`,
192
+ authentication: {
193
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
194
+ token: this.apiKey,
195
+ },
196
+ });
197
+ return response.body;
198
+ }
199
+ catch (error) {
200
+ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
201
+ throw new Error(`PDF with ID ${pdfId} not found. Please verify the PDF ID exists in your Placid account.`);
202
+ }
203
+ if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
204
+ throw new Error(`Access forbidden for PDF ID ${pdfId}. This PDF may not belong to your account or may have been deleted.`);
205
+ }
206
+ if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 500) {
207
+ throw new Error(`Server error while retrieving PDF ID ${pdfId}. Please try again later or contact support.`);
208
+ }
209
+ throw error;
210
+ }
211
+ });
212
+ }
213
+ getVideo(videoId) {
214
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
215
+ var _a, _b, _c;
216
+ try {
217
+ const response = yield pieces_common_1.httpClient.sendRequest({
218
+ method: pieces_common_1.HttpMethod.GET,
219
+ url: `${index_1.PLACID_BASE_URL}/videos/${videoId}`,
220
+ authentication: {
221
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
222
+ token: this.apiKey,
223
+ },
224
+ });
225
+ return response.body;
226
+ }
227
+ catch (error) {
228
+ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
229
+ throw new Error(`Video with ID ${videoId} not found. Please verify the video ID exists in your Placid account.`);
230
+ }
231
+ if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
232
+ throw new Error(`Access forbidden for video ID ${videoId}. This video may not belong to your account or may have been deleted.`);
233
+ }
234
+ if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 500) {
235
+ throw new Error(`Server error while retrieving video ID ${videoId}. Please try again later or contact support.`);
236
+ }
237
+ throw error;
238
+ }
239
+ });
240
+ }
241
+ }
242
+ exports.PlacidClient = PlacidClient;
243
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/common/client.ts"],"names":[],"mappings":";;;;AAAA,4DAAsF;AACtF,mCAOiB;AAEjB,MAAa,YAAY;IACxB,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEhC,aAAa;;YAClB,MAAM,SAAS,GAAG,EAAE,CAAC;YACrB,IAAI,OAAO,GAAuB,GAAG,uBAAe,YAAY,CAAC;YAEjE,GAAG,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;oBAC7C,MAAM,EAAE,0BAAU,CAAC,GAAG;oBACtB,GAAG,EAAE,OAAO;oBACZ,cAAc,EAAE;wBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;wBACrC,KAAK,EAAE,IAAI,CAAC,MAAM;qBAClB;iBACD,CAAC,CAAC;gBAEH,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,IAA4D,CAAC;gBAC9F,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;gBAExB,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC;YACtB,CAAC,QAAQ,OAAO,EAAE;YAElB,OAAO,SAAS,CAAC;QAClB,CAAC;KAAA;IAEK,WAAW,CAAC,UAAkB;;YACnC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiB;gBAC7D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,uBAAe,cAAc,UAAU,EAAE;gBACjD,cAAc,EAAE;oBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;o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CAAC;gBACH,CAAC;gBACD,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CACd,0CAA0C,OAAO,8CAA8C,CAC/F,CAAC;gBACH,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;KAAA;CACD;AA7PD,oCA6PC"}
@@ -0,0 +1,73 @@
1
+ export declare const PLACID_BASE_URL = "https://api.placid.app/api/rest";
2
+ export interface PlacidTemplate {
3
+ uuid: string;
4
+ title: string;
5
+ thumbnail?: string;
6
+ width?: number;
7
+ height?: number;
8
+ tags?: string[];
9
+ custom_data?: any;
10
+ collections?: any[];
11
+ layers: PlacidLayer[];
12
+ }
13
+ export interface PlacidLayer {
14
+ name: string;
15
+ type: 'text' | 'picture' | 'shape' | 'browserframe' | 'subtitle' | 'barcode' | 'rating';
16
+ }
17
+ export interface PlacidImage {
18
+ id: string;
19
+ status: 'queued' | 'finished' | 'error';
20
+ image_url?: string;
21
+ polling_url: string;
22
+ error_message?: string;
23
+ }
24
+ export interface PlacidCreateImageRequest {
25
+ template_uuid: string;
26
+ layers?: Record<string, any>;
27
+ modifications?: {
28
+ width?: number;
29
+ height?: number;
30
+ filename?: string;
31
+ dpi?: number;
32
+ };
33
+ webhook_success?: string;
34
+ create_now?: boolean;
35
+ passthrough?: Record<string, any> | string;
36
+ }
37
+ export interface PlacidCreatePdfRequest {
38
+ pages: Array<{
39
+ template_uuid: string;
40
+ layers?: Record<string, any>;
41
+ }>;
42
+ modifications?: {
43
+ filename?: string;
44
+ quality?: number;
45
+ dpi?: number;
46
+ };
47
+ webhook_success?: string;
48
+ create_now?: boolean;
49
+ passthrough?: Record<string, any> | string;
50
+ }
51
+ export interface PlacidCreateVideoRequest {
52
+ clips: Array<{
53
+ template_uuid: string;
54
+ layers?: Record<string, any>;
55
+ }>;
56
+ modifications?: {
57
+ width?: number;
58
+ height?: number;
59
+ filename?: string;
60
+ canvas_background?: string;
61
+ fps?: number;
62
+ };
63
+ webhook_success?: string;
64
+ create_now?: boolean;
65
+ passthrough?: Record<string, any> | string;
66
+ }
67
+ export interface PlacidWebhookPayload {
68
+ id: string;
69
+ status: string;
70
+ image_url?: string;
71
+ template_uuid: string;
72
+ passthrough?: Record<string, any>;
73
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLACID_BASE_URL = void 0;
4
+ exports.PLACID_BASE_URL = 'https://api.placid.app/api/rest';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/common/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,iCAAiC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const templateDropdown: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
2
+ export declare const imageTemplateDropdown: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
3
+ export declare const pdfTemplateDropdown: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
4
+ export declare const videoTemplateDropdown: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
5
+ export declare const modificationsProperty: import("@taskmagic/pieces-framework").ObjectProperty<false>;
6
+ export declare const webhookProperty: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
7
+ export declare const createNowProperty: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
8
+ export declare const passthroughProperty: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
9
+ export declare const templateLayersProperty: (type: string) => import("@taskmagic/pieces-framework").DynamicProperties<false>;
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.templateLayersProperty = exports.passthroughProperty = exports.createNowProperty = exports.webhookProperty = exports.modificationsProperty = exports.videoTemplateDropdown = exports.pdfTemplateDropdown = exports.imageTemplateDropdown = exports.templateDropdown = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const client_1 = require("./client");
7
+ const createTemplateDropdown = (outputType) => pieces_framework_1.Property.Dropdown({
8
+ displayName: 'Template',
9
+ description: `Select a Placid template${outputType ? ` for ${outputType} generation` : ''}`,
10
+ required: true,
11
+ refreshers: ['auth'],
12
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
13
+ if (!auth) {
14
+ return {
15
+ disabled: true,
16
+ options: [],
17
+ placeholder: 'Please connect your account first',
18
+ };
19
+ }
20
+ try {
21
+ const client = new client_1.PlacidClient(auth);
22
+ const templates = yield client.listTemplates();
23
+ if (!templates || templates.length === 0) {
24
+ return {
25
+ options: [],
26
+ placeholder: 'No templates found in your Placid project',
27
+ };
28
+ }
29
+ // Filter templates by tags or naming if outputType is specified
30
+ let filteredTemplates = templates;
31
+ if (outputType) {
32
+ filteredTemplates = templates.filter((template) => {
33
+ var _a;
34
+ const title = template.title.toLowerCase();
35
+ const tags = ((_a = template.tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag.toLowerCase())) || [];
36
+ // Check if template title or tags indicate it's for this output type
37
+ return (title.includes(outputType) ||
38
+ tags.includes(outputType) ||
39
+ tags.includes(`${outputType}s`) ||
40
+ // For backwards compatibility, if no specific filtering matches, include all
41
+ (!title.includes('image') &&
42
+ !title.includes('pdf') &&
43
+ !title.includes('video') &&
44
+ !tags.some((tag) => ['image', 'pdf', 'video', 'images', 'pdfs', 'videos'].includes(tag))));
45
+ });
46
+ }
47
+ // If filtering resulted in no templates, show all templates with a note
48
+ if (outputType && filteredTemplates.length === 0) {
49
+ filteredTemplates = templates;
50
+ }
51
+ return {
52
+ options: filteredTemplates.map((template) => {
53
+ return {
54
+ label: template.title,
55
+ value: template.uuid,
56
+ };
57
+ }),
58
+ };
59
+ }
60
+ catch (error) {
61
+ return {
62
+ disabled: true,
63
+ options: [],
64
+ placeholder: `Failed to load templates: ${error instanceof Error ? error.message : 'Unknown error'}`,
65
+ };
66
+ }
67
+ }),
68
+ });
69
+ // General template dropdown for all types
70
+ exports.templateDropdown = createTemplateDropdown();
71
+ // Specific template dropdowns for each output type
72
+ exports.imageTemplateDropdown = createTemplateDropdown('image');
73
+ exports.pdfTemplateDropdown = createTemplateDropdown('pdf');
74
+ exports.videoTemplateDropdown = createTemplateDropdown('video');
75
+ exports.modificationsProperty = pieces_framework_1.Property.Object({
76
+ displayName: 'Modifications',
77
+ description: 'Optional modifications to the generated image (width, height, filename)',
78
+ required: false,
79
+ });
80
+ exports.webhookProperty = pieces_framework_1.Property.ShortText({
81
+ displayName: 'Webhook URL',
82
+ description: 'Optional webhook URL to receive notification when generation is complete.',
83
+ required: false,
84
+ });
85
+ exports.createNowProperty = pieces_framework_1.Property.Checkbox({
86
+ displayName: 'Create Now',
87
+ description: 'Whether to create the image immediately (synchronous) or queue it (asynchronous).',
88
+ required: false,
89
+ defaultValue: false,
90
+ });
91
+ exports.passthroughProperty = pieces_framework_1.Property.ShortText({
92
+ displayName: 'Passthrough Text',
93
+ required: false,
94
+ });
95
+ const templateLayersProperty = (type) => pieces_framework_1.Property.DynamicProperties({
96
+ displayName: 'Layers',
97
+ refreshers: ['template'],
98
+ required: false,
99
+ props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, template }) {
100
+ if (!auth || !template)
101
+ return {};
102
+ const props = {};
103
+ const client = new client_1.PlacidClient(auth);
104
+ const response = yield client.getTemplate(template);
105
+ for (const layer of response.layers) {
106
+ switch (layer.type) {
107
+ case 'text': {
108
+ props[`${layer.name}:::text`] = pieces_framework_1.Property.ShortText({
109
+ displayName: `${layer.name} : Text`,
110
+ required: false,
111
+ });
112
+ props[`${layer.name}:::text_color`] = pieces_framework_1.Property.ShortText({
113
+ displayName: `${layer.name} : Text Color`,
114
+ required: false,
115
+ });
116
+ props[`${layer.name}:::font`] = pieces_framework_1.Property.ShortText({
117
+ displayName: `${layer.name} : Text Font`,
118
+ required: false,
119
+ });
120
+ props[`${layer.name}:::alt_text_color`] = pieces_framework_1.Property.ShortText({
121
+ displayName: `${layer.name} : Alternate Text Color`,
122
+ required: false,
123
+ });
124
+ props[`${layer.name}:::alt_font`] = pieces_framework_1.Property.ShortText({
125
+ displayName: `${layer.name} : Alternate Text Font`,
126
+ required: false,
127
+ });
128
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
129
+ displayName: `${layer.name} : Hide Layer`,
130
+ required: false,
131
+ });
132
+ break;
133
+ }
134
+ case 'shape': {
135
+ props[`${layer.name}:::background_color`] = pieces_framework_1.Property.ShortText({
136
+ displayName: `${layer.name} : Background Color`,
137
+ required: false,
138
+ });
139
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
140
+ displayName: `${layer.name} : Hide Layer`,
141
+ required: false,
142
+ });
143
+ break;
144
+ }
145
+ case 'picture': {
146
+ if (type === 'video') {
147
+ props[`${layer.name}:::video`] = pieces_framework_1.Property.ShortText({
148
+ displayName: `${layer.name} : Video`,
149
+ required: false,
150
+ });
151
+ }
152
+ props[`${layer.name}:::image`] = pieces_framework_1.Property.ShortText({
153
+ displayName: `${layer.name} : Image`,
154
+ required: false,
155
+ });
156
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
157
+ displayName: `${layer.name} : Hide Layer`,
158
+ required: false,
159
+ });
160
+ break;
161
+ }
162
+ case 'browserframe': {
163
+ props[`${layer.name}:::image`] = pieces_framework_1.Property.ShortText({
164
+ displayName: `${layer.name} : Image`,
165
+ required: false,
166
+ });
167
+ props[`${layer.name}:::url`] = pieces_framework_1.Property.ShortText({
168
+ displayName: `${layer.name} : URL Text`,
169
+ required: false,
170
+ });
171
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
172
+ displayName: `${layer.name} : Hide Layer`,
173
+ required: false,
174
+ });
175
+ break;
176
+ }
177
+ case 'barcode': {
178
+ props[`${layer.name}:::value`] = pieces_framework_1.Property.ShortText({
179
+ displayName: `${layer.name} : Value`,
180
+ required: false,
181
+ });
182
+ props[`${layer.name}:::color`] = pieces_framework_1.Property.ShortText({
183
+ displayName: `${layer.name} : Color`,
184
+ required: false,
185
+ });
186
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
187
+ displayName: `${layer.name} : Hide Layer`,
188
+ required: false,
189
+ });
190
+ break;
191
+ }
192
+ case 'rating': {
193
+ props[`${layer.name}:::value`] = pieces_framework_1.Property.ShortText({
194
+ displayName: `${layer.name} : Value`,
195
+ required: false,
196
+ });
197
+ props[`${layer.name}:::hide`] = pieces_framework_1.Property.Checkbox({
198
+ displayName: `${layer.name} : Hide Layer`,
199
+ required: false,
200
+ });
201
+ break;
202
+ }
203
+ default:
204
+ break;
205
+ }
206
+ }
207
+ return props;
208
+ }),
209
+ });
210
+ exports.templateLayersProperty = templateLayersProperty;
211
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/placid/src/lib/common/props.ts"],"names":[],"mappings":";;;;AAAA,kEAA0E;AAC1E,qCAAwC;AAExC,MAAM,sBAAsB,GAAG,CAAC,UAAsC,EAAE,EAAE,CACzE,2BAAQ,CAAC,QAAQ,CAAC;IACjB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,2BAA2B,UAAU,CAAC,CAAC,CAAC,QAAQ,UAAU,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE;IAC3F,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,OAAO;gBACN,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mCAAmC;aAChD,CAAC;QACH,CAAC;QAED,IAAI,CAAC;YACJ,MAAM,MA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