Skip to content
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
6 changes: 3 additions & 3 deletions spec/SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ platform **release**. It is the single input to the code generator
| | |
| --- | --- |
| Source repo | https://github.com/lunogram/platform |
| Pinned tag | `v0.1.0-rc.1` |
| Pinned tag | `v0.1.0-rc.2` |
| Spec asset | `client.yaml` |

Every tagged platform release publishes the client OpenAPI spec as a `client.yaml`
Expand All @@ -18,15 +18,15 @@ checkout or branch pin required.
## Release asset URL

```
https://github.com/lunogram/platform/releases/download/v0.1.0-rc.1/client.yaml
https://github.com/lunogram/platform/releases/download/v0.1.0-rc.2/client.yaml
```

## Refreshing the spec

To track a newer release, update the **Pinned tag** above and re-fetch:

```bash
TAG=v0.1.0-rc.1
TAG=v0.1.0-rc.2
curl -fsSL "https://github.com/lunogram/platform/releases/download/$TAG/client.yaml" -o spec/client.yaml
make generate
```
Expand Down
33 changes: 29 additions & 4 deletions spec/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,12 @@ components:
required:
- name
properties:
id:
type: string
format: uuid
nullable: true
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
description: The id of the schedule assignment. Omit to create a new assignment (multiple assignments may share the same name per user); supply an existing id to update that assignment in place. The id is returned in the response.
name:
type: string
example: "renewal_date"
Expand Down Expand Up @@ -1685,6 +1691,12 @@ components:
- name
- identifier
properties:
id:
type: string
format: uuid
nullable: true
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
description: The id of the schedule assignment. Omit to create a new assignment (multiple assignments may share the same name per organization); supply an existing id to update that assignment in place. The id is returned in the response.
name:
type: string
example: "contract_renewal"
Expand Down Expand Up @@ -1721,12 +1733,19 @@ components:
DeleteUserScheduledRequest:
type: object
required:
- name
- identifier
properties:
id:
type: string
format: uuid
nullable: true
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
description: The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
name:
type: string
nullable: true
example: "renewal_date"
description: The name of the scheduled resource to delete
description: The name of the scheduled resource to delete. When provided (and id is omitted), every assignment with this name for the user is removed. Either id or name is required.
identifier:
$ref: "#/components/schemas/UserIdentifier"

Expand Down Expand Up @@ -1761,13 +1780,19 @@ components:
DeleteOrganizationScheduledRequest:
type: object
required:
- name
- identifier
properties:
id:
type: string
format: uuid
nullable: true
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
description: The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
name:
type: string
nullable: true
example: "contract_renewal"
description: The name of the scheduled resource to delete
description: The name of the scheduled resource to delete. When provided (and id is omitted), every assignment with this name for the organization is removed. Either id or name is required.
identifier:
$ref: "#/components/schemas/OrganizationIdentifier"

Expand Down
26 changes: 21 additions & 5 deletions src/lunogram/gen/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ class OrganizationEvent(BaseModel):


class UpsertUserScheduledRequest(BaseModel):
id: UUID | None = Field(None, examples=['a1b2c3d4-e5f6-7890-abcd-ef1234567890'])
"""
The id of the schedule assignment. Omit to create a new assignment (multiple assignments may share the same name per user); supply an existing id to update that assignment in place. The id is returned in the response.
"""
name: str = Field(..., examples=['renewal_date'])
"""
The name of the scheduled resource
Expand All @@ -433,6 +437,10 @@ class UpsertUserScheduledRequest(BaseModel):


class UpsertOrganizationScheduledRequest(BaseModel):
id: UUID | None = Field(None, examples=['a1b2c3d4-e5f6-7890-abcd-ef1234567890'])
"""
The id of the schedule assignment. Omit to create a new assignment (multiple assignments may share the same name per organization); supply an existing id to update that assignment in place. The id is returned in the response.
"""
name: str = Field(..., examples=['contract_renewal'])
"""
The name of the scheduled resource
Expand All @@ -459,11 +467,15 @@ class UpsertOrganizationScheduledRequest(BaseModel):


class DeleteUserScheduledRequest(BaseModel):
name: str = Field(..., examples=['renewal_date'])
id: UUID | None = Field(None, examples=['a1b2c3d4-e5f6-7890-abcd-ef1234567890'])
"""
The name of the scheduled resource to delete
The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
"""
identifier: UserIdentifier | None = None
name: str | None = Field(None, examples=['renewal_date'])
"""
The name of the scheduled resource to delete. When provided (and id is omitted), every assignment with this name for the user is removed. Either id or name is required.
"""
identifier: UserIdentifier


class ScheduledAccepted(BaseModel):
Expand All @@ -486,9 +498,13 @@ class ScheduledAccepted(BaseModel):


class DeleteOrganizationScheduledRequest(BaseModel):
name: str = Field(..., examples=['contract_renewal'])
id: UUID | None = Field(None, examples=['a1b2c3d4-e5f6-7890-abcd-ef1234567890'])
"""
The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
"""
name: str | None = Field(None, examples=['contract_renewal'])
"""
The name of the scheduled resource to delete
The name of the scheduled resource to delete. When provided (and id is omitted), every assignment with this name for the organization is removed. Either id or name is required.
"""
identifier: OrganizationIdentifier

Expand Down
Loading