Skip to content

Commit

Permalink
Update several tags in common and frontend @beta to public (#1068)
Browse files Browse the repository at this point in the history
* update common and frontend tags to @public

* rush change

* make StandaloneDb public

* doc cleanup

* spelling errors

* doc link errors

* update ColorDef doc

* rush change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
kabentley and mergify[bot] committed Mar 31, 2021
1 parent b477bd9 commit ba61ead
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 63 deletions.
2 changes: 1 addition & 1 deletion common/api/imodeljs-backend.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4080,7 +4080,7 @@ export enum SqliteValueType {
String = 3
}

// @internal
// @public
export class StandaloneDb extends IModelDb {
get changeSetId(): undefined;
static createEmpty(filePath: string, args: CreateEmptyStandaloneIModelProps): StandaloneDb;
Expand Down
22 changes: 11 additions & 11 deletions common/api/imodeljs-common.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ export enum DownloadBriefcaseStatus {
// @beta
export type DPoint2dProps = number[];

// @beta
// @public
export const Easing: {
Linear: {
None: (k: number) => number;
Expand Down Expand Up @@ -1994,7 +1994,7 @@ export const Easing: {
};
};

// @beta (undocumented)
// @public (undocumented)
export type EasingFunction = (k: number) => number;

// @public
Expand Down Expand Up @@ -3779,7 +3779,7 @@ export abstract class IModel implements IModelProps {
toJSON(): IModelConnectionProps;
}

// @alpha (undocumented)
// @public
export type IModelConnectionProps = IModelProps & IModelRpcProps;

// @beta
Expand Down Expand Up @@ -4040,7 +4040,7 @@ export enum InternetConnectivityStatus {
Online = 0
}

// @beta
// @public
export const Interpolation: {
Linear: (v: any, k: number) => number;
Bezier: (v: any, k: number) => number;
Expand All @@ -4053,7 +4053,7 @@ export const Interpolation: {
};
};

// @beta (undocumented)
// @public (undocumented)
export type InterpolationFunction = (v: any, k: number) => number;

// @internal (undocumented)
Expand Down Expand Up @@ -5730,7 +5730,7 @@ export interface RelatedElementProps {
export interface RelationshipProps extends EntityProps, SourceAndTarget {
}

// @beta
// @public
export type RemoveFunction = () => void;

// @beta
Expand Down Expand Up @@ -7001,7 +7001,7 @@ export interface SpatialViewDefinitionProps extends ViewDefinition3dProps {
modelSelectorId: Id64String;
}

// @beta
// @public
export type StandaloneOpenOptions = OpenDbKey;

// @beta
Expand Down Expand Up @@ -7629,7 +7629,7 @@ export enum TreeFlags {
UseProjectExtents = 1
}

// @beta
// @public
export class Tween {
constructor(_group: Tweens, _object: any);
// (undocumented)
Expand Down Expand Up @@ -7684,10 +7684,10 @@ export class Tween {
yoyo(yoyo: boolean): this;
}

// @beta (undocumented)
// @public (undocumented)
export type TweenCallback = (obj: any) => void;

// @beta
// @public
export class Tweens {
// (undocumented)
add(tween: Tween): void;
Expand Down Expand Up @@ -7767,7 +7767,7 @@ export enum TypeOfChange {
Property = 1
}

// @beta (undocumented)
// @public (undocumented)
export type UpdateCallback = (obj: any, t: number) => void;

// @beta
Expand Down
7 changes: 3 additions & 4 deletions common/api/imodeljs-frontend.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1209,10 +1209,10 @@ export function areaToEyeHeight(view3d: ViewState3d, area: GlobalLocationArea, o
// @internal
export function areaToEyeHeightFromGcs(view3d: ViewState3d, area: GlobalLocationArea, offset?: number): Promise<number>;

// @beta
// @public
export type AsyncFunction = (...args: any) => Promise<any>;

// @beta
// @public
export type AsyncMethodsOf<T> = {
[P in keyof T]: T[P] extends AsyncFunction ? P : never;
}[keyof T];
Expand Down Expand Up @@ -1648,7 +1648,6 @@ export class BriefcaseConnection extends IModelConnection {
// (undocumented)
protected _isClosed?: boolean;
static openFile(briefcaseProps: OpenBriefcaseProps): Promise<BriefcaseConnection>;
// @internal
static openStandalone(filePath: string, openMode?: OpenMode, opts?: StandaloneOpenOptions): Promise<BriefcaseConnection>;
// @beta
pullAndMergeChanges(version?: IModelVersionProps): Promise<void>;
Expand Down Expand Up @@ -7110,7 +7109,7 @@ export enum PrimitiveVisibility {
Uninstanced = 2
}

// @beta
// @public
export type PromiseReturnType<T extends AsyncFunction> = T extends (...args: any) => Promise<infer R> ? R : any;

// @internal (undocumented)
Expand Down
2 changes: 1 addition & 1 deletion common/api/summary/imodeljs-backend.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ internal;SqliteStatement
internal;SqliteStatementCache
internal;SqliteValue
internal;SqliteValueType
internal;StandaloneDb
public;StandaloneDb
internal;StringParam
public;SubCategory
public;Subject
Expand Down
22 changes: 11 additions & 11 deletions common/api/summary/imodeljs-common.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public;DisplayStyleSubCategoryProps
beta;DomainOptions
internal;DownloadBriefcaseStatus
beta;DPoint2dProps = number[]
beta;Easing:
beta;EasingFunction = (k: number) => number
public;Easing:
public;EasingFunction = (k: number) => number
public;EcefLocation
public;EcefLocationProps
public;ECJsNames
Expand Down Expand Up @@ -250,7 +250,7 @@ public;ImageSourceFormat
internal;ImdlFlags
internal;ImdlHeader
public;class IModel
alpha;IModelConnectionProps = IModelProps & IModelRpcProps
public;IModelConnectionProps = IModelProps & IModelRpcProps
beta;IModelCoordinatesRequestProps
beta;IModelCoordinatesResponseProps
public;IModelEncryptionProps
Expand All @@ -271,8 +271,8 @@ public;InformationPartitionElementProps
internal;initializeRpcRequest: () => void
internal;INSTANCE: unique symbol
beta;InternetConnectivityStatus
beta;Interpolation:
beta;InterpolationFunction = (v: any, k: number) => number
public;Interpolation:
public;InterpolationFunction = (v: any, k: number) => number
internal;IpcAppChannel
internal;IpcAppFunctions
internal;IpcAppNotifications
Expand Down Expand Up @@ -414,7 +414,7 @@ internal;REGISTRY: unique symbol
public;RelatedElement
public;RelatedElementProps
public;RelationshipProps
beta;RemoveFunction = () => void
public;RemoveFunction = () => void
beta;class RenderMaterial
beta;RenderMaterial
beta;RenderMaterialProps
Expand Down Expand Up @@ -515,7 +515,7 @@ public;SolarShadowSettingsProps
public;SourceAndTarget
beta;SpatialClassificationProps
public;SpatialViewDefinitionProps
beta;StandaloneOpenOptions = OpenDbKey
public;StandaloneOpenOptions = OpenDbKey
beta;StorageValue = string | number | boolean | null | Uint8Array
public;SubCategoryAppearance
public;SubCategoryAppearance
Expand Down Expand Up @@ -570,15 +570,15 @@ internal;TileTreeMetadata
internal;TileTreeProps
alpha;TileVersionInfo
internal;TreeFlags
beta;Tween
beta;TweenCallback = (obj: any) => void
beta;Tweens
public;Tween
public;TweenCallback = (obj: any) => void
public;Tweens
public;TxnAction
internal;TxnNotifications
public;TypeDefinition
public;TypeDefinitionElementProps
internal;TypeOfChange
beta;UpdateCallback = (obj: any, t: number) => void
public;UpdateCallback = (obj: any, t: number) => void
beta;UpgradeOptions
public;UrlLinkProps
public;ViewAttachmentLabelProps
Expand Down
6 changes: 3 additions & 3 deletions common/api/summary/imodeljs-frontend.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ internal;ArcGisTokenManager
internal;ArcGisUtilities
internal;areaToEyeHeight(view3d: ViewState3d, area: GlobalLocationArea, offset?: number): number
internal;areaToEyeHeightFromGcs(view3d: ViewState3d, area: GlobalLocationArea, offset?: number): Promise
beta;AsyncFunction = (...args: any) => Promise
beta;AsyncMethodsOf
public;AsyncFunction = (...args: any) => Promise
public;AsyncMethodsOf
public;AuthorizedFrontendRequestContext
public;AuxCoordSystem2dState
public;AuxCoordSystem3dState
Expand Down Expand Up @@ -387,7 +387,7 @@ beta;PlanarClipMaskState
internal;PlanarTilePatch
public;class PrimitiveTool
alpha;PrimitiveVisibility
beta;PromiseReturnType
public;PromiseReturnType
internal;QuadId
beta;QuantityFormatOverridesChangedArgs
beta;QuantityFormatsChangedArgs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/imodeljs-backend",
"comment": "",
"type": "none"
}
],
"packageName": "@bentley/imodeljs-backend",
"email": "33296803+kabentley@users.noreply.github.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/imodeljs-common",
"comment": "",
"type": "none"
}
],
"packageName": "@bentley/imodeljs-common",
"email": "33296803+kabentley@users.noreply.github.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/imodeljs-frontend",
"comment": "",
"type": "none"
}
],
"packageName": "@bentley/imodeljs-frontend",
"email": "33296803+kabentley@users.noreply.github.com"
}
19 changes: 10 additions & 9 deletions core/backend/src/IModelDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ export namespace IModelDb { // eslint-disable-line no-redeclare

/** Mark the geometry of [[GeometricModel]] as having changed, by recording an indirect change to its GeometryGuid property.
* Typically the GeometryGuid changes automatically when [[GeometricElement]]s within the model are modified, but
* explicitly updating it is occassionally useful after modifying definition elements like line styles or materials that indirectly affect the appearance of
* explicitly updating it is occasionally useful after modifying definition elements like line styles or materials that indirectly affect the appearance of
* [[GeometricElement]]s that reference those definition elements in their geometry streams.
* @note This will throw IModelError with [IModelStatus.VersionTooOld]($bentleyjs-core) if a version of the BisCore schema older than 1.0.11 is present in the iModel.
* @throws IModelError if unable to update the geometry guid.
Expand Down Expand Up @@ -2639,21 +2639,21 @@ export class SnapshotDb extends IModelDb {
}

/** Standalone iModels are read/write files that are not managed by iModelHub.
* They are relevant only for single-practitioner scenarios where team collaboration is necessary.
* However, Standalone iModels are designed such that the API interaction between Standalone iModels and Briefcase
* They are relevant only for small-scale single-user scenarios.
* Standalone iModels are designed such that the API for Standalone iModels and Briefcase
* iModels (those synchronized with iModelHub) are as similar and consistent as possible.
* This leads to a straightforward process where the practitioner can optionally choose to upgrade to iModelHub.
* This leads to a straightforward process where the a user starts with StandaloneDb and can
* optionally choose to upgrade to iModelHub.
*
* Some additional details. Standalone iModels:
* - always have [Guid.empty]($bentley) for their contextId (they are "unassociated" files)
* - always have BriefcaseId === [BriefcaseIdValue.Unassigned]($backend)
* - always have BriefcaseId === [BriefcaseIdValue.Unassigned]($common)
* - are connected to the frontend via [BriefcaseConnection.openStandalone]($frontend)
* - may be opened without supplying any user credentials
* - may be opened read/write
* - may optionally support undo/redo via [[TxmManager]]
* - cannot apply a changeset to nor generate a changesets
* - are only available to authorized applications
* @internal
* - may optionally support undo/redo via [[TxnManager]]
* - cannot apply a changeset to nor generate a changesets (since there is no timeline from which to get/push changesets)
* @public
*/
export class StandaloneDb extends IModelDb {
public get isStandalone(): boolean { return true; }
Expand Down Expand Up @@ -2729,6 +2729,7 @@ export class StandaloneDb extends IModelDb {
* @param openMode Optional open mode for the standalone iModel. The default is read/write.
* @returns a new StandaloneDb if the file is not currently open, and the existing StandaloneDb if it is already
* @throws [[IModelError]] if the file is not a standalone iModel.
* @see [BriefcaseConnection.openStandalone]($frontend) to open a StandaloneDb from the frontend
*/
public static openFile(filePath: string, openMode: OpenMode = OpenMode.ReadWrite, options?: StandaloneOpenOptions): StandaloneDb {
const file = { path: filePath, key: options?.key };
Expand Down
2 changes: 1 addition & 1 deletion core/common/src/ColorDef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type ColorDefProps = number;
* 1. The ordering of the Red, Green, Blue bytes; and
* 2. Whether to specify transparency or opacity (sometimes referred to as "alpha").
*
* Generally, iModel.js prefers to use `0xTTBBGGRR` (red in the low byte. 0==fully opaque in high byte), but this class provides methods
* ColorDef uses `0xTTBBGGRR` (red in the low byte. 0==fully opaque in high byte) internally, but it also provides methods
* to convert to `0xRRGGBB` (see [[getRgb]]) and `0xAABBGGRR` (red in the low byte, 0==fully transparent in high byte. see [[getAbgr]]).
*
* The [[create]] method also accepts strings in the common HTML formats.
Expand Down
17 changes: 11 additions & 6 deletions core/common/src/IModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface RootSubjectProps {
description?: string;
}

/** Properties that are about an iModel.
/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .
* @public
*/
export interface IModelProps {
Expand All @@ -78,7 +78,11 @@ export interface IModelProps {
name?: string;
}

/** @alpha */
/**
* The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.
* These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new
* [[IModelConnection]] instance on the frontend to access it.
* @public */
export type IModelConnectionProps = IModelProps & IModelRpcProps;

/** The properties that can be supplied when creating a *new* iModel.
Expand All @@ -104,7 +108,7 @@ export interface IModelEncryptionProps {
}

/**
* A key used to identify an opened IModelDb between the frontend and backend for RPC communications.
* A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.
* Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.
* If no key is supplied in a call to open an IModelDb, one is generated and returned.
* It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.
Expand All @@ -115,7 +119,7 @@ export interface OpenDbKey {
key?: string;
}

/** Options that can be supplied when opening an existing SnapshotDb.
/** Options to open a [SnapshotDb]($backend).
* @public
*/
export interface SnapshotOpenOptions extends IModelEncryptionProps, OpenDbKey {
Expand All @@ -125,8 +129,9 @@ export interface SnapshotOpenOptions extends IModelEncryptionProps, OpenDbKey {
autoUploadBlocks?: boolean;
}

/** Options that can be supplied when opening an existing StandaloneDb.
* @beta
/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,
* or [BriefcaseConnection.openStandalone]($frontend) from the frontend.
* @public
*/
export type StandaloneOpenOptions = OpenDbKey;

Expand Down

0 comments on commit ba61ead

Please sign in to comment.