@api-client/core 0.19.32 → 0.19.34
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.
- package/build/src/authorization/index.d.ts +10 -0
- package/build/src/authorization/index.d.ts.map +1 -0
- package/build/src/authorization/index.js +10 -0
- package/build/src/authorization/index.js.map +1 -0
- package/build/src/browser.d.ts +13 -143
- package/build/src/browser.d.ts.map +1 -1
- package/build/src/browser.js +10 -144
- package/build/src/browser.js.map +1 -1
- package/build/src/data/DataExtractor.d.ts +1 -2
- package/build/src/data/DataExtractor.d.ts.map +1 -1
- package/build/src/data/DataExtractor.js.map +1 -1
- package/build/src/data/index.d.ts +10 -0
- package/build/src/data/index.d.ts.map +1 -0
- package/build/src/data/index.js +10 -0
- package/build/src/data/index.js.map +1 -0
- package/build/src/events/Events.d.ts +3 -3
- package/build/src/events/index.d.ts +11 -0
- package/build/src/events/index.d.ts.map +1 -0
- package/build/src/events/index.js +4 -0
- package/build/src/events/index.js.map +1 -0
- package/build/src/exceptions/index.d.ts +8 -0
- package/build/src/exceptions/index.d.ts.map +1 -0
- package/build/src/exceptions/index.js +8 -0
- package/build/src/exceptions/index.js.map +1 -0
- package/build/src/index.d.ts +10 -138
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +11 -142
- package/build/src/index.js.map +1 -1
- package/build/src/mocking/lib/User.d.ts.map +1 -1
- package/build/src/mocking/lib/User.js +1 -1
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/modeling/ai/DataDomainDelta.d.ts +3 -3
- package/build/src/modeling/ai/DataDomainDelta.d.ts.map +1 -1
- package/build/src/modeling/ai/DataDomainDelta.js +3 -3
- package/build/src/modeling/ai/DataDomainDelta.js.map +1 -1
- package/build/src/modeling/amf/index.d.ts +4 -0
- package/build/src/modeling/amf/index.d.ts.map +1 -0
- package/build/src/modeling/amf/index.js +4 -0
- package/build/src/modeling/amf/index.js.map +1 -0
- package/build/src/modeling/index.d.ts +18 -1
- package/build/src/modeling/index.d.ts.map +1 -1
- package/build/src/modeling/index.js +14 -1
- package/build/src/modeling/index.js.map +1 -1
- package/build/src/models/index.d.ts +64 -0
- package/build/src/models/index.d.ts.map +1 -0
- package/build/src/models/index.js +68 -0
- package/build/src/models/index.js.map +1 -0
- package/build/src/models/store/CustomDomain.d.ts +1 -1
- package/build/src/models/store/CustomDomain.d.ts.map +1 -1
- package/build/src/models/store/CustomDomain.js +2 -2
- package/build/src/models/store/CustomDomain.js.map +1 -1
- package/build/src/models/store/{data_catalog.d.ts → DataCatalog.d.ts} +1 -1
- package/build/src/models/store/DataCatalog.d.ts.map +1 -0
- package/build/src/models/store/DataCatalog.js +2 -0
- package/build/src/models/store/DataCatalog.js.map +1 -0
- package/build/src/models/store/DeploymentCustomDomain.d.ts +1 -1
- package/build/src/models/store/DeploymentCustomDomain.d.ts.map +1 -1
- package/build/src/models/store/DeploymentCustomDomain.js +2 -2
- package/build/src/models/store/DeploymentCustomDomain.js.map +1 -1
- package/build/src/models/store/File.d.ts.map +1 -1
- package/build/src/models/store/File.js +1 -2
- package/build/src/models/store/File.js.map +1 -1
- package/build/src/models/store/User.d.ts +3 -3
- package/build/src/models/store/User.d.ts.map +1 -1
- package/build/src/models/store/User.js +1 -1
- package/build/src/models/store/User.js.map +1 -1
- package/build/src/models/store/index.d.ts +17 -0
- package/build/src/models/store/index.d.ts.map +1 -0
- package/build/src/models/store/index.js +10 -0
- package/build/src/models/store/index.js.map +1 -0
- package/build/src/patch/index.d.ts +3 -0
- package/build/src/patch/index.d.ts.map +1 -0
- package/build/src/patch/index.js +2 -0
- package/build/src/patch/index.js.map +1 -0
- package/build/src/sdk/DeploymentsSdk.d.ts +1 -1
- package/build/src/sdk/DeploymentsSdk.d.ts.map +1 -1
- package/build/src/sdk/DeploymentsSdk.js +2 -1
- package/build/src/sdk/DeploymentsSdk.js.map +1 -1
- package/build/src/sdk/GroupsSdk.d.ts +1 -1
- package/build/src/sdk/GroupsSdk.d.ts.map +1 -1
- package/build/src/sdk/GroupsSdk.js.map +1 -1
- package/build/src/sdk/StoreSdkNode.d.ts +0 -4
- package/build/src/sdk/StoreSdkNode.d.ts.map +1 -1
- package/build/src/sdk/StoreSdkNode.js.map +1 -1
- package/build/src/sdk/StoreSdkWeb.d.ts +1 -5
- package/build/src/sdk/StoreSdkWeb.d.ts.map +1 -1
- package/build/src/sdk/StoreSdkWeb.js +1 -1
- package/build/src/sdk/StoreSdkWeb.js.map +1 -1
- package/build/src/sdk/index.d.ts +8 -0
- package/build/src/sdk/index.d.ts.map +1 -0
- package/build/src/sdk/index.js +3 -0
- package/build/src/sdk/index.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/data/DataExtractor.ts +1 -1
- package/src/mocking/lib/User.ts +2 -1
- package/src/modeling/ai/DataDomainDelta.ts +5 -11
- package/src/models/store/CustomDomain.ts +2 -2
- package/src/models/store/DeploymentCustomDomain.ts +2 -2
- package/src/models/store/File.ts +2 -2
- package/src/models/store/User.ts +3 -4
- package/src/sdk/DeploymentsSdk.ts +3 -1
- package/src/sdk/GroupsSdk.ts +1 -1
- package/src/sdk/StoreSdkNode.ts +0 -11
- package/src/sdk/StoreSdkWeb.ts +1 -12
- package/tests/unit/authorization/SecurityProcessor.spec.ts +2 -1
- package/tests/unit/data/JmesparthReader.spec.ts +1 -1
- package/tests/unit/data/JsonReader.spec.ts +1 -1
- package/tests/unit/data/PayloadPointer.spec.ts +1 -1
- package/tests/unit/data/RequestDataExtractor.spec.ts +9 -13
- package/tests/unit/data/UrlEncodedReader.spec.ts +1 -1
- package/tests/unit/data/XmlReader.spec.ts +1 -1
- package/tests/unit/mocking/current/Certificates.spec.ts +1 -1
- package/tests/unit/mocking/current/HostRules.spec.ts +1 -1
- package/tests/unit/mocking/current/Urls.spec.ts +1 -1
- package/tests/unit/mocking/current/User.spec.ts +2 -2
- package/tests/unit/modeling/ai/DataDomainDelta.spec.ts +1 -1
- package/tests/unit/modeling/ai/DomainSerialization.spec.ts +1 -1
- package/tests/unit/modeling/ai/tools/DataDomain.tools.spec.ts +1 -1
- package/tests/unit/modeling/amf/shape_generator.spec.ts +1 -1
- package/tests/unit/modeling/api_model.spec.ts +2 -3
- package/tests/unit/modeling/api_model_expose_entity.spec.ts +1 -1
- package/tests/unit/modeling/api_model_remove_entity.spec.ts +1 -1
- package/tests/unit/modeling/data_domain.spec.ts +2 -1
- package/tests/unit/modeling/data_domain_change_observers.spec.ts +1 -1
- package/tests/unit/modeling/data_domain_serialization.spec.ts +2 -2
- package/tests/unit/modeling/definitions/phone.spec.ts +1 -1
- package/tests/unit/modeling/domain_asociation.spec.ts +34 -34
- package/tests/unit/modeling/domain_asociation_targets.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity.spec.ts +3 -9
- package/tests/unit/modeling/domain_entity_associations.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_example_generator_json.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_example_generator_xml.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_fields.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_generators.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_parents.spec.ts +1 -1
- package/tests/unit/modeling/domain_entity_properties.spec.ts +2 -1
- package/tests/unit/modeling/domain_file.spec.ts +2 -1
- package/tests/unit/modeling/domain_impact_analysis.spec.ts +5 -3
- package/tests/unit/modeling/domain_model.spec.ts +3 -8
- package/tests/unit/modeling/domain_model_entities.spec.ts +2 -1
- package/tests/unit/modeling/domain_namespace.spec.ts +3 -9
- package/tests/unit/modeling/domain_namespace_models.spec.ts +1 -1
- package/tests/unit/modeling/domain_namespace_namespaces.spec.ts +1 -1
- package/tests/unit/modeling/domain_property.spec.ts +3 -1
- package/tests/unit/modeling/domain_validation.spec.ts +1 -1
- package/tests/unit/modeling/domain_versioning.spec.ts +1 -1
- package/tests/unit/modeling/exposed_entity.spec.ts +1 -1
- package/tests/unit/modeling/exposed_entity_setter_validation.spec.ts +1 -1
- package/tests/unit/modeling/helpers/intellisense.spec.ts +1 -1
- package/tests/unit/modeling/importers/json_schema_importer.spec.ts +1 -1
- package/tests/unit/modeling/validation/association_validation.spec.ts +1 -1
- package/tests/unit/modeling/validation/entity_validation.spec.ts +1 -1
- package/tests/unit/modeling/validation/property_validation.spec.ts +1 -1
- package/tests/unit/models/Certificate/from_name.spec.ts +2 -1
- package/tests/unit/models/File/addLabel.spec.ts +1 -1
- package/tests/unit/models/File/constructor.spec.ts +2 -1
- package/tests/unit/models/File/createFileCapabilities.spec.ts +1 -1
- package/tests/unit/models/File/new.spec.ts +2 -1
- package/tests/unit/models/File/setDeleted.spec.ts +1 -1
- package/tests/unit/models/File/setLastModified.spec.ts +1 -1
- package/tests/unit/models/File/shortcutTo.spec.ts +1 -1
- package/tests/unit/models/File/toJSON.spec.ts +2 -1
- package/tests/unit/models/File/updateByMeMeta.spec.ts +1 -1
- package/tests/unit/models/Folder/consume.spec.ts +2 -1
- package/tests/unit/models/Folder/create.spec.ts +2 -1
- package/tests/unit/models/Permission/all.spec.ts +1 -1
- package/tests/unit/models/Project/consume.spec.ts +1 -1
- package/tests/unit/models/Project/create.spec.ts +1 -1
- package/tests/unit/models/certificate.spec.ts +2 -7
- package/tests/unit/models/host_rule.spec.ts +1 -1
- package/tests/unit/models/http_project.spec.ts +1 -1
- package/tests/unit/models/http_request.spec.ts +2 -9
- package/tests/unit/models/http_response.spec.ts +2 -1
- package/tests/unit/models/license.spec.ts +1 -1
- package/tests/unit/models/response.spec.ts +2 -2
- package/tests/unit/models/store/CustomDomain.spec.ts +8 -8
- package/tests/unit/models/store/DeploymentCustomDomain.spec.ts +9 -9
- package/tests/unit/models/store/Invitation.spec.ts +1 -1
- package/tests/unit/runtime/http-engine/abort.spec.ts +2 -8
- package/tests/unit/runtime/http-engine/auth.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/certificates.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/cleanup.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/compression.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/core_engine.spec.ts +7 -11
- package/tests/unit/runtime/http-engine/events.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/headers.spec.ts +2 -9
- package/tests/unit/runtime/http-engine/hosts.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/http-get.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/http-post.spec.ts +2 -9
- package/tests/unit/runtime/http-engine/logger.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/message.spec.ts +2 -8
- package/tests/unit/runtime/http-engine/params.spec.ts +2 -10
- package/tests/unit/runtime/http-engine/proxy.spec.ts +2 -10
- package/tests/unit/runtime/http-engine/redirects.spec.ts +4 -6
- package/tests/unit/runtime/http-engine/request_utils.spec.ts +2 -1
- package/tests/unit/runtime/http-engine/responses.spec.ts +2 -10
- package/tests/unit/runtime/http-engine/timeout.spec.ts +2 -8
- package/tests/unit/runtime/http-engine/timings.spec.ts +2 -1
- package/tests/unit/runtime/proxy/HttpProjectProxy.spec.ts +3 -8
- package/tests/unit/runtime/proxy/RequestProxy.spec.ts +6 -7
- package/tests/unit/runtime/reporters/project_run_cli_reporter.spec.ts +2 -7
- package/tests/unit/runtime/runners/http_assertion_runner.spec.ts +2 -2
- package/tests/unit/runtime/runners/http_flow_runner.spec.ts +2 -2
- package/tests/unit/runtime/runners/parallel_runner.spec.ts +2 -2
- package/tests/unit/runtime/runners/project_runner.spec.ts +2 -5
- package/tests/unit/runtime/runners/request_runner.spec.ts +2 -5
- package/tests/unit/runtime/runners/serial_runner.spec.ts +2 -3
- package/tests/unit/runtime/variables/variables_processor.spec.ts +2 -1
- package/tsconfig.browser.json +3 -4
- package/tsconfig.node.json +1 -3
- package/build/src/models/store/data_catalog.d.ts.map +0 -1
- package/build/src/models/store/data_catalog.js +0 -2
- package/build/src/models/store/data_catalog.js.map +0 -1
- /package/src/models/store/{data_catalog.ts → DataCatalog.ts} +0 -0
|
@@ -0,0 +1 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,EAAE,MAAM,EAAgB,IAAI,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,EAAE,KAAK,EAAiC,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,GAAG,EAAa,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,MAAM,EAAqC,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,WAAW,EAA8C,MAAM,kBAAkB,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAmC,MAAM,aAAa,CAAA;AACrE,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EACL,WAAW,GAMZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAA6B,kBAAkB,EAAiC,MAAM,yBAAyB,CAAA;AACtH,OAAO,EAKL,cAAc,EAEd,aAAa,EAEb,wBAAwB,GACzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,SAAS,EAA2C,MAAM,gBAAgB,CAAA;AACnF,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,cAAc,uCAAuC,CAAA;AACrD,cAAc,kCAAkC,CAAA;AAChD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,OAAO,KAAK,cAAc,MAAM,uCAAuC,CAAA;AACvE,OAAO,KAAK,mBAAmB,MAAM,4CAA4C,CAAA;AACjF,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,cAAc,gCAAgC,CAAA;AAC9C,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAA;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAA;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA","sourcesContent":["export * from './kinds.js'\nexport * from './store/index.js'\nexport { type IApplication } from './Application.js'\nexport { Response, type IResponse } from './Response.js'\nexport {\n type IAuthorizationSettingsUnion,\n type IApiKeyAuthorization,\n type IAuthorizationParams,\n type IBasicAuthorization,\n type IBearerAuthorization,\n type ICCAuthorization,\n type IDigestAuthorization,\n type INtlmAuthorization,\n type IOAuth1Authorization,\n type IOAuth2Authorization,\n type IOAuth2AuthorizationRequestCustomData,\n type IOAuth2CustomData,\n type IOAuth2CustomParameter,\n type IOAuth2TokenRequestCustomData,\n type IOauth2GrantType,\n type IOauth2ResponseType,\n type IOidcAuthorization,\n type IOidcTokenError,\n type IOidcTokenInfo,\n type IPassThroughAuthorization,\n type IRamlCustomAuthorization,\n type ITokenError,\n type ITokenInfo,\n type ITokenRemoveOptions,\n type OAuth2DeliveryMethod,\n type AuthorizationType,\n} from './Authorization.js'\nexport { AuthorizationData, type IAuthorizationData } from './AuthorizationData.js'\nexport { CertificateFile, type ICertificateFile } from './CertificateFile.js'\nexport {\n Certificate,\n type CertificateDataFormat,\n type CertificateType,\n type HttpCertificate,\n type ICertificate,\n type ICertificateCreateOptions,\n type ICertificateData,\n type IP12Certificate,\n type IP12CreateOptions,\n type IPemCertificate,\n type IPemCreateOptions,\n Kind as CertificateKind,\n} from './ClientCertificate.js'\nexport { Environment, type IEnvironment, Kind as EnvironmentKind } from './Environment.js'\nexport { ErrorResponse, type IErrorResponse } from './ErrorResponse.js'\nexport { HeadersArray } from './HeadersArray.js'\nexport { type IHostRule, HostRule, Kind as HostRuleKind } from './HostRule.js'\nexport { type IHttpCookie, HttpCookie, type CookieChangeReason, type CookieSameSiteType } from './HttpCookie.js'\nexport { type IHttpHistory, HttpHistory, Kind as HttpHistoryKind, type IHttpHistoryBulkAdd } from './HttpHistory.js'\nexport {\n HttpProject,\n type IHttpProject,\n Kind as HttpProjectKind,\n type IFolderCreateOptions,\n type IFolderDeleteOptions,\n type IFolderSearchOptions,\n type IProjectMoveOptions,\n type IRequestAddOptions,\n type IRequestDeleteOptions,\n type IRequestSearchOptions,\n type IProjectFolderIterator,\n type IProjectFolderIteratorResult,\n type IProjectRequestIterator,\n} from './HttpProject.js'\nexport { type IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './HttpRequest.js'\nexport { HttpResponse, type IHttpResponse } from './HttpResponse.js'\nexport { License, type ILicense, Kind as LicenseKind } from './License.js'\nexport { Project, type IProject } from './Project.js'\nexport {\n type IProjectExecutionLog,\n type IProjectExecutionIteration,\n type IProjectExecution,\n ProjectExecution,\n Kind as ProjectExecutionKind,\n} from './ProjectExecution.js'\nexport { type IProjectFolder, ProjectFolder, DefaultFolderName } from './ProjectFolder.js'\nexport { ProjectItem, type IProjectItem } from './ProjectItem.js'\nexport { type IProjectRequest, ProjectRequest, Kind as ProjectRequestKind } from './ProjectRequest.js'\nexport { ProjectSchema, type IProjectSchema, Kind as ProjectSchemaKind } from './ProjectSchema.js'\nexport { Property, type IProperty, Kind as PropertyKind } from './Property.js'\nexport { Provider, type IProvider, Kind as ProviderKind } from './Provider.js'\nexport { Request, type IRequest, Kind as RequestKind } from './Request.js'\nexport {\n RequestAuthorization,\n type IRequestAuthorization,\n Kind as RequestAuthorizationKind,\n} from './RequestAuthorization.js'\nexport {\n RequestConfig,\n type IRequestConfig,\n type IRequestBaseConfig,\n Kind as RequestConfigKind,\n} from './RequestConfig.js'\nexport { RequestLog, type IRequestLog, Kind as RequestLogKind } from './RequestLog.js'\nexport { RequestsSize, type IRequestsSize, Kind as RequestsSizeKind } from './RequestsSize.js'\nexport { RequestTime, type IRequestTime, Kind as RequestTimeKind } from './RequestTime.js'\nexport {\n RequestUiMeta,\n type IRequestUiMeta,\n Kind as RequestUiMetaKind,\n type IAuthMeta,\n type IBodyMeta,\n type IBodyMetaModel,\n type IHeadersMeta,\n type IRawBody,\n type IResponseUiMeta,\n type IUrlMeta,\n type IUrlEncodedBodyMeta,\n} from './RequestUiMeta.js'\nexport {\n ResponseAuthorization,\n type IResponseAuthorization,\n Kind as ResponseAuthorizationKind,\n} from './ResponseAuthorization.js'\nexport { ResponseRedirect, type IResponseRedirect, Kind as ResponseRedirectKind } from './ResponseRedirect.js'\nexport { type ISentRequest, SentRequest, type IBaseSentRequest } from './SentRequest.js'\nexport { SerializableError, type ISerializedError } from './SerializableError.js'\nexport { SerializablePayload, type SerializablePayloadOptions } from './SerializablePayload.js'\nexport { Server, type IServer, Kind as ServerKind } from './Server.js'\nexport { Thing, type IThing, type ThingSchema } from './Thing.js'\nexport { Url, type IUrl } from './Url.js'\nexport { WebApi, type IWebApi, type ILegacyRestApi } from './WebApi.js'\nexport { WebApiIndex, type IWebApiIndex, type ILegacyWebApiIndex } from './WebApiIndex.js'\nexport { Folder, type FolderSchema, type IFolder } from './Folder.js'\nexport * from './TrashEntry.js'\nexport {\n DataCatalog,\n type DataCatalogSchema,\n type DataCatalogSchemaWithVersion,\n type DataCatalogScope,\n type DataCatalogStatus,\n type DataCatalogVersionInfo,\n} from './DataCatalog.js'\nexport { type DataCatalogLifecycle, DataCatalogVersion, type DataCatalogVersionSchema } from './DataCatalogVersion.js'\nexport {\n type AiMessage,\n type AiMessageRole,\n type AiMessageSchema,\n type AiMessageState,\n AiModelMessage,\n type AiModelMessageSchema,\n AiUserMessage,\n type AiUserMessageSchema,\n AiModelDataDomainMessage,\n} from './AiMessage.js'\nexport { AiSession, type AiSessionSchema, type AiSessionApp } from './AiSession.js'\n//\n// HTTP Flows & assertions\n//\nexport * from './http-flows/steps/assertion/index.js'\nexport * from './http-flows/steps/data/index.js'\nexport * from './http-flows/steps/transformation/index.js'\nexport * from './http-flows/HttpFlows.js'\nexport * from './http-flows/HttpStep.js'\nexport * from './http-flows/LegacyTranslator.js'\nexport * from './http-flows/HttpAssertion.js'\nexport * as HttpAssertions from './http-flows/steps/assertion/index.js'\nexport * as TransformationSteps from './http-flows/steps/transformation/index.js'\nexport * as DataSteps from './http-flows/steps/data/index.js'\nexport * from './http-flows/AssertionError.js'\n//\n// External data importers\n//\nexport { LegacyDataExportToApiProject } from './transformers/LegacyDataExportToApiProject.js'\nexport { PostmanDataTransformer } from './transformers/PostmanDataTransformer.js'\nexport { ArcLegacyNormalizer } from './transformers/ArcLegacyNormalizer.js'\n"]}
|
|
@@ -33,7 +33,7 @@ export interface CustomDomainSchema {
|
|
|
33
33
|
*/
|
|
34
34
|
updatedAt: number;
|
|
35
35
|
}
|
|
36
|
-
export declare class
|
|
36
|
+
export declare class CustomDomain implements CustomDomainSchema {
|
|
37
37
|
id: string;
|
|
38
38
|
orgId: string;
|
|
39
39
|
domain: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDomain.d.ts","sourceRoot":"","sources":["../../../../src/models/store/CustomDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAGlF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,
|
|
1
|
+
{"version":3,"file":"CustomDomain.d.ts","sourceRoot":"","sources":["../../../../src/models/store/CustomDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAGlF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,YAAa,YAAW,kBAAkB;IACrD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,MAAM,CAAC,YAAY,CAAC,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,kBAAkB;gBAiBpE,KAAK,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAY/C,MAAM,IAAI,kBAAkB;IAgB5B,QAAQ,IAAI,sBAAsB,EAAE;CAyBrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nanoid } from '../../nanoid.js';
|
|
2
|
-
export class
|
|
2
|
+
export class CustomDomain {
|
|
3
3
|
id;
|
|
4
4
|
orgId;
|
|
5
5
|
domain;
|
|
@@ -25,7 +25,7 @@ export class CustomDomainModel {
|
|
|
25
25
|
return result;
|
|
26
26
|
}
|
|
27
27
|
constructor(state) {
|
|
28
|
-
const init =
|
|
28
|
+
const init = CustomDomain.createSchema(state);
|
|
29
29
|
this.id = init.id;
|
|
30
30
|
this.orgId = init.orgId;
|
|
31
31
|
this.domain = init.domain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDomain.js","sourceRoot":"","sources":["../../../../src/models/store/CustomDomain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAqCxC,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"CustomDomain.js","sourceRoot":"","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vC,IAAI,EAAE,UAAU;aACjB,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { FieldValidationMessage } from '../../exceptions/validation_error.js'\nimport { nanoid } from '../../nanoid.js'\n\nexport interface CustomDomainSchema {\n /**\n * Primary key (nanoid)\n */\n id: string\n /**\n * ID of the organization\n */\n orgId: string\n /**\n * The custom domain\n */\n domain: string\n /**\n * The DNS target for the custom domain\n */\n dnsTarget: string\n /**\n * Whether the DNS has been verified\n */\n dnsVerified: boolean\n /**\n * Timestamp of last DNS verification\n */\n lastVerifiedAt?: number\n /**\n * Timestamp of creation\n */\n createdAt: number\n /**\n * Timestamp of last update\n */\n updatedAt: number\n}\n\nexport class CustomDomain implements CustomDomainSchema {\n id: string\n orgId: string\n domain: string\n dnsTarget: string\n dnsVerified: boolean\n lastVerifiedAt?: number\n createdAt: number\n updatedAt: number\n\n static createSchema(input: Partial<CustomDomainSchema> = {}): CustomDomainSchema {\n const id = input.id ?? nanoid()\n const result: CustomDomainSchema = {\n id,\n orgId: input.orgId || '',\n domain: input.domain || '',\n dnsTarget: input.dnsTarget || '',\n dnsVerified: input.dnsVerified ?? false,\n createdAt: input.createdAt ?? Date.now(),\n updatedAt: input.updatedAt ?? Date.now(),\n }\n if (typeof input.lastVerifiedAt === 'number') {\n result.lastVerifiedAt = input.lastVerifiedAt\n }\n return result\n }\n\n constructor(state?: Partial<CustomDomainSchema>) {\n const init = CustomDomain.createSchema(state)\n this.id = init.id\n this.orgId = init.orgId\n this.domain = init.domain\n this.dnsTarget = init.dnsTarget\n this.dnsVerified = init.dnsVerified\n this.lastVerifiedAt = init.lastVerifiedAt\n this.createdAt = init.createdAt\n this.updatedAt = init.updatedAt\n }\n\n toJSON(): CustomDomainSchema {\n const result: CustomDomainSchema = {\n id: this.id,\n orgId: this.orgId,\n domain: this.domain,\n dnsTarget: this.dnsTarget,\n dnsVerified: this.dnsVerified,\n createdAt: this.createdAt,\n updatedAt: this.updatedAt,\n }\n if (typeof this.lastVerifiedAt === 'number') {\n result.lastVerifiedAt = this.lastVerifiedAt\n }\n return result\n }\n\n validate(): FieldValidationMessage[] {\n const result: FieldValidationMessage[] = []\n if (!this.domain) {\n result.push({\n field: 'domain',\n message: 'Domain must not be empty',\n rule: 'notEmpty',\n })\n }\n if (!this.orgId) {\n result.push({\n field: 'orgId',\n message: 'Org ID must not be empty',\n rule: 'notEmpty',\n })\n }\n if (!this.dnsTarget) {\n result.push({\n field: 'dnsTarget',\n message: 'DNS target must not be empty',\n rule: 'notEmpty',\n })\n }\n return result\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCatalog.d.ts","sourceRoot":"","sources":["../../../../src/models/store/DataCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,KAAK,EAAE,QAAQ,GAAG,cAAc,GAAG,SAAS,CAAA;IAC5C;;OAEG;IACH,SAAS,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAA;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,wBAAwB,CAAA;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCatalog.js","sourceRoot":"","sources":["../../../../src/models/store/DataCatalog.ts"],"names":[],"mappings":"","sourcesContent":["import { UnresolvedDependencyKind } from '../kinds.js'\n\nexport interface PublishedDataDomain {\n /**\n * Globally unique key for the data domain.\n */\n key: string\n /**\n * The key of the owning organization.\n */\n oid: string\n /**\n * The access level for the published data domain.\n * The private access means that the item was unpublished.\n */\n scope: 'public' | 'organization' | 'private'\n /**\n * The lifecycle stage of the data domain.\n */\n lifecycle: 'stable' | 'beta' | 'dev'\n /**\n * The version of the published data domain.\n */\n version: string\n /**\n * Key of the referenced `DomainNamespace` document.\n * Essentially this is a document id.\n */\n fid: string\n /**\n * Human-readable name.\n */\n name: string\n /**\n * Detailed description. Text or markdown.\n */\n description: string\n /**\n * User ID of the publisher.\n */\n publishedBy: string\n /**\n * Timestamp of publication.\n */\n publishedAt: number\n unpublishedAt?: number\n /**\n * Keywords for discovery.\n */\n tags: string[]\n /**\n * Deprecation status.\n */\n isDeprecated?: boolean\n deprecatedAt?: number\n deprecationMessage?: string\n}\n\nexport interface UnresolvedDependency {\n kind: typeof UnresolvedDependencyKind\n /**\n * Key of the missing namespace.\n */\n key: string\n /**\n * The version of the missing namespace.\n */\n version: string\n /**\n * Explanation of the failure (e.g., \"Namespace unpublished\").\n */\n reason: string\n}\n"]}
|
|
@@ -36,7 +36,7 @@ export interface DeploymentCustomDomainSchema {
|
|
|
36
36
|
*/
|
|
37
37
|
updatedAt: number;
|
|
38
38
|
}
|
|
39
|
-
export declare class
|
|
39
|
+
export declare class DeploymentCustomDomain implements DeploymentCustomDomainSchema {
|
|
40
40
|
id: string;
|
|
41
41
|
deploymentId: string;
|
|
42
42
|
customDomainId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentCustomDomain.d.ts","sourceRoot":"","sources":["../../../../src/models/store/DeploymentCustomDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAGlF,oBAAY,SAAS;IACnB,YAAY,IAAI;IAChB,UAAU,IAAI;IACd,OAAO,IAAI;IACX,MAAM,IAAI;IACV,KAAK,IAAI;CACV;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,
|
|
1
|
+
{"version":3,"file":"DeploymentCustomDomain.d.ts","sourceRoot":"","sources":["../../../../src/models/store/DeploymentCustomDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAGlF,oBAAY,SAAS;IACnB,YAAY,IAAI;IAChB,UAAU,IAAI;IACd,OAAO,IAAI;IACX,MAAM,IAAI;IACV,KAAK,IAAI;CACV;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,sBAAuB,YAAW,4BAA4B;IACzE,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,MAAM,CAAC,YAAY,CAAC,KAAK,GAAE,OAAO,CAAC,4BAA4B,CAAM,GAAG,4BAA4B;gBAaxF,KAAK,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC;IAWzD,MAAM,IAAI,4BAA4B;IAYtC,QAAQ,IAAI,sBAAsB,EAAE;CAgCrC"}
|
|
@@ -7,7 +7,7 @@ export var SslStatus;
|
|
|
7
7
|
SslStatus[SslStatus["Active"] = 3] = "Active";
|
|
8
8
|
SslStatus[SslStatus["Error"] = 4] = "Error";
|
|
9
9
|
})(SslStatus || (SslStatus = {}));
|
|
10
|
-
export class
|
|
10
|
+
export class DeploymentCustomDomain {
|
|
11
11
|
id;
|
|
12
12
|
deploymentId;
|
|
13
13
|
customDomainId;
|
|
@@ -28,7 +28,7 @@ export class DeploymentCustomDomainModel {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
constructor(state) {
|
|
31
|
-
const init =
|
|
31
|
+
const init = DeploymentCustomDomain.createSchema(state);
|
|
32
32
|
this.id = init.id;
|
|
33
33
|
this.deploymentId = init.deploymentId;
|
|
34
34
|
this.customDomainId = init.customDomainId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentCustomDomain.js","sourceRoot":"","sources":["../../../../src/models/store/DeploymentCustomDomain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,yDAAgB,CAAA;IAChB,qDAAc,CAAA;IACd,+CAAW,CAAA;IACX,6CAAU,CAAA;IACV,2CAAS,CAAA;AACX,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB;AAiCD,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"DeploymentCustomDomain.js","sourceRoot":"","sources":["../../../../src/models/store/DeploymentCustomDomain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,yDAAgB,CAAA;IAChB,qDAAc,CAAA;IACd,+CAAW,CAAA;IACX,6CAAU,CAAA;IACV,2CAAS,CAAA;AACX,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB;AAiCD,MAAM,OAAO,sBAAsB;IACjC,EAAE,CAAQ;IACV,YAAY,CAAQ;IACpB,cAAc,CAAQ;IACtB,QAAQ,CAAQ;IAChB,SAAS,CAAW;IACpB,SAAS,CAAQ;IACjB,SAAS,CAAQ;IAEjB,MAAM,CAAC,YAAY,CAAC,QAA+C,EAAE;QACnE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,MAAM,EAAE,CAAA;QAC/B,OAAO;YACL,EAAE;YACF,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE;YACtC,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,EAAE;YAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,GAAG;YAC/B,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,SAAS,CAAC,UAAU;YAClD,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;YACxC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;SACzC,CAAA;IACH,CAAC;IAED,YAAY,KAA6C;QACvD,MAAM,IAAI,GAAG,sBAA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AY,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,cAAc;gBACrB,OAAO,EAAE,iCAAiC;gBAC1C,IAAI,EAAE,UAAU;aACjB,CAAC,CAAA;QACJ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,gBAAgB;gBACvB,OAAO,EAAE,oCAAoC;gBAC7C,IAAI,EAAE,UAAU;aACjB,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { FieldValidationMessage } from '../../exceptions/validation_error.js'\nimport { nanoid } from '../../nanoid.js'\n\nexport enum SslStatus {\n Initializing = 0,\n PendingDns = 1,\n Issuing = 2,\n Active = 3,\n Error = 4,\n}\n\nexport interface DeploymentCustomDomainSchema {\n /**\n * Primary key (nanoid)\n */\n id: string\n /**\n * ID of the deployment\n */\n deploymentId: string\n /**\n * ID of the custom domain\n */\n customDomainId: string\n /**\n * The base path for the deployment\n */\n basePath: string\n /**\n * Status of the SSL certificate\n */\n sslStatus: SslStatus\n /**\n * Timestamp of creation\n */\n createdAt: number\n /**\n * Timestamp of last update\n */\n updatedAt: number\n}\n\nexport class DeploymentCustomDomain implements DeploymentCustomDomainSchema {\n id: string\n deploymentId: string\n customDomainId: string\n basePath: string\n sslStatus: SslStatus\n createdAt: number\n updatedAt: number\n\n static createSchema(input: Partial<DeploymentCustomDomainSchema> = {}): DeploymentCustomDomainSchema {\n const id = input.id ?? nanoid()\n return {\n id,\n deploymentId: input.deploymentId || '',\n customDomainId: input.customDomainId || '',\n basePath: input.basePath ?? '/',\n sslStatus: input.sslStatus ?? SslStatus.PendingDns,\n createdAt: input.createdAt ?? Date.now(),\n updatedAt: input.updatedAt ?? Date.now(),\n }\n }\n\n constructor(state?: Partial<DeploymentCustomDomainSchema>) {\n const init = DeploymentCustomDomain.createSchema(state)\n this.id = init.id\n this.deploymentId = init.deploymentId\n this.customDomainId = init.customDomainId\n this.basePath = init.basePath\n this.sslStatus = init.sslStatus\n this.createdAt = init.createdAt\n this.updatedAt = init.updatedAt\n }\n\n toJSON(): DeploymentCustomDomainSchema {\n return {\n id: this.id,\n deploymentId: this.deploymentId,\n customDomainId: this.customDomainId,\n basePath: this.basePath,\n sslStatus: this.sslStatus,\n createdAt: this.createdAt,\n updatedAt: this.updatedAt,\n }\n }\n\n validate(): FieldValidationMessage[] {\n const result: FieldValidationMessage[] = []\n\n if (this.basePath === '') {\n result.push({\n field: 'basePath',\n message: 'Base path must not be empty',\n rule: 'notEmpty',\n })\n } else if (!this.basePath.startsWith('/')) {\n result.push({\n field: 'basePath',\n message: 'Base path must start with a slash',\n rule: 'startsWithSlash',\n })\n }\n if (!this.deploymentId) {\n result.push({\n field: 'deploymentId',\n message: 'Deployment ID must not be empty',\n rule: 'notEmpty',\n })\n }\n if (!this.customDomainId) {\n result.push({\n field: 'customDomainId',\n message: 'Custom domain ID must not be empty',\n rule: 'notEmpty',\n })\n }\n return result\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/models/store/File.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/models/store/File.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAA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G,SAAS,CAE3D;IAED,CAAC,iBAAiB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAK;IAErD;;;;;OAKG;IACH,IAAI,WAAW,IAAI,SAAS,gBAAgB,EAAE,CAE7C;WAEe,YAAY,CAAC,KAAK,GAAE,OAAO,CAAC,UAAU,CAAM,GAAG,UAAU;gBAsC7D,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;IAiBvC;;OAEG;IACM,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAwB3B,MAAM,IAAI,UAAU;IAkB7B;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKjD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKhC;;;;;OAKG;IACH,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAevC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAgB7B;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAgBlC,MAAM,IAAI,OAAO;IAIjB,QAAQ,IAAI,OAAO;CAGpB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { nanoid } from '../../nanoid.js';
|
|
2
2
|
import { Permission } from './Permission.js';
|
|
3
|
-
import { Kind as UserKind } from './User.js';
|
|
4
3
|
import { Thing } from '../Thing.js';
|
|
5
|
-
import { FolderKind } from '../kinds.js';
|
|
4
|
+
import { FolderKind, UserKind } from '../kinds.js';
|
|
6
5
|
const parentsSymbol = Symbol('parents');
|
|
7
6
|
const deletedSymbol = Symbol('deleted');
|
|
8
7
|
const deletedInfoSymbol = Symbol('deletedInfo');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../src/models/store/File.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,M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CAAC;YACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA;QAC1C,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAA;QAC1B,IAAI,CAAC,iBAAiB,CAAC,GAAG;YACxB,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;YAChB,IAAI,EAAE,IAAI,CAAC,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAA;IACjC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAA;IACjC,CAAC;CACF","sourcesContent":["import { nanoid } from '../../nanoid.js'\nimport { PermissionSchema, Permission, PermissionRole } from './Permission.js'\nimport { ModificationSchema } from './Modification.js'\nimport { DeletionSchema } from './Deletion.js'\nimport { UserSchema, Kind as UserKind } from './User.js'\nimport { ThingSchema, Thing } from '../Thing.js'\nimport { CapabilitiesSchema } from './Capabilities.js'\nimport { FolderKind } from '../kinds.js'\n// this causes error\n// import { Kind as FolderKind } from '../Folder.js';\n\nexport interface FileAddOptions {\n /**\n * The parent folder where to put the file.\n * The `parents` array is always cleared from the file object before adding it to the store.\n */\n parent?: string\n}\n\nexport interface MediaReadOptions {\n /**\n * When set it reads the file that was marked as `_deleted`. By default it throws when file was deleted.\n */\n deleted?: boolean\n}\n\n/**\n * A breadcrumb when creating the breadcrumb list for a file.\n */\nexport interface FileBreadcrumb {\n /**\n * The datastore key of the object.\n */\n key: string\n /**\n * THe kind of the object.\n */\n kind: string\n /**\n * The name of the object.\n */\n name: string\n}\n\nexport interface StoredFileSchema {\n /**\n * The kind of the File\n */\n kind: string\n /**\n * The identifier of the entity\n */\n key: string\n /**\n * The file's meta info.\n */\n info: ThingSchema\n /**\n * The color of the icon to render for this file in the file explorer.\n * This should be a hex format, e.g.: #c00 for red.\n */\n iconColor?: string\n /**\n * Whether the file is a shortcut to another file.\n * Many properties cannot be changed of a shortcut, like, shortcuts cannot be shared.\n */\n isShortcut?: boolean\n /**\n * The ID of the target file.\n */\n shortcutTarget?: string\n}\n\n/**\n * @deprecated Use {@link StoredFileSchema} instead.\n */\nexport type IStoredFile = StoredFileSchema\n\n/**\n * An interface describing an object in the data store that\n * describes a file or an object that can be treated as a file or a folder.\n */\nexport interface FileSchema extends StoredFileSchema {\n /**\n * The list of parents of the object. It is an ordered list of parents\n * from the top (first element) to the lowest parent in the tree (last element).\n *\n * After creating the object, this property cannot be manipulated directly by the client.\n * Should be treated as opaque value.\n */\n parents: string[]\n /**\n * The list of permissions to this file object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n permissionIds: string[]\n /**\n * Whether the file object is deleted.\n */\n deleted?: boolean\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n deletedInfo?: DeletionSchema\n /**\n * The last modification made to this file.\n */\n lastModified: ModificationSchema\n /**\n * An arbitrary list of labels applied to the file.\n */\n labels?: string[]\n /**\n * This is populated when reading a file from the store.\n * A list of actions the user can perform on the file.\n *\n * This is a readonly field and it is ignored when creating / updating the file.\n */\n capabilities?: CapabilitiesSchema\n /**\n * Populated by the server when reading the file. The list of permissions to the object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n *\n * Data store implementation note, this is not stored in the store but it is populated\n * when reading the object.\n */\n permissions: PermissionSchema[]\n /**\n * Populated by the store in some situations. If it's missing then you should request\n * breadcrumbs from the store.\n */\n breadcrumb?: FileBreadcrumb[]\n}\n\n/**\n * @deprecated Use {@link FileSchema} instead.\n */\nexport type IFile = FileSchema\n\nconst parentsSymbol = Symbol('parents')\nconst deletedSymbol = Symbol('deleted')\nconst deletedInfoSymbol = Symbol('deletedInfo')\nconst lastModifiedSymbol = Symbol('lastModified')\nconst capabilitiesSymbol = Symbol('capabilities')\nconst permissionsSymbol = Symbol('permissions')\nconst permissionIdsSymbol = Symbol('permissionIds')\nconst shortcutTargetSymbol = Symbol('shortcutTarget')\n\nexport class StoredFile {\n /**\n * The kind of the File\n */\n kind = ''\n /**\n * The identifier of the entity\n */\n key = ''\n /**\n * The name of the environment.\n */\n info: Thing = Thing.fromName('')\n\n /**\n * The color of the icon to render for this file in the file explorer.\n */\n iconColor?: string\n\n /**\n * Whether the file is a shortcut to another file.\n * Many properties cannot be changed of a shortcut, like, shortcuts cannot be shared.\n */\n get isShortcut(): boolean {\n return !!this.shortcutTarget\n }\n\n [shortcutTargetSymbol]?: string\n\n /**\n * The ID of the target file.\n */\n get shortcutTarget(): string | undefined {\n return this[shortcutTargetSymbol]\n }\n\n set shortcutTarget(value: string | undefined) {\n this[shortcutTargetSymbol] = value\n }\n\n /**\n * Creates a file schema object with the given properties.\n * The `key` is generated if not set.\n *\n * @param input The input to create the file schema.\n * @returns The file schema object.\n */\n static createSchema(input: Partial<StoredFileSchema> = {}): StoredFileSchema {\n const { key = nanoid(), kind, iconColor, shortcutTarget } = input\n const result: StoredFileSchema = {\n key,\n kind: kind || '',\n info: Thing.fromJSON(input.info, { name: 'Unnamed file' }).toJSON(),\n }\n if (iconColor) {\n result.iconColor = iconColor\n }\n if (shortcutTarget) {\n result.isShortcut = true\n result.shortcutTarget = shortcutTarget\n }\n return result\n }\n\n constructor(state: StoredFileSchema) {\n this.kind = state.kind\n this.key = state.key\n this.info = new Thing(state.info)\n if (state.iconColor) {\n this.iconColor = state.iconColor\n }\n if (state.shortcutTarget) {\n this.shortcutTarget = state.shortcutTarget\n }\n }\n\n /**\n * @deprecated Use `createSchema()` and setup values in the constructor instead.\n */\n new(init: StoredFileSchema): this {\n const { key = nanoid(), info, kind, iconColor, shortcutTarget } = init\n this.key = key\n this.kind = kind\n if (info) {\n this.info = new Thing(info)\n } else {\n this.info = Thing.fromName('')\n }\n if (iconColor) {\n this.iconColor = iconColor\n } else {\n this.iconColor = undefined\n }\n if (shortcutTarget) {\n this.shortcutTarget = shortcutTarget\n } else {\n this.shortcutTarget = undefined\n }\n return this\n }\n\n toJSON(): StoredFileSchema {\n const result: StoredFileSchema = {\n key: this.key,\n kind: this.kind,\n info: this.info.toJSON(),\n }\n if (this.iconColor) {\n result.iconColor = this.iconColor\n }\n if (this.shortcutTarget) {\n result.isShortcut = true\n result.shortcutTarget = this.shortcutTarget\n }\n return result\n }\n\n /**\n * Creates the Capabilities object for a file giving user level.\n *\n * @param file The file object to create the capabilities to. The object is not mutated.\n * @param role The user role to the file.\n */\n static createFileCapabilities(file: StoredFileSchema | StoredFile, role?: PermissionRole): CapabilitiesSchema {\n const isCommenter = Permission.hasRole('commenter', role)\n const isOwner = Permission.hasRole('owner', role)\n const isReader = Permission.hasRole('reader', role)\n const isWriter = Permission.hasRole('writer', role)\n const isFolder = file.kind === FolderKind\n const result: CapabilitiesSchema = {\n canReadMedia: !isFolder && isReader,\n canListChildren: isFolder && isReader,\n canComment: !isFolder && isCommenter,\n canEditMedia: !isFolder && isWriter,\n canEditMeta: isWriter,\n canReadRevisions: isWriter,\n canAddChildren: isFolder && isWriter,\n canDelete: isOwner,\n canTrash: isOwner,\n canUntrash: isOwner,\n canShare: isWriter,\n canMove: isWriter,\n }\n return result\n }\n\n createFileCapabilities(role: PermissionRole): CapabilitiesSchema {\n return File.createFileCapabilities(this, role)\n }\n\n /**\n * Mutates the file object by setting the `byMe` properties (on deleted and modified info)\n *\n * Note, this can be done only on file schema (FileSchema). The `File` object has\n * this properties frozen.\n *\n * @param file The file to mutate\n * @param user The user key to compare.\n */\n static updateByMeMeta(file: FileSchema, user: string): void {\n if (file.deletedInfo) {\n file.deletedInfo.byMe = file.deletedInfo.user === user\n }\n if (file.lastModified) {\n file.lastModified.byMe = file.lastModified.user === user\n }\n }\n\n /**\n * Static method to set the `lastModified` property on a file without creating an instance of a file meta.\n * Useful when the meta kind is unknown.\n *\n * @param file The file to update. Note, this method mutates the file.\n * @param user The user that modifies the file.\n * @returns The same file.\n */\n static setLastModified(file: FileSchema, user: UserSchema): FileSchema {\n if (!file) {\n throw new Error(`The file is required.`)\n }\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"lastModified\".`)\n }\n file.lastModified = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n return file\n }\n\n /**\n * Similar to the instance method `setDeleted()` but without creating\n * an instance of the file when the type is unknown.\n *\n * @param file The file to change. Note, this operation mutates the file.\n * @param user The deleting user\n * @returns The same file reference.\n */\n static setDeleted(file: FileSchema, user: UserSchema): FileSchema {\n if (!file) {\n throw new Error(`The file is required.`)\n }\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"deletedInfo\".`)\n }\n file.deleted = true\n file.deletedInfo = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n return file\n }\n}\n\nexport class File extends StoredFile {\n [parentsSymbol]: string[] = []\n\n /**\n * The list of parents of the object. It is an ordered list of parents\n * from the top (first element) to the lowest parent in the tree (last element).\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get parents(): string[] {\n return this[parentsSymbol]\n }\n\n [permissionIdsSymbol]: readonly string[] = []\n\n /**\n * The list of permissions to this file object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get permissionIds(): readonly string[] {\n return this[permissionIdsSymbol]\n }\n\n [deletedSymbol]?: boolean\n\n /**\n * Whether the file object is deleted.\n */\n get deleted(): boolean {\n return this[deletedSymbol] || false\n }\n\n [deletedInfoSymbol]?: Readonly<DeletionSchema>\n\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n get deletedInfo(): Readonly<DeletionSchema> | undefined {\n return this[deletedInfoSymbol]\n }\n\n [lastModifiedSymbol]: Readonly<ModificationSchema> = { user: '', time: 0, byMe: false }\n\n /**\n * The last modification made to this file.\n */\n get lastModified(): Readonly<ModificationSchema> {\n return this[lastModifiedSymbol]\n }\n\n /**\n * An arbitrary list of labels applied to the file.\n */\n labels?: string[];\n\n [capabilitiesSymbol]?: Readonly<CapabilitiesSchema>\n\n /**\n * This is populated when reading a file from the store.\n * A list of actions the user can perform on the file.\n *\n * This is a readonly field and it is ignored when creating / updating the file.\n */\n get capabilities(): Readonly<CapabilitiesSchema> | undefined {\n return this[capabilitiesSymbol]\n }\n\n [permissionsSymbol]: readonly PermissionSchema[] = []\n\n /**\n * Populated by the server when reading the file. The list of permissions to the object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get permissions(): readonly PermissionSchema[] {\n return this[permissionsSymbol]\n }\n\n static override createSchema(input: Partial<FileSchema> = {}): FileSchema {\n const result = StoredFile.createSchema(input) as FileSchema\n if (Array.isArray(input.parents)) {\n result.parents = [...input.parents]\n } else {\n result.parents = []\n }\n if (Array.isArray(input.permissionIds)) {\n result.permissionIds = [...input.permissionIds]\n } else {\n result.permissionIds = []\n }\n if (Array.isArray(input.permissions)) {\n result.permissions = input.permissions.map((i) => ({ ...i }))\n } else {\n result.permissions = []\n }\n if (input.capabilities) {\n result.capabilities = { ...input.capabilities }\n }\n if (input.lastModified) {\n result.lastModified = { ...input.lastModified }\n } else {\n result.lastModified = { user: '', time: 0, byMe: false }\n }\n if (typeof input.deleted === 'boolean') {\n result.deleted = input.deleted\n result.deletedInfo = input.deletedInfo ? { ...input.deletedInfo } : undefined\n }\n if (Array.isArray(input.labels)) {\n result.labels = [...input.labels]\n }\n if (typeof input.shortcutTarget === 'string') {\n result.shortcutTarget = input.shortcutTarget\n }\n return result\n }\n\n constructor(state?: Partial<FileSchema>) {\n const init = File.createSchema(state)\n super(init)\n this[parentsSymbol] = [...init.parents]\n this[permissionIdsSymbol] = [...init.permissionIds]\n this[permissionsSymbol] = init.permissions.map((i) => ({ ...i }))\n this[capabilitiesSymbol] = init.capabilities ? { ...init.capabilities } : undefined\n this[lastModifiedSymbol] = Object.freeze({ ...init.lastModified })\n if (typeof init.deleted === 'boolean') {\n this[deletedSymbol] = init.deleted\n this[deletedInfoSymbol] = init.deletedInfo ? Object.freeze({ ...init.deletedInfo }) : undefined\n }\n if (Array.isArray(init.labels)) {\n this.labels = [...init.labels]\n }\n }\n\n /**\n * @deprecated Use `createSchema()` and setup values in the constructor instead.\n */\n override new(init: FileSchema): this {\n super.new(init)\n const { permissions = [], parents = [], permissionIds = [], deleted, deletedInfo, lastModified, labels } = init\n this[permissionsSymbol] = permissions.map((i) => ({ ...i }))\n this[parentsSymbol] = [...parents]\n this[permissionIdsSymbol] = [...permissionIds]\n this[lastModifiedSymbol] = lastModified\n ? Object.freeze({ ...lastModified })\n : Object.freeze({ user: '', time: 0, byMe: false })\n if (typeof deleted === 'boolean') {\n this[deletedSymbol] = deleted\n this[deletedInfoSymbol] = deletedInfo ? Object.freeze({ ...deletedInfo }) : undefined\n } else {\n this[deletedSymbol] = undefined\n this[deletedInfoSymbol] = undefined\n }\n if (Array.isArray(labels)) {\n this.labels = [...labels]\n } else {\n this.labels = undefined\n }\n return this\n }\n\n override toJSON(): FileSchema {\n const result: FileSchema = {\n ...super.toJSON(),\n parents: [...this.parents],\n permissionIds: [...this.permissionIds],\n lastModified: { ...this.lastModified },\n permissions: [...this.permissions],\n }\n if (this.deleted) {\n result.deleted = this.deleted\n result.deletedInfo = { ...this.deletedInfo } as DeletionSchema\n }\n if (Array.isArray(this.labels)) {\n result.labels = [...this.labels]\n }\n return result\n }\n\n /**\n * @param name The name to set.\n * @param kind The kind of the file to create.\n */\n static fromName(name: string, kind: string): File {\n const definition = new File({ kind, info: { name } })\n return definition\n }\n\n shortcutTo(fileId: string): this {\n this.shortcutTarget = fileId\n return this\n }\n\n /**\n * Updates the \"lastModified\" value.\n * A helper method for a common task.\n *\n * @param user The user that modifies the entity.\n */\n setLastModified(user: UserSchema): void {\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"lastModified\".`)\n }\n this[lastModifiedSymbol] = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n }\n\n /**\n * Adds a label to the list of labels.\n *\n * It makes sure the value is a valid, non-empty string and the `labels` array is set.\n *\n * It does nothing when the label already exists.\n *\n * @param label The label to set.\n */\n addLabel(label: string): void {\n if (typeof label !== 'string') {\n throw new Error(`The label must be a string.`)\n }\n if (!label.trim()) {\n throw new Error(`The label is required.`)\n }\n if (!Array.isArray(this.labels)) {\n this.labels = []\n }\n if (this.labels.includes(label)) {\n return\n }\n this.labels.push(label)\n }\n\n /**\n * Marks the entity as deleted.\n *\n * A helper method for a common task.\n *\n * @param user The user that deletes the entity.\n */\n setDeleted(user: UserSchema): void {\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"deletedInfo\".`)\n }\n this[deletedSymbol] = true\n this[deletedInfoSymbol] = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n }\n\n isFile(): boolean {\n return this.kind !== FolderKind\n }\n\n isFolder(): boolean {\n return this.kind === FolderKind\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../src/models/store/File.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAoB,UAAU,EAAkB,MAAM,iBAAiB,CAAA;AAI9E,OAAO,EAAe,KAAK,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAyIlD,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACvC,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACvC,MAAM,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E,IAAI,CAAC,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAA;IACjC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAA;IACjC,CAAC;CACF","sourcesContent":["import { nanoid } from '../../nanoid.js'\nimport { PermissionSchema, Permission, PermissionRole } from './Permission.js'\nimport { ModificationSchema } from './Modification.js'\nimport { DeletionSchema } from './Deletion.js'\nimport { UserSchema } from './User.js'\nimport { ThingSchema, Thing } from '../Thing.js'\nimport { CapabilitiesSchema } from './Capabilities.js'\nimport { FolderKind, UserKind } from '../kinds.js'\n// this causes error\n// import { Kind as FolderKind } from '../Folder.js';\n\nexport interface FileAddOptions {\n /**\n * The parent folder where to put the file.\n * The `parents` array is always cleared from the file object before adding it to the store.\n */\n parent?: string\n}\n\nexport interface MediaReadOptions {\n /**\n * When set it reads the file that was marked as `_deleted`. By default it throws when file was deleted.\n */\n deleted?: boolean\n}\n\n/**\n * A breadcrumb when creating the breadcrumb list for a file.\n */\nexport interface FileBreadcrumb {\n /**\n * The datastore key of the object.\n */\n key: string\n /**\n * THe kind of the object.\n */\n kind: string\n /**\n * The name of the object.\n */\n name: string\n}\n\nexport interface StoredFileSchema {\n /**\n * The kind of the File\n */\n kind: string\n /**\n * The identifier of the entity\n */\n key: string\n /**\n * The file's meta info.\n */\n info: ThingSchema\n /**\n * The color of the icon to render for this file in the file explorer.\n * This should be a hex format, e.g.: #c00 for red.\n */\n iconColor?: string\n /**\n * Whether the file is a shortcut to another file.\n * Many properties cannot be changed of a shortcut, like, shortcuts cannot be shared.\n */\n isShortcut?: boolean\n /**\n * The ID of the target file.\n */\n shortcutTarget?: string\n}\n\n/**\n * @deprecated Use {@link StoredFileSchema} instead.\n */\nexport type IStoredFile = StoredFileSchema\n\n/**\n * An interface describing an object in the data store that\n * describes a file or an object that can be treated as a file or a folder.\n */\nexport interface FileSchema extends StoredFileSchema {\n /**\n * The list of parents of the object. It is an ordered list of parents\n * from the top (first element) to the lowest parent in the tree (last element).\n *\n * After creating the object, this property cannot be manipulated directly by the client.\n * Should be treated as opaque value.\n */\n parents: string[]\n /**\n * The list of permissions to this file object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n permissionIds: string[]\n /**\n * Whether the file object is deleted.\n */\n deleted?: boolean\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n deletedInfo?: DeletionSchema\n /**\n * The last modification made to this file.\n */\n lastModified: ModificationSchema\n /**\n * An arbitrary list of labels applied to the file.\n */\n labels?: string[]\n /**\n * This is populated when reading a file from the store.\n * A list of actions the user can perform on the file.\n *\n * This is a readonly field and it is ignored when creating / updating the file.\n */\n capabilities?: CapabilitiesSchema\n /**\n * Populated by the server when reading the file. The list of permissions to the object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n *\n * Data store implementation note, this is not stored in the store but it is populated\n * when reading the object.\n */\n permissions: PermissionSchema[]\n /**\n * Populated by the store in some situations. If it's missing then you should request\n * breadcrumbs from the store.\n */\n breadcrumb?: FileBreadcrumb[]\n}\n\n/**\n * @deprecated Use {@link FileSchema} instead.\n */\nexport type IFile = FileSchema\n\nconst parentsSymbol = Symbol('parents')\nconst deletedSymbol = Symbol('deleted')\nconst deletedInfoSymbol = Symbol('deletedInfo')\nconst lastModifiedSymbol = Symbol('lastModified')\nconst capabilitiesSymbol = Symbol('capabilities')\nconst permissionsSymbol = Symbol('permissions')\nconst permissionIdsSymbol = Symbol('permissionIds')\nconst shortcutTargetSymbol = Symbol('shortcutTarget')\n\nexport class StoredFile {\n /**\n * The kind of the File\n */\n kind = ''\n /**\n * The identifier of the entity\n */\n key = ''\n /**\n * The name of the environment.\n */\n info: Thing = Thing.fromName('')\n\n /**\n * The color of the icon to render for this file in the file explorer.\n */\n iconColor?: string\n\n /**\n * Whether the file is a shortcut to another file.\n * Many properties cannot be changed of a shortcut, like, shortcuts cannot be shared.\n */\n get isShortcut(): boolean {\n return !!this.shortcutTarget\n }\n\n [shortcutTargetSymbol]?: string\n\n /**\n * The ID of the target file.\n */\n get shortcutTarget(): string | undefined {\n return this[shortcutTargetSymbol]\n }\n\n set shortcutTarget(value: string | undefined) {\n this[shortcutTargetSymbol] = value\n }\n\n /**\n * Creates a file schema object with the given properties.\n * The `key` is generated if not set.\n *\n * @param input The input to create the file schema.\n * @returns The file schema object.\n */\n static createSchema(input: Partial<StoredFileSchema> = {}): StoredFileSchema {\n const { key = nanoid(), kind, iconColor, shortcutTarget } = input\n const result: StoredFileSchema = {\n key,\n kind: kind || '',\n info: Thing.fromJSON(input.info, { name: 'Unnamed file' }).toJSON(),\n }\n if (iconColor) {\n result.iconColor = iconColor\n }\n if (shortcutTarget) {\n result.isShortcut = true\n result.shortcutTarget = shortcutTarget\n }\n return result\n }\n\n constructor(state: StoredFileSchema) {\n this.kind = state.kind\n this.key = state.key\n this.info = new Thing(state.info)\n if (state.iconColor) {\n this.iconColor = state.iconColor\n }\n if (state.shortcutTarget) {\n this.shortcutTarget = state.shortcutTarget\n }\n }\n\n /**\n * @deprecated Use `createSchema()` and setup values in the constructor instead.\n */\n new(init: StoredFileSchema): this {\n const { key = nanoid(), info, kind, iconColor, shortcutTarget } = init\n this.key = key\n this.kind = kind\n if (info) {\n this.info = new Thing(info)\n } else {\n this.info = Thing.fromName('')\n }\n if (iconColor) {\n this.iconColor = iconColor\n } else {\n this.iconColor = undefined\n }\n if (shortcutTarget) {\n this.shortcutTarget = shortcutTarget\n } else {\n this.shortcutTarget = undefined\n }\n return this\n }\n\n toJSON(): StoredFileSchema {\n const result: StoredFileSchema = {\n key: this.key,\n kind: this.kind,\n info: this.info.toJSON(),\n }\n if (this.iconColor) {\n result.iconColor = this.iconColor\n }\n if (this.shortcutTarget) {\n result.isShortcut = true\n result.shortcutTarget = this.shortcutTarget\n }\n return result\n }\n\n /**\n * Creates the Capabilities object for a file giving user level.\n *\n * @param file The file object to create the capabilities to. The object is not mutated.\n * @param role The user role to the file.\n */\n static createFileCapabilities(file: StoredFileSchema | StoredFile, role?: PermissionRole): CapabilitiesSchema {\n const isCommenter = Permission.hasRole('commenter', role)\n const isOwner = Permission.hasRole('owner', role)\n const isReader = Permission.hasRole('reader', role)\n const isWriter = Permission.hasRole('writer', role)\n const isFolder = file.kind === FolderKind\n const result: CapabilitiesSchema = {\n canReadMedia: !isFolder && isReader,\n canListChildren: isFolder && isReader,\n canComment: !isFolder && isCommenter,\n canEditMedia: !isFolder && isWriter,\n canEditMeta: isWriter,\n canReadRevisions: isWriter,\n canAddChildren: isFolder && isWriter,\n canDelete: isOwner,\n canTrash: isOwner,\n canUntrash: isOwner,\n canShare: isWriter,\n canMove: isWriter,\n }\n return result\n }\n\n createFileCapabilities(role: PermissionRole): CapabilitiesSchema {\n return File.createFileCapabilities(this, role)\n }\n\n /**\n * Mutates the file object by setting the `byMe` properties (on deleted and modified info)\n *\n * Note, this can be done only on file schema (FileSchema). The `File` object has\n * this properties frozen.\n *\n * @param file The file to mutate\n * @param user The user key to compare.\n */\n static updateByMeMeta(file: FileSchema, user: string): void {\n if (file.deletedInfo) {\n file.deletedInfo.byMe = file.deletedInfo.user === user\n }\n if (file.lastModified) {\n file.lastModified.byMe = file.lastModified.user === user\n }\n }\n\n /**\n * Static method to set the `lastModified` property on a file without creating an instance of a file meta.\n * Useful when the meta kind is unknown.\n *\n * @param file The file to update. Note, this method mutates the file.\n * @param user The user that modifies the file.\n * @returns The same file.\n */\n static setLastModified(file: FileSchema, user: UserSchema): FileSchema {\n if (!file) {\n throw new Error(`The file is required.`)\n }\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"lastModified\".`)\n }\n file.lastModified = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n return file\n }\n\n /**\n * Similar to the instance method `setDeleted()` but without creating\n * an instance of the file when the type is unknown.\n *\n * @param file The file to change. Note, this operation mutates the file.\n * @param user The deleting user\n * @returns The same file reference.\n */\n static setDeleted(file: FileSchema, user: UserSchema): FileSchema {\n if (!file) {\n throw new Error(`The file is required.`)\n }\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"deletedInfo\".`)\n }\n file.deleted = true\n file.deletedInfo = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n return file\n }\n}\n\nexport class File extends StoredFile {\n [parentsSymbol]: string[] = []\n\n /**\n * The list of parents of the object. It is an ordered list of parents\n * from the top (first element) to the lowest parent in the tree (last element).\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get parents(): string[] {\n return this[parentsSymbol]\n }\n\n [permissionIdsSymbol]: readonly string[] = []\n\n /**\n * The list of permissions to this file object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get permissionIds(): readonly string[] {\n return this[permissionIdsSymbol]\n }\n\n [deletedSymbol]?: boolean\n\n /**\n * Whether the file object is deleted.\n */\n get deleted(): boolean {\n return this[deletedSymbol] || false\n }\n\n [deletedInfoSymbol]?: Readonly<DeletionSchema>\n\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n get deletedInfo(): Readonly<DeletionSchema> | undefined {\n return this[deletedInfoSymbol]\n }\n\n [lastModifiedSymbol]: Readonly<ModificationSchema> = { user: '', time: 0, byMe: false }\n\n /**\n * The last modification made to this file.\n */\n get lastModified(): Readonly<ModificationSchema> {\n return this[lastModifiedSymbol]\n }\n\n /**\n * An arbitrary list of labels applied to the file.\n */\n labels?: string[];\n\n [capabilitiesSymbol]?: Readonly<CapabilitiesSchema>\n\n /**\n * This is populated when reading a file from the store.\n * A list of actions the user can perform on the file.\n *\n * This is a readonly field and it is ignored when creating / updating the file.\n */\n get capabilities(): Readonly<CapabilitiesSchema> | undefined {\n return this[capabilitiesSymbol]\n }\n\n [permissionsSymbol]: readonly PermissionSchema[] = []\n\n /**\n * Populated by the server when reading the file. The list of permissions to the object.\n *\n * This property cannot be manipulated directly by the client. Should be treated as\n * opaque value.\n */\n get permissions(): readonly PermissionSchema[] {\n return this[permissionsSymbol]\n }\n\n static override createSchema(input: Partial<FileSchema> = {}): FileSchema {\n const result = StoredFile.createSchema(input) as FileSchema\n if (Array.isArray(input.parents)) {\n result.parents = [...input.parents]\n } else {\n result.parents = []\n }\n if (Array.isArray(input.permissionIds)) {\n result.permissionIds = [...input.permissionIds]\n } else {\n result.permissionIds = []\n }\n if (Array.isArray(input.permissions)) {\n result.permissions = input.permissions.map((i) => ({ ...i }))\n } else {\n result.permissions = []\n }\n if (input.capabilities) {\n result.capabilities = { ...input.capabilities }\n }\n if (input.lastModified) {\n result.lastModified = { ...input.lastModified }\n } else {\n result.lastModified = { user: '', time: 0, byMe: false }\n }\n if (typeof input.deleted === 'boolean') {\n result.deleted = input.deleted\n result.deletedInfo = input.deletedInfo ? { ...input.deletedInfo } : undefined\n }\n if (Array.isArray(input.labels)) {\n result.labels = [...input.labels]\n }\n if (typeof input.shortcutTarget === 'string') {\n result.shortcutTarget = input.shortcutTarget\n }\n return result\n }\n\n constructor(state?: Partial<FileSchema>) {\n const init = File.createSchema(state)\n super(init)\n this[parentsSymbol] = [...init.parents]\n this[permissionIdsSymbol] = [...init.permissionIds]\n this[permissionsSymbol] = init.permissions.map((i) => ({ ...i }))\n this[capabilitiesSymbol] = init.capabilities ? { ...init.capabilities } : undefined\n this[lastModifiedSymbol] = Object.freeze({ ...init.lastModified })\n if (typeof init.deleted === 'boolean') {\n this[deletedSymbol] = init.deleted\n this[deletedInfoSymbol] = init.deletedInfo ? Object.freeze({ ...init.deletedInfo }) : undefined\n }\n if (Array.isArray(init.labels)) {\n this.labels = [...init.labels]\n }\n }\n\n /**\n * @deprecated Use `createSchema()` and setup values in the constructor instead.\n */\n override new(init: FileSchema): this {\n super.new(init)\n const { permissions = [], parents = [], permissionIds = [], deleted, deletedInfo, lastModified, labels } = init\n this[permissionsSymbol] = permissions.map((i) => ({ ...i }))\n this[parentsSymbol] = [...parents]\n this[permissionIdsSymbol] = [...permissionIds]\n this[lastModifiedSymbol] = lastModified\n ? Object.freeze({ ...lastModified })\n : Object.freeze({ user: '', time: 0, byMe: false })\n if (typeof deleted === 'boolean') {\n this[deletedSymbol] = deleted\n this[deletedInfoSymbol] = deletedInfo ? Object.freeze({ ...deletedInfo }) : undefined\n } else {\n this[deletedSymbol] = undefined\n this[deletedInfoSymbol] = undefined\n }\n if (Array.isArray(labels)) {\n this.labels = [...labels]\n } else {\n this.labels = undefined\n }\n return this\n }\n\n override toJSON(): FileSchema {\n const result: FileSchema = {\n ...super.toJSON(),\n parents: [...this.parents],\n permissionIds: [...this.permissionIds],\n lastModified: { ...this.lastModified },\n permissions: [...this.permissions],\n }\n if (this.deleted) {\n result.deleted = this.deleted\n result.deletedInfo = { ...this.deletedInfo } as DeletionSchema\n }\n if (Array.isArray(this.labels)) {\n result.labels = [...this.labels]\n }\n return result\n }\n\n /**\n * @param name The name to set.\n * @param kind The kind of the file to create.\n */\n static fromName(name: string, kind: string): File {\n const definition = new File({ kind, info: { name } })\n return definition\n }\n\n shortcutTo(fileId: string): this {\n this.shortcutTarget = fileId\n return this\n }\n\n /**\n * Updates the \"lastModified\" value.\n * A helper method for a common task.\n *\n * @param user The user that modifies the entity.\n */\n setLastModified(user: UserSchema): void {\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"lastModified\".`)\n }\n this[lastModifiedSymbol] = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n }\n\n /**\n * Adds a label to the list of labels.\n *\n * It makes sure the value is a valid, non-empty string and the `labels` array is set.\n *\n * It does nothing when the label already exists.\n *\n * @param label The label to set.\n */\n addLabel(label: string): void {\n if (typeof label !== 'string') {\n throw new Error(`The label must be a string.`)\n }\n if (!label.trim()) {\n throw new Error(`The label is required.`)\n }\n if (!Array.isArray(this.labels)) {\n this.labels = []\n }\n if (this.labels.includes(label)) {\n return\n }\n this.labels.push(label)\n }\n\n /**\n * Marks the entity as deleted.\n *\n * A helper method for a common task.\n *\n * @param user The user that deletes the entity.\n */\n setDeleted(user: UserSchema): void {\n if (!user) {\n throw new Error(`The user is required.`)\n }\n if (user.kind !== UserKind) {\n throw new Error(`Invalid value for the user when setting \"deletedInfo\".`)\n }\n this[deletedSymbol] = true\n this[deletedInfoSymbol] = {\n byMe: false,\n time: Date.now(),\n user: user.key,\n name: user.name,\n }\n }\n\n isFile(): boolean {\n return this.kind !== FolderKind\n }\n\n isFolder(): boolean {\n return this.kind === FolderKind\n }\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DeletionSchema } from './Deletion.js';
|
|
2
2
|
import type { UserOrganizationGrantType } from './Organization.js';
|
|
3
|
+
import { UserKind } from '../kinds.js';
|
|
3
4
|
export interface EmailSchema {
|
|
4
5
|
/**
|
|
5
6
|
* When available the email of the user.
|
|
@@ -29,7 +30,6 @@ export interface UserPictureSchema {
|
|
|
29
30
|
* @deprecated Use {@link UserPictureSchema} instead.
|
|
30
31
|
*/
|
|
31
32
|
export type IUserPicture = UserPictureSchema;
|
|
32
|
-
export declare const Kind = "Core#User";
|
|
33
33
|
export type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending';
|
|
34
34
|
/**
|
|
35
35
|
* Represents a user in the system.
|
|
@@ -40,7 +40,7 @@ export type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending';
|
|
|
40
40
|
* identity providers. However, this is not exposed to the user through the API.
|
|
41
41
|
*/
|
|
42
42
|
export interface UserSchema {
|
|
43
|
-
kind: typeof
|
|
43
|
+
kind: typeof UserKind;
|
|
44
44
|
/**
|
|
45
45
|
* The data store key of the user.
|
|
46
46
|
*/
|
|
@@ -52,7 +52,7 @@ export interface UserSchema {
|
|
|
52
52
|
/**
|
|
53
53
|
* When available the email of the user.
|
|
54
54
|
*/
|
|
55
|
-
email:
|
|
55
|
+
email: EmailSchema[];
|
|
56
56
|
/**
|
|
57
57
|
* The user picture to render.
|
|
58
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,WAAW,CAAA;AAEhC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAA;AAE5C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,QAAQ,CAAA;IACrB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,UAAU,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=User.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeletionSchema } from './Deletion.js'\nimport type { UserOrganizationGrantType } from './Organization.js'\nimport { UserKind } from '../kinds.js'\n\nexport interface EmailSchema {\n /**\n * When available the email of the user.\n */\n email: string\n /**\n * Whether the `email` was verified.\n * Not verified emails should have limited use in the system.\n */\n verified?: boolean\n}\n\n/**\n * @deprecated Use {@link EmailSchema} instead.\n */\nexport type IEmail = EmailSchema\n\nexport interface UserPictureSchema {\n /**\n * When available, the URL to the user's picture image.\n */\n url?: string\n /**\n * Alternative to the `url`. When set it is a data URL value of the image.\n */\n data?: string\n}\n\n/**\n * @deprecated Use {@link UserPictureSchema} instead.\n */\nexport type IUserPicture = UserPictureSchema\n\nexport type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending'\n\n/**\n * Represents a user in the system.\n * This can be embedded in various situations like project's revision history,\n * ACL, Authorization, etc.\n *\n * Note, the store implementation may have additional fields that support external\n * identity providers. However, this is not exposed to the user through the API.\n */\nexport interface UserSchema {\n kind: typeof UserKind\n /**\n * The data store key of the user.\n */\n key: string\n /**\n * The display name of the user.\n */\n name: string\n /**\n * When available the email of the user.\n */\n email: EmailSchema[]\n /**\n * The user picture to render.\n */\n picture?: UserPictureSchema\n /**\n * A general purpose tags field.\n */\n tags?: string[]\n /**\n * Optional user locale information.\n */\n locale?: string\n /**\n * Optional metadata related to the auth provider.\n */\n provider?: unknown\n /**\n * Whether the user is deleted from the system.\n * @deprecated Use `status` instead.\n */\n deleted?: boolean\n /**\n * The timestamp of when the user was deleted.\n * @deprecated\n */\n deletedTime?: number\n /**\n * The id of the user that deleted the user.\n * @deprecated\n */\n deletingUser?: string\n /**\n * The status of the user.\n * May not be populated in all cases.\n * @default 'active'\n */\n status?: UserStatus\n /**\n * Populated when the user object is considered in the context of an organization.\n * This is used to determine the user's role in the organization.\n */\n grantType?: UserOrganizationGrantType\n /**\n * Populated when the user object is considered in the context of an organization.\n * The timestamp of when the user joined the organization.\n */\n joined?: number\n /**\n * The timestamp of when the user was created.\n */\n created: number\n /**\n * The timestamp of when the user was last updated.\n */\n updated: number\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n deletedInfo?: DeletionSchema\n}\n\n/**\n * @deprecated Use {@link UserSchema} instead.\n */\nexport type IUser = UserSchema\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { ServerEvent, ServerPatchEvent, ServerDeleteEvent } from './Backend.js';
|
|
2
|
+
export { type CapabilitiesSchema } from './Capabilities.js';
|
|
3
|
+
export { type CustomDomainSchema, CustomDomain } from './CustomDomain.js';
|
|
4
|
+
export type { PublishedDataDomain, UnresolvedDependency } from './DataCatalog.js';
|
|
5
|
+
export { type DeletionSchema } from './Deletion.js';
|
|
6
|
+
export { type DeploymentSchema, DeploymentStatus, DeploymentEnvironment, Deployment } from './Deployment.js';
|
|
7
|
+
export { type DeploymentCustomDomainSchema, SslStatus, DeploymentCustomDomain } from './DeploymentCustomDomain.js';
|
|
8
|
+
export { File, StoredFile, type FileSchema, type StoredFileSchema, type FileAddOptions, type FileBreadcrumb, type MediaReadOptions, } from './File.js';
|
|
9
|
+
export { type GroupSchema, Group } from './Group.js';
|
|
10
|
+
export { type InvitationSchema, type InvitationStatus, Invitation } from './Invitation.js';
|
|
11
|
+
export { type ModificationSchema } from './Modification.js';
|
|
12
|
+
export { type OrganizationSchema, type OrganizationSlugValidateResponse, Organization, type UserOrganizationGrantType, } from './Organization.js';
|
|
13
|
+
export { type IAccessAddOperation, type IAccessOperation, type IAccessUpdateOperation, type IAccessRemoveOperation, Permission, type IPermission, type PermissionSchema, type AccessOperation, Kind as PermissionKind, type PermissionRole, type PermissionType, type PermissionSourceRule, } from './Permission.js';
|
|
14
|
+
export { type IRevision, type IRevisionListItem } from './Revision.js';
|
|
15
|
+
export { type UserSchema, type EmailSchema, type UserPictureSchema, type UserStatus } from './User.js';
|
|
16
|
+
export { type UserIdentitySchema, Kind as UserIdentityKind, UserIdentity } from './UserIdentity.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACpF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,E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AAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtG,OAAO,EAAE,KAAK,kBAAkB,EAAE,IAAI,IAAI,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { CustomDomain } from './CustomDomain.js';
|
|
2
|
+
export { DeploymentStatus, DeploymentEnvironment, Deployment } from './Deployment.js';
|
|
3
|
+
export { SslStatus, DeploymentCustomDomain } from './DeploymentCustomDomain.js';
|
|
4
|
+
export { File, StoredFile, } from './File.js';
|
|
5
|
+
export { Group } from './Group.js';
|
|
6
|
+
export { Invitation } from './Invitation.js';
|
|
7
|
+
export { Organization, } from './Organization.js';
|
|
8
|
+
export { Permission, Kind as PermissionKind, } from './Permission.js';
|
|
9
|
+
export { Kind as UserIdentityKind, UserIdentity } from './UserIdentity.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/store/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGzE,OAAO,EAAyB,gBAAgB,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAqC,SAAS,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAClH,OAAO,EACL,IAAI,EACJ,UAAU,GAMX,MAAM,WAAW,CAAA;AAClB,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAgD,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE1F,OAAO,EAGL,YAAY,GAEb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAKL,UAAU,EAIV,IAAI,IAAI,cAAc,GAIvB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAA2B,IAAI,IAAI,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA","sourcesContent":["export type { ServerEvent, ServerPatchEvent, ServerDeleteEvent } from './Backend.js'\nexport { type CapabilitiesSchema } from './Capabilities.js'\nexport { type CustomDomainSchema, CustomDomain } from './CustomDomain.js'\nexport type { PublishedDataDomain, UnresolvedDependency } from './DataCatalog.js'\nexport { type DeletionSchema } from './Deletion.js'\nexport { type DeploymentSchema, DeploymentStatus, DeploymentEnvironment, Deployment } from './Deployment.js'\nexport { type DeploymentCustomDomainSchema, SslStatus, DeploymentCustomDomain } from './DeploymentCustomDomain.js'\nexport {\n File,\n StoredFile,\n type FileSchema,\n type StoredFileSchema,\n type FileAddOptions,\n type FileBreadcrumb,\n type MediaReadOptions,\n} from './File.js'\nexport { type GroupSchema, Group } from './Group.js'\nexport { type InvitationSchema, type InvitationStatus, Invitation } from './Invitation.js'\nexport { type ModificationSchema } from './Modification.js'\nexport {\n type OrganizationSchema,\n type OrganizationSlugValidateResponse,\n Organization,\n type UserOrganizationGrantType,\n} from './Organization.js'\nexport {\n type IAccessAddOperation,\n type IAccessOperation,\n type IAccessUpdateOperation,\n type IAccessRemoveOperation,\n Permission,\n type IPermission,\n type PermissionSchema,\n type AccessOperation,\n Kind as PermissionKind,\n type PermissionRole,\n type PermissionType,\n type PermissionSourceRule,\n} from './Permission.js'\nexport { type IRevision, type IRevisionListItem } from './Revision.js'\nexport { type UserSchema, type EmailSchema, type UserPictureSchema, type UserStatus } from './User.js'\nexport { type UserIdentitySchema, Kind as UserIdentityKind, UserIdentity } from './UserIdentity.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACvE,mBAAmB,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,WAAW,EAAE,MAAM,kBAAkB,CAAA","sourcesContent":["export { type PatchClientOptions, PatchClient } from './PatchClient.js'\nexport type * from './types.js'\n"]}
|
|
@@ -54,7 +54,7 @@ export declare class DeploymentsSdk extends SdkBase {
|
|
|
54
54
|
* @param request Optional SDK options
|
|
55
55
|
*/
|
|
56
56
|
listAllForApi: (oid: string, apiId: string, request?: SdkOptions) => Promise<ContextListResult<DeploymentSchema>>;
|
|
57
|
-
|
|
57
|
+
listForEnvironment: (oid: string, apiId: string, env: DeploymentEnvironment, options?: ContextListOptions, request?: SdkOptions) => Promise<ContextListResult<DeploymentSchema>>;
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
//# sourceMappingURL=DeploymentsSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentsSdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/DeploymentsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,cAAc,CAAA;AAE1E,OAAO,EAAE,qBAAqB,EAAkB,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAEvG,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEpF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,GAAG,EAAE,qBAAqB,CAAA;CAC3B;AAED,qBAAa,cAAe,SAAQ,OAAO;IACnC,IAAI,CACR,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,kBAAuB,EAChC,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CA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/C;;;;;;OAMG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAqChH;;;;;;OAMG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgBzF;;;;OAIG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAYnF,IAAI;QACF;;;;;;;WAOG;6BAEI,MAAM,SACJ,MAAM,YACJ,UAAU,KAClB,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;kCAQxC,MAAM,SACJ,MAAM,OACR,qBAAqB,YACjB,kBAAkB,YAClB,UAAU,KAClB,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;MAOhD;CACF"}
|
|
@@ -105,8 +105,9 @@ export class DeploymentsSdk extends SdkBase {
|
|
|
105
105
|
const result = await this.sdk.http.get(url.toString(), { token });
|
|
106
106
|
return this.processListResponse(result, 'Unable to list environment deployments for an API. ');
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
listForEnvironment: async (oid, apiId, env, options = {}, request = {}) => {
|
|
109
109
|
const url = this.sdk.getUrl(RouteBuilder.deploymentsApisForEnv(oid, apiId, env));
|
|
110
|
+
this.sdk.appendListOptions(url, options);
|
|
110
111
|
const { token = this.sdk.token } = request;
|
|
111
112
|
const result = await this.sdk.http.get(url.toString(), { token });
|
|
112
113
|
return this.processListResponse(result, 'Unable to list environment deployments for an API. ');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentsSdk.js","sourceRoot":"","sources":["../../../src/sdk/DeploymentsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,E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qBAAqB,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;YAChF,MAAM,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAA;YAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;YACjE,OAAO,IAAI,CAAC,mBAAmB,CAAmB,MAAM,EAAE,qDAAqD,CAAC,CAAA;QAClH,CAAC;KACF,CAAA;CACF","sourcesContent":["import { SdkBase, type SdkOptions, E_RESPONSE_STATUS } from './SdkBase.js'\nimport { RouteBuilder } from './RouteBuilder.js'\nimport { DeploymentEnvironment, DeploymentKind, DeploymentSchema } from '../models/store/Deployment.js'\nimport { Exception } from '../exceptions/exception.js'\nimport type { ContextListOptions, ContextListResult } from '../events/BaseEvents.js'\n\nexport interface CreateDeploymentPayload {\n /**\n * API file ID\n */\n fid: string\n /**\n * API deployment version (e.g. \"v1\", \"v2\")\n * It is optional for non production environments (e.g. 'dev').\n */\n version?: string\n /**\n * API model version (e.g. \"3.1.2\", \"4.0.0\")\n */\n modelVersion: string\n /**\n * Target environment tag (e.g. \"prod\", \"staging\", \"dev\")\n */\n env: DeploymentEnvironment\n}\n\nexport class DeploymentsSdk extends SdkBase {\n async list(\n oid: string,\n options: ContextListOptions = {},\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> {\n const { token = this.sdk.token } = request\n const url = this.sdk.getUrl(RouteBuilder.deployments(oid))\n this.sdk.appendListOptions(url, options)\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list deployments. ')\n }\n\n /**\n * Triggers the creation of a new deployment.\n *\n * @param oid The parent organization key\n * @param payload The deployment payload\n * @param request Optional SDK options\n */\n async create(oid: string, payload: CreateDeploymentPayload, request: SdkOptions = {}): Promise<DeploymentSchema> {\n // Let's do some basic validation before hitting the API endpoint.\n if (payload.env === DeploymentEnvironment.PROD && !payload.version) {\n throw new Exception(`Version must not be empty for production environment: ${payload.env}`, {\n code: 'INVALID_DEPLOYMENT_VERSION',\n help: 'Please provide a version for production environment',\n status: 400,\n })\n } else if (payload.env !== DeploymentEnvironment.PROD && payload.version) {\n throw new Exception(`Version must not be present for non-production environment: ${payload.env}`, {\n code: 'INVALID_DEPLOYMENT_VERSION',\n help: 'Please remove the version for non-production environment',\n status: 400,\n })\n }\n const url = this.sdk.getUrl(RouteBuilder.deployments(oid))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.post(url.toString(), {\n token,\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n },\n })\n\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to create a deployment. '\n // It is accepted for async processing.\n if (result.status !== 202) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n const data = this.readResponseJSON<DeploymentSchema>(result, E_PREFIX)\n this.assertObjectKind(E_PREFIX, DeploymentKind, data.kind)\n return data\n }\n\n /**\n * Reads the status of an API deployment.\n *\n * @param oid The parent organization key\n * @param did The deployment ID\n * @param request Optional SDK options\n */\n async read(oid: string, did: string, request: SdkOptions = {}): Promise<DeploymentSchema> {\n const url = this.sdk.getUrl(RouteBuilder.deployment(oid, did))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to read a deployment. '\n if (result.status !== 200) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n const data = this.readResponseJSON<DeploymentSchema>(result, E_PREFIX)\n this.assertObjectKind(E_PREFIX, DeploymentKind, data.kind)\n return data\n }\n\n /**\n * Deactivates a deployment. Essentially it disables the version of an API.\n * @param oid The organization ID\n * @param did The deployment ID\n */\n async deactivate(oid: string, did: string, request: SdkOptions = {}): Promise<void> {\n const url = this.sdk.getUrl(RouteBuilder.deployment(oid, did))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.delete(url.toString(), { token })\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to deactivate a deployment. '\n if (result.status !== 204) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n }\n\n apis = {\n /**\n * Lists deployments for a given API, with one entry per environment.\n * This is used to display the list of environments for a given API.\n *\n * @param oid The organization ID\n * @param apiId The API ID\n * @param request Optional SDK options\n */\n listAllForApi: async (\n oid: string,\n apiId: string,\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> => {\n const url = this.sdk.getUrl(RouteBuilder.deploymentsApisByEnv(oid, apiId))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list environment deployments for an API. ')\n },\n\n listAllForEnvironment: async (\n oid: string,\n apiId: string,\n env: DeploymentEnvironment,\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> => {\n const url = this.sdk.getUrl(RouteBuilder.deploymentsApisForEnv(oid, apiId, env))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list environment deployments for an API. ')\n },\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DeploymentsSdk.js","sourceRoot":"","sources":["../../../src/sdk/DeploymentsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAoB,MAAM,+BAA+B,CAAA;AACvG,OAAO,EAAE,SAAS,EAAE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IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAA;YAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;YACjE,OAAO,IAAI,CAAC,mBAAmB,CAAmB,MAAM,EAAE,qDAAqD,CAAC,CAAA;QAClH,CAAC;KACF,CAAA;CACF","sourcesContent":["import { SdkBase, type SdkOptions, E_RESPONSE_STATUS } from './SdkBase.js'\nimport { RouteBuilder } from './RouteBuilder.js'\nimport { DeploymentEnvironment, DeploymentKind, DeploymentSchema } from '../models/store/Deployment.js'\nimport { Exception } from '../exceptions/exception.js'\nimport type { ContextListOptions, ContextListResult } from '../events/BaseEvents.js'\n\nexport interface CreateDeploymentPayload {\n /**\n * API file ID\n */\n fid: string\n /**\n * API deployment version (e.g. \"v1\", \"v2\")\n * It is optional for non production environments (e.g. 'dev').\n */\n version?: string\n /**\n * API model version (e.g. \"3.1.2\", \"4.0.0\")\n */\n modelVersion: string\n /**\n * Target environment tag (e.g. \"prod\", \"staging\", \"dev\")\n */\n env: DeploymentEnvironment\n}\n\nexport class DeploymentsSdk extends SdkBase {\n async list(\n oid: string,\n options: ContextListOptions = {},\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> {\n const { token = this.sdk.token } = request\n const url = this.sdk.getUrl(RouteBuilder.deployments(oid))\n this.sdk.appendListOptions(url, options)\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list deployments. ')\n }\n\n /**\n * Triggers the creation of a new deployment.\n *\n * @param oid The parent organization key\n * @param payload The deployment payload\n * @param request Optional SDK options\n */\n async create(oid: string, payload: CreateDeploymentPayload, request: SdkOptions = {}): Promise<DeploymentSchema> {\n // Let's do some basic validation before hitting the API endpoint.\n if (payload.env === DeploymentEnvironment.PROD && !payload.version) {\n throw new Exception(`Version must not be empty for production environment: ${payload.env}`, {\n code: 'INVALID_DEPLOYMENT_VERSION',\n help: 'Please provide a version for production environment',\n status: 400,\n })\n } else if (payload.env !== DeploymentEnvironment.PROD && payload.version) {\n throw new Exception(`Version must not be present for non-production environment: ${payload.env}`, {\n code: 'INVALID_DEPLOYMENT_VERSION',\n help: 'Please remove the version for non-production environment',\n status: 400,\n })\n }\n const url = this.sdk.getUrl(RouteBuilder.deployments(oid))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.post(url.toString(), {\n token,\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n },\n })\n\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to create a deployment. '\n // It is accepted for async processing.\n if (result.status !== 202) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n const data = this.readResponseJSON<DeploymentSchema>(result, E_PREFIX)\n this.assertObjectKind(E_PREFIX, DeploymentKind, data.kind)\n return data\n }\n\n /**\n * Reads the status of an API deployment.\n *\n * @param oid The parent organization key\n * @param did The deployment ID\n * @param request Optional SDK options\n */\n async read(oid: string, did: string, request: SdkOptions = {}): Promise<DeploymentSchema> {\n const url = this.sdk.getUrl(RouteBuilder.deployment(oid, did))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to read a deployment. '\n if (result.status !== 200) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n const data = this.readResponseJSON<DeploymentSchema>(result, E_PREFIX)\n this.assertObjectKind(E_PREFIX, DeploymentKind, data.kind)\n return data\n }\n\n /**\n * Deactivates a deployment. Essentially it disables the version of an API.\n * @param oid The organization ID\n * @param did The deployment ID\n */\n async deactivate(oid: string, did: string, request: SdkOptions = {}): Promise<void> {\n const url = this.sdk.getUrl(RouteBuilder.deployment(oid, did))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.delete(url.toString(), { token })\n this.inspectCommonStatusCodes(result)\n const E_PREFIX = 'Unable to deactivate a deployment. '\n if (result.status !== 204) {\n this.logInvalidResponse(result)\n throw this.createApiError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.body)\n }\n }\n\n apis = {\n /**\n * Lists deployments for a given API, with one entry per environment.\n * This is used to display the list of environments for a given API.\n *\n * @param oid The organization ID\n * @param apiId The API ID\n * @param request Optional SDK options\n */\n listAllForApi: async (\n oid: string,\n apiId: string,\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> => {\n const url = this.sdk.getUrl(RouteBuilder.deploymentsApisByEnv(oid, apiId))\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list environment deployments for an API. ')\n },\n\n listForEnvironment: async (\n oid: string,\n apiId: string,\n env: DeploymentEnvironment,\n options: ContextListOptions = {},\n request: SdkOptions = {}\n ): Promise<ContextListResult<DeploymentSchema>> => {\n const url = this.sdk.getUrl(RouteBuilder.deploymentsApisForEnv(oid, apiId, env))\n this.sdk.appendListOptions(url, options)\n const { token = this.sdk.token } = request\n const result = await this.sdk.http.get(url.toString(), { token })\n return this.processListResponse<DeploymentSchema>(result, 'Unable to list environment deployments for an API. ')\n },\n }\n}\n"]}
|