{"info":{"title":"UseGrant SDK","summary":"APIs for UseGrant SDK","version":"1.0.0","contact":{"name":"Support","url":"https://usegrant.dev","email":"support@usegrant.dev"},"license":{"name":"Apache-2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"}},"servers":[{"url":"https://sdk.usegrant.dev","description":"UseGrant SDK"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Token"}}},"security":[{"BearerAuth":[]}],"openapi":"3.1.1","paths":{"/v1/providers":{"get":{"operationId":"providers.list","summary":"List Providers","tags":["providers"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"urlId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"rotateJwks":{"type":"boolean"}},"required":["id","name","description","urlId","createdAt","updatedAt","rotateJwks"]}}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"providers.create","summary":"Create Provider","tags":["providers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"description":{"type":"string","minLength":10,"maxLength":200,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["name","description"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"urlId":{"type":"string"},"rotateJwks":{"type":"boolean"}},"required":["id","name","description","createdAt","updatedAt","urlId","rotateJwks"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{id}":{"get":{"operationId":"providers.get","summary":"Get Provider","tags":["providers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"rotateJwks":{"type":"boolean"},"urlId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","rotateJwks","urlId","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"providers.delete","summary":"Delete Provider","tags":["providers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/domains":{"get":{"operationId":"providers.domains.list","summary":"List Domains","tags":["providers/domains"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","domain","verified","createdAt","updatedAt"]}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"providers.domains.add","summary":"Add Domain to Provider","tags":["providers/domains"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":255,"pattern":"^(?!:\\/\\/)([a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]?\\.)+[a-zA-Z]{2,}$","allOf":[{"pattern":"^(?!www\\.)"}]}},"required":["domain"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","domain","verified","createdAt","updatedAt"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"MAX_DOMAINS_LIMIT_REACHED"},"status":{"const":403},"message":{"type":"string","default":"You have reached the limit for custom domains. Please upgrade to increase the limit"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"DOMAIN_ALREADY_ADDED"},"status":{"const":409},"message":{"type":"string","default":"The domain is already added"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/domains/{domainId}":{"get":{"operationId":"providers.domains.get","summary":"Get Domain","tags":["providers/domains"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","description":"Domain ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","domain","verified","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"DOMAIN_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified domain could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"providers.domains.delete","summary":"Delete Domain","tags":["providers/domains"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","description":"Domain ID"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"DOMAIN_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified domain could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/domains/{domainId}/verify":{"post":{"operationId":"providers.domains.verify","summary":"Verify Domain","tags":["providers/domains"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","description":"Domain ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean"},"message":{"type":"string"},"domain":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","domain","verified","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["verified","message","domain"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"DOMAIN_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified domain could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/clients":{"get":{"operationId":"providers.clients.list","summary":"List Clients","tags":["providers/clients"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string"},"subject":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","audience","subject","createdAt","updatedAt"]}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"providers.clients.create","summary":"Create Client","tags":["providers/clients"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"audience":{"type":"string","minLength":3,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["name","audience"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string"},"subject":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"providerId":{"type":"string"}},"required":["id","name","audience","subject","createdAt","updatedAt","providerId"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CLIENT_ALREADY_EXISTS"},"status":{"const":409},"message":{"type":"string","default":"A client with this name already exists"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/clients/{clientId}":{"get":{"operationId":"providers.clients.get","summary":"Get Client","tags":["providers/clients"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"clientId","in":"path","required":true,"schema":{"type":"string","description":"Client ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string"},"subject":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","audience","subject","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CLIENT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified client could not be found. Please verify the client ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"providers.clients.delete","summary":"Delete Client","tags":["providers/clients"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"clientId","in":"path","required":true,"schema":{"type":"string","description":"Client ID"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CLIENT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified client could not be found. Please verify the client ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/providers/{providerId}/clients/{clientId}/tokens":{"post":{"operationId":"providers.clients.tokens.create","summary":"Create Access Token","tags":["providers/clients/tokens"],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","description":"Provider ID"}},{"name":"clientId","in":"path","required":true,"schema":{"type":"string","description":"Client ID"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresIn":{"type":"number","maximum":172800,"exclusiveMinimum":0,"default":3600},"useJwtType":{"type":"boolean"},"audienceAsArray":{"type":"boolean"},"forceDefaultDomain":{"type":"boolean"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"type":{"const":"Bearer"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["accessToken","type","expiresAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified provider could not be found. Please check the provider ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CLIENT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified client could not be found. Please verify the client ID and try again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants":{"get":{"operationId":"tenants.list","summary":"List Tenants","tags":["tenants"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","createdAt","updatedAt"]}}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"tenants.create","summary":"Create Tenant","tags":["tenants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"description":{"type":"string","minLength":10,"maxLength":200,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["name","description"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","createdAt","updatedAt"]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_ALREADY_EXISTS"},"status":{"const":409},"message":{"type":"string","default":"A tenant with this name already exists"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{id}":{"get":{"operationId":"tenants.get","summary":"Get Tenant","tags":["tenants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"tenants.delete","summary":"Delete Tenant","tags":["tenants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{tenantId}/providers":{"get":{"operationId":"tenants.providers.list","summary":"List Tenant Providers","tags":["tenants/providers"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"audience":{"type":"string"},"fingerprints":{"type":"array","items":{"type":"string"}},"earliestIssuanceTimeAllowed":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","audience","fingerprints","earliestIssuanceTimeAllowed","createdAt","updatedAt"]}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"tenants.providers.create","summary":"Create Tenant Provider","tags":["tenants/providers"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"fingerprints":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","minLength":32,"maxLength":64,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"audience":{"type":"string","minLength":3,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"earliestIssuanceTimeAllowed":{"type":"number","minimum":0,"maximum":12,"description":"Earliest issuance time allowed in hours"}},"required":["url","fingerprints","audience","earliestIssuanceTimeAllowed"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"audience":{"type":"string"},"fingerprints":{"type":"array","items":{"type":"string"}},"earliestIssuanceTimeAllowed":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","audience","fingerprints","earliestIssuanceTimeAllowed","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_ALREADY_EXISTS"},"status":{"const":409},"message":{"type":"string","default":"A tenant provider with this URL already exists"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{tenantId}/providers/{tenantProviderId}":{"get":{"operationId":"tenants.providers.get","summary":"Get Tenant Provider","tags":["tenants/providers"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"audience":{"type":"string"},"fingerprints":{"type":"array","items":{"type":"string"}},"earliestIssuanceTimeAllowed":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","audience","fingerprints","earliestIssuanceTimeAllowed","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"tenants.providers.delete","summary":"Delete Tenant Provider","tags":["tenants/providers"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{tenantId}/providers/{tenantProviderId}/policies":{"get":{"operationId":"tenants.providers.policies.list","summary":"List Tenant Provider Policies","tags":["tenants/providers/policies"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"audience":{"type":"string"},"conditions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"operator":{"enum":["stringEquals","stringLike","stringNotEquals","stringNotLike"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["key","operator","value"]}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","audience","createdAt","updatedAt"]}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"tenants.providers.policies.create","summary":"Create Tenant Provider Policy","tags":["tenants/providers/policies"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"description":{"type":"string","minLength":10,"maxLength":200,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"audience":{"type":"string","minLength":3,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"operator":{"enum":["stringEquals","stringLike","stringNotEquals","stringNotLike"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["key","operator","value"]}}},"required":["name","description","audience"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"audience":{"type":"string"},"conditions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"operator":{"enum":["stringEquals","stringLike","stringNotEquals","stringNotLike"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["key","operator","value"]}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","audience","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_POLICY_ALREADY_EXISTS"},"status":{"const":409},"message":{"type":"string","default":"A tenant provider policy with this name already exists"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{tenantId}/providers/{tenantProviderId}/policies/{policyId}":{"get":{"operationId":"tenants.providers.policies.get","summary":"Get Tenant Provider Policy","tags":["tenants/providers/policies"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","description":"Policy ID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"audience":{"type":"string"},"conditions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Za-z\\d\\-_\\s]+$"},"operator":{"enum":["stringEquals","stringLike","stringNotEquals","stringNotLike"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z\\d\\-_\\s]+$"}},"required":["key","operator","value"]}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","audience","createdAt","updatedAt"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_POLICY_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider policy could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"tenants.providers.policies.delete","summary":"Delete Tenant Provider Policy","tags":["tenants/providers/policies"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}},{"name":"tenantProviderId","in":"path","required":true,"schema":{"type":"string","description":"Tenant Provider ID"}},{"name":"policyId","in":"path","required":true,"schema":{"type":"string","description":"Policy ID"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_PROVIDER_POLICY_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant provider policy could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/tenants/{tenantId}/validate":{"post":{"operationId":"tenants.tokens.validate","summary":"Validate Token","tags":["tenants/tokens"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","description":"Tenant ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantProviderPolicyId":{"type":"string"},"token":{"type":"string"}},"required":["tenantProviderPolicyId","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"exp":{"type":"number"}},"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INVALID_TOKEN"},"status":{"const":401},"message":{"type":"string","default":"The provided JWT token is invalid"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TENANT_NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"The specified tenant could not be found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"An internal server error occurred. Please try again later."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INVALID_ISSUER"},"status":{"const":500},"message":{"type":"string","default":"The issuer of the token is invalid"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INVALID_TOKEN_HEADERS"},"status":{"const":500},"message":{"type":"string","default":"The JWT token headers are invalid"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"EXPIRED_TOKEN"},"status":{"const":500},"message":{"type":"string","default":"The provided token has expired and is no longer valid"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}}}}