From bf992358aea31c3d5210d2bb50951af2a15307f3 Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:15:27 -0500 Subject: [PATCH 1/7] add package endpoints --- keygen-openapi.yml | 415 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 415 insertions(+) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index f3b38b8..af3ffca 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6334,7 +6334,287 @@ paths: responses: '204': description: Artifact queued for deletion + /accounts/{account}/packages: + get: + tags: + - Packages + operationId: listPackages + summary: List all packages + description: | + Returns a list of packages. The packages are returned sorted by creation date, with the most recent published + packages appearing first. Resources are automatically scoped to the authenticated bearer e.g. when authenticated + as a license or user, only packages accessible by the requestor will be listed. + parameters: + - $ref: "#/components/parameters/Account" + - $ref: "#/components/parameters/Page" + - $ref: "#/components/parameters/Limit" + description: A limit on the number of packages to be returned. + - name: product + in: query + description: The identifier (UUID) of the product to filter by. + schema: + type: string + format: uuid + - name: engine + in: query + description: The identifier (UUID) or key of the engine to filter by. + schema: + type: string + responses: + "200": + description: Packages retrieved successfully + content: + application/vnd.api+json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Package" + links: + $ref: "#/components/schemas/PaginationLinks" + default: + $ref: "#/components/responses/Error" + security: + - Bearer: [] + - {} + post: + tags: + - Packages + operationId: createPackage + summary: Create a package + description: | + Creates a new package resource. Packages can be used to enable an engine for a product. In addition, + they can be used to group releases. For example, you can have a single product offering a PyPI toolset, + with multiple packages all released and versioned separately. + parameters: + - $ref: "#/components/parameters/Account" + requestBody: + required: true + content: + application/vnd.json+api: + schema: + title: CreatePackageRequest + type: object + properties: + data: + type: object + properties: + type: + type: string + enum: [packages] + attributes: + type: object + properties: + name: + type: + - string + - "null" + description: | + The human-readable name of the package. This can be used as an optional label. + key: + type: string + description: | + The machine-readable key of the package. + engine: + type: + - string + - "null" + enum: + - pypi + - tauri + - raw + - rubygems + description: | + The engine for the package. Set to `null` for no engine. + **Options** + - `pypi`: For releasing PyPI packages. Artifacts can be installed using `pip`. + - `tauri`: For releasing Tauri apps. Compatible with Tauri's auto-updater. + - `raw`: For releasing raw binaries, installers, etc. + - `rubygems`: For releasing Ruby gems. Artifacts can be installed using `bundler` or `gem`. + metadata: + type: object + description: | + Object containing package metadata. This can be used to store arbitrary key-value data, + e.g. for book keeping or display purposes. + additionalProperties: true + relationships: + type: object + properties: + product: + type: object + description: The product the package is for. + properties: + data: + type: object + properties: + type: + type: string + enum: [products] + id: + type: string + required: + - type + - id + required: + - data + required: + - product + required: + - data + responses: + "201": + description: Package created successfully + content: + application/vnd.api+json: + schema: + title: CreatePackageResponse + typ: object + properties: + data: + $ref: "#/components/schemas/Package" + required: + - data + default: + $ref: "#/components/responses/Error" + /accounts/{account}/packages/{package}: + get: + tags: + - Packages + operationId: retrievePackage + summary: Retrieve a package + description: Retrieves the details of an existing package. + parameters: + - $ref: "#/components/parameters/Account" + - name: package + in: path + description: The identifier (UUID) or key of the package to be retrieved. + required: true + schema: + type: string + responses: + "200": + description: Package retrieved successfully + content: + application/vnd.api+json: + schema: + title: RetrievePackageResponse + type: object + properties: + data: + $ref: "#/components/schemas/Package" + required: + - data + default: + $ref: "#/components/responses/Error" + patch: + tags: + - Packages + operationId: updatePackage + summary: Update a package + description: | + Updates the specified package resource by setting the values of the parameters passed. Any parameters + not provided will be left unchanged. + parameters: + - $ref: "#/components/parameters/Account" + - name: package + in: path + description: The identifier (UUID) or key of the package to be updated. + required: true + schema: + type: string + requestBody: + content: + application/vnd.api+json: + schema: + title: UpdatePackageRequest + type: object + properties: + data: + type: object + properties: + type: + type: string + enum: [packages] + attributes: + type: object + properties: + name: + type: + - string + - "null" + description: | + The human-readable name of the package. This can be used as an optional label. + key: + type: string + description: | + The machine-readable key of the package. + engine: + type: + - string + - "null" + enum: + - pypi + - tauri + - raw + - rubygems + description: | + The engine for the package. Set to `null` for no engine. + + **Options** + - `pypi`: For releasing PyPI packages. Artifacts can be installed using `pip`. + - `tauri`: For releasing Tauri apps. Compatible with Tauri's auto-updater. + - `raw`: For releasing raw binaries, installers, etc. + - `rubygems`: For releasing Ruby gems. Artifacts can be installed using `bundler` or `gem`. + metadata: + type: object + description: | + Object containing package metadata. This can be used to store arbitrary key-value data, + e.g. for book keeping or display purposes. + additionalProperties: true + required: + - type + - attributes + required: + - data + responses: + "200": + description: Package updated successfully + content: + application/vnd.api+json: + schema: + title: UpdatePackageResponse + type: object + properties: + data: + $ref: "#/components/schemas/Package" + required: + - data + default: + $ref: "#/components/responses/Error" + delete: + tags: + - Packages + operationId: deletePackage + summary: Delete a package + description: | + Permanently deletes a package. It cannot be undone. This action also immediately deletes any releases + and artifacts that the package is associated with. + parameters: + - $ref: "#/components/parameters/Account" + - name: policy + in: path + description: The identifier (UUID) or key of the package to be deleted. + required: true + schema: + type: string + responses: + "204": + description: Package deleted successfully + default: + $ref: "#/components/responses/Error" webhooks: event: @@ -9867,6 +10147,141 @@ components: related: type: string format: uri + Package: + type: object + description: | + Below you will find the various attributes for the package resource, as well as the package resource's relationships. + properties: + id: + type: string + type: + type: string + enum: [packages] + attributes: + type: object + properties: + name: + type: + - string + - "null" + description: The human-readable name of the package. This can be used as an optional label. + key: + type: string + description: The machine-readable key of the package. + engine: + type: + - string + - "null" + enum: + - pypi + - tauri + - raw + - rubygems + description: | + The engine for the package. Set to `null` for no engine. + + **Options** + - `pypi`: For releasing PyPI packages. Artifacts can be installed using `pip`. + - `tauri`: For releasing Tauri apps. Compatible with Tauri's auto-updater. + - `raw`: For releasing raw binaries, installers, etc. + - `rubygems`: For releasing Ruby gems. Artifacts can be installed using `bundler` or `gem`. + metadata: + type: object + description: | + Object containing package metadata. This can be used to store arbitrary key-value data, e.g. for book + keeping or display purposes. + additionalProperties: true + created: + type: string + format: date-time + description: When the package was created. + updated: + type: string + format: date-time + description: When the package was last updated. + required: + - name + - key + - engine + - metadata + - created + - updated + relationships: + type: object + properties: + account: + type: object + description: The account that the package belongs to. + properties: + links: + $ref: "#/components/schemas/RelatedLinks" + data: + type: object + properties: + type: + type: string + enum: [accounts] + id: + type: string + required: + - type + - id + required: + - data + - links + environment: + type: object + description: The environment that the package belongs to. + properties: + links: + $ref: "#/components/schemas/RelatedLinks" + data: + type: object + properties: + type: + type: string + enum: [environments] + id: + type: string + required: + - type + - id + required: + - links + - data + product: + type: object + description: The product that the package belongs to. + properties: + links: + $ref: "#/components/schemas/RelatedLinks" + data: + type: object + properties: + type: + type: string + enum: [products] + id: + type: string + required: + - type + - id + required: + - data + - links + required: + - account + - environment + - product + links: + $ref: "#/components/schemas/SelfLinks" + required: + - id + - type + - attributes + - relationships + - links + Error: type: object properties: From 5f6a1b64b77cea0aa27d8e9fc429c694f3696f80 Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:23:03 -0500 Subject: [PATCH 2/7] add title to listPackages response --- keygen-openapi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index af3ffca..8fcbb19 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6366,6 +6366,7 @@ paths: content: application/vnd.api+json: schema: + title: ListPackagesResponse type: object properties: data: From a5c73acbe07c0507278168c4d59f6a275136212d Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:25:53 -0500 Subject: [PATCH 3/7] fix package deletion endpoint --- keygen-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index 8fcbb19..7a89730 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6605,7 +6605,7 @@ paths: and artifacts that the package is associated with. parameters: - $ref: "#/components/parameters/Account" - - name: policy + - name: package in: path description: The identifier (UUID) or key of the package to be deleted. required: true From 8ab389f381f881ff7f79a1f2fe2b61f508fab741 Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:28:25 -0500 Subject: [PATCH 4/7] make data and links required --- keygen-openapi.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index 7a89730..e560b72 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6375,6 +6375,9 @@ paths: $ref: "#/components/schemas/Package" links: $ref: "#/components/schemas/PaginationLinks" + required: + - data + - links default: $ref: "#/components/responses/Error" security: From 5703fb3e3d489dd6247b04925df02fc517ddacce Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:44:46 -0500 Subject: [PATCH 5/7] add missing required fields --- keygen-openapi.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index e560b72..6c1a82f 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6444,6 +6444,8 @@ paths: Object containing package metadata. This can be used to store arbitrary key-value data, e.g. for book keeping or display purposes. additionalProperties: true + required: + - key relationships: type: object properties: @@ -6466,6 +6468,10 @@ paths: - data required: - product + required: + - type + - attributes + - relationships required: - data responses: From cd41bfd1b34520b1e2f77dedf2403da5057910af Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Wed, 24 Sep 2025 18:03:56 -0500 Subject: [PATCH 6/7] fix content type of createPackage requestBody --- keygen-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index 6c1a82f..c98ce5d 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6397,7 +6397,7 @@ paths: requestBody: required: true content: - application/vnd.json+api: + application/vnd.api+json: schema: title: CreatePackageRequest type: object From 010c6cd648cf46b3e592a23c35bb03cab19b9146 Mon Sep 17 00:00:00 2001 From: campbellcole <10430178+campbellcole@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:01:09 -0500 Subject: [PATCH 7/7] remove incorrect security from endpoint --- keygen-openapi.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/keygen-openapi.yml b/keygen-openapi.yml index c98ce5d..63f3e4c 100644 --- a/keygen-openapi.yml +++ b/keygen-openapi.yml @@ -6380,9 +6380,6 @@ paths: - links default: $ref: "#/components/responses/Error" - security: - - Bearer: [] - - {} post: tags: - Packages