@apple/cktool.api.database

中文文档
1.3.2发布于 2022/06/04SEE LICENSE IN LICENSE.mdTypeScriptESM + CJS近 30 天下载 2586

Apple CKTool JS 'database' API

原始使用文档
文档目录4 节
  1. Getting Started
  2. API Promise Mixin
  3. Methods
  4. TypeScript Types

CKTool JS - "database" API Package

This package is part of the CKTool JS JavaScript client library suite and includes operations and TypeScript types related to "database".

Each operation has a corresponding function that returns a CancellablePromise that resolves if successful and rejects if the operation fails.

Don't use this package on its own. It is automatically pulled in when you include @apple/cktool.database in your package.json dependencies.

Getting Started

See Apple Developer Documentation for more details on how to get started using CKTool JS.

API Promise Mixin

DatabasePromisesApiMixin

Don't use this mixin directly. Instead, use PromisesApi from @apple/cktool.database.

Methods

The following methods are added by the mixin.

  • acceptRecord Accepts a share on behalf of the current user.
  • createAssetUploadUrl Creates a new URL for uploading assets.
  • createRecord Creates a new record.
  • createZone Creates a new zone.
  • deleteRecord Deletes a single record.
  • deleteRecordsByQuery Deletes records matching the provided query.
  • deleteZone Deletes a zone.
  • exportSchema Downloads the container’s schema.
  • getRecord Returns a record's details.
  • getSessionUser Returns details for the user in current session.
  • getZone Returns details for a zone.
  • getZones Returns a collection of zones.
  • importSchema Uploads a file that defines the new schema for the container.
  • lookupRecords Fetches multiple records by record name.
  • queryRecordChanges Returns records that changed since a specified sync token or since a zone was created.
  • queryRecords Returns a collection of records matching the provided query.
  • resetConfigToProduction Resets the container configuration to production.
  • resetToProduction Resets the schema of the environment to production.
  • resolveRecord Fetches information about records given their shortGuid properties.
  • updateRecord Updates an existing record.
  • validateSchema Validates the uploaded schema file for the container.

TypeScript Types

  • CKDBAsset
  • CKDBAssetUploadUrlResponse
  • CKDBBatchDeleteError
  • CKDBChangeMetadata
  • CKDBCreateAssetUploadUrlRequestBody
  • CKDBCreateRecordRequestBody
  • CKDBCreateZoneRequestBody
  • CKDBDeleteRecordsByQueryRequestBody
  • CKDBDeletedRecordResult
  • CKDBErrorRecordResult
  • CKDBExistingRecordResult
  • CKDBForRecord
  • CKDBLocation
  • CKDBLookupRecordsRequestBody
  • CKDBLookupRecordsResponse
  • CKDBModifyRecordRequestBody
  • CKDBNullableReference
  • CKDBPagedBatchDeleteResponse
  • CKDBPermissionType
  • CKDBQuery
  • CKDBQueryFilter
  • CKDBQueryFilterType
  • CKDBQueryRecordsRequestBody
  • CKDBQuerySort
  • CKDBQuerySortOrder
  • CKDBRecord
  • CKDBRecordChangesRequestBody
  • CKDBRecordChangesResponse
  • CKDBRecordFieldAssetListValue
  • CKDBRecordFieldAssetValue
  • CKDBRecordFieldBytesListValue
  • CKDBRecordFieldBytesValue
  • CKDBRecordFieldDoubleListValue
  • CKDBRecordFieldDoubleValue
  • CKDBRecordFieldEmptyListValue
  • CKDBRecordFieldEncryptedBytesListValue
  • CKDBRecordFieldEncryptedBytesValue
  • CKDBRecordFieldEncryptedDoubleListValue
  • CKDBRecordFieldEncryptedDoubleValue
  • CKDBRecordFieldEncryptedInt64ListValue
  • CKDBRecordFieldEncryptedInt64Value
  • CKDBRecordFieldEncryptedLocationListValue
  • CKDBRecordFieldEncryptedLocationValue
  • CKDBRecordFieldEncryptedStringListValue
  • CKDBRecordFieldEncryptedStringValue
  • CKDBRecordFieldEncryptedTimestampListValue
  • CKDBRecordFieldEncryptedTimestampValue
  • CKDBRecordFieldInt64ListValue
  • CKDBRecordFieldInt64Value
  • CKDBRecordFieldLocationListValue
  • CKDBRecordFieldLocationValue
  • CKDBRecordFieldReferenceListValue
  • CKDBRecordFieldReferenceValue
  • CKDBRecordFieldStringListValue
  • CKDBRecordFieldStringValue
  • CKDBRecordFieldTimestampListValue
  • CKDBRecordFieldTimestampValue
  • CKDBRecordFieldValue
  • CKDBRecordReference
  • CKDBRecordReferenceAction
  • CKDBRecordResponse
  • CKDBRecordResult
  • CKDBRecordsResponse
  • CKDBResolveRecordRequestBody
  • CKDBResolveRecordResponse
  • CKDBResolvedRecord
  • CKDBSchemaImportRequestBody
  • CKDBSessionUser
  • CKDBSessionUserResponse
  • CKDBShareAcceptanceStatus
  • CKDBShareParticipant
  • CKDBShareParticipantType
  • CKDBSharePotentialParticipant
  • CKDBStableUrl
  • CKDBStreamingAsset
  • CKDBUserIdentity
  • CKDBUserIdentityLookupInfo
  • CKDBUserNameComponents
  • CKDBValidateSchemaResponse
  • CKDBZone
  • CKDBZoneId
  • CKDBZoneResponse
  • CKDBZonesResponse

版本与发布记录

@apple/cktool.api.database 共发布 7 个版本,首次发布于 2021/12/01;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.3.2latest2022/06/044 年前
1.2.3412022/04/264 年前
1.2.282021/12/034 年前
1.2.152021/12/014 年前
1.2.132021/12/014 年前
1.2.72021/12/014 年前

关于 @apple/cktool.api.database 的常见问题

@apple/cktool.api.database 是什么?

Apple CKTool JS 'database' API

如何安装 @apple/cktool.api.database?

在项目目录运行 npm install @apple/cktool.api.database,或使用 pnpm add / yarn add / bun add。

@apple/cktool.api.database 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@apple/cktool.api.database 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@apple/cktool.api.database 可以商用吗?

@apple/cktool.api.database 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@apple/cktool.api.database 的下载量有多少?

根据 npm 官方下载统计,@apple/cktool.api.database 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,586 次,日均约 86 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apple/cktool.api.database 还在维护吗?

最新版本 1.3.2 发布于 2022/06/04(4 年前);至今共发布 7 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/12/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。