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
4 changes: 2 additions & 2 deletions spec/SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ it via `pnpm generate`. Do not hand-edit either file.
| Field | Value |
| ----------- | ------------------------------------ |
| 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` |

Release asset URL to re-fetch the spec:

```
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
```

## About the pin
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
34 changes: 29 additions & 5 deletions src/gen/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,12 @@ export interface components {
} | null;
};
UpsertUserScheduledRequest: {
/**
* Format: uuid
* @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.
* @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
*/
id?: string | null;
/**
* @description The name of the scheduled resource
* @example renewal_date
Expand Down Expand Up @@ -1017,6 +1023,12 @@ export interface components {
} | null;
};
UpsertOrganizationScheduledRequest: {
/**
* Format: uuid
* @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.
* @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
*/
id?: string | null;
/**
* @description The name of the scheduled resource
* @example contract_renewal
Expand Down Expand Up @@ -1053,11 +1065,17 @@ export interface components {
};
DeleteUserScheduledRequest: {
/**
* @description The name of the scheduled resource to delete
* Format: uuid
* @description The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
* @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
*/
id?: string | null;
/**
* @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.
* @example renewal_date
*/
name: string;
identifier?: components["schemas"]["UserIdentifier"];
name?: string | null;
identifier: components["schemas"]["UserIdentifier"];
};
ScheduledAccepted: {
/**
Expand All @@ -1084,10 +1102,16 @@ export interface components {
};
DeleteOrganizationScheduledRequest: {
/**
* @description The name of the scheduled resource to delete
* Format: uuid
* @description The id of a specific schedule assignment to delete. When provided, only that instance is removed. Either id or name is required.
* @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
*/
id?: string | null;
/**
* @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.
* @example contract_renewal
*/
name: string;
name?: string | null;
identifier: components["schemas"]["OrganizationIdentifier"];
};
};
Expand Down
22 changes: 17 additions & 5 deletions src/types/scheduled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { UserIdentifier, OrganizationIdentifier } from './request'

/** Request to create or update a scheduled resource for a user */
export interface UpsertUserScheduledRequest {
/** Id of an existing assignment to update in place. Omit to create a new
* assignment; the same name may be scheduled multiple times. Returned in the
* response. */
id?: string
name: string
identifier?: UserIdentifier
scheduledAt?: string | null
Expand All @@ -11,10 +15,12 @@ export interface UpsertUserScheduledRequest {
data?: Record<string, JSONValue> | null
}

/** Request to delete a user scheduled resource */
/** Request to delete a user scheduled resource. Provide `id` to delete a single
* assignment, or `name` to delete every assignment with that name. */
export interface DeleteUserScheduledRequest {
name: string
identifier?: UserIdentifier
id?: string
name?: string
identifier: UserIdentifier
}

/** Response when a scheduled resource is accepted */
Expand All @@ -27,6 +33,10 @@ export interface ScheduledAcceptedResponse {

/** Request to create or update a scheduled resource for an organization */
export interface UpsertOrganizationScheduledRequest {
/** Id of an existing assignment to update in place. Omit to create a new
* assignment; the same name may be scheduled multiple times. Returned in the
* response. */
id?: string
name: string
identifier: OrganizationIdentifier
scheduledAt?: string | null
Expand All @@ -35,8 +45,10 @@ export interface UpsertOrganizationScheduledRequest {
data?: Record<string, JSONValue> | null
}

/** Request to delete an organization scheduled resource */
/** Request to delete an organization scheduled resource. Provide `id` to delete a
* single assignment, or `name` to delete every assignment with that name. */
export interface DeleteOrganizationScheduledRequest {
name: string
id?: string
name?: string
identifier: OrganizationIdentifier
}
Loading