n8n-nodes-cloudinary 0.0.8 → 0.1.0

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 (118) hide show
  1. package/README.md +51 -0
  2. package/dist/credentials/CloudinaryApi.credentials.js +16 -0
  3. package/dist/credentials/CloudinaryApi.credentials.js.map +1 -1
  4. package/dist/nodes/Cloudinary/Cloudinary.node.d.ts +0 -1
  5. package/dist/nodes/Cloudinary/Cloudinary.node.js +26 -707
  6. package/dist/nodes/Cloudinary/Cloudinary.node.js.map +1 -1
  7. package/dist/nodes/Cloudinary/Cloudinary.node.json +5 -1
  8. package/dist/nodes/Cloudinary/cloudinary.utils.d.ts +34 -0
  9. package/dist/nodes/Cloudinary/cloudinary.utils.js +114 -3
  10. package/dist/nodes/Cloudinary/cloudinary.utils.js.map +1 -1
  11. package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.d.ts +2 -0
  12. package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.js +64 -0
  13. package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.js.map +1 -0
  14. package/dist/nodes/Cloudinary/descriptions/admin/search.fields.d.ts +2 -0
  15. package/dist/nodes/Cloudinary/descriptions/admin/search.fields.js +119 -0
  16. package/dist/nodes/Cloudinary/descriptions/admin/search.fields.js.map +1 -0
  17. package/dist/nodes/Cloudinary/descriptions/asset.fields.d.ts +2 -0
  18. package/dist/nodes/Cloudinary/descriptions/asset.fields.js +357 -0
  19. package/dist/nodes/Cloudinary/descriptions/asset.fields.js.map +1 -0
  20. package/dist/nodes/Cloudinary/descriptions/index.d.ts +2 -0
  21. package/dist/nodes/Cloudinary/descriptions/index.js +22 -0
  22. package/dist/nodes/Cloudinary/descriptions/index.js.map +1 -0
  23. package/dist/nodes/Cloudinary/descriptions/resource.d.ts +2 -0
  24. package/dist/nodes/Cloudinary/descriptions/resource.js +267 -0
  25. package/dist/nodes/Cloudinary/descriptions/resource.js.map +1 -0
  26. package/dist/nodes/Cloudinary/descriptions/transform.fields.d.ts +2 -0
  27. package/dist/nodes/Cloudinary/descriptions/transform.fields.js +742 -0
  28. package/dist/nodes/Cloudinary/descriptions/transform.fields.js.map +1 -0
  29. package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.d.ts +2 -0
  30. package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.js +262 -0
  31. package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.js.map +1 -0
  32. package/dist/nodes/Cloudinary/descriptions/upload.fields.d.ts +2 -0
  33. package/dist/nodes/Cloudinary/descriptions/upload.fields.js +191 -0
  34. package/dist/nodes/Cloudinary/descriptions/upload.fields.js.map +1 -0
  35. package/dist/nodes/Cloudinary/descriptions/widget.fields.d.ts +2 -0
  36. package/dist/nodes/Cloudinary/descriptions/widget.fields.js +268 -0
  37. package/dist/nodes/Cloudinary/descriptions/widget.fields.js.map +1 -0
  38. package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.d.ts +2 -0
  39. package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.js +17 -0
  40. package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.js.map +1 -0
  41. package/dist/nodes/Cloudinary/operations/admin/getTags.d.ts +2 -0
  42. package/dist/nodes/Cloudinary/operations/admin/getTags.js +28 -0
  43. package/dist/nodes/Cloudinary/operations/admin/getTags.js.map +1 -0
  44. package/dist/nodes/Cloudinary/operations/admin/search.d.ts +2 -0
  45. package/dist/nodes/Cloudinary/operations/admin/search.js +92 -0
  46. package/dist/nodes/Cloudinary/operations/admin/search.js.map +1 -0
  47. package/dist/nodes/Cloudinary/operations/asset/updateMetadata.d.ts +2 -0
  48. package/dist/nodes/Cloudinary/operations/asset/updateMetadata.js +25 -0
  49. package/dist/nodes/Cloudinary/operations/asset/updateMetadata.js.map +1 -0
  50. package/dist/nodes/Cloudinary/operations/asset/updateTags.d.ts +2 -0
  51. package/dist/nodes/Cloudinary/operations/asset/updateTags.js +30 -0
  52. package/dist/nodes/Cloudinary/operations/asset/updateTags.js.map +1 -0
  53. package/dist/nodes/Cloudinary/operations/index.d.ts +2 -0
  54. package/dist/nodes/Cloudinary/operations/index.js +50 -0
  55. package/dist/nodes/Cloudinary/operations/index.js.map +1 -0
  56. package/dist/nodes/Cloudinary/operations/tagAppend.d.ts +4 -0
  57. package/dist/nodes/Cloudinary/operations/tagAppend.js +44 -0
  58. package/dist/nodes/Cloudinary/operations/tagAppend.js.map +1 -0
  59. package/dist/nodes/Cloudinary/operations/transform/convertImage.d.ts +2 -0
  60. package/dist/nodes/Cloudinary/operations/transform/convertImage.js +23 -0
  61. package/dist/nodes/Cloudinary/operations/transform/convertImage.js.map +1 -0
  62. package/dist/nodes/Cloudinary/operations/transform/cropImage.d.ts +3 -0
  63. package/dist/nodes/Cloudinary/operations/transform/cropImage.js +31 -0
  64. package/dist/nodes/Cloudinary/operations/transform/cropImage.js.map +1 -0
  65. package/dist/nodes/Cloudinary/operations/transform/customTransformation.d.ts +2 -0
  66. package/dist/nodes/Cloudinary/operations/transform/customTransformation.js +28 -0
  67. package/dist/nodes/Cloudinary/operations/transform/customTransformation.js.map +1 -0
  68. package/dist/nodes/Cloudinary/operations/transform/multiStep.d.ts +2 -0
  69. package/dist/nodes/Cloudinary/operations/transform/multiStep.js +78 -0
  70. package/dist/nodes/Cloudinary/operations/transform/multiStep.js.map +1 -0
  71. package/dist/nodes/Cloudinary/operations/transform/optimizeImage.d.ts +2 -0
  72. package/dist/nodes/Cloudinary/operations/transform/optimizeImage.js +22 -0
  73. package/dist/nodes/Cloudinary/operations/transform/optimizeImage.js.map +1 -0
  74. package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.d.ts +2 -0
  75. package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.js +22 -0
  76. package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.js.map +1 -0
  77. package/dist/nodes/Cloudinary/operations/transform/resizeImage.d.ts +3 -0
  78. package/dist/nodes/Cloudinary/operations/transform/resizeImage.js +28 -0
  79. package/dist/nodes/Cloudinary/operations/transform/resizeImage.js.map +1 -0
  80. package/dist/nodes/Cloudinary/operations/transform/shared.d.ts +47 -0
  81. package/dist/nodes/Cloudinary/operations/transform/shared.js +179 -0
  82. package/dist/nodes/Cloudinary/operations/transform/shared.js.map +1 -0
  83. package/dist/nodes/Cloudinary/operations/transform/trimVideo.d.ts +2 -0
  84. package/dist/nodes/Cloudinary/operations/transform/trimVideo.js +24 -0
  85. package/dist/nodes/Cloudinary/operations/transform/trimVideo.js.map +1 -0
  86. package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.d.ts +2 -0
  87. package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.js +34 -0
  88. package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.js.map +1 -0
  89. package/dist/nodes/Cloudinary/operations/types.d.ts +10 -0
  90. package/dist/nodes/Cloudinary/operations/types.js +5 -0
  91. package/dist/nodes/Cloudinary/operations/types.js.map +1 -0
  92. package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.d.ts +2 -0
  93. package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.js +36 -0
  94. package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.js.map +1 -0
  95. package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.d.ts +2 -0
  96. package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.js +20 -0
  97. package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.js.map +1 -0
  98. package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.d.ts +2 -0
  99. package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.js +27 -0
  100. package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.js.map +1 -0
  101. package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.d.ts +2 -0
  102. package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.js +32 -0
  103. package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.js.map +1 -0
  104. package/dist/nodes/Cloudinary/operations/upload/uploadFile.d.ts +2 -0
  105. package/dist/nodes/Cloudinary/operations/upload/uploadFile.js +44 -0
  106. package/dist/nodes/Cloudinary/operations/upload/uploadFile.js.map +1 -0
  107. package/dist/nodes/Cloudinary/operations/upload/uploadUrl.d.ts +2 -0
  108. package/dist/nodes/Cloudinary/operations/upload/uploadUrl.js +34 -0
  109. package/dist/nodes/Cloudinary/operations/upload/uploadUrl.js.map +1 -0
  110. package/dist/nodes/Cloudinary/operations/widget/videoPlayer.d.ts +2 -0
  111. package/dist/nodes/Cloudinary/operations/widget/videoPlayer.js +170 -0
  112. package/dist/nodes/Cloudinary/operations/widget/videoPlayer.js.map +1 -0
  113. package/dist/package.json +7 -3
  114. package/dist/tsconfig.tsbuildinfo +1 -1
  115. package/package.json +7 -3
  116. package/dist/nodes/Cloudinary/sha1.utils.d.ts +0 -1
  117. package/dist/nodes/Cloudinary/sha1.utils.js +0 -68
  118. package/dist/nodes/Cloudinary/sha1.utils.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ import { IDataObject, IExecuteFunctions } from 'n8n-workflow';
2
+ export declare const CREDENTIAL_TYPE = "cloudinaryApi";
3
+ export interface CloudinaryCredentials {
4
+ cloudName: string;
5
+ apiKey: string;
6
+ apiSecret: string;
7
+ privateCdn?: boolean;
8
+ secureDistribution?: string;
9
+ }
10
+ export type OperationHandler = (ctx: IExecuteFunctions, i: number, creds: CloudinaryCredentials) => Promise<IDataObject[]>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREDENTIAL_TYPE = void 0;
4
+ exports.CREDENTIAL_TYPE = 'cloudinaryApi';
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../nodes/Cloudinary/operations/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const deleteAssets: OperationHandler;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteAssets = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
6
+ const types_1 = require("../types");
7
+ const deleteAssets = async (ctx, i, creds) => {
8
+ const resourceType = ctx.getNodeParameter('resourceType', i);
9
+ const type = ctx.getNodeParameter('type', i);
10
+ const rawPublicIds = ctx.getNodeParameter('publicIds', i);
11
+ const deleteOptions = ctx.getNodeParameter('deleteOptions', i, {});
12
+ const publicIds = Array.isArray(rawPublicIds)
13
+ ? rawPublicIds.map((s) => String(s).trim()).filter((s) => s.length > 0)
14
+ : (0, cloudinary_utils_1.splitCsvIds)(rawPublicIds);
15
+ if (publicIds.length === 0) {
16
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'No public IDs provided', {
17
+ description: 'Provide at least one public_id (comma-separated for many).',
18
+ itemIndex: i,
19
+ });
20
+ }
21
+ const qs = {
22
+ public_ids: publicIds.join(','),
23
+ ...deleteOptions,
24
+ };
25
+ const options = {
26
+ method: 'DELETE',
27
+ url: (0, cloudinary_utils_1.buildResourceDeleteUrl)(creds.cloudName, resourceType, type),
28
+ qs,
29
+ headers: (0, cloudinary_utils_1.jsonHeaders)(),
30
+ auth: (0, cloudinary_utils_1.basicAuth)(creds),
31
+ };
32
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
33
+ return [response];
34
+ };
35
+ exports.deleteAssets = deleteAssets;
36
+ //# sourceMappingURL=deleteAssets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteAssets.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/updateAsset/deleteAssets.ts"],"names":[],"mappings":";;;AAAA,+CAAoF;AACpF,6DAKgC;AAChC,oCAA6D;AAEtD,MAAM,YAAY,GAAqB,K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AI,EAAE,IAAA,4BAAS,EAAC,KAAK,CAAC;KACtB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACpE,GAAG,EACH,uBAAe,EACf,OAAO,CACP,CAAC;IACF,OAAO,CAAC,QAAuB,CAAC,CAAC;AAClC,CAAC,CAAC;AA3CW,QAAA,YAAY,gBA2CvB"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const getAsset: OperationHandler;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAsset = void 0;
4
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
5
+ const types_1 = require("../types");
6
+ const getAsset = async (ctx, i, creds) => {
7
+ const assetId = ctx.getNodeParameter('assetId', i);
8
+ const getOptions = ctx.getNodeParameter('getOptions', i, {});
9
+ const options = {
10
+ method: 'GET',
11
+ url: (0, cloudinary_utils_1.buildResourceByAssetIdUrl)(creds.cloudName, assetId),
12
+ qs: getOptions,
13
+ headers: (0, cloudinary_utils_1.jsonHeaders)(),
14
+ auth: (0, cloudinary_utils_1.basicAuth)(creds),
15
+ };
16
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
17
+ return [response];
18
+ };
19
+ exports.getAsset = getAsset;
20
+ //# sourceMappingURL=getAsset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAsset.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/updateAsset/getAsset.ts"],"names":[],"mappings":";;;AACA,6DAA2F;AAC3F,oCAA6D;AAEtD,MAAM,QAAQ,GAAqB,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAW,CAAC;IAC7D,MAAM,UAAU,GAAG,GAAG,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAgB,CAAC;IAE5E,MAAM,OAAO,GAAwB;QACpC,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,IAAA,4CAAyB,EAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACxD,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,IAAA,8BAAW,GAAE;QACtB,IAAI,EAAE,IAAA,4BAAS,EAAC,KAAK,CAAC;KACtB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACpE,GAAG,EACH,uBAAe,EACf,OAAO,CACP,CAAC;IACF,OAAO,CAAC,QAAuB,CAAC,CAAC;AAClC,CAAC,CAAC;AAlBW,QAAA,QAAQ,YAkBnB"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const updateMetadata: OperationHandler;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateMetadata = void 0;
4
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
5
+ const types_1 = require("../types");
6
+ const updateMetadata = async (ctx, i, creds) => {
7
+ const publicId = ctx.getNodeParameter('publicId', i);
8
+ const resourceType = ctx.getNodeParameter('resourceType', i);
9
+ const type = ctx.getNodeParameter('type', i);
10
+ const structuredMetadata = ctx.getNodeParameter('structuredMetadata', i);
11
+ const updateOptions = ctx.getNodeParameter('updateOptions', i, {});
12
+ const body = {
13
+ metadata: (0, cloudinary_utils_1.metadataToPipeString)(structuredMetadata),
14
+ ...updateOptions,
15
+ };
16
+ const options = {
17
+ method: 'POST',
18
+ url: (0, cloudinary_utils_1.buildResourceUpdateUrl)(creds.cloudName, resourceType, type, publicId),
19
+ body,
20
+ headers: (0, cloudinary_utils_1.jsonHeaders)(),
21
+ auth: (0, cloudinary_utils_1.basicAuth)(creds),
22
+ };
23
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
24
+ return [response];
25
+ };
26
+ exports.updateMetadata = updateMetadata;
27
+ //# sourceMappingURL=updateMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateMetadata.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/updateAsset/updateMetadata.ts"],"names":[],"mappings":";;;AACA,6DAA8G;AAC9G,oCAA6D;AAEtD,MAAM,cAAc,GAAqB,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;IACvE,MAAM,QAAQ,GAAG,GAAG,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAC/D,MAAM,YAAY,GAAG,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;IACvE,MAAM,IAAI,GAAG,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;IACvD,MAAM,kBAAkB,GAAG,GAAG,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,CAAW,CAAC;IACnF,MAAM,aAAa,GAAG,GAAG,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,EAAE,EAAE,CAAgB,CAAC;IAElF,MAAM,IAAI,GAAgB;QACzB,QAAQ,EAAE,IAAA,uCAAoB,EAAC,kBAAkB,CAAC;QAClD,GAAG,aAAa;KAChB,CAAC;IAEF,MAAM,OAAO,GAAwB;QACpC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,IAAA,yCAAsB,EAAC,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,CAAC;QAC1E,IAAI;QACJ,OAAO,EAAE,IAAA,8BAAW,GAAE;QACtB,IAAI,EAAE,IAAA,4BAAS,EAAC,KAAK,CAAC;KACtB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACpE,GAAG,EACH,uBAAe,EACf,OAAO,CACP,CAAC;IACF,OAAO,CAAC,QAAuB,CAAC,CAAC;AAClC,CAAC,CAAC;AA1BW,QAAA,cAAc,kBA0BzB"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const updateTags: OperationHandler;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateTags = void 0;
4
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
5
+ const types_1 = require("../types");
6
+ const tagAppend_1 = require("../tagAppend");
7
+ const updateTags = async (ctx, i, creds) => {
8
+ const tagMode = ctx.getNodeParameter('tagMode', i, 'set');
9
+ if (tagMode === 'append') {
10
+ return (0, tagAppend_1.appendTags)(ctx, i, creds);
11
+ }
12
+ const publicId = ctx.getNodeParameter('publicId', i);
13
+ const resourceType = ctx.getNodeParameter('resourceType', i);
14
+ const type = ctx.getNodeParameter('type', i);
15
+ const tags = ctx.getNodeParameter('tags', i);
16
+ const updateOptions = ctx.getNodeParameter('updateOptions', i, {});
17
+ const body = {
18
+ tags,
19
+ ...updateOptions,
20
+ };
21
+ const options = {
22
+ method: 'POST',
23
+ url: (0, cloudinary_utils_1.buildResourceUpdateUrl)(creds.cloudName, resourceType, type, publicId),
24
+ body,
25
+ headers: (0, cloudinary_utils_1.jsonHeaders)(),
26
+ auth: (0, cloudinary_utils_1.basicAuth)(creds),
27
+ };
28
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
29
+ return [response];
30
+ };
31
+ exports.updateTags = updateTags;
32
+ //# sourceMappingURL=updateTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateTags.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/updateAsset/updateTags.ts"],"names":[],"mappings":";;;AACA,6DAAwF;AACxF,oCAA6D;AAC7D,4CAA0C;AAEnC,MAAM,UAAU,GAAqB,KAAK,EAAE,GAAG,EAAE,CAA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ler } from '../types';
2
+ export declare const uploadFile: OperationHandler;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadFile = void 0;
4
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
5
+ const types_1 = require("../types");
6
+ const uploadFile = async (ctx, i, creds) => {
7
+ const binaryPropertyName = ctx.getNodeParameter('file', i);
8
+ const resourceType = ctx.getNodeParameter('resource_type_file', i);
9
+ const additionalFields = ctx.getNodeParameter('additionalFieldsFile', i, {});
10
+ if (additionalFields.metadata) {
11
+ additionalFields.metadata = (0, cloudinary_utils_1.metadataToPipeString)(additionalFields.metadata);
12
+ }
13
+ const binaryData = ctx.helpers.assertBinaryData(i, binaryPropertyName);
14
+ const dataBuffer = await ctx.helpers.getBinaryDataBuffer(i, binaryPropertyName);
15
+ const timestamp = Math.round(new Date().getTime() / 1000);
16
+ const params = {
17
+ timestamp,
18
+ api_key: creds.apiKey,
19
+ ...additionalFields,
20
+ };
21
+ const signature = (0, cloudinary_utils_1.generateCloudinarySignature)(params, creds.apiSecret);
22
+ const fields = {
23
+ api_key: creds.apiKey,
24
+ timestamp: timestamp.toString(),
25
+ signature,
26
+ };
27
+ for (const key in additionalFields) {
28
+ fields[key] = additionalFields[key];
29
+ }
30
+ const { body, boundary } = (0, cloudinary_utils_1.createMultipartBody)(fields, dataBuffer, binaryData.fileName || 'file', binaryData.mimeType || 'application/octet-stream');
31
+ const options = {
32
+ method: 'POST',
33
+ url: (0, cloudinary_utils_1.buildUploadUrl)(creds.cloudName, resourceType),
34
+ body,
35
+ headers: {
36
+ 'Content-Type': `multipart/form-data; boundary=${boundary}`,
37
+ 'User-Agent': cloudinary_utils_1.USER_AGENT,
38
+ },
39
+ };
40
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
41
+ return [response];
42
+ };
43
+ exports.uploadFile = uploadFile;
44
+ //# sourceMappingURL=uploadFile.js.map
@@ -0,0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C/B,SAAS;KACT,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACpC,MAAM,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAW,CAAC;IAC/C,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAA,sCAAmB,EAC7C,MAAM,EACN,UAAU,EACV,UAAU,CAAC,QAAQ,IAAI,MAAM,EAC7B,UAAU,CAAC,QAAQ,IAAI,0BAA0B,CACjD,CAAC;IAEF,MAAM,OAAO,GAAwB;QACpC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,IAAA,iCAAc,EAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC;QAClD,IAAI;QACJ,OAAO,EAAE;YACR,cAAc,EAAE,iCAAiC,QAAQ,EAAE;YAC3D,YAAY,EAAE,6BAAU;SACxB;KACD,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACpE,GAAG,EACH,uBAAe,EACf,OAAO,CACP,CAAC;IACF,OAAO,CAAC,QAAuB,CAAC,CAAC;AAClC,CAAC,CAAC;AAtDW,QAAA,UAAU,cAsDrB"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const uploadUrl: OperationHandler;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadUrl = void 0;
4
+ const cloudinary_utils_1 = require("../../cloudinary.utils");
5
+ const types_1 = require("../types");
6
+ const uploadUrl = async (ctx, i, creds) => {
7
+ const url = ctx.getNodeParameter('url', i);
8
+ const resourceType = ctx.getNodeParameter('resource_type', i);
9
+ const additionalFields = ctx.getNodeParameter('additionalFields', i, {});
10
+ if (additionalFields.metadata) {
11
+ additionalFields.metadata = (0, cloudinary_utils_1.metadataToPipeString)(additionalFields.metadata);
12
+ }
13
+ const timestamp = Math.round(new Date().getTime() / 1000);
14
+ const params = {
15
+ timestamp,
16
+ api_key: creds.apiKey,
17
+ file: url,
18
+ ...additionalFields,
19
+ };
20
+ params.signature = (0, cloudinary_utils_1.generateCloudinarySignature)(params, creds.apiSecret);
21
+ const options = {
22
+ method: 'POST',
23
+ url: (0, cloudinary_utils_1.buildUploadUrl)(creds.cloudName, resourceType),
24
+ body: params,
25
+ headers: {
26
+ 'Content-Type': 'application/x-www-form-urlencoded',
27
+ 'User-Agent': cloudinary_utils_1.USER_AGENT,
28
+ },
29
+ };
30
+ const response = await ctx.helpers.httpRequestWithAuthentication.call(ctx, types_1.CREDENTIAL_TYPE, options);
31
+ return [response];
32
+ };
33
+ exports.uploadUrl = uploadUrl;
34
+ //# sourceMappingURL=uploadUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadUrl.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/upload/uploadUrl.ts"],"names":[],"mappings":";;;AACA,6DAKgC;AAChC,oCAA6D;AAEtD,MAAM,SAAS,GAAqB,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;IAClE,MAAM,GAAG,GAAG,GAAG,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,CAAW,CAAC;IACrD,MAAM,YAAY,GAAG,GAAG,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAW,CAAC;IACxE,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAgB,CAAC;IAExF,IAAI,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAA,uCAAoB,EAC/C,gBAAgB,CAAC,QAAgC,CACjD,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAgB;QAC3B,SAAS;QACT,OAAO,EAAE,KAAK,CAAC,MAAM;QACrB,IAAI,EAAE,GAAG;QACT,GAAG,gBAAgB;KACnB,CAAC;IACF,MAAM,CAAC,SAAS,GAAG,IAAA,8CAA2B,EAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAExE,MAAM,OAAO,GAAwB;QACpC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,IAAA,iCAAc,EAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC;QAClD,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACR,cAAc,EAAE,mCAAmC;YACnD,YAAY,EAAE,6BAAU;SACxB;KACD,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACpE,GAAG,EACH,uBAAe,EACf,OAAO,CACP,CAAC;IACF,OAAO,CAAC,QAAuB,CAAC,CAAC;AAClC,CAAC,CAAC;AApCW,QAAA,SAAS,aAoCpB"}
@@ -0,0 +1,2 @@
1
+ import { OperationHandler } from '../types';
2
+ export declare const videoPlayer: OperationHandler;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.videoPlayer = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const shared_1 = require("../transform/shared");
6
+ const ADAPTIVE_STREAMING_TYPES = new Set(['hls', 'dash']);
7
+ const pinsFormat = (transformation) => transformation
8
+ .split('/')
9
+ .some((component) => component.split(',').some((q) => /^f_/.test(q.trim())));
10
+ const videoPlayer = async (ctx, i, creds) => {
11
+ const { publicId, deliveryType } = (0, shared_1.readTransformInput)(ctx, i);
12
+ const p = {
13
+ publicId,
14
+ deliveryType,
15
+ autoplayMode: ctx.getNodeParameter('playerAutoplayMode', i, ''),
16
+ loop: ctx.getNodeParameter('playerLoop', i, false),
17
+ muted: ctx.getNodeParameter('playerMuted', i, false),
18
+ sourceTypes: ctx.getNodeParameter('playerSourceTypes', i, []),
19
+ poster: ctx.getNodeParameter('playerPoster', i, ''),
20
+ transformation: ctx.getNodeParameter('playerTransformation', i, ''),
21
+ fluid: ctx.getNodeParameter('playerFluid', i, false),
22
+ width: ctx.getNodeParameter('playerWidth', i, 0),
23
+ height: ctx.getNodeParameter('playerHeight', i, 0),
24
+ aspectRatio: ctx.getNodeParameter('playerAspectRatio', i, ''),
25
+ cropMode: ctx.getNodeParameter('playerCropMode', i, 'smart'),
26
+ skin: ctx.getNodeParameter('playerSkin', i, 'dark'),
27
+ baseColor: ctx.getNodeParameter('playerBaseColor', i, ''),
28
+ accentColor: ctx.getNodeParameter('playerAccentColor', i, ''),
29
+ textColor: ctx.getNodeParameter('playerTextColor', i, ''),
30
+ fontFace: ctx.getNodeParameter('playerFontFace', i, ''),
31
+ advanced: ctx.getNodeParameter('playerAdvancedOptions', i, {}),
32
+ };
33
+ const streamingType = p.sourceTypes.find((t) => ADAPTIVE_STREAMING_TYPES.has(t));
34
+ if (streamingType && pinsFormat(p.transformation)) {
35
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `The transformation pins a delivery format (an "f_" component, e.g. f_auto:video), which is incompatible with the "${streamingType}" adaptive-streaming source type — Cloudinary rejects a streaming profile for a non-streaming format. Either remove the format selection from the transformation (e.g. drop the Optimize step) or remove "${streamingType}" from Source Types.`, { itemIndex: i });
36
+ }
37
+ if (p.aspectRatio && p.cropMode === 'smart' && p.transformation) {
38
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `The player crops to the "${p.aspectRatio}" Aspect Ratio using the default Smart crop, and that gets merged into your Transformation in a way Cloudinary rejects ("g_auto must be in a transformation component by itself"). Either set Crop Mode to Fill or Pad (they crop without the smart gravity that conflicts), or clear the Aspect Ratio and let your Transformation define the framing.`, { itemIndex: i });
39
+ }
40
+ const embedUrl = buildEmbedUrl(creds.cloudName, p);
41
+ return [
42
+ {
43
+ embed_url: embedUrl,
44
+ player_config: JSON.stringify(buildPlayerConfig(creds.cloudName, p), null, 2),
45
+ public_id: publicId,
46
+ resource_type: 'video',
47
+ type: deliveryType,
48
+ },
49
+ ];
50
+ };
51
+ exports.videoPlayer = videoPlayer;
52
+ function buildEmbedUrl(cloudName, p) {
53
+ const q = [
54
+ `cloud_name=${enc(cloudName)}`,
55
+ `public_id=${enc(p.publicId)}`,
56
+ ];
57
+ if (p.autoplayMode)
58
+ q.push(`player[autoplayMode]=${enc(p.autoplayMode)}`);
59
+ if (p.loop)
60
+ q.push('player[loop]=true');
61
+ if (p.muted)
62
+ q.push('player[muted]=true');
63
+ if (p.fluid)
64
+ q.push('player[fluid]=true');
65
+ if (p.width)
66
+ q.push(`player[width]=${p.width}`);
67
+ if (p.height)
68
+ q.push(`player[height]=${p.height}`);
69
+ if (p.aspectRatio)
70
+ q.push(`player[aspectRatio]=${enc(p.aspectRatio)}`);
71
+ if (p.aspectRatio && p.cropMode && p.cropMode !== 'smart') {
72
+ q.push(`source[cropMode]=${enc(p.cropMode)}`);
73
+ }
74
+ if (p.skin && p.skin !== 'dark')
75
+ q.push(`player[skin]=${enc(p.skin)}`);
76
+ if (p.baseColor)
77
+ q.push(`player[colors][base]=${enc(p.baseColor)}`);
78
+ if (p.accentColor)
79
+ q.push(`player[colors][accent]=${enc(p.accentColor)}`);
80
+ if (p.textColor)
81
+ q.push(`player[colors][text]=${enc(p.textColor)}`);
82
+ if (p.fontFace)
83
+ q.push(`player[fontFace]=${enc(p.fontFace)}`);
84
+ p.sourceTypes.forEach((st, idx) => q.push(`source[sourceTypes][${idx}]=${enc(st)}`));
85
+ if (p.poster)
86
+ q.push(`source[poster]=${enc(p.poster)}`);
87
+ if (p.transformation) {
88
+ q.push(`source[transformation][raw_transformation]=${enc(p.transformation)}`);
89
+ }
90
+ const adv = p.advanced;
91
+ if (adv.controls === false)
92
+ q.push('player[controls]=false');
93
+ if (adv.playsinline)
94
+ q.push('player[playsinline]=true');
95
+ if (adv.bigPlayButton === false)
96
+ q.push('player[bigPlayButton]=false');
97
+ if (adv.pictureInPictureToggle)
98
+ q.push('player[pictureInPictureToggle]=true');
99
+ if (adv.chaptersButton)
100
+ q.push('player[chaptersButton]=true');
101
+ if (adv.seekThumbnails === false)
102
+ q.push('player[seekThumbnails]=false');
103
+ if (adv.hdr)
104
+ q.push('player[hdr]=true');
105
+ if (adv.floatingWhenNotVisible && adv.floatingWhenNotVisible !== 'disabled') {
106
+ q.push(`player[floatingWhenNotVisible]=${enc(String(adv.floatingWhenNotVisible))}`);
107
+ }
108
+ return `https://player.cloudinary.com/embed/?${q.join('&')}`;
109
+ }
110
+ function buildPlayerConfig(cloudName, p) {
111
+ const cfg = { cloudName, publicId: p.publicId };
112
+ if (p.deliveryType && p.deliveryType !== 'upload')
113
+ cfg.type = p.deliveryType;
114
+ if (p.autoplayMode)
115
+ cfg.autoplayMode = p.autoplayMode;
116
+ if (p.loop)
117
+ cfg.loop = true;
118
+ if (p.muted)
119
+ cfg.muted = true;
120
+ if (p.fluid)
121
+ cfg.fluid = true;
122
+ if (p.width)
123
+ cfg.width = p.width;
124
+ if (p.height)
125
+ cfg.height = p.height;
126
+ if (p.aspectRatio)
127
+ cfg.aspectRatio = p.aspectRatio;
128
+ if (p.aspectRatio && p.cropMode && p.cropMode !== 'smart')
129
+ cfg.cropMode = p.cropMode;
130
+ if (p.skin && p.skin !== 'dark')
131
+ cfg.skin = p.skin;
132
+ const colors = {};
133
+ if (p.baseColor)
134
+ colors.base = p.baseColor;
135
+ if (p.accentColor)
136
+ colors.accent = p.accentColor;
137
+ if (p.textColor)
138
+ colors.text = p.textColor;
139
+ if (Object.keys(colors).length)
140
+ cfg.colors = colors;
141
+ if (p.fontFace)
142
+ cfg.fontFace = p.fontFace;
143
+ if (p.sourceTypes.length)
144
+ cfg.sourceTypes = p.sourceTypes;
145
+ if (p.poster)
146
+ cfg.poster = p.poster;
147
+ if (p.transformation)
148
+ cfg.transformation = [{ raw_transformation: p.transformation }];
149
+ const adv = p.advanced;
150
+ if (adv.controls === false)
151
+ cfg.controls = false;
152
+ if (adv.playsinline)
153
+ cfg.playsinline = true;
154
+ if (adv.bigPlayButton === false)
155
+ cfg.bigPlayButton = false;
156
+ if (adv.pictureInPictureToggle)
157
+ cfg.pictureInPictureToggle = true;
158
+ if (adv.chaptersButton)
159
+ cfg.chaptersButton = true;
160
+ if (adv.seekThumbnails === false)
161
+ cfg.seekThumbnails = false;
162
+ if (adv.hdr)
163
+ cfg.hdr = true;
164
+ if (adv.floatingWhenNotVisible && adv.floatingWhenNotVisible !== 'disabled') {
165
+ cfg.floatingWhenNotVisible = adv.floatingWhenNotVisible;
166
+ }
167
+ return cfg;
168
+ }
169
+ const enc = (v) => encodeURIComponent(v);
170
+ //# sourceMappingURL=videoPlayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoPlayer.js","sourceRoot":"","sources":["../../../../../nodes/Cloudinary/operations/widget/videoPlayer.ts"],"names":[],"mappings":";;;AAAA,+CAA+D;AAE/D,gDAAyD;AAGzD,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAU1D,MAAM,UAAU,GAAG,CAAC,cAAsB,EAAW,EAAE,CACtD,cAAc;KACZ,KAAK,CAAC,GAAG,CAAC;KACV,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAwBxE,MAAM,WAAW,GAAqB,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;IACpE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,2BAAkB,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9D,MAAM,CAAC,GAAiB;QACvB,QAAQ;QACR,YAAY;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AAE,kBAAkB,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;IAEtF,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC;IACvB,IAAI,GAAG,CAAC,QAAQ,KAAK,KAAK;QAAE,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;IACjD,IAAI,GAAG,CAAC,WAAW;QAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC;IAC5C,IAAI,GAAG,CAAC,aAAa,KAAK,KAAK;QAAE,GAAG,CAAC,aAAa,GAAG,KAAK,CAAC;IAC3D,IAAI,GAAG,CAAC,sBAAsB;QAAE,GAAG,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAClE,IAAI,GAAG,CAAC,cAAc;QAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC;IAClD,IAAI,GAAG,CAAC,cAAc,KAAK,KAAK;QAAE,GAAG,CAAC,cAAc,GAAG,KAAK,CAAC;IAC7D,IAAI,GAAG,CAAC,GAAG;QAAE,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC;IAC5B,IAAI,GAAG,CAAC,sBAAsB,IAAI,GAAG,CAAC,sBAAsB,KAAK,UAAU,EAAE,CAAC;QAC7E,GAAG,CAAC,sBAAsB,GAAG,GAAG,CAAC,sBAAsB,CAAC;IACzD,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-cloudinary",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "The official Cloudinary n8n node - upload media, update asset tags and metadata, and more",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -30,7 +30,10 @@
30
30
  "lint": "eslint nodes credentials package.json",
31
31
  "lintfix": "eslint nodes credentials package.json --fix",
32
32
  "prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json",
33
- "n8n-validate": "npx @n8n/scan-community-package n8n-nodes-cloudinary"
33
+ "n8n-validate": "npx @n8n/scan-community-package n8n-nodes-cloudinary",
34
+ "test": "vitest run",
35
+ "test:watch": "vitest",
36
+ "backward-compatibility-check": "bash docs/backward-compatibility-check/run.sh"
34
37
  },
35
38
  "files": [
36
39
  "dist"
@@ -52,7 +55,8 @@
52
55
  "gulp": "^5.0.0",
53
56
  "prettier": "^3.5.3",
54
57
  "semantic-release": "^24.2.0",
55
- "typescript": "^5.8.2"
58
+ "typescript": "^5.8.2",
59
+ "vitest": "^4.1.7"
56
60
  },
57
61
  "peerDependencies": {
58
62
  "n8n-workflow": "*"