From ea90a5f651f9550ade7d781d64e6bdea6583a2a3 Mon Sep 17 00:00:00 2001 From: Justin Bennett Date: Wed, 1 Nov 2023 11:42:37 -0400 Subject: [PATCH] Update to MSW 2.0 --- client/msw-handlers.ts | 477 +++++++++++++++++++++---------- generator/client/msw-handlers.ts | 2 +- package-lock.json | 112 ++++---- package.json | 2 +- 4 files changed, 377 insertions(+), 216 deletions(-) diff --git a/client/msw-handlers.ts b/client/msw-handlers.ts index 3befd85..9e53893 100644 --- a/client/msw-handlers.ts +++ b/client/msw-handlers.ts @@ -9,8 +9,8 @@ */ import { - rest, - RestHandler, + http, + HttpHandler, HttpResponse, StrictResponse, delay as doDelay, @@ -45,61 +45,77 @@ export type Json = Snakify>; export interface MSWHandlers { /** `POST /device/auth` */ - deviceAuthRequest: (params: { req: Request }) => StatusCode; + deviceAuthRequest: (params: { + req: Request; + cookies: Record; + }) => StatusCode; /** `POST /device/confirm` */ deviceAuthConfirm: (params: { body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `POST /device/token` */ - deviceAccessToken: (params: { req: Request }) => StatusCode; + deviceAccessToken: (params: { + req: Request; + cookies: Record; + }) => StatusCode; /** `POST /login/:siloName/saml/:providerName` */ loginSaml: (params: { path: Api.LoginSamlPathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/certificates` */ certificateList: (params: { query: Api.CertificateListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/certificates` */ certificateCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/certificates/:certificate` */ certificateView: (params: { path: Api.CertificateViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/certificates/:certificate` */ certificateDelete: (params: { path: Api.CertificateDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/disks` */ diskList: (params: { query: Api.DiskListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/disks` */ diskCreate: (params: { query: Api.DiskCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/disks/:disk` */ diskView: (params: { path: Api.DiskViewPathParams; query: Api.DiskViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/disks/:disk` */ diskDelete: (params: { path: Api.DiskDeletePathParams; query: Api.DiskDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/disks/:disk/bulk-write` */ diskBulkWriteImport: (params: { @@ -107,18 +123,21 @@ export interface MSWHandlers { query: Api.DiskBulkWriteImportQueryParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/disks/:disk/bulk-write-start` */ diskBulkWriteImportStart: (params: { path: Api.DiskBulkWriteImportStartPathParams; query: Api.DiskBulkWriteImportStartQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/disks/:disk/bulk-write-stop` */ diskBulkWriteImportStop: (params: { path: Api.DiskBulkWriteImportStopPathParams; query: Api.DiskBulkWriteImportStopQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/disks/:disk/finalize` */ diskFinalizeImport: (params: { @@ -126,6 +145,7 @@ export interface MSWHandlers { query: Api.DiskFinalizeImportQueryParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/disks/:disk/import` */ diskImportBlocksFromUrl: (params: { @@ -133,86 +153,101 @@ export interface MSWHandlers { query: Api.DiskImportBlocksFromUrlQueryParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/disks/:disk/metrics/:metric` */ diskMetricsList: (params: { path: Api.DiskMetricsListPathParams; query: Api.DiskMetricsListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/groups` */ groupList: (params: { query: Api.GroupListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/groups/:groupId` */ groupView: (params: { path: Api.GroupViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/images` */ imageList: (params: { query: Api.ImageListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/images` */ imageCreate: (params: { query: Api.ImageCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/images/:image` */ imageView: (params: { path: Api.ImageViewPathParams; query: Api.ImageViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/images/:image` */ imageDelete: (params: { path: Api.ImageDeletePathParams; query: Api.ImageDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/images/:image/demote` */ imageDemote: (params: { path: Api.ImageDemotePathParams; query: Api.ImageDemoteQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/images/:image/promote` */ imagePromote: (params: { path: Api.ImagePromotePathParams; query: Api.ImagePromoteQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/instances` */ instanceList: (params: { query: Api.InstanceListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances` */ instanceCreate: (params: { query: Api.InstanceCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/instances/:instance` */ instanceView: (params: { path: Api.InstanceViewPathParams; query: Api.InstanceViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/instances/:instance` */ instanceDelete: (params: { path: Api.InstanceDeletePathParams; query: Api.InstanceDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/instances/:instance/disks` */ instanceDiskList: (params: { path: Api.InstanceDiskListPathParams; query: Api.InstanceDiskListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances/:instance/disks/attach` */ instanceDiskAttach: (params: { @@ -220,6 +255,7 @@ export interface MSWHandlers { query: Api.InstanceDiskAttachQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances/:instance/disks/detach` */ instanceDiskDetach: (params: { @@ -227,12 +263,14 @@ export interface MSWHandlers { query: Api.InstanceDiskDetachQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/instances/:instance/external-ips` */ instanceExternalIpList: (params: { path: Api.InstanceExternalIpListPathParams; query: Api.InstanceExternalIpListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances/:instance/migrate` */ instanceMigrate: (params: { @@ -240,105 +278,129 @@ export interface MSWHandlers { query: Api.InstanceMigrateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances/:instance/reboot` */ instanceReboot: (params: { path: Api.InstanceRebootPathParams; query: Api.InstanceRebootQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/instances/:instance/serial-console` */ instanceSerialConsole: (params: { path: Api.InstanceSerialConsolePathParams; query: Api.InstanceSerialConsoleQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/instances/:instance/serial-console/stream` */ instanceSerialConsoleStream: (params: { path: Api.InstanceSerialConsoleStreamPathParams; query: Api.InstanceSerialConsoleStreamQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/instances/:instance/start` */ instanceStart: (params: { path: Api.InstanceStartPathParams; query: Api.InstanceStartQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/instances/:instance/stop` */ instanceStop: (params: { path: Api.InstanceStopPathParams; query: Api.InstanceStopQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/ip-pools` */ projectIpPoolList: (params: { query: Api.ProjectIpPoolListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/ip-pools/:pool` */ projectIpPoolView: (params: { path: Api.ProjectIpPoolViewPathParams; query: Api.ProjectIpPoolViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/login/:siloName/local` */ loginLocal: (params: { path: Api.LoginLocalPathParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/logout` */ - logout: (params: { req: Request }) => StatusCode; + logout: (params: { + req: Request; + cookies: Record; + }) => StatusCode; /** `GET /v1/me` */ - currentUserView: (params: { req: Request }) => HandlerResult; + currentUserView: (params: { + req: Request; + cookies: Record; + }) => HandlerResult; /** `GET /v1/me/groups` */ currentUserGroups: (params: { query: Api.CurrentUserGroupsQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/me/ssh-keys` */ currentUserSshKeyList: (params: { query: Api.CurrentUserSshKeyListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/me/ssh-keys` */ currentUserSshKeyCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/me/ssh-keys/:sshKey` */ currentUserSshKeyView: (params: { path: Api.CurrentUserSshKeyViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/me/ssh-keys/:sshKey` */ currentUserSshKeyDelete: (params: { path: Api.CurrentUserSshKeyDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/metrics/:metricName` */ siloMetric: (params: { path: Api.SiloMetricPathParams; query: Api.SiloMetricQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/network-interfaces` */ instanceNetworkInterfaceList: (params: { query: Api.InstanceNetworkInterfaceListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/network-interfaces` */ instanceNetworkInterfaceCreate: (params: { query: Api.InstanceNetworkInterfaceCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/network-interfaces/:interface` */ instanceNetworkInterfaceView: (params: { path: Api.InstanceNetworkInterfaceViewPathParams; query: Api.InstanceNetworkInterfaceViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/network-interfaces/:interface` */ instanceNetworkInterfaceUpdate: (params: { @@ -346,121 +408,146 @@ export interface MSWHandlers { query: Api.InstanceNetworkInterfaceUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/network-interfaces/:interface` */ instanceNetworkInterfaceDelete: (params: { path: Api.InstanceNetworkInterfaceDeletePathParams; query: Api.InstanceNetworkInterfaceDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/policy` */ - policyView: (params: { req: Request }) => HandlerResult; + policyView: (params: { + req: Request; + cookies: Record; + }) => HandlerResult; /** `PUT /v1/policy` */ policyUpdate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/projects` */ projectList: (params: { query: Api.ProjectListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/projects` */ projectCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/projects/:project` */ projectView: (params: { path: Api.ProjectViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/projects/:project` */ projectUpdate: (params: { path: Api.ProjectUpdatePathParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/projects/:project` */ projectDelete: (params: { path: Api.ProjectDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/projects/:project/policy` */ projectPolicyView: (params: { path: Api.ProjectPolicyViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/projects/:project/policy` */ projectPolicyUpdate: (params: { path: Api.ProjectPolicyUpdatePathParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/snapshots` */ snapshotList: (params: { query: Api.SnapshotListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/snapshots` */ snapshotCreate: (params: { query: Api.SnapshotCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/snapshots/:snapshot` */ snapshotView: (params: { path: Api.SnapshotViewPathParams; query: Api.SnapshotViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/snapshots/:snapshot` */ snapshotDelete: (params: { path: Api.SnapshotDeletePathParams; query: Api.SnapshotDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/hardware/disks` */ physicalDiskList: (params: { query: Api.PhysicalDiskListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/racks` */ rackList: (params: { query: Api.RackListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/racks/:rackId` */ rackView: (params: { path: Api.RackViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/sleds` */ sledList: (params: { query: Api.SledListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/sleds/:sledId` */ sledView: (params: { path: Api.SledViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/sleds/:sledId/disks` */ sledPhysicalDiskList: (params: { path: Api.SledPhysicalDiskListPathParams; query: Api.SledPhysicalDiskListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/sleds/:sledId/instances` */ sledInstanceList: (params: { path: Api.SledInstanceListPathParams; query: Api.SledInstanceListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/switch-port` */ networkingSwitchPortList: (params: { query: Api.NetworkingSwitchPortListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortApplySettings: (params: { @@ -468,39 +555,46 @@ export interface MSWHandlers { query: Api.NetworkingSwitchPortApplySettingsQueryParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `DELETE /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortClearSettings: (params: { path: Api.NetworkingSwitchPortClearSettingsPathParams; query: Api.NetworkingSwitchPortClearSettingsQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/hardware/switches` */ switchList: (params: { query: Api.SwitchListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/hardware/switches/:switchId` */ switchView: (params: { path: Api.SwitchViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/identity-providers` */ siloIdentityProviderList: (params: { query: Api.SiloIdentityProviderListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/identity-providers/local/users` */ localIdpUserCreate: (params: { query: Api.LocalIdpUserCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/identity-providers/local/users/:userId` */ localIdpUserDelete: (params: { path: Api.LocalIdpUserDeletePathParams; query: Api.LocalIdpUserDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/system/identity-providers/local/users/:userId/set-password` */ localIdpUserSetPassword: (params: { @@ -508,245 +602,294 @@ export interface MSWHandlers { query: Api.LocalIdpUserSetPasswordQueryParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `POST /v1/system/identity-providers/saml` */ samlIdentityProviderCreate: (params: { query: Api.SamlIdentityProviderCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/identity-providers/saml/:provider` */ samlIdentityProviderView: (params: { path: Api.SamlIdentityProviderViewPathParams; query: Api.SamlIdentityProviderViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/ip-pools` */ ipPoolList: (params: { query: Api.IpPoolListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/ip-pools` */ ipPoolCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/ip-pools/:pool` */ ipPoolView: (params: { path: Api.IpPoolViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/system/ip-pools/:pool` */ ipPoolUpdate: (params: { path: Api.IpPoolUpdatePathParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/ip-pools/:pool` */ ipPoolDelete: (params: { path: Api.IpPoolDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/ip-pools/:pool/ranges` */ ipPoolRangeList: (params: { path: Api.IpPoolRangeListPathParams; query: Api.IpPoolRangeListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/ip-pools/:pool/ranges/add` */ ipPoolRangeAdd: (params: { path: Api.IpPoolRangeAddPathParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/ip-pools/:pool/ranges/remove` */ ipPoolRangeRemove: (params: { path: Api.IpPoolRangeRemovePathParams; body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/ip-pools-service` */ - ipPoolServiceView: (params: { req: Request }) => HandlerResult; + ipPoolServiceView: (params: { + req: Request; + cookies: Record; + }) => HandlerResult; /** `GET /v1/system/ip-pools-service/ranges` */ ipPoolServiceRangeList: (params: { query: Api.IpPoolServiceRangeListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/ip-pools-service/ranges/add` */ ipPoolServiceRangeAdd: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/ip-pools-service/ranges/remove` */ ipPoolServiceRangeRemove: (params: { body: Json; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/metrics/:metricName` */ systemMetric: (params: { path: Api.SystemMetricPathParams; query: Api.SystemMetricQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/networking/address-lot` */ networkingAddressLotList: (params: { query: Api.NetworkingAddressLotListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/networking/address-lot` */ networkingAddressLotCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/networking/address-lot/:addressLot` */ networkingAddressLotDelete: (params: { path: Api.NetworkingAddressLotDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/networking/address-lot/:addressLot/blocks` */ networkingAddressLotBlockList: (params: { path: Api.NetworkingAddressLotBlockListPathParams; query: Api.NetworkingAddressLotBlockListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/networking/loopback-address` */ networkingLoopbackAddressList: (params: { query: Api.NetworkingLoopbackAddressListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/networking/loopback-address` */ networkingLoopbackAddressCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask` */ networkingLoopbackAddressDelete: (params: { path: Api.NetworkingLoopbackAddressDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsDelete: (params: { query: Api.NetworkingSwitchPortSettingsDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/networking/switch-port-settings/:port` */ networkingSwitchPortSettingsView: (params: { path: Api.NetworkingSwitchPortSettingsViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/policy` */ systemPolicyView: (params: { req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/system/policy` */ systemPolicyUpdate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/roles` */ roleList: (params: { query: Api.RoleListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/roles/:roleName` */ roleView: (params: { path: Api.RoleViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/silos` */ siloList: (params: { query: Api.SiloListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/system/silos` */ siloCreate: (params: { body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/silos/:silo` */ siloView: (params: { path: Api.SiloViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/system/silos/:silo` */ siloDelete: (params: { path: Api.SiloDeletePathParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/system/silos/:silo/policy` */ siloPolicyView: (params: { path: Api.SiloPolicyViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/system/silos/:silo/policy` */ siloPolicyUpdate: (params: { path: Api.SiloPolicyUpdatePathParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/users` */ siloUserList: (params: { query: Api.SiloUserListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/users/:userId` */ siloUserView: (params: { path: Api.SiloUserViewPathParams; query: Api.SiloUserViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/users-builtin` */ userBuiltinList: (params: { query: Api.UserBuiltinListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/system/users-builtin/:user` */ userBuiltinView: (params: { path: Api.UserBuiltinViewPathParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/users` */ userList: (params: { query: Api.UserListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpc-firewall-rules` */ vpcFirewallRulesView: (params: { query: Api.VpcFirewallRulesViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/vpc-firewall-rules` */ vpcFirewallRulesUpdate: (params: { query: Api.VpcFirewallRulesUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpc-router-routes` */ vpcRouterRouteList: (params: { query: Api.VpcRouterRouteListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/vpc-router-routes` */ vpcRouterRouteCreate: (params: { query: Api.VpcRouterRouteCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpc-router-routes/:route` */ vpcRouterRouteView: (params: { path: Api.VpcRouterRouteViewPathParams; query: Api.VpcRouterRouteViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/vpc-router-routes/:route` */ vpcRouterRouteUpdate: (params: { @@ -754,29 +897,34 @@ export interface MSWHandlers { query: Api.VpcRouterRouteUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/vpc-router-routes/:route` */ vpcRouterRouteDelete: (params: { path: Api.VpcRouterRouteDeletePathParams; query: Api.VpcRouterRouteDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/vpc-routers` */ vpcRouterList: (params: { query: Api.VpcRouterListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/vpc-routers` */ vpcRouterCreate: (params: { query: Api.VpcRouterCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpc-routers/:router` */ vpcRouterView: (params: { path: Api.VpcRouterViewPathParams; query: Api.VpcRouterViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/vpc-routers/:router` */ vpcRouterUpdate: (params: { @@ -784,29 +932,34 @@ export interface MSWHandlers { query: Api.VpcRouterUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/vpc-routers/:router` */ vpcRouterDelete: (params: { path: Api.VpcRouterDeletePathParams; query: Api.VpcRouterDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/vpc-subnets` */ vpcSubnetList: (params: { query: Api.VpcSubnetListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/vpc-subnets` */ vpcSubnetCreate: (params: { query: Api.VpcSubnetCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpc-subnets/:subnet` */ vpcSubnetView: (params: { path: Api.VpcSubnetViewPathParams; query: Api.VpcSubnetViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/vpc-subnets/:subnet` */ vpcSubnetUpdate: (params: { @@ -814,35 +967,41 @@ export interface MSWHandlers { query: Api.VpcSubnetUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/vpc-subnets/:subnet` */ vpcSubnetDelete: (params: { path: Api.VpcSubnetDeletePathParams; query: Api.VpcSubnetDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; /** `GET /v1/vpc-subnets/:subnet/network-interfaces` */ vpcSubnetListNetworkInterfaces: (params: { path: Api.VpcSubnetListNetworkInterfacesPathParams; query: Api.VpcSubnetListNetworkInterfacesQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpcs` */ vpcList: (params: { query: Api.VpcListQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `POST /v1/vpcs` */ vpcCreate: (params: { query: Api.VpcCreateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `GET /v1/vpcs/:vpc` */ vpcView: (params: { path: Api.VpcViewPathParams; query: Api.VpcViewQueryParams; req: Request; + cookies: Record; }) => HandlerResult; /** `PUT /v1/vpcs/:vpc` */ vpcUpdate: (params: { @@ -850,12 +1009,14 @@ export interface MSWHandlers { query: Api.VpcUpdateQueryParams; body: Json; req: Request; + cookies: Record; }) => HandlerResult; /** `DELETE /v1/vpcs/:vpc` */ vpcDelete: (params: { path: Api.VpcDeletePathParams; query: Api.VpcDeleteQueryParams; req: Request; + cookies: Record; }) => StatusCode; } @@ -952,37 +1113,37 @@ const handler = } }; -export function makeHandlers(handlers: MSWHandlers): RestHandler[] { +export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { return [ - rest.post( + http.post( "/device/auth", handler(handlers["deviceAuthRequest"], null, null) ), - rest.post( + http.post( "/device/confirm", handler(handlers["deviceAuthConfirm"], null, schema.DeviceAuthVerify) ), - rest.post( + http.post( "/device/token", handler(handlers["deviceAccessToken"], null, null) ), - rest.post( + http.post( "/login/:siloName/saml/:providerName", handler(handlers["loginSaml"], schema.LoginSamlParams, null) ), - rest.get( + http.get( "/v1/certificates", handler(handlers["certificateList"], schema.CertificateListParams, null) ), - rest.post( + http.post( "/v1/certificates", handler(handlers["certificateCreate"], null, schema.CertificateCreate) ), - rest.get( + http.get( "/v1/certificates/:certificate", handler(handlers["certificateView"], schema.CertificateViewParams, null) ), - rest.delete( + http.delete( "/v1/certificates/:certificate", handler( handlers["certificateDelete"], @@ -990,11 +1151,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/disks", handler(handlers["diskList"], schema.DiskListParams, null) ), - rest.post( + http.post( "/v1/disks", handler( handlers["diskCreate"], @@ -1002,15 +1163,15 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.DiskCreate ) ), - rest.get( + http.get( "/v1/disks/:disk", handler(handlers["diskView"], schema.DiskViewParams, null) ), - rest.delete( + http.delete( "/v1/disks/:disk", handler(handlers["diskDelete"], schema.DiskDeleteParams, null) ), - rest.post( + http.post( "/v1/disks/:disk/bulk-write", handler( handlers["diskBulkWriteImport"], @@ -1018,7 +1179,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.ImportBlocksBulkWrite ) ), - rest.post( + http.post( "/v1/disks/:disk/bulk-write-start", handler( handlers["diskBulkWriteImportStart"], @@ -1026,7 +1187,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/disks/:disk/bulk-write-stop", handler( handlers["diskBulkWriteImportStop"], @@ -1034,7 +1195,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/disks/:disk/finalize", handler( handlers["diskFinalizeImport"], @@ -1042,7 +1203,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.FinalizeDisk ) ), - rest.post( + http.post( "/v1/disks/:disk/import", handler( handlers["diskImportBlocksFromUrl"], @@ -1050,23 +1211,23 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.ImportBlocksFromUrl ) ), - rest.get( + http.get( "/v1/disks/:disk/metrics/:metric", handler(handlers["diskMetricsList"], schema.DiskMetricsListParams, null) ), - rest.get( + http.get( "/v1/groups", handler(handlers["groupList"], schema.GroupListParams, null) ), - rest.get( + http.get( "/v1/groups/:groupId", handler(handlers["groupView"], schema.GroupViewParams, null) ), - rest.get( + http.get( "/v1/images", handler(handlers["imageList"], schema.ImageListParams, null) ), - rest.post( + http.post( "/v1/images", handler( handlers["imageCreate"], @@ -1074,27 +1235,27 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.ImageCreate ) ), - rest.get( + http.get( "/v1/images/:image", handler(handlers["imageView"], schema.ImageViewParams, null) ), - rest.delete( + http.delete( "/v1/images/:image", handler(handlers["imageDelete"], schema.ImageDeleteParams, null) ), - rest.post( + http.post( "/v1/images/:image/demote", handler(handlers["imageDemote"], schema.ImageDemoteParams, null) ), - rest.post( + http.post( "/v1/images/:image/promote", handler(handlers["imagePromote"], schema.ImagePromoteParams, null) ), - rest.get( + http.get( "/v1/instances", handler(handlers["instanceList"], schema.InstanceListParams, null) ), - rest.post( + http.post( "/v1/instances", handler( handlers["instanceCreate"], @@ -1102,19 +1263,19 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.InstanceCreate ) ), - rest.get( + http.get( "/v1/instances/:instance", handler(handlers["instanceView"], schema.InstanceViewParams, null) ), - rest.delete( + http.delete( "/v1/instances/:instance", handler(handlers["instanceDelete"], schema.InstanceDeleteParams, null) ), - rest.get( + http.get( "/v1/instances/:instance/disks", handler(handlers["instanceDiskList"], schema.InstanceDiskListParams, null) ), - rest.post( + http.post( "/v1/instances/:instance/disks/attach", handler( handlers["instanceDiskAttach"], @@ -1122,7 +1283,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.DiskPath ) ), - rest.post( + http.post( "/v1/instances/:instance/disks/detach", handler( handlers["instanceDiskDetach"], @@ -1130,7 +1291,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.DiskPath ) ), - rest.get( + http.get( "/v1/instances/:instance/external-ips", handler( handlers["instanceExternalIpList"], @@ -1138,7 +1299,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/instances/:instance/migrate", handler( handlers["instanceMigrate"], @@ -1146,11 +1307,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.InstanceMigrate ) ), - rest.post( + http.post( "/v1/instances/:instance/reboot", handler(handlers["instanceReboot"], schema.InstanceRebootParams, null) ), - rest.get( + http.get( "/v1/instances/:instance/serial-console", handler( handlers["instanceSerialConsole"], @@ -1158,7 +1319,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/instances/:instance/serial-console/stream", handler( handlers["instanceSerialConsoleStream"], @@ -1166,15 +1327,15 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/instances/:instance/start", handler(handlers["instanceStart"], schema.InstanceStartParams, null) ), - rest.post( + http.post( "/v1/instances/:instance/stop", handler(handlers["instanceStop"], schema.InstanceStopParams, null) ), - rest.get( + http.get( "/v1/ip-pools", handler( handlers["projectIpPoolList"], @@ -1182,7 +1343,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/ip-pools/:pool", handler( handlers["projectIpPoolView"], @@ -1190,7 +1351,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/login/:siloName/local", handler( handlers["loginLocal"], @@ -1198,9 +1359,9 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.UsernamePasswordCredentials ) ), - rest.post("/v1/logout", handler(handlers["logout"], null, null)), - rest.get("/v1/me", handler(handlers["currentUserView"], null, null)), - rest.get( + http.post("/v1/logout", handler(handlers["logout"], null, null)), + http.get("/v1/me", handler(handlers["currentUserView"], null, null)), + http.get( "/v1/me/groups", handler( handlers["currentUserGroups"], @@ -1208,7 +1369,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/me/ssh-keys", handler( handlers["currentUserSshKeyList"], @@ -1216,11 +1377,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/me/ssh-keys", handler(handlers["currentUserSshKeyCreate"], null, schema.SshKeyCreate) ), - rest.get( + http.get( "/v1/me/ssh-keys/:sshKey", handler( handlers["currentUserSshKeyView"], @@ -1228,7 +1389,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.delete( + http.delete( "/v1/me/ssh-keys/:sshKey", handler( handlers["currentUserSshKeyDelete"], @@ -1236,11 +1397,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/metrics/:metricName", handler(handlers["siloMetric"], schema.SiloMetricParams, null) ), - rest.get( + http.get( "/v1/network-interfaces", handler( handlers["instanceNetworkInterfaceList"], @@ -1248,7 +1409,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/network-interfaces", handler( handlers["instanceNetworkInterfaceCreate"], @@ -1256,7 +1417,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.InstanceNetworkInterfaceCreate ) ), - rest.get( + http.get( "/v1/network-interfaces/:interface", handler( handlers["instanceNetworkInterfaceView"], @@ -1264,7 +1425,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.put( + http.put( "/v1/network-interfaces/:interface", handler( handlers["instanceNetworkInterfaceUpdate"], @@ -1272,7 +1433,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.InstanceNetworkInterfaceUpdate ) ), - rest.delete( + http.delete( "/v1/network-interfaces/:interface", handler( handlers["instanceNetworkInterfaceDelete"], @@ -1280,24 +1441,24 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get("/v1/policy", handler(handlers["policyView"], null, null)), - rest.put( + http.get("/v1/policy", handler(handlers["policyView"], null, null)), + http.put( "/v1/policy", handler(handlers["policyUpdate"], null, schema.SiloRolePolicy) ), - rest.get( + http.get( "/v1/projects", handler(handlers["projectList"], schema.ProjectListParams, null) ), - rest.post( + http.post( "/v1/projects", handler(handlers["projectCreate"], null, schema.ProjectCreate) ), - rest.get( + http.get( "/v1/projects/:project", handler(handlers["projectView"], schema.ProjectViewParams, null) ), - rest.put( + http.put( "/v1/projects/:project", handler( handlers["projectUpdate"], @@ -1305,11 +1466,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.ProjectUpdate ) ), - rest.delete( + http.delete( "/v1/projects/:project", handler(handlers["projectDelete"], schema.ProjectDeleteParams, null) ), - rest.get( + http.get( "/v1/projects/:project/policy", handler( handlers["projectPolicyView"], @@ -1317,7 +1478,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.put( + http.put( "/v1/projects/:project/policy", handler( handlers["projectPolicyUpdate"], @@ -1325,11 +1486,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.ProjectRolePolicy ) ), - rest.get( + http.get( "/v1/snapshots", handler(handlers["snapshotList"], schema.SnapshotListParams, null) ), - rest.post( + http.post( "/v1/snapshots", handler( handlers["snapshotCreate"], @@ -1337,35 +1498,35 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.SnapshotCreate ) ), - rest.get( + http.get( "/v1/snapshots/:snapshot", handler(handlers["snapshotView"], schema.SnapshotViewParams, null) ), - rest.delete( + http.delete( "/v1/snapshots/:snapshot", handler(handlers["snapshotDelete"], schema.SnapshotDeleteParams, null) ), - rest.get( + http.get( "/v1/system/hardware/disks", handler(handlers["physicalDiskList"], schema.PhysicalDiskListParams, null) ), - rest.get( + http.get( "/v1/system/hardware/racks", handler(handlers["rackList"], schema.RackListParams, null) ), - rest.get( + http.get( "/v1/system/hardware/racks/:rackId", handler(handlers["rackView"], schema.RackViewParams, null) ), - rest.get( + http.get( "/v1/system/hardware/sleds", handler(handlers["sledList"], schema.SledListParams, null) ), - rest.get( + http.get( "/v1/system/hardware/sleds/:sledId", handler(handlers["sledView"], schema.SledViewParams, null) ), - rest.get( + http.get( "/v1/system/hardware/sleds/:sledId/disks", handler( handlers["sledPhysicalDiskList"], @@ -1373,11 +1534,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/hardware/sleds/:sledId/instances", handler(handlers["sledInstanceList"], schema.SledInstanceListParams, null) ), - rest.get( + http.get( "/v1/system/hardware/switch-port", handler( handlers["networkingSwitchPortList"], @@ -1385,7 +1546,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/hardware/switch-port/:port/settings", handler( handlers["networkingSwitchPortApplySettings"], @@ -1393,7 +1554,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.SwitchPortApplySettings ) ), - rest.delete( + http.delete( "/v1/system/hardware/switch-port/:port/settings", handler( handlers["networkingSwitchPortClearSettings"], @@ -1401,15 +1562,15 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/hardware/switches", handler(handlers["switchList"], schema.SwitchListParams, null) ), - rest.get( + http.get( "/v1/system/hardware/switches/:switchId", handler(handlers["switchView"], schema.SwitchViewParams, null) ), - rest.get( + http.get( "/v1/system/identity-providers", handler( handlers["siloIdentityProviderList"], @@ -1417,7 +1578,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/identity-providers/local/users", handler( handlers["localIdpUserCreate"], @@ -1425,7 +1586,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.UserCreate ) ), - rest.delete( + http.delete( "/v1/system/identity-providers/local/users/:userId", handler( handlers["localIdpUserDelete"], @@ -1433,7 +1594,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/identity-providers/local/users/:userId/set-password", handler( handlers["localIdpUserSetPassword"], @@ -1441,7 +1602,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.UserPassword ) ), - rest.post( + http.post( "/v1/system/identity-providers/saml", handler( handlers["samlIdentityProviderCreate"], @@ -1449,7 +1610,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.SamlIdentityProviderCreate ) ), - rest.get( + http.get( "/v1/system/identity-providers/saml/:provider", handler( handlers["samlIdentityProviderView"], @@ -1457,19 +1618,19 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/ip-pools", handler(handlers["ipPoolList"], schema.IpPoolListParams, null) ), - rest.post( + http.post( "/v1/system/ip-pools", handler(handlers["ipPoolCreate"], null, schema.IpPoolCreate) ), - rest.get( + http.get( "/v1/system/ip-pools/:pool", handler(handlers["ipPoolView"], schema.IpPoolViewParams, null) ), - rest.put( + http.put( "/v1/system/ip-pools/:pool", handler( handlers["ipPoolUpdate"], @@ -1477,15 +1638,15 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.IpPoolUpdate ) ), - rest.delete( + http.delete( "/v1/system/ip-pools/:pool", handler(handlers["ipPoolDelete"], schema.IpPoolDeleteParams, null) ), - rest.get( + http.get( "/v1/system/ip-pools/:pool/ranges", handler(handlers["ipPoolRangeList"], schema.IpPoolRangeListParams, null) ), - rest.post( + http.post( "/v1/system/ip-pools/:pool/ranges/add", handler( handlers["ipPoolRangeAdd"], @@ -1493,7 +1654,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.IpRange ) ), - rest.post( + http.post( "/v1/system/ip-pools/:pool/ranges/remove", handler( handlers["ipPoolRangeRemove"], @@ -1501,11 +1662,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.IpRange ) ), - rest.get( + http.get( "/v1/system/ip-pools-service", handler(handlers["ipPoolServiceView"], null, null) ), - rest.get( + http.get( "/v1/system/ip-pools-service/ranges", handler( handlers["ipPoolServiceRangeList"], @@ -1513,19 +1674,19 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/ip-pools-service/ranges/add", handler(handlers["ipPoolServiceRangeAdd"], null, schema.IpRange) ), - rest.post( + http.post( "/v1/system/ip-pools-service/ranges/remove", handler(handlers["ipPoolServiceRangeRemove"], null, schema.IpRange) ), - rest.get( + http.get( "/v1/system/metrics/:metricName", handler(handlers["systemMetric"], schema.SystemMetricParams, null) ), - rest.get( + http.get( "/v1/system/networking/address-lot", handler( handlers["networkingAddressLotList"], @@ -1533,7 +1694,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/networking/address-lot", handler( handlers["networkingAddressLotCreate"], @@ -1541,7 +1702,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.AddressLotCreate ) ), - rest.delete( + http.delete( "/v1/system/networking/address-lot/:addressLot", handler( handlers["networkingAddressLotDelete"], @@ -1549,7 +1710,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/networking/address-lot/:addressLot/blocks", handler( handlers["networkingAddressLotBlockList"], @@ -1557,7 +1718,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/networking/loopback-address", handler( handlers["networkingLoopbackAddressList"], @@ -1565,7 +1726,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/networking/loopback-address", handler( handlers["networkingLoopbackAddressCreate"], @@ -1573,7 +1734,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.LoopbackAddressCreate ) ), - rest.delete( + http.delete( "/v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask", handler( handlers["networkingLoopbackAddressDelete"], @@ -1581,7 +1742,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/networking/switch-port-settings", handler( handlers["networkingSwitchPortSettingsList"], @@ -1589,7 +1750,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/system/networking/switch-port-settings", handler( handlers["networkingSwitchPortSettingsCreate"], @@ -1597,7 +1758,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.SwitchPortSettingsCreate ) ), - rest.delete( + http.delete( "/v1/system/networking/switch-port-settings", handler( handlers["networkingSwitchPortSettingsDelete"], @@ -1605,7 +1766,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/networking/switch-port-settings/:port", handler( handlers["networkingSwitchPortSettingsView"], @@ -1613,43 +1774,43 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/system/policy", handler(handlers["systemPolicyView"], null, null) ), - rest.put( + http.put( "/v1/system/policy", handler(handlers["systemPolicyUpdate"], null, schema.FleetRolePolicy) ), - rest.get( + http.get( "/v1/system/roles", handler(handlers["roleList"], schema.RoleListParams, null) ), - rest.get( + http.get( "/v1/system/roles/:roleName", handler(handlers["roleView"], schema.RoleViewParams, null) ), - rest.get( + http.get( "/v1/system/silos", handler(handlers["siloList"], schema.SiloListParams, null) ), - rest.post( + http.post( "/v1/system/silos", handler(handlers["siloCreate"], null, schema.SiloCreate) ), - rest.get( + http.get( "/v1/system/silos/:silo", handler(handlers["siloView"], schema.SiloViewParams, null) ), - rest.delete( + http.delete( "/v1/system/silos/:silo", handler(handlers["siloDelete"], schema.SiloDeleteParams, null) ), - rest.get( + http.get( "/v1/system/silos/:silo/policy", handler(handlers["siloPolicyView"], schema.SiloPolicyViewParams, null) ), - rest.put( + http.put( "/v1/system/silos/:silo/policy", handler( handlers["siloPolicyUpdate"], @@ -1657,27 +1818,27 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.SiloRolePolicy ) ), - rest.get( + http.get( "/v1/system/users", handler(handlers["siloUserList"], schema.SiloUserListParams, null) ), - rest.get( + http.get( "/v1/system/users/:userId", handler(handlers["siloUserView"], schema.SiloUserViewParams, null) ), - rest.get( + http.get( "/v1/system/users-builtin", handler(handlers["userBuiltinList"], schema.UserBuiltinListParams, null) ), - rest.get( + http.get( "/v1/system/users-builtin/:user", handler(handlers["userBuiltinView"], schema.UserBuiltinViewParams, null) ), - rest.get( + http.get( "/v1/users", handler(handlers["userList"], schema.UserListParams, null) ), - rest.get( + http.get( "/v1/vpc-firewall-rules", handler( handlers["vpcFirewallRulesView"], @@ -1685,7 +1846,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.put( + http.put( "/v1/vpc-firewall-rules", handler( handlers["vpcFirewallRulesUpdate"], @@ -1693,7 +1854,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.VpcFirewallRuleUpdateParams ) ), - rest.get( + http.get( "/v1/vpc-router-routes", handler( handlers["vpcRouterRouteList"], @@ -1701,7 +1862,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.post( + http.post( "/v1/vpc-router-routes", handler( handlers["vpcRouterRouteCreate"], @@ -1709,7 +1870,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.RouterRouteCreate ) ), - rest.get( + http.get( "/v1/vpc-router-routes/:route", handler( handlers["vpcRouterRouteView"], @@ -1717,7 +1878,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.put( + http.put( "/v1/vpc-router-routes/:route", handler( handlers["vpcRouterRouteUpdate"], @@ -1725,7 +1886,7 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.RouterRouteUpdate ) ), - rest.delete( + http.delete( "/v1/vpc-router-routes/:route", handler( handlers["vpcRouterRouteDelete"], @@ -1733,11 +1894,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/vpc-routers", handler(handlers["vpcRouterList"], schema.VpcRouterListParams, null) ), - rest.post( + http.post( "/v1/vpc-routers", handler( handlers["vpcRouterCreate"], @@ -1745,11 +1906,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.VpcRouterCreate ) ), - rest.get( + http.get( "/v1/vpc-routers/:router", handler(handlers["vpcRouterView"], schema.VpcRouterViewParams, null) ), - rest.put( + http.put( "/v1/vpc-routers/:router", handler( handlers["vpcRouterUpdate"], @@ -1757,15 +1918,15 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.VpcRouterUpdate ) ), - rest.delete( + http.delete( "/v1/vpc-routers/:router", handler(handlers["vpcRouterDelete"], schema.VpcRouterDeleteParams, null) ), - rest.get( + http.get( "/v1/vpc-subnets", handler(handlers["vpcSubnetList"], schema.VpcSubnetListParams, null) ), - rest.post( + http.post( "/v1/vpc-subnets", handler( handlers["vpcSubnetCreate"], @@ -1773,11 +1934,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.VpcSubnetCreate ) ), - rest.get( + http.get( "/v1/vpc-subnets/:subnet", handler(handlers["vpcSubnetView"], schema.VpcSubnetViewParams, null) ), - rest.put( + http.put( "/v1/vpc-subnets/:subnet", handler( handlers["vpcSubnetUpdate"], @@ -1785,11 +1946,11 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { schema.VpcSubnetUpdate ) ), - rest.delete( + http.delete( "/v1/vpc-subnets/:subnet", handler(handlers["vpcSubnetDelete"], schema.VpcSubnetDeleteParams, null) ), - rest.get( + http.get( "/v1/vpc-subnets/:subnet/network-interfaces", handler( handlers["vpcSubnetListNetworkInterfaces"], @@ -1797,23 +1958,23 @@ export function makeHandlers(handlers: MSWHandlers): RestHandler[] { null ) ), - rest.get( + http.get( "/v1/vpcs", handler(handlers["vpcList"], schema.VpcListParams, null) ), - rest.post( + http.post( "/v1/vpcs", handler(handlers["vpcCreate"], schema.VpcCreateParams, schema.VpcCreate) ), - rest.get( + http.get( "/v1/vpcs/:vpc", handler(handlers["vpcView"], schema.VpcViewParams, null) ), - rest.put( + http.put( "/v1/vpcs/:vpc", handler(handlers["vpcUpdate"], schema.VpcUpdateParams, schema.VpcUpdate) ), - rest.delete( + http.delete( "/v1/vpcs/:vpc", handler(handlers["vpcDelete"], schema.VpcDeleteParams, null) ), diff --git a/generator/client/msw-handlers.ts b/generator/client/msw-handlers.ts index dbcffdb..40c0d5e 100644 --- a/generator/client/msw-handlers.ts +++ b/generator/client/msw-handlers.ts @@ -103,7 +103,7 @@ export function generateMSWHandlers(spec: OpenAPIV3.Document) { const queryParamsType = queryParams?.length ? `query: Api.${snakeToPascal(opId)}QueryParams,` : ""; - const params = `params: { ${pathParamsType} ${queryParamsType} ${body} req: Request }`; + const params = `params: { ${pathParamsType} ${queryParamsType} ${body} req: Request, cookies: Record }`; const resultType = successType === "void" ? "StatusCode" : `HandlerResult<${successType}>`; diff --git a/package-lock.json b/package-lock.json index 82c5f74..25d35ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@types/node": "^18.7.20", "esbuild-register": "^3.3.3", - "msw": "^0.0.0-fetch.rc-15", + "msw": "^2.0.0", "openapi-types": "^12.0.2", "prettier": "2.7.1", "swagger-parser": "^10.0.3", @@ -470,17 +470,17 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.23.0.tgz", - "integrity": "sha512-JytvDa7pBbxXvCTXBYQs+0eE6MqxpqH/H4peRNY6zVAlvJ6d/hAWLHAef1D9lWN4zuIigN0VkakGOAUrX7FWLg==", + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.25.7.tgz", + "integrity": "sha512-U7iFYs/qU/5jfz1VDpoYz3xqX9nzhsBXw7q923dv6GiGTy+m2ZLhD33L80R/shHOW/YWjeH6k16GbIHGw+bAng==", "dev": true, "dependencies": { - "@open-draft/deferred-promise": "^2.1.0", + "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", - "headers-polyfill": "^3.1.0", + "is-node-process": "^1.2.0", "outvariant": "^1.2.1", - "strict-event-emitter": "^0.5.0" + "strict-event-emitter": "^0.5.1" }, "engines": { "node": ">=18" @@ -519,9 +519,9 @@ } }, "node_modules/@open-draft/deferred-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.1.0.tgz", - "integrity": "sha512-Rzd5JrXZX8zErHzgcGyngh4fmEbSHqTETdGj9rXtejlqMIgXFlyKBA7Jn1Xp0Ls0M0Y22+xHcWiEzbmdWl0BOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", "dev": true }, "node_modules/@open-draft/logger": { @@ -614,9 +614,9 @@ "peer": true }, "node_modules/@types/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-vVRgv7WXbhIZzILgr58b4Ki2uqpN/dlVCUBWCMkPbMDlV1CrQrgCl5hnIoUlMrgymGcTmdfVqbs1yWj/IRIRtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.3.tgz", + "integrity": "sha512-NwCYScf83RIwCyi5/9cXocrJB//xrqMh5PMw3mYTSFGaI3DuVjBLfO/PCk7QVAC3Da8b9NjxNmTO9Aj9T3rl/Q==", "dev": true }, "node_modules/@vitest/expect": { @@ -1858,9 +1858,9 @@ } }, "node_modules/graphql": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.7.1.tgz", - "integrity": "sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg==", + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" @@ -1928,9 +1928,9 @@ } }, "node_modules/headers-polyfill": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", - "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.2.tgz", + "integrity": "sha512-EWGTfnTqAO2L/j5HZgoM/3z82L7necsJ0pO9Tp0X1wil3PDLrkypTBRgVO2ExehEEvUycejZD3FuRaXpZZc3kw==", "dev": true }, "node_modules/html-encoding-sniffer": { @@ -2548,9 +2548,9 @@ "license": "MIT" }, "node_modules/msw": { - "version": "0.0.0-fetch.rc-15", - "resolved": "https://registry.npmjs.org/msw/-/msw-0.0.0-fetch.rc-15.tgz", - "integrity": "sha512-apgcCzSmsbJ1rUDpmhrjQAZDzEwOvfZD2VyBZVu6YMD+ovm8ow1buVzRE25IvzrtfIklN/fDbVavTa5lhqX4uQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.0.tgz", + "integrity": "sha512-lw9UHuzNCWoODHaThGeLLIIuzEBUQkj3fJXQnChHifMKbB2UmF2msHd4d/lnyqjAyD0XWoibdviW9wlstFPpkA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2558,7 +2558,7 @@ "@bundled-es-modules/js-levenshtein": "^2.0.1", "@bundled-es-modules/statuses": "^1.0.1", "@mswjs/cookies": "^1.0.0", - "@mswjs/interceptors": "^0.23.0", + "@mswjs/interceptors": "^0.25.1", "@open-draft/until": "^2.1.0", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", @@ -2566,8 +2566,8 @@ "chalk": "^4.1.2", "chokidar": "^3.4.2", "formdata-node": "4.4.1", - "graphql": "^15.0.0 || ^16.7.0", - "headers-polyfill": "^3.1.2", + "graphql": "^16.8.1", + "headers-polyfill": "^4.0.1", "inquirer": "^8.2.0", "is-node-process": "^1.2.0", "js-levenshtein": "^1.1.6", @@ -2589,7 +2589,7 @@ "url": "https://opencollective.com/mswjs" }, "peerDependencies": { - "typescript": ">= 4.4.x <= 5.1.x" + "typescript": ">= 4.7.x <= 5.2.x" }, "peerDependenciesMeta": { "typescript": { @@ -3368,9 +3368,9 @@ "dev": true }, "node_modules/strict-event-emitter": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.0.tgz", - "integrity": "sha512-sqnMpVJLSB3daNO6FcvsEk4Mq5IJeAwDeH80DP1S8+pgxrF6yZnE1+VeapesGled7nEcIkz1Ax87HzaIy+02kA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", "dev": true }, "node_modules/string_decoder": { @@ -4522,17 +4522,17 @@ "dev": true }, "@mswjs/interceptors": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.23.0.tgz", - "integrity": "sha512-JytvDa7pBbxXvCTXBYQs+0eE6MqxpqH/H4peRNY6zVAlvJ6d/hAWLHAef1D9lWN4zuIigN0VkakGOAUrX7FWLg==", + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.25.7.tgz", + "integrity": "sha512-U7iFYs/qU/5jfz1VDpoYz3xqX9nzhsBXw7q923dv6GiGTy+m2ZLhD33L80R/shHOW/YWjeH6k16GbIHGw+bAng==", "dev": true, "requires": { - "@open-draft/deferred-promise": "^2.1.0", + "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", - "headers-polyfill": "^3.1.0", + "is-node-process": "^1.2.0", "outvariant": "^1.2.1", - "strict-event-emitter": "^0.5.0" + "strict-event-emitter": "^0.5.1" } }, "@nodelib/fs.scandir": { @@ -4556,9 +4556,9 @@ } }, "@open-draft/deferred-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.1.0.tgz", - "integrity": "sha512-Rzd5JrXZX8zErHzgcGyngh4fmEbSHqTETdGj9rXtejlqMIgXFlyKBA7Jn1Xp0Ls0M0Y22+xHcWiEzbmdWl0BOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", "dev": true }, "@open-draft/logger": { @@ -4641,9 +4641,9 @@ "peer": true }, "@types/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-vVRgv7WXbhIZzILgr58b4Ki2uqpN/dlVCUBWCMkPbMDlV1CrQrgCl5hnIoUlMrgymGcTmdfVqbs1yWj/IRIRtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.3.tgz", + "integrity": "sha512-NwCYScf83RIwCyi5/9cXocrJB//xrqMh5PMw3mYTSFGaI3DuVjBLfO/PCk7QVAC3Da8b9NjxNmTO9Aj9T3rl/Q==", "dev": true }, "@vitest/expect": { @@ -5508,9 +5508,9 @@ } }, "graphql": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.7.1.tgz", - "integrity": "sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg==", + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", "dev": true }, "happy-dom": { @@ -5556,9 +5556,9 @@ "peer": true }, "headers-polyfill": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", - "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.2.tgz", + "integrity": "sha512-EWGTfnTqAO2L/j5HZgoM/3z82L7necsJ0pO9Tp0X1wil3PDLrkypTBRgVO2ExehEEvUycejZD3FuRaXpZZc3kw==", "dev": true }, "html-encoding-sniffer": { @@ -5993,16 +5993,16 @@ "dev": true }, "msw": { - "version": "0.0.0-fetch.rc-15", - "resolved": "https://registry.npmjs.org/msw/-/msw-0.0.0-fetch.rc-15.tgz", - "integrity": "sha512-apgcCzSmsbJ1rUDpmhrjQAZDzEwOvfZD2VyBZVu6YMD+ovm8ow1buVzRE25IvzrtfIklN/fDbVavTa5lhqX4uQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.0.tgz", + "integrity": "sha512-lw9UHuzNCWoODHaThGeLLIIuzEBUQkj3fJXQnChHifMKbB2UmF2msHd4d/lnyqjAyD0XWoibdviW9wlstFPpkA==", "dev": true, "requires": { "@bundled-es-modules/cookie": "^2.0.0", "@bundled-es-modules/js-levenshtein": "^2.0.1", "@bundled-es-modules/statuses": "^1.0.1", "@mswjs/cookies": "^1.0.0", - "@mswjs/interceptors": "^0.23.0", + "@mswjs/interceptors": "^0.25.1", "@open-draft/until": "^2.1.0", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", @@ -6010,8 +6010,8 @@ "chalk": "^4.1.2", "chokidar": "^3.4.2", "formdata-node": "4.4.1", - "graphql": "^15.0.0 || ^16.7.0", - "headers-polyfill": "^3.1.2", + "graphql": "^16.8.1", + "headers-polyfill": "^4.0.1", "inquirer": "^8.2.0", "is-node-process": "^1.2.0", "js-levenshtein": "^1.1.6", @@ -6504,9 +6504,9 @@ "dev": true }, "strict-event-emitter": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.0.tgz", - "integrity": "sha512-sqnMpVJLSB3daNO6FcvsEk4Mq5IJeAwDeH80DP1S8+pgxrF6yZnE1+VeapesGled7nEcIkz1Ax87HzaIy+02kA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", "dev": true }, "string_decoder": { diff --git a/package.json b/package.json index 7512d1f..05c1952 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "devDependencies": { "@types/node": "^18.7.20", "esbuild-register": "^3.3.3", - "msw": "^0.0.0-fetch.rc-15", + "msw": "^2.0.0", "openapi-types": "^12.0.2", "prettier": "2.7.1", "swagger-parser": "^10.0.3",