Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline prop, move lambda type back into the correct locations. #3257

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion astro/src/components/api/APIField.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const { name, description, type, required, optional, since, defaults, deprecated
{ description && <span class="px-3">{description}</span> }
{ required && <span class="px-[6px] py-1 rounded-md text-orange-500 border-orange-500 border-2 dark:font-semibold font-bold uppercase text-xs dark:text-[10px]">required</span> }
{ defaults && <span class="pt-1 dark:text-gray-400 text-gray-500 text-sm justify-center">Defaults to {defaults}</span> }
{ since && <AvailableSince since={since} inline={true} /> }
{ since && <AvailableSince since={since} /> }
{ deprecated && <span class="text-red-700 text-sm">DEPRECATED</span> }
{ readonly && <ReadOnly /> }
</div>
Expand Down
11 changes: 2 additions & 9 deletions astro/src/components/api/AvailableSince.astro
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
---
interface Props {
inline: boolean,
since: string
}

const { inline, since }: Props = Astro.props;

const { since }: Props = Astro.props;
if (!since) {
throw new Error("No since field");
}

let classList = 'text-green-500 text-sm italic';
if (inline) {
classList = 'pl-3 ' + classList;
}
---
<span class={classList}>Available since {since}</span>
<span class='text-green-500 text-sm italic'>Available since {since}</span>
4 changes: 2 additions & 2 deletions astro/src/components/api/BeforeVersion.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if (!version) {
const hasContent = Astro.slots.has("default");
---
{ version && <span class="text-green-500 text-sm italic">Before version {version}</span>
<>
<Fragment>
{hasContent &&
<div class="prose-p:mt-1"><slot></slot></div>
}
</>
</Fragment>
}
13 changes: 4 additions & 9 deletions astro/src/components/api/DeprecatedSince.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
---
interface Props {
inline: boolean,
since: string
}

const { inline, since }: Props = Astro.props;
const { since }: Props = Astro.props;
const hasContent = Astro.slots.has("default");
let classList = 'text-red-700 italic';
if (inline) {
classList = 'pl-3 ' + classList;
}
---
{ since && <span class={classList}>Deprecated since {since}</span>
<>
{ since && <span class='text-red-700 italic'>Deprecated since {since}</span>
<Fragment>
{hasContent &&
<div class="prose-p:mt-1"><slot></slot></div>
}
</>
</Fragment>
}
13 changes: 4 additions & 9 deletions astro/src/components/api/RemovedSince.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
---
interface Props {
inline: boolean,
since: string
}

const { inline, since }: Props = Astro.props;
const { since }: Props = Astro.props;
const hasContent = Astro.slots.has("default");
let classList = 'text-red-700 italic';
if (inline) {
classList = 'pl-3 ' + classList;
}
---
{ since && <span class={classList}>Removed in {since}</span>
<>
{ since && <span class='text-red-700 italic'>Removed in {since}</span>
<Fragment>
{hasContent &&
<div class="prose-p:mt-1"><slot></slot></div>
}
</>
</Fragment>
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const makeId = (name) => { return name.toLowerCase().replaceAll(' ', '-') };
{t.variables && t.variables.sort((a,b) => a.name.toUpperCase().localeCompare(b.name.toUpperCase())).map((tvar) =>
<APIField name={tvar.name} type={tvar.type} since={tvar.since} deprecated={tvar.deprecated}>
<span set:html={marked.parse(tvar.description)}></span>
{tvar.removed && <><br /><RemovedSince since={tvar.removed} inline={true}/></>}
{tvar.removed && <><br /><RemovedSince since={tvar.removed}/></>}
</APIFIeld>
)}
</APIBlock>
Expand Down
59 changes: 29 additions & 30 deletions astro/src/content/docs/apis/_event-types.mdx
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
import EnterpriseEditionBlurbApi from 'src/content/docs/_shared/_enterprise-edition-blurb-api.astro';
import PremiumEditionBlurbApi from 'src/content/docs/_shared/_premium-edition-blurb-api.astro';
import APIField from 'src/components/api/APIField.astro';
import AvailableSince from 'src/components/api/AvailableSince.astro';

* <code>audit-log.create</code> - When an audit log is created <AvailableSince since="1.30.0" inline={true}/>
* <code>event-log.create</code> - When an event log is created <AvailableSince since="1.30.0" inline={true}/>
* <code>audit-log.create</code> - When an audit log is created <AvailableSince since="1.30.0"/>
* <code>event-log.create</code> - When an event log is created <AvailableSince since="1.30.0"/>
* <code>jwt.public-key.update</code> - When a JWT RSA Public / Private keypair may have been changed
* <code>jwt.refresh</code> - When an access token is refreshed using a refresh token <AvailableSince since="1.16.0" inline={true}/>
* <code>jwt.refresh</code> - When an access token is refreshed using a refresh token <AvailableSince since="1.16.0"/>
* <code>jwt.refresh-token.revoke</code> - When a JWT Refresh Token is revoked
* <code>kickstart.success</code> - When kickstart has successfully completed <AvailableSince since="1.30.0" inline={true}/>
* <code>kickstart.success</code> - When kickstart has successfully completed <AvailableSince since="1.30.0"/>
* <code>user.action</code> - When a user action is triggered
* <code>user.bulk.create</code> - When multiple users are created in bulk (i.e. during an import)
* <code>user.create</code> - When a user is created
* <code>user.create.complete</code> - When a user create transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.create.complete</code> - When a user create transaction has completed <AvailableSince since="1.30.0"/>
* <code>user.deactivate</code> - When a user is deactivated
* <code>user.delete</code> - When a user is deleted
* <code>user.delete.complete</code> - When a user delete transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.email.update</code> - When a user updates their email address <AvailableSince since="1.30.0" inline={true}/>
* <code>user.email.verified</code> - When a user verifies their email address <AvailableSince since="1.8.0" inline={true}/>
* <code>user.identity-provider.link</code> - When a link is created from a user to an Identity Provider <AvailableSince since="1.36.0" inline={true}/>
* <code>user.identity-provider.unlink</code> - When an existing Identity Provider link is removed from a User <AvailableSince since="1.36.0" inline={true} />
* <code>user.loginId.duplicate.create</code> - When a request to create a user with a login Id (email or username) which is already in use has been received <AvailableSince since="1.30.0" inline={true}/> <EnterpriseEditionBlurbApi> the `user.loginId.duplicate.create` event </EnterpriseEditionBlurbApi>
* <code>user.loginId.duplicate.update</code> - When a request to update a user and change their login Id (email or username) to one that is already in use has been received <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi> the ``user.loginId.duplicate.update`` event </EnterpriseEditionBlurbApi>
* <code>user.delete.complete</code> - When a user delete transaction has completed <AvailableSince since="1.30.0"/>
* <code>user.email.update</code> - When a user updates their email address <AvailableSince since="1.30.0"/>
* <code>user.email.verified</code> - When a user verifies their email address <AvailableSince since="1.8.0"/>
* <code>user.identity-provider.link</code> - When a link is created from a user to an Identity Provider <AvailableSince since="1.36.0"/>
* <code>user.identity-provider.unlink</code> - When an existing Identity Provider link is removed from a User <AvailableSince since="1.36.0" />
* <code>user.loginId.duplicate.create</code> - When a request to create a user with a login Id (email or username) which is already in use has been received <AvailableSince since="1.30.0"/> <EnterpriseEditionBlurbApi> the `user.loginId.duplicate.create` event </EnterpriseEditionBlurbApi>

Check failure on line 22 in astro/src/content/docs/apis/_event-types.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'userName' instead of 'username'. Raw Output: {"message": "[Vale.Terms] Use 'userName' instead of 'username'.", "location": {"path": "astro/src/content/docs/apis/_event-types.mdx", "range": {"start": {"line": 22, "column": 106}}}, "severity": "ERROR"}
* <code>user.loginId.duplicate.update</code> - When a request to update a user and change their login Id (email or username) to one that is already in use has been received <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi> the ``user.loginId.duplicate.update`` event </EnterpriseEditionBlurbApi>

Check failure on line 23 in astro/src/content/docs/apis/_event-types.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'userName' instead of 'username'. Raw Output: {"message": "[Vale.Terms] Use 'userName' instead of 'username'.", "location": {"path": "astro/src/content/docs/apis/_event-types.mdx", "range": {"start": {"line": 23, "column": 116}}}, "severity": "ERROR"}
* <code>user.login.failed</code> - When a user fails a login request <AvailableSince since="1.6.0" />
* <code>user.login.new-device</code> - When a user begins a login request with a new device <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi> the ``user.login.new-device`` event </EnterpriseEditionBlurbApi>
* <code>user.login.success</code> - When a user completes a login request <AvailableSince since="1.6.0" inline={true}/>
* <code>user.login.suspicious</code> - When a user logs in and is considered to be a potential threat (requires an activated Enterprise license) <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi> the ``user.login.suspicious`` event </EnterpriseEditionBlurbApi>
* <code>user.password.breach</code> - When Reactor detects a user is using a potentially breached password (requires an activated license) <AvailableSince since="1.15.0" inline={true}/> <br/> <PremiumEditionBlurbApi>the ``user.password.breach`` event </PremiumEditionBlurbApi>
* <code>user.login.new-device</code> - When a user begins a login request with a new device <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi> the ``user.login.new-device`` event </EnterpriseEditionBlurbApi>
* <code>user.login.success</code> - When a user completes a login request <AvailableSince since="1.6.0"/>
* <code>user.login.suspicious</code> - When a user logs in and is considered to be a potential threat (requires an activated Enterprise license) <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi> the ``user.login.suspicious`` event </EnterpriseEditionBlurbApi>
* <code>user.password.breach</code> - When Reactor detects a user is using a potentially breached password (requires an activated license) <AvailableSince since="1.15.0"/> <br/> <PremiumEditionBlurbApi>the ``user.password.breach`` event </PremiumEditionBlurbApi>
* <code>user.password.reset.send</code> - When a forgot password email has been sent to a user <AvailableSince since="1.30.0"inline={true}/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.reset.send`` event</EnterpriseEditionBlurbApi>
* <code>user.password.reset.start</code> - When the process to reset a user password has started <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.reset.start`` event</EnterpriseEditionBlurbApi>
* <code>user.password.reset.success</code> - When a user has successfully reset their password <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.reset.success`` event</EnterpriseEditionBlurbApi>
* <code>user.password.update</code> - When a user has updated their password <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.update`` event</EnterpriseEditionBlurbApi>
* <code>user.password.reset.start</code> - When the process to reset a user password has started <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.reset.start`` event</EnterpriseEditionBlurbApi>
* <code>user.password.reset.success</code> - When a user has successfully reset their password <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.reset.success`` event</EnterpriseEditionBlurbApi>
* <code>user.password.update</code> - When a user has updated their password <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi>the ``user.password.update`` event</EnterpriseEditionBlurbApi>
* <code>user.reactivate</code> - When a user is reactivated
* <code>user.registration.create</code> - When a user registration is created <AvailableSince since="1.6.0" inline={true}/>
* <code>user.registration.create.complete</code> - When a user registration create transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.registration.delete</code> - When a user registration is deleted <AvailableSince since="1.6.0" inline={true}/>
* <code>user.registration.delete.complete</code> - When a user registration delete transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.registration.update</code> - When a user registration is updated <AvailableSince since="1.6.0" inline={true}/>
* <code>user.registration.update.complete</code> - When a user registration update transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.registration.verified</code> - When a user completes registration verification <AvailableSince since="1.8.0" inline={true}/>
* <code>user.two-factor.method.add</code> - When a user has added a two-factor method <AvailableSince since="1.30.0" inline={true}/> <br/> <EnterpriseEditionBlurbApi>the ``user.two-factor.method.add`` event</EnterpriseEditionBlurbApi>
* <code>user.two-factor.method.remove</code> - When a user has removed a two-factor method <AvailableSince since="1.30.0" inline={true} /> <br/> <EnterpriseEditionBlurbApi>the ``user.two-factor.method.remove`` event</EnterpriseEditionBlurbApi>
* <code>user.registration.create</code> - When a user registration is created <AvailableSince since="1.6.0"/>
* <code>user.registration.create.complete</code> - When a user registration create transaction has completed <AvailableSince since="1.30.0"/>
* <code>user.registration.delete</code> - When a user registration is deleted <AvailableSince since="1.6.0"/>
* <code>user.registration.delete.complete</code> - When a user registration delete transaction has completed <AvailableSince since="1.30.0"/>
* <code>user.registration.update</code> - When a user registration is updated <AvailableSince since="1.6.0"/>
* <code>user.registration.update.complete</code> - When a user registration update transaction has completed <AvailableSince since="1.30.0"/>
* <code>user.registration.verified</code> - When a user completes registration verification <AvailableSince since="1.8.0"/>
* <code>user.two-factor.method.add</code> - When a user has added a two-factor method <AvailableSince since="1.30.0"/> <br/> <EnterpriseEditionBlurbApi>the ``user.two-factor.method.add`` event</EnterpriseEditionBlurbApi>
* <code>user.two-factor.method.remove</code> - When a user has removed a two-factor method <AvailableSince since="1.30.0" /> <br/> <EnterpriseEditionBlurbApi>the ``user.two-factor.method.remove`` event</EnterpriseEditionBlurbApi>
* <code>user.update</code> - When a user is updated
* <code>user.update.complete</code> - When a user update transaction has completed <AvailableSince since="1.30.0" inline={true}/>
* <code>user.update.complete</code> - When a user update transaction has completed <AvailableSince since="1.30.0"/>
2 changes: 1 addition & 1 deletion astro/src/content/docs/apis/_lambda-engine-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import RemovedSince from 'src/components/api/RemovedSince.astro';

The JavaScript execution engine for the lambda. The possible values are:
* `GraalJS`
* `Nashorn` <DeprecatedSince since="1.35.0"/>, <RemovedSince since="1.49.0" inline={true}/>
* `Nashorn` <DeprecatedSince since="1.35.0"/>, <RemovedSince since="1.49.0"/>
2 changes: 2 additions & 0 deletions astro/src/content/docs/apis/_lambda-request-body.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import APIBlock from 'src/components/api/APIBlock.astro';
import APIField from 'src/components/api/APIField.astro';
import LambdaOptions from './_lambda-engine-options.mdx';
import LambdaType from './_lambda-type.astro';

#### Request Body

Expand All @@ -20,5 +21,6 @@ import LambdaOptions from './_lambda-engine-options.mdx';
<APIField name="lambda.name" type="String" required>
The name of the lambda.
</APIField>
<LambdaType prefix={'lambda'} showRequired={true} showSince={true}/>
</APIBlock>

2 changes: 2 additions & 0 deletions astro/src/content/docs/apis/_lambda-response-body.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import APIBlock from 'src/components/api/APIBlock.astro';
import APIField from 'src/components/api/APIField.astro';
import LambdaOptions from './_lambda-engine-options.mdx';
import LambdaType from './_lambda-type.astro';

#### Response Body

Expand Down Expand Up @@ -29,5 +30,6 @@ import LambdaOptions from './_lambda-engine-options.mdx';
<APIField name="lambda.name" type="String">
The name of the lambda.
</APIField>
<LambdaType prefix={'lambda'} />
</APIBlock>

2 changes: 2 additions & 0 deletions astro/src/content/docs/apis/_lambda-responses-body.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import APIBlock from 'src/components/api/APIBlock.astro';
import APIField from 'src/components/api/APIField.astro';
import LambdaOptions from './_lambda-engine-options.mdx';
import LambdaType from './_lambda-type.astro';

#### Response Body

Expand Down Expand Up @@ -32,5 +33,6 @@ import LambdaOptions from './_lambda-engine-options.mdx';
<APIField name="lambdas[x].name" type="String">
The name of the lambda.
</APIField>
<LambdaType prefix='lambdas[x]'/>
</APIBlock>

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import APIField from 'src/components/api/APIField.astro';
import InlineField from 'src/components/InlineField.astro';
import DeprecatedSince from 'src/components/api/DeprecatedSince.astro';
import RemovedSince from 'src/components/api/RemovedSince.astro';
import LambdaType from './_lambda-type.astro';

{/* parameter_prefix is either blank for parameters or "search." for body */}

Expand All @@ -26,7 +27,7 @@ import RemovedSince from 'src/components/api/RemovedSince.astro';
* `name` - the Lambda name
* `engineType` - the JavaScript execution engine for the Lambda
* `GraalJS`
* `Nashorn` <DeprecatedSince since="1.35.0"/>, <RemovedSince since="1.49.0" inline={true}/>
* `Nashorn` <DeprecatedSince since="1.35.0"/>, <RemovedSince since="1.49.0"/>

The order direction is optional. Possible values of the order direction are `ASC` or `DESC`. If omitted, the default sort order is `ASC`.

Expand All @@ -37,4 +38,5 @@ import RemovedSince from 'src/components/api/RemovedSince.astro';

For example, if the total search results are greater than the page size designated by <InlineField>numberOfResults</InlineField>, set this value to `25` to retrieve results `26-50`, assuming the default page size.
</APIField>
<LambdaType prefix={props.parameter_prefix} showRequired={false} showSince={true}/>
</APIBlock>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import { LambdaDoc } from 'src/tools/docs';
import APIField from 'src/components/api/APIField.astro';
import AvailableSince from "../../../components/api/AvailableSince.astro";

interface Props {
prefix?: String,
showRequired?: boolean,
showSince?: boolean
}

const lambdasEntry = await getEntry('json', 'lambdas');
const lambdas: LambdaDoc[] = (lambdasEntry.data as LambdaDoc[])
.sort((a, b) => a.typeText.localeCompare(b.typeText));
Expand All @@ -17,7 +23,7 @@ const name = `${prefix || ''}type`;
{ lambdas.map(lambda =>
<li>
<code>{ lambda.typeText }</code>
{ showSince && lambda.version && <AvailableSince since={ lambda.version } inline={true}/> }
{ showSince && lambda.version && <AvailableSince since={ lambda.version }/> }
</li>
)}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions astro/src/content/docs/apis/_tenant-request-body.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ import TransactionTypes from 'src/content/docs/apis/_transaction-types.mdx';

* `Fixed` - the expiration is calculated from the time the token is issued.
* `SlidingWindow` - the expiration is calculated from the last time the token was used.
* `SlidingWindowWithMaximumLifetime` - the expiration is calculated from the last time the token was used, or until the <InlineField>maximumTimeToLiveInMinutes</InlineField> is reached. &nbsp; <AvailableSince since="1.46.0" inline={true}/>
* `SlidingWindowWithMaximumLifetime` - the expiration is calculated from the last time the token was used, or until the <InlineField>maximumTimeToLiveInMinutes</InlineField> is reached. &nbsp; <AvailableSince since="1.46.0"/>
</APIField>

<APIField name="tenant.jwtConfiguration.refreshTokenRevocationPolicy.onLoginPrevented" type="Boolean" optional defaults="true" since="1.17.0">
Expand Down Expand Up @@ -575,7 +575,7 @@ import TransactionTypes from 'src/content/docs/apis/_transaction-types.mdx';

* `Enabled` - Require a two-factor challenge during login when an eligible method is available.
* `Disabled` - Do not require a two-factor challenge during login.
* `Required` - Require a two-factor challenge during login. A user will be required to configure 2FA if no eligible methods are available. <AvailableSince since="1.42.0" inline={true}/>
* `Required` - Require a two-factor challenge during login. A user will be required to configure 2FA if no eligible methods are available. <AvailableSince since="1.42.0"/>
</APIField>

<APIField name="tenant.multiFactorConfiguration.sms.enabled" type="Boolean" optional defaults="false" since="1.26.0">
Expand Down
Loading
Loading