postman-cli-completion 1.56.3 → 1.58.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.
@@ -1,6 +1,6 @@
1
1
  #compdef postman
2
2
  compdef _postman postman
3
- # Zsh completion for Postman CLI (postman v1.56.3)
3
+ # Zsh completion for Postman CLI (postman v1.58.0)
4
4
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
5
5
  # Source: spec/commands.json
6
6
  # https://github.com/yokawasa/postman-cli-completion
@@ -21,8 +21,10 @@ _postman() {
21
21
  args)
22
22
  case $words[1] in
23
23
  login) _postman_login ;;
24
+ signup) _postman_signup ;;
24
25
  logout) _postman_logout ;;
25
26
  init) _postman_init ;;
27
+ whoami) _postman_whoami ;;
26
28
  skills) _postman_skills ;;
27
29
  collection) _postman_collection ;;
28
30
  environment) _postman_environment ;;
@@ -40,9 +42,11 @@ _postman() {
40
42
  application|app) _postman_application ;;
41
43
  simulate) _postman_simulate ;;
42
44
  context) _postman_context ;;
45
+ context-graph) _postman_context_graph ;;
43
46
  search) _postman_search ;;
44
47
  webhook) _postman_webhook ;;
45
48
  dataset) _postman_dataset ;;
49
+ dependency) _postman_dependency ;;
46
50
  esac
47
51
  ;;
48
52
  esac
@@ -52,16 +56,18 @@ _postman_commands() {
52
56
  local -a commands
53
57
  commands=(
54
58
  'login:Authenticate with Postman to access your resources.'
59
+ 'signup:Sign up to keep the work you created as a guest (claims your guest workspace). By default prints a single-use sign-up URL to open in a browser; --browser signs up in a browser and signs this CLI in.'
55
60
  'logout:Delete the stored Postman API key.'
56
61
  'init:Set up Postman artifacts and agent instructions in a repository.'
62
+ 'whoami:Show the Postman account or guest session this CLI session is using.'
57
63
  'skills:Check and update the agent skills in this repository.'
58
64
  'collection:Run and test your Postman collections directly from the command line.'
59
- 'environment:Work with local Postman environments from the command line.'
65
+ 'environment:Work with local Postman environments from the command line. Also read cloud environments by ID.'
60
66
  'globals:Work with local Postman globals from the command line.'
61
67
  'api:Publish and test your APIs directly from the command line'
62
- 'runner:Run runners on your own environments for monitoring your APIs'
68
+ 'runner:Where your monitors execute\: run and inspect your own self-hosted runners, and list the Postman-operated regions available to your team'
63
69
  'spec:Lint and validate Specifications from the command line'
64
- 'monitor:Invoke a monitor run and display results'
70
+ 'monitor:Run and manage Postman monitors.'
65
71
  'workspace:Manage workspace resources.'
66
72
  'ws:Alias for workspace'
67
73
  'performance:Manage performance tests on your collections.'
@@ -69,14 +75,16 @@ _postman_commands() {
69
75
  'fl:Alias for flows'
70
76
  'request:Send HTTP requests from the command line with full Postman capabilities including authentication, environment variables, assertions, retries, and detailed output control.'
71
77
  'sdk:Generate and manage your SDKs directly from the command line.'
72
- 'mock:Run and manage Postman mocks, locally and in the cloud.'
78
+ 'mock:Create, run, and manage Postman mocks — in your repository or in Postman cloud.'
73
79
  'application:Application-level commands\: initialise config and run tests.'
74
80
  'app:Alias for application'
75
81
  'simulate:Start mock servers with simulated failure scenarios.'
76
82
  'context:\[Beta\] Get API context for AI coding agents directly from the command line.'
83
+ 'context-graph:Ask natural-language questions about your team'\''s Context Graph.'
77
84
  'search:Search for Postman element types (requests, collections, workspaces, and more).'
78
85
  'webhook:Create and manage Postman webhooks.'
79
86
  'dataset:Work with Postman datasets in local YAML files or the cloud.'
87
+ 'dependency:Manage workspace dependencies (Postman entities reused from other workspaces).'
80
88
  )
81
89
  _describe -t commands 'postman command' commands
82
90
  }
@@ -90,6 +98,13 @@ _postman_login() {
90
98
  '(-h --help)'{-h,--help}'[display help for command]'
91
99
  }
92
100
 
101
+ _postman_signup() {
102
+ _arguments \
103
+ '--browser[Open a browser to sign up and sign this CLI in, instead of printing a URL.]' \
104
+ '--json[Print the sign-up details as machine-readable JSON.]' \
105
+ '(-h --help)'{-h,--help}'[display help for command]'
106
+ }
107
+
93
108
  _postman_logout() {
94
109
  _arguments \
95
110
  '--alias[Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
@@ -109,6 +124,12 @@ _postman_init() {
109
124
  '*:path:_files -g "*.json"'
110
125
  }
111
126
 
127
+ _postman_whoami() {
128
+ _arguments \
129
+ '--json[Print current identity as machine-readable JSON.]' \
130
+ '(-h --help)'{-h,--help}'[display help for command]'
131
+ }
132
+
112
133
  _postman_skills() {
113
134
  local context state state_descr line
114
135
  typeset -A opt_args
@@ -243,9 +264,9 @@ _postman_collection_run() {
243
264
  '--cookie-jar[Specify the path to a custom cookie jar (serialized tough-cookie JSON)]:path:_files -g "*.json"' \
244
265
  '--export-cookie-jar[Exports the cookie jar to a file after completing the run]:path:_files -g "*.json"' \
245
266
  '--verbose[Show detailed information of collection run and each request sent]' \
246
- '--mock[Start a mock server from manifest (.json, .yaml or .yml) file]:path:_files -g "*.json"' \
247
- '--port[Port for the --mock server; pass "auto" for an OS-assigned ephemeral port (default\: configured port, falls back to an ephemeral one if busy). Only valid with --mock.]:port' \
248
- '--use-mock[Redirect requests for a URL or {{variable}} to a mock during the run. Format\: "<url> mock|mock-server\:<path|id> \[scenario\]". Repeat the flag to redirect multiple URLs (one --use-mock per mock). Use "mock\:<path>" for a local mock manifest (.json/.yaml/.yml), "mock\:<id>" for a local mock by id (fetched from the cloud then run locally), or "mock-server\:<id>" to redirect to a deployed mock server'\''s URL. Id-based references require `postman login` (or --postman-api-key). The optional third field selects a scenario (defaults to "default"). (default\: \[\])]:mapping' \
267
+ '--mock[Start a mock server for the run, its path if it lives in your repository (relative or absolute, e.g. ./postman/mocks/orders) or its id if it lives in Postman cloud (fetched then run locally). An id needs `postman login` (or --postman-api-key).]:pathOrId:_files -g "*.json"' \
268
+ '--port[Port for the --mock server (e.g. 4010), or "auto" for a free one. Defaults to the mock'\''s configured port. Only valid with --mock.]:port' \
269
+ '--use-mock[Redirect requests for a URL or {{variable}} to a mock during the run. Format\: "<url> mock|mock-server\:<path|id> \[scenario\]". Repeat the flag to redirect several URLs (one --use-mock each). Use "mock\:<path>" for a mock in your repository (path relative or absolute, e.g. ./postman/mocks/orders), "mock\:<id>" for a mock in Postman cloud (fetched then run locally), or "mock-server\:<id>" to send requests to a deployed mock server. An id needs `postman login` (or --postman-api-key). The optional third field picks a scenario (defaults to "default"). (default\: \[\])]:mapping' \
249
270
  '--simulate[Start mock servers with fault-injection scenarios from a .sim.yaml file]:path:_files -g "*.(sim.yaml|yaml|yml)"' \
250
271
  '--report-events[Upload results for git-native v3 collection runs. Analytics are sent by default]' \
251
272
  '--no-report-events[Do not send analytics to Postman]' \
@@ -274,6 +295,9 @@ _postman_environment() {
274
295
  case $state in
275
296
  args)
276
297
  case $words[1] in
298
+ list) _postman_environment_list ;;
299
+ get) _postman_environment_get ;;
300
+ var) _postman_environment_var ;;
277
301
  lint) _postman_environment_lint ;;
278
302
  esac
279
303
  ;;
@@ -283,11 +307,89 @@ _postman_environment() {
283
307
  _postman_environment_commands() {
284
308
  local -a sub
285
309
  sub=(
310
+ 'list:List environments in a Postman workspace.'
311
+ 'get:Read an environment by ID or local environment file path.'
312
+ 'var:Read and update environment variables.'
286
313
  'lint:Run linting on a local Postman environment at the given file or directory path.'
287
314
  )
288
315
  _describe -t commands 'environment command' sub
289
316
  }
290
317
 
318
+ _postman_environment_list() {
319
+ _arguments \
320
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID to list environments from.]:workspaceId' \
321
+ '(-f --filter)'{-f,--filter}'[Filter environments by name.]:name' \
322
+ '--verbose[Verbose output]' \
323
+ '--json[JSON output]' \
324
+ '(-h --help)'{-h,--help}'[display help for command]' \
325
+ '*:workspacePath:'
326
+ }
327
+
328
+ _postman_environment_get() {
329
+ _arguments \
330
+ '--verbose[Verbose output]' \
331
+ '--json[JSON output]' \
332
+ '--show-secrets[Show secret variable values in output]' \
333
+ '(-h --help)'{-h,--help}'[display help for command]' \
334
+ '*:environment:_files -g "*.json"'
335
+ }
336
+
337
+ _postman_environment_var() {
338
+ local context state state_descr line
339
+ typeset -A opt_args
340
+ _arguments -C \
341
+ '(-h --help)'{-h,--help}'[display help for command]' \
342
+ '1: :_postman_environment_var_commands' \
343
+ '*::arg:->args'
344
+ case $state in
345
+ args)
346
+ case $words[1] in
347
+ set) _postman_environment_var_set ;;
348
+ get) _postman_environment_var_get ;;
349
+ unset) _postman_environment_var_unset ;;
350
+ esac
351
+ ;;
352
+ esac
353
+ }
354
+
355
+ _postman_environment_var_commands() {
356
+ local -a sub
357
+ sub=(
358
+ 'set:Set one variable in an environment.'
359
+ 'get:Read one variable value from an environment.'
360
+ 'unset:Remove one variable from an environment.'
361
+ )
362
+ _describe -t commands 'var command' sub
363
+ }
364
+
365
+ _postman_environment_var_set() {
366
+ _arguments \
367
+ '(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
368
+ '--verbose[Verbose output]' \
369
+ '--json[JSON output]' \
370
+ '(-h --help)'{-h,--help}'[display help for command]' \
371
+ '*:value:'
372
+ }
373
+
374
+ _postman_environment_var_get() {
375
+ _arguments \
376
+ '(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
377
+ '--verbose[Verbose output]' \
378
+ '--json[JSON output]' \
379
+ '--show-secrets[Show secret variable values in output]' \
380
+ '(-h --help)'{-h,--help}'[display help for command]' \
381
+ '*:key:_files -g "*.json"'
382
+ }
383
+
384
+ _postman_environment_var_unset() {
385
+ _arguments \
386
+ '(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
387
+ '--verbose[Verbose output]' \
388
+ '--json[JSON output]' \
389
+ '(-h --help)'{-h,--help}'[display help for command]' \
390
+ '*:key:_files -g "*.json"'
391
+ }
392
+
291
393
  _postman_environment_lint() {
292
394
  _arguments \
293
395
  '(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
@@ -386,6 +488,8 @@ _postman_runner() {
386
488
  args)
387
489
  case $words[1] in
388
490
  start) _postman_runner_start ;;
491
+ list) _postman_runner_list ;;
492
+ regions) _postman_runner_regions ;;
389
493
  esac
390
494
  ;;
391
495
  esac
@@ -395,6 +499,8 @@ _postman_runner_commands() {
395
499
  local -a sub
396
500
  sub=(
397
501
  'start:Start a runner'
502
+ 'list:List the team'\''s registered self-hosted runners'
503
+ 'regions:List the region and private-runner values valid for monitor create/update --runner, including a static IP where configured'
398
504
  )
399
505
  _describe -t commands 'runner command' sub
400
506
  }
@@ -415,6 +521,20 @@ _postman_runner_start() {
415
521
  '(-h --help)'{-h,--help}'[display help for command]'
416
522
  }
417
523
 
524
+ _postman_runner_list() {
525
+ _arguments \
526
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
527
+ '--json[Output the runner list as JSON instead of a table]' \
528
+ '(-h --help)'{-h,--help}'[display help for command]'
529
+ }
530
+
531
+ _postman_runner_regions() {
532
+ _arguments \
533
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
534
+ '--json[Output the region list as JSON instead of a table]' \
535
+ '(-h --help)'{-h,--help}'[display help for command]'
536
+ }
537
+
418
538
  _postman_spec() {
419
539
  local context state state_descr line
420
540
  typeset -A opt_args
@@ -427,6 +547,10 @@ _postman_spec() {
427
547
  case $words[1] in
428
548
  lint) _postman_spec_lint ;;
429
549
  ai-readiness) _postman_spec_ai_readiness ;;
550
+ list) _postman_spec_list ;;
551
+ get) _postman_spec_get ;;
552
+ file) _postman_spec_file ;;
553
+ create) _postman_spec_create ;;
430
554
  esac
431
555
  ;;
432
556
  esac
@@ -437,6 +561,10 @@ _postman_spec_commands() {
437
561
  sub=(
438
562
  'lint:Run linting on the given specification by ID or local file path.'
439
563
  'ai-readiness:Score an OpenAPI specification for AI readiness by ID or local file path.'
564
+ 'list:List local spec files under a path, or (no path) a workspace'\''s cloud specs.'
565
+ 'get:Read a spec definition, including every file of a multi-file spec.'
566
+ 'file:Add, update, or remove files in a spec (cloud ID or local directory).'
567
+ 'create:Create a new spec in a workspace, or (with path) scaffold a local spec file.'
440
568
  )
441
569
  _describe -t commands 'spec command' sub
442
570
  }
@@ -460,6 +588,88 @@ _postman_spec_ai_readiness() {
460
588
  '*:spec:'
461
589
  }
462
590
 
591
+ _postman_spec_list() {
592
+ _arguments \
593
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID (defaults to .postman/resources.yaml binding)]:id' \
594
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
595
+ '--json[Output as JSON]' \
596
+ '(-h --help)'{-h,--help}'[display help for command]' \
597
+ '*:pathOrDir:_files -g "*.json"'
598
+ }
599
+
600
+ _postman_spec_get() {
601
+ _arguments \
602
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
603
+ '--json[Output as JSON (full spec definition)]' \
604
+ '(-h --help)'{-h,--help}'[display help for command]' \
605
+ '*:spec...:'
606
+ }
607
+
608
+ _postman_spec_file() {
609
+ local context state state_descr line
610
+ typeset -A opt_args
611
+ _arguments -C \
612
+ '(-h --help)'{-h,--help}'[display help for command]' \
613
+ '1: :_postman_spec_file_commands' \
614
+ '*::arg:->args'
615
+ case $state in
616
+ args)
617
+ case $words[1] in
618
+ add) _postman_spec_file_add ;;
619
+ update) _postman_spec_file_update ;;
620
+ rm) _postman_spec_file_rm ;;
621
+ esac
622
+ ;;
623
+ esac
624
+ }
625
+
626
+ _postman_spec_file_commands() {
627
+ local -a sub
628
+ sub=(
629
+ 'add:Add a new file to a spec.'
630
+ 'update:Update an existing file in a spec.'
631
+ 'rm:Remove a file from a spec.'
632
+ )
633
+ _describe -t commands 'file command' sub
634
+ }
635
+
636
+ _postman_spec_file_add() {
637
+ _arguments \
638
+ '(-c --content)'{-c,--content}'[File content (reads from stdin if omitted)]:content' \
639
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
640
+ '(-h --help)'{-h,--help}'[display help for command]' \
641
+ '*:filePath:_files -g "*.json"'
642
+ }
643
+
644
+ _postman_spec_file_update() {
645
+ _arguments \
646
+ '(-c --content)'{-c,--content}'[New file content (reads from stdin if omitted)]:content' \
647
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
648
+ '(-h --help)'{-h,--help}'[display help for command]' \
649
+ '*:filePath:_files -g "*.json"'
650
+ }
651
+
652
+ _postman_spec_file_rm() {
653
+ _arguments \
654
+ '(-y --yes)'{-y,--yes}'[Skip confirmation prompt]' \
655
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
656
+ '(-h --help)'{-h,--help}'[display help for command]' \
657
+ '*:filePath:_files -g "*.json"'
658
+ }
659
+
660
+ _postman_spec_create() {
661
+ _arguments \
662
+ '(-n --name)'{-n,--name}'[Specification name / title]:name' \
663
+ '(-t --type)'{-t,--type}'[Spec type\: openapi, asyncapi, graphql, protobuf, smithy (default\: openapi) (default\: "openapi")]:type' \
664
+ '--spec-version[Spec version (e.g. 3.1 for openapi, 3 for protobuf)]:ver' \
665
+ '(-f --format)'{-f,--format}'[File format\: yaml or json (openapi/asyncapi only, default\: yaml) (default\: "yaml")]:fmt' \
666
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID (cloud create, defaults to .postman/resources.yaml)]:id' \
667
+ '--force[Overwrite an existing local file]' \
668
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
669
+ '(-h --help)'{-h,--help}'[display help for command]' \
670
+ '*:path:_files -g "*.json"'
671
+ }
672
+
463
673
  _postman_monitor() {
464
674
  local context state state_descr line
465
675
  typeset -A opt_args
@@ -471,6 +681,15 @@ _postman_monitor() {
471
681
  args)
472
682
  case $words[1] in
473
683
  run) _postman_monitor_run ;;
684
+ create) _postman_monitor_create ;;
685
+ update) _postman_monitor_update ;;
686
+ delete) _postman_monitor_delete ;;
687
+ jobs) _postman_monitor_jobs ;;
688
+ runs) _postman_monitor_runs ;;
689
+ list) _postman_monitor_list ;;
690
+ get) _postman_monitor_get ;;
691
+ pause) _postman_monitor_pause ;;
692
+ resume) _postman_monitor_resume ;;
474
693
  esac
475
694
  ;;
476
695
  esac
@@ -480,14 +699,215 @@ _postman_monitor_commands() {
480
699
  local -a sub
481
700
  sub=(
482
701
  'run:Invoke a monitor run and display results.'
702
+ 'create:Create a collection-based monitor.'
703
+ 'update:Update a monitor'\''s schedule, runner, notifications or run options.'
704
+ 'delete:Permanently delete a monitor. Prompts for confirmation unless --yes is passed.'
705
+ 'jobs:Inspect a monitor'\''s jobs and their per-region runs.'
706
+ 'runs:Inspect a monitor run'\''s attempts.'
707
+ 'list:List the monitors visible to you.'
708
+ 'get:Show a monitor'\''s configuration.'
709
+ 'pause:Pause a monitor, so it stops firing on schedule.'
710
+ 'resume:Resume a paused monitor, so it fires on schedule again.'
483
711
  )
484
712
  _describe -t commands 'monitor command' sub
485
713
  }
486
714
 
487
715
  _postman_monitor_run() {
488
716
  _arguments \
717
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
489
718
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
490
719
  '(-t --timeout)'{-t,--timeout}'[Maximum wait time for run completion in milliseconds (default\: 15 minutes) (default\: 900000)]:ms' \
720
+ '--async[Submit the run and return immediately with its job id and Postman URL, without waiting for completion]' \
721
+ '--json[Output the run'\''s verdict as JSON instead of a table, printing nothing else]' \
722
+ '(-h --help)'{-h,--help}'[display help for command]' \
723
+ '*:monitorId:'
724
+ }
725
+
726
+ _postman_monitor_create() {
727
+ _arguments \
728
+ '(-c --collection)'{-c,--collection}'[Collection to monitor -- accepts the id shown in the Postman app, prefixed or bare]:id' \
729
+ '--name[Monitor name (defaults to the linked collection'\''s own name)]:name' \
730
+ '--environment[Environment to run the monitored collection with]:id' \
731
+ '(-w --workspace)'{-w,--workspace}'[Workspace to create the monitor in (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)]:id' \
732
+ '--schedule[Cron expression for the monitor'\''s schedule]:cron' \
733
+ '--timezone[Time zone for --schedule, e.g. America/New_York (defaults to the host machine'\''s own zone)]:tz' \
734
+ '--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable) (default\: \[\])]:value' \
735
+ '--notify-email[Email to notify on a run failure or error (repeatable) (default\: \[\])]:email' \
736
+ '--notification-limit[Cap consecutive notifications before they are muted (service range\: 1-99)]:n' \
737
+ '--retry[Retries on a failed run (service caps this at 2)]:n' \
738
+ '--timeout[Request timeout in milliseconds]:ms' \
739
+ '--delay[Delay between requests in milliseconds]:ms' \
740
+ '--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
741
+ '--insecure[Skip TLS certificate verification for the monitored target]' \
742
+ '--follow-redirects[Follow HTTP redirects during the run]' \
743
+ '--block-redirects[Do not follow HTTP redirects during the run]' \
744
+ '--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
745
+ '--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
746
+ '--iteration-count[Number of iterations to run]:n' \
747
+ '--iteration-strategy[How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
748
+ '--no-run-now[Do not trigger an immediate run after creating the monitor]' \
749
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
750
+ '--json[Output as JSON instead of a table]' \
751
+ '(-h --help)'{-h,--help}'[display help for command]'
752
+ }
753
+
754
+ _postman_monitor_update() {
755
+ _arguments \
756
+ '--name[New monitor name]:name' \
757
+ '--schedule[New cron expression for the monitor'\''s schedule]:cron' \
758
+ '--timezone[Time zone for --schedule, e.g. America/New_York (defaults to the host machine'\''s own zone)]:tz' \
759
+ '--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable; replaces the current set) (default\: \[\])]:value' \
760
+ '--notify-email[Email to notify on a run failure or error (repeatable; replaces the current list) (default\: \[\])]:email' \
761
+ '--clear-notifications[Remove every notification recipient]' \
762
+ '--notification-limit[Cap consecutive notifications before they are muted (service range\: 1-99)]:n' \
763
+ '--retry[Retries on a failed run (service caps this at 2)]:n' \
764
+ '--timeout[Request timeout in milliseconds]:ms' \
765
+ '--delay[Delay between requests in milliseconds]:ms' \
766
+ '--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
767
+ '--insecure[Skip TLS certificate verification for the monitored target]' \
768
+ '--follow-redirects[Follow HTTP redirects during the run]' \
769
+ '--block-redirects[Do not follow HTTP redirects during the run]' \
770
+ '--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
771
+ '--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
772
+ '--iteration-count[Number of iterations to run]:n' \
773
+ '--iteration-strategy[How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
774
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
775
+ '--json[Output as JSON instead of a table]' \
776
+ '(-h --help)'{-h,--help}'[display help for command]' \
777
+ '*:monitorId:'
778
+ }
779
+
780
+ _postman_monitor_delete() {
781
+ _arguments \
782
+ '(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
783
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
784
+ '--json[Output the outcome, including any failure, as JSON instead of a plain message]' \
785
+ '(-h --help)'{-h,--help}'[display help for command]' \
786
+ '*:monitorId:'
787
+ }
788
+
789
+ _postman_monitor_jobs() {
790
+ local context state state_descr line
791
+ typeset -A opt_args
792
+ _arguments -C \
793
+ '(-h --help)'{-h,--help}'[display help for command]' \
794
+ '1: :_postman_monitor_jobs_commands' \
795
+ '*::arg:->args'
796
+ case $state in
797
+ args)
798
+ case $words[1] in
799
+ list) _postman_monitor_jobs_list ;;
800
+ get) _postman_monitor_jobs_get ;;
801
+ esac
802
+ ;;
803
+ esac
804
+ }
805
+
806
+ _postman_monitor_jobs_commands() {
807
+ local -a sub
808
+ sub=(
809
+ 'list:List a monitor'\''s recent jobs.'
810
+ 'get:Report one job'\''s terminal state and its per-region run outcomes.'
811
+ )
812
+ _describe -t commands 'jobs command' sub
813
+ }
814
+
815
+ _postman_monitor_jobs_list() {
816
+ _arguments \
817
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
818
+ '--result[Filter by outcome, e.g. success, failure, error, abort (server-validated, not a fixed list)]:value' \
819
+ '--trigger[Filter by trigger, e.g. api, schedule, webhook, postman-cli (server-validated, not a fixed list)]:value' \
820
+ '--since[Only jobs that finished at or after this ISO 8601 date-time]:dateTime' \
821
+ '--limit[Maximum number of jobs to return]:n' \
822
+ '--cursor[Opaque pagination cursor]:token' \
823
+ '--json[Output as JSON instead of a table]' \
824
+ '(-h --help)'{-h,--help}'[display help for command]' \
825
+ '*:monitorId:'
826
+ }
827
+
828
+ _postman_monitor_jobs_get() {
829
+ _arguments \
830
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
831
+ '--json[Output as JSON instead of a table]' \
832
+ '(-h --help)'{-h,--help}'[display help for command]' \
833
+ '*:jobId:'
834
+ }
835
+
836
+ _postman_monitor_runs() {
837
+ local context state state_descr line
838
+ typeset -A opt_args
839
+ _arguments -C \
840
+ '(-h --help)'{-h,--help}'[display help for command]' \
841
+ '1: :_postman_monitor_runs_commands' \
842
+ '*::arg:->args'
843
+ case $state in
844
+ args)
845
+ case $words[1] in
846
+ get) _postman_monitor_runs_get ;;
847
+ esac
848
+ ;;
849
+ esac
850
+ }
851
+
852
+ _postman_monitor_runs_commands() {
853
+ local -a sub
854
+ sub=(
855
+ 'get:Report which test assertions ran during one attempt of a run, which failed, and why.'
856
+ )
857
+ _describe -t commands 'runs command' sub
858
+ }
859
+
860
+ _postman_monitor_runs_get() {
861
+ _arguments \
862
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
863
+ '--attempt[Which attempt of the run to show, counting from 0 (default\: the latest)]:n' \
864
+ '--failed-only[Show only failed assertions]' \
865
+ '--json[Output as JSON instead of a table]' \
866
+ '(-h --help)'{-h,--help}'[display help for command]' \
867
+ '*:runId:'
868
+ }
869
+
870
+ _postman_monitor_list() {
871
+ _arguments \
872
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
873
+ '(-w --workspace)'{-w,--workspace}'[Filter to monitors in this workspace]:id' \
874
+ '(-c --collection)'{-c,--collection}'[Filter to monitors on this collection]:id' \
875
+ '--environment[Filter to monitors on this environment]:id' \
876
+ '--runner[Filter to a Self-Hosted Runner ID (not a Postman Region). Cannot be combined with --workspace, --collection, --environment, --owner, --team or --active.]:id' \
877
+ '--owner[Filter to monitors created by this user id (shown in the Owner column)]:id' \
878
+ '--team[Filter to monitors owned by your own team]' \
879
+ '--active[Filter by active state]:true|false' \
880
+ '--limit[Max monitors to return. The service caps page size and rejects a value above it with its own error.]:n' \
881
+ '--offset[Not supported\: the service accepts this parameter and silently ignores it. Refused locally. Use --cursor instead.]:n' \
882
+ '--cursor[Pagination cursor from a previous page'\''s response.]:token' \
883
+ '--columns[Comma-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available\: State, Notifications, Environment, Runners.]:names' \
884
+ '--no-headers[Omit the header row]' \
885
+ '(-f --filter)'{-f,--filter}'[Show only monitors whose name contains this text (applies to the returned page, case-insensitive)]:text' \
886
+ '--sort[Sort the returned page by "name" or "active"]:field' \
887
+ '--json[Output as JSON instead of a table]' \
888
+ '(-h --help)'{-h,--help}'[display help for command]'
889
+ }
890
+
891
+ _postman_monitor_get() {
892
+ _arguments \
893
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
894
+ '--json[Output as JSON instead of a table]' \
895
+ '(-h --help)'{-h,--help}'[display help for command]' \
896
+ '*:monitorId:'
897
+ }
898
+
899
+ _postman_monitor_pause() {
900
+ _arguments \
901
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
902
+ '--json[Output as JSON instead of a table]' \
903
+ '(-h --help)'{-h,--help}'[display help for command]' \
904
+ '*:monitorId:'
905
+ }
906
+
907
+ _postman_monitor_resume() {
908
+ _arguments \
909
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
910
+ '--json[Output as JSON instead of a table]' \
491
911
  '(-h --help)'{-h,--help}'[display help for command]' \
492
912
  '*:monitorId:'
493
913
  }
@@ -989,6 +1409,7 @@ _postman_mock() {
989
1409
  case $words[1] in
990
1410
  generate) _postman_mock_generate ;;
991
1411
  run) _postman_mock_run ;;
1412
+ push) _postman_mock_push ;;
992
1413
  deploy) _postman_mock_deploy ;;
993
1414
  get) _postman_mock_get ;;
994
1415
  list) _postman_mock_list ;;
@@ -1002,26 +1423,27 @@ _postman_mock() {
1002
1423
  _postman_mock_commands() {
1003
1424
  local -a sub
1004
1425
  sub=(
1005
- 'generate:Generate a runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto-detected. Omit the source to scaffold a sample mock with a GET /health endpoint. Writes a local mock by default, or a cloud mock with --workspace.'
1006
- 'run:Start a local mock server from a cloud mock id (fetched and run locally), a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.'
1007
- 'deploy:Deploy a cloud mock into a mock server.'
1008
- 'get:Show a mock'\''s details\: a cloud mock by id, or a local mock by path.'
1009
- 'list:List a workspace'\''s cloud mocks, or (with a path) local mocks under a directory.'
1010
- 'log:Browse a deployed mock server'\''s request/response logs by its id (see `mock get`).'
1011
- 'delete:Permanently remove a mock\: a cloud mock by id, or a local mock artifact by path.'
1426
+ 'generate:Generate a mock from a Postman collection or an OpenAPI file, or from a built-in sample shopping-cart mock (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with --workspace.'
1427
+ 'run:Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).'
1428
+ 'push:Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).'
1429
+ 'deploy:Turn a mock in Postman cloud into a live mock server others can call over the internet.'
1430
+ 'get:Show a mock'\''s details using its path if it lives in your repository, or its id if it lives in Postman cloud.'
1431
+ 'list:List the mocks in your Postman cloud workspace, or — with a folder path — the mocks in that folder in your repository.'
1432
+ 'log:Show the requests a live mock server has received and the responses it sent, using its id.'
1433
+ 'delete:Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
1012
1434
  )
1013
1435
  _describe -t commands 'mock command' sub
1014
1436
  }
1015
1437
 
1016
1438
  _postman_mock_generate() {
1017
1439
  _arguments \
1018
- '(-o --output)'{-o,--output}'[Output directory for the mock (default\: postman/mocks/<slug>)]:dir:_files -g "*.json"' \
1019
- '(-n --name)'{-n,--name}'[Display name for the generated mock. Optional with a source (derived from it); required when generating without a source.]:name' \
1020
- '--port[Port the mock server should listen on (default\: 4500)]:port' \
1021
- '--force[Overwrite the config.yaml/default.js in the output directory if it already exists]' \
1022
- '(-u --update)'{-u,--update}'[Update an existing mock in place from the source\: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port. Cannot be combined with --output.]:mockPath:_files -g "*.json"' \
1023
- '(-w --workspace)'{-w,--workspace}'[Create a cloud mock in this Postman workspace instead of a local mock. Cannot be combined with --output/--force/--update.]:id' \
1024
- '--api-key[Postman API key for --workspace (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1440
+ '(-o --output)'{-o,--output}'[Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.]:dir:_files -g "*.json"' \
1441
+ '(-n --name)'{-n,--name}'[Name for the mock. Taken from the source when you provide one; required for the sample.]:name' \
1442
+ '--port[Port the mock runs on (e.g. 4010) (default\: 4500)]:port' \
1443
+ '--force[Overwrite the mock'\''s files if the target folder already has one]' \
1444
+ '(-u --update)'{-u,--update}'[Update an existing mock from the source instead of creating a new one. Path to the mock, relative or absolute, e.g. ./postman/mocks/orders. Cannot be used with --output.]:mockPath:_files -g "*.json"' \
1445
+ '(-w --workspace)'{-w,--workspace}'[Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update.]:id' \
1446
+ '--api-key[Postman API key to use with --workspace (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1025
1447
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
1026
1448
  '(-h --help)'{-h,--help}'[display help for command]' \
1027
1449
  '*:sourcePath:'
@@ -1029,62 +1451,70 @@ _postman_mock_generate() {
1029
1451
 
1030
1452
  _postman_mock_run() {
1031
1453
  _arguments \
1032
- '(-e --environment)'{-e,--environment}'[Path to an environment file (JSON or YAML) for pm.environment]:path:_files -g "*.json"' \
1033
- '(-g --globals)'{-g,--globals}'[Path to a globals file (JSON or YAML) for pm.globals]:path:_files -g "*.json"' \
1034
- '(-p --port)'{-p,--port}'[Mock server port, or "auto" for an ephemeral one (default\: configured port, falls back to an ephemeral one if busy).]:port' \
1035
- '--api-key[Postman API key for cloud mock ids (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1454
+ '(-e --environment)'{-e,--environment}'[Path to a file of environment variables for the mock. Relative or absolute, e.g. ./postman/environments/dev.json]:path:_files -g "*.json"' \
1455
+ '(-g --globals)'{-g,--globals}'[Path to a file of global variables for the mock. Relative or absolute, e.g. ./globals.json]:path:_files -g "*.json"' \
1456
+ '(-p --port)'{-p,--port}'[Port to run on (e.g. 4010), or "auto" for a free one. Defaults to the mock'\''s configured port.]:port' \
1457
+ '--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1036
1458
  '(-h --help)'{-h,--help}'[display help for command]' \
1037
1459
  '*:mockIdOrPath:_files -g "*.json"'
1038
1460
  }
1039
1461
 
1462
+ _postman_mock_push() {
1463
+ _arguments \
1464
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
1465
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1466
+ '(-h --help)'{-h,--help}'[display help for command]' \
1467
+ '*:mockPath:_files -g "*.json"'
1468
+ }
1469
+
1040
1470
  _postman_mock_deploy() {
1041
1471
  _arguments \
1042
- '(-w --workspace)'{-w,--workspace}'[Workspace that will own the mock server (defaults to the workspace linked in .postman/resources.yaml)]:id' \
1043
- '(-n --name)'{-n,--name}'[Display name for the mock server (prompts when omitted)]:name' \
1044
- '(-s --slug)'{-s,--slug}'[Slug for the deploy URL (prompts when omitted)]:slug' \
1045
- '--public[Deploy as a public mock (default is private; requires an x-api-key header)]' \
1046
- '--auto-deploy[Re-deploy the mock automatically whenever it changes (default off)]' \
1047
- '(-y --yes)'{-y,--yes}'[Accept defaults and skip all prompts (private, no auto-deploy)]' \
1048
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1472
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)]:id' \
1473
+ '(-n --name)'{-n,--name}'[Name for the mock server (you are asked for one if you skip this)]:name' \
1474
+ '(-s --slug)'{-s,--slug}'[Short label used in the server'\''s web address, e.g. "my-mock" (you are asked for one if you skip this)]:slug' \
1475
+ '--public[Let anyone with the link reach the server. Private by default (callers must send a Postman API key).]' \
1476
+ '--auto-deploy[Update the live server automatically whenever the mock changes (off by default)]' \
1477
+ '(-y --yes)'{-y,--yes}'[Use the defaults and skip all questions (private, no auto-deploy)]' \
1478
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1049
1479
  '(-h --help)'{-h,--help}'[display help for command]' \
1050
1480
  '*:mockId:_files -g "*.json"'
1051
1481
  }
1052
1482
 
1053
1483
  _postman_mock_get() {
1054
1484
  _arguments \
1055
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1056
- '--json[Output the mock details as JSON instead of a table]' \
1485
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1486
+ '--json[Print the details as machine-readable data instead of a table]' \
1057
1487
  '(-h --help)'{-h,--help}'[display help for command]' \
1058
1488
  '*:mockIdOrPath:_files -g "*.json"'
1059
1489
  }
1060
1490
 
1061
1491
  _postman_mock_list() {
1062
1492
  _arguments \
1063
- '(-w --workspace)'{-w,--workspace}'[Workspace whose cloud mocks to list (defaults to the workspace linked in .postman/resources.yaml)]:id' \
1064
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1065
- '--json[Output the mock list as JSON instead of a table]' \
1493
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace whose mocks to list, by id (defaults to the workspace already linked to this project)]:id' \
1494
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1495
+ '--json[Print the list as machine-readable data instead of a table]' \
1066
1496
  '(-h --help)'{-h,--help}'[display help for command]' \
1067
1497
  '*:pathOrDir:_files -g "*.json"'
1068
1498
  }
1069
1499
 
1070
1500
  _postman_mock_log() {
1071
1501
  _arguments \
1072
- '--limit[Maximum number of log entries to show (default 50 for --json/non-interactive output)]:n' \
1073
- '--method[Filter by HTTP method (e.g. GET, POST)]:method' \
1074
- '--status[Filter by response status (e.g. 404 or 5xx)]:code|range' \
1075
- '--path[Filter by request path (supports * and ? wildcards)]:pattern' \
1076
- '--since[Show logs from this long ago onward (e.g. 2h = the last 2 hours)]:duration' \
1077
- '--until[Stop this long ago (e.g. 30m = exclude the most recent 30 minutes)]:duration' \
1078
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1079
- '--json[Output logs as JSON instead of the interactive pager]' \
1502
+ '--limit[Most entries to show (defaults to 50 when printing machine-readable output)]:n' \
1503
+ '--method[Show only requests of this type (e.g. GET, POST)]:method' \
1504
+ '--status[Show only these response codes (e.g. 404, or 5xx for any 500-series)]:code|range' \
1505
+ '--path[Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)]:pattern' \
1506
+ '--since[Show entries from this long ago until now (e.g. 2h = the last 2 hours)]:duration' \
1507
+ '--until[Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)]:duration' \
1508
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1509
+ '--json[Print entries as machine-readable data instead of the scrollable view]' \
1080
1510
  '(-h --help)'{-h,--help}'[display help for command]' \
1081
1511
  '*:mockServerId:_files -g "*.json"'
1082
1512
  }
1083
1513
 
1084
1514
  _postman_mock_delete() {
1085
1515
  _arguments \
1086
- '(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
1087
- '--api-key[Postman API key for cloud mock ids (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1516
+ '(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
1517
+ '--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1088
1518
  '(-h --help)'{-h,--help}'[display help for command]' \
1089
1519
  '*:mockIdOrPath:_files -g "*.json"'
1090
1520
  }
@@ -1416,6 +1846,53 @@ _postman_context_environment_get() {
1416
1846
  '(-h --help)'{-h,--help}'[display help for command]'
1417
1847
  }
1418
1848
 
1849
+ _postman_context_graph() {
1850
+ local context state state_descr line
1851
+ typeset -A opt_args
1852
+ _arguments -C \
1853
+ '(-h --help)'{-h,--help}'[display help for command]' \
1854
+ '1: :_postman_context_graph_commands' \
1855
+ '*::arg:->args'
1856
+ case $state in
1857
+ args)
1858
+ case $words[1] in
1859
+ ask) _postman_context_graph_ask ;;
1860
+ status) _postman_context_graph_status ;;
1861
+ esac
1862
+ ;;
1863
+ esac
1864
+ }
1865
+
1866
+ _postman_context_graph_commands() {
1867
+ local -a sub
1868
+ sub=(
1869
+ 'ask:Ask a natural-language question about your team'\''s Context Graph.'
1870
+ 'status:Check an ask submitted by `ask`, without blocking. Prints the answer when ready.'
1871
+ )
1872
+ _describe -t commands 'context-graph command' sub
1873
+ }
1874
+
1875
+ _postman_context_graph_ask() {
1876
+ _arguments \
1877
+ '--wait[Block until the answer arrives, then print it]' \
1878
+ '--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1879
+ '--json[Output the ask record as JSON]' \
1880
+ '--no-include-answer[Do not ask the service to include the answer inline]' \
1881
+ '--max-steps[Cap the reasoning steps the service may take (its default applies when omitted)]:count' \
1882
+ '--interval[With --wait, seconds between polls (default\: 2)]:seconds' \
1883
+ '--timeout[With --wait, seconds to wait before giving up (default\: 300)]:seconds' \
1884
+ '(-h --help)'{-h,--help}'[display help for command]' \
1885
+ '*:query:'
1886
+ }
1887
+
1888
+ _postman_context_graph_status() {
1889
+ _arguments \
1890
+ '--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1891
+ '--json[Output the ask record as JSON]' \
1892
+ '(-h --help)'{-h,--help}'[display help for command]' \
1893
+ '*:askId:'
1894
+ }
1895
+
1419
1896
  _postman_search() {
1420
1897
  local context state state_descr line
1421
1898
  typeset -A opt_args
@@ -1971,6 +2448,68 @@ _postman_dataset_view_update() {
1971
2448
  '*:viewNameOrId:'
1972
2449
  }
1973
2450
 
2451
+ _postman_dependency() {
2452
+ local context state state_descr line
2453
+ typeset -A opt_args
2454
+ _arguments -C \
2455
+ '(-h --help)'{-h,--help}'[display help for command]' \
2456
+ '1: :_postman_dependency_commands' \
2457
+ '*::arg:->args'
2458
+ case $state in
2459
+ args)
2460
+ case $words[1] in
2461
+ add) _postman_dependency_add ;;
2462
+ list) _postman_dependency_list ;;
2463
+ install) _postman_dependency_install ;;
2464
+ update) _postman_dependency_update ;;
2465
+ esac
2466
+ ;;
2467
+ esac
2468
+ }
2469
+
2470
+ _postman_dependency_commands() {
2471
+ local -a sub
2472
+ sub=(
2473
+ 'add:Add a Postman collection, environment, or mock as a workspace dependency.'
2474
+ 'list:List the workspace dependencies declared in .postman/resources.yaml.'
2475
+ 'install:Materialise the dependencies declared in .postman/resources.yaml (all, or one).'
2476
+ 'update:Refresh declared dependencies to the latest content from their source (all, or one).'
2477
+ )
2478
+ _describe -t commands 'dependency command' sub
2479
+ }
2480
+
2481
+ _postman_dependency_add() {
2482
+ _arguments \
2483
+ '(-w --workspace)'{-w,--workspace}'[Workspace id to resolve a name in (defaults to the current workspace).]:id' \
2484
+ '(-y --yes)'{-y,--yes}'[Skip all confirmation prompts.]' \
2485
+ '--json[Output the result as JSON.]' \
2486
+ '(-h --help)'{-h,--help}'[display help for command]' \
2487
+ '*:nameOrId:'
2488
+ }
2489
+
2490
+ _postman_dependency_list() {
2491
+ _arguments \
2492
+ '--type[Only list dependencies of this type (collection, environment, or mock).]:type' \
2493
+ '--json[Output the result as JSON.]' \
2494
+ '(-h --help)'{-h,--help}'[display help for command]'
2495
+ }
2496
+
2497
+ _postman_dependency_install() {
2498
+ _arguments \
2499
+ '--type[Only install dependencies of this type (collection, environment, or mock).]:type' \
2500
+ '--json[Output the result as JSON.]' \
2501
+ '(-h --help)'{-h,--help}'[display help for command]' \
2502
+ '*:nameOrId:'
2503
+ }
2504
+
2505
+ _postman_dependency_update() {
2506
+ _arguments \
2507
+ '--type[Only update dependencies of this type (collection, environment, or mock).]:type' \
2508
+ '--json[Output the result as JSON.]' \
2509
+ '(-h --help)'{-h,--help}'[display help for command]' \
2510
+ '*:nameOrId:'
2511
+ }
2512
+
1974
2513
  # When loaded via fpath + compinit, the file body becomes the function body of
1975
2514
  # `_postman`. In that case `funcstack[1]` is `_postman` and we must actually
1976
2515
  # invoke the completion. When sourced directly, this is a no-op — `_postman`