Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 7, 2024
1 parent ebcf187 commit 66078b9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1343
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dd6f560da6eb9ae8d43a6fd37d706e939ef20c6cca15655adc5dc821fa2fd19f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90de7c383d660ce2dd1c4dfa53b4c75ef8c4c37d485f16f9cc2da269d4852095.yml
186 changes: 30 additions & 156 deletions src/resources/accounts/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,172 +709,46 @@ export namespace MemberGetResponse {
}
}

export type MemberCreateParams =
| MemberCreateParams.IamCreateMemberWithRoles
| MemberCreateParams.IamCreateMemberWithPolicies;

export namespace MemberCreateParams {
export interface IamCreateMemberWithRoles {
/**
* Path param:
*/
account_id: string;

/**
* Body param: The contact email address of the user.
*/
email: string;

/**
* Body param: Array of roles associated with this member.
*/
roles: Array<string>;

/**
* Body param:
*/
status?: 'accepted' | 'pending';
}

export interface IamCreateMemberWithPolicies {
/**
* Path param:
*/
account_id: string;

/**
* Body param: The contact email address of the user.
*/
email: string;

/**
* Body param: Array of policies associated with this member.
*/
policies: Array<MemberCreateParams.IamCreateMemberWithPolicies.Policy>;

/**
* Body param:
*/
status?: 'accepted' | 'pending';
}
export interface MemberCreateParams {
/**
* Path param:
*/
account_id: string;

export namespace IamCreateMemberWithPolicies {
export interface Policy {
/**
* Allow or deny operations against the resources.
*/
access: 'allow' | 'deny';
/**
* Body param: The contact email address of the user.
*/
email: string;

/**
* A set of permission groups that are specified to the policy.
*/
permission_groups: Array<Policy.PermissionGroup>;
/**
* Body param: Array of roles associated with this member.
*/
roles: Array<string>;

/**
* A list of resource groups that the policy applies to.
*/
resource_groups: Array<Policy.ResourceGroup>;
}
/**
* Body param:
*/
status?: 'accepted' | 'pending';
}

export namespace Policy {
/**
* A group of permissions.
*/
export interface PermissionGroup {
/**
* Identifier of the group.
*/
id: string;
}
export interface MemberUpdateParams {
/**
* Path param:
*/
account_id: string;

/**
* A group of scoped resources.
*/
export interface ResourceGroup {
/**
* Identifier of the group.
*/
id: string;
}
}
}
/**
* Body param: Roles assigned to this member.
*/
roles?: Array<MemberUpdateParams.Role>;
}

export type MemberUpdateParams = MemberUpdateParams.Member | MemberUpdateParams.IamUpdateMemberWithPolicies;

export namespace MemberUpdateParams {
export interface Member {
/**
* Path param:
*/
account_id: string;

/**
* Body param: Roles assigned to this member.
*/
roles?: Array<MemberUpdateParams.Member.Role>;
}

export namespace Member {
export interface Role {
/**
* Role identifier tag.
*/
id: string;
}
}

export interface IamUpdateMemberWithPolicies {
/**
* Path param:
*/
account_id: string;

export interface Role {
/**
* Body param: Array of policies associated with this member.
* Role identifier tag.
*/
policies: Array<MemberUpdateParams.IamUpdateMemberWithPolicies.Policy>;
}

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

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

/**
* A list of resource groups that the policy applies to.
*/
resource_groups: Array<Policy.ResourceGroup>;
}

export namespace Policy {
/**
* A group of permissions.
*/
export interface PermissionGroup {
/**
* Identifier of the group.
*/
id: string;
}

/**
* A group of scoped resources.
*/
export interface ResourceGroup {
/**
* Identifier of the group.
*/
id: string;
}
}
id: string;
}
}

Expand Down

0 comments on commit 66078b9

Please sign in to comment.