zapier-platform-cli 16.5.0 → 17.0.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.
@@ -55,7 +55,7 @@
55
55
  "build": {
56
56
  "aliases": [],
57
57
  "args": {},
58
- "description": "Build a pushable zip from the current directory.\n\nThis command does the following:\n\n* Creates a temporary folder\n* Copies all code into the temporary folder\n* Adds an entry point: `zapierwrapper.js`\n* Generates and validates app definition.\n* Detects dependencies via browserify (optional, on by default)\n* Zips up all needed `.js` files. If you want to include more files, add a \"includeInBuild\" property (array with strings of regexp paths) to your `.zapierapprc`.\n* Moves the zip to `build/build.zip` and `build/source.zip` and deletes the temp folder\n\nThis command is typically followed by `zapier upload`.",
58
+ "description": "Build a pushable zip from the current directory.\n\nThis command does the following:\n\n* Creates a temporary folder\n* Copies all code into the temporary folder\n* Adds an entry point: `zapierwrapper.js`\n* Generates and validates app definition.\n* Detects dependencies via esbuild (optional, on by default)\n* Zips up all needed `.js` files. If you want to include more files, add a \"includeInBuild\" property (array with strings of regexp paths) to your `.zapierapprc`.\n* Moves the zip to `build/build.zip` and `build/source.zip` and deletes the temp folder\n\nThis command is typically followed by `zapier upload`.",
59
59
  "flags": {
60
60
  "disable-dependency-detection": {
61
61
  "description": "Disable \"smart\" file inclusion. By default, Zapier only includes files that are required by `index.js`. If you (or your dependencies) require files dynamically (such as with `require(someVar)`), then you may see \"Cannot find module\" errors. Disabling this may make your `build.zip` too large. If that's the case, try using the `includeInBuild` option in your `.zapierapprc`. See the docs about `includeInBuild` for more info.",
@@ -337,7 +337,8 @@
337
337
  "description": "Initialize a new Zapier integration with a project template.\n\nAfter running this, you'll have a new integration in the specified directory. If you re-run this command on an existing directory, it will prompt before overwriting any existing files.\n\nThis doesn't register or deploy the integration with Zapier - try the `zapier register` and `zapier push` commands for that!",
338
338
  "examples": [
339
339
  "zapier init myapp",
340
- "zapier init ./path/myapp --template oauth2"
340
+ "zapier init ./path/myapp --template oauth2",
341
+ "zapier init ./path/myapp --template minimal --module esm"
341
342
  ],
342
343
  "flags": {
343
344
  "template": {
@@ -363,6 +364,18 @@
363
364
  ],
364
365
  "type": "option"
365
366
  },
367
+ "module": {
368
+ "char": "m",
369
+ "description": "Choose module type: CommonJS or ES Modules. Only enabled for Typescript and Minimal templates.",
370
+ "name": "module",
371
+ "hasDynamicHelp": false,
372
+ "multiple": false,
373
+ "options": [
374
+ "commonjs",
375
+ "esm"
376
+ ],
377
+ "type": "option"
378
+ },
366
379
  "debug": {
367
380
  "char": "d",
368
381
  "description": "Show extra debugging output.",
@@ -1515,6 +1528,13 @@
1515
1528
  "args": {},
1516
1529
  "description": "List the versions of your integration available for use in Zapier automations.",
1517
1530
  "flags": {
1531
+ "all": {
1532
+ "char": "a",
1533
+ "description": "List all versions, including deprecated versions.",
1534
+ "name": "all",
1535
+ "allowNo": false,
1536
+ "type": "boolean"
1537
+ },
1518
1538
  "debug": {
1519
1539
  "char": "d",
1520
1540
  "description": "Show extra debugging output.",
@@ -1562,6 +1582,54 @@
1562
1582
  "versions.js"
1563
1583
  ]
1564
1584
  },
1585
+ "cache:clear": {
1586
+ "aliases": [],
1587
+ "args": {
1588
+ "majorVersion": {
1589
+ "description": "(Optional) The cache data will be deleted for this major version. If not provided, you must pick from a list of major versions for this integration.",
1590
+ "name": "majorVersion",
1591
+ "required": false
1592
+ }
1593
+ },
1594
+ "description": "Clear the cache data for a major version. \n\nThis command clears the cache data for a major version of your integration.\nThe job will be run in the background and may take some time to complete.\nYou can check `zapier history` to see the job status.\n",
1595
+ "examples": [
1596
+ "zapier cache:clear",
1597
+ "zapier cache:clear 2"
1598
+ ],
1599
+ "flags": {
1600
+ "debug": {
1601
+ "char": "d",
1602
+ "description": "Show extra debugging output.",
1603
+ "name": "debug",
1604
+ "allowNo": false,
1605
+ "type": "boolean"
1606
+ },
1607
+ "invokedFromAnotherCommand": {
1608
+ "hidden": true,
1609
+ "name": "invokedFromAnotherCommand",
1610
+ "allowNo": false,
1611
+ "type": "boolean"
1612
+ }
1613
+ },
1614
+ "hasDynamicHelp": false,
1615
+ "hiddenAliases": [],
1616
+ "id": "cache:clear",
1617
+ "pluginAlias": "zapier-platform-cli",
1618
+ "pluginName": "zapier-platform-cli",
1619
+ "pluginType": "core",
1620
+ "strict": true,
1621
+ "enableJsonFlag": false,
1622
+ "skipValidInstallCheck": true,
1623
+ "hide": true,
1624
+ "isESM": false,
1625
+ "relativePath": [
1626
+ "src",
1627
+ "oclif",
1628
+ "commands",
1629
+ "cache",
1630
+ "clear.js"
1631
+ ]
1632
+ },
1565
1633
  "canary:create": {
1566
1634
  "aliases": [],
1567
1635
  "args": {
@@ -1725,19 +1793,18 @@
1725
1793
  "list.js"
1726
1794
  ]
1727
1795
  },
1728
- "cache:clear": {
1796
+ "env:get": {
1729
1797
  "aliases": [],
1730
1798
  "args": {
1731
- "majorVersion": {
1732
- "description": "(Optional) The cache data will be deleted for this major version. If not provided, you must pick from a list of major versions for this integration.",
1733
- "name": "majorVersion",
1734
- "required": false
1799
+ "version": {
1800
+ "description": "The version to get the environment for.",
1801
+ "name": "version",
1802
+ "required": true
1735
1803
  }
1736
1804
  },
1737
- "description": "Clear the cache data for a major version. \n\nThis command clears the cache data for a major version of your integration.\nThe job will be run in the background and may take some time to complete.\nYou can check `zapier history` to see the job status.\n",
1805
+ "description": "Get environment variables for a version.",
1738
1806
  "examples": [
1739
- "zapier cache:clear",
1740
- "zapier cache:clear 2"
1807
+ "zapier env:get 1.2.3"
1741
1808
  ],
1742
1809
  "flags": {
1743
1810
  "debug": {
@@ -1747,45 +1814,21 @@
1747
1814
  "allowNo": false,
1748
1815
  "type": "boolean"
1749
1816
  },
1750
- "invokedFromAnotherCommand": {
1751
- "hidden": true,
1752
- "name": "invokedFromAnotherCommand",
1753
- "allowNo": false,
1754
- "type": "boolean"
1755
- }
1756
- },
1757
- "hasDynamicHelp": false,
1758
- "hiddenAliases": [],
1759
- "id": "cache:clear",
1760
- "pluginAlias": "zapier-platform-cli",
1761
- "pluginName": "zapier-platform-cli",
1762
- "pluginType": "core",
1763
- "strict": true,
1764
- "enableJsonFlag": false,
1765
- "skipValidInstallCheck": true,
1766
- "hide": true,
1767
- "isESM": false,
1768
- "relativePath": [
1769
- "src",
1770
- "oclif",
1771
- "commands",
1772
- "cache",
1773
- "clear.js"
1774
- ]
1775
- },
1776
- "delete:integration": {
1777
- "aliases": [
1778
- "delete:app"
1779
- ],
1780
- "args": {},
1781
- "description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
1782
- "flags": {
1783
- "debug": {
1784
- "char": "d",
1785
- "description": "Show extra debugging output.",
1786
- "name": "debug",
1787
- "allowNo": false,
1788
- "type": "boolean"
1817
+ "format": {
1818
+ "char": "f",
1819
+ "description": "Change the way structured data is presented. If \"json\" or \"raw\", you can pipe the output of the command into other tools, such as jq.",
1820
+ "name": "format",
1821
+ "default": "table",
1822
+ "hasDynamicHelp": false,
1823
+ "multiple": false,
1824
+ "options": [
1825
+ "plain",
1826
+ "json",
1827
+ "raw",
1828
+ "row",
1829
+ "table"
1830
+ ],
1831
+ "type": "option"
1789
1832
  },
1790
1833
  "invokedFromAnotherCommand": {
1791
1834
  "hidden": true,
@@ -1796,7 +1839,7 @@
1796
1839
  },
1797
1840
  "hasDynamicHelp": false,
1798
1841
  "hiddenAliases": [],
1799
- "id": "delete:integration",
1842
+ "id": "env:get",
1800
1843
  "pluginAlias": "zapier-platform-cli",
1801
1844
  "pluginName": "zapier-platform-cli",
1802
1845
  "pluginType": "core",
@@ -1808,21 +1851,35 @@
1808
1851
  "src",
1809
1852
  "oclif",
1810
1853
  "commands",
1811
- "delete",
1812
- "integration.js"
1854
+ "env",
1855
+ "get.js"
1813
1856
  ]
1814
1857
  },
1815
- "delete:version": {
1858
+ "env:set": {
1816
1859
  "aliases": [],
1817
1860
  "args": {
1818
1861
  "version": {
1819
- "description": "Specify the version to delete. It must have no users or Zaps.",
1862
+ "description": "The version to set the environment for. Values are copied forward when a new version is created, but this command will only ever affect the specified version.",
1820
1863
  "name": "version",
1821
1864
  "required": true
1865
+ },
1866
+ "key-value pairs...": {
1867
+ "description": "The key-value pairs to set. Keys are case-insensitive. Each pair should be space separated and pairs should be separated by an `=`. For example: `A=123 B=456`",
1868
+ "name": "key-value pairs..."
1822
1869
  }
1823
1870
  },
1824
- "description": "Delete a specific version of your integration.\n\nThis only works if there are no users or Zaps on that version. You will probably need to have run `zapier migrate` and `zapier deprecate` before this command will work.",
1871
+ "description": "Set environment variables for a version.",
1872
+ "examples": [
1873
+ "zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
1874
+ ],
1825
1875
  "flags": {
1876
+ "force": {
1877
+ "char": "f",
1878
+ "description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
1879
+ "name": "force",
1880
+ "allowNo": false,
1881
+ "type": "boolean"
1882
+ },
1826
1883
  "debug": {
1827
1884
  "char": "d",
1828
1885
  "description": "Show extra debugging output.",
@@ -1839,11 +1896,11 @@
1839
1896
  },
1840
1897
  "hasDynamicHelp": false,
1841
1898
  "hiddenAliases": [],
1842
- "id": "delete:version",
1899
+ "id": "env:set",
1843
1900
  "pluginAlias": "zapier-platform-cli",
1844
1901
  "pluginName": "zapier-platform-cli",
1845
1902
  "pluginType": "core",
1846
- "strict": true,
1903
+ "strict": false,
1847
1904
  "enableJsonFlag": false,
1848
1905
  "skipValidInstallCheck": true,
1849
1906
  "isESM": false,
@@ -1851,24 +1908,35 @@
1851
1908
  "src",
1852
1909
  "oclif",
1853
1910
  "commands",
1854
- "delete",
1855
- "version.js"
1911
+ "env",
1912
+ "set.js"
1856
1913
  ]
1857
1914
  },
1858
- "env:get": {
1915
+ "env:unset": {
1859
1916
  "aliases": [],
1860
1917
  "args": {
1861
1918
  "version": {
1862
- "description": "The version to get the environment for.",
1919
+ "description": "The version to set the environment for.",
1863
1920
  "name": "version",
1864
1921
  "required": true
1922
+ },
1923
+ "keys...": {
1924
+ "description": "The keys to unset. Keys are case-insensitive.",
1925
+ "name": "keys..."
1865
1926
  }
1866
1927
  },
1867
- "description": "Get environment variables for a version.",
1928
+ "description": "Unset environment variables for a version.",
1868
1929
  "examples": [
1869
- "zapier env:get 1.2.3"
1930
+ "zapier env:unset 1.2.3 SECRET OTHER"
1870
1931
  ],
1871
1932
  "flags": {
1933
+ "force": {
1934
+ "char": "f",
1935
+ "description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
1936
+ "name": "force",
1937
+ "allowNo": false,
1938
+ "type": "boolean"
1939
+ },
1872
1940
  "debug": {
1873
1941
  "char": "d",
1874
1942
  "description": "Show extra debugging output.",
@@ -1876,22 +1944,6 @@
1876
1944
  "allowNo": false,
1877
1945
  "type": "boolean"
1878
1946
  },
1879
- "format": {
1880
- "char": "f",
1881
- "description": "Change the way structured data is presented. If \"json\" or \"raw\", you can pipe the output of the command into other tools, such as jq.",
1882
- "name": "format",
1883
- "default": "table",
1884
- "hasDynamicHelp": false,
1885
- "multiple": false,
1886
- "options": [
1887
- "plain",
1888
- "json",
1889
- "raw",
1890
- "row",
1891
- "table"
1892
- ],
1893
- "type": "option"
1894
- },
1895
1947
  "invokedFromAnotherCommand": {
1896
1948
  "hidden": true,
1897
1949
  "name": "invokedFromAnotherCommand",
@@ -1901,11 +1953,11 @@
1901
1953
  },
1902
1954
  "hasDynamicHelp": false,
1903
1955
  "hiddenAliases": [],
1904
- "id": "env:get",
1956
+ "id": "env:unset",
1905
1957
  "pluginAlias": "zapier-platform-cli",
1906
1958
  "pluginName": "zapier-platform-cli",
1907
1959
  "pluginType": "core",
1908
- "strict": true,
1960
+ "strict": false,
1909
1961
  "enableJsonFlag": false,
1910
1962
  "skipValidInstallCheck": true,
1911
1963
  "isESM": false,
@@ -1914,34 +1966,16 @@
1914
1966
  "oclif",
1915
1967
  "commands",
1916
1968
  "env",
1917
- "get.js"
1969
+ "unset.js"
1918
1970
  ]
1919
1971
  },
1920
- "env:set": {
1921
- "aliases": [],
1922
- "args": {
1923
- "version": {
1924
- "description": "The version to set the environment for. Values are copied forward when a new version is created, but this command will only ever affect the specified version.",
1925
- "name": "version",
1926
- "required": true
1927
- },
1928
- "key-value pairs...": {
1929
- "description": "The key-value pairs to set. Keys are case-insensitive. Each pair should be space separated and pairs should be separated by an `=`. For example: `A=123 B=456`",
1930
- "name": "key-value pairs..."
1931
- }
1932
- },
1933
- "description": "Set environment variables for a version.",
1934
- "examples": [
1935
- "zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
1972
+ "delete:integration": {
1973
+ "aliases": [
1974
+ "delete:app"
1936
1975
  ],
1976
+ "args": {},
1977
+ "description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
1937
1978
  "flags": {
1938
- "force": {
1939
- "char": "f",
1940
- "description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
1941
- "name": "force",
1942
- "allowNo": false,
1943
- "type": "boolean"
1944
- },
1945
1979
  "debug": {
1946
1980
  "char": "d",
1947
1981
  "description": "Show extra debugging output.",
@@ -1958,11 +1992,11 @@
1958
1992
  },
1959
1993
  "hasDynamicHelp": false,
1960
1994
  "hiddenAliases": [],
1961
- "id": "env:set",
1995
+ "id": "delete:integration",
1962
1996
  "pluginAlias": "zapier-platform-cli",
1963
1997
  "pluginName": "zapier-platform-cli",
1964
1998
  "pluginType": "core",
1965
- "strict": false,
1999
+ "strict": true,
1966
2000
  "enableJsonFlag": false,
1967
2001
  "skipValidInstallCheck": true,
1968
2002
  "isESM": false,
@@ -1970,35 +2004,21 @@
1970
2004
  "src",
1971
2005
  "oclif",
1972
2006
  "commands",
1973
- "env",
1974
- "set.js"
2007
+ "delete",
2008
+ "integration.js"
1975
2009
  ]
1976
2010
  },
1977
- "env:unset": {
2011
+ "delete:version": {
1978
2012
  "aliases": [],
1979
2013
  "args": {
1980
2014
  "version": {
1981
- "description": "The version to set the environment for.",
2015
+ "description": "Specify the version to delete. It must have no users or Zaps.",
1982
2016
  "name": "version",
1983
2017
  "required": true
1984
- },
1985
- "keys...": {
1986
- "description": "The keys to unset. Keys are case-insensitive.",
1987
- "name": "keys..."
1988
2018
  }
1989
2019
  },
1990
- "description": "Unset environment variables for a version.",
1991
- "examples": [
1992
- "zapier env:unset 1.2.3 SECRET OTHER"
1993
- ],
2020
+ "description": "Delete a specific version of your integration.\n\nThis only works if there are no users or Zaps on that version. You will probably need to have run `zapier migrate` and `zapier deprecate` before this command will work.",
1994
2021
  "flags": {
1995
- "force": {
1996
- "char": "f",
1997
- "description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
1998
- "name": "force",
1999
- "allowNo": false,
2000
- "type": "boolean"
2001
- },
2002
2022
  "debug": {
2003
2023
  "char": "d",
2004
2024
  "description": "Show extra debugging output.",
@@ -2015,11 +2035,11 @@
2015
2035
  },
2016
2036
  "hasDynamicHelp": false,
2017
2037
  "hiddenAliases": [],
2018
- "id": "env:unset",
2038
+ "id": "delete:version",
2019
2039
  "pluginAlias": "zapier-platform-cli",
2020
2040
  "pluginName": "zapier-platform-cli",
2021
2041
  "pluginType": "core",
2022
- "strict": false,
2042
+ "strict": true,
2023
2043
  "enableJsonFlag": false,
2024
2044
  "skipValidInstallCheck": true,
2025
2045
  "isESM": false,
@@ -2027,8 +2047,8 @@
2027
2047
  "src",
2028
2048
  "oclif",
2029
2049
  "commands",
2030
- "env",
2031
- "unset.js"
2050
+ "delete",
2051
+ "version.js"
2032
2052
  ]
2033
2053
  },
2034
2054
  "team:add": {
@@ -2410,5 +2430,5 @@
2410
2430
  ]
2411
2431
  }
2412
2432
  },
2413
- "version": "16.5.0"
2433
+ "version": "17.0.0"
2414
2434
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapier-platform-cli",
3
- "version": "16.5.0",
3
+ "version": "17.0.0",
4
4
  "description": "The CLI for managing integrations in Zapier Developer Platform.",
5
5
  "repository": "zapier/zapier-platform",
6
6
  "homepage": "https://platform.zapier.com/",
@@ -40,56 +40,56 @@
40
40
  "validate": "yarn test && yarn smoke-test && yarn lint"
41
41
  },
42
42
  "dependencies": {
43
- "@oclif/core": "4.0.34",
44
- "@oclif/plugin-autocomplete": "3.2.11",
45
- "@oclif/plugin-help": "6.2.18",
46
- "@oclif/plugin-not-found": "3.2.29",
47
- "@oclif/plugin-version": "2.2.16",
43
+ "@oclif/core": "4.3.0",
44
+ "@oclif/plugin-autocomplete": "3.2.28",
45
+ "@oclif/plugin-help": "6.2.28",
46
+ "@oclif/plugin-not-found": "3.2.51",
47
+ "@oclif/plugin-version": "2.2.28",
48
48
  "adm-zip": "0.5.16",
49
49
  "archiver": "7.0.1",
50
- "browserify": "17.0.1",
51
- "chrono-node": "2.7.7",
50
+ "chrono-node": "2.8.0",
52
51
  "cli-table3": "0.6.5",
53
52
  "colors": "1.4.0",
54
- "debug": "4.3.7",
55
- "dotenv": "16.4.6",
53
+ "debug": "4.4.0",
54
+ "dotenv": "16.5.0",
55
+ "esbuild": "0.25.4",
56
56
  "fs-extra": "11.2.0",
57
57
  "gulp-filter": "7.0.0",
58
- "gulp-prettier": "4.0.0",
58
+ "gulp-prettier": "5.0.0",
59
59
  "ignore": "5.2.4",
60
60
  "inquirer": "8.2.5",
61
- "jscodeshift": "^17.0.0",
61
+ "jscodeshift": "^17.3.0",
62
62
  "klaw": "4.1.0",
63
63
  "lodash": "4.17.21",
64
- "luxon": "3.5.0",
64
+ "luxon": "3.6.1",
65
65
  "marked": "14.1.4",
66
66
  "marked-terminal": "7.2.1",
67
67
  "minimatch": "9.0.3",
68
68
  "node-fetch": "2.7.0",
69
- "open": "10.1.0",
69
+ "open": "10.1.2",
70
70
  "ora": "5.4.0",
71
71
  "parse-gitignore": "0.5.1",
72
- "prettier": "3.4.1",
73
- "read": "4.0.0",
74
- "semver": "7.6.3",
72
+ "prettier": "3.5.3",
73
+ "read": "4.1.0",
74
+ "semver": "7.7.1",
75
75
  "string-length": "4.0.2",
76
76
  "through2": "4.0.2",
77
77
  "tmp": "0.2.3",
78
- "traverse": "0.6.10",
78
+ "traverse": "0.6.11",
79
79
  "update-notifier": "5.1.0",
80
80
  "yeoman-environment": "3.19.3",
81
81
  "yeoman-generator": "5.9.0"
82
82
  },
83
83
  "devDependencies": {
84
- "@oclif/test": "^4.0.9",
84
+ "@oclif/test": "^4.1.12",
85
85
  "@types/jscodeshift": "^0.12.0",
86
86
  "@types/mocha": "^10.0.9",
87
87
  "chai": "^4.3.7",
88
88
  "decompress": "4.2.1",
89
- "mock-fs": "^5.2.0",
90
- "nock": "^13.3.1",
91
- "oclif": "^4.15.30",
92
- "typescript": "^5.6.3",
89
+ "mock-fs": "^5.5.0",
90
+ "nock": "^14.0.4",
91
+ "oclif": "^4.17.46",
92
+ "typescript": "^5.8.3",
93
93
  "yamljs": "0.3.0"
94
94
  },
95
95
  "bin": {
@@ -1,21 +1,31 @@
1
- import type { Create, PerformFunction } from 'zapier-platform-core';
1
+ import {
2
+ defineInputFields,
3
+ defineCreate,
4
+ type CreatePerform,
5
+ type InferInputData,
6
+ } from 'zapier-platform-core';
7
+
8
+ const inputFields = defineInputFields([
9
+ { key: 'name', required: true },
10
+ { key: 'fave_meal', label: 'Favorite Meal', required: false },
11
+ ]);
2
12
 
3
13
  // create a particular <%= LOWER_NOUN %> by name
4
- const perform: PerformFunction = async (z, bundle) => {
14
+ const perform = (async (z, bundle) => {
5
15
  const response = await z.request({
6
16
  method: 'POST',
7
17
  url: 'https://jsonplaceholder.typicode.com/posts',
8
18
  // if `body` is an object, it'll automatically get run through JSON.stringify
9
19
  // if you don't want to send JSON, pass a string in your chosen format here instead
10
20
  body: {
11
- name: bundle.inputData.name
12
- }
21
+ name: bundle.inputData.name,
22
+ },
13
23
  });
14
24
  // this should return a single object
15
25
  return response.data;
16
- };
26
+ }) satisfies CreatePerform<InferInputData<typeof inputFields>>;
17
27
 
18
- export default {
28
+ export default defineCreate({
19
29
  // see here for a full list of available properties:
20
30
  // https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#createschema
21
31
  key: '<%= KEY %>',
@@ -34,10 +44,7 @@ export default {
34
44
  '// Zapier will pass them in as `bundle.inputData` later. They\'re optional.',
35
45
  '// End-users will map data into these fields. In general, they should have any fields that the API can accept. Be sure to accurately mark which fields are required!'
36
46
  ].join('\n ') : '' %>
37
- inputFields: [
38
- {key: 'name', required: true},
39
- {key: 'fave_meal', label: 'Favorite Meal', required: false}
40
- ],
47
+ inputFields,
41
48
 
42
49
  <%= INCLUDE_INTRO_COMMENTS ? [
43
50
  '// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example',
@@ -46,7 +53,7 @@ export default {
46
53
  ].join('\n ') : '' %>
47
54
  sample: {
48
55
  id: 1,
49
- name: 'Test'
56
+ name: 'Test',
50
57
  },
51
58
 
52
59
  <%= INCLUDE_INTRO_COMMENTS ? [
@@ -59,6 +66,6 @@ export default {
59
66
  // these are placeholders to match the example `perform` above
60
67
  // {key: 'id', label: 'Person ID'},
61
68
  // {key: 'name', label: 'Person Name'}
62
- ]
63
- }
64
- } satisfies Create;
69
+ ],
70
+ },
71
+ });