Skip to content

Commit

Permalink
Upgrade TypeDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dimikot committed Dec 16, 2024
1 parent 2665ffa commit 9efa9a2
Show file tree
Hide file tree
Showing 177 changed files with 392 additions and 364 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/semgrep.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**@clickup/ent-framework**[**Docs**](globals.md)
**@clickup/ent-framework**

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/AllowIf.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Batcher.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/CanDeleteOutgoingEdge.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/CanReadOutgoingEdge.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/CanUpdateOutgoingEdge.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Client.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ClientError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
38 changes: 26 additions & 12 deletions docs/classes/Cluster.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down Expand Up @@ -42,7 +42,7 @@ queries (also, no implicit prewarming).

#### Defined in

[src/abstract/Cluster.ts:133](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L133)
[src/abstract/Cluster.ts:137](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L137)

## Properties

Expand All @@ -55,19 +55,33 @@ queries (also, no implicit prewarming).

### prewarm()

> **prewarm**(): `void`
> **prewarm**(`randomizedDelayMs`, `onInitialPrewarm`?): `void`
Signals the Cluster to keep the Clients pre-warmed, e.g. open. (It's up to
the particular Client's implementation, what does a "pre-warmed Client"
mean; typically, it's keeping some minimal number of pooled connections.)

Except when `randomizedDelayMs` is passed as 0, the actual prewarm (and
Islands discovery) queries will run with a randomized delay between N/2 and
N ms. It is better to operate in such mode: if multiple Node processes
start simultaneously in the cluster, then the randomization helps to avoid
new connections burst (new connections establishment is expensive for e.g.
pgbouncer or when DB is accessed over SSL).

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `randomizedDelayMs` | `number` | `5000` |
| `onInitialPrewarm`? | (`delayMs`) => `void` | `undefined` |

#### Returns

`void`

#### Defined in

[src/abstract/Cluster.ts:210](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L210)
[src/abstract/Cluster.ts:225](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L225)

***

Expand All @@ -85,7 +99,7 @@ actual query.

#### Defined in

[src/abstract/Cluster.ts:226](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L226)
[src/abstract/Cluster.ts:256](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L256)

***

Expand All @@ -101,7 +115,7 @@ Returns all currently known (discovered) non-global Shards in the Cluster.

#### Defined in

[src/abstract/Cluster.ts:233](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L233)
[src/abstract/Cluster.ts:263](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L263)

***

Expand Down Expand Up @@ -135,7 +149,7 @@ the query), no matter whether it was an immediate call or a deferred one.

#### Defined in

[src/abstract/Cluster.ts:253](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L253)
[src/abstract/Cluster.ts:283](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L283)

***

Expand All @@ -162,7 +176,7 @@ Shard hasn't been discovered actually).

#### Defined in

[src/abstract/Cluster.ts:266](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L266)
[src/abstract/Cluster.ts:296](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L296)

***

Expand All @@ -185,7 +199,7 @@ Returns a random Shard among the ones which are currently known

#### Defined in

[src/abstract/Cluster.ts:276](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L276)
[src/abstract/Cluster.ts:306](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L306)

***

Expand All @@ -207,7 +221,7 @@ Returns an Island by its number.

#### Defined in

[src/abstract/Cluster.ts:295](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L295)
[src/abstract/Cluster.ts:325](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L325)

***

Expand All @@ -223,7 +237,7 @@ Returns all Islands in the Cluster.

#### Defined in

[src/abstract/Cluster.ts:306](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L306)
[src/abstract/Cluster.ts:336](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L336)

***

Expand All @@ -241,4 +255,4 @@ cluster configuration.

#### Defined in

[src/abstract/Cluster.ts:316](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L316)
[src/abstract/Cluster.ts:346](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L346)
6 changes: 3 additions & 3 deletions docs/classes/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down Expand Up @@ -52,9 +52,9 @@ Motivation:
| Property | Type | Description |
| ------ | ------ | ------ |
| `shardAffinity` | [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<[`FieldOfIDType`](../type-aliases/FieldOfIDType.md)\<`TTable`\>\> | Defines how to locate a Shard at Ent insert time. See ShardAffinity for more details. 1. GLOBAL_SHARD: places the Ent in the global Shard (0). 2. `[]`: places the Ent in a random Shard. The "randomness" of the "random Shard" is deterministic by the Ent's unique key at the moment of insertion (if it's defined; otherwise completely random). This helps two racy insert operations running concurrently to choose the same Shard for the Ent to be created in, so only one of them will win, instead of both winning and mistakenly creating the Ent duplicates. I.e. having the same value in unique key forces the engine to target the same "random" Shard. 3. `["field1", "field2", ...]`: places the Ent in the Shard that is pointed to by the value in field1 (if it's null, then field2 etc.). A special treatment is applied if a fieldN value in (3) points to the global Shard. In such a case, the Shard for the current Ent is chosen deterministic-randomly at insert time, as if [] is passed. This allows the Ent to refer other "owning" Ents of different types, some of which may be located in the global Shard. Keep in mind that, to locate such an Ent pointing to another Ent in the global Shard, an inverse for fieldN must be defined in most of the cases. |
| `inverses?` | `{ [k in string]?: Object }` | Inverses allow cross-Shard foreign keys & cross-Shard selection. If a field points to an Ent in another Shard, and we're e.g. selecting by a value in this field, inverses allow to locate Shard(s) of the Ent. |
| `inverses?` | `{ [k in string]?: { name: string; type: string } }` | Inverses allow cross-Shard foreign keys & cross-Shard selection. If a field points to an Ent in another Shard, and we're e.g. selecting by a value in this field, inverses allow to locate Shard(s) of the Ent. |
| `privacyTenantPrincipalField?` | [`InsertFieldsRequired`](../type-aliases/InsertFieldsRequired.md)\<`TTable`\> & `string` | If defined, forces all Ents of this class to have the value of that field equal to VC's principal at load time. This is a very 1st unavoidable check in the privacy rules chain, thus it's bullet-proof. |
| `privacyInferPrincipal` | `null` \| `string` \| (`vc`, `row`) => `Promise`\<`null` \| `string` \| [`Ent`](../interfaces/Ent.md)\<`object`\>\> | An attempt to load this Ent using an omni VC will "lower" that VC to the principal returned. Omni VC is always lowered. 1. If an Ent is returned, the lowered principal will be Ent#vc.principal. It is a way to delegate principal inference to another Ent. 2. If a string is returned, then it's treated as a principal ID. 3. If a null is returned, then a guest principal will be used. 4. Returning an omni principal or VC will result in a run-time error. |
| `privacyInferPrincipal` | `null` \| `string` \| (`vc`, `row`) => `Promise`\<`null` \| `string` \| [`Ent`](../interfaces/Ent.md)\<\{\}\>\> | An attempt to load this Ent using an omni VC will "lower" that VC to the principal returned. Omni VC is always lowered. 1. If an Ent is returned, the lowered principal will be Ent#vc.principal. It is a way to delegate principal inference to another Ent. 2. If a string is returned, then it's treated as a principal ID. 3. If a null is returned, then a guest principal will be used. 4. Returning an omni principal or VC will result in a run-time error. |
| `privacyLoad` | [`LoadRule`](../type-aliases/LoadRule.md)\<[`Row`](../type-aliases/Row.md)\<`TTable`\>\>[] | Privacy rules checked on every row loaded from the DB. |
| `privacyInsert` | [`WriteRules`](../type-aliases/WriteRules.md)\<[`InsertInput`](../type-aliases/InsertInput.md)\<`TTable`\>\> | Privacy rules checked before a row is inserted to the DB. - It the list is empty, then only omni VC can insert; it's typically a good option for Ents representing e.g. a user. - If no update/delete rules are defined, then privacyInsert rules are also run on update/delete by default. - Unless empty, the rules must include at least one Require() predicate, they can't entirely consist of AllowIf(). This is because for write rules (privacyInsert, privacyUpdate, privacyDelete) it's important to make sure that ALL rules permit the operation, not only one of them allows it; this is what Require() is exactly for. |
| `privacyUpdate?` | [`WriteRules`](../type-aliases/WriteRules.md)\<[`Row`](../type-aliases/Row.md)\<`TTable`\>\> | Privacy rules checked before a row is updated in the DB. - If not defined, privacyInsert rules are used. - The rules must include at least one Require() predicate. |
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/DenyIf.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntAccessError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntNotFoundError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntNotInsertableError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntNotReadableError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntNotUpdatableError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntUniqueKeyError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/EntValidationError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/FieldIs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/FuncToPredicate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/IDsCache.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/IDsCacheCanReadIncomingEdge.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/IDsCacheDeletable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/IDsCacheReadable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/IDsCacheUpdatable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
4 changes: 2 additions & 2 deletions docs/classes/IncomingEdgeFromVCExists.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down Expand Up @@ -85,4 +85,4 @@ database.

#### Defined in

[src/ent/predicates/IncomingEdgeFromVCExists.ts:47](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/IncomingEdgeFromVCExists.ts#L47)
[src/ent/predicates/IncomingEdgeFromVCExists.ts:46](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/IncomingEdgeFromVCExists.ts#L46)
4 changes: 2 additions & 2 deletions docs/classes/Inverse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down Expand Up @@ -29,7 +29,7 @@ EntUser refers an EntOrg row).

| Parameter | Type |
| ------ | ------ |
| `__namedParameters` | `object` |
| `__namedParameters` | \{ `cluster`: [`Cluster`](Cluster.md)\<`TClient`, `any`\>; `shardAffinity`: [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`string`\>; `id2Schema`: [`Schema`](Schema.md)\<`TTable`, [`UniqueKey`](../type-aliases/UniqueKey.md)\<`TTable`\>\>; `id2Field`: [`FieldOfIDTypeRequired`](../type-aliases/FieldOfIDTypeRequired.md)\<`TTable`\>; `name`: `string`; `type`: `string`; \} |
| `__namedParameters.cluster` | [`Cluster`](Cluster.md)\<`TClient`, `any`\> |
| `__namedParameters.shardAffinity` | [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`string`\> |
| `__namedParameters.id2Schema` | [`Schema`](Schema.md)\<`TTable`, [`UniqueKey`](../type-aliases/UniqueKey.md)\<`TTable`\>\> |
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Island.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Loader.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
8 changes: 4 additions & 4 deletions docs/classes/LocalCache.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down Expand Up @@ -67,7 +67,7 @@ Ends the instance lifecycle (e.g. garbage recheck interval).

#### Defined in

[src/abstract/LocalCache.ts:75](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L75)
[src/abstract/LocalCache.ts:78](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L78)

***

Expand All @@ -89,7 +89,7 @@ Returns the value for the given key, or null if the key does not exist.

#### Defined in

[src/abstract/LocalCache.ts:83](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L83)
[src/abstract/LocalCache.ts:86](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L86)

***

Expand All @@ -112,4 +112,4 @@ Sets the value for the given key.

#### Defined in

[src/abstract/LocalCache.ts:102](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L102)
[src/abstract/LocalCache.ts:105](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L105)
2 changes: 1 addition & 1 deletion docs/classes/Or.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/OutgoingEdgePointsToVC.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**@clickup/ent-framework**](../README.md)**Docs**
[**@clickup/ent-framework**](../README.md)

***

Expand Down
Loading

0 comments on commit 9efa9a2

Please sign in to comment.