|
| 1 | +module.exports = { |
| 2 | + "SDKSpecVersion": "master", |
| 3 | + "langConfig": { |
| 4 | + lang: 'Flutter', |
| 5 | + newInstanceSyntax: '#name(#req)#optional', |
| 6 | + methodDelimiter: '.', |
| 7 | + groupDelimiter: '.', |
| 8 | + openQualifiersChar: '', |
| 9 | + closeQualifiersChar: '', |
| 10 | + closeTransformationChar: '', |
| 11 | + hideActionGroups: false, |
| 12 | + unsupportedTxParams: ['fl_waveform', 'e_anti_removal:', 'fl_animated', 'l_fetch', 'l_text', 'u_text', 'af_', 'if_', 'e_fade', '$overlaywidth_$mainvideowidth_div_3'], |
| 13 | + unsupportedSyntaxList: ['stroke(', 'textFit(', 'Animated.edit', 'RoundCorners(', 'getVideoFrame'], |
| 14 | + mainTransformationString: { |
| 15 | + openSyntaxString: { |
| 16 | + image: 'cloudinary.image(\'#publicID\').transformation(Transformation()', |
| 17 | + video: 'cloudinary.video(\'#publicID\').transformation(Transformation()', |
| 18 | + media: 'cloudinary.media(\'#publicID\').transformation(Transformation()' |
| 19 | + }, |
| 20 | + closeSyntaxString : ');', |
| 21 | + }, |
| 22 | + overwritePreset: 'flutter', |
| 23 | + openActionChar: '(', |
| 24 | + closeActionChar: ')', |
| 25 | + arraySeparator: ', ', |
| 26 | + arrayOpen: '[', |
| 27 | + arrayClose: ']', |
| 28 | + formats: { |
| 29 | + formatClassOrEnum: 'PascalCase', |
| 30 | + formatMethod: 'camelCase', |
| 31 | + formatFloat: (f) => { |
| 32 | + if (!f.toString().includes('.')) { |
| 33 | + return `'${f}.0'` // In JS world, 1.0 is 1, so we make sure 1.0 stays 1.0 |
| 34 | + } else { |
| 35 | + return f; |
| 36 | + } |
| 37 | + } |
| 38 | + }, |
| 39 | + methodNameMap: { |
| 40 | + 'delivery_type': 'set_delivery_type', |
| 41 | + 'asset_type': 'set_asset_type', |
| 42 | + 'deliveryType': 'set_delivery_type', |
| 43 | + 'assetType': 'set_asset_type', |
| 44 | + 'signature': 'setSignature', |
| 45 | + }, |
| 46 | + canGenerateSignature:false, |
| 47 | + classNameMap: {}, |
| 48 | + childTransformations: { |
| 49 | + image: { |
| 50 | + open: "new ImageTransformation()", |
| 51 | + close: '', |
| 52 | + }, |
| 53 | + video: { |
| 54 | + open: "new VideoTransformation()", |
| 55 | + close: '', |
| 56 | + }, |
| 57 | + media: { |
| 58 | + open: "new Transformation()", |
| 59 | + close: '', |
| 60 | + } |
| 61 | + }, |
| 62 | + }, |
| 63 | + "overwrites": { |
| 64 | + qualifiers: { |
| 65 | + // colorOverride is a qualifier of Reshape.trim action. |
| 66 | + color_override: (payload) => { |
| 67 | + const {qualifierDTO} = payload; |
| 68 | + const colorName = qualifierDTO.qualifiers[0].name; |
| 69 | + |
| 70 | + // TODO this should be streamlined with how we deal with color. |
| 71 | + return `.colorOverride("${colorName}")` |
| 72 | + }, |
| 73 | + |
| 74 | + } |
| 75 | + } |
| 76 | +} |
0 commit comments