From 58d7b0afd7902875f0d2e90a98131188c564aa90 Mon Sep 17 00:00:00 2001 From: Chris Norman <17420369+chrnorm@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:53:49 +0100 Subject: [PATCH] implement provider arg option caching --- go.mod | 2 +- go.sum | 2 + openapi.yml | 8 +- pkg/api/provider.go | 149 ++++++++++++-- pkg/cache/provider_option.go | 28 +++ pkg/storage/get_provider_options.go | 37 ++++ pkg/storage/get_provider_options_test.go | 36 ++++ pkg/storage/keys/provideroption.go | 13 ++ pkg/types/api.gen.go | 187 ++++++++++-------- .../forms/access-rule/steps/Provider.tsx | 140 +++++++++---- web/src/pages/admin/access-rules/create.tsx | 1 - .../utils/backend-client/admin/admin.msw.ts | 46 ++--- web/src/utils/backend-client/admin/admin.ts | 70 +++---- .../backend-client/default/default.msw.ts | 16 +- .../utils/backend-client/default/default.ts | 65 +++--- .../backend-client/end-user/end-user.msw.ts | 38 ++-- .../utils/backend-client/end-user/end-user.ts | 77 ++++---- .../utils/backend-client/types/accessRule.ts | 2 +- .../backend-client/types/accessRuleDetail.ts | 2 +- .../types/accessRuleMetadata.ts | 2 +- .../backend-client/types/accessRuleStatus.ts | 2 +- .../backend-client/types/accessRuleTarget.ts | 2 +- .../types/accessRuleTargetWith.ts | 2 +- .../accessInstructions.ts | 2 +- .../argOptionsResponseResponse.ts | 2 +- .../accesshandler-openapi.yml/createGrant.ts | 2 +- .../createGrantWith.ts | 2 +- .../errorResponseResponse.ts | 2 +- .../types/accesshandler-openapi.yml/grant.ts | 2 +- .../grantResponseResponse.ts | 2 +- .../accesshandler-openapi.yml/grantStatus.ts | 2 +- .../accesshandler-openapi.yml/grantWith.ts | 2 +- .../healthResponseResponse.ts | 2 +- .../types/accesshandler-openapi.yml/option.ts | 2 +- .../accesshandler-openapi.yml/provider.ts | 2 +- .../providerHealth.ts | 2 +- .../types/adminListAccessRulesParams.ts | 2 +- .../types/adminListAccessRulesStatus.ts | 2 +- .../types/adminListRequestsParams.ts | 2 +- .../types/adminListRequestsStatus.ts | 2 +- .../backend-client/types/approvalMethod.ts | 2 +- .../backend-client/types/approverConfig.ts | 2 +- .../types/argOptionsResponseResponse.ts | 2 +- .../types/authUserResponseResponse.ts | 2 +- .../backend-client/types/cancelRequest200.ts | 2 +- .../types/createAccessRuleRequestBody.ts | 2 +- .../types/createAccessRuleTarget.ts | 2 +- .../types/createAccessRuleTargetWith.ts | 2 +- .../types/createRequestRequestBody.ts | 2 +- .../types/createUserRequestBody.ts | 2 +- .../types/errorResponseResponse.ts | 2 +- .../backend-client/types/getGroupsParams.ts | 2 +- .../types/getProviderArgs200.ts | 2 +- .../backend-client/types/getUsersParams.ts | 2 +- web/src/utils/backend-client/types/grant.ts | 2 +- .../utils/backend-client/types/grantStatus.ts | 2 +- web/src/utils/backend-client/types/group.ts | 2 +- .../utils/backend-client/types/idpStatus.ts | 2 +- web/src/utils/backend-client/types/index.ts | 1 + ...listAccessRuleApproversResponseResponse.ts | 2 +- .../listAccessRulesDetailResponseResponse.ts | 2 +- .../types/listAccessRulesResponseResponse.ts | 2 +- .../types/listGroupsResponseResponse.ts | 2 +- .../types/listProviderArgOptionsParams.ts | 9 + .../listRequestEventsResponseResponse.ts | 2 +- .../types/listRequestsResponseResponse.ts | 2 +- .../types/listUserResponseResponse.ts | 2 +- .../utils/backend-client/types/provider.ts | 2 +- web/src/utils/backend-client/types/request.ts | 2 +- .../backend-client/types/requestAccessRule.ts | 2 +- .../backend-client/types/requestDetail.ts | 2 +- .../backend-client/types/requestEvent.ts | 2 +- .../types/requestEventFromGrantStatus.ts | 2 +- .../types/requestEventToGrantStatus.ts | 2 +- .../backend-client/types/requestStatus.ts | 2 +- .../backend-client/types/requestTiming.ts | 2 +- .../backend-client/types/reviewDecision.ts | 2 +- .../backend-client/types/reviewRequestBody.ts | 2 +- .../types/reviewResponseResponse.ts | 2 +- .../backend-client/types/timeConstraints.ts | 2 +- .../types/updateAccessRuleRequestBody.ts | 2 +- web/src/utils/backend-client/types/user.ts | 2 +- .../types/userListRequestsParams.ts | 2 +- .../types/userListRequestsPastParams.ts | 2 +- .../types/userListRequestsStatus.ts | 2 +- .../types/userListRequestsUpcomingParams.ts | 2 +- 86 files changed, 706 insertions(+), 353 deletions(-) create mode 100644 pkg/cache/provider_option.go create mode 100644 pkg/storage/get_provider_options.go create mode 100644 pkg/storage/get_provider_options_test.go create mode 100644 pkg/storage/keys/provideroption.go create mode 100644 web/src/utils/backend-client/types/listProviderArgOptionsParams.ts diff --git a/go.mod b/go.mod index ce55c1a04..ac1d4039d 100644 --- a/go.mod +++ b/go.mod @@ -149,7 +149,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lambda v1.23.4 github.com/aws/aws-sdk-go-v2/service/s3 v1.27.0 github.com/briandowns/spinner v1.18.1 - github.com/common-fate/ddb v0.12.0 + github.com/common-fate/ddb v0.13.0 github.com/common-fate/testvault v0.1.0 github.com/fatih/color v1.13.0 github.com/go-chi/cors v1.2.1 diff --git a/go.sum b/go.sum index c3dd7546e..d4ab622bf 100644 --- a/go.sum +++ b/go.sum @@ -265,6 +265,8 @@ github.com/common-fate/ddb v0.11.0 h1:huNJpr/fk2DuAfWEjlA3jyDZOSxYkr+t6yYW73FyiB github.com/common-fate/ddb v0.11.0/go.mod h1:Z4JJVRI62wOGCef0D+ZA6W21GfdQvchw9X/Olf0uXtg= github.com/common-fate/ddb v0.12.0 h1:YjjkLconEO0q2sVn901eHrkiKp6iW/YkFoljN5RmgTE= github.com/common-fate/ddb v0.12.0/go.mod h1:Z4JJVRI62wOGCef0D+ZA6W21GfdQvchw9X/Olf0uXtg= +github.com/common-fate/ddb v0.13.0 h1:0WkelmqTwtJSoXCgQB2GAJXxr+qM8eqhblHmgY6mqvg= +github.com/common-fate/ddb v0.13.0/go.mod h1:Z4JJVRI62wOGCef0D+ZA6W21GfdQvchw9X/Olf0uXtg= github.com/common-fate/iso8601 v1.0.2 h1:gl6iNbE8TnJzg+lYJxPNYOkF+oHYde2K2s2i+5o4yHE= github.com/common-fate/iso8601 v1.0.2/go.mod h1:DU4mvUEkkWZUUSJq2aCuNqM1luSb0Pwyb2dLzXS+img= github.com/common-fate/testvault v0.1.0 h1:XVhbmcNySGIA203FywYW7wL44Mlcg23UUek3bdg5tzQ= diff --git a/openapi.yml b/openapi.yml index e42329679..0c126bf90 100644 --- a/openapi.yml +++ b/openapi.yml @@ -686,7 +686,13 @@ paths: "500": $ref: "#/components/responses/ErrorResponse" operationId: list-provider-arg-options - description: "" + description: "Returns the options for a particular Access Provider argument. The options may be cached. To refresh the cache, pass the `refresh` query parameter." + parameters: + - schema: + type: boolean + in: query + name: refresh + description: invalidate the cache and refresh the provider's options. components: schemas: User: diff --git a/pkg/api/provider.go b/pkg/api/provider.go index 9dead9739..f1a7925ff 100644 --- a/pkg/api/provider.go +++ b/pkg/api/provider.go @@ -1,12 +1,18 @@ package api import ( + "context" "errors" + "fmt" "net/http" "github.com/common-fate/apikit/apio" "github.com/common-fate/apikit/logger" + "github.com/common-fate/ddb" ahTypes "github.com/common-fate/granted-approvals/accesshandler/pkg/types" + "github.com/common-fate/granted-approvals/pkg/cache" + "github.com/common-fate/granted-approvals/pkg/storage" + "github.com/common-fate/granted-approvals/pkg/types" ) func (a *API) ListProviders(w http.ResponseWriter, r *http.Request) { @@ -91,30 +97,147 @@ func (a *API) GetProviderArgs(w http.ResponseWriter, r *http.Request, providerId } } -func (a *API) ListProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string) { +// List provider arg options +// (GET /api/v1/admin/providers/{providerId}/args/{argId}/options) +func (a *API) ListProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string, params types.ListProviderArgOptionsParams) { + if params.Refresh != nil && *params.Refresh { + a.refreshProviderArgOptions(w, r, providerId, argId) + } else { + a.getCachedProviderArgOptions(w, r, providerId, argId) + } +} + +// getCachedProviderArgOptions handles the case where we fetch arg options from the DynamoDB cache. +// If cached options aren't present it falls back to refetching options from the Access Handler. +// If options are refetched, the cache is updated. +func (a *API) getCachedProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string) { + ctx := r.Context() + + q := storage.GetProviderOptions{ + ProviderID: providerId, + ArgID: argId, + } + + _, err := a.DB.Query(ctx, &q) + if err != nil && err != ddb.ErrNoItems { + apio.Error(ctx, w, err) + return + } + + var res types.ArgOptionsResponse + + if err == ddb.ErrNoItems { + // we don't have any cached, so try and refetch them. + res, err = a.fetchProviderOptions(ctx, providerId, argId) + if err != nil { + apio.Error(ctx, w, err) + return + } + var cachedOpts []ddb.Keyer + for _, o := range res.Options { + cachedOpts = append(cachedOpts, &cache.ProviderOption{ + Provider: providerId, + Arg: argId, + Label: o.Label, + Value: o.Value, + }) + } + err = a.DB.PutBatch(ctx, cachedOpts...) + if err != nil { + apio.Error(ctx, w, err) + return + } + } else { + // we have cached options + res = types.ArgOptionsResponse{ + HasOptions: true, + } + for _, o := range q.Result { + res.Options = append(res.Options, ahTypes.Option{ + Label: o.Label, + Value: o.Value, + }) + } + } + + // return the argument options back to the client + apio.JSON(ctx, w, res, http.StatusOK) +} + +// refreshProviderArgOptions deletes any cached options and then refetches them from the Access Handler. +// It updates the cached options. +func (a *API) refreshProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string) { ctx := r.Context() - res, err := a.AccessHandlerClient.ListProviderArgOptionsWithResponse(ctx, providerId, argId) + // delete any existing options + q := storage.GetProviderOptions{ + ProviderID: providerId, + ArgID: argId, + } + + _, err := a.DB.Query(ctx, &q) + if err != nil && err != ddb.ErrNoItems { + apio.Error(ctx, w, err) + return + } + var items []ddb.Keyer + for _, row := range q.Result { + po := row + items = append(items, &po) + } + err = a.DB.DeleteBatch(ctx, items...) + if err != nil { + apio.Error(ctx, w, err) + return + } + + // fetch new options + res, err := a.fetchProviderOptions(ctx, providerId, argId) if err != nil { apio.Error(ctx, w, err) return } + + // update the cache + var cachedOpts []ddb.Keyer + for _, o := range res.Options { + cachedOpts = append(cachedOpts, &cache.ProviderOption{ + Provider: providerId, + Arg: argId, + Label: o.Label, + Value: o.Value, + }) + } + err = a.DB.PutBatch(ctx, cachedOpts...) + if err != nil { + apio.Error(ctx, w, err) + return + } + + // return the argument options back to the client + apio.JSON(ctx, w, res, http.StatusOK) +} + +func (a *API) fetchProviderOptions(ctx context.Context, providerID, argID string) (types.ArgOptionsResponse, error) { + res, err := a.AccessHandlerClient.ListProviderArgOptionsWithResponse(ctx, providerID, argID) + if err != nil { + return types.ArgOptionsResponse{}, err + } code := res.StatusCode() switch code { case 200: - apio.JSON(ctx, w, res.JSON200, code) - return + opts := types.ArgOptionsResponse{ + HasOptions: res.JSON200.HasOptions, + Options: res.JSON200.Options, + } + return opts, nil case 404: - apio.JSON(ctx, w, res.JSON404, code) - return + err := errors.New("provider not found") + return types.ArgOptionsResponse{}, apio.NewRequestError(err, http.StatusNotFound) case 500: - apio.JSON(ctx, w, res.JSON500, code) - return + return types.ArgOptionsResponse{}, errors.New(*res.JSON500.Error) default: - if err != nil { - logger.Get(ctx).Errorw("unhandled access handler response", "response", string(res.Body)) - apio.Error(ctx, w, errors.New("unhandled response code")) - return - } + logger.Get(ctx).Errorw("unhandled access handler response", "response", string(res.Body)) + return types.ArgOptionsResponse{}, fmt.Errorf("unhandled response code: %d", code) } } diff --git a/pkg/cache/provider_option.go b/pkg/cache/provider_option.go new file mode 100644 index 000000000..2679083d7 --- /dev/null +++ b/pkg/cache/provider_option.go @@ -0,0 +1,28 @@ +// Package cache stores provider information in DynamoDB so we +// don't need to call slow external APIs, like AWS SSO, +// every time a user is setting up an Access Rule or making an +// Access Request. +package cache + +import ( + "github.com/common-fate/ddb" + "github.com/common-fate/granted-approvals/pkg/storage/keys" +) + +// ProviderOption is an argument option that we've cached +// from an Access Provider in DynamoDB. +type ProviderOption struct { + Provider string `json:"provider" dynamodbav:"provider"` + Arg string `json:"arg" dynamodbav:"arg"` + Label string `json:"label" dynamodbav:"label"` + Value string `json:"value" dynamodbav:"value"` +} + +func (r *ProviderOption) DDBKeys() (ddb.Keys, error) { + keys := ddb.Keys{ + PK: keys.ProviderOption.PK1, + SK: keys.ProviderOption.SK1(r.Provider, r.Arg, r.Value), + } + + return keys, nil +} diff --git a/pkg/storage/get_provider_options.go b/pkg/storage/get_provider_options.go new file mode 100644 index 000000000..f64818d47 --- /dev/null +++ b/pkg/storage/get_provider_options.go @@ -0,0 +1,37 @@ +package storage + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" + "github.com/common-fate/ddb" + "github.com/common-fate/granted-approvals/pkg/cache" + "github.com/common-fate/granted-approvals/pkg/storage/keys" +) + +type GetProviderOptions struct { + ProviderID string + ArgID string + Result []cache.ProviderOption +} + +func (q *GetProviderOptions) BuildQuery() (*dynamodb.QueryInput, error) { + qi := dynamodb.QueryInput{ + KeyConditionExpression: aws.String("PK = :pk1 and begins_with(SK, :sk1)"), + ExpressionAttributeValues: map[string]types.AttributeValue{ + ":pk1": &types.AttributeValueMemberS{Value: keys.ProviderOption.PK1}, + ":sk1": &types.AttributeValueMemberS{Value: q.ProviderID + "#" + q.ArgID}, + }, + } + return &qi, nil +} + +func (q *GetProviderOptions) UnmarshalQueryOutput(out *dynamodb.QueryOutput) error { + if len(out.Items) == 0 { + return ddb.ErrNoItems + } + + return attributevalue.UnmarshalListOfMaps(out.Items, &q.Result) + +} diff --git a/pkg/storage/get_provider_options_test.go b/pkg/storage/get_provider_options_test.go new file mode 100644 index 000000000..5723d898c --- /dev/null +++ b/pkg/storage/get_provider_options_test.go @@ -0,0 +1,36 @@ +package storage + +import ( + "testing" + + "github.com/common-fate/ddb" + "github.com/common-fate/ddb/ddbtest" + "github.com/common-fate/granted-approvals/pkg/cache" +) + +func TestGetProviderOptions(t *testing.T) { + db := newTestingStorage(t) + + po := cache.ProviderOption{ + Provider: "test", + Arg: "test", + Label: "test", + Value: "test", + } + ddbtest.PutFixtures(t, db, &po) + + tc := []ddbtest.QueryTestCase{ + { + Name: "ok", + Query: &GetProviderOptions{ProviderID: "test", ArgID: "test"}, + Want: &GetProviderOptions{ProviderID: "test", ArgID: "test", Result: []cache.ProviderOption{po}}, + }, + { + Name: "not found", + Query: &GetProviderOptions{ProviderID: "somethingelse", ArgID: "test"}, + WantErr: ddb.ErrNoItems, + }, + } + + ddbtest.RunQueryTests(t, db, tc) +} diff --git a/pkg/storage/keys/provideroption.go b/pkg/storage/keys/provideroption.go new file mode 100644 index 000000000..a37c978c5 --- /dev/null +++ b/pkg/storage/keys/provideroption.go @@ -0,0 +1,13 @@ +package keys + +const ProviderOptionKey = "PROVIDER_OPTION#" + +type providerOptionKeys struct { + PK1 string + SK1 func(providerID, argID, value string) string +} + +var ProviderOption = providerOptionKeys{ + PK1: ProviderOptionKey, + SK1: func(providerID, argID, value string) string { return providerID + "#" + argID + "#" + value }, +} diff --git a/pkg/types/api.gen.go b/pkg/types/api.gen.go index 6a9a5984a..e96d1c879 100644 --- a/pkg/types/api.gen.go +++ b/pkg/types/api.gen.go @@ -462,6 +462,12 @@ type GetGroupsParams struct { NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"` } +// ListProviderArgOptionsParams defines parameters for ListProviderArgOptions. +type ListProviderArgOptionsParams struct { + // invalidate the cache and refresh the provider's options. + Refresh *bool `form:"refresh,omitempty" json:"refresh,omitempty"` +} + // AdminListRequestsParams defines parameters for AdminListRequests. type AdminListRequestsParams struct { // omit this param to view all results @@ -674,7 +680,7 @@ type ServerInterface interface { GetProviderArgs(w http.ResponseWriter, r *http.Request, providerId string) // List provider arg options // (GET /api/v1/admin/providers/{providerId}/args/{argId}/options) - ListProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string) + ListProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string, params ListProviderArgOptionsParams) // Your GET endpoint // (GET /api/v1/admin/requests) AdminListRequests(w http.ResponseWriter, r *http.Request, params AdminListRequestsParams) @@ -1142,8 +1148,22 @@ func (siw *ServerInterfaceWrapper) ListProviderArgOptions(w http.ResponseWriter, return } + // Parameter object where we will unmarshal all parameters from the context + var params ListProviderArgOptionsParams + + // ------------- Optional query parameter "refresh" ------------- + if paramValue := r.URL.Query().Get("refresh"); paramValue != "" { + + } + + err = runtime.BindQueryParameter("form", true, false, "refresh", r.URL.Query(), ¶ms.Refresh) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "refresh", Err: err}) + return + } + var handler = func(w http.ResponseWriter, r *http.Request) { - siw.Handler.ListProviderArgOptions(w, r, providerId, argId) + siw.Handler.ListProviderArgOptions(w, r, providerId, argId, params) } for _, middleware := range siw.HandlerMiddlewares { @@ -1792,87 +1812,88 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9aXPbOJrwX0Hxfat6t0qRZMedSVy1teu2nYy6c3gcpXt2J11bEAmJmJAAA4C21S79", - "9y2cBElQog633T35lFjC8eC5L0D3UUzzghJEBI9O7yOGvpaIix9ogpH64JwhKNBZHCPOr8sMXesB8quY", - "EoGI+i8sigzHUGBKRv/klMjPeJyiHMr/FYwWiAmzIiwKRm9gJv///xmaR6fR/xtVUIz0PD46U+MQO6dk", - "jhfRahAliMcMF3IXORndwbzIUHQanSU5JgAqIIGg4MMXAaNBJJaF/JYLholaYMFoWSggaktF0xQB9R2Y", - "XHAgUiiASJFdkJUZAuqESK4+jAYRFihX67S2MB9AxuBS/k1gjurASuAAlBCHQBSQLZDYhJsmVaZ6lpyP", - "c3ROCRcMYkPTdQtNG8NXq4HiAcxQEp3+w2JsUFHNHKlODQd3G4Bf3SHp7J8oFtFqJTfRJzDcdACmcqiY", - "JEG6MATNEm2U41z+bwOmDIxTPbiJp9r+bsm1Z//EEdv/4CiHWInSnLIciujUfBJgLcyVnHg4mFGaIUh8", - "Pm3MahzTrm1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Zt7seTSUZjmKWUi+MX0xfTSCoiA5prkncg3o/cZ/qO4v6X+38GAAD//2j1SAHqdwAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/web/src/components/forms/access-rule/steps/Provider.tsx b/web/src/components/forms/access-rule/steps/Provider.tsx index d2b4ace0f..f53f17714 100644 --- a/web/src/components/forms/access-rule/steps/Provider.tsx +++ b/web/src/components/forms/access-rule/steps/Provider.tsx @@ -5,6 +5,8 @@ import { FormErrorMessage, FormHelperText, FormLabel, + HStack, + IconButton, Input, Skeleton, SkeletonText, @@ -13,13 +15,14 @@ import { } from "@chakra-ui/react"; import Form from "@rjsf/chakra-ui"; import { FieldProps } from "@rjsf/core"; -import React from "react"; +import React, { useEffect, useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import RSelect from "react-select"; import { useGetProvider, useGetProviderArgs, useListProviderArgOptions, + listProviderArgOptions, } from "../../../../utils/backend-client/default/default"; import { colors } from "../../../../utils/theme/colors"; import ProviderSetupNotice from "../../../ProviderSetupNotice"; @@ -28,12 +31,35 @@ import { ProviderRadioSelector } from "../components/ProviderRadio"; import { CustomOption } from "../components/Select"; import { CreateAccessRuleFormData } from "../CreateForm"; import { FormStep } from "./FormStep"; +import { JSONSchema7 } from "json-schema"; +import { RefreshIcon } from "../../../icons/Icons"; export const ProviderStep: React.FC = () => { const methods = useFormContext(); const target = methods.watch("target"); + const { data: provider } = useGetProvider(target?.providerId); + const { data: providerArgs } = useGetProviderArgs(target?.providerId ?? ""); + + // trigger a refresh of all provider arg options in the background when the provider is selected. + // this helps to keep the cached options fresh. + useEffect(() => { + if (providerArgs != null) { + // example schema + // {"$defs":{"Args":{"properties":{"vault":{"description":"example","title":"Vault","type":"string"}},"required":["vault"],"type":"object"}},"$id":"https://commonfate.io/demo/1password/args","$ref":"#/$defs/Args","$schema":"http://json-schema.org/draft/2020-12/schema"} + const schema = providerArgs as JSONSchema7; + const argSchema = schema.$defs?.Args; + if (argSchema !== undefined && typeof argSchema !== "boolean") { + const args = Object.keys(argSchema.properties ?? {}); + args.forEach((arg) => { + void listProviderArgOptions(target.providerId, arg, { + refresh: true, + }); + }); + } + } + }, [providerArgs, target?.providerId]); + const Preview = () => { - const { data: provider } = useGetProvider(target?.providerId); if (!target || !provider || !target?.with) { return null; } @@ -118,15 +144,52 @@ const ProviderWithQuestions: React.FC = () => { ); }; +interface RefreshButtonProps { + providerId: string; + argId: string; +} + +const RefreshButton: React.FC = ({ argId, providerId }) => { + const [loading, setLoading] = useState(false); + const { mutate } = useListProviderArgOptions(providerId, argId); + + const onClick = async () => { + setLoading(true); + const res = await listProviderArgOptions(providerId, argId, { + refresh: true, + }); + mutate(res); + setLoading(false); + }; + + return ( + } + aria-label="Refresh" + variant={"ghost"} + /> + ); +}; + // SelectField is used to render the select input for a provider args field, the data is saved to target.with. in the formdata const SelectField: React.FC = (props) => { - const { control, watch, formState, unregister, trigger } = useFormContext(); + const { + control, + watch, + formState, + trigger, + } = useFormContext(); const providerId = watch("target.providerId"); const { data } = useListProviderArgOptions(providerId, props.name); const withError = formState.errors.target?.with; if (data === undefined) { return ( - + {props.schema.title} @@ -135,7 +198,10 @@ const SelectField: React.FC = (props) => { ); } return ( - + {props.schema.title} @@ -145,39 +211,42 @@ const SelectField: React.FC = (props) => { name={`target.with.${props.name}`} render={({ field: { onChange, ref, value } }) => { return data.hasOptions ? ( - + - o.value === value)} - onChange={(val) => { - // TS improperly infers this as MultiValue - + ) : ( <> = (props) => { ); }} /> - {props.schema.title} is required ); diff --git a/web/src/pages/admin/access-rules/create.tsx b/web/src/pages/admin/access-rules/create.tsx index 5129825b4..2643ba31e 100644 --- a/web/src/pages/admin/access-rules/create.tsx +++ b/web/src/pages/admin/access-rules/create.tsx @@ -1,5 +1,4 @@ import { Box, Flex, Text } from "@chakra-ui/react"; -import { GetStaticProps } from "next"; import CreateAccessRuleForm from "../../../components/forms/access-rule/CreateForm"; import { AdminLayout } from "../../../components/Layout"; diff --git a/web/src/utils/backend-client/admin/admin.msw.ts b/web/src/utils/backend-client/admin/admin.msw.ts index 11bee5427..50c26bd63 100644 --- a/web/src/utils/backend-client/admin/admin.msw.ts +++ b/web/src/utils/backend-client/admin/admin.msw.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API @@ -18,37 +18,37 @@ import { IdpStatus } from '.././types' -export const getAdminListAccessRulesMock = () => ({accessRules: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqj0003xa63fz4y18c5': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getAdminListAccessRulesMock = () => ({accessRules: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioige0003l3hg8tje62sg': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getAdminCreateAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqk0004xa6345jf7tvg': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) +export const getAdminCreateAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigf0004l3hg1pd3b5yg': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getAdminGetAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqn0005xa63fd6f3pzv': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) +export const getAdminGetAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigi0005l3hg2d607aza': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getAdminUpdateAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqn0006xa635011gb33': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) +export const getAdminUpdateAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigj0006l3hggj1rfk9g': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getAdminGetAccessRuleVersionsMock = () => ({accessRules: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqr0008xa63137kg6f9': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getAdminGetAccessRuleVersionsMock = () => ({accessRules: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigm0008l3hgaj27al9l': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getAdminGetAccessRuleVersionMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqv0009xa632dp74uac': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) +export const getAdminGetAccessRuleVersionMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioign0009l3hgfqia1sxf': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getAdminListRequestsMock = () => ({requests: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getAdminListRequestsMock = () => ({requests: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getGetUsersMock = () => ({users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.random.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getGetUsersMock = () => ({users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.helpers.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getGetGroupsMock = () => ({groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({name: faker.random.word(), description: faker.random.word(), id: faker.random.word(), memberCount: faker.datatype.number()})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getGetGroupsMock = () => ({groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({name: faker.random.word(), description: faker.random.word(), id: faker.random.word(), memberCount: faker.datatype.number({min: undefined, max: undefined})})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getGetGroupMock = () => ({name: faker.random.word(), description: faker.random.word(), id: faker.random.word(), memberCount: faker.datatype.number()}) +export const getGetGroupMock = () => ({name: faker.random.word(), description: faker.random.word(), id: faker.random.word(), memberCount: faker.datatype.number({min: undefined, max: undefined})}) export const getAdminMSW = () => [ rest.get('*/api/v1/admin/access-rules', (_req, res, ctx) => { diff --git a/web/src/utils/backend-client/admin/admin.ts b/web/src/utils/backend-client/admin/admin.ts index 6b6e9918b..c35c3ebc9 100644 --- a/web/src/utils/backend-client/admin/admin.ts +++ b/web/src/utils/backend-client/admin/admin.ts @@ -1,11 +1,12 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API * OpenAPI spec version: 1.0 */ -import useSwr,{ +import useSwr from 'swr' +import type { SWRConfiguration, Key } from 'swr' @@ -24,14 +25,11 @@ import type { GetGroupsParams, Group } from '.././types' -import { customInstance, ErrorType } from '../../custom-instance' - - - type AwaitedInput = PromiseLike | T; - - type Awaited = O extends AwaitedInput ? T : never; +import { customInstance } from '../../custom-instance' +import type { ErrorType } from '../../custom-instance' + // eslint-disable-next-line type SecondParameter any> = T extends ( config: any, @@ -49,7 +47,7 @@ export const adminListAccessRules = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/access-rules`, method: 'get', - params, + params }, options); } @@ -62,13 +60,14 @@ export type AdminListAccessRulesQueryResult = NonNullable export const useAdminListAccessRules = >( - params?: AdminListAccessRulesParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: AdminListAccessRulesParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getAdminListAccessRulesKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminListAccessRulesKey(params) : null); const swrFn = () => adminListAccessRules(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -88,7 +87,7 @@ export const adminCreateAccessRule = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/access-rules`, method: 'post', - headers: {'Content-Type': 'application/json'}, + headers: {'Content-Type': 'application/json', }, data: createAccessRuleRequestBody }, options); @@ -116,14 +115,14 @@ export type AdminGetAccessRuleQueryResult = NonNullable export const useAdminGetAccessRule = >( - ruleId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + ruleId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(ruleId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getAdminGetAccessRuleKey(ruleId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(ruleId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminGetAccessRuleKey(ruleId) : null); const swrFn = () => adminGetAccessRule(ruleId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -144,7 +143,7 @@ export const adminUpdateAccessRule = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/access-rules/${ruleId}`, method: 'put', - headers: {'Content-Type': 'application/json'}, + headers: {'Content-Type': 'application/json', }, data: updateAccessRuleRequestBody }, options); @@ -172,14 +171,14 @@ export type AdminGetAccessRuleVersionsQueryResult = NonNullable export const useAdminGetAccessRuleVersions = >( - ruleId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + ruleId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(ruleId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getAdminGetAccessRuleVersionsKey(ruleId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(ruleId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminGetAccessRuleVersionsKey(ruleId) : null); const swrFn = () => adminGetAccessRuleVersions(ruleId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -214,14 +213,14 @@ export type AdminGetAccessRuleVersionQueryError = ErrorType>( ruleId: string, - version: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + version: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(ruleId && version) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getAdminGetAccessRuleVersionKey(ruleId,version) : null); + const isEnabled = swrOptions?.enabled !== false && !!(ruleId && version) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminGetAccessRuleVersionKey(ruleId,version) : null); const swrFn = () => adminGetAccessRuleVersion(ruleId,version, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -241,7 +240,7 @@ export const adminListRequests = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/requests`, method: 'get', - params, + params }, options); } @@ -254,13 +253,14 @@ export type AdminListRequestsQueryResult = NonNullable export const useAdminListRequests = >( - params?: AdminListRequestsParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: AdminListRequestsParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getAdminListRequestsKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminListRequestsKey(params) : null); const swrFn = () => adminListRequests(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -280,7 +280,7 @@ export const getUsers = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/users`, method: 'get', - params, + params }, options); } @@ -293,13 +293,14 @@ export type GetUsersQueryResult = NonNullable export const useGetUsers = >( - params?: GetUsersParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: GetUsersParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getGetUsersKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetUsersKey(params) : null); const swrFn = () => getUsers(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -319,7 +320,7 @@ export const getGroups = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/admin/groups`, method: 'get', - params, + params }, options); } @@ -332,13 +333,14 @@ export type GetGroupsQueryResult = NonNullable export const useGetGroups = >( - params?: GetGroupsParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: GetGroupsParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getGetGroupsKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetGroupsKey(params) : null); const swrFn = () => getGroups(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -370,14 +372,14 @@ export type GetGroupQueryResult = NonNullable export const useGetGroup = >( - groupId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + groupId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(groupId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getGetGroupKey(groupId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(groupId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetGroupKey(groupId) : null); const swrFn = () => getGroup(groupId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) diff --git a/web/src/utils/backend-client/default/default.msw.ts b/web/src/utils/backend-client/default/default.msw.ts index 8fd2b6f1c..6e1a07b58 100644 --- a/web/src/utils/backend-client/default/default.msw.ts +++ b/web/src/utils/backend-client/default/default.msw.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API @@ -17,21 +17,21 @@ import { AccessRuleStatus } from '.././types' -export const getUserListRequestsUpcomingMock = () => ({requests: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getUserListRequestsUpcomingMock = () => ({requests: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getUserListRequestsPastMock = () => ({requests: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getUserListRequestsPastMock = () => ({requests: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getAdminArchiveAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.random.arrayElement(Object.values(AccessRuleStatus)), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), approval: {users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), groups: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.random.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrqp0007xa632d23aji0': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) +export const getAdminArchiveAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), status: faker.helpers.arrayElement(Object.values(AccessRuleStatus)), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), approval: {users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), groups: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word()))}, name: faker.random.word(), description: faker.random.word(), metadata: {createdAt: faker.random.word(), createdBy: faker.random.word(), updatedAt: faker.random.word(), updatedBy: faker.random.word(), updateMessage: faker.helpers.arrayElement([faker.random.word(), undefined])}, target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigk0007l3hg8la9bpep': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getListProvidersMock = () => ([...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), type: faker.random.word()}))) +export const getListProvidersMock = () => (Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), type: faker.random.word()}))) export const getGetProviderMock = () => ({id: faker.random.word(), type: faker.random.word()}) export const getGetProviderArgsMock = () => ({}) -export const getListProviderArgOptionsMock = () => ({hasOptions: faker.datatype.boolean(), options: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({label: faker.random.word(), value: faker.random.word()}))}) +export const getListProviderArgOptionsMock = () => ({hasOptions: faker.datatype.boolean(), options: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({label: faker.random.word(), value: faker.random.word()}))}) export const getDefaultMSW = () => [ rest.get('*/api/v1/requests/upcoming', (_req, res, ctx) => { diff --git a/web/src/utils/backend-client/default/default.ts b/web/src/utils/backend-client/default/default.ts index b8127b3b6..53a3d8618 100644 --- a/web/src/utils/backend-client/default/default.ts +++ b/web/src/utils/backend-client/default/default.ts @@ -1,11 +1,12 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API * OpenAPI spec version: 1.0 */ -import useSwr,{ +import useSwr from 'swr' +import type { SWRConfiguration, Key } from 'swr' @@ -17,16 +18,14 @@ import type { ErrorResponseResponse, Provider, GetProviderArgs200, - ArgOptionsResponseResponse + ArgOptionsResponseResponse, + ListProviderArgOptionsParams } from '.././types' -import { customInstance, ErrorType } from '../../custom-instance' - - - type AwaitedInput = PromiseLike | T; - - type Awaited = O extends AwaitedInput ? T : never; +import { customInstance } from '../../custom-instance' +import type { ErrorType } from '../../custom-instance' + // eslint-disable-next-line type SecondParameter any> = T extends ( config: any, @@ -44,7 +43,7 @@ export const userListRequestsUpcoming = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/requests/upcoming`, method: 'get', - params, + params }, options); } @@ -57,13 +56,14 @@ export type UserListRequestsUpcomingQueryResult = NonNullable export const useUserListRequestsUpcoming = >( - params?: UserListRequestsUpcomingParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: UserListRequestsUpcomingParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getUserListRequestsUpcomingKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserListRequestsUpcomingKey(params) : null); const swrFn = () => userListRequestsUpcoming(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -84,7 +84,7 @@ export const userListRequestsPast = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/requests/past`, method: 'get', - params, + params }, options); } @@ -97,13 +97,14 @@ export type UserListRequestsPastQueryResult = NonNullable export const useUserListRequestsPast = >( - params?: UserListRequestsPastParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: UserListRequestsPastParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getUserListRequestsPastKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserListRequestsPastKey(params) : null); const swrFn = () => userListRequestsPast(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -150,13 +151,14 @@ export type ListProvidersQueryResult = NonNullable export const useListProviders = >( - options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getListProvidersKey()) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListProvidersKey() : null); const swrFn = () => listProviders(requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -188,14 +190,14 @@ export type GetProviderQueryResult = NonNullable export const useGetProvider = >( - providerId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + providerId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(providerId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getGetProviderKey(providerId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(providerId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetProviderKey(providerId) : null); const swrFn = () => getProvider(providerId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -227,14 +229,14 @@ export type GetProviderArgsQueryResult = NonNullable export const useGetProviderArgs = >( - providerId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + providerId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(providerId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getGetProviderArgsKey(providerId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(providerId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetProviderArgsKey(providerId) : null); const swrFn = () => getProviderArgs(providerId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -246,21 +248,25 @@ export const useGetProviderArgs = >( } /** + * Returns the options for a particular Access Provider argument. The options may be cached. To refresh the cache, pass the `refresh` query parameter. * @summary List provider arg options */ export const listProviderArgOptions = ( providerId: string, argId: string, + params?: ListProviderArgOptionsParams, options?: SecondParameter) => { return customInstance( - {url: `/api/v1/admin/providers/${providerId}/args/${argId}/options`, method: 'get' + {url: `/api/v1/admin/providers/${providerId}/args/${argId}/options`, method: 'get', + params }, options); } export const getListProviderArgOptionsKey = (providerId: string, - argId: string,) => [`/api/v1/admin/providers/${providerId}/args/${argId}/options`]; + argId: string, + params?: ListProviderArgOptionsParams,) => [`/api/v1/admin/providers/${providerId}/args/${argId}/options`, ...(params ? [params]: [])]; export type ListProviderArgOptionsQueryResult = NonNullable>> @@ -268,15 +274,16 @@ export type ListProviderArgOptionsQueryError = ErrorType export const useListProviderArgOptions = >( providerId: string, - argId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + argId: string, + params?: ListProviderArgOptionsParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(providerId && argId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getListProviderArgOptionsKey(providerId,argId) : null); - const swrFn = () => listProviderArgOptions(providerId,argId, requestOptions); + const isEnabled = swrOptions?.enabled !== false && !!(providerId && argId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListProviderArgOptionsKey(providerId,argId,params) : null); + const swrFn = () => listProviderArgOptions(providerId,argId,params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) diff --git a/web/src/utils/backend-client/end-user/end-user.msw.ts b/web/src/utils/backend-client/end-user/end-user.msw.ts index bedd865bb..1c69650e3 100644 --- a/web/src/utils/backend-client/end-user/end-user.msw.ts +++ b/web/src/utils/backend-client/end-user/end-user.msw.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API @@ -17,37 +17,37 @@ import { IdpStatus } from '.././types' -export const getListUserAccessRulesMock = () => ({accessRules: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrpb0000xa630dp4b1dz': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getListUserAccessRulesMock = () => ({accessRules: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioies0000l3hgdfs64wnx': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()})), next: faker.helpers.arrayElement([faker.random.word(), null])}) export const getUserGetAccessRuleMock = () => ({id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrpg0001xa6336g593ot': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}) + 'cl76ioiey0001l3hggjgg7ehx': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}) -export const getUserGetAccessRuleApproversMock = () => ({users: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => (faker.random.word())), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getUserGetAccessRuleApproversMock = () => ({users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getUserListRequestsMock = () => ({requests: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getUserListRequestsMock = () => ({requests: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getUserGetRequestMock = () => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrq00002xa631nfp8me2': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), canReview: faker.datatype.boolean(), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])}) +export const getUserGetRequestMock = () => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioifm0002l3hg2dslg7hs': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), canReview: faker.datatype.boolean(), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])}) -export const getListRequestEventsMock = () => ({events: [...Array(faker.datatype.number({min: 1, max: 10}))].map(() => ({id: faker.random.word(), requestId: faker.random.word(), createdAt: faker.random.word(), actor: faker.random.arrayElement([faker.random.word(), undefined]), fromStatus: faker.random.arrayElement([faker.random.arrayElement(Object.values(RequestStatus)), undefined]), toStatus: faker.random.arrayElement([faker.random.arrayElement(Object.values(RequestStatus)), undefined]), fromTiming: faker.random.arrayElement([{durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, undefined]), toTiming: faker.random.arrayElement([{durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, undefined]), fromGrantStatus: faker.random.arrayElement([faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), undefined]), toGrantStatus: faker.random.arrayElement([faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), undefined]), grantCreated: faker.random.arrayElement([faker.datatype.boolean(), undefined]), requestCreated: faker.random.arrayElement([faker.datatype.boolean(), undefined]), grantFailureReason: faker.random.arrayElement([faker.random.word(), undefined])})), next: faker.random.arrayElement([faker.random.word(), null])}) +export const getListRequestEventsMock = () => ({events: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({id: faker.random.word(), requestId: faker.random.word(), createdAt: faker.random.word(), actor: faker.helpers.arrayElement([faker.random.word(), undefined]), fromStatus: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(RequestStatus)), undefined]), toStatus: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(RequestStatus)), undefined]), fromTiming: faker.helpers.arrayElement([{durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, undefined]), toTiming: faker.helpers.arrayElement([{durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, undefined]), fromGrantStatus: faker.helpers.arrayElement([faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), undefined]), toGrantStatus: faker.helpers.arrayElement([faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), undefined]), grantCreated: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), requestCreated: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), grantFailureReason: faker.helpers.arrayElement([faker.random.word(), undefined])})), next: faker.helpers.arrayElement([faker.random.word(), null])}) -export const getReviewRequestMock = () => ({request: faker.random.arrayElement([{id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])}, undefined])}) +export const getReviewRequestMock = () => ({request: faker.helpers.arrayElement([{id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])}, undefined])}) export const getCancelRequestMock = () => ({}) -export const getGetAccessInstructionsMock = () => ({instructions: faker.random.arrayElement([faker.random.word(), undefined])}) +export const getGetAccessInstructionsMock = () => ({instructions: faker.helpers.arrayElement([faker.random.word(), undefined])}) -export const getGetUserMock = () => ({id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.random.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()}) +export const getGetUserMock = () => ({id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.helpers.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()}) -export const getGetMeMock = () => ({user: {id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.random.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()}, isAdmin: faker.datatype.boolean()}) +export const getGetMeMock = () => ({user: {id: faker.random.word(), email: faker.random.word(), firstName: faker.random.word(), picture: faker.random.word(), status: faker.helpers.arrayElement(Object.values(IdpStatus)), lastName: faker.random.word(), updatedAt: faker.random.word()}, isAdmin: faker.datatype.boolean()}) -export const getAdminGetRequestMock = () => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.random.arrayElement(Object.values(RequestStatus)), reason: faker.random.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number(), startTime: faker.random.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { - 'cl6xevrr1000axa63038e7rho': faker.random.word() - }}, timeConstraints: {maxDurationSeconds: faker.datatype.number()}, isCurrent: faker.datatype.boolean()}, updatedAt: faker.random.word(), grant: faker.random.arrayElement([{status: faker.random.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), canReview: faker.datatype.boolean(), approvalMethod: faker.random.arrayElement([faker.random.arrayElement(Object.values(ApprovalMethod)), undefined])}) +export const getAdminGetRequestMock = () => ({id: faker.random.word(), requestor: faker.random.word(), status: faker.helpers.arrayElement(Object.values(RequestStatus)), reason: faker.helpers.arrayElement([faker.random.word(), undefined]), timing: {durationSeconds: faker.datatype.number({min: undefined, max: undefined}), startTime: faker.helpers.arrayElement([faker.random.word(), undefined])}, requestedAt: faker.random.word(), accessRule: {id: faker.random.word(), version: faker.random.word(), name: faker.random.word(), description: faker.random.word(), target: {provider: {id: faker.random.word(), type: faker.random.word()}, with: { + 'cl76ioigr000al3hg9qw4co08': faker.random.word() + }}, timeConstraints: {maxDurationSeconds: faker.datatype.number({min: 60, max: undefined})}, isCurrent: faker.datatype.boolean()}, updatedAt: faker.random.word(), grant: faker.helpers.arrayElement([{status: faker.helpers.arrayElement(['PENDING','ACTIVE','ERROR','REVOKED','EXPIRED']), subject: faker.internet.email(), provider: faker.random.word(), start: faker.random.word(), end: faker.random.word()}, undefined]), canReview: faker.datatype.boolean(), approvalMethod: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(ApprovalMethod)), undefined])}) export const getEndUserMSW = () => [ rest.get('*/api/v1/access-rules', (_req, res, ctx) => { diff --git a/web/src/utils/backend-client/end-user/end-user.ts b/web/src/utils/backend-client/end-user/end-user.ts index e6d5764ca..5b0fc6d48 100644 --- a/web/src/utils/backend-client/end-user/end-user.ts +++ b/web/src/utils/backend-client/end-user/end-user.ts @@ -1,11 +1,12 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API * OpenAPI spec version: 1.0 */ -import useSwr,{ +import useSwr from 'swr' +import type { SWRConfiguration, Key } from 'swr' @@ -28,14 +29,11 @@ import type { import type { AccessInstructions } from '.././types/accesshandler-openapi.yml' -import { customInstance, ErrorType } from '../../custom-instance' - - - type AwaitedInput = PromiseLike | T; - - type Awaited = O extends AwaitedInput ? T : never; +import { customInstance } from '../../custom-instance' +import type { ErrorType } from '../../custom-instance' + // eslint-disable-next-line type SecondParameter any> = T extends ( config: any, @@ -65,13 +63,14 @@ export type ListUserAccessRulesQueryResult = NonNullable export const useListUserAccessRules = >( - options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getListUserAccessRulesKey()) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListUserAccessRulesKey() : null); const swrFn = () => listUserAccessRules(requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -105,14 +104,14 @@ export type UserGetAccessRuleQueryResult = NonNullable export const useUserGetAccessRule = >( - ruleId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + ruleId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(ruleId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getUserGetAccessRuleKey(ruleId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(ruleId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserGetAccessRuleKey(ruleId) : null); const swrFn = () => userGetAccessRule(ruleId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -147,14 +146,14 @@ export type UserGetAccessRuleApproversQueryResult = NonNullable export const useUserGetAccessRuleApprovers = >( - ruleId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + ruleId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(ruleId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getUserGetAccessRuleApproversKey(ruleId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(ruleId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserGetAccessRuleApproversKey(ruleId) : null); const swrFn = () => userGetAccessRuleApprovers(ruleId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -175,7 +174,7 @@ export const userListRequests = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/requests`, method: 'get', - params, + params }, options); } @@ -188,13 +187,14 @@ export type UserListRequestsQueryResult = NonNullable export const useUserListRequests = >( - params?: UserListRequestsParams, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + params?: UserListRequestsParams, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getUserListRequestsKey(params)) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserListRequestsKey(params) : null); const swrFn = () => userListRequests(params, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -216,7 +216,7 @@ export const userCreateRequest = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/requests`, method: 'post', - headers: {'Content-Type': 'application/json'}, + headers: {'Content-Type': 'application/json', }, data: createRequestRequestBody }, options); @@ -247,14 +247,14 @@ export type UserGetRequestQueryResult = NonNullable export const useUserGetRequest = >( - requestId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + requestId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(requestId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getUserGetRequestKey(requestId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(requestId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getUserGetRequestKey(requestId) : null); const swrFn = () => userGetRequest(requestId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -287,14 +287,14 @@ export type ListRequestEventsQueryResult = NonNullable export const useListRequestEvents = >( - requestId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + requestId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(requestId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getListRequestEventsKey(requestId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(requestId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListRequestEventsKey(requestId) : null); const swrFn = () => listRequestEvents(requestId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -315,7 +315,7 @@ export const reviewRequest = ( options?: SecondParameter) => { return customInstance( {url: `/api/v1/requests/${requestId}/review`, method: 'post', - headers: {'Content-Type': 'application/json'}, + headers: {'Content-Type': 'application/json', }, data: reviewRequestBody }, options); @@ -373,14 +373,14 @@ export type GetAccessInstructionsQueryResult = NonNullable export const useGetAccessInstructions = >( - requestId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + requestId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(requestId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getGetAccessInstructionsKey(requestId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(requestId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetAccessInstructionsKey(requestId) : null); const swrFn = () => getAccessInstructions(requestId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -412,14 +412,14 @@ export type GetUserQueryResult = NonNullable> export type GetUserQueryError = ErrorType export const useGetUser = >( - userId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + userId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(userId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getGetUserKey(userId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(userId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetUserKey(userId) : null); const swrFn = () => getUser(userId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -451,13 +451,14 @@ export type GetMeQueryResult = NonNullable>> export type GetMeQueryError = ErrorType export const useGetMe = >( - options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const swrKey = swrOptions?.swrKey ?? (() => getGetMeKey()) + const isEnabled = swrOptions?.enabled !== false + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetMeKey() : null); const swrFn = () => getMe(requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) @@ -489,14 +490,14 @@ export type AdminGetRequestQueryResult = NonNullable export const useAdminGetRequest = >( - requestId: string, options?: { swr?:SWRConfiguration>, TError> & {swrKey: Key}, request?: SecondParameter } + requestId: string, options?: { swr?:SWRConfiguration>, TError> & { swrKey?: Key, enabled?: boolean }, request?: SecondParameter } ) => { const {swr: swrOptions, request: requestOptions} = options ?? {} - const isEnable = !!(requestId) - const swrKey = swrOptions?.swrKey ?? (() => isEnable ? getAdminGetRequestKey(requestId) : null); + const isEnabled = swrOptions?.enabled !== false && !!(requestId) + const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getAdminGetRequestKey(requestId) : null); const swrFn = () => adminGetRequest(requestId, requestOptions); const query = useSwr>, TError>(swrKey, swrFn, swrOptions) diff --git a/web/src/utils/backend-client/types/accessRule.ts b/web/src/utils/backend-client/types/accessRule.ts index bd4feede4..6f34cf70f 100644 --- a/web/src/utils/backend-client/types/accessRule.ts +++ b/web/src/utils/backend-client/types/accessRule.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accessRuleDetail.ts b/web/src/utils/backend-client/types/accessRuleDetail.ts index 5e9ee08f8..428bd3087 100644 --- a/web/src/utils/backend-client/types/accessRuleDetail.ts +++ b/web/src/utils/backend-client/types/accessRuleDetail.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accessRuleMetadata.ts b/web/src/utils/backend-client/types/accessRuleMetadata.ts index f2e34d226..8dfee6a52 100644 --- a/web/src/utils/backend-client/types/accessRuleMetadata.ts +++ b/web/src/utils/backend-client/types/accessRuleMetadata.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accessRuleStatus.ts b/web/src/utils/backend-client/types/accessRuleStatus.ts index ff2bad5d5..f407efce1 100644 --- a/web/src/utils/backend-client/types/accessRuleStatus.ts +++ b/web/src/utils/backend-client/types/accessRuleStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accessRuleTarget.ts b/web/src/utils/backend-client/types/accessRuleTarget.ts index 99b73d812..e10ddcb32 100644 --- a/web/src/utils/backend-client/types/accessRuleTarget.ts +++ b/web/src/utils/backend-client/types/accessRuleTarget.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accessRuleTargetWith.ts b/web/src/utils/backend-client/types/accessRuleTargetWith.ts index 2ed2a90bf..875f7e3e6 100644 --- a/web/src/utils/backend-client/types/accessRuleTargetWith.ts +++ b/web/src/utils/backend-client/types/accessRuleTargetWith.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/accessInstructions.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/accessInstructions.ts index a4fe76d21..6c2a06f24 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/accessInstructions.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/accessInstructions.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/argOptionsResponseResponse.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/argOptionsResponseResponse.ts index 87cbe6f54..5b45ffd14 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/argOptionsResponseResponse.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/argOptionsResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrant.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrant.ts index d748c23d5..24dedac85 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrant.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrant.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrantWith.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrantWith.ts index ddebabd47..9cbcb1d70 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrantWith.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/createGrantWith.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/errorResponseResponse.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/errorResponseResponse.ts index ee4ab8533..b430cc7d6 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/errorResponseResponse.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/errorResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grant.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grant.ts index 929dace45..b4c35512f 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grant.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grant.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantResponseResponse.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantResponseResponse.ts index 04ec0e1df..ee28705e4 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantResponseResponse.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantStatus.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantStatus.ts index 029903388..a820fee80 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantStatus.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantWith.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantWith.ts index 377791973..0926ed37e 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantWith.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/grantWith.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/healthResponseResponse.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/healthResponseResponse.ts index 58f3a9c09..457366716 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/healthResponseResponse.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/healthResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/option.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/option.ts index b3749a71f..80c641030 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/option.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/option.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/provider.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/provider.ts index be8015de9..dfd5aef3a 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/provider.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/provider.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/accesshandler-openapi.yml/providerHealth.ts b/web/src/utils/backend-client/types/accesshandler-openapi.yml/providerHealth.ts index 360039328..f0abd6b21 100644 --- a/web/src/utils/backend-client/types/accesshandler-openapi.yml/providerHealth.ts +++ b/web/src/utils/backend-client/types/accesshandler-openapi.yml/providerHealth.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/adminListAccessRulesParams.ts b/web/src/utils/backend-client/types/adminListAccessRulesParams.ts index 1b07488f0..a93f10d40 100644 --- a/web/src/utils/backend-client/types/adminListAccessRulesParams.ts +++ b/web/src/utils/backend-client/types/adminListAccessRulesParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/adminListAccessRulesStatus.ts b/web/src/utils/backend-client/types/adminListAccessRulesStatus.ts index a737d1dec..9949c8cbf 100644 --- a/web/src/utils/backend-client/types/adminListAccessRulesStatus.ts +++ b/web/src/utils/backend-client/types/adminListAccessRulesStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/adminListRequestsParams.ts b/web/src/utils/backend-client/types/adminListRequestsParams.ts index f2a7ded38..a0e34bdb4 100644 --- a/web/src/utils/backend-client/types/adminListRequestsParams.ts +++ b/web/src/utils/backend-client/types/adminListRequestsParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/adminListRequestsStatus.ts b/web/src/utils/backend-client/types/adminListRequestsStatus.ts index 452f241d6..252b6a057 100644 --- a/web/src/utils/backend-client/types/adminListRequestsStatus.ts +++ b/web/src/utils/backend-client/types/adminListRequestsStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/approvalMethod.ts b/web/src/utils/backend-client/types/approvalMethod.ts index b15982285..16dcb35fa 100644 --- a/web/src/utils/backend-client/types/approvalMethod.ts +++ b/web/src/utils/backend-client/types/approvalMethod.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/approverConfig.ts b/web/src/utils/backend-client/types/approverConfig.ts index 035da9fde..b71cff91d 100644 --- a/web/src/utils/backend-client/types/approverConfig.ts +++ b/web/src/utils/backend-client/types/approverConfig.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/argOptionsResponseResponse.ts b/web/src/utils/backend-client/types/argOptionsResponseResponse.ts index 262718d90..20becb655 100644 --- a/web/src/utils/backend-client/types/argOptionsResponseResponse.ts +++ b/web/src/utils/backend-client/types/argOptionsResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/authUserResponseResponse.ts b/web/src/utils/backend-client/types/authUserResponseResponse.ts index daa96217b..154a566b3 100644 --- a/web/src/utils/backend-client/types/authUserResponseResponse.ts +++ b/web/src/utils/backend-client/types/authUserResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/cancelRequest200.ts b/web/src/utils/backend-client/types/cancelRequest200.ts index 5cf974732..cdd498354 100644 --- a/web/src/utils/backend-client/types/cancelRequest200.ts +++ b/web/src/utils/backend-client/types/cancelRequest200.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/createAccessRuleRequestBody.ts b/web/src/utils/backend-client/types/createAccessRuleRequestBody.ts index bac0b7bcf..797e96f98 100644 --- a/web/src/utils/backend-client/types/createAccessRuleRequestBody.ts +++ b/web/src/utils/backend-client/types/createAccessRuleRequestBody.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/createAccessRuleTarget.ts b/web/src/utils/backend-client/types/createAccessRuleTarget.ts index 7ba9dc633..1825822d4 100644 --- a/web/src/utils/backend-client/types/createAccessRuleTarget.ts +++ b/web/src/utils/backend-client/types/createAccessRuleTarget.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/createAccessRuleTargetWith.ts b/web/src/utils/backend-client/types/createAccessRuleTargetWith.ts index 1b9c8e6ca..b4cc2a01a 100644 --- a/web/src/utils/backend-client/types/createAccessRuleTargetWith.ts +++ b/web/src/utils/backend-client/types/createAccessRuleTargetWith.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/createRequestRequestBody.ts b/web/src/utils/backend-client/types/createRequestRequestBody.ts index b935bbc45..e06ec3454 100644 --- a/web/src/utils/backend-client/types/createRequestRequestBody.ts +++ b/web/src/utils/backend-client/types/createRequestRequestBody.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/createUserRequestBody.ts b/web/src/utils/backend-client/types/createUserRequestBody.ts index 2c82257f8..1c99df7b0 100644 --- a/web/src/utils/backend-client/types/createUserRequestBody.ts +++ b/web/src/utils/backend-client/types/createUserRequestBody.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/errorResponseResponse.ts b/web/src/utils/backend-client/types/errorResponseResponse.ts index fe7092a9a..94b84e3b1 100644 --- a/web/src/utils/backend-client/types/errorResponseResponse.ts +++ b/web/src/utils/backend-client/types/errorResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/getGroupsParams.ts b/web/src/utils/backend-client/types/getGroupsParams.ts index ea44de595..3cf2b64dc 100644 --- a/web/src/utils/backend-client/types/getGroupsParams.ts +++ b/web/src/utils/backend-client/types/getGroupsParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/getProviderArgs200.ts b/web/src/utils/backend-client/types/getProviderArgs200.ts index b9ad045ab..01e7af34f 100644 --- a/web/src/utils/backend-client/types/getProviderArgs200.ts +++ b/web/src/utils/backend-client/types/getProviderArgs200.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/getUsersParams.ts b/web/src/utils/backend-client/types/getUsersParams.ts index d6cb305e8..ad6aff256 100644 --- a/web/src/utils/backend-client/types/getUsersParams.ts +++ b/web/src/utils/backend-client/types/getUsersParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/grant.ts b/web/src/utils/backend-client/types/grant.ts index 8e47142b1..f44ee67b1 100644 --- a/web/src/utils/backend-client/types/grant.ts +++ b/web/src/utils/backend-client/types/grant.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/grantStatus.ts b/web/src/utils/backend-client/types/grantStatus.ts index 5c79553d6..53ab3fe69 100644 --- a/web/src/utils/backend-client/types/grantStatus.ts +++ b/web/src/utils/backend-client/types/grantStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/group.ts b/web/src/utils/backend-client/types/group.ts index ae2f492b6..01f077fb6 100644 --- a/web/src/utils/backend-client/types/group.ts +++ b/web/src/utils/backend-client/types/group.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/idpStatus.ts b/web/src/utils/backend-client/types/idpStatus.ts index 8a9f633ae..0a49f78b9 100644 --- a/web/src/utils/backend-client/types/idpStatus.ts +++ b/web/src/utils/backend-client/types/idpStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/index.ts b/web/src/utils/backend-client/types/index.ts index e9b0632e0..f55261f26 100644 --- a/web/src/utils/backend-client/types/index.ts +++ b/web/src/utils/backend-client/types/index.ts @@ -115,3 +115,4 @@ export * from './userListRequestsPastParams'; export * from './userListRequestsUpcomingParams'; export * from './getUsersParams'; export * from './getGroupsParams'; +export * from './listProviderArgOptionsParams'; diff --git a/web/src/utils/backend-client/types/listAccessRuleApproversResponseResponse.ts b/web/src/utils/backend-client/types/listAccessRuleApproversResponseResponse.ts index 1bdd3f811..46231b3ca 100644 --- a/web/src/utils/backend-client/types/listAccessRuleApproversResponseResponse.ts +++ b/web/src/utils/backend-client/types/listAccessRuleApproversResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listAccessRulesDetailResponseResponse.ts b/web/src/utils/backend-client/types/listAccessRulesDetailResponseResponse.ts index dd2a9a187..5c1420e93 100644 --- a/web/src/utils/backend-client/types/listAccessRulesDetailResponseResponse.ts +++ b/web/src/utils/backend-client/types/listAccessRulesDetailResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listAccessRulesResponseResponse.ts b/web/src/utils/backend-client/types/listAccessRulesResponseResponse.ts index 9e2057932..833fdd870 100644 --- a/web/src/utils/backend-client/types/listAccessRulesResponseResponse.ts +++ b/web/src/utils/backend-client/types/listAccessRulesResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listGroupsResponseResponse.ts b/web/src/utils/backend-client/types/listGroupsResponseResponse.ts index c73c046a6..19bc067e1 100644 --- a/web/src/utils/backend-client/types/listGroupsResponseResponse.ts +++ b/web/src/utils/backend-client/types/listGroupsResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listProviderArgOptionsParams.ts b/web/src/utils/backend-client/types/listProviderArgOptionsParams.ts new file mode 100644 index 000000000..79f63fd7d --- /dev/null +++ b/web/src/utils/backend-client/types/listProviderArgOptionsParams.ts @@ -0,0 +1,9 @@ +/** + * Generated by orval v6.9.6 🍺 + * Do not edit manually. + * Approvals + * Granted Approvals API + * OpenAPI spec version: 1.0 + */ + +export type ListProviderArgOptionsParams = { refresh?: boolean }; diff --git a/web/src/utils/backend-client/types/listRequestEventsResponseResponse.ts b/web/src/utils/backend-client/types/listRequestEventsResponseResponse.ts index 9923bb5e4..6801dacec 100644 --- a/web/src/utils/backend-client/types/listRequestEventsResponseResponse.ts +++ b/web/src/utils/backend-client/types/listRequestEventsResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listRequestsResponseResponse.ts b/web/src/utils/backend-client/types/listRequestsResponseResponse.ts index 2360367e0..e97eb2d9d 100644 --- a/web/src/utils/backend-client/types/listRequestsResponseResponse.ts +++ b/web/src/utils/backend-client/types/listRequestsResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/listUserResponseResponse.ts b/web/src/utils/backend-client/types/listUserResponseResponse.ts index 15923b570..2bb152ff4 100644 --- a/web/src/utils/backend-client/types/listUserResponseResponse.ts +++ b/web/src/utils/backend-client/types/listUserResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/provider.ts b/web/src/utils/backend-client/types/provider.ts index 0db9c33ea..bbf86b04a 100644 --- a/web/src/utils/backend-client/types/provider.ts +++ b/web/src/utils/backend-client/types/provider.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/request.ts b/web/src/utils/backend-client/types/request.ts index 8692f822b..847b41e3c 100644 --- a/web/src/utils/backend-client/types/request.ts +++ b/web/src/utils/backend-client/types/request.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestAccessRule.ts b/web/src/utils/backend-client/types/requestAccessRule.ts index e14613b51..29c1938a5 100644 --- a/web/src/utils/backend-client/types/requestAccessRule.ts +++ b/web/src/utils/backend-client/types/requestAccessRule.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestDetail.ts b/web/src/utils/backend-client/types/requestDetail.ts index b5305b530..ee620cd3b 100644 --- a/web/src/utils/backend-client/types/requestDetail.ts +++ b/web/src/utils/backend-client/types/requestDetail.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestEvent.ts b/web/src/utils/backend-client/types/requestEvent.ts index 595d211af..ceea8841a 100644 --- a/web/src/utils/backend-client/types/requestEvent.ts +++ b/web/src/utils/backend-client/types/requestEvent.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestEventFromGrantStatus.ts b/web/src/utils/backend-client/types/requestEventFromGrantStatus.ts index b1dd9ed88..94f0a31c7 100644 --- a/web/src/utils/backend-client/types/requestEventFromGrantStatus.ts +++ b/web/src/utils/backend-client/types/requestEventFromGrantStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestEventToGrantStatus.ts b/web/src/utils/backend-client/types/requestEventToGrantStatus.ts index 43dd72d2b..1e1aabe64 100644 --- a/web/src/utils/backend-client/types/requestEventToGrantStatus.ts +++ b/web/src/utils/backend-client/types/requestEventToGrantStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestStatus.ts b/web/src/utils/backend-client/types/requestStatus.ts index 3e88fb510..a785dd14d 100644 --- a/web/src/utils/backend-client/types/requestStatus.ts +++ b/web/src/utils/backend-client/types/requestStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/requestTiming.ts b/web/src/utils/backend-client/types/requestTiming.ts index c95d619d0..dec8e5023 100644 --- a/web/src/utils/backend-client/types/requestTiming.ts +++ b/web/src/utils/backend-client/types/requestTiming.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/reviewDecision.ts b/web/src/utils/backend-client/types/reviewDecision.ts index 84400056e..6840e93fb 100644 --- a/web/src/utils/backend-client/types/reviewDecision.ts +++ b/web/src/utils/backend-client/types/reviewDecision.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/reviewRequestBody.ts b/web/src/utils/backend-client/types/reviewRequestBody.ts index 0ea9b06d4..7be29147c 100644 --- a/web/src/utils/backend-client/types/reviewRequestBody.ts +++ b/web/src/utils/backend-client/types/reviewRequestBody.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/reviewResponseResponse.ts b/web/src/utils/backend-client/types/reviewResponseResponse.ts index 9acd63e90..121829f97 100644 --- a/web/src/utils/backend-client/types/reviewResponseResponse.ts +++ b/web/src/utils/backend-client/types/reviewResponseResponse.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/timeConstraints.ts b/web/src/utils/backend-client/types/timeConstraints.ts index d5df8a5ae..c38954b4d 100644 --- a/web/src/utils/backend-client/types/timeConstraints.ts +++ b/web/src/utils/backend-client/types/timeConstraints.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/updateAccessRuleRequestBody.ts b/web/src/utils/backend-client/types/updateAccessRuleRequestBody.ts index c0a46084c..0a8e707e0 100644 --- a/web/src/utils/backend-client/types/updateAccessRuleRequestBody.ts +++ b/web/src/utils/backend-client/types/updateAccessRuleRequestBody.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/user.ts b/web/src/utils/backend-client/types/user.ts index b7fea84d6..1c751713c 100644 --- a/web/src/utils/backend-client/types/user.ts +++ b/web/src/utils/backend-client/types/user.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/userListRequestsParams.ts b/web/src/utils/backend-client/types/userListRequestsParams.ts index 30d64de7e..346f74ccc 100644 --- a/web/src/utils/backend-client/types/userListRequestsParams.ts +++ b/web/src/utils/backend-client/types/userListRequestsParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/userListRequestsPastParams.ts b/web/src/utils/backend-client/types/userListRequestsPastParams.ts index 386bfe356..eb3d38f2c 100644 --- a/web/src/utils/backend-client/types/userListRequestsPastParams.ts +++ b/web/src/utils/backend-client/types/userListRequestsPastParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/userListRequestsStatus.ts b/web/src/utils/backend-client/types/userListRequestsStatus.ts index c3cdf74b3..914302ca4 100644 --- a/web/src/utils/backend-client/types/userListRequestsStatus.ts +++ b/web/src/utils/backend-client/types/userListRequestsStatus.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API diff --git a/web/src/utils/backend-client/types/userListRequestsUpcomingParams.ts b/web/src/utils/backend-client/types/userListRequestsUpcomingParams.ts index 81e117f87..1d3a9c4be 100644 --- a/web/src/utils/backend-client/types/userListRequestsUpcomingParams.ts +++ b/web/src/utils/backend-client/types/userListRequestsUpcomingParams.ts @@ -1,5 +1,5 @@ /** - * Generated by orval v6.8.1 🍺 + * Generated by orval v6.9.6 🍺 * Do not edit manually. * Approvals * Granted Approvals API