zapier-platform-cli 17.5.0 → 17.6.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.
@@ -1705,6 +1705,88 @@
1705
1705
  "clear.js"
1706
1706
  ]
1707
1707
  },
1708
+ "delete:integration": {
1709
+ "aliases": [
1710
+ "delete:app"
1711
+ ],
1712
+ "args": {},
1713
+ "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.",
1714
+ "flags": {
1715
+ "debug": {
1716
+ "char": "d",
1717
+ "description": "Show extra debugging output.",
1718
+ "name": "debug",
1719
+ "allowNo": false,
1720
+ "type": "boolean"
1721
+ },
1722
+ "invokedFromAnotherCommand": {
1723
+ "hidden": true,
1724
+ "name": "invokedFromAnotherCommand",
1725
+ "allowNo": false,
1726
+ "type": "boolean"
1727
+ }
1728
+ },
1729
+ "hasDynamicHelp": false,
1730
+ "hiddenAliases": [],
1731
+ "id": "delete:integration",
1732
+ "pluginAlias": "zapier-platform-cli",
1733
+ "pluginName": "zapier-platform-cli",
1734
+ "pluginType": "core",
1735
+ "strict": true,
1736
+ "enableJsonFlag": false,
1737
+ "skipValidInstallCheck": true,
1738
+ "isESM": false,
1739
+ "relativePath": [
1740
+ "src",
1741
+ "oclif",
1742
+ "commands",
1743
+ "delete",
1744
+ "integration.js"
1745
+ ]
1746
+ },
1747
+ "delete:version": {
1748
+ "aliases": [],
1749
+ "args": {
1750
+ "version": {
1751
+ "description": "Specify the version to delete. It must have no users or Zaps.",
1752
+ "name": "version",
1753
+ "required": true
1754
+ }
1755
+ },
1756
+ "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.",
1757
+ "flags": {
1758
+ "debug": {
1759
+ "char": "d",
1760
+ "description": "Show extra debugging output.",
1761
+ "name": "debug",
1762
+ "allowNo": false,
1763
+ "type": "boolean"
1764
+ },
1765
+ "invokedFromAnotherCommand": {
1766
+ "hidden": true,
1767
+ "name": "invokedFromAnotherCommand",
1768
+ "allowNo": false,
1769
+ "type": "boolean"
1770
+ }
1771
+ },
1772
+ "hasDynamicHelp": false,
1773
+ "hiddenAliases": [],
1774
+ "id": "delete:version",
1775
+ "pluginAlias": "zapier-platform-cli",
1776
+ "pluginName": "zapier-platform-cli",
1777
+ "pluginType": "core",
1778
+ "strict": true,
1779
+ "enableJsonFlag": false,
1780
+ "skipValidInstallCheck": true,
1781
+ "isESM": false,
1782
+ "relativePath": [
1783
+ "src",
1784
+ "oclif",
1785
+ "commands",
1786
+ "delete",
1787
+ "version.js"
1788
+ ]
1789
+ },
1708
1790
  "canary:create": {
1709
1791
  "aliases": [],
1710
1792
  "args": {
@@ -1719,10 +1801,12 @@
1719
1801
  "required": true
1720
1802
  }
1721
1803
  },
1722
- "description": "Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.\n\nOnly one canary can be active at the same time. You can run `zapier canary:list` to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using `zapier canary:delete a.b.c x.y.z`.\n\nNote: this is similar to `zapier migrate` but different in that this is temporary and will \"revert\" the changes once the specified duration is expired.\n\n**Only use this command to canary traffic between non-breaking versions!**",
1804
+ "description": "Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.\n\nOnly one canary can be active at the same time. You can run `zapier canary:list` to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using `zapier canary:delete a.b.c x.y.z`.\n\nTo canary traffic for a specific user, use the --user flag.\n\nTo canary traffic for an entire account, use the --account-id. Note: this scenario is only permitted for Zapier staff.\n\nTo canary traffic for a specific user within a specific account, use both --user and --account-id flags.\n\nNote: this is similar to `zapier migrate` but different in that this is temporary and will \"revert\" the changes once the specified duration is expired.\n\n**Only use this command to canary traffic between non-breaking versions!**",
1723
1805
  "examples": [
1724
- "zapier canary:create 1.0.0 1.1.0 -p 25 -d 720",
1725
- "zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300"
1806
+ "zapier canary:create 1.0.0 1.1.0 -p 10 -d 3600",
1807
+ "zapier canary:create 2.0.0 2.1.0 --percent 25 --duration 1800 --user user@example.com",
1808
+ "zapier canary:create 2.0.0 2.1.0 -p 15 -d 7200 -a 12345 -u user@example.com",
1809
+ "zapier canary:create 2.0.0 2.1.0 -p 15 -d 7200 -a 12345"
1726
1810
  ],
1727
1811
  "flags": {
1728
1812
  "percent": {
@@ -1743,6 +1827,29 @@
1743
1827
  "multiple": false,
1744
1828
  "type": "option"
1745
1829
  },
1830
+ "user": {
1831
+ "char": "u",
1832
+ "description": "Canary this user (email) across all accounts, unless `account-id` is specified.",
1833
+ "name": "user",
1834
+ "hasDynamicHelp": false,
1835
+ "multiple": false,
1836
+ "type": "option"
1837
+ },
1838
+ "account-id": {
1839
+ "char": "a",
1840
+ "description": "The account ID to target. If user is specified, only canary the user within this account. If user is not specified, then this argument is only permitted for Zapier staff.",
1841
+ "name": "account-id",
1842
+ "hasDynamicHelp": false,
1843
+ "multiple": false,
1844
+ "type": "option"
1845
+ },
1846
+ "force-include-all": {
1847
+ "char": "f",
1848
+ "description": "Overrides any default filters the canary system imposes. This argument is only permitted for Zapier staff.",
1849
+ "name": "force-include-all",
1850
+ "allowNo": false,
1851
+ "type": "boolean"
1852
+ },
1746
1853
  "debug": {
1747
1854
  "char": "d",
1748
1855
  "description": "Show extra debugging output.",
@@ -1868,88 +1975,6 @@
1868
1975
  "list.js"
1869
1976
  ]
1870
1977
  },
1871
- "delete:integration": {
1872
- "aliases": [
1873
- "delete:app"
1874
- ],
1875
- "args": {},
1876
- "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.",
1877
- "flags": {
1878
- "debug": {
1879
- "char": "d",
1880
- "description": "Show extra debugging output.",
1881
- "name": "debug",
1882
- "allowNo": false,
1883
- "type": "boolean"
1884
- },
1885
- "invokedFromAnotherCommand": {
1886
- "hidden": true,
1887
- "name": "invokedFromAnotherCommand",
1888
- "allowNo": false,
1889
- "type": "boolean"
1890
- }
1891
- },
1892
- "hasDynamicHelp": false,
1893
- "hiddenAliases": [],
1894
- "id": "delete:integration",
1895
- "pluginAlias": "zapier-platform-cli",
1896
- "pluginName": "zapier-platform-cli",
1897
- "pluginType": "core",
1898
- "strict": true,
1899
- "enableJsonFlag": false,
1900
- "skipValidInstallCheck": true,
1901
- "isESM": false,
1902
- "relativePath": [
1903
- "src",
1904
- "oclif",
1905
- "commands",
1906
- "delete",
1907
- "integration.js"
1908
- ]
1909
- },
1910
- "delete:version": {
1911
- "aliases": [],
1912
- "args": {
1913
- "version": {
1914
- "description": "Specify the version to delete. It must have no users or Zaps.",
1915
- "name": "version",
1916
- "required": true
1917
- }
1918
- },
1919
- "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.",
1920
- "flags": {
1921
- "debug": {
1922
- "char": "d",
1923
- "description": "Show extra debugging output.",
1924
- "name": "debug",
1925
- "allowNo": false,
1926
- "type": "boolean"
1927
- },
1928
- "invokedFromAnotherCommand": {
1929
- "hidden": true,
1930
- "name": "invokedFromAnotherCommand",
1931
- "allowNo": false,
1932
- "type": "boolean"
1933
- }
1934
- },
1935
- "hasDynamicHelp": false,
1936
- "hiddenAliases": [],
1937
- "id": "delete:version",
1938
- "pluginAlias": "zapier-platform-cli",
1939
- "pluginName": "zapier-platform-cli",
1940
- "pluginType": "core",
1941
- "strict": true,
1942
- "enableJsonFlag": false,
1943
- "skipValidInstallCheck": true,
1944
- "isESM": false,
1945
- "relativePath": [
1946
- "src",
1947
- "oclif",
1948
- "commands",
1949
- "delete",
1950
- "version.js"
1951
- ]
1952
- },
1953
1978
  "env:get": {
1954
1979
  "aliases": [],
1955
1980
  "args": {
@@ -2126,9 +2151,9 @@
2126
2151
  "unset.js"
2127
2152
  ]
2128
2153
  },
2129
- "team:add": {
2154
+ "users:add": {
2130
2155
  "aliases": [
2131
- "team:invite"
2156
+ "users:invite"
2132
2157
  ],
2133
2158
  "args": {
2134
2159
  "email": {
@@ -2136,28 +2161,24 @@
2136
2161
  "name": "email",
2137
2162
  "required": true
2138
2163
  },
2139
- "role": {
2140
- "description": "The level the invited team member should be at. Admins can edit everything and get email updates. Collaborators have read-access to the app and get email updates. Subscribers only get email updates.",
2141
- "name": "role",
2142
- "options": [
2143
- "admin",
2144
- "collaborator",
2145
- "subscriber"
2146
- ],
2147
- "required": true
2148
- },
2149
- "message": {
2150
- "description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
2151
- "name": "message"
2164
+ "version": {
2165
+ "description": "A version string (like 1.2.3). Optional, used only if you want to invite a user to a specific version instead of all versions.",
2166
+ "name": "version"
2152
2167
  }
2153
2168
  },
2154
- "description": "Add a team member to your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nTeam members can be freely added and removed.",
2169
+ "description": "Add a user to some or all versions of your integration.\n\nWhen this command is run, we'll send an email to the user inviting them to try your integration. You can track the status of that invite using the `zapier users:get` command.\n\nInvited users will be able to see your integration's name, logo, and description. They'll also be able to create Zaps using any available triggers and actions.",
2155
2170
  "examples": [
2156
- "zapier team:add bruce@wayne.com admin",
2157
- "zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
2158
- "zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
2171
+ "zapier users:add bruce@wayne.com",
2172
+ "zapier users:add alfred@wayne.com 1.2.3"
2159
2173
  ],
2160
2174
  "flags": {
2175
+ "force": {
2176
+ "char": "f",
2177
+ "description": "Skip confirmation. Useful for running programatically.",
2178
+ "name": "force",
2179
+ "allowNo": false,
2180
+ "type": "boolean"
2181
+ },
2161
2182
  "debug": {
2162
2183
  "char": "d",
2163
2184
  "description": "Show extra debugging output.",
@@ -2174,7 +2195,7 @@
2174
2195
  },
2175
2196
  "hasDynamicHelp": false,
2176
2197
  "hiddenAliases": [],
2177
- "id": "team:add",
2198
+ "id": "users:add",
2178
2199
  "pluginAlias": "zapier-platform-cli",
2179
2200
  "pluginName": "zapier-platform-cli",
2180
2201
  "pluginType": "core",
@@ -2186,16 +2207,16 @@
2186
2207
  "src",
2187
2208
  "oclif",
2188
2209
  "commands",
2189
- "team",
2210
+ "users",
2190
2211
  "add.js"
2191
2212
  ]
2192
2213
  },
2193
- "team:get": {
2214
+ "users:get": {
2194
2215
  "aliases": [
2195
- "team:list"
2216
+ "users:list"
2196
2217
  ],
2197
2218
  "args": {},
2198
- "description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
2219
+ "description": "Get a list of users who have been invited to your integration.\n\nNote that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the `\u001b[36mzapier users:add\u001b[39m` command or the web UI). Users who joined by clicking links generated using the `\u001b[36mzapier user:links\u001b[39m` command won't show up here.",
2199
2220
  "flags": {
2200
2221
  "debug": {
2201
2222
  "char": "d",
@@ -2229,7 +2250,7 @@
2229
2250
  },
2230
2251
  "hasDynamicHelp": false,
2231
2252
  "hiddenAliases": [],
2232
- "id": "team:get",
2253
+ "id": "users:get",
2233
2254
  "pluginAlias": "zapier-platform-cli",
2234
2255
  "pluginName": "zapier-platform-cli",
2235
2256
  "pluginType": "core",
@@ -2241,16 +2262,14 @@
2241
2262
  "src",
2242
2263
  "oclif",
2243
2264
  "commands",
2244
- "team",
2265
+ "users",
2245
2266
  "get.js"
2246
2267
  ]
2247
2268
  },
2248
- "team:remove": {
2249
- "aliases": [
2250
- "team:delete"
2251
- ],
2269
+ "users:links": {
2270
+ "aliases": [],
2252
2271
  "args": {},
2253
- "description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
2272
+ "description": "Get a list of links that are used to invite users to your integration.",
2254
2273
  "flags": {
2255
2274
  "debug": {
2256
2275
  "char": "d",
@@ -2259,6 +2278,22 @@
2259
2278
  "allowNo": false,
2260
2279
  "type": "boolean"
2261
2280
  },
2281
+ "format": {
2282
+ "char": "f",
2283
+ "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.",
2284
+ "name": "format",
2285
+ "default": "table",
2286
+ "hasDynamicHelp": false,
2287
+ "multiple": false,
2288
+ "options": [
2289
+ "plain",
2290
+ "json",
2291
+ "raw",
2292
+ "row",
2293
+ "table"
2294
+ ],
2295
+ "type": "option"
2296
+ },
2262
2297
  "invokedFromAnotherCommand": {
2263
2298
  "hidden": true,
2264
2299
  "name": "invokedFromAnotherCommand",
@@ -2268,7 +2303,7 @@
2268
2303
  },
2269
2304
  "hasDynamicHelp": false,
2270
2305
  "hiddenAliases": [],
2271
- "id": "team:remove",
2306
+ "id": "users:links",
2272
2307
  "pluginAlias": "zapier-platform-cli",
2273
2308
  "pluginName": "zapier-platform-cli",
2274
2309
  "pluginType": "core",
@@ -2280,34 +2315,26 @@
2280
2315
  "src",
2281
2316
  "oclif",
2282
2317
  "commands",
2283
- "team",
2284
- "remove.js"
2318
+ "users",
2319
+ "links.js"
2285
2320
  ]
2286
2321
  },
2287
- "users:add": {
2322
+ "users:remove": {
2288
2323
  "aliases": [
2289
- "users:invite"
2324
+ "users:delete"
2290
2325
  ],
2291
2326
  "args": {
2292
2327
  "email": {
2293
- "description": "The user to be invited. If they don't have a Zapier account, they'll be prompted to create one.",
2328
+ "description": "The user to be removed.",
2294
2329
  "name": "email",
2295
2330
  "required": true
2296
- },
2297
- "version": {
2298
- "description": "A version string (like 1.2.3). Optional, used only if you want to invite a user to a specific version instead of all versions.",
2299
- "name": "version"
2300
2331
  }
2301
2332
  },
2302
- "description": "Add a user to some or all versions of your integration.\n\nWhen this command is run, we'll send an email to the user inviting them to try your integration. You can track the status of that invite using the `zapier users:get` command.\n\nInvited users will be able to see your integration's name, logo, and description. They'll also be able to create Zaps using any available triggers and actions.",
2303
- "examples": [
2304
- "zapier users:add bruce@wayne.com",
2305
- "zapier users:add alfred@wayne.com 1.2.3"
2306
- ],
2333
+ "description": "Remove a user from all versions of your integration.\n\nWhen this command is run, their Zaps will immediately turn off. They won't be able to use your app again until they're re-invited or it has gone public. In practice, this command isn't run often as it's very disruptive to users.",
2307
2334
  "flags": {
2308
2335
  "force": {
2309
2336
  "char": "f",
2310
- "description": "Skip confirmation. Useful for running programatically.",
2337
+ "description": "Skips confirmation. Useful for running programatically.",
2311
2338
  "name": "force",
2312
2339
  "allowNo": false,
2313
2340
  "type": "boolean"
@@ -2328,7 +2355,7 @@
2328
2355
  },
2329
2356
  "hasDynamicHelp": false,
2330
2357
  "hiddenAliases": [],
2331
- "id": "users:add",
2358
+ "id": "users:remove",
2332
2359
  "pluginAlias": "zapier-platform-cli",
2333
2360
  "pluginName": "zapier-platform-cli",
2334
2361
  "pluginType": "core",
@@ -2341,15 +2368,40 @@
2341
2368
  "oclif",
2342
2369
  "commands",
2343
2370
  "users",
2344
- "add.js"
2371
+ "remove.js"
2345
2372
  ]
2346
2373
  },
2347
- "users:get": {
2374
+ "team:add": {
2348
2375
  "aliases": [
2349
- "users:list"
2376
+ "team:invite"
2377
+ ],
2378
+ "args": {
2379
+ "email": {
2380
+ "description": "The user to be invited. If they don't have a Zapier account, they'll be prompted to create one.",
2381
+ "name": "email",
2382
+ "required": true
2383
+ },
2384
+ "role": {
2385
+ "description": "The level the invited team member should be at. Admins can edit everything and get email updates. Collaborators have read-access to the app and get email updates. Subscribers only get email updates.",
2386
+ "name": "role",
2387
+ "options": [
2388
+ "admin",
2389
+ "collaborator",
2390
+ "subscriber"
2391
+ ],
2392
+ "required": true
2393
+ },
2394
+ "message": {
2395
+ "description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
2396
+ "name": "message"
2397
+ }
2398
+ },
2399
+ "description": "Add a team member to your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nTeam members can be freely added and removed.",
2400
+ "examples": [
2401
+ "zapier team:add bruce@wayne.com admin",
2402
+ "zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
2403
+ "zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
2350
2404
  ],
2351
- "args": {},
2352
- "description": "Get a list of users who have been invited to your integration.\n\nNote that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the `\u001b[36mzapier users:add\u001b[39m` command or the web UI). Users who joined by clicking links generated using the `\u001b[36mzapier user:links\u001b[39m` command won't show up here.",
2353
2405
  "flags": {
2354
2406
  "debug": {
2355
2407
  "char": "d",
@@ -2358,22 +2410,6 @@
2358
2410
  "allowNo": false,
2359
2411
  "type": "boolean"
2360
2412
  },
2361
- "format": {
2362
- "char": "f",
2363
- "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.",
2364
- "name": "format",
2365
- "default": "table",
2366
- "hasDynamicHelp": false,
2367
- "multiple": false,
2368
- "options": [
2369
- "plain",
2370
- "json",
2371
- "raw",
2372
- "row",
2373
- "table"
2374
- ],
2375
- "type": "option"
2376
- },
2377
2413
  "invokedFromAnotherCommand": {
2378
2414
  "hidden": true,
2379
2415
  "name": "invokedFromAnotherCommand",
@@ -2383,7 +2419,7 @@
2383
2419
  },
2384
2420
  "hasDynamicHelp": false,
2385
2421
  "hiddenAliases": [],
2386
- "id": "users:get",
2422
+ "id": "team:add",
2387
2423
  "pluginAlias": "zapier-platform-cli",
2388
2424
  "pluginName": "zapier-platform-cli",
2389
2425
  "pluginType": "core",
@@ -2395,14 +2431,16 @@
2395
2431
  "src",
2396
2432
  "oclif",
2397
2433
  "commands",
2398
- "users",
2399
- "get.js"
2434
+ "team",
2435
+ "add.js"
2400
2436
  ]
2401
2437
  },
2402
- "users:links": {
2403
- "aliases": [],
2438
+ "team:get": {
2439
+ "aliases": [
2440
+ "team:list"
2441
+ ],
2404
2442
  "args": {},
2405
- "description": "Get a list of links that are used to invite users to your integration.",
2443
+ "description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
2406
2444
  "flags": {
2407
2445
  "debug": {
2408
2446
  "char": "d",
@@ -2436,7 +2474,7 @@
2436
2474
  },
2437
2475
  "hasDynamicHelp": false,
2438
2476
  "hiddenAliases": [],
2439
- "id": "users:links",
2477
+ "id": "team:get",
2440
2478
  "pluginAlias": "zapier-platform-cli",
2441
2479
  "pluginName": "zapier-platform-cli",
2442
2480
  "pluginType": "core",
@@ -2448,30 +2486,17 @@
2448
2486
  "src",
2449
2487
  "oclif",
2450
2488
  "commands",
2451
- "users",
2452
- "links.js"
2489
+ "team",
2490
+ "get.js"
2453
2491
  ]
2454
2492
  },
2455
- "users:remove": {
2493
+ "team:remove": {
2456
2494
  "aliases": [
2457
- "users:delete"
2495
+ "team:delete"
2458
2496
  ],
2459
- "args": {
2460
- "email": {
2461
- "description": "The user to be removed.",
2462
- "name": "email",
2463
- "required": true
2464
- }
2465
- },
2466
- "description": "Remove a user from all versions of your integration.\n\nWhen this command is run, their Zaps will immediately turn off. They won't be able to use your app again until they're re-invited or it has gone public. In practice, this command isn't run often as it's very disruptive to users.",
2497
+ "args": {},
2498
+ "description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
2467
2499
  "flags": {
2468
- "force": {
2469
- "char": "f",
2470
- "description": "Skips confirmation. Useful for running programatically.",
2471
- "name": "force",
2472
- "allowNo": false,
2473
- "type": "boolean"
2474
- },
2475
2500
  "debug": {
2476
2501
  "char": "d",
2477
2502
  "description": "Show extra debugging output.",
@@ -2488,7 +2513,7 @@
2488
2513
  },
2489
2514
  "hasDynamicHelp": false,
2490
2515
  "hiddenAliases": [],
2491
- "id": "users:remove",
2516
+ "id": "team:remove",
2492
2517
  "pluginAlias": "zapier-platform-cli",
2493
2518
  "pluginName": "zapier-platform-cli",
2494
2519
  "pluginType": "core",
@@ -2500,10 +2525,10 @@
2500
2525
  "src",
2501
2526
  "oclif",
2502
2527
  "commands",
2503
- "users",
2528
+ "team",
2504
2529
  "remove.js"
2505
2530
  ]
2506
2531
  }
2507
2532
  },
2508
- "version": "17.5.0"
2533
+ "version": "17.6.0"
2509
2534
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapier-platform-cli",
3
- "version": "17.5.0",
3
+ "version": "17.6.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/",
@@ -8,6 +8,9 @@ class CanaryCreateCommand extends ZapierBaseCommand {
8
8
  const { versionFrom, versionTo } = this.args;
9
9
  const percent = this.flags.percent;
10
10
  const duration = this.flags.duration;
11
+ const user = this.flags.user;
12
+ const accountId = this.flags['account-id'];
13
+ const forceIncludeAll = this.flags['force-include-all'];
11
14
 
12
15
  this.validateVersions(versionFrom, versionTo);
13
16
  this.validatePercent(percent);
@@ -25,13 +28,34 @@ If you would like to stop this canary now, run \`zapier canary:delete ${existing
25
28
  return;
26
29
  }
27
30
 
28
- this.startSpinner(`Creating canary deployment
31
+ let createCanaryMessage = `Creating canary deployment
29
32
  - From version: ${versionFrom}
30
33
  - To version: ${versionTo}
31
- - Traffic amount: ${percent}%
32
- - Duration: ${duration} seconds`);
34
+ - Percentage: ${percent}%
35
+ - Duration: ${duration} seconds`;
33
36
 
34
- await createCanary(versionFrom, versionTo, percent, duration);
37
+ const body = {
38
+ percent,
39
+ duration,
40
+ };
41
+
42
+ if (user) {
43
+ body.user = user;
44
+ createCanaryMessage += `\n - User: ${user}`;
45
+ }
46
+
47
+ if (accountId) {
48
+ body.account_id = parseInt(accountId);
49
+ createCanaryMessage += `\n - Account ID: ${accountId}`;
50
+ }
51
+
52
+ if (forceIncludeAll) {
53
+ body.force_include_all = true;
54
+ createCanaryMessage += `\n - Force Include All: true`;
55
+ }
56
+
57
+ this.startSpinner(createCanaryMessage);
58
+ await createCanary(versionFrom, versionTo, body);
35
59
 
36
60
  this.stopSpinner();
37
61
  this.log('Canary deployment created successfully.');
@@ -71,6 +95,21 @@ CanaryCreateCommand.flags = buildFlags({
71
95
  description: 'Duration of the canary in seconds',
72
96
  required: true,
73
97
  }),
98
+ user: Flags.string({
99
+ char: 'u',
100
+ description:
101
+ 'Canary this user (email) across all accounts, unless `account-id` is specified.',
102
+ }),
103
+ 'account-id': Flags.string({
104
+ char: 'a',
105
+ description:
106
+ 'The account ID to target. If user is specified, only canary the user within this account. If user is not specified, then this argument is only permitted for Zapier staff.',
107
+ }),
108
+ 'force-include-all': Flags.boolean({
109
+ char: 'f',
110
+ description:
111
+ 'Overrides any default filters the canary system imposes. This argument is only permitted for Zapier staff.',
112
+ }),
74
113
  },
75
114
  });
76
115
 
@@ -89,13 +128,21 @@ CanaryCreateCommand.description = `Create a new canary deployment, diverting a s
89
128
 
90
129
  Only one canary can be active at the same time. You can run \`zapier canary:list\` to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using \`zapier canary:delete a.b.c x.y.z\`.
91
130
 
131
+ To canary traffic for a specific user, use the --user flag.
132
+
133
+ To canary traffic for an entire account, use the --account-id. Note: this scenario is only permitted for Zapier staff.
134
+
135
+ To canary traffic for a specific user within a specific account, use both --user and --account-id flags.
136
+
92
137
  Note: this is similar to \`zapier migrate\` but different in that this is temporary and will "revert" the changes once the specified duration is expired.
93
138
 
94
139
  **Only use this command to canary traffic between non-breaking versions!**`;
95
140
 
96
141
  CanaryCreateCommand.examples = [
97
- 'zapier canary:create 1.0.0 1.1.0 -p 25 -d 720',
98
- 'zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300',
142
+ 'zapier canary:create 1.0.0 1.1.0 -p 10 -d 3600',
143
+ 'zapier canary:create 2.0.0 2.1.0 --percent 25 --duration 1800 --user user@example.com',
144
+ 'zapier canary:create 2.0.0 2.1.0 -p 15 -d 7200 -a 12345 -u user@example.com',
145
+ 'zapier canary:create 2.0.0 2.1.0 -p 15 -d 7200 -a 12345',
99
146
  ];
100
147
  CanaryCreateCommand.skipValidInstallCheck = true;
101
148
 
@@ -12,6 +12,8 @@ class CanaryListCommand extends ZapierBaseCommand {
12
12
  to_version: c.to_version,
13
13
  percent: c.percent,
14
14
  seconds_remaining: c.until_timestamp - Math.floor(Date.now() / 1000),
15
+ user: c.user,
16
+ account_id: c.account_id,
15
17
  }));
16
18
 
17
19
  this.log(bold('Active Canaries') + '\n');
@@ -22,6 +24,8 @@ class CanaryListCommand extends ZapierBaseCommand {
22
24
  ['To Version', 'to_version'],
23
25
  ['Traffic Amount', 'percent'],
24
26
  ['Seconds Remaining', 'seconds_remaining'],
27
+ ['User', 'user'],
28
+ ['Account ID', 'account_id'],
25
29
  ],
26
30
  emptyMessage: grey(`No active canary deployments found.`),
27
31
  });
package/src/utils/api.js CHANGED
@@ -154,17 +154,14 @@ const createCredentials = (username, password, totpCode) => {
154
154
  );
155
155
  };
156
156
 
157
- const createCanary = async (versionFrom, versionTo, percent, duration) => {
157
+ const createCanary = async (versionFrom, versionTo, body) => {
158
158
  const linkedAppId = (await getLinkedAppConfig(undefined, true))?.id;
159
159
 
160
160
  return callAPI(
161
161
  `/apps/${linkedAppId}/versions/${versionFrom}/canary-to/${versionTo}`,
162
162
  {
163
163
  method: 'POST',
164
- body: {
165
- percent,
166
- duration,
167
- },
164
+ body,
168
165
  },
169
166
  );
170
167
  };