@meshery/schemas 1.3.110 → 1.3.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -280,7 +280,7 @@ declare const injectedRtkApi: _reduxjs_toolkit_query.Api<_reduxjs_toolkit_query.
280
280
  getNativeClientAuthorization: _reduxjs_toolkit_query.QueryDefinition<GetNativeClientAuthorizationApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
281
281
  exchangeNativeAuthorizationCode: _reduxjs_toolkit_query.MutationDefinition<ExchangeNativeAuthorizationCodeApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", ExchangeNativeAuthorizationCodeApiResponse, "cloudRtkSchemasApi", unknown>;
282
282
  revokeToken: _reduxjs_toolkit_query.MutationDefinition<RevokeTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
283
- introspectToken: _reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
283
+ introspectToken: _reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", IntrospectTokenApiResponse, "cloudRtkSchemasApi", unknown>;
284
284
  logoutUser: _reduxjs_toolkit_query.QueryDefinition<void, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
285
285
  getUsers: _reduxjs_toolkit_query.QueryDefinition<GetUsersApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", GetUsersApiResponse, "cloudRtkSchemasApi", unknown>;
286
286
  searchUsers: _reduxjs_toolkit_query.QueryDefinition<SearchUsersApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", SearchUsersApiResponse, "cloudRtkSchemasApi", unknown>;
@@ -18323,11 +18323,35 @@ type RevokeTokenApiArg = {
18323
18323
  token: string;
18324
18324
  };
18325
18325
  };
18326
- type IntrospectTokenApiResponse = unknown;
18326
+ type IntrospectTokenApiResponse =
18327
+ /** status 200 The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it. */ {
18328
+ /** Always true; a token that is not active is answered with 401 instead. */
18329
+ active: boolean;
18330
+ /** The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
18331
+ aud: string[];
18332
+ /** The subject the token was issued for. */
18333
+ sub?: string;
18334
+ /** The OAuth client the token was issued to. */
18335
+ clientId?: string;
18336
+ /** Space-separated scopes granted to the token. */
18337
+ scope?: string;
18338
+ /** Expiry, in seconds since the Unix epoch. Absent for a token that does not expire. */
18339
+ exp?: number;
18340
+ /** Issue time, in seconds since the Unix epoch. */
18341
+ iat?: number;
18342
+ /** Not-before time, in seconds since the Unix epoch. */
18343
+ nbf?: number;
18344
+ /** The issuer of the token. */
18345
+ iss?: string;
18346
+ /** Always "Bearer". */
18347
+ tokenType?: string;
18348
+ };
18327
18349
  type IntrospectTokenApiArg = {
18328
18350
  body: {
18329
18351
  /** The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
18330
18352
  token: string;
18353
+ /** RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target". */
18354
+ resource?: string;
18331
18355
  };
18332
18356
  };
18333
18357
  type LogoutUserApiResponse = unknown;
@@ -88945,14 +88969,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88945
88969
  status: _reduxjs_toolkit_query.QueryStatus.fulfilled;
88946
88970
  } & Omit<{
88947
88971
  requestId: string;
88948
- data?: unknown;
88972
+ data?: IntrospectTokenApiResponse | undefined;
88949
88973
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88950
88974
  endpointName: string;
88951
88975
  startedTimeStamp: number;
88952
88976
  fulfilledTimeStamp?: number;
88953
88977
  }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
88954
88978
  requestId: string;
88955
- data?: unknown;
88979
+ data?: IntrospectTokenApiResponse | undefined;
88956
88980
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88957
88981
  endpointName: string;
88958
88982
  startedTimeStamp: number;
@@ -88969,7 +88993,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88969
88993
  status: _reduxjs_toolkit_query.QueryStatus.pending;
88970
88994
  } & {
88971
88995
  requestId: string;
88972
- data?: unknown;
88996
+ data?: IntrospectTokenApiResponse | undefined;
88973
88997
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88974
88998
  endpointName: string;
88975
88999
  startedTimeStamp: number;
@@ -88986,14 +89010,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88986
89010
  status: _reduxjs_toolkit_query.QueryStatus.rejected;
88987
89011
  } & Omit<{
88988
89012
  requestId: string;
88989
- data?: unknown;
89013
+ data?: IntrospectTokenApiResponse | undefined;
88990
89014
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88991
89015
  endpointName: string;
88992
89016
  startedTimeStamp: number;
88993
89017
  fulfilledTimeStamp?: number;
88994
89018
  }, "error"> & Required<Pick<{
88995
89019
  requestId: string;
88996
- data?: unknown;
89020
+ data?: IntrospectTokenApiResponse | undefined;
88997
89021
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88998
89022
  endpointName: string;
88999
89023
  startedTimeStamp: number;
@@ -89023,14 +89047,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89023
89047
  status: _reduxjs_toolkit_query.QueryStatus.fulfilled;
89024
89048
  } & Omit<{
89025
89049
  requestId: string;
89026
- data?: unknown;
89050
+ data?: IntrospectTokenApiResponse | undefined;
89027
89051
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89028
89052
  endpointName: string;
89029
89053
  startedTimeStamp: number;
89030
89054
  fulfilledTimeStamp?: number;
89031
89055
  }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
89032
89056
  requestId: string;
89033
- data?: unknown;
89057
+ data?: IntrospectTokenApiResponse | undefined;
89034
89058
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89035
89059
  endpointName: string;
89036
89060
  startedTimeStamp: number;
@@ -89047,7 +89071,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89047
89071
  status: _reduxjs_toolkit_query.QueryStatus.pending;
89048
89072
  } & {
89049
89073
  requestId: string;
89050
- data?: unknown;
89074
+ data?: IntrospectTokenApiResponse | undefined;
89051
89075
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89052
89076
  endpointName: string;
89053
89077
  startedTimeStamp: number;
@@ -89064,14 +89088,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89064
89088
  status: _reduxjs_toolkit_query.QueryStatus.rejected;
89065
89089
  } & Omit<{
89066
89090
  requestId: string;
89067
- data?: unknown;
89091
+ data?: IntrospectTokenApiResponse | undefined;
89068
89092
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89069
89093
  endpointName: string;
89070
89094
  startedTimeStamp: number;
89071
89095
  fulfilledTimeStamp?: number;
89072
89096
  }, "error"> & Required<Pick<{
89073
89097
  requestId: string;
89074
- data?: unknown;
89098
+ data?: IntrospectTokenApiResponse | undefined;
89075
89099
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89076
89100
  endpointName: string;
89077
89101
  startedTimeStamp: number;
@@ -89084,7 +89108,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89084
89108
  isError: true;
89085
89109
  })) => R) | undefined;
89086
89110
  fixedCacheKey?: string;
89087
- } | undefined) => readonly [(arg: IntrospectTokenApiArg) => _reduxjs_toolkit_query.MutationActionCreatorResult<_reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>>, _reduxjs_toolkit_query.TSHelpersNoInfer<R> & {
89111
+ } | undefined) => readonly [(arg: IntrospectTokenApiArg) => _reduxjs_toolkit_query.MutationActionCreatorResult<_reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", IntrospectTokenApiResponse, "cloudRtkSchemasApi", unknown>>, _reduxjs_toolkit_query.TSHelpersNoInfer<R> & {
89088
89112
  originalArgs?: IntrospectTokenApiArg | undefined;
89089
89113
  reset: () => void;
89090
89114
  }];
@@ -280,7 +280,7 @@ declare const injectedRtkApi: _reduxjs_toolkit_query.Api<_reduxjs_toolkit_query.
280
280
  getNativeClientAuthorization: _reduxjs_toolkit_query.QueryDefinition<GetNativeClientAuthorizationApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
281
281
  exchangeNativeAuthorizationCode: _reduxjs_toolkit_query.MutationDefinition<ExchangeNativeAuthorizationCodeApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", ExchangeNativeAuthorizationCodeApiResponse, "cloudRtkSchemasApi", unknown>;
282
282
  revokeToken: _reduxjs_toolkit_query.MutationDefinition<RevokeTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
283
- introspectToken: _reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
283
+ introspectToken: _reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", IntrospectTokenApiResponse, "cloudRtkSchemasApi", unknown>;
284
284
  logoutUser: _reduxjs_toolkit_query.QueryDefinition<void, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>;
285
285
  getUsers: _reduxjs_toolkit_query.QueryDefinition<GetUsersApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", GetUsersApiResponse, "cloudRtkSchemasApi", unknown>;
286
286
  searchUsers: _reduxjs_toolkit_query.QueryDefinition<SearchUsersApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", SearchUsersApiResponse, "cloudRtkSchemasApi", unknown>;
@@ -18323,11 +18323,35 @@ type RevokeTokenApiArg = {
18323
18323
  token: string;
18324
18324
  };
18325
18325
  };
18326
- type IntrospectTokenApiResponse = unknown;
18326
+ type IntrospectTokenApiResponse =
18327
+ /** status 200 The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it. */ {
18328
+ /** Always true; a token that is not active is answered with 401 instead. */
18329
+ active: boolean;
18330
+ /** The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
18331
+ aud: string[];
18332
+ /** The subject the token was issued for. */
18333
+ sub?: string;
18334
+ /** The OAuth client the token was issued to. */
18335
+ clientId?: string;
18336
+ /** Space-separated scopes granted to the token. */
18337
+ scope?: string;
18338
+ /** Expiry, in seconds since the Unix epoch. Absent for a token that does not expire. */
18339
+ exp?: number;
18340
+ /** Issue time, in seconds since the Unix epoch. */
18341
+ iat?: number;
18342
+ /** Not-before time, in seconds since the Unix epoch. */
18343
+ nbf?: number;
18344
+ /** The issuer of the token. */
18345
+ iss?: string;
18346
+ /** Always "Bearer". */
18347
+ tokenType?: string;
18348
+ };
18327
18349
  type IntrospectTokenApiArg = {
18328
18350
  body: {
18329
18351
  /** The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
18330
18352
  token: string;
18353
+ /** RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target". */
18354
+ resource?: string;
18331
18355
  };
18332
18356
  };
18333
18357
  type LogoutUserApiResponse = unknown;
@@ -88945,14 +88969,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88945
88969
  status: _reduxjs_toolkit_query.QueryStatus.fulfilled;
88946
88970
  } & Omit<{
88947
88971
  requestId: string;
88948
- data?: unknown;
88972
+ data?: IntrospectTokenApiResponse | undefined;
88949
88973
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88950
88974
  endpointName: string;
88951
88975
  startedTimeStamp: number;
88952
88976
  fulfilledTimeStamp?: number;
88953
88977
  }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
88954
88978
  requestId: string;
88955
- data?: unknown;
88979
+ data?: IntrospectTokenApiResponse | undefined;
88956
88980
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88957
88981
  endpointName: string;
88958
88982
  startedTimeStamp: number;
@@ -88969,7 +88993,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88969
88993
  status: _reduxjs_toolkit_query.QueryStatus.pending;
88970
88994
  } & {
88971
88995
  requestId: string;
88972
- data?: unknown;
88996
+ data?: IntrospectTokenApiResponse | undefined;
88973
88997
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88974
88998
  endpointName: string;
88975
88999
  startedTimeStamp: number;
@@ -88986,14 +89010,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
88986
89010
  status: _reduxjs_toolkit_query.QueryStatus.rejected;
88987
89011
  } & Omit<{
88988
89012
  requestId: string;
88989
- data?: unknown;
89013
+ data?: IntrospectTokenApiResponse | undefined;
88990
89014
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88991
89015
  endpointName: string;
88992
89016
  startedTimeStamp: number;
88993
89017
  fulfilledTimeStamp?: number;
88994
89018
  }, "error"> & Required<Pick<{
88995
89019
  requestId: string;
88996
- data?: unknown;
89020
+ data?: IntrospectTokenApiResponse | undefined;
88997
89021
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
88998
89022
  endpointName: string;
88999
89023
  startedTimeStamp: number;
@@ -89023,14 +89047,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89023
89047
  status: _reduxjs_toolkit_query.QueryStatus.fulfilled;
89024
89048
  } & Omit<{
89025
89049
  requestId: string;
89026
- data?: unknown;
89050
+ data?: IntrospectTokenApiResponse | undefined;
89027
89051
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89028
89052
  endpointName: string;
89029
89053
  startedTimeStamp: number;
89030
89054
  fulfilledTimeStamp?: number;
89031
89055
  }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
89032
89056
  requestId: string;
89033
- data?: unknown;
89057
+ data?: IntrospectTokenApiResponse | undefined;
89034
89058
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89035
89059
  endpointName: string;
89036
89060
  startedTimeStamp: number;
@@ -89047,7 +89071,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89047
89071
  status: _reduxjs_toolkit_query.QueryStatus.pending;
89048
89072
  } & {
89049
89073
  requestId: string;
89050
- data?: unknown;
89074
+ data?: IntrospectTokenApiResponse | undefined;
89051
89075
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89052
89076
  endpointName: string;
89053
89077
  startedTimeStamp: number;
@@ -89064,14 +89088,14 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89064
89088
  status: _reduxjs_toolkit_query.QueryStatus.rejected;
89065
89089
  } & Omit<{
89066
89090
  requestId: string;
89067
- data?: unknown;
89091
+ data?: IntrospectTokenApiResponse | undefined;
89068
89092
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89069
89093
  endpointName: string;
89070
89094
  startedTimeStamp: number;
89071
89095
  fulfilledTimeStamp?: number;
89072
89096
  }, "error"> & Required<Pick<{
89073
89097
  requestId: string;
89074
- data?: unknown;
89098
+ data?: IntrospectTokenApiResponse | undefined;
89075
89099
  error?: MeshkitFetchBaseQueryError | _reduxjs_toolkit.SerializedError | undefined;
89076
89100
  endpointName: string;
89077
89101
  startedTimeStamp: number;
@@ -89084,7 +89108,7 @@ declare const useIntrospectTokenMutation: <R extends Record<string, any> = ({
89084
89108
  isError: true;
89085
89109
  })) => R) | undefined;
89086
89110
  fixedCacheKey?: string;
89087
- } | undefined) => readonly [(arg: IntrospectTokenApiArg) => _reduxjs_toolkit_query.MutationActionCreatorResult<_reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", unknown, "cloudRtkSchemasApi", unknown>>, _reduxjs_toolkit_query.TSHelpersNoInfer<R> & {
89111
+ } | undefined) => readonly [(arg: IntrospectTokenApiArg) => _reduxjs_toolkit_query.MutationActionCreatorResult<_reduxjs_toolkit_query.MutationDefinition<IntrospectTokenApiArg, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, MeshkitFetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "Diagnostics_Diagnostics" | "Feature_Features" | "Organization_SMTP_Configuration_OrganizationSmtp" | "Support_Support" | "System_API_System" | "Badge_Badge" | "credential_credentials" | "Key_users" | "Key_Key" | "Keychain_Keychain" | "Model_Models" | "Organization_Organizations" | "Team_teams" | "role_roles" | "schedule_scheduler" | "User_users" | "View_views" | "Academy_API_Academy" | "BlowhornHealth_blowhornHealth" | "Claim_claims" | "Connection_API_Connections" | "Connection_API_ConnectionDefinitions" | "ContentItem_contentItems" | "Design_designs" | "Design_github" | "Environment_environments" | "Events_events" | "Filter_filters" | "GitHub_github" | "Invitation_Invitation" | "Ledger_ledgers" | "MediaAsset_mediaAssets" | "MentionAlias_mentionAliases" | "OauthConsentRequest_oauthConsentRequests" | "OauthConsentRequest_oauthConsentDecisions" | "PatternResource_patternResources" | "Performance_Profile_performance" | "Plan_Plans" | "Profile_profiles" | "ProviderCapability_capabilities" | "Schedule_schedules" | "Subscription_Subscriptions" | "Subscription_Payment Processors" | "token_tokens" | "Workspace_workspaces" | "Workspace_designs" | "Workspace_profiles" | "Workspace_views", IntrospectTokenApiResponse, "cloudRtkSchemasApi", unknown>>, _reduxjs_toolkit_query.TSHelpersNoInfer<R> & {
89088
89112
  originalArgs?: IntrospectTokenApiArg | undefined;
89089
89113
  reset: () => void;
89090
89114
  }];
@@ -123,7 +123,7 @@ export interface paths {
123
123
  put?: never;
124
124
  /**
125
125
  * Revoke token
126
- * @description Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials. On either path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered only on the forwarding path when the OAuth2 server returns an error response or cannot be reached.
126
+ * @description Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. A token issued to a third-party OAuth client (any client other than the server's own) ends that user's whole grant to that client, revoking every access and refresh token it minted. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials, which revokes that token and the tokens issued alongside it from the same authorization. On every path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read, or when the OAuth2 server cannot be asked who the token belongs to; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered when the revocation call itself fails: the OAuth2 server's revocation returns an error response or cannot be reached.
127
127
  */
128
128
  post: operations["revokeToken"];
129
129
  delete?: never;
@@ -143,7 +143,7 @@ export interface paths {
143
143
  put?: never;
144
144
  /**
145
145
  * Introspect access token
146
- * @description Reports whether an access token (a JWT) is authentic, unexpired and not revoked. Possessing the token is the credential, so no session or bearer token is required. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty); a 401 body is "invalid access token" when the signature or expiry check fails, or "revoked access token used" when the token has been revoked.
146
+ * @description Reports whether an access token (a JWT) is authentic, unexpired, not revoked and issued for a protected resource, and on success describes it. Possessing the token is the credential, so no session or bearer token is required. `resource` names the protected resource asking (an RFC 8707 resource identifier, as published in that resource's RFC 9728 protected resource metadata); omitted, it is the REST API. The server is the single decider: a token the server issued to its own first-party clients (a personal API token, a native sign-in token, a first-party sign-in session) is valid for every protected resource the server issues tokens for; a token issued to a third-party OAuth client is valid only for a resource its `aud` names. An inactive or refused token is answered with a 401, not with RFC 7662 section 2.2's 200 and `active: false`: this is the server's status API, and existing callers read only the status. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty), or "invalid_target" when `resource` is not a protected resource this server issues tokens for. A 401 body is "invalid access token" when the signature or expiry check fails, "revoked access token used" when the token has been revoked, or "token audience does not include the requested resource". A caller that sends `resource` takes the 200 as the server's decision for that resource - `aud` is [] for a first-party token that is valid everywhere, so a caller must not re-derive the decision from it - and must refuse the token when the 200 carries no body: a server that predates `resource` ignores it and answers 200 with an empty body for any valid token.
147
147
  */
148
148
  post: operations["introspectToken"];
149
149
  delete?: never;
@@ -211,11 +211,53 @@ export interface components {
211
211
  */
212
212
  updatedAt: string;
213
213
  };
214
- /** @description Carries the token that revokeToken revokes or introspectToken checks. */
214
+ /** @description Carries the token that revokeToken revokes. */
215
215
  TokenPayload: {
216
216
  /** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
217
217
  token: string;
218
218
  };
219
+ /** @description Carries the token that introspectToken checks, and the protected resource asking. */
220
+ TokenIntrospectionPayload: {
221
+ /** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
222
+ token: string;
223
+ /**
224
+ * Format: uri
225
+ * @description RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".
226
+ */
227
+ resource?: string;
228
+ };
229
+ /** @description Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType). */
230
+ TokenIntrospection: {
231
+ /** @description Always true; a token that is not active is answered with 401 instead. */
232
+ active: boolean;
233
+ /** @description The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
234
+ aud: string[];
235
+ /** @description The subject the token was issued for. */
236
+ sub?: string;
237
+ /** @description The OAuth client the token was issued to. */
238
+ clientId?: string;
239
+ /** @description Space-separated scopes granted to the token. */
240
+ scope?: string;
241
+ /**
242
+ * Format: int64
243
+ * @description Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.
244
+ */
245
+ exp?: number;
246
+ /**
247
+ * Format: int64
248
+ * @description Issue time, in seconds since the Unix epoch.
249
+ */
250
+ iat?: number;
251
+ /**
252
+ * Format: int64
253
+ * @description Not-before time, in seconds since the Unix epoch.
254
+ */
255
+ nbf?: number;
256
+ /** @description The issuer of the token. */
257
+ iss?: string;
258
+ /** @description Always "Bearer". */
259
+ tokenType?: string;
260
+ };
219
261
  /** @description Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields. */
220
262
  NativeAuthorizationPayload: {
221
263
  /** @description Display name of the native client. */
@@ -1069,7 +1111,7 @@ export interface operations {
1069
1111
  "text/plain": string;
1070
1112
  };
1071
1113
  };
1072
- /** @description Signing keys (JWKS) or the token store could not be read, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry. */
1114
+ /** @description Signing keys (JWKS) or the token store could not be read, or the OAuth2 server could not be asked who the token belongs to, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry. */
1073
1115
  503: {
1074
1116
  headers: {
1075
1117
  [name: string]: unknown;
@@ -1092,16 +1134,53 @@ export interface operations {
1092
1134
  "application/json": {
1093
1135
  /** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
1094
1136
  token: string;
1137
+ /**
1138
+ * Format: uri
1139
+ * @description RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".
1140
+ */
1141
+ resource?: string;
1095
1142
  };
1096
1143
  };
1097
1144
  };
1098
1145
  responses: {
1099
- /** @description Token is authentic, unexpired and not revoked. The body is empty. */
1146
+ /** @description The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it. */
1100
1147
  200: {
1101
1148
  headers: {
1102
1149
  [name: string]: unknown;
1103
1150
  };
1104
- content?: never;
1151
+ content: {
1152
+ "application/json": {
1153
+ /** @description Always true; a token that is not active is answered with 401 instead. */
1154
+ active: boolean;
1155
+ /** @description The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
1156
+ aud: string[];
1157
+ /** @description The subject the token was issued for. */
1158
+ sub?: string;
1159
+ /** @description The OAuth client the token was issued to. */
1160
+ clientId?: string;
1161
+ /** @description Space-separated scopes granted to the token. */
1162
+ scope?: string;
1163
+ /**
1164
+ * Format: int64
1165
+ * @description Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.
1166
+ */
1167
+ exp?: number;
1168
+ /**
1169
+ * Format: int64
1170
+ * @description Issue time, in seconds since the Unix epoch.
1171
+ */
1172
+ iat?: number;
1173
+ /**
1174
+ * Format: int64
1175
+ * @description Not-before time, in seconds since the Unix epoch.
1176
+ */
1177
+ nbf?: number;
1178
+ /** @description The issuer of the token. */
1179
+ iss?: string;
1180
+ /** @description Always "Bearer". */
1181
+ tokenType?: string;
1182
+ };
1183
+ };
1105
1184
  };
1106
1185
  /** @description Invalid request body or request param */
1107
1186
  400: {
@@ -1,4 +1,4 @@
1
1
  'use strict';var e={openapi:"3.0.0",info:{title:"token",description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta3"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Download token",operationId:"downloadToken",description:"Downloads a specific token by its ID for use as a local credential file (e.g. a CLI auth file). Gated by the Download Token permission and recorded as a distinct audit event from viewing or listing tokens.",parameters:[{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/authorize":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Authorize native client sign-in",operationId:"getNativeClientAuthorization",description:"Browser-facing step of the native client sign-in flow (RFC 8252 loopback redirect with RFC 7636 PKCE). Requires the session cookie of a signed-in user and the Create Token permission. Validates the request. When the request names the client application (`client`) and its version (`clientVersion`) and that version is below the provider minimum, it renders the update page with status 426 and issues nothing. Otherwise it stores a single-use authorization code that expires after 60 seconds, bound to the user, the client name and the PKCE code challenge, and redirects the browser to http://127.0.0.1:{port}/callback with code and state query parameters. Only the 127.0.0.1 loopback IP literal is ever used; no token or cookie is placed in the redirect; no consent page is shown.",parameters:[{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
2
- `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}],responses:{302:{description:"Redirect to the loopback callback carrying code and state. The callback's query parameters are described by NativeAuthorizationCallback.",headers:{Location:{required:true,description:"http://127.0.0.1:{port}/callback?code=...&state=..., whose query is a NativeAuthorizationCallback.",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},426:{description:"Update page; the client's version is below the provider's minimum for that client.",content:{"text/html":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/token":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Exchange native client authorization code",operationId:"exchangeNativeAuthorizationCode",description:"Redeems a single-use authorization code from the native client sign-in flow. The caller proves possession of the PKCE code verifier (BASE64URL(SHA256(codeVerifier)) must equal the stored S256 challenge). The code is consumed on the first redemption attempt, whether or not the verifier matches. On success an API token is minted for the user with name and purpose set to the client name. This call is authenticated by the code and verifier, not by a session.",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}}}}},responses:{201:{description:"API token minted for the native client",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/revoke":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Revoke token",operationId:"revokeToken",description:'Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. Any other token is forwarded to the OAuth2 server\'s RFC 7009 revocation endpoint with the server\'s own client credentials. On either path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered only on the forwarding path when the OAuth2 server returns an error response or cannot be reached.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token revoked, or unknown or already revoked (no-op). The body is empty and the session cookie is cleared.",headers:{"Set-Cookie":{description:"Clears the session cookie (session_cookie=; Path=/; Max-Age=0; HttpOnly).",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:'Signing keys (JWKS) or the token store could not be read, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry.',content:{"text/plain":{schema:{type:"string"}}}}}}},"/introspect":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Introspect access token",operationId:"introspectToken",description:'Reports whether an access token (a JWT) is authentic, unexpired and not revoked. Possessing the token is the credential, so no session or bearer token is required. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty); a 401 body is "invalid access token" when the signature or expiry check fails, or "revoked access token used" when the token has been revoked.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token is authentic, unexpired and not revoked. The body is empty."},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}}}},"/logout":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Sign out",operationId:"logoutUser",description:"Browser navigation that signs the user out. The session is identified by the session_cookie and provider_token cookies, not by a bearer token. Ends the identity provider session, revokes the OAuth access and refresh tokens carried by the provider_token cookie, clears every session cookie and redirects to /login. Cookies are cleared on every outcome, including failure. User-created API tokens are not affected; they are revoked with revokeToken or deleteUserToken. On the canonical host a complete sign-out needs both cookies - session_cookie lets the identity provider end its session and provider_token carries the OAuth tokens to revoke. With only session_cookie, the identity provider session ends but no OAuth tokens are revoked, and the answer is the success 303. With only provider_token, the identity provider cannot start its logout flow, so the OAuth tokens are still revoked but the answer is the failure one - 303 for a browser document navigation, an empty 500 otherwise. Cookies are cleared either way. On an organization custom domain the user is identified from provider_token, sign-out is best-effort and it always answers 302.",security:[{sessionCookie:[]},{providerTokenCookie:[]}],responses:{302:{description:"Redirect to /login on an organization custom domain, where sign-out is best-effort. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},303:{description:"Redirect to /login. Answered when sign-out completes on the canonical host, and also when the identity provider failed but the request is a browser document navigation. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},500:{description:"The identity provider failed and the request was not a browser document navigation. The body is empty; cookies are still cleared."}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"},sessionCookie:{type:"apiKey",in:"cookie",name:"session_cookie",description:"Identity provider session cookie set at sign-in."},providerTokenCookie:{type:"apiKey",in:"cookie",name:"provider_token",description:"Cookie carrying the OAuth access and refresh tokens issued at sign-in."}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{tokenId:{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOauth:{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},nativeClientName:{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},nativeClient:{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
3
- `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},nativeClientVersion:{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},nativePort:{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},nativeCodeChallenge:{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},nativeCodeChallengeMethod:{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},nativeState:{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPayload:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}},NativeAuthorizationPayload:{type:"object",description:"Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields.",required:["clientName","port","codeChallenge","codeChallengeMethod","state"],properties:{clientName:{type:"string",description:"Display name of the native client.",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$","x-order":1},port:{type:"integer",description:"Port on 127.0.0.1 for the callback.",minimum:1024,maximum:65535,"x-order":2},codeChallenge:{type:"string",description:"PKCE S256 code challenge.",pattern:"^[A-Za-z0-9_-]{43}$","x-order":3},codeChallengeMethod:{type:"string",description:"PKCE challenge method.",enum:["S256"],"x-order":4},state:{type:"string",description:"Opaque client state returned on the callback.",minLength:8,maxLength:512,"x-order":5}}},NativeCodeExchangePayload:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}},NativeAuthorizationCallback:{type:"object",description:"Query parameters of the loopback redirect that getNativeClientAuthorization answers with, http://127.0.0.1:{port}/callback?code=...&state=... The code is single-use and expires after 60 seconds; no token is ever placed in the URL. The native client compares state with the one it sent before redeeming the code at /api/identity/native/token.",required:["code","state"],properties:{code:{type:"string",description:"Single-use authorization code, redeemed with the PKCE code verifier.",minLength:1,maxLength:128,"x-order":1},state:{type:"string",description:"The state the native client sent on the authorize request, unchanged.",minLength:8,maxLength:512,"x-order":2}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
2
+ `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}],responses:{302:{description:"Redirect to the loopback callback carrying code and state. The callback's query parameters are described by NativeAuthorizationCallback.",headers:{Location:{required:true,description:"http://127.0.0.1:{port}/callback?code=...&state=..., whose query is a NativeAuthorizationCallback.",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},426:{description:"Update page; the client's version is below the provider's minimum for that client.",content:{"text/html":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/token":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Exchange native client authorization code",operationId:"exchangeNativeAuthorizationCode",description:"Redeems a single-use authorization code from the native client sign-in flow. The caller proves possession of the PKCE code verifier (BASE64URL(SHA256(codeVerifier)) must equal the stored S256 challenge). The code is consumed on the first redemption attempt, whether or not the verifier matches. On success an API token is minted for the user with name and purpose set to the client name. This call is authenticated by the code and verifier, not by a session.",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}}}}},responses:{201:{description:"API token minted for the native client",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/revoke":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Revoke token",operationId:"revokeToken",description:`Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether \`token\` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. A token issued to a third-party OAuth client (any client other than the server's own) ends that user's whole grant to that client, revoking every access and refresh token it minted. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials, which revokes that token and the tokens issued alongside it from the same authorization. On every path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from \`token\`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read, or when the OAuth2 server cannot be asked who the token belongs to; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered when the revocation call itself fails: the OAuth2 server's revocation returns an error response or cannot be reached.`,security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token revoked, or unknown or already revoked (no-op). The body is empty and the session cookie is cleared.",headers:{"Set-Cookie":{description:"Clears the session cookie (session_cookie=; Path=/; Max-Age=0; HttpOnly).",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:'Signing keys (JWKS) or the token store could not be read, or the OAuth2 server could not be asked who the token belongs to, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry.',content:{"text/plain":{schema:{type:"string"}}}}}}},"/introspect":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Introspect access token",operationId:"introspectToken",description:'Reports whether an access token (a JWT) is authentic, unexpired, not revoked and issued for a protected resource, and on success describes it. Possessing the token is the credential, so no session or bearer token is required. `resource` names the protected resource asking (an RFC 8707 resource identifier, as published in that resource\'s RFC 9728 protected resource metadata); omitted, it is the REST API. The server is the single decider: a token the server issued to its own first-party clients (a personal API token, a native sign-in token, a first-party sign-in session) is valid for every protected resource the server issues tokens for; a token issued to a third-party OAuth client is valid only for a resource its `aud` names. An inactive or refused token is answered with a 401, not with RFC 7662 section 2.2\'s 200 and `active: false`: this is the server\'s status API, and existing callers read only the status. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty), or "invalid_target" when `resource` is not a protected resource this server issues tokens for. A 401 body is "invalid access token" when the signature or expiry check fails, "revoked access token used" when the token has been revoked, or "token audience does not include the requested resource". A caller that sends `resource` takes the 200 as the server\'s decision for that resource - `aud` is [] for a first-party token that is valid everywhere, so a caller must not re-derive the decision from it - and must refuse the token when the 200 carries no body: a server that predates `resource` ignores it and answers 200 with an empty body for any valid token.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that introspectToken checks, and the protected resource asking.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1},resource:{type:"string",format:"uri",maxLength:2048,description:'RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".',"x-order":2}}}}}},responses:{200:{description:"The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it.",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType).",required:["active","aud"],properties:{active:{type:"boolean",description:"Always true; a token that is not active is answered with 401 instead.","x-order":1},aud:{type:"array",description:"The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for.",items:{type:"string"},"x-order":2},sub:{type:"string",description:"The subject the token was issued for.","x-order":3},clientId:{type:"string",description:"The OAuth client the token was issued to.","x-order":4},scope:{type:"string",description:"Space-separated scopes granted to the token.","x-order":5},exp:{type:"integer",format:"int64",description:"Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.","x-order":6},iat:{type:"integer",format:"int64",description:"Issue time, in seconds since the Unix epoch.","x-order":7},nbf:{type:"integer",format:"int64",description:"Not-before time, in seconds since the Unix epoch.","x-order":8},iss:{type:"string",description:"The issuer of the token.","x-order":9},tokenType:{type:"string",description:'Always "Bearer".',"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}}}},"/logout":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Sign out",operationId:"logoutUser",description:"Browser navigation that signs the user out. The session is identified by the session_cookie and provider_token cookies, not by a bearer token. Ends the identity provider session, revokes the OAuth access and refresh tokens carried by the provider_token cookie, clears every session cookie and redirects to /login. Cookies are cleared on every outcome, including failure. User-created API tokens are not affected; they are revoked with revokeToken or deleteUserToken. On the canonical host a complete sign-out needs both cookies - session_cookie lets the identity provider end its session and provider_token carries the OAuth tokens to revoke. With only session_cookie, the identity provider session ends but no OAuth tokens are revoked, and the answer is the success 303. With only provider_token, the identity provider cannot start its logout flow, so the OAuth tokens are still revoked but the answer is the failure one - 303 for a browser document navigation, an empty 500 otherwise. Cookies are cleared either way. On an organization custom domain the user is identified from provider_token, sign-out is best-effort and it always answers 302.",security:[{sessionCookie:[]},{providerTokenCookie:[]}],responses:{302:{description:"Redirect to /login on an organization custom domain, where sign-out is best-effort. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},303:{description:"Redirect to /login. Answered when sign-out completes on the canonical host, and also when the identity provider failed but the request is a browser document navigation. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},500:{description:"The identity provider failed and the request was not a browser document navigation. The body is empty; cookies are still cleared."}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"},sessionCookie:{type:"apiKey",in:"cookie",name:"session_cookie",description:"Identity provider session cookie set at sign-in."},providerTokenCookie:{type:"apiKey",in:"cookie",name:"provider_token",description:"Cookie carrying the OAuth access and refresh tokens issued at sign-in."}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{tokenId:{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOauth:{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},nativeClientName:{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},nativeClient:{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
3
+ `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},nativeClientVersion:{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},nativePort:{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},nativeCodeChallenge:{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},nativeCodeChallengeMethod:{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},nativeState:{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPayload:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}},TokenIntrospectionPayload:{type:"object",additionalProperties:false,description:"Carries the token that introspectToken checks, and the protected resource asking.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1},resource:{type:"string",format:"uri",maxLength:2048,description:'RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".',"x-order":2}}},TokenIntrospection:{type:"object",additionalProperties:false,description:"Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType).",required:["active","aud"],properties:{active:{type:"boolean",description:"Always true; a token that is not active is answered with 401 instead.","x-order":1},aud:{type:"array",description:"The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for.",items:{type:"string"},"x-order":2},sub:{type:"string",description:"The subject the token was issued for.","x-order":3},clientId:{type:"string",description:"The OAuth client the token was issued to.","x-order":4},scope:{type:"string",description:"Space-separated scopes granted to the token.","x-order":5},exp:{type:"integer",format:"int64",description:"Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.","x-order":6},iat:{type:"integer",format:"int64",description:"Issue time, in seconds since the Unix epoch.","x-order":7},nbf:{type:"integer",format:"int64",description:"Not-before time, in seconds since the Unix epoch.","x-order":8},iss:{type:"string",description:"The issuer of the token.","x-order":9},tokenType:{type:"string",description:'Always "Bearer".',"x-order":10}}},NativeAuthorizationPayload:{type:"object",description:"Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields.",required:["clientName","port","codeChallenge","codeChallengeMethod","state"],properties:{clientName:{type:"string",description:"Display name of the native client.",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$","x-order":1},port:{type:"integer",description:"Port on 127.0.0.1 for the callback.",minimum:1024,maximum:65535,"x-order":2},codeChallenge:{type:"string",description:"PKCE S256 code challenge.",pattern:"^[A-Za-z0-9_-]{43}$","x-order":3},codeChallengeMethod:{type:"string",description:"PKCE challenge method.",enum:["S256"],"x-order":4},state:{type:"string",description:"Opaque client state returned on the callback.",minLength:8,maxLength:512,"x-order":5}}},NativeCodeExchangePayload:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}},NativeAuthorizationCallback:{type:"object",description:"Query parameters of the loopback redirect that getNativeClientAuthorization answers with, http://127.0.0.1:{port}/callback?code=...&state=... The code is single-use and expires after 60 seconds; no token is ever placed in the URL. The native client compares state with the one it sent before redeeming the code at /api/identity/native/token.",required:["code","state"],properties:{code:{type:"string",description:"Single-use authorization code, redeemed with the PKCE code verifier.",minLength:1,maxLength:128,"x-order":1},state:{type:"string",description:"The state the native client sent on the authorize request, unchanged.",minLength:8,maxLength:512,"x-order":2}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
4
4
  module.exports=t;
@@ -1,4 +1,4 @@
1
1
  var e={openapi:"3.0.0",info:{title:"token",description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta3"},servers:[{url:"https://cloud.meshery.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.meshery.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens response",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}}],responses:{201:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token deleted",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{tokenId}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Download token",operationId:"downloadToken",description:"Downloads a specific token by its ID for use as a local credential file (e.g. a CLI auth file). Gated by the Download Token permission and recorded as a distinct audit event from viewing or listing tokens.",parameters:[{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token response",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}}],responses:{200:{description:"Token generated",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/authorize":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Authorize native client sign-in",operationId:"getNativeClientAuthorization",description:"Browser-facing step of the native client sign-in flow (RFC 8252 loopback redirect with RFC 7636 PKCE). Requires the session cookie of a signed-in user and the Create Token permission. Validates the request. When the request names the client application (`client`) and its version (`clientVersion`) and that version is below the provider minimum, it renders the update page with status 426 and issues nothing. Otherwise it stores a single-use authorization code that expires after 60 seconds, bound to the user, the client name and the PKCE code challenge, and redirects the browser to http://127.0.0.1:{port}/callback with code and state query parameters. Only the 127.0.0.1 loopback IP literal is ever used; no token or cookie is placed in the redirect; no consent page is shown.",parameters:[{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
2
- `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}],responses:{302:{description:"Redirect to the loopback callback carrying code and state. The callback's query parameters are described by NativeAuthorizationCallback.",headers:{Location:{required:true,description:"http://127.0.0.1:{port}/callback?code=...&state=..., whose query is a NativeAuthorizationCallback.",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},426:{description:"Update page; the client's version is below the provider's minimum for that client.",content:{"text/html":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/token":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Exchange native client authorization code",operationId:"exchangeNativeAuthorizationCode",description:"Redeems a single-use authorization code from the native client sign-in flow. The caller proves possession of the PKCE code verifier (BASE64URL(SHA256(codeVerifier)) must equal the stored S256 challenge). The code is consumed on the first redemption attempt, whether or not the verifier matches. On success an API token is minted for the user with name and purpose set to the client name. This call is authenticated by the code and verifier, not by a session.",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}}}}},responses:{201:{description:"API token minted for the native client",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/revoke":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Revoke token",operationId:"revokeToken",description:'Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. Any other token is forwarded to the OAuth2 server\'s RFC 7009 revocation endpoint with the server\'s own client credentials. On either path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered only on the forwarding path when the OAuth2 server returns an error response or cannot be reached.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token revoked, or unknown or already revoked (no-op). The body is empty and the session cookie is cleared.",headers:{"Set-Cookie":{description:"Clears the session cookie (session_cookie=; Path=/; Max-Age=0; HttpOnly).",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:'Signing keys (JWKS) or the token store could not be read, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry.',content:{"text/plain":{schema:{type:"string"}}}}}}},"/introspect":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Introspect access token",operationId:"introspectToken",description:'Reports whether an access token (a JWT) is authentic, unexpired and not revoked. Possessing the token is the credential, so no session or bearer token is required. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty); a 401 body is "invalid access token" when the signature or expiry check fails, or "revoked access token used" when the token has been revoked.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token is authentic, unexpired and not revoked. The body is empty."},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}}}},"/logout":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Sign out",operationId:"logoutUser",description:"Browser navigation that signs the user out. The session is identified by the session_cookie and provider_token cookies, not by a bearer token. Ends the identity provider session, revokes the OAuth access and refresh tokens carried by the provider_token cookie, clears every session cookie and redirects to /login. Cookies are cleared on every outcome, including failure. User-created API tokens are not affected; they are revoked with revokeToken or deleteUserToken. On the canonical host a complete sign-out needs both cookies - session_cookie lets the identity provider end its session and provider_token carries the OAuth tokens to revoke. With only session_cookie, the identity provider session ends but no OAuth tokens are revoked, and the answer is the success 303. With only provider_token, the identity provider cannot start its logout flow, so the OAuth tokens are still revoked but the answer is the failure one - 303 for a browser document navigation, an empty 500 otherwise. Cookies are cleared either way. On an organization custom domain the user is identified from provider_token, sign-out is best-effort and it always answers 302.",security:[{sessionCookie:[]},{providerTokenCookie:[]}],responses:{302:{description:"Redirect to /login on an organization custom domain, where sign-out is best-effort. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},303:{description:"Redirect to /login. Answered when sign-out completes on the canonical host, and also when the identity provider failed but the request is a browser document navigation. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},500:{description:"The identity provider failed and the request was not a browser document navigation. The body is empty; cookies are still cleared."}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"},sessionCookie:{type:"apiKey",in:"cookie",name:"session_cookie",description:"Identity provider session cookie set at sign-in."},providerTokenCookie:{type:"apiKey",in:"cookie",name:"provider_token",description:"Cookie carrying the OAuth access and refresh tokens issued at sign-in."}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{tokenId:{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOauth:{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},nativeClientName:{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},nativeClient:{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
3
- `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},nativeClientVersion:{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},nativePort:{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},nativeCodeChallenge:{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},nativeCodeChallengeMethod:{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},nativeState:{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPayload:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes or introspectToken checks.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}},NativeAuthorizationPayload:{type:"object",description:"Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields.",required:["clientName","port","codeChallenge","codeChallengeMethod","state"],properties:{clientName:{type:"string",description:"Display name of the native client.",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$","x-order":1},port:{type:"integer",description:"Port on 127.0.0.1 for the callback.",minimum:1024,maximum:65535,"x-order":2},codeChallenge:{type:"string",description:"PKCE S256 code challenge.",pattern:"^[A-Za-z0-9_-]{43}$","x-order":3},codeChallengeMethod:{type:"string",description:"PKCE challenge method.",enum:["S256"],"x-order":4},state:{type:"string",description:"Opaque client state returned on the callback.",minLength:8,maxLength:512,"x-order":5}}},NativeCodeExchangePayload:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}},NativeAuthorizationCallback:{type:"object",description:"Query parameters of the loopback redirect that getNativeClientAuthorization answers with, http://127.0.0.1:{port}/callback?code=...&state=... The code is single-use and expires after 60 seconds; no token is ever placed in the URL. The native client compares state with the one it sent before redeeming the code at /api/identity/native/token.",required:["code","state"],properties:{code:{type:"string",description:"Single-use authorization code, redeemed with the PKCE code verifier.",minLength:1,maxLength:128,"x-order":1},state:{type:"string",description:"The state the native client sent on the authorize request, unchanged.",minLength:8,maxLength:512,"x-order":2}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
2
+ `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}],responses:{302:{description:"Redirect to the loopback callback carrying code and state. The callback's query parameters are described by NativeAuthorizationCallback.",headers:{Location:{required:true,description:"http://127.0.0.1:{port}/callback?code=...&state=..., whose query is a NativeAuthorizationCallback.",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},426:{description:"Update page; the client's version is below the provider's minimum for that client.",content:{"text/html":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/native/token":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Exchange native client authorization code",operationId:"exchangeNativeAuthorizationCode",description:"Redeems a single-use authorization code from the native client sign-in flow. The caller proves possession of the PKCE code verifier (BASE64URL(SHA256(codeVerifier)) must equal the stored S256 challenge). The code is consumed on the first redemption attempt, whether or not the verifier matches. On success an API token is minted for the user with name and purpose set to the client name. This call is authenticated by the code and verifier, not by a session.",security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}}}}},responses:{201:{description:"API token minted for the native client",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/revoke":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Revoke token",operationId:"revokeToken",description:`Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether \`token\` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. A token issued to a third-party OAuth client (any client other than the server's own) ends that user's whole grant to that client, revoking every access and refresh token it minted. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials, which revokes that token and the tokens issued alongside it from the same authorization. On every path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from \`token\`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read, or when the OAuth2 server cannot be asked who the token belongs to; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered when the revocation call itself fails: the OAuth2 server's revocation returns an error response or cannot be reached.`,security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}}}}},responses:{200:{description:"Token revoked, or unknown or already revoked (no-op). The body is empty and the session cookie is cleared.",headers:{"Set-Cookie":{description:"Clears the session cookie (session_cookie=; Path=/; Max-Age=0; HttpOnly).",schema:{type:"string"}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:'Signing keys (JWKS) or the token store could not be read, or the OAuth2 server could not be asked who the token belongs to, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry.',content:{"text/plain":{schema:{type:"string"}}}}}}},"/introspect":{post:{"x-internal":["cloud"],tags:["tokens"],summary:"Introspect access token",operationId:"introspectToken",description:'Reports whether an access token (a JWT) is authentic, unexpired, not revoked and issued for a protected resource, and on success describes it. Possessing the token is the credential, so no session or bearer token is required. `resource` names the protected resource asking (an RFC 8707 resource identifier, as published in that resource\'s RFC 9728 protected resource metadata); omitted, it is the REST API. The server is the single decider: a token the server issued to its own first-party clients (a personal API token, a native sign-in token, a first-party sign-in session) is valid for every protected resource the server issues tokens for; a token issued to a third-party OAuth client is valid only for a resource its `aud` names. An inactive or refused token is answered with a 401, not with RFC 7662 section 2.2\'s 200 and `active: false`: this is the server\'s status API, and existing callers read only the status. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty), or "invalid_target" when `resource` is not a protected resource this server issues tokens for. A 401 body is "invalid access token" when the signature or expiry check fails, "revoked access token used" when the token has been revoked, or "token audience does not include the requested resource". A caller that sends `resource` takes the 200 as the server\'s decision for that resource - `aud` is [] for a first-party token that is valid everywhere, so a caller must not re-derive the decision from it - and must refuse the token when the 200 carries no body: a server that predates `resource` ignores it and answers 200 with an empty body for any valid token.',security:[],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Carries the token that introspectToken checks, and the protected resource asking.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1},resource:{type:"string",format:"uri",maxLength:2048,description:'RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".',"x-order":2}}}}}},responses:{200:{description:"The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it.",content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType).",required:["active","aud"],properties:{active:{type:"boolean",description:"Always true; a token that is not active is answered with 401 instead.","x-order":1},aud:{type:"array",description:"The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for.",items:{type:"string"},"x-order":2},sub:{type:"string",description:"The subject the token was issued for.","x-order":3},clientId:{type:"string",description:"The OAuth client the token was issued to.","x-order":4},scope:{type:"string",description:"Space-separated scopes granted to the token.","x-order":5},exp:{type:"integer",format:"int64",description:"Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.","x-order":6},iat:{type:"integer",format:"int64",description:"Issue time, in seconds since the Unix epoch.","x-order":7},nbf:{type:"integer",format:"int64",description:"Not-before time, in seconds since the Unix epoch.","x-order":8},iss:{type:"string",description:"The issuer of the token.","x-order":9},tokenType:{type:"string",description:'Always "Bearer".',"x-order":10}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}}}},"/logout":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Sign out",operationId:"logoutUser",description:"Browser navigation that signs the user out. The session is identified by the session_cookie and provider_token cookies, not by a bearer token. Ends the identity provider session, revokes the OAuth access and refresh tokens carried by the provider_token cookie, clears every session cookie and redirects to /login. Cookies are cleared on every outcome, including failure. User-created API tokens are not affected; they are revoked with revokeToken or deleteUserToken. On the canonical host a complete sign-out needs both cookies - session_cookie lets the identity provider end its session and provider_token carries the OAuth tokens to revoke. With only session_cookie, the identity provider session ends but no OAuth tokens are revoked, and the answer is the success 303. With only provider_token, the identity provider cannot start its logout flow, so the OAuth tokens are still revoked but the answer is the failure one - 303 for a browser document navigation, an empty 500 otherwise. Cookies are cleared either way. On an organization custom domain the user is identified from provider_token, sign-out is best-effort and it always answers 302.",security:[{sessionCookie:[]},{providerTokenCookie:[]}],responses:{302:{description:"Redirect to /login on an organization custom domain, where sign-out is best-effort. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},303:{description:"Redirect to /login. Answered when sign-out completes on the canonical host, and also when the identity provider failed but the request is a browser document navigation. The body is a short HTML link to /login.",headers:{Location:{required:true,description:"/login",schema:{type:"string"}}},content:{"text/html":{schema:{type:"string"}}}},500:{description:"The identity provider failed and the request was not a browser document navigation. The body is empty; cookies are still cleared."}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"},sessionCookie:{type:"apiKey",in:"cookie",name:"session_cookie",description:"Identity provider session cookie set at sign-in."},providerTokenCookie:{type:"apiKey",in:"cookie",name:"provider_token",description:"Cookie carrying the OAuth access and refresh tokens issued at sign-in."}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},403:{description:"Forbidden",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},503:{description:"Signing keys or token revocation status are temporarily unavailable. The token is refused, but the caller should retry rather than sign the user out.",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{tokenId:{name:"tokenId",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},tokenIdQuery:{name:"tokenId",in:"query",description:"ID of the token to delete.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},userIdQuery:{name:"userId",in:"query",description:"UUID of the user to issue the indefinite token for.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},providerQuery:{name:"provider",in:"query",description:"Authentication provider to associate with the indefinite token.",required:true,schema:{type:"string",maxLength:500}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of responses to return per page. Canonical camelCase pagination parameter; prefer this over the deprecated all-lowercase `pagesize`.",schema:{type:"integer",minimum:1}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize. Deprecated alias of pageSize.",deprecated:true,schema:{type:"integer"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOauth:{name:"isOauth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string",minLength:1,maxLength:255}},purpose:{name:"purpose",in:"query",description:"Token purpose. Tokens are minted with this purpose on generate. On list, only tokens whose purpose is exactly this value (case-sensitive, not a substring match) are returned; omit it to list every purpose.",schema:{type:"string",maxLength:500}},nativeClientName:{name:"clientName",in:"query",description:"Display name of the native client asking to sign in. Used as the name and purpose of the minted token.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$"}},nativeClient:{name:"client",in:"query",description:"Identifier of the client application, as in the capabilities `client` parameter. Selects the minimum version checked against `clientVersion`.",required:false,schema:{type:"string",description:`Identifier of a client application, for example the product name of a desktop app, lowercase. It is a value chosen by the client; the provider keys its minimum client versions by it.
3
+ `,minLength:1,maxLength:64,pattern:"^[a-z0-9][a-z0-9-]*$"}},nativeClientVersion:{name:"clientVersion",in:"query",description:"Version of the client application, for example `v1.25.0`.",required:false,schema:{type:"string",maxLength:64}},nativePort:{name:"port",in:"query",description:"Port on 127.0.0.1 where the native client listens for the callback.",required:true,schema:{type:"integer",minimum:1024,maximum:65535}},nativeCodeChallenge:{name:"codeChallenge",in:"query",description:"PKCE code challenge, BASE64URL(SHA256(codeVerifier)) without padding.",required:true,schema:{type:"string",pattern:"^[A-Za-z0-9_-]{43}$"}},nativeCodeChallengeMethod:{name:"codeChallengeMethod",in:"query",description:"PKCE challenge method. Only S256 is accepted.",required:true,schema:{type:"string",enum:["S256"]}},nativeState:{name:"state",in:"query",description:"Opaque value from the native client, returned unchanged on the callback.",required:true,schema:{type:"string",minLength:8,maxLength:512}}},schemas:{UserToken:{type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},TokenPayload:{type:"object",additionalProperties:false,description:"Carries the token that revokeToken revokes.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1}}},TokenIntrospectionPayload:{type:"object",additionalProperties:false,description:"Carries the token that introspectToken checks, and the protected resource asking.",required:["token"],properties:{token:{type:"string",description:"The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected.",pattern:"[^\\x09-\\x0D\\x20\\x85\\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]","x-order":1},resource:{type:"string",format:"uri",maxLength:2048,description:'RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".',"x-order":2}}},TokenIntrospection:{type:"object",additionalProperties:false,description:"Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType).",required:["active","aud"],properties:{active:{type:"boolean",description:"Always true; a token that is not active is answered with 401 instead.","x-order":1},aud:{type:"array",description:"The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for.",items:{type:"string"},"x-order":2},sub:{type:"string",description:"The subject the token was issued for.","x-order":3},clientId:{type:"string",description:"The OAuth client the token was issued to.","x-order":4},scope:{type:"string",description:"Space-separated scopes granted to the token.","x-order":5},exp:{type:"integer",format:"int64",description:"Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.","x-order":6},iat:{type:"integer",format:"int64",description:"Issue time, in seconds since the Unix epoch.","x-order":7},nbf:{type:"integer",format:"int64",description:"Not-before time, in seconds since the Unix epoch.","x-order":8},iss:{type:"string",description:"The issuer of the token.","x-order":9},tokenType:{type:"string",description:'Always "Bearer".',"x-order":10}}},NativeAuthorizationPayload:{type:"object",description:"Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields.",required:["clientName","port","codeChallenge","codeChallengeMethod","state"],properties:{clientName:{type:"string",description:"Display name of the native client.",pattern:"^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$","x-order":1},port:{type:"integer",description:"Port on 127.0.0.1 for the callback.",minimum:1024,maximum:65535,"x-order":2},codeChallenge:{type:"string",description:"PKCE S256 code challenge.",pattern:"^[A-Za-z0-9_-]{43}$","x-order":3},codeChallengeMethod:{type:"string",description:"PKCE challenge method.",enum:["S256"],"x-order":4},state:{type:"string",description:"Opaque client state returned on the callback.",minLength:8,maxLength:512,"x-order":5}}},NativeCodeExchangePayload:{type:"object",additionalProperties:false,description:"Redeems a native client authorization code with its PKCE verifier.",required:["code","codeVerifier"],properties:{code:{type:"string",description:"Single-use authorization code from the loopback callback.",minLength:1,maxLength:128,"x-order":1},codeVerifier:{type:"string",description:"PKCE code verifier (RFC 7636, 43 to 128 unreserved characters).",pattern:"^[A-Za-z0-9._~-]{43,128}$","x-order":2}}},NativeAuthorizationCallback:{type:"object",description:"Query parameters of the loopback redirect that getNativeClientAuthorization answers with, http://127.0.0.1:{port}/callback?code=...&state=... The code is single-use and expires after 60 seconds; no token is ever placed in the URL. The native client compares state with the one it sent before redeeming the code at /api/identity/native/token.",required:["code","state"],properties:{code:{type:"string",description:"Single-use authorization code, redeemed with the PKCE code verifier.",minLength:1,maxLength:128,"x-order":1},state:{type:"string",description:"The state the native client sent on the authorize request, unchanged.",minLength:8,maxLength:512,"x-order":2}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","totalCount","page","pageSize"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",additionalProperties:false,description:"Represents a user-owned API token or OAuth session.",required:["id","owner","provider","accessToken","name","purpose","isOauth","createdAt","updatedAt"],properties:{id:{description:"Unique identifier for the token.","x-oapi-codegen-extra-tags":{db:"id",json:"id"},"x-order":1,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},owner:{description:"UUID of the user who owns the token.","x-go-name":"Owner","x-oapi-codegen-extra-tags":{db:"owner",json:"owner"},"x-order":2,type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-oapi-codegen-extra-tags":{db:"provider",json:"provider"},maxLength:500,"x-order":3},accessToken:{type:"string",description:"Access token value.","x-oapi-codegen-extra-tags":{db:"access_token",json:"accessToken"},maxLength:4096,"x-order":4},refreshToken:{type:"string",description:"Refresh token value when applicable.","x-oapi-codegen-extra-tags":{db:"refresh_token",json:"refreshToken"},maxLength:4096,"x-order":5},name:{type:"string",description:"Human-readable token name.","x-oapi-codegen-extra-tags":{db:"name",json:"name"},minLength:1,maxLength:255,"x-order":6},purpose:{type:"string",description:"Purpose for which the token was created.","x-oapi-codegen-extra-tags":{db:"purpose",json:"purpose"},maxLength:500,"x-order":7},isOauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-go-name":"IsOAuth","x-oapi-codegen-extra-tags":{db:"is_oauth",json:"isOauth"},"x-order":8},createdAt:{type:"string",format:"date-time",description:"Timestamp when the token was created.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"created_at",json:"createdAt"},"x-order":9},updatedAt:{type:"string",format:"date-time",description:"Timestamp when the token was last updated.","x-go-type":"time.Time","x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"updated_at",json:"updatedAt"},"x-order":10}}},"x-order":1,description:"Tokens returned on the current page."},totalCount:{type:"integer",description:"Total number of tokens across all pages.",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":2,"x-oapi-codegen-extra-tags":{json:"totalCount"}},page:{type:"integer",description:"Current page number (zero-based).",minimum:0,"x-go-type-skip-optional-pointer":true,"x-order":3},pageSize:{type:"integer",description:"Number of tokens per page.",minimum:1,"x-go-type-skip-optional-pointer":true,"x-order":4,"x-oapi-codegen-extra-tags":{json:"pageSize"}}}}}}},t=e;
4
4
  export{t as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshery/schemas",
3
- "version": "1.3.110",
3
+ "version": "1.3.111",
4
4
  "description": "<p style=\"text-align:center;\" align=\"center\"><a href=\"https://meshery.io\"><picture> <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-light-text-side.svg\"> <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-dark-text-side.svg\"> <img src=\"https://raw.githubusercontent.com/meshery/meshery/master/.github/assets/images/readme/meshery-logo-dark-text-side.svg\" alt=\"Meshery Logo\" width=\"70%\" /></picture></a><br /><br /></p> <p align=\"center\"> <a href=\"https://hub.docker.com/r/meshery/meshery\" alt=\"Docker pulls\"> <img src=\"https://img.shields.io/docker/pulls/meshery/meshery.svg\" /></a> <a href=\"https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%meshery+org%3Ameshery+org%3Aservice-mesh-performance+org%3Aservice-mesh-patterns+org%3A+label%3A%22help+wanted%22+\" alt=\"GitHub issues by-label\"> <img src=\"https://img.shields.io/github/issues/meshery/meshery/help%20wanted.svg?color=informational\" /></a> <a href=\"https://github.com/meshery/meshery/blob/master/LICENSE\" alt=\"LICENSE\"> <img src=\"https://img.shields.io/github/license/meshery/meshery?color=brightgreen\" /></a> <a href=\"https://artifacthub.io/packages/helm/meshery/meshery\" alt=\"Artifact Hub Meshery\"> <img src=\"https://img.shields.io/endpoint?color=brightgreen&label=Helm%20Chart&style=plastic&url=https%3A%2F%2Fartifacthub.io%2Fbadge%2Frepository%2Fartifact-hub\" /></a> <a href=\"https://goreportcard.com/report/github.com/meshery/meshery\" alt=\"Go Report Card\"> <img src=\"https://goreportcard.com/badge/github.com/meshery/meshery\" /></a> <a href=\"https://github.com/meshery/meshery/actions\" alt=\"Build Status\"> <img src=\"https://img.shields.io/github/actions/workflow/status/meshery/meshery/release-drafter.yml\" /></a> <a href=\"https://bestpractices.coreinfrastructure.org/projects/3564\" alt=\"CLI Best Practices\"> <img src=\"https://bestpractices.coreinfrastructure.org/projects/3564/badge\" /></a> <a href=\"http://discuss.meshery.io\" alt=\"Discuss Users\"> <img src=\"https://img.shields.io/discourse/users?label=discuss&logo=discourse&server=https%3A%2F%2Fdiscuss.meshery.io\" /></a> <a href=\"https://slack.meshery.io\" alt=\"Join Slack\"> <img src=\"https://img.shields.io/badge/Slack-@meshery.svg?logo=slack\" /></a> <a href=\"https://twitter.com/intent/follow?screen_name=mesheryio\" alt=\"Twitter Follow\"> <img src=\"https://img.shields.io/twitter/follow/mesheryio.svg?label=Follow+Meshery&style=social\" /></a> <a href=\"https://github.com/meshery/meshery/releases\" alt=\"Meshery Downloads\"> <img src=\"https://img.shields.io/github/downloads/meshery/meshery/total\" /></a> <!-- <a href=\"https://app.fossa.com/projects/git%2Bgithub.com%2Fmeshery%2Fmeshery?ref=badge_shield\" alt=\"License Scan Report\"> <img src=\"https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmeshery%2Fmeshery.svg?type=shield\"/></a> --> </p>",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",