Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 10, 2024
1 parent 553da66 commit c108be3
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ Types:

- <code><a href="./src/resources/user/tokens/tokens.ts">CIDRList</a></code>
- <code><a href="./src/resources/user/tokens/tokens.ts">Policy</a></code>
- <code><a href="./src/resources/user/tokens/tokens.ts">Token</a></code>
- <code><a href="./src/resources/user/tokens/tokens.ts">TokenCreateResponse</a></code>
- <code><a href="./src/resources/user/tokens/tokens.ts">TokenUpdateResponse</a></code>
- <code><a href="./src/resources/user/tokens/tokens.ts">TokenListResponse</a></code>
Expand Down
1 change: 1 addition & 0 deletions src/resources/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export { Billing } from './billing/index';
export {
CIDRList,
Policy,
Token,
TokenCreateResponse,
TokenUpdateResponse,
TokenListResponse,
Expand Down
1 change: 1 addition & 0 deletions src/resources/user/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export {
CIDRList,
Policy,
Token,
TokenCreateResponse,
TokenUpdateResponse,
TokenListResponse,
Expand Down
72 changes: 72 additions & 0 deletions src/resources/user/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,77 @@ export namespace Policy {
}
}

export interface Token {
/**
* Token identifier tag.
*/
id: string;

/**
* Token name.
*/
name: string;

/**
* List of access policies assigned to the token.
*/
policies: Array<Policy>;

/**
* Status of the token.
*/
status: 'active' | 'disabled' | 'expired';

condition?: Token.Condition;

/**
* The expiration time on or after which the JWT MUST NOT be accepted for
* processing.
*/
expires_on?: string;

/**
* The time on which the token was created.
*/
issued_on?: string;

/**
* Last time the token was modified.
*/
modified_on?: string;

/**
* The time before which the token MUST NOT be accepted for processing.
*/
not_before?: string;
}

export namespace Token {
export interface Condition {
/**
* Client IP restrictions.
*/
request_ip?: Condition.RequestIP;
}

export namespace Condition {
/**
* Client IP restrictions.
*/
export interface RequestIP {
/**
* List of IPv4/IPv6 CIDR addresses.
*/
in?: Array<TokensAPI.CIDRList>;

/**
* List of IPv4/IPv6 CIDR addresses.
*/
not_in?: Array<TokensAPI.CIDRList>;
}
}
}

export interface TokenCreateResponse {
/**
* The token value.
Expand Down Expand Up @@ -306,6 +377,7 @@ export type TokenDeleteParams = unknown;
export namespace Tokens {
export import CIDRList = TokensAPI.CIDRList;
export import Policy = TokensAPI.Policy;
export import Token = TokensAPI.Token;
export import TokenCreateResponse = TokensAPI.TokenCreateResponse;
export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse;
export import TokenListResponse = TokensAPI.TokenListResponse;
Expand Down
1 change: 1 addition & 0 deletions src/resources/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export namespace User {
export import Tokens = TokensAPI.Tokens;
export import CIDRList = TokensAPI.CIDRList;
export import Policy = TokensAPI.Policy;
export import Token = TokensAPI.Token;
export import TokenCreateResponse = TokensAPI.TokenCreateResponse;
export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse;
export import TokenListResponse = TokensAPI.TokenListResponse;
Expand Down

0 comments on commit c108be3

Please sign in to comment.