UNPKG

atlas-app-services-admin-api

Version:
1,785 lines (1,760 loc) 1.31 MB
/* tslint:disable */ /* eslint-disable */ /** * MongoDB Atlas App Services Admin API * The App Services Admin API lets you programmatically perform administrative tasks over HTTPS. This includes defining & configuring things like: - App Deployment & Security - APIs & Endpoints - Authentication & User Management - Data Sources - Device Sync - Environments - Functions - Logs - Rules - Schemas - Static Hosting - Triggers - Usage & Billing Metrics - Values & Secrets The Admin API is for application development, configuration, and deployment. To actually use the features you configure with the Admin API, client applications connect with a [Realm SDK](https://mongodb.com/docs/realm/) or over an HTTPS API specific to your App. ## Project & Application IDs **Note**: The terms _Project ID_ and _Group ID_ are interchangeable. Atlas App Services Admin API endpoints frequently require you to include two parameters in the URL: - Your Atlas _Project ID_ (also sometimes called a _Group ID_) - Your App Services _Application ID_ ### Project ID You can find your Project ID from the MongoDB Atlas dashboard or with the MongoDB Atlas CLI. ### Application ID To find an Application ID, make a request to the [List Apps](#operation/adminListApplications) endpoint for your project. You\'ll need an `access_token` to make this request. To learn how to get one, see [Get an Admin API Session Access Token](#get-an-admin-api-session-access-token). ```sh curl --request GET \\ --header \'Authorization: Bearer <access_token>\' \\ https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps ``` This will return a list of objects describing each App Services App in the provided project/group. For Admin API requests, your Application ID is the ObjectId value in the `_id` field, _not_ the `client_app_id`. ```json [ { \"_id\": \"5997529e46224c6e42gb6dd9\", \"group_id\": \"57879f6cc4b32dbe440bb8c5\", \"domain_id\": \"5886619e46124e4c42fb5dd8\", \"client_app_id\": \"myapp-abcde\", \"name\": \"myapp\", \"location\": \"US-VA\", \"deployment_model\": \"GLOBAL\", \"last_used\": 1615153544, \"last_modified\": 0, \"product\": \"standard\", \"environment\": \"\" } ] ``` ## Get an Admin API Session Access Token Every request to the App Services Admin API must include a valid, unexpired access token issued by the MongoDB Cloud API. You include this token in the `Authorization` header of each request using the bearer auth scheme. You need a valid [MongoDB Atlas programmatic API key](https://docs.atlas.mongodb.com/configure-api-access) for MongoDB Atlas to get a token. Once you have an API key pair, call the authentication endpoint: ```shell curl --request POST \\ --header \'Content-Type: application/json\' \\ --header \'Accept: application/json\' \\ --data \'{\"username\": \"<Public API Key>\", \"apiKey\": \"<Private API Key>\"}\' \\ https://realm.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login ``` If authentication succeeds, App Services returns an access token as part of the JSON response document: ```json { \"access_token\": \"<access_token>\", \"refresh_token\": \"<refresh_token>\", \"user_id\": \"<user_id>\", \"device_id\": \"<device_id>\" } ``` The `access_token` represents a limited-time authorization to interact with the Admin API. To authenticate a request, include the token in a [Bearer token](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) `Authorization` header. ```http Authorization: Bearer <access_token> ``` ## Refresh an Admin API Session Access Token Session access tokens expire 30 minutes after they are issued. When you login, the response also includes a `refresh_token` that you can use to get a new access token. This is useful because you only need to log in with credentials one time. After that you can use the refresh token to re-authenticate for as long as its valid. Refresh tokens expire 60 days after being issued. To refresh your authentication and get a new `access_token`, call the auth session endpoint with your `refresh_token` in the `Authorization` header: ```shell curl --request POST \\ --header \'Authorization: Bearer <refresh_token>\' \\ https://realm.mongodb.com/api/admin/v3.0/auth/session ``` If the refresh token is valid, the response body includes a new `access_token` that\'s valid for the next 30 minutes: ```json { \"access_token\": \"<access_token>\" } ``` * * The version of the OpenAPI document: 3.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * * @export * @interface AdminAppMeasurements200Response */ export interface AdminAppMeasurements200Response { /** * The RFC 3339 date and time of the start of the query period, which can be specified with the `start` query parameter. * @type {any} * @memberof AdminAppMeasurements200Response */ 'start'?: any; /** * The RFC 3339 date and time of the end of the query period, which can be specified with the `end` query parameter. * @type {any} * @memberof AdminAppMeasurements200Response */ 'end'?: any; /** * The granularity, which can be specified with the `granularity` query parameter. * @type {any} * @memberof AdminAppMeasurements200Response */ 'granularity'?: any; /** * The Atlas [Group ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/). * @type {any} * @memberof AdminAppMeasurements200Response */ 'group_id'?: any; /** * The Atlas App Services App ID specified by the `appId` path parameter. * @type {any} * @memberof AdminAppMeasurements200Response */ 'appId'?: any; /** * The name of the Atlas App Services App specified by the `appId` path parameter. * @type {any} * @memberof AdminAppMeasurements200Response */ 'appName'?: any; /** * The array of measurements. * @type {any} * @memberof AdminAppMeasurements200Response */ 'measurements'?: any; } /** * * @export * @interface AdminCreateASecretRequest */ export interface AdminCreateASecretRequest { /** * * @type {any} * @memberof AdminCreateASecretRequest */ 'name': any; /** * * @type {any} * @memberof AdminCreateASecretRequest */ 'value': any; } /** * * @export * @interface AdminCreateApiKeyRequest */ export interface AdminCreateApiKeyRequest { /** * * @type {any} * @memberof AdminCreateApiKeyRequest */ 'name': any; } /** * * @export * @interface AdminCreateFunction201Response */ export interface AdminCreateFunction201Response { /** * Unique identifier for the function. * @type {any} * @memberof AdminCreateFunction201Response */ '_id'?: any; /** * Name for the function specified in the `name` field of the request. * @type {any} * @memberof AdminCreateFunction201Response */ 'name'?: any; } /** * * @export * @interface AdminCreateRule201Response */ export interface AdminCreateRule201Response { /** * * @type {any} * @memberof AdminCreateRule201Response */ '_id'?: any; /** * * @type {any} * @memberof AdminCreateRule201Response */ 'name'?: any; } /** * * @export * @interface AdminCreateSchema200Response */ export interface AdminCreateSchema200Response { /** * * @type {any} * @memberof AdminCreateSchema200Response */ '_id'?: any; /** * * @type {SchemaMetadata} * @memberof AdminCreateSchema200Response */ 'metadata'?: SchemaMetadata; } /** * * @export * @interface AdminCreateSchemaRequest */ export interface AdminCreateSchemaRequest { /** * * @type {any} * @memberof AdminCreateSchemaRequest */ '_id'?: any; /** * A valid [schema](https://www.mongodb.com/docs/realm/schemas) for the collection. * @type {any} * @memberof AdminCreateSchemaRequest */ 'schema': any; /** * * @type {SchemaMetadata} * @memberof AdminCreateSchemaRequest */ 'metadata': SchemaMetadata; } /** * * @export * @interface AdminCreateSession201Response */ export interface AdminCreateSession201Response { /** * * @type {any} * @memberof AdminCreateSession201Response */ 'access_token'?: any; } /** * * @export * @interface AdminCreateUserRequest */ export interface AdminCreateUserRequest { /** * * @type {any} * @memberof AdminCreateUserRequest */ 'email': any; /** * * @type {any} * @memberof AdminCreateUserRequest */ 'password': any; } /** * * @export * @interface AdminDeployDraftRequest */ export interface AdminDeployDraftRequest { /** * The name of the deployment. To deploy a draft without a name, use an empty string. * @type {any} * @memberof AdminDeployDraftRequest */ 'name': any; } /** * * @export * @interface AdminEnableDisableHostingRequest */ export interface AdminEnableDisableHostingRequest { /** * Set to `true` to enable App Services Hosting. Set to `false` to disable App Services Hosting. * @type {any} * @memberof AdminEnableDisableHostingRequest */ 'enabled'?: any; } /** * * @export * @interface AdminExecuteFunction200Response */ export interface AdminExecuteFunction200Response { /** * * @type {any} * @memberof AdminExecuteFunction200Response */ 'error'?: any; /** * * @type {any} * @memberof AdminExecuteFunction200Response */ 'logs'?: any; /** * * @type {any} * @memberof AdminExecuteFunction200Response */ 'result'?: any; /** * * @type {AdminExecuteFunction200ResponseStats} * @memberof AdminExecuteFunction200Response */ 'stats'?: AdminExecuteFunction200ResponseStats; } /** * * @export * @interface AdminExecuteFunction200ResponseStats */ export interface AdminExecuteFunction200ResponseStats { /** * * @type {any} * @memberof AdminExecuteFunction200ResponseStats */ 'execution_time'?: any; } /** * * @export * @interface AdminExecuteFunctionRequest */ export interface AdminExecuteFunctionRequest { /** * The service to use when calling this function. * @type {any} * @memberof AdminExecuteFunctionRequest */ 'service'?: any; /** * The name of the function you want to run. * @type {any} * @memberof AdminExecuteFunctionRequest */ 'name': any; /** * Any arguments that your function needs. * @type {any} * @memberof AdminExecuteFunctionRequest */ 'arguments'?: any; } /** * * @export * @interface AdminExecuteFunctionSourceRequest */ export interface AdminExecuteFunctionSourceRequest { /** * This JSON expression must evaluate to `true` before the function may run. If this field is blank, it will evaluate to `true`. * @type {any} * @memberof AdminExecuteFunctionSourceRequest */ 'eval_source'?: any; /** * * @type {any} * @memberof AdminExecuteFunctionSourceRequest */ 'source': any; } /** * * @export * @interface AdminGenerateSchema200Response */ export interface AdminGenerateSchema200Response { /** * The generated JSON schema * @type {any} * @memberof AdminGenerateSchema200Response */ 'schema'?: any; } /** * * @export * @interface AdminGenerateSchemaRequest */ export interface AdminGenerateSchemaRequest { /** * The name of the database that contains the collection. * @type {any} * @memberof AdminGenerateSchemaRequest */ 'database_name': any; /** * The name of the collection to sample and generate a schema for. * @type {any} * @memberof AdminGenerateSchemaRequest */ 'collection_name': any; /** * The maximum number of documents to include in the sample. * @type {any} * @memberof AdminGenerateSchemaRequest */ 'limit': any; } /** * * @export * @interface AdminGetHostedAsset404Response */ export interface AdminGetHostedAsset404Response { /** * * @type {any} * @memberof AdminGetHostedAsset404Response */ 'error'?: any; } /** * * @export * @interface AdminGetLatestEventSubscriptionExecution200Response */ export interface AdminGetLatestEventSubscriptionExecution200Response { /** * * @type {any} * @memberof AdminGetLatestEventSubscriptionExecution200Response */ 'data'?: any; /** * * @type {any} * @memberof AdminGetLatestEventSubscriptionExecution200Response */ 'resource_id'?: any; /** * The last time a batch was processed from the event stream. The value of `completed_at` should be relatively close to the current time. If `completed_at` is not updating over time, it might mean that the event processor (e.g. Device Sync) is down or stuck. * @type {any} * @memberof AdminGetLatestEventSubscriptionExecution200Response */ 'completed_at'?: any; /** * The time of the latest event in the most recently processed batch. If the value of `cluster_time` is significantly earlier than the `completed_at` time, the event processor (e.g. Device Sync) is lagging behind the event . * @type {any} * @memberof AdminGetLatestEventSubscriptionExecution200Response */ 'cluster_time'?: any; } /** * * @export * @interface AdminGetLogs200Response */ export interface AdminGetLogs200Response { /** * At most 100 results per request. * @type {any} * @memberof AdminGetLogs200Response */ 'logs'?: any; /** * The end date and time of the next page of log entries in ISO 8601 format. App Services paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses. To get the next page of up to 100 entries, pass this value as the `end_date` parameter in a subsequent request. * @type {any} * @memberof AdminGetLogs200Response */ 'nextEndDate': any; /** * The offset into the next page of log entries in ISO 8601 format. MongoDB App Services paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses where the first entry on the next page has the same timestamp as the last entry on this page. To get the next page of up to 100 entries, pass this value, if it is present, as the `skip` parameter in a subsequent request. * @type {any} * @memberof AdminGetLogs200Response */ 'nextSkip': any; } /** * * @export * @interface AdminGetMetrics200Response */ export interface AdminGetMetrics200Response { /** * The list of metrics. * @type {any} * @memberof AdminGetMetrics200Response */ 'measurements': any; /** * The app ID sent in the request. * @type {any} * @memberof AdminGetMetrics200Response */ 'app_id': any; /** * The app\'s human-readable name. * @type {any} * @memberof AdminGetMetrics200Response */ 'app_name': any; /** * The group ID sent in the request. * @type {any} * @memberof AdminGetMetrics200Response */ 'group_id': any; /** * The date and time (ISO-8601 format) of the earliest requested measurement. * @type {any} * @memberof AdminGetMetrics200Response */ 'start': any; /** * The date and time (ISO-8601 format) of the latest requested measurement. * @type {any} * @memberof AdminGetMetrics200Response */ 'end': any; /** * The requested granularity of the metrics in [ISO-8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). * @type {any} * @memberof AdminGetMetrics200Response */ 'granularity': any; } /** * * @export * @interface AdminGetSchema200Response */ export interface AdminGetSchema200Response { /** * * @type {any} * @memberof AdminGetSchema200Response */ '_id'?: any; /** * * @type {any} * @memberof AdminGetSchema200Response */ 'schema'?: any; } /** * * @export * @interface AdminLogin200Response */ export interface AdminLogin200Response { /** * An access token you may provide in the `Authorization` header of API requests. [The App Services API Authentication section](#section/Get-Authentication-Tokens) demonstrates how to use this token. * @type {any} * @memberof AdminLogin200Response */ 'access_token'?: any; /** * A refresh token you may provide in the `Authorization` header of [POST auth/session](#section/adminCreateSession) to obtain a new `access_token` for the current user session. * @type {any} * @memberof AdminLogin200Response */ 'refresh_token'?: any; /** * The unique `_id` value of the MongoDB Cloud user. * @type {any} * @memberof AdminLogin200Response */ 'user_id'?: any; /** * * @type {any} * @memberof AdminLogin200Response */ 'device_id'?: any; } /** * * @export * @interface AdminLoginRequest */ export interface AdminLoginRequest { /** * * @type {any} * @memberof AdminLoginRequest */ 'username': any; /** * * @type {any} * @memberof AdminLoginRequest */ 'apiKey': any; } /** * * @export * @interface AdminMeasurements200Response */ export interface AdminMeasurements200Response { /** * The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the start of the query period, which can be specified with the `start` query parameter. * @type {any} * @memberof AdminMeasurements200Response */ 'start'?: any; /** * The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the end of the query period, which can be specified with the `end` query parameter. * @type {any} * @memberof AdminMeasurements200Response */ 'end'?: any; /** * The granularity, which can be specified with the `granularity` query parameter. * @type {any} * @memberof AdminMeasurements200Response */ 'granularity'?: any; /** * The Atlas [Group ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/). * @type {any} * @memberof AdminMeasurements200Response */ 'group_id'?: any; /** * The array of measurements. * @type {any} * @memberof AdminMeasurements200Response */ 'measurements'?: any; } /** * * @export * @interface AdminModifyASecretRequest */ export interface AdminModifyASecretRequest { /** * * @type {any} * @memberof AdminModifyASecretRequest */ '_id'?: any; /** * * @type {any} * @memberof AdminModifyASecretRequest */ 'name': any; /** * * @type {any} * @memberof AdminModifyASecretRequest */ 'value': any; } /** * * @export * @interface AdminMoveCopyHostedAssetRequest */ export interface AdminMoveCopyHostedAssetRequest { /** * The current resource path of the asset to move. Must be used with `move_to`. * @type {any} * @memberof AdminMoveCopyHostedAssetRequest */ 'move_from'?: any; /** * The resource path to which the asset will move. Must be used with `move_from`. * @type {any} * @memberof AdminMoveCopyHostedAssetRequest */ 'move_to'?: any; /** * The current resource path of the asset to copy. Must be used with `copy_to`. * @type {any} * @memberof AdminMoveCopyHostedAssetRequest */ 'copy_from'?: any; /** * The resource path to which the asset will be copied. Must be used with `copy_from`. * @type {any} * @memberof AdminMoveCopyHostedAssetRequest */ 'copy_to'?: any; } /** * * @export * @interface AdminResetUserEmailRequest */ export interface AdminResetUserEmailRequest { /** * The new email for the user. * @type {any} * @memberof AdminResetUserEmailRequest */ 'email': any; } /** * * @export * @interface AdminResumeTrigger404Response */ export interface AdminResumeTrigger404Response { /** * A description of the error that App Services encountered. * @type {any} * @memberof AdminResumeTrigger404Response */ 'error'?: any; } /** * * @export * @interface AdminResumeTriggerRequest */ export interface AdminResumeTriggerRequest { /** * If `true`, resumes the trigger without processing missed events. Otherwise, attempts to resume the trigger from the first change event after it failed by using a resume token. * @type {any} * @memberof AdminResumeTriggerRequest */ 'disable_token'?: any; } /** * The result of the specified operation. * @export * @interface AdminRunGraphQLOperation200Response */ export interface AdminRunGraphQLOperation200Response { /** * The result of a successful operation. If `null`, the operation had errors. * @type {any} * @memberof AdminRunGraphQLOperation200Response */ 'data': any; /** * A list of errors encountered while running an operation. * @type {any} * @memberof AdminRunGraphQLOperation200Response */ 'errors'?: any; } /** * * @export * @interface AdminRunGraphQLOperationRequest */ export interface AdminRunGraphQLOperationRequest { /** * A stringified `.graphql` file that contains one or more valid GraphQL operations for your API. If more than one operation is defined, you must specify which operation to run in `operationName`. * @type {any} * @memberof AdminRunGraphQLOperationRequest */ 'query': any; /** * A stringified JSON object where each field name maps a value to a variable in the specified operation. * @type {any} * @memberof AdminRunGraphQLOperationRequest */ 'variables'?: any; /** * The name of the GraphQL operation specified in `query` to run. * @type {any} * @memberof AdminRunGraphQLOperationRequest */ 'operationName'?: any; } /** * * @export * @interface AdminSetEnvironmentRequest */ export interface AdminSetEnvironmentRequest { /** * * @type {AppEnvironment} * @memberof AdminSetEnvironmentRequest */ 'environment'?: AppEnvironment; } /** * * @export * @interface AdminUpdateHostedAssetRequest */ export interface AdminUpdateHostedAssetRequest { /** * * @type {any} * @memberof AdminUpdateHostedAssetRequest */ 'attributes'?: any; } /** * * @export * @interface AdminUpdateSchemaRequest */ export interface AdminUpdateSchemaRequest { /** * * @type {any} * @memberof AdminUpdateSchemaRequest */ '_id'?: any; /** * A valid [schema](https://www.mongodb.com/docs/realm/schemas) for the collection. * @type {any} * @memberof AdminUpdateSchemaRequest */ 'schema': any; /** * Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a [relationship](https://www.mongodb.com/docs/realm/schemas/relationships/) definition for that field. * @type {{ [key: string]: Relationship; }} * @memberof AdminUpdateSchemaRequest */ 'relationships'?: { [key: string]: Relationship; }; /** * * @type {SchemaMetadata} * @memberof AdminUpdateSchemaRequest */ 'metadata'?: SchemaMetadata; } /** * * @export * @interface AdminUploadHostedAssetRequest */ export interface AdminUploadHostedAssetRequest { /** * An [asset metadata document](https://www.mongodb.com/docs/realm/admin/api/v3#std-label-asset-metadata-document) (encoded as JSON). * @type {AssetMetadata} * @memberof AdminUploadHostedAssetRequest */ 'meta'?: AssetMetadata; /** * The asset file to upload (encoded as binary). * @type {any} * @memberof AdminUploadHostedAssetRequest */ 'file'?: any; } /** * * @export * @interface AdminUser */ export interface AdminUser { /** * * @type {any} * @memberof AdminUser */ 'user_id'?: any; /** * * @type {any} * @memberof AdminUser */ 'domain_id'?: any; /** * * @type {any} * @memberof AdminUser */ 'identities'?: any; /** * * @type {AdminUserData} * @memberof AdminUser */ 'data'?: AdminUserData; /** * * @type {any} * @memberof AdminUser */ 'type'?: AdminUserTypeEnum; /** * * @type {any} * @memberof AdminUser */ 'roles'?: any; } export const AdminUserTypeEnum = { Normal: 'normal', Server: 'server', System: 'system', Unknown: 'unknown' } as const; export type AdminUserTypeEnum = typeof AdminUserTypeEnum[keyof typeof AdminUserTypeEnum]; /** * * @export * @interface AdminUserData */ export interface AdminUserData { /** * * @type {any} * @memberof AdminUserData */ 'email'?: any; /** * * @type {any} * @memberof AdminUserData */ 'name'?: any; } /** * * @export * @interface AdminValidateDocuments200Response */ export interface AdminValidateDocuments200Response { /** * * @type {any} * @memberof AdminValidateDocuments200Response */ 'errors'?: any; /** * The total number of documents that were sampled. * @type {any} * @memberof AdminValidateDocuments200Response */ 'total_processed_count'?: any; /** * The total number of documents that failed any validation. * @type {any} * @memberof AdminValidateDocuments200Response */ 'total_error_count'?: any; } /** * * @export * @interface AdminValidateDocumentsRequest */ export interface AdminValidateDocumentsRequest { /** * The name of the database that contains the collection to validate. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'database_name': any; /** * The name of the collection to validate. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'collection_name': any; /** * The EJSON schema to validate sampled documents against. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'from_schema': any; /** * A [MongoDB query](https://www.mongodb.com/docs/manual/tutorial/query-documents/) that matches documents in the collection. The result of running this query is the sample population. Use this to narrow the sample to a subset of documents in the collection. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'query'?: any; /** * The maximum number of documents to sample. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'limit'?: any; /** * A [MongoDB sort](https://www.mongodb.com/docs/manual/reference/method/cursor.sort/) for the collection. Use this to determine which end of a range query to start sampling from. * @type {any} * @memberof AdminValidateDocumentsRequest */ 'sort'?: any; } /** * * @export * @interface AdminVerifyUserAccessTokenRequest */ export interface AdminVerifyUserAccessTokenRequest { /** * * @type {any} * @memberof AdminVerifyUserAccessTokenRequest */ 'token': any; } /** * * @export * @interface AllowedIPAccessListCreate201Response */ export interface AllowedIPAccessListCreate201Response { /** * ObjectID * @type {any} * @memberof AllowedIPAccessListCreate201Response */ '_id'?: any; /** * * @type {any} * @memberof AllowedIPAccessListCreate201Response */ 'address'?: any; /** * net.IP * @type {any} * @memberof AllowedIPAccessListCreate201Response */ 'ip'?: any; /** * net.IPNet * @type {any} * @memberof AllowedIPAccessListCreate201Response */ 'network'?: any; /** * * @type {any} * @memberof AllowedIPAccessListCreate201Response */ 'comment'?: any; } /** * * @export * @interface AllowedIPAccessListCreateRequest */ export interface AllowedIPAccessListCreateRequest { /** * The value of the IP address or CIDR block. * @type {any} * @memberof AllowedIPAccessListCreateRequest */ 'address': any; /** * An optional comment included in the Access List entry. * @type {any} * @memberof AllowedIPAccessListCreateRequest */ 'comment'?: any; } /** * * @export * @interface AllowedIPAccessListUpdateRequest */ export interface AllowedIPAccessListUpdateRequest { /** * The modified value of the IP address or CIDR block. * @type {any} * @memberof AllowedIPAccessListUpdateRequest */ 'address': any; /** * An optional comment included in the Access List entry. * @type {any} * @memberof AllowedIPAccessListUpdateRequest */ 'comment'?: any; } /** * * @export * @interface ApiKey */ export interface ApiKey { /** * * @type {any} * @memberof ApiKey */ '_id'?: any; /** * * @type {any} * @memberof ApiKey */ 'key'?: any; /** * * @type {any} * @memberof ApiKey */ 'name'?: any; /** * * @type {any} * @memberof ApiKey */ 'disabled'?: any; } /** * * @export * @interface ApiKeyResponse */ export interface ApiKeyResponse { /** * * @type {any} * @memberof ApiKeyResponse */ '_id'?: any; /** * * @type {any} * @memberof ApiKeyResponse */ 'name'?: any; /** * * @type {any} * @memberof ApiKeyResponse */ 'disabled'?: any; } /** * * @export * @interface App */ export interface App { /** * The name of the application. Must begin with a letter and may only contain ASCII letters, numbers, underscores, and hyphens. * @type {any} * @memberof App */ 'name'?: any; /** * * @type {any} * @memberof App */ 'provider_region'?: any; /** * The application\'s physical deployment location. This should agree with the more specific `provider_region` value. For example, an App with a `provider_region` of `aws-us-west-2` maps to a `location` of `US-OR`. * @type {DeploymentLocation} * @memberof App */ 'location'?: DeploymentLocation; /** * * @type {DeploymentModel} * @memberof App */ 'deployment_model'?: DeploymentModel; /** * * @type {AppEnvironment} * @memberof App */ 'environment'?: AppEnvironment; } /** * * @export * @interface AppDeploymentSettings */ export interface AppDeploymentSettings { /** * * @type {DeploymentModel} * @memberof AppDeploymentSettings */ 'deployment_model'?: DeploymentModel; /** * * @type {any} * @memberof AppDeploymentSettings */ 'provider_region'?: any; } /** * The application\'s environment. An empty string indicates that the app does not have a specified environment. * @export * @interface AppEnvironment */ export interface AppEnvironment { } /** * * @export * @interface AssetMetadata */ export interface AssetMetadata { /** * The resource path of the asset * @type {any} * @memberof AssetMetadata */ 'path'?: any; /** * The size of the asset in bytes * @type {any} * @memberof AssetMetadata */ 'size'?: any; /** * An array of documents that each describe a [metadata attribute](https://www.mongodb.com/docs/realm/hosting/file-metadata-attributes) that applies to the asset. * @type {any} * @memberof AssetMetadata */ 'attrs'?: any; /** * The MD5 checksum hash for the asset * @type {any} * @memberof AssetMetadata */ 'hash'?: any; } /** * * @export * @interface AtlasCluster */ export interface AtlasCluster { /** * * @type {any} * @memberof AtlasCluster */ 'name'?: AtlasClusterNameEnum; /** * * @type {any} * @memberof AtlasCluster */ 'type'?: AtlasClusterTypeEnum; /** * * @type {AtlasClusterConfig} * @memberof AtlasCluster */ 'config'?: AtlasClusterConfig; } export const AtlasClusterNameEnum = { MongodbAtlas: 'mongodb-atlas' } as const; export type AtlasClusterNameEnum = typeof AtlasClusterNameEnum[keyof typeof AtlasClusterNameEnum]; export const AtlasClusterTypeEnum = { MongodbAtlas: 'mongodb-atlas' } as const; export type AtlasClusterTypeEnum = typeof AtlasClusterTypeEnum[keyof typeof AtlasClusterTypeEnum]; /** * * @export * @interface AtlasClusterConfig */ export interface AtlasClusterConfig { /** * The service name used to refer to the data source within this Atlas app. The name may be at most 64 characters long and must only contain ASCII letters, numbers, underscores, and hyphens. * @type {any} * @memberof AtlasClusterConfig */ 'clusterName': any; /** * The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/) mode for read requests to the data source. * @type {any} * @memberof AtlasClusterConfig */ 'readPreference'?: AtlasClusterConfigReadPreferenceEnum; /** * If true, clients may [connect to the app over the MongoDB Wire Protocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol). * @type {any} * @memberof AtlasClusterConfig */ 'wireProtocolEnabled'?: any; } export const AtlasClusterConfigReadPreferenceEnum = { Primary: 'primary', PrimaryPreferred: 'primaryPreferred', Secondary: 'secondary', SecondaryPreferred: 'secondaryPreferred', Nearest: 'nearest' } as const; export type AtlasClusterConfigReadPreferenceEnum = typeof AtlasClusterConfigReadPreferenceEnum[keyof typeof AtlasClusterConfigReadPreferenceEnum]; /** * * @export * @interface AtlasFederatedInstance */ export interface AtlasFederatedInstance { /** * * @type {any} * @memberof AtlasFederatedInstance */ 'name'?: AtlasFederatedInstanceNameEnum; /** * * @type {any} * @memberof AtlasFederatedInstance */ 'type'?: AtlasFederatedInstanceTypeEnum; /** * * @type {AtlasFederatedInstanceConfig} * @memberof AtlasFederatedInstance */ 'config'?: AtlasFederatedInstanceConfig; } export const AtlasFederatedInstanceNameEnum = { MongodbDatafederation: 'mongodb-datafederation' } as const; export type AtlasFederatedInstanceNameEnum = typeof AtlasFederatedInstanceNameEnum[keyof typeof AtlasFederatedInstanceNameEnum]; export const AtlasFederatedInstanceTypeEnum = { Datalake: 'datalake' } as const; export type AtlasFederatedInstanceTypeEnum = typeof AtlasFederatedInstanceTypeEnum[keyof typeof AtlasFederatedInstanceTypeEnum]; /** * * @export * @interface AtlasFederatedInstanceConfig */ export interface AtlasFederatedInstanceConfig { /** * The service name used to refer to the Federated database instance within this Atlas app. The name may be at most 64 characters long and must only contain ASCII letters, numbers, underscores, and hyphens. * @type {any} * @memberof AtlasFederatedInstanceConfig */ 'dataLakeName': any; } /** * * @export * @interface AwsDeploymentRegion */ export interface AwsDeploymentRegion { } /** * * @export * @interface AzureDeploymentRegion */ export interface AzureDeploymentRegion { } /** * * @export * @interface BaseAuthProvider */ export interface BaseAuthProvider { /** * The authentication provider\'s unique ID. * @type {any} * @memberof BaseAuthProvider */ '_id'?: any; /** * The name of the authentication provider. This value must be the same as the value of `type`. * @type {any} * @memberof BaseAuthProvider */ 'name': any; /** * * @type {ProviderType} * @memberof BaseAuthProvider */ 'type': ProviderType; /** * If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled. * @type {any} * @memberof BaseAuthProvider */ 'disabled'?: any; } /** * Common fields shared by all log types. * @export * @interface BaseLog */ export interface BaseLog { /** * A unique ID for the log entry. * @type {any} * @memberof BaseLog */ '_id'?: any; /** * A correlation ID for the request that issued the logged operation. * @type {any} * @memberof BaseLog */ 'co_id'?: any; /** * The domain ID. * @type {any} * @memberof BaseLog */ 'domain_id'?: any; /** * The App\'s internal client ID value. * @type {any} * @memberof BaseLog */ 'app_id'?: any; /** * The App\'s Atlas Project ID value. * @type {any} * @memberof BaseLog */ 'group_id'?: any; /** * The URL that the incoming request was sent to. * @type {any} * @memberof BaseLog */ 'request_url'?: any; /** * The HTTP method used by the incoming request. * @type {any} * @memberof BaseLog */ 'request_method'?: any; /** * An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the start of the logged operation. * @type {any} * @memberof BaseLog */ 'started'?: any; /** * An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the completion of the logged operation. * @type {any} * @memberof BaseLog */ 'completed'?: any; } /** * * @export * @interface BaseTrigger */ export interface BaseTrigger { /** * The trigger\'s unique ID. * @type {any} * @memberof BaseTrigger */ '_id'?: any; /** * The trigger\'s name. * @type {any} * @memberof BaseTrigger */ 'name': any; /** * * @type {any} * @memberof BaseTrigger */ 'type': any; /** * If `true`, the trigger is disabled and does not listen for events or execute. * @type {any} * @memberof BaseTrigger */ 'disabled'?: any; /** * An object that defines configuration values for the trigger. * @type {any} * @memberof BaseTrigger */ 'config': any; /** * The ID of the function that the trigger calls when it fires. This value is the same as `event_processors.FUNCTION.function_id`. You can either define the value here or in `event_processors.FUNCTION.function_id`. The App Services backend duplicates the value to the configuration location where you did not define it. For example, if you define `function_id`, the backend duplicates it to `event_processors.FUNCTION.function_id`. * @type {any} * @memberof BaseTrigger */ 'function_id'?: any; /** * The name of the function that the trigger calls when it fires, i.e. the function described by `function_id`. This value is the same as `event_processors.FUNCTION.function_name`. You can either define the value here or in `event_processors.FUNCTION.function_name`. The App Services backend duplicates the value to the configuration location where you did not define it. For example, if you define `function_name`, the backend duplicates it to `event_processors.FUNCTION.function_name`. * @type {any} * @memberof BaseTrigger */ 'function_name'?: any; /** * * @type {BaseTriggerEventProcessors} * @memberof BaseTrigger */ 'event_processors'?: BaseTriggerEventProcessors; } /** * An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. For an example configuration object, see [Send Trigger Events to AWS EventBridge](https://www.mongodb.com/docs/realm/triggers/examples/send-events-aws-eventbridge#std-label-event_processor_example). * @export * @interface BaseTriggerEventProcessors */ export interface BaseTriggerEventProcessors { /** * * @type {BaseTriggerEventProcessorsFUNCTION} * @memberof BaseTriggerEventProcessors */ 'FUNCTION'?: BaseTriggerEventProcessorsFUNCTION; /** * * @type {BaseTriggerEventProcessorsAWSEVENTBRIDGE} * @memberof BaseTriggerEventProcessors */ 'AWS_EVENTBRIDGE'?: BaseTriggerEventProcessorsAWSEVENTBRIDGE; } /** * * @export * @interface BaseTriggerEventProcessorsAWSEVENTBRIDGE */ export interface BaseTriggerEventProcessorsAWSEVENTBRIDGE { /** * * @type {BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig} * @memberof BaseTriggerEventProcessorsAWSEVENTBRIDGE */ 'config'?: BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig; } /** * * @export * @interface BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig */ export interface BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig { /** * An AWS Account ID. * @type {any} * @memberof BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig */ 'account_id'?: any; /** * An AWS region. * @type {any} * @memberof BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig */ 'region'?: any; /** * If `true`, event objects are serialized using EJSON. * @type {any} * @memberof BaseTriggerEventProcessorsAWSEVENTBRIDGEConfig */ 'extended_json_enabled'?: any; } /** * * @export * @interface BaseTriggerEventProcessorsFUNCTION */ export interface BaseTriggerEventProcessorsFUNCTION { /** * * @type {BaseTriggerEventProcessorsFUNCTIONConfig} * @memberof BaseTriggerEventProcessorsFUNCTION */ 'config'?: BaseTriggerEventProcessorsFUNCTIONConfig; } /** * * @export * @interface BaseTriggerEventProcessorsFUNCTIONConfig */ export interface BaseTriggerEventProcessorsFUNCTIONConfig { /** * The ID of the function that the trigger calls when it fires. This value is the same as the root-level `function_id`. You can either define the value here or in `function_id`. The App Services backend duplicates the value to the configuration location where you did not define it. For example, if you define `event_processors.FUNCTION.function_id`, the backend duplicates it to `function_id`. * @type {any} * @memberof BaseTriggerEventProcessorsFUNCTIONConfig */ 'function_id'?: any; /** * The name of the function that the trigger calls when it fires, i.e. the function described by `function_id`. This value is the same as the root-level `function_name`. You can either define the value here or in `function_name`. The App Services backend duplicates the value to the configuration location where you did not define it. For example, if you define `event_processors.FUNCTION.function_name`, the backend duplicates it to `function_name`. * @type {any} * @memberof BaseTriggerEventProcessorsFUNCTIONConfig */ 'function_name'?: any; } /** * * @export * @interface BasicError */ export interface BasicError { /** * * @type {any} * @memberof BasicError */ 'error'?: any; } /** * * @export * @interface BilledMemory */ export interface BilledMemory { /** * The total billable memory used by the request. * @type {any} * @memberof BilledMemory */ 'mem_time_usage'?: any; } /** * * @export * @interface BuildInfo */ export interface BuildInfo { /** * Human-readable version information about the mongod instance. This string will take the format `<major>.<minor>.<patch>`. * @type {any} * @memberof BuildInfo */ 'version'?: any; /** * The commit identifier that identifies the state of the code use to build the mongod. * @type {any} * @memberof BuildInfo */ 'gitVersion'?: any; /** * An array that conveys version information about the mongod instance. See version for a more readable version of this string. * @type {any} * @memberof BuildInfo */ 'versionArray'?: any; /** * A string that reports the JavaScript engine used in the mongod instance. By default, this is `mozjs` after version `3.2`, and previously `V8`. * @type {any} * @memberof BuildInfo */ 'javascriptEngine'?: any; /** * A number that reflects the target processor architecture of the mongod binary. * @type {any} * @memberof BuildInfo */ 'bits'?: any; /** * A boolean that reflects whether or not the `mongod` instance was built with debugging options. * @type {any} * @memberof BuildInfo */ 'debug'?: any; /** * A number that reports the [Maximum BSON Document Size](https://www.mongodb.com/docs/manual/reference/limits#std-label-limit-bson-document-size) * @type {any} * @memberof BuildInfo */ 'maxBsonObjectSize'?: any; } /** * * @export * @interface ClientLog */ export interface ClientLog { /** * The user account ID of the user that initiated the logged operation. * @type {any} * @memberof ClientLog */ 'user_id'?: any; /** * The IP address that the logged operation originated from. * @type {any} * @memberof ClientLog */ 'remote_ip_address'?: any; /** * The HTTP status code returned in the operation response. * @type {any} * @memberof ClientLog */ 'status'?: any; /** * If a runtime error occurred in the logged operation, this is a message that describes the issue. * @type {any} * @memberof ClientLog */ 'error'?: any; /** * If a runtime error occurred in the logged operation, this is the error\'s short code. * @type {any} * @memberof ClientLog */ 'error_code'?: any; /** * The name of the platform that the client was running on. * @type {any} * @memberof ClientLog */ 'platform'?: any; /** * The version of the platform that the client was running on. * @type {any} * @memberof ClientLog */ 'platform_version'?: any; /** * The name of the Realm SDK used to make the request. * @type {any} * @memberof ClientLog */ 'sdk_name'?: any; /** * The version number of the Realm SDK used to make the request. * @type {any} * @memberof ClientLog */ 'sdk_version'?: any; } /** * * @export * @interface CloudProviderRegion */ export interface CloudProviderRegion { /** * * @type {any} * @memberof CloudProviderRegion */ 'id'?: any; /** * A descriptive name for the region. * @type {any} * @memberof CloudProviderRegion */ 'name'?: any; /** * The cloud provider that hosts the region. * @type {any} * @memberof CloudProviderRegion */ 'cloud_provider'?: any; /** * The country where the region is physically hosted. * @type {any} * @memberof CloudProviderRegion */ 'country'?: any; /** * The [deployment models](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models) that this region supports. * @type {any} * @memberof CloudProviderRegion */ 'deployment_models'?: any; } /** * * @export * @interface CustomResolver */ export interface CustomResolver { /** * The custom resolver\'s unique ID. * @type {any} * @memberof CustomResolver */ '_id': any; /** * The resolver function\'s unique ID. * @type {any} * @memberof CustomResolver */ 'function_id': any; /** * The name of the resolver\'s parent type. This can be `\"Query\"`, `\"Mutation\"`, or the name of a generated type if this is a computed property. * @type {any} * @memberof CustomResolver */ 'on_type': any; /** * The name of the custom resolver field that appears in the GraphQL schema. * @type {any} * @memberof CustomResolver */ 'field_name': any; /** * The type of the custom resolver\'s `input` parameter. This can be a scalar, the name of an existing generated type, or a custom JSON schema object. If undefined, the resolver does not accept an input. * @type {any} * @memberof CustomResolver */ 'input_type'?: any | null; /** * The kind of input type the custom resolver uses. This value must agree with the value of `input_type`: - A scalar input type must use `\"scalar\"` or `\"scalar-list\"` - A generated input type must use `\"generated\"` or `\"generated-list\"` - A custom input type must use `\"custom\"` If undefined, the resolver does not accept an input. * @type {any} * @memberof CustomResolver */ 'inpu