@xyd-js/openapi2opencli 0.0.0-canary-4287eee-20260630010340
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.
- package/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/README.md +45 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__create/input.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin-api-keys__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__audit-logs__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__audit-logs__list/input.json +54 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__activate/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__activate/input.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__create/input.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__deactivate/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__deactivate/input.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__update/input.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__data-retention__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__data-retention__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__data-retention__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__data-retention__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__create/input.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__update/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__update/input.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__create/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__list/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__retrieve/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api-keys__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__archive/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__archive/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__activate/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__activate/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__deactivate/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__deactivate/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__create/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__data-retention__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__data-retention__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__data-retention__update/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__data-retention__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__create/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__create/input.json +22 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__create/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__create/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__delete/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__list/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__list/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__retrieve/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__roles__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__hosted-tool-permissions__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__hosted-tool-permissions__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__hosted-tool-permissions__update/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__hosted-tool-permissions__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__delete/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__update/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__model-permissions__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate-limits__list-rate-limits/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate-limits__list-rate-limits/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate-limits__update-rate-limit/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate-limits__update-rate-limit/input.json +31 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__create/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__create/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__list/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__update/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__roles__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__update/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service-accounts__update/input.json +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__create/expected.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__create/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__list/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__update/expected.json +20 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__spend-alerts__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__update/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__create/input.json +23 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__create/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__create/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__delete/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__list/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__list/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__retrieve/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__roles__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__update/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__update/input.json +23 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__create/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__update/input.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__create/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__create/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__delete/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__list/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__retrieve/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__update/expected.json +18 -0
- package/__fixtures__/-2.complex.openai/admin__organization__spend-alerts__update/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio-speeches/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio-speeches/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio-transcriptions/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio-transcriptions/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__code-interpreter-sessions/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__code-interpreter-sessions/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__completions/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__completions/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__costs/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__costs/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__embeddings/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__embeddings/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__file-search-calls/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__file-search-calls/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__images/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__images/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__moderations/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__moderations/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__vector-stores/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__vector-stores/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__web-search-calls/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__web-search-calls/input.json +3 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__delete/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__list/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__retrieve/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__update/input.json +24 -0
- package/__fixtures__/-2.complex.openai/audio__speech__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/audio__speech__create/input.json +22 -0
- package/__fixtures__/-2.complex.openai/audio__transcriptions__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/audio__transcriptions__create/input.json +27 -0
- package/__fixtures__/-2.complex.openai/audio__translations__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/audio__translations__create/input.json +19 -0
- package/__fixtures__/-2.complex.openai/batches__cancel/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/batches__cancel/input.json +20 -0
- package/__fixtures__/-2.complex.openai/batches__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/batches__create/input.json +20 -0
- package/__fixtures__/-2.complex.openai/batches__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/batches__list/input.json +19 -0
- package/__fixtures__/-2.complex.openai/batches__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/batches__retrieve/input.json +19 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__create/input.json +26 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__delete/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__list/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__update/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__update/input.json +26 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__sessions__cancel/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__sessions__cancel/input.json +20 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__sessions__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__sessions__create/input.json +20 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__list/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__list/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__list-items/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__list-items/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__chatkit__threads__retrieve/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create/input.json +18 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create-and-run/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create-and-run/input.json +18 -0
- package/__fixtures__/-2.complex.openai/beta__threads__delete/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__threads__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__create/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__create/input.json +25 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__delete/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__list/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__list/input.json +39 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__retrieve/input.json +39 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__update/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__update/input.json +25 -0
- package/__fixtures__/-2.complex.openai/beta__threads__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__threads__retrieve/input.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__cancel/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__cancel/input.json +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__create/input.json +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__list/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__list/input.json +34 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__retrieve/input.json +34 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__list/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__list/input.json +44 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__retrieve/expected.json +17 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__retrieve/input.json +44 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__submit-tool-outputs/expected.json +16 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__submit-tool-outputs/input.json +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__update/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__update/input.json +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__update/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/beta__threads__update/input.json +18 -0
- package/__fixtures__/-2.complex.openai/chat__completions__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/chat__completions__create/input.json +13 -0
- package/__fixtures__/-2.complex.openai/chat__completions__delete/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/chat__completions__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/chat__completions__list/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/chat__completions__list/input.json +34 -0
- package/__fixtures__/-2.complex.openai/chat__completions__messages__list/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/chat__completions__messages__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/chat__completions__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/chat__completions__retrieve/input.json +34 -0
- package/__fixtures__/-2.complex.openai/chat__completions__update/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/chat__completions__update/input.json +13 -0
- package/__fixtures__/-2.complex.openai/completions__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/completions__create/input.json +33 -0
- package/__fixtures__/-2.complex.openai/containers__create/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/containers__create/input.json +20 -0
- package/__fixtures__/-2.complex.openai/containers__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/containers__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/containers__files__content__retrieve/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/containers__files__content__retrieve/input.json +19 -0
- package/__fixtures__/-2.complex.openai/containers__files__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/containers__files__create/input.json +22 -0
- package/__fixtures__/-2.complex.openai/containers__files__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/containers__files__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/containers__files__list/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/containers__files__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/containers__files__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/containers__files__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/containers__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/containers__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/containers__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/containers__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/conversations__create/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/conversations__create/input.json +16 -0
- package/__fixtures__/-2.complex.openai/conversations__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/conversations__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/conversations__items__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/conversations__items__create/input.json +26 -0
- package/__fixtures__/-2.complex.openai/conversations__items__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/conversations__items__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/conversations__items__list/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/conversations__items__list/input.json +34 -0
- package/__fixtures__/-2.complex.openai/conversations__items__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/conversations__items__retrieve/input.json +34 -0
- package/__fixtures__/-2.complex.openai/conversations__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/conversations__retrieve/input.json +14 -0
- package/__fixtures__/-2.complex.openai/conversations__update/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/conversations__update/input.json +16 -0
- package/__fixtures__/-2.complex.openai/embeddings__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/embeddings__create/input.json +19 -0
- package/__fixtures__/-2.complex.openai/files__content/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/files__content/input.json +29 -0
- package/__fixtures__/-2.complex.openai/files__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/files__create/input.json +18 -0
- package/__fixtures__/-2.complex.openai/files__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/files__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/files__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/files__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/files__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/files__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__alpha__graders__run/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__alpha__graders__run/input.json +3 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__alpha__graders__validate/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__alpha__graders__validate/input.json +3 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__delete/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__checkpoints__permissions__retrieve/input.json +34 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__cancel/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__cancel/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__checkpoints__list/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__checkpoints__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__create/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__list/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__list-events/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__list-events/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__pause/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__pause/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__resume/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__resume/input.json +24 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/fine-tuning__jobs__retrieve/input.json +24 -0
- package/__fixtures__/-2.complex.openai/images__create-variation/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/images__create-variation/input.json +3 -0
- package/__fixtures__/-2.complex.openai/images__edit/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/images__edit/input.json +3 -0
- package/__fixtures__/-2.complex.openai/images__generate/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/images__generate/input.json +3 -0
- package/__fixtures__/-2.complex.openai/models__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/models__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/models__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/models__list/input.json +8 -0
- package/__fixtures__/-2.complex.openai/models__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/models__retrieve/input.json +8 -0
- package/__fixtures__/-2.complex.openai/moderations__create/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/moderations__create/input.json +16 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__accept/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__accept/input.json +16 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__hangup/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__hangup/input.json +16 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__refer/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__refer/input.json +16 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__reject/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__reject/input.json +16 -0
- package/__fixtures__/-2.complex.openai/realtime__client-secrets__create/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/realtime__client-secrets__create/input.json +16 -0
- package/__fixtures__/-2.complex.openai/responses__cancel/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/responses__cancel/input.json +13 -0
- package/__fixtures__/-2.complex.openai/responses__compact/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/responses__compact/input.json +13 -0
- package/__fixtures__/-2.complex.openai/responses__create/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/responses__create/input.json +13 -0
- package/__fixtures__/-2.complex.openai/responses__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/responses__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/responses__input-items__list/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/responses__input-items__list/input.json +34 -0
- package/__fixtures__/-2.complex.openai/responses__input-tokens__count/expected.json +11 -0
- package/__fixtures__/-2.complex.openai/responses__input-tokens__count/input.json +26 -0
- package/__fixtures__/-2.complex.openai/responses__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/responses__retrieve/input.json +34 -0
- package/__fixtures__/-2.complex.openai/skills__content__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__content__retrieve/input.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__create/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/skills__create/input.json +14 -0
- package/__fixtures__/-2.complex.openai/skills__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/skills__delete/input.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/skills__list/input.json +23 -0
- package/__fixtures__/-2.complex.openai/skills__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/skills__retrieve/input.json +23 -0
- package/__fixtures__/-2.complex.openai/skills__update/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__update/input.json +14 -0
- package/__fixtures__/-2.complex.openai/skills__versions__content__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/skills__versions__content__retrieve/input.json +18 -0
- package/__fixtures__/-2.complex.openai/skills__versions__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__versions__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/skills__versions__delete/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__versions__delete/input.json +18 -0
- package/__fixtures__/-2.complex.openai/skills__versions__list/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__versions__list/input.json +28 -0
- package/__fixtures__/-2.complex.openai/skills__versions__retrieve/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/skills__versions__retrieve/input.json +28 -0
- package/__fixtures__/-2.complex.openai/uploads__cancel/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/uploads__cancel/input.json +20 -0
- package/__fixtures__/-2.complex.openai/uploads__complete/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/uploads__complete/input.json +20 -0
- package/__fixtures__/-2.complex.openai/uploads__create/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/uploads__create/input.json +20 -0
- package/__fixtures__/-2.complex.openai/uploads__parts__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/uploads__parts__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/vector-stores__create/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/vector-stores__create/input.json +21 -0
- package/__fixtures__/-2.complex.openai/vector-stores__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/vector-stores__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__cancel/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__cancel/input.json +25 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__create/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__create/input.json +25 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__list-files/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__list-files/input.json +19 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__file-batches__retrieve/input.json +19 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__content/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__content/input.json +39 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__create/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__create/input.json +24 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__delete/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__delete/input.json +19 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__list/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__list/input.json +39 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__retrieve/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__retrieve/input.json +39 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__update/expected.json +15 -0
- package/__fixtures__/-2.complex.openai/vector-stores__files__update/input.json +24 -0
- package/__fixtures__/-2.complex.openai/vector-stores__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/vector-stores__list/input.json +29 -0
- package/__fixtures__/-2.complex.openai/vector-stores__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/vector-stores__retrieve/input.json +29 -0
- package/__fixtures__/-2.complex.openai/vector-stores__search/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/vector-stores__search/input.json +21 -0
- package/__fixtures__/-2.complex.openai/vector-stores__update/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/vector-stores__update/input.json +21 -0
- package/__fixtures__/-2.complex.openai/videos__create/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/videos__create/input.json +20 -0
- package/__fixtures__/-2.complex.openai/videos__create-character/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/videos__create-character/input.json +20 -0
- package/__fixtures__/-2.complex.openai/videos__delete/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/videos__delete/input.json +14 -0
- package/__fixtures__/-2.complex.openai/videos__download-content/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/videos__download-content/input.json +24 -0
- package/__fixtures__/-2.complex.openai/videos__edit/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/videos__edit/input.json +20 -0
- package/__fixtures__/-2.complex.openai/videos__extend/expected.json +14 -0
- package/__fixtures__/-2.complex.openai/videos__extend/input.json +20 -0
- package/__fixtures__/-2.complex.openai/videos__get-character/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/videos__get-character/input.json +24 -0
- package/__fixtures__/-2.complex.openai/videos__list/expected.json +10 -0
- package/__fixtures__/-2.complex.openai/videos__list/input.json +24 -0
- package/__fixtures__/-2.complex.openai/videos__remix/expected.json +13 -0
- package/__fixtures__/-2.complex.openai/videos__remix/input.json +20 -0
- package/__fixtures__/-2.complex.openai/videos__retrieve/expected.json +12 -0
- package/__fixtures__/-2.complex.openai/videos__retrieve/input.json +24 -0
- package/__fixtures__/1.basic/input.yaml +48 -0
- package/__fixtures__/1.basic/output.json +74 -0
- package/__fixtures__/2.crud/input.yaml +113 -0
- package/__fixtures__/2.crud/output.json +281 -0
- package/__fixtures__/3.nested/input.yaml +84 -0
- package/__fixtures__/3.nested/output.json +196 -0
- package/__fixtures__/4.body-flatten/input.yaml +61 -0
- package/__fixtures__/4.body-flatten/output.json +153 -0
- package/__tests__/conformance.test.ts +99 -0
- package/__tests__/docs-oracle.test.ts +237 -0
- package/__tests__/openapi2opencli.test.ts +31 -0
- package/__tests__/utils.ts +41 -0
- package/biome.json +25 -0
- package/index.ts +1 -0
- package/oracle/README.md +41 -0
- package/oracle/coverage.floor.json +4 -0
- package/oracle/docs-allowlist.json +201 -0
- package/oracle/docs-coverage.floor.json +4 -0
- package/oracle/docs-methods.json +3744 -0
- package/oracle/docsOracle.ts +152 -0
- package/oracle/openai-openapi.yaml +81040 -0
- package/oracle/parseOpenaiCli.ts +205 -0
- package/oracle/pins.json +6 -0
- package/oracle/surface.json +5844 -0
- package/package.json +27 -0
- package/src/action.ts +118 -0
- package/src/body.ts +132 -0
- package/src/command.ts +66 -0
- package/src/index.ts +12 -0
- package/src/naming.ts +40 -0
- package/src/openapi2opencli.ts +106 -0
- package/src/parameters.ts +108 -0
- package/src/schema.ts +110 -0
- package/src/security.ts +43 -0
- package/src/surface.ts +165 -0
- package/src/tree.ts +78 -0
- package/src/types.ts +86 -0
- package/src/unique.ts +11 -0
- package/tsconfig.json +18 -0
- package/tsup.config.ts +19 -0
- package/vitest.config.ts +8 -0
package/src/schema.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
|
|
3
|
+
export type Schema = OpenAPIV3.SchemaObject;
|
|
4
|
+
|
|
5
|
+
const SCALAR_TYPES = new Set(['string', 'number', 'integer', 'boolean']);
|
|
6
|
+
|
|
7
|
+
/** The scalar type of a schema, or null if it isn't a scalar. */
|
|
8
|
+
export function scalarType(schema: Schema | undefined): string | null {
|
|
9
|
+
if (!schema) return null;
|
|
10
|
+
const t = typeof schema.type === 'string' ? schema.type : undefined;
|
|
11
|
+
if (t && SCALAR_TYPES.has(t)) return t;
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isScalar(schema: Schema | undefined): boolean {
|
|
16
|
+
return scalarType(schema) !== null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isBoolean(schema: Schema | undefined): boolean {
|
|
20
|
+
return scalarType(schema) === 'boolean';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function isArray(schema: Schema | undefined): boolean {
|
|
24
|
+
return !!schema && schema.type === 'array';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function arrayItems(schema: Schema | undefined): Schema | undefined {
|
|
28
|
+
if (!schema || schema.type !== 'array') return undefined;
|
|
29
|
+
return schema.items as Schema | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** True when the schema is an object (explicit type or has properties). */
|
|
33
|
+
export function isObjectSchema(schema: Schema | undefined): boolean {
|
|
34
|
+
if (!schema) return false;
|
|
35
|
+
if (schema.type === 'object') return true;
|
|
36
|
+
if (schema.properties && Object.keys(schema.properties).length > 0) return true;
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Enum values rendered as strings (undefined when not an enum). */
|
|
41
|
+
export function getEnum(schema: Schema | undefined): string[] | undefined {
|
|
42
|
+
if (!schema || !Array.isArray(schema.enum) || schema.enum.length === 0) return undefined;
|
|
43
|
+
return schema.enum.map((v) => String(v));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function getDefault(schema: Schema | undefined): unknown {
|
|
47
|
+
if (!schema) return undefined;
|
|
48
|
+
return (schema as { default?: unknown }).default;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function getDescription(schema: Schema | undefined): string | undefined {
|
|
52
|
+
return schema?.description;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Merge an `allOf` chain into a single object schema (properties + required).
|
|
57
|
+
* Non-allOf schemas are returned unchanged.
|
|
58
|
+
*/
|
|
59
|
+
export function mergeAllOf(schema: Schema | undefined): Schema | undefined {
|
|
60
|
+
if (!schema || !Array.isArray(schema.allOf) || schema.allOf.length === 0) return schema;
|
|
61
|
+
|
|
62
|
+
const merged: Schema = { type: 'object', properties: {}, required: [] };
|
|
63
|
+
const required = new Set<string>(Array.isArray(schema.required) ? schema.required : []);
|
|
64
|
+
|
|
65
|
+
for (const sub of schema.allOf as Schema[]) {
|
|
66
|
+
const resolved = mergeAllOf(sub) ?? sub;
|
|
67
|
+
if (resolved.properties) {
|
|
68
|
+
Object.assign(merged.properties as Record<string, unknown>, resolved.properties);
|
|
69
|
+
}
|
|
70
|
+
if (Array.isArray(resolved.required)) {
|
|
71
|
+
for (const r of resolved.required) required.add(r);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Properties declared directly alongside allOf
|
|
75
|
+
if (schema.properties) {
|
|
76
|
+
Object.assign(merged.properties as Record<string, unknown>, schema.properties);
|
|
77
|
+
}
|
|
78
|
+
merged.required = [...required];
|
|
79
|
+
if (schema.description) merged.description = schema.description;
|
|
80
|
+
return merged;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Resolve a body schema to the object schema we can flatten, plus a flag telling
|
|
85
|
+
* whether the original was a non-trivial composition (oneOf/anyOf) we only
|
|
86
|
+
* partially captured.
|
|
87
|
+
*/
|
|
88
|
+
export function resolveObjectSchema(schema: Schema | undefined): { object?: Schema; complex: boolean } {
|
|
89
|
+
if (!schema) return { complex: false };
|
|
90
|
+
|
|
91
|
+
const merged = mergeAllOf(schema) ?? schema;
|
|
92
|
+
if (isObjectSchema(merged)) return { object: merged, complex: false };
|
|
93
|
+
|
|
94
|
+
// oneOf / anyOf at the body root: take the first object branch, mark complex.
|
|
95
|
+
const branches = (merged.oneOf || merged.anyOf) as Schema[] | undefined;
|
|
96
|
+
if (Array.isArray(branches)) {
|
|
97
|
+
for (const branch of branches) {
|
|
98
|
+
const b = mergeAllOf(branch) ?? branch;
|
|
99
|
+
if (isObjectSchema(b)) return { object: b, complex: true };
|
|
100
|
+
}
|
|
101
|
+
return { complex: true };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return { complex: false };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** True for a binary/file string property (multipart uploads). */
|
|
108
|
+
export function isBinary(schema: Schema | undefined): boolean {
|
|
109
|
+
return !!schema && schema.type === 'string' && schema.format === 'binary';
|
|
110
|
+
}
|
package/src/security.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { XOpenApiSecurity } from '@xyd-js/opencli';
|
|
3
|
+
|
|
4
|
+
import { screamingSnakeCase } from './naming';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Map the document's `components.securitySchemes` to the OpenCLI `x-openapi`
|
|
8
|
+
* security shape, attaching a best-guess env var name a generated CLI reads
|
|
9
|
+
* the credential from.
|
|
10
|
+
*/
|
|
11
|
+
export function securitySchemesToXOpenApi(
|
|
12
|
+
doc: OpenAPIV3.Document,
|
|
13
|
+
cliName: string,
|
|
14
|
+
authEnvVar?: string,
|
|
15
|
+
): XOpenApiSecurity[] {
|
|
16
|
+
const schemes = doc.components?.securitySchemes;
|
|
17
|
+
if (!schemes) return [];
|
|
18
|
+
|
|
19
|
+
const defaultEnv = authEnvVar || `${screamingSnakeCase(cliName)}_API_KEY`;
|
|
20
|
+
const out: XOpenApiSecurity[] = [];
|
|
21
|
+
|
|
22
|
+
for (const value of Object.values(schemes)) {
|
|
23
|
+
const scheme = value as OpenAPIV3.SecuritySchemeObject;
|
|
24
|
+
if (!scheme || typeof scheme !== 'object' || !('type' in scheme)) continue;
|
|
25
|
+
|
|
26
|
+
const entry: XOpenApiSecurity = { type: scheme.type, kind: 'other', envVar: defaultEnv };
|
|
27
|
+
|
|
28
|
+
if (scheme.type === 'http') {
|
|
29
|
+
entry.scheme = scheme.scheme;
|
|
30
|
+
if ('bearerFormat' in scheme && scheme.bearerFormat) entry.bearerFormat = scheme.bearerFormat;
|
|
31
|
+
const s = (scheme.scheme || '').toLowerCase();
|
|
32
|
+
entry.kind = s === 'basic' ? 'basic' : 'bearer';
|
|
33
|
+
} else if (scheme.type === 'apiKey') {
|
|
34
|
+
entry.in = scheme.in;
|
|
35
|
+
entry.name = scheme.name;
|
|
36
|
+
entry.kind = scheme.in === 'query' ? 'apiKey-query' : scheme.in === 'cookie' ? 'apiKey-cookie' : 'apiKey-header';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
out.push(entry);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return out;
|
|
43
|
+
}
|
package/src/surface.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { Command, OpencliSpecJson, XOpenApiCommand } from '@xyd-js/opencli';
|
|
2
|
+
|
|
3
|
+
// A canonical, language-agnostic "CLI surface" both our OpenCLI output and the
|
|
4
|
+
// openai-cli Go source reduce to, so they can be diffed command-by-command.
|
|
5
|
+
|
|
6
|
+
export type FlagKind = 'path' | 'query' | 'body' | 'header' | 'global' | 'unknown';
|
|
7
|
+
|
|
8
|
+
export interface SurfaceFlag {
|
|
9
|
+
name: string; // kebab CLI flag name
|
|
10
|
+
required: boolean;
|
|
11
|
+
kind: FlagKind;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SurfaceCommand {
|
|
15
|
+
path: string[]; // e.g. ["chat","completions","create"]
|
|
16
|
+
flags: SurfaceFlag[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CliSurface {
|
|
20
|
+
commands: SurfaceCommand[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function locationToKind(location: string): FlagKind {
|
|
24
|
+
switch (location) {
|
|
25
|
+
case 'query':
|
|
26
|
+
return 'query';
|
|
27
|
+
case 'body':
|
|
28
|
+
return 'body';
|
|
29
|
+
case 'header':
|
|
30
|
+
return 'header';
|
|
31
|
+
case 'cookie':
|
|
32
|
+
return 'header';
|
|
33
|
+
default:
|
|
34
|
+
return 'unknown';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function sortFlags(flags: SurfaceFlag[]): SurfaceFlag[] {
|
|
39
|
+
return [...flags].sort((a, b) => a.name.localeCompare(b.name));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const fromOption = (from: string | undefined): string | undefined =>
|
|
43
|
+
from && from.startsWith('option:') ? from.slice('option:'.length) : undefined;
|
|
44
|
+
|
|
45
|
+
/** Classify an OpenCLI option's flag kind from the command's x-openapi binding. */
|
|
46
|
+
function optionKind(optName: string, x: XOpenApiCommand | undefined): FlagKind {
|
|
47
|
+
const param = (x?.params || []).find((p) => fromOption(p.from) === optName && p.in !== 'path');
|
|
48
|
+
if (param) return locationToKind(param.in);
|
|
49
|
+
const inBody =
|
|
50
|
+
(x?.body?.properties || []).some((p) => fromOption(p.from) === optName) ||
|
|
51
|
+
fromOption(x?.body?.from) === optName;
|
|
52
|
+
return inBody ? 'body' : 'query';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Flatten an OpenCLI document to the canonical surface (path params become `path` flags). */
|
|
56
|
+
export function opencliToSurface(spec: OpencliSpecJson): CliSurface {
|
|
57
|
+
const commands: SurfaceCommand[] = [];
|
|
58
|
+
|
|
59
|
+
const walk = (cmds: Command[], prefix: string[]) => {
|
|
60
|
+
for (const c of cmds) {
|
|
61
|
+
const path = [...prefix, c.name];
|
|
62
|
+
if (c.commands?.length) {
|
|
63
|
+
walk(c.commands, path);
|
|
64
|
+
} else if (c['x-openapi']) {
|
|
65
|
+
const x = c['x-openapi'] as XOpenApiCommand;
|
|
66
|
+
const flags: SurfaceFlag[] = [];
|
|
67
|
+
for (const a of c.arguments || []) {
|
|
68
|
+
flags.push({ name: a.name, required: a.required === true, kind: 'path' });
|
|
69
|
+
}
|
|
70
|
+
for (const opt of c.options || []) {
|
|
71
|
+
flags.push({ name: opt.name, required: opt.required === true, kind: optionKind(opt.name, x) });
|
|
72
|
+
}
|
|
73
|
+
commands.push({ path, flags: sortFlags(flags) });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
walk(spec.commands || [], []);
|
|
79
|
+
return commands.length ? { commands } : { commands: [] };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const key = (path: string[]) => path.join(' ');
|
|
83
|
+
|
|
84
|
+
export interface CommandDiff {
|
|
85
|
+
path: string[];
|
|
86
|
+
flagsOnlyOurs: string[];
|
|
87
|
+
flagsOnlyOracle: string[];
|
|
88
|
+
pathKindMismatch: string[]; // flags present on both but path-vs-non-path differs
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface SurfaceDiff {
|
|
92
|
+
oracleCommandCount: number;
|
|
93
|
+
oursCommandCount: number;
|
|
94
|
+
commandsMatched: string[]; // present in both
|
|
95
|
+
commandsOnlyOracle: string[];
|
|
96
|
+
commandsOnlyOurs: string[];
|
|
97
|
+
perCommand: CommandDiff[]; // for matched commands with flag differences
|
|
98
|
+
l0Coverage: number; // |matched| / oracleCount
|
|
99
|
+
l1Coverage: number; // matched commands whose flags fully agree / oracleCount
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface Allowlist {
|
|
103
|
+
/** Command paths (space-joined) to skip entirely. */
|
|
104
|
+
skipCommands?: string[];
|
|
105
|
+
/** Flag names that are expected extras on the oracle side for any command (e.g. pagination). */
|
|
106
|
+
oracleOnlyFlags?: string[];
|
|
107
|
+
/** Flag names that are expected extras on our side for any command. */
|
|
108
|
+
oursOnlyFlags?: string[];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Diff two surfaces command-by-command, applying an allowlist of known divergences. */
|
|
112
|
+
export function diffSurfaces(ours: CliSurface, oracle: CliSurface, allow: Allowlist = {}): SurfaceDiff {
|
|
113
|
+
const skip = new Set(allow.skipCommands || []);
|
|
114
|
+
const oracleOnlyOk = new Set(allow.oracleOnlyFlags || []);
|
|
115
|
+
const oursOnlyOk = new Set(allow.oursOnlyFlags || []);
|
|
116
|
+
|
|
117
|
+
const oursByKey = new Map(ours.commands.map((c) => [key(c.path), c]));
|
|
118
|
+
const oracleByKey = new Map(oracle.commands.map((c) => [key(c.path), c]));
|
|
119
|
+
|
|
120
|
+
const oracleKeys = [...oracleByKey.keys()].filter((k) => !skip.has(k));
|
|
121
|
+
const matched: string[] = [];
|
|
122
|
+
const onlyOracle: string[] = [];
|
|
123
|
+
const onlyOurs: string[] = [];
|
|
124
|
+
const perCommand: CommandDiff[] = [];
|
|
125
|
+
let l1Clean = 0;
|
|
126
|
+
|
|
127
|
+
for (const k of oracleKeys) {
|
|
128
|
+
if (oursByKey.has(k)) matched.push(k);
|
|
129
|
+
else onlyOracle.push(k);
|
|
130
|
+
}
|
|
131
|
+
for (const k of oursByKey.keys()) {
|
|
132
|
+
if (!skip.has(k) && !oracleByKey.has(k)) onlyOurs.push(k);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
for (const k of matched) {
|
|
136
|
+
const o = oursByKey.get(k)!;
|
|
137
|
+
const r = oracleByKey.get(k)!;
|
|
138
|
+
const oNames = new Map(o.flags.map((f) => [f.name, f]));
|
|
139
|
+
const rNames = new Map(r.flags.map((f) => [f.name, f]));
|
|
140
|
+
|
|
141
|
+
const flagsOnlyOurs = [...oNames.keys()].filter((n) => !rNames.has(n) && !oursOnlyOk.has(n));
|
|
142
|
+
const flagsOnlyOracle = [...rNames.keys()].filter((n) => !oNames.has(n) && !oracleOnlyOk.has(n));
|
|
143
|
+
const pathKindMismatch = [...oNames.keys()]
|
|
144
|
+
.filter((n) => rNames.has(n))
|
|
145
|
+
.filter((n) => (oNames.get(n)!.kind === 'path') !== (rNames.get(n)!.kind === 'path'));
|
|
146
|
+
|
|
147
|
+
if (flagsOnlyOurs.length || flagsOnlyOracle.length || pathKindMismatch.length) {
|
|
148
|
+
perCommand.push({ path: o.path, flagsOnlyOurs, flagsOnlyOracle, pathKindMismatch });
|
|
149
|
+
} else {
|
|
150
|
+
l1Clean++;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const oracleCount = oracleKeys.length || 1;
|
|
155
|
+
return {
|
|
156
|
+
oracleCommandCount: oracleKeys.length,
|
|
157
|
+
oursCommandCount: ours.commands.length,
|
|
158
|
+
commandsMatched: matched.sort(),
|
|
159
|
+
commandsOnlyOracle: onlyOracle.sort(),
|
|
160
|
+
commandsOnlyOurs: onlyOurs.sort(),
|
|
161
|
+
perCommand: perCommand.sort((a, b) => key(a.path).localeCompare(key(b.path))),
|
|
162
|
+
l0Coverage: matched.length / oracleCount,
|
|
163
|
+
l1Coverage: l1Clean / oracleCount,
|
|
164
|
+
};
|
|
165
|
+
}
|
package/src/tree.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Command } from '@xyd-js/opencli';
|
|
2
|
+
|
|
3
|
+
const ACTION_RANK: Record<string, number> = {
|
|
4
|
+
list: 0,
|
|
5
|
+
create: 1,
|
|
6
|
+
retrieve: 2,
|
|
7
|
+
get: 2,
|
|
8
|
+
update: 3,
|
|
9
|
+
modify: 3,
|
|
10
|
+
replace: 3,
|
|
11
|
+
delete: 4,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function leafRank(name: string): number {
|
|
15
|
+
return name in ACTION_RANK ? ACTION_RANK[name] : 100;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface TreeNode {
|
|
19
|
+
name: string;
|
|
20
|
+
children: Map<string, TreeNode>;
|
|
21
|
+
leaves: Command[];
|
|
22
|
+
usedLeafNames: Set<string>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function newNode(name: string): TreeNode {
|
|
26
|
+
return { name, children: new Map(), leaves: [], usedLeafNames: new Set() };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Builds the OpenCLI command tree from operations. Static path segments become
|
|
31
|
+
* nested resource nodes; leaf actions are attached to their resource node.
|
|
32
|
+
*/
|
|
33
|
+
export class CommandTree {
|
|
34
|
+
private root = newNode('');
|
|
35
|
+
|
|
36
|
+
insert(resourcePath: string[], leaf: Command): void {
|
|
37
|
+
let node = this.root;
|
|
38
|
+
for (const seg of resourcePath) {
|
|
39
|
+
let child = node.children.get(seg);
|
|
40
|
+
if (!child) {
|
|
41
|
+
child = newNode(seg);
|
|
42
|
+
node.children.set(seg, child);
|
|
43
|
+
}
|
|
44
|
+
node = child;
|
|
45
|
+
}
|
|
46
|
+
// Deduplicate leaf action names within the resource node.
|
|
47
|
+
let name = leaf.name;
|
|
48
|
+
if (node.usedLeafNames.has(name)) {
|
|
49
|
+
let i = 2;
|
|
50
|
+
while (node.usedLeafNames.has(`${name}-${i}`)) i++;
|
|
51
|
+
name = `${name}-${i}`;
|
|
52
|
+
leaf.name = name;
|
|
53
|
+
}
|
|
54
|
+
node.usedLeafNames.add(name);
|
|
55
|
+
node.leaves.push(leaf);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
emit(): Command[] {
|
|
59
|
+
return this.emitChildren(this.root);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private emitChildren(node: TreeNode): Command[] {
|
|
63
|
+
const children = [...node.children.values()]
|
|
64
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
65
|
+
.map((child) => this.emitNode(child));
|
|
66
|
+
const leaves = [...node.leaves].sort(
|
|
67
|
+
(a, b) => leafRank(a.name) - leafRank(b.name) || a.name.localeCompare(b.name),
|
|
68
|
+
);
|
|
69
|
+
return [...children, ...leaves];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private emitNode(node: TreeNode): Command {
|
|
73
|
+
const cmd: Command = { name: node.name };
|
|
74
|
+
const subs = this.emitChildren(node);
|
|
75
|
+
if (subs.length) cmd.commands = subs;
|
|
76
|
+
return cmd;
|
|
77
|
+
}
|
|
78
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type Grouping = 'path' | 'tag' | 'operationId';
|
|
2
|
+
export type BodyStrategy = 'flatten' | 'json' | 'hybrid';
|
|
3
|
+
export type FlagCase = 'kebab' | 'camel';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The five canonical action buckets derived from HTTP method + path shape.
|
|
7
|
+
* Override any of them via {@link OpenApi2OpenCliOptions.verbMap}.
|
|
8
|
+
*/
|
|
9
|
+
export interface VerbMap {
|
|
10
|
+
/** GET on a collection (path ends in a static segment). Default: "list". */
|
|
11
|
+
listCollection?: string;
|
|
12
|
+
/** GET on an item (path ends in `{param}`). Default: "retrieve". */
|
|
13
|
+
getItem?: string;
|
|
14
|
+
/** POST on a collection. Default: "create". */
|
|
15
|
+
createCollection?: string;
|
|
16
|
+
/** PUT/PATCH (and PUT on collection) on an item. Default: "update". */
|
|
17
|
+
updateItem?: string;
|
|
18
|
+
/** DELETE on an item. Default: "delete". */
|
|
19
|
+
deleteItem?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface OpenApi2OpenCliOptions {
|
|
23
|
+
/** CLI name → `info.title`. Default: slug(doc.info.title). */
|
|
24
|
+
cliName?: string;
|
|
25
|
+
/** CLI version → `info.version`. Default: doc.info.version. */
|
|
26
|
+
version?: string;
|
|
27
|
+
/** Primary grouping signal. Only "path" is implemented in Stage A. Default: "path". */
|
|
28
|
+
grouping?: Grouping;
|
|
29
|
+
/** How request bodies become flags. Default: "hybrid". */
|
|
30
|
+
bodyStrategy?: BodyStrategy;
|
|
31
|
+
/** HTTP methods to include. Default: SUPPORTED_HTTP_METHODS from @xyd-js/openapi. */
|
|
32
|
+
includeMethods?: string[];
|
|
33
|
+
/** Map header (and cookie) params to options. Default: false. */
|
|
34
|
+
includeHeaders?: boolean;
|
|
35
|
+
/** Flag name casing. Default: "kebab". */
|
|
36
|
+
flagCase?: FlagCase;
|
|
37
|
+
/** Emit action aliases (e.g. "get" for "retrieve"). Default: true. */
|
|
38
|
+
actionAliases?: boolean;
|
|
39
|
+
/** Override the canonical action verbs. */
|
|
40
|
+
verbMap?: VerbMap;
|
|
41
|
+
/**
|
|
42
|
+
* Trailing static path segments (after a `{param}`) treated as custom actions
|
|
43
|
+
* rather than sub-resources, e.g. `/batches/{id}/cancel` → `batches cancel`.
|
|
44
|
+
* Provided as wire segments (matched case-insensitively, before kebab-casing).
|
|
45
|
+
* Defaults to a common set (see DEFAULT_CUSTOM_ACTION_VERBS).
|
|
46
|
+
*/
|
|
47
|
+
customActionVerbs?: string[];
|
|
48
|
+
/** Only include operations whose path starts with one of these prefixes (test scoping). */
|
|
49
|
+
includePaths?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* How deep to flatten nested body objects before falling back to a JSON-string flag.
|
|
52
|
+
* Default: 1 (only top-level scalar properties flatten).
|
|
53
|
+
*/
|
|
54
|
+
maxBodyDepth?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Environment variable a generated CLI reads the API credential from.
|
|
57
|
+
* Default: `${SCREAMING_SNAKE(cliName)}_API_KEY` (e.g. OPENAI_API_KEY).
|
|
58
|
+
*/
|
|
59
|
+
authEnvVar?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const DEFAULT_CUSTOM_ACTION_VERBS = [
|
|
63
|
+
'cancel',
|
|
64
|
+
'submit',
|
|
65
|
+
'complete',
|
|
66
|
+
'expire',
|
|
67
|
+
'archive',
|
|
68
|
+
'unarchive',
|
|
69
|
+
'restore',
|
|
70
|
+
'validate',
|
|
71
|
+
'verify',
|
|
72
|
+
'refund',
|
|
73
|
+
'capture',
|
|
74
|
+
'void',
|
|
75
|
+
'pause',
|
|
76
|
+
'resume',
|
|
77
|
+
'start',
|
|
78
|
+
'stop',
|
|
79
|
+
'retry',
|
|
80
|
+
'finalize',
|
|
81
|
+
'confirm',
|
|
82
|
+
'approve',
|
|
83
|
+
'reject',
|
|
84
|
+
'publish',
|
|
85
|
+
'unpublish',
|
|
86
|
+
];
|
package/src/unique.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Allocate a unique name within `used`, suffixing `-2`, `-3`, … on collision. */
|
|
2
|
+
export function uniqueName(base: string, used: Set<string>): string {
|
|
3
|
+
let name = base;
|
|
4
|
+
let i = 2;
|
|
5
|
+
while (used.has(name)) {
|
|
6
|
+
name = `${base}-${i}`;
|
|
7
|
+
i++;
|
|
8
|
+
}
|
|
9
|
+
used.add(name);
|
|
10
|
+
return name;
|
|
11
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"declarationMap": true,
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
|
15
|
+
},
|
|
16
|
+
"include": ["index.ts", "src/**/*.ts"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['index.ts'],
|
|
5
|
+
format: ['esm', 'cjs'], // Output both ESM and CJS formats
|
|
6
|
+
target: 'node16', // Ensure compatibility with Node.js 16
|
|
7
|
+
dts: {
|
|
8
|
+
entry: 'index.ts', // Specify the entry for DTS
|
|
9
|
+
resolve: true, // Resolve external types
|
|
10
|
+
},
|
|
11
|
+
splitting: false, // Disable code splitting
|
|
12
|
+
sourcemap: true, // Generate source maps
|
|
13
|
+
clean: true, // Clean the output directory before each build
|
|
14
|
+
esbuildOptions: (options) => {
|
|
15
|
+
options.platform = 'node'; // Ensure the platform is set to Node.js
|
|
16
|
+
options.external = ['node:fs/promises']; // Mark 'node:fs/promises' as external
|
|
17
|
+
options.loader = { '.js': 'jsx' }; // Ensure proper handling of .js files
|
|
18
|
+
},
|
|
19
|
+
});
|