Module: AxHub

Defined in:
lib/axhub_sdk.rb,
lib/axhub_sdk/version.rb,
lib/axhub_sdk/operations.rb

Defined Under Namespace

Classes: AppsClient, Client, Error, ErrorInfo, OperationClient

Constant Summary collapse

DEFAULT_BASE_URL =
'https://api.axhub.ai'
ROUTES =
[
  { 'method' => "GET", 'path' => "/.well-known/jwks.json", 'tag' => "Auth", 'operationId' => "authGetWellKnownJwksJson" },
  { 'method' => "GET", 'path' => "/.well-known/openid-configuration", 'tag' => "Auth", 'operationId' => "authGetWellKnownOpenidConfiguration" },
  { 'method' => "GET", 'path' => "/api/v1/admin/templates", 'tag' => "Apps", 'operationId' => "appsGetApiV1AdminTemplates" },
  { 'method' => "POST", 'path' => "/api/v1/admin/templates", 'tag' => "Apps", 'operationId' => "appsPostApiV1AdminTemplates" },
  { 'method' => "GET", 'path' => "/api/v1/admin/templates/{templateID}", 'tag' => "Apps", 'operationId' => "appsGetApiV1AdminTemplatesByTemplateID" },
  { 'method' => "PATCH", 'path' => "/api/v1/admin/templates/{templateID}", 'tag' => "Apps", 'operationId' => "appsPatchApiV1AdminTemplatesByTemplateID" },
  { 'method' => "POST", 'path' => "/api/v1/admin/users/{uid}/revoke-all", 'tag' => "Auth", 'operationId' => "authPostApiV1AdminUsersByUidRevokeAll" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppID" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppID" },
  { 'method' => "PATCH", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsPatchApiV1AppsByAppID" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/access", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppIDAccess" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/access", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDAccess" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/access/me", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDAccessMe" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/comments", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDComments" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/comments", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDComments" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/deployments", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDDeployments" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeployments" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/deployments/{did}", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDDeploymentsByDid" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments/{did}/cancel", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeploymentsByDidCancel" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments/{did}/rollback", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeploymentsByDidRollback" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/env-vars", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDEnvVars" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/env-vars", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDEnvVars" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/env-vars/{key}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppIDEnvVarsByKey" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/git-connection", 'tag' => "Deploy", 'operationId' => "deployDeleteApiV1AppsByAppIDGitConnection" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/git-connection", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDGitConnection" },
  { 'method' => "PATCH", 'path' => "/api/v1/apps/{appID}/git-connection", 'tag' => "Deploy", 'operationId' => "deployPatchApiV1AppsByAppIDGitConnection" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/git-connection", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDGitConnection" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/git/github/install/start", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDGitGithubInstallStart" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/icon-dark/upload-url", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDIconDarkUploadUrl" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/icon/upload-url", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDIconUploadUrl" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/invitations", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDInvitations" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/invitations/{userID}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppIDInvitationsByUserID" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/likes", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppIDLikes" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/likes", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDLikes" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/likes/me", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDLikesMe" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/logs", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDLogs" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/members", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDMembers" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/oauth-clients", 'tag' => "Auth", 'operationId' => "authPostApiV1AppsByAppIDOauthClients" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/permanent", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppIDPermanent" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/resume", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDResume" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/review-requests", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDReviewRequests" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/review-requests", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDReviewRequests" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/suspend", 'tag' => "Apps", 'operationId' => "appsPostApiV1AppsByAppIDSuspend" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTables" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/tables", 'tag' => "Schema", 'operationId' => "schemaPostApiV1AppsByAppIDTables" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/tables/{tableName}", 'tag' => "Schema", 'operationId' => "schemaDeleteApiV1AppsByAppIDTablesByTableName" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables/{tableName}", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTablesByTableName" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/columns", 'tag' => "Schema", 'operationId' => "schemaPostApiV1AppsByAppIDTablesByTableNameColumns" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/columns/{columnName}", 'tag' => "Schema", 'operationId' => "schemaDeleteApiV1AppsByAppIDTablesByTableNameColumnsByColumnName" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/grants", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTablesByTableNameGrants" },
  { 'method' => "POST", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/grants", 'tag' => "Schema", 'operationId' => "schemaPostApiV1AppsByAppIDTablesByTableNameGrants" },
  { 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/grants/{grantID}", 'tag' => "Schema", 'operationId' => "schemaDeleteApiV1AppsByAppIDTablesByTableNameGrantsByGrantID" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables/{tableName}/rows", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTablesByTableNameRows" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables/check-availability", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTablesCheckAvailability" },
  { 'method' => "GET", 'path' => "/api/v1/apps/{appID}/tables/column-types", 'tag' => "Schema", 'operationId' => "schemaGetApiV1AppsByAppIDTablesColumnTypes" },
  { 'method' => "GET", 'path' => "/api/v1/apps/discover", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsDiscover" },
  { 'method' => "GET", 'path' => "/api/v1/apps/search", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsSearch" },
  { 'method' => "GET", 'path' => "/api/v1/catalog/kinds", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1CatalogKinds" },
  { 'method' => "DELETE", 'path' => "/api/v1/comments/{commentID}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1CommentsByCommentID" },
  { 'method' => "GET", 'path' => "/api/v1/engines", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1Engines" },
  { 'method' => "GET", 'path' => "/api/v1/github/accounts", 'tag' => "deploy", 'operationId' => "deployGetApiV1GithubAccounts" },
  { 'method' => "GET", 'path' => "/api/v1/github/installations/{installationID}/repositories", 'tag' => "deploy", 'operationId' => "deployGetApiV1GithubInstallationsByInstallationIDRepositories" },
  { 'method' => "GET", 'path' => "/api/v1/invite-links/{token}", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1InviteLinksByToken" },
  { 'method' => "POST", 'path' => "/api/v1/invite-links/{token}/accept", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1InviteLinksByTokenAccept" },
  { 'method' => "GET", 'path' => "/api/v1/me", 'tag' => "Auth", 'operationId' => "authGetApiV1Me" },
  { 'method' => "GET", 'path' => "/api/v1/me/apps/owned", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsOwned" },
  { 'method' => "GET", 'path' => "/api/v1/me/apps/received", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsReceived" },
  { 'method' => "GET", 'path' => "/api/v1/me/apps/workspace", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsWorkspace" },
  { 'method' => "POST", 'path' => "/api/v1/me/invitations/{invitationID}/accept", 'tag' => "Auth", 'operationId' => "authPostApiV1MeInvitationsByInvitationIDAccept" },
  { 'method' => "GET", 'path' => "/api/v1/me/personal-access-tokens", 'tag' => "Schema", 'operationId' => "schemaGetApiV1MePersonalAccessTokens" },
  { 'method' => "POST", 'path' => "/api/v1/me/personal-access-tokens", 'tag' => "Schema", 'operationId' => "schemaPostApiV1MePersonalAccessTokens" },
  { 'method' => "DELETE", 'path' => "/api/v1/me/personal-access-tokens/{patID}", 'tag' => "Schema", 'operationId' => "schemaDeleteApiV1MePersonalAccessTokensByPatID" },
  { 'method' => "GET", 'path' => "/api/v1/oauth-clients/{clientID}", 'tag' => "Auth", 'operationId' => "authGetApiV1OauthClientsByClientID" },
  { 'method' => "DELETE", 'path' => "/api/v1/oauth/clients/{clientID}/grants/me", 'tag' => "Auth", 'operationId' => "authDeleteApiV1OauthClientsByClientIDGrantsMe" },
  { 'method' => "GET", 'path' => "/api/v1/review-requests/{rrID}", 'tag' => "Apps", 'operationId' => "appsGetApiV1ReviewRequestsByRrID" },
  { 'method' => "POST", 'path' => "/api/v1/review-requests/{rrID}/approve", 'tag' => "Apps", 'operationId' => "appsPostApiV1ReviewRequestsByRrIDApprove" },
  { 'method' => "POST", 'path' => "/api/v1/review-requests/{rrID}/reject", 'tag' => "Apps", 'operationId' => "appsPostApiV1ReviewRequestsByRrIDReject" },
  { 'method' => "GET", 'path' => "/api/v1/review-requests/history", 'tag' => "Apps", 'operationId' => "appsGetApiV1ReviewRequestsHistory" },
  { 'method' => "GET", 'path' => "/api/v1/review-requests/pending", 'tag' => "Apps", 'operationId' => "appsGetApiV1ReviewRequestsPending" },
  { 'method' => "GET", 'path' => "/api/v1/templates", 'tag' => "Apps", 'operationId' => "appsGetApiV1Templates" },
  { 'method' => "GET", 'path' => "/api/v1/tenants", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1Tenants" },
  { 'method' => "POST", 'path' => "/api/v1/tenants", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1Tenants" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}", 'tag' => "Tenants", 'operationId' => "tenantsDeleteApiV1TenantsByTenantID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1TenantsByTenantID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}", 'tag' => "Tenants", 'operationId' => "tenantsPatchApiV1TenantsByTenantID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/app-bootstraps", 'tag' => "Deploy", 'operationId' => "deployPostApiV1TenantsByTenantIDAppBootstraps" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/app-bootstraps/{bootstrapID}", 'tag' => "Deploy", 'operationId' => "deployGetApiV1TenantsByTenantIDAppBootstrapsByBootstrapID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/apps", 'tag' => "Apps", 'operationId' => "appsGetApiV1TenantsByTenantIDApps" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/apps", 'tag' => "Apps", 'operationId' => "appsPostApiV1TenantsByTenantIDApps" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/apps/check-availability", 'tag' => "Apps", 'operationId' => "appsGetApiV1TenantsByTenantIDAppsCheckAvailability" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/apps/icon/upload-url", 'tag' => "Apps", 'operationId' => "appsPostApiV1TenantsByTenantIDAppsIconUploadUrl" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/audit-events", 'tag' => "Audit", 'operationId' => "auditGetApiV1TenantsByTenantIDAuditEvents" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/audit-events/{eventID}", 'tag' => "Audit", 'operationId' => "auditGetApiV1TenantsByTenantIDAuditEventsByEventID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/audit-events/anonymize", 'tag' => "Audit", 'operationId' => "auditPostApiV1TenantsByTenantIDAuditEventsAnonymize" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/audit-events/integrity-check", 'tag' => "Audit", 'operationId' => "auditGetApiV1TenantsByTenantIDAuditEventsIntegrityCheck" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/catalog/connectors", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDCatalogConnectors" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/catalog/resources", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDCatalogResources" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/catalog/resources/{connector}/{path}", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDCatalogResourcesByConnectorByPath" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/catalog/resources/{connector}/{path}", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDCatalogResourcesByConnectorByPath" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/categories", 'tag' => "Apps", 'operationId' => "appsGetApiV1TenantsByTenantIDCategories" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/categories", 'tag' => "Apps", 'operationId' => "appsPostApiV1TenantsByTenantIDCategories" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/categories/{categoryID}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1TenantsByTenantIDCategoriesByCategoryID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/categories/{categoryID}", 'tag' => "Apps", 'operationId' => "appsGetApiV1TenantsByTenantIDCategoriesByCategoryID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/categories/{categoryID}", 'tag' => "Apps", 'operationId' => "appsPatchApiV1TenantsByTenantIDCategoriesByCategoryID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/connectors", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDConnectors" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/connectors", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDConnectors" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/connectors/{connectorID}", 'tag' => "Gateway", 'operationId' => "gatewayDeleteApiV1TenantsByTenantIDConnectorsByConnectorID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/connectors/{connectorID}", 'tag' => "Gateway", 'operationId' => "gatewayPatchApiV1TenantsByTenantIDConnectorsByConnectorID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/connectors/{connectorID}/credentials", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDConnectorsByConnectorIDCredentials" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/connectors/{connectorID}/discover", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDConnectorsByConnectorIDDiscover" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/cost/by-app", 'tag' => "Cost", 'operationId' => "costGetApiV1TenantsByTenantIDCostByApp" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/cost/by-cost-center", 'tag' => "Cost", 'operationId' => "costGetApiV1TenantsByTenantIDCostByCostCenter" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/cost/export", 'tag' => "Cost", 'operationId' => "costGetApiV1TenantsByTenantIDCostExport" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/cost/summary", 'tag' => "Cost", 'operationId' => "costGetApiV1TenantsByTenantIDCostSummary" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/cost/timeseries", 'tag' => "Cost", 'operationId' => "costGetApiV1TenantsByTenantIDCostTimeseries" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/discover/apps", 'tag' => "Apps", 'operationId' => "appsGetApiV1TenantsByTenantIDDiscoverApps" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/email-domains", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1TenantsByTenantIDEmailDomains" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/email-domains", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDEmailDomains" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/email-domains/{domain}", 'tag' => "Tenants", 'operationId' => "tenantsDeleteApiV1TenantsByTenantIDEmailDomainsByDomain" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/gateway/query", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDGatewayQuery" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/grants", 'tag' => "Authorization", 'operationId' => "authorizationGetApiV1TenantsByTenantIDGrants" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/grants/{grantID}/grant", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDGrantsByGrantIDGrant" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/grants/{grantID}/revoke", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDGrantsByGrantIDRevoke" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/icon", 'tag' => "Tenants", 'operationId' => "tenantsDeleteApiV1TenantsByTenantIDIcon" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/icon/upload-url", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDIconUploadUrl" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/identity-providers", 'tag' => "Auth", 'operationId' => "authGetApiV1TenantsByTenantIDIdentityProviders" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/identity-providers", 'tag' => "Auth", 'operationId' => "authPostApiV1TenantsByTenantIDIdentityProviders" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/identity-providers/{providerID}/disable", 'tag' => "Auth", 'operationId' => "authPostApiV1TenantsByTenantIDIdentityProvidersByProviderIDDisable" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/identity-providers/{providerID}/enable", 'tag' => "Auth", 'operationId' => "authPostApiV1TenantsByTenantIDIdentityProvidersByProviderIDEnable" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/invitations", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1TenantsByTenantIDInvitations" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/invitations", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDInvitations" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/invitations/{invitationID}", 'tag' => "Tenants", 'operationId' => "tenantsDeleteApiV1TenantsByTenantIDInvitationsByInvitationID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/invitations/bulk", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDInvitationsBulk" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/invite-links", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1TenantsByTenantIDInviteLinks" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/invite-links", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDInviteLinks" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/invite-links/{linkID}", 'tag' => "Tenants", 'operationId' => "tenantsDeleteApiV1TenantsByTenantIDInviteLinksByLinkID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/members", 'tag' => "Tenants", 'operationId' => "tenantsGetApiV1TenantsByTenantIDMembers" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/members/{membershipID}", 'tag' => "Tenants", 'operationId' => "tenantsPatchApiV1TenantsByTenantIDMembersByMembershipID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/members/{membershipID}/deactivate", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDMembersByMembershipIDDeactivate" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/members/{membershipID}/reactivate", 'tag' => "Tenants", 'operationId' => "tenantsPostApiV1TenantsByTenantIDMembersByMembershipIDReactivate" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/resources", 'tag' => "Gateway", 'operationId' => "gatewayGetApiV1TenantsByTenantIDResources" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/resources/{resourceID}", 'tag' => "Gateway", 'operationId' => "gatewayDeleteApiV1TenantsByTenantIDResourcesByResourceID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/resources/{resourceID}", 'tag' => "Gateway", 'operationId' => "gatewayPatchApiV1TenantsByTenantIDResourcesByResourceID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/resources/{resourceID}/move", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDResourcesByResourceIDMove" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/resources/{resourceID}/tags", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDResourcesByResourceIDTags" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/resources/{resourceID}/tags/{tagID}", 'tag' => "Gateway", 'operationId' => "gatewayDeleteApiV1TenantsByTenantIDResourcesByResourceIDTagsByTagID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/resources/bulk", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDResourcesBulk" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/resources/namespaces", 'tag' => "Gateway", 'operationId' => "gatewayPostApiV1TenantsByTenantIDResourcesNamespaces" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/subjects", 'tag' => "Authorization", 'operationId' => "authorizationGetApiV1TenantsByTenantIDSubjects" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/subjects", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDSubjects" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/subjects/{subjectID}", 'tag' => "Authorization", 'operationId' => "authorizationDeleteApiV1TenantsByTenantIDSubjectsBySubjectID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/subjects/{subjectID}", 'tag' => "Authorization", 'operationId' => "authorizationPatchApiV1TenantsByTenantIDSubjectsBySubjectID" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/subjects/{subjectID}/move", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDSubjectsBySubjectIDMove" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/subjects/{subjectID}/tags", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDSubjectsBySubjectIDTags" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/subjects/{subjectID}/tags/{tagID}", 'tag' => "Authorization", 'operationId' => "authorizationDeleteApiV1TenantsByTenantIDSubjectsBySubjectIDTagsByTagID" },
  { 'method' => "GET", 'path' => "/api/v1/tenants/{tenantID}/tags", 'tag' => "Authorization", 'operationId' => "authorizationGetApiV1TenantsByTenantIDTags" },
  { 'method' => "POST", 'path' => "/api/v1/tenants/{tenantID}/tags", 'tag' => "Authorization", 'operationId' => "authorizationPostApiV1TenantsByTenantIDTags" },
  { 'method' => "DELETE", 'path' => "/api/v1/tenants/{tenantID}/tags/{tagID}", 'tag' => "Authorization", 'operationId' => "authorizationDeleteApiV1TenantsByTenantIDTagsByTagID" },
  { 'method' => "PATCH", 'path' => "/api/v1/tenants/{tenantID}/tags/{tagID}", 'tag' => "Authorization", 'operationId' => "authorizationPatchApiV1TenantsByTenantIDTagsByTagID" },
  { 'method' => "GET", 'path' => "/api/v1/users/me/apps", 'tag' => "Apps", 'operationId' => "appsGetApiV1UsersMeApps" },
  { 'method' => "GET", 'path' => "/auth/{providerID}/start", 'tag' => "Auth", 'operationId' => "authGetAuthByProviderIDStart" },
  { 'method' => "GET", 'path' => "/auth/github", 'tag' => "identity", 'operationId' => "identityGetAuthGithub" },
  { 'method' => "GET", 'path' => "/auth/github/callback", 'tag' => "identity", 'operationId' => "identityGetAuthGithubCallback" },
  { 'method' => "GET", 'path' => "/auth/google_oauth2/callback", 'tag' => "Auth", 'operationId' => "authGetAuthGoogleOauth2Callback" },
  { 'method' => "GET", 'path' => "/auth/google_oauth2/start", 'tag' => "Auth", 'operationId' => "authGetAuthGoogleOauth2Start" },
  { 'method' => "POST", 'path' => "/auth/logout", 'tag' => "Auth", 'operationId' => "authPostAuthLogout" },
  { 'method' => "GET", 'path' => "/auth/oidc/callback", 'tag' => "Auth", 'operationId' => "authGetAuthOidcCallback" },
  { 'method' => "GET", 'path' => "/auth/providers", 'tag' => "Auth", 'operationId' => "authGetAuthProviders" },
  { 'method' => "POST", 'path' => "/auth/refresh", 'tag' => "Auth", 'operationId' => "authPostAuthRefresh" },
  { 'method' => "GET", 'path' => "/auth/silent/callback", 'tag' => "Auth", 'operationId' => "authGetAuthSilentCallback" },
  { 'method' => "GET", 'path' => "/auth/silent/start", 'tag' => "Auth", 'operationId' => "authGetAuthSilentStart" },
  { 'method' => "GET", 'path' => "/config/public", 'tag' => "Config", 'operationId' => "configGetConfigPublic" },
  { 'method' => "GET", 'path' => "/data/{tenantSlug}/{appSlug}/{table}", 'tag' => "Schema", 'operationId' => "schemaGetDataByTenantSlugByAppSlugByTable" },
  { 'method' => "POST", 'path' => "/data/{tenantSlug}/{appSlug}/{table}", 'tag' => "Schema", 'operationId' => "schemaPostDataByTenantSlugByAppSlugByTable" },
  { 'method' => "GET", 'path' => "/data/{tenantSlug}/{appSlug}/{table}/_count", 'tag' => "Schema", 'operationId' => "schemaGetDataByTenantSlugByAppSlugByTableCount" },
  { 'method' => "DELETE", 'path' => "/data/{tenantSlug}/{appSlug}/{table}/{id}", 'tag' => "Schema", 'operationId' => "schemaDeleteDataByTenantSlugByAppSlugByTableById" },
  { 'method' => "GET", 'path' => "/data/{tenantSlug}/{appSlug}/{table}/{id}", 'tag' => "Schema", 'operationId' => "schemaGetDataByTenantSlugByAppSlugByTableById" },
  { 'method' => "PATCH", 'path' => "/data/{tenantSlug}/{appSlug}/{table}/{id}", 'tag' => "Schema", 'operationId' => "schemaPatchDataByTenantSlugByAppSlugByTableById" },
  { 'method' => "GET", 'path' => "/internal/app-access", 'tag' => "Apps", 'operationId' => "appsGetInternalAppAccess" },
  { 'method' => "GET", 'path' => "/oauth/authorize", 'tag' => "Auth", 'operationId' => "authGetOauthAuthorize" },
  { 'method' => "POST", 'path' => "/oauth/authorize/tenant", 'tag' => "Auth", 'operationId' => "authPostOauthAuthorizeTenant" },
  { 'method' => "POST", 'path' => "/oauth/device_authorization", 'tag' => "Auth", 'operationId' => "authPostOauthDeviceAuthorization" },
  { 'method' => "POST", 'path' => "/oauth/device/authorize", 'tag' => "Auth", 'operationId' => "authPostOauthDeviceAuthorize" },
  { 'method' => "GET", 'path' => "/oauth/device/lookup", 'tag' => "Auth", 'operationId' => "authGetOauthDeviceLookup" },
  { 'method' => "POST", 'path' => "/oauth/register", 'tag' => "Auth", 'operationId' => "authPostOauthRegister" },
  { 'method' => "POST", 'path' => "/oauth/revoke", 'tag' => "Auth", 'operationId' => "authPostOauthRevoke" },
  { 'method' => "POST", 'path' => "/oauth/token", 'tag' => "Auth", 'operationId' => "authPostOauthToken" },
  { 'method' => "GET", 'path' => "/oauth/userinfo", 'tag' => "Auth", 'operationId' => "authGetOauthUserinfo" },
  { 'method' => "POST", 'path' => "/webhooks/github", 'tag' => "Deploy", 'operationId' => "deployPostWebhooksGithub" },
].freeze
ERROR_CODES =
{
  "already_accessed" => ErrorInfo.new("conflict", 409, false),
  "already_active" => ErrorInfo.new("conflict", 409, false),
  "already_deleted" => ErrorInfo.new("conflict", 409, false),
  "already_exists" => ErrorInfo.new("conflict", 409, false),
  "already_inactive" => ErrorInfo.new("conflict", 409, false),
  "already_member" => ErrorInfo.new("conflict", 409, false),
  "already_revoked" => ErrorInfo.new("conflict", 409, false),
  "already_settled" => ErrorInfo.new("conflict", 409, false),
  "already_suspended" => ErrorInfo.new("conflict", 409, false),
  "app_unavailable" => ErrorInfo.new("conflict", 409, false),
  "bad_request" => ErrorInfo.new("validation", 400, false),
  "cannot_reactivate" => ErrorInfo.new("conflict", 409, false),
  "conflict" => ErrorInfo.new("conflict", 409, false),
  "cross_tenant" => ErrorInfo.new("validation", 400, false),
  "domain_blocked" => ErrorInfo.new("precondition_failed", 422, false),
  "domain_taken" => ErrorInfo.new("conflict", 409, false),
  "duplicate" => ErrorInfo.new("validation", 400, false),
  "empty" => ErrorInfo.new("validation", 400, false),
  "forbidden" => ErrorInfo.new("permission_denied", 403, false),
  "internal_error" => ErrorInfo.new("internal", 500, false),
  "invalid_expiry" => ErrorInfo.new("validation", 400, false),
  "invalid_format" => ErrorInfo.new("validation", 400, false),
  "invalid_state_transition" => ErrorInfo.new("conflict", 409, false),
  "invalid_value" => ErrorInfo.new("validation", 400, false),
  "invitation_expired" => ErrorInfo.new("not_found", 410, false),
  "last_admin" => ErrorInfo.new("conflict", 409, false),
  "not_admin" => ErrorInfo.new("permission_denied", 403, false),
  "not_allowed" => ErrorInfo.new("validation", 400, false),
  "not_deleted" => ErrorInfo.new("conflict", 409, false),
  "not_found" => ErrorInfo.new("not_found", 404, false),
  "not_member" => ErrorInfo.new("permission_denied", 403, false),
  "not_suspended" => ErrorInfo.new("conflict", 409, false),
  "pending_exists" => ErrorInfo.new("conflict", 409, false),
  "permanently_deleted" => ErrorInfo.new("not_found", 410, false),
  "precondition_failed" => ErrorInfo.new("precondition_failed", 412, false),
  "required" => ErrorInfo.new("validation", 400, false),
  "schema_name_taken" => ErrorInfo.new("conflict", 409, false),
  "slug_taken" => ErrorInfo.new("conflict", 409, false),
  "temporarily_unavailable" => ErrorInfo.new("unavailable", 429, true),
  "token_expired" => ErrorInfo.new("unauthenticated", 401, true),
  "token_invalid" => ErrorInfo.new("unauthenticated", 401, true),
  "token_missing" => ErrorInfo.new("unauthenticated", 401, true),
  "too_long" => ErrorInfo.new("validation", 400, false),
}.freeze
ROUTE_BY_OP =
ROUTES.map { |r| [r['operationId'], r] }.to_h
FORM_ENCODED_OPERATIONS =
%w[
  authPostOauthDeviceAuthorization
  authPostOauthRevoke
  authPostOauthToken
].freeze
CONTEXT_ROUTES =
%w[apps identity tenants authz audit gateway cost data deployments].map { |name| [name, ROUTES.select { |route| context_name(route) == name }] }.to_h
VERSION =
'0.2.0'
OPERATION_METHODS =
ROUTES.map do |route|
  { 'operationId' => route['operationId'], 'context' => context_name(route), 'snake' => operation_method_name(route['operationId']) }
end

Class Method Summary collapse

Class Method Details

.camel(key) ⇒ Object



257
258
259
# File 'lib/axhub_sdk.rb', line 257

def self.camel(key)
  parts = key.to_s.split('_'); parts.first + parts.drop(1).map { |p| p[0].upcase + p[1..-1].to_s }.join
end

.camelize(value) ⇒ Object



260
261
262
263
264
265
266
# File 'lib/axhub_sdk.rb', line 260

def self.camelize(value)
  case value
  when Hash then value.map { |k, v| [camel(k), camelize(v)] }.to_h
  when Array then value.map { |v| camelize(v) }
  else value
  end
end

.context_name(route) ⇒ Object

Raises:

  • (ArgumentError)


338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/axhub_sdk.rb', line 338

def self.context_name(route)
  tag = route['tag']
  return 'apps' if tag == 'Apps'
  return 'identity' if ['Auth', 'identity'].include?(tag)
  return 'tenants' if tag == 'Tenants'
  return 'authz' if tag == 'Authorization'
  return 'audit' if tag == 'Audit'
  return 'gateway' if ['Gateway', 'Config'].include?(tag)
  return 'cost' if tag == 'Cost'
  return 'data' if tag == 'Schema'
  return 'deployments' if ['Deploy', 'deploy'].include?(tag)
  raise ArgumentError, "unmapped route tag: #{tag}"
end

.install_operation_methodsObject



34
35
36
37
38
39
40
41
# File 'lib/axhub_sdk/operations.rb', line 34

def self.install_operation_methods
  OPERATION_METHODS.each do |item|
    target = item['context'] == 'apps' ? AppsClient : OperationClient
    target.define_method(item['snake']) do |path_params: {}, query: {}, body: nil|
      @client.request(item['operationId'], path_params: path_params, query: query, body: body)
    end
  end
end

.operation_method_name(operation_id) ⇒ Object



4
5
6
# File 'lib/axhub_sdk/operations.rb', line 4

def self.operation_method_name(operation_id)
  operation_id.gsub(/(.)([A-Z][a-z]+)/, '\\1_\\2').gsub(/([a-z0-9])([A-Z])/, '\\1_\\2').downcase
end