Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 14, 2024
1 parent 8c2f2e9 commit b7f254e
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 108 deletions.
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ Methods:
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>
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 @@ -4,6 +4,7 @@ export { AuditLogListParams, AuditLogs } from './audit-logs';
export { Billing } from './billing/index';
export {
CIDRList,
Policy,
Token,
TokenCreateResponse,
TokenUpdateResponse,
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 @@ -2,6 +2,7 @@

export {
CIDRList,
Policy,
Token,
TokenCreateResponse,
TokenUpdateResponse,
Expand Down
187 changes: 79 additions & 108 deletions src/resources/user/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,81 @@ export type CIDRList = string;
*/
export type CIDRListParam = string;

export interface Policy {
/**
* Policy identifier.
*/
id: string;

/**
* Allow or deny operations against the resources.
*/
effect: 'allow' | 'deny';

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<Policy.PermissionGroup>;

/**
* A list of resource names that the policy applies to.
*/
resources: unknown;
}

export namespace Policy {
/**
* A named group of permissions that map to a group of operations against
* resources.
*/
export interface PermissionGroup {
/**
* Identifier of the group.
*/
id: string;

/**
* Attributes associated to the permission group.
*/
meta?: unknown;

/**
* Name of the group.
*/
name?: string;
}
}

export interface PolicyParam {
/**
* Allow or deny operations against the resources.
*/
effect: 'allow' | 'deny';

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<PolicyParam.PermissionGroup>;

/**
* A list of resource names that the policy applies to.
*/
resources: unknown;
}

export namespace PolicyParam {
/**
* A named group of permissions that map to a group of operations against
* resources.
*/
export interface PermissionGroup {
/**
* Attributes associated to the permission group.
*/
meta?: unknown;
}
}

export interface Token {
/**
* Token identifier tag.
Expand All @@ -119,7 +194,7 @@ export interface Token {
/**
* List of access policies assigned to the token.
*/
policies: Array<Token.Policy>;
policies: Array<Policy>;

/**
* Status of the token.
Expand Down Expand Up @@ -151,51 +226,6 @@ export interface Token {
}

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

/**
* Allow or deny operations against the resources.
*/
effect: 'allow' | 'deny';

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<Policy.PermissionGroup>;

/**
* A list of resource names that the policy applies to.
*/
resources: unknown;
}

export namespace Policy {
/**
* A named group of permissions that map to a group of operations against
* resources.
*/
export interface PermissionGroup {
/**
* Identifier of the group.
*/
id: string;

/**
* Attributes associated to the permission group.
*/
meta?: unknown;

/**
* Name of the group.
*/
name?: string;
}
}

export interface Condition {
/**
* Client IP restrictions.
Expand Down Expand Up @@ -273,7 +303,7 @@ export interface TokenCreateParams {
/**
* List of access policies assigned to the token.
*/
policies: Array<TokenCreateParams.Policy>;
policies: Array<PolicyParam>;

condition?: TokenCreateParams.Condition;

Expand All @@ -290,36 +320,6 @@ export interface TokenCreateParams {
}

export namespace TokenCreateParams {
export interface Policy {
/**
* Allow or deny operations against the resources.
*/
effect: 'allow' | 'deny';

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<Policy.PermissionGroup>;

/**
* A list of resource names that the policy applies to.
*/
resources: unknown;
}

export namespace Policy {
/**
* A named group of permissions that map to a group of operations against
* resources.
*/
export interface PermissionGroup {
/**
* Attributes associated to the permission group.
*/
meta?: unknown;
}
}

export interface Condition {
/**
* Client IP restrictions.
Expand Down Expand Up @@ -354,7 +354,7 @@ export interface TokenUpdateParams {
/**
* List of access policies assigned to the token.
*/
policies: Array<TokenUpdateParams.Policy>;
policies: Array<PolicyParam>;

/**
* Status of the token.
Expand All @@ -376,36 +376,6 @@ export interface TokenUpdateParams {
}

export namespace TokenUpdateParams {
export interface Policy {
/**
* Allow or deny operations against the resources.
*/
effect: 'allow' | 'deny';

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<Policy.PermissionGroup>;

/**
* A list of resource names that the policy applies to.
*/
resources: unknown;
}

export namespace Policy {
/**
* A named group of permissions that map to a group of operations against
* resources.
*/
export interface PermissionGroup {
/**
* Attributes associated to the permission group.
*/
meta?: unknown;
}
}

export interface Condition {
/**
* Client IP restrictions.
Expand Down Expand Up @@ -440,6 +410,7 @@ export interface TokenListParams extends V4PagePaginationArrayParams {

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;
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 @@ -96,6 +96,7 @@ export namespace User {
export import SubscriptionEditParams = SubscriptionsAPI.SubscriptionEditParams;
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;
Expand Down

0 comments on commit b7f254e

Please sign in to comment.