Skip to content

Commit

Permalink
feat(cli): enabling environment provisioning (#3859)
Browse files Browse the repository at this point in the history
* feat(cli): enabling environment provisioning

* feat(cli): updating service names to match new route
  • Loading branch information
xoscar authored May 21, 2024
1 parent dce4d3c commit 5517ee2
Show file tree
Hide file tree
Showing 28 changed files with 6,116 additions and 991 deletions.
134 changes: 134 additions & 0 deletions api/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
openapi: 3.0.1

components:
responses:
EnvironmentResource:
description: "successful operation for environment"
content:
application/json:
schema:
$ref: "#/components/schemas/EnvironmentResource"

Environment:
description: "successful operation for environment"
content:
application/json:
schema:
$ref: "#/components/schemas/Environment"

EnvironmentResources:
description: "successful operation for environment"
content:
application/json:
schema:
$ref: "#/components/schemas/EnvironmentResources"

Environments:
description: "successful operation for environment"
content:
application/json:
schema:
$ref: "#/components/schemas/Environments"

EnvironmentsMe:
description: "successful operation for environment"
content:
application/json:
schema:
$ref: "#/components/schemas/EnvironmentsMe"

requestBodies:
Environment:
description: environment details body
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Environment"

EnvironmentResource:
description: environment resource details body
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EnvironmentResource"

schemas:
EnvironmentResources:
type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/EnvironmentResource"
count:
type: integer

EnvironmentsMe:
type: object
properties:
elements:
type: array
items:
$ref: "#/components/schemas/Environment"
count:
type: integer

Environments:
type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/Environment"
count:
type: integer

EnvironmentResource:
type: object
properties:
type:
type: string
enum:
- Environment
spec:
$ref: "#/components/schemas/Environment"

Environment:
type: object
required:
- connected
properties:
id:
type: string
readOnly: true
name:
type: string
description:
type: string
labels:
type: object
additionalProperties:
type: string
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
isLocal:
type: boolean
example: false
userID:
type: string
organizationID:
type: string
description: organizationID
example: "733420bd-7e56-461f-8431-6378759e60ae"
agentApiKey:
type: string
resources:
type: string
129 changes: 129 additions & 0 deletions api/invites.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
openapi: 3.0.1

components:
responses:
Invites:
description: "successful operation for invites"
content:
application/json:
schema:
$ref: "#/components/schemas/Invites"

InviteResources:
description: "successful operation for invites"
content:
application/json:
schema:
$ref: "#/components/schemas/InviteResources"

Invite:
description: "successful operation for invites"
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
InviteResource:
description: "successful operation for invites"
content:
application/json:
schema:
$ref: "#/components/schemas/InviteResource"

requestBodies:
Invite:
description: invite details body
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"

InviteResource:
description: invite resource details body
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/InviteResource"

schemas:
InviteResource:
type: object
properties:
type:
type: string
enum:
- Invite
spec:
$ref: "#/components/schemas/Invite"

Invite:
required:
- id
- to
- role
type: object
properties:
id:
type: string
role:
$ref: "./members.yaml#/components/schemas/Role"
to:
type: string
createdAt:
type: string
format: date-time
sentAt:
type: string
format: date-time
type:
type: string
enum:
- "email"
- "public"
default: email
status:
type: string
enum:
- "pending"
- "accepted"
- "revoked"
default: pending
returnTo:
type: string
environments:
type: array
items:
$ref: "#/components/schemas/InviteEnvironment"
InviteEnvironment:
required:
- id
- role
type: object
properties:
id:
type: string
role:
$ref: "./members.yaml#/components/schemas/Role"
environment:
$ref: "./environments.yaml#/components/schemas/Environment"

InviteResources:
type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/InviteResource"
count:
type: integer

Invites:
type: object
properties:
items:
type: array
items:
$ref: "#/components/schemas/Invite"
count:
type: integer
79 changes: 79 additions & 0 deletions api/members.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
openapi: 3.0.1

components:
responses:
Members:
description: "successful operation for members"
content:
application/json:
schema:
$ref: "#/components/schemas/Members"
Member:
description: "successful operation for members"
content:
application/json:
schema:
$ref: "#/components/schemas/Member"
requestBodies:
MemberRole:
description: member role update body
required: true
content:
application/json:
schema:
type: object
required:
- role
properties:
role:
$ref: "#/components/schemas/Role"
AssignMember:
description: member role update body
required: true
content:
application/json:
schema:
type: object
required:
- role
- id
properties:
role:
$ref: "#/components/schemas/Role"
id:
type: string
schemas:
Role:
type: string
enum:
- owners
- members
- admins
- billers
- engineers
- runners
- agent
Member:
required:
- id
- user
- role
type: object
properties:
id:
type: string
role:
$ref: "#/components/schemas/Role"
user:
$ref: "./users.yaml#/components/schemas/User"
invite:
$ref: "./invites.yaml#/components/schemas/Invite"
Members:
type: object
properties:
elements:
type: array
items:
$ref: "#/components/schemas/Member"
nextToken:
type: string
Loading

0 comments on commit 5517ee2

Please sign in to comment.