From 5e5ce3e3f88d627f7b84e3ec7f16d7d08f79fc31 Mon Sep 17 00:00:00 2001 From: Benjamin Schmidt Date: Thu, 10 Oct 2024 10:47:43 -0400 Subject: [PATCH] bump API types (#80) Bumping types ---- > [!IMPORTANT] > Update API types in `openapi.ts`, changing promo code validation to POST, updating role fields, and simplifying permissions. > > - **API Changes**: > - Change HTTP method for `/v1/stripe/promo-code/validate` from GET to POST in `openapi.ts`. > - Add `projection_id` to `TagResponse` schema. > - Add `umap` to `NomicProjectModel` enumeration. > - **Schema Updates**: > - Replace `access_role` and `permissions` with `dataset_role`, `explicit_dataset_role`, and `org_role` in `DatasetMembershipWithPicture`. > - Simplify `permissions` structure to `{ [key: string]: boolean }` in multiple schemas. > - **Misc**: > - Update `project_id` in `get_tag_request_v1_project_projection_tags_get_get` to be optional. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=nomic-ai%2Fts-nomic&utm_source=github&utm_medium=referral) for 8a3ab0496d79f145b821a0928c69895ae204ef0c. It will automatically update as commits are pushed. --- src/type-gen/openapi.ts | 134 ++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 82 deletions(-) diff --git a/src/type-gen/openapi.ts b/src/type-gen/openapi.ts index 97daddd..03e6f85 100644 --- a/src/type-gen/openapi.ts +++ b/src/type-gen/openapi.ts @@ -867,7 +867,7 @@ export interface paths { * Validate Promo Code * @description Validate a promo code against a plan type using Stripe API */ - get: operations['validate_promo_code_v1_stripe_promo_code_validate_get']; + post: operations['validate_promo_code_v1_stripe_promo_code_validate_post']; }; '/v1/stripe/subscribe': { /** @@ -1489,52 +1489,30 @@ export interface components { * @description User ID */ user_id: string; + /** @description User access role in dataset, whether granted explicitly or from organization membership */ + dataset_role: components['schemas']['DatasetRole']; + /** @description Access role manually granted or based on dataset creation */ + explicit_dataset_role?: components['schemas']['DatasetRole']; /** - * Access Role - * @description User access role in dataset + * Picture + * @description The user's profile image */ - access_role: string; + picture?: string; + /** Permissions */ + permissions: { + [key: string]: boolean; + }; /** - * Permissions - * @description User permissions in dataset + * Org Role + * @description User access role in organization + * @example member */ - permissions: components['schemas']['DatasetPermissions']; + org_role: string; /** - * Picture - * @description The users profile image + * Email + * @description The user email */ - picture?: string; - }; - /** DatasetPermissions */ - DatasetPermissions: { - /** Dataset:Administration:Read */ - 'dataset:administration:read': boolean; - /** Dataset:Administration:Write */ - 'dataset:administration:write': boolean; - /** Dataset:Metadata:Read */ - 'dataset:metadata:read': boolean; - /** Dataset:Metadata:Write */ - 'dataset:metadata:write': boolean; - /** Dataset:Data:Read */ - 'dataset:data:read': boolean; - /** Dataset:Data:Write */ - 'dataset:data:write': boolean; - /** Dataset:Data:Add Data */ - 'dataset:data:add_data': boolean; - /** Dataset:Resource:Create */ - 'dataset:resource:create': boolean; - /** Dataset:Data:Delete Data */ - 'dataset:data:delete_data': boolean; - /** Dataset:Resource:Delete */ - 'dataset:resource:delete': boolean; - /** Dataset:Members:Read */ - 'dataset:members:read': boolean; - /** Dataset:Members:Write */ - 'dataset:members:write': boolean; - /** Dataset:Tags:Read */ - 'dataset:tags:read': boolean; - /** Dataset:Tags:Write */ - 'dataset:tags:write': boolean; + email: string; }; /** * DatasetRole @@ -2427,7 +2405,7 @@ export interface components { * @description An enumeration. * @enum {string} */ - NomicProjectModel: 'nomic-project-v1' | 'nomic-project-v2'; + NomicProjectModel: 'nomic-project-v1' | 'nomic-project-v2' | 'umap'; /** * NomicTextEmbeddingModel * @description An enumeration. @@ -2563,7 +2541,9 @@ export interface components { * Permissions * @description User permissions in organization */ - permissions: components['schemas']['OrganizationPermissions']; + permissions: { + [key: string]: boolean; + }; /** * Public Organization * @description Is the organization public? @@ -2727,7 +2707,9 @@ export interface components { * Permissions * @description User permissions in organization */ - permissions: components['schemas']['OrganizationPermissions']; + permissions: { + [key: string]: boolean; + }; /** * Slug * @description The organization url-safe slug @@ -2770,7 +2752,9 @@ export interface components { * Permissions * @description User permissions in organization */ - permissions: components['schemas']['OrganizationPermissions']; + permissions: { + [key: string]: boolean; + }; /** * Email * @description User email @@ -2778,39 +2762,6 @@ export interface components { */ email: string; }; - /** OrganizationPermissions */ - OrganizationPermissions: { - /** Organization:Administration:Read */ - 'organization:administration:read': boolean; - /** Organization:Administration:Write */ - 'organization:administration:write': boolean; - /** Organization:Metadata:Read */ - 'organization:metadata:read': boolean; - /** Organization:Metadata:Write */ - 'organization:metadata:write': boolean; - /** Organization:Members:Read */ - 'organization:members:read': boolean; - /** Organization:Members:Write */ - 'organization:members:write': boolean; - /** Organization:Api Keys:Read */ - 'organization:api_keys:read': boolean; - /** Organization:Api Keys:Write */ - 'organization:api_keys:write': boolean; - /** Organization:Datasets:Read */ - 'organization:datasets:read': boolean; - /** Organization:Datasets:Write */ - 'organization:datasets:write': boolean; - /** Organization:Datasets:Write All */ - 'organization:datasets:write_all': boolean; - /** Organization:Datasets:Create */ - 'organization:datasets:create': boolean; - /** Organization:Internally Shared Datasets:Access */ - 'organization:internally_shared_datasets:access': boolean; - /** Organization:Billing:Read */ - 'organization:billing:read': boolean; - /** Organization:Billing:Write */ - 'organization:billing:write': boolean; - }; /** * OrganizationPlan * @description The list of available plans for organizations. @@ -3069,7 +3020,9 @@ export interface components { * Permissions * @description Access role of user for this dataset */ - permissions: components['schemas']['DatasetPermissions']; + permissions: { + [key: string]: boolean; + }; /** * Schema * @description An Arrow schema for the project. Binary data encoded as base64. @@ -3531,7 +3484,9 @@ export interface components { * Permissions * @description User permissions in organization */ - permissions: components['schemas']['OrganizationPermissions']; + permissions: { + [key: string]: boolean; + }; /** * Public Organization * @description Is the organization public? @@ -3710,6 +3665,16 @@ export interface components { * @description The stripe client secret for the payment entering session */ client_secret: string; + /** + * Applied Promo Code + * @description The applied promo code, if successful + */ + applied_promo_code?: string; + /** + * Promo Code Description + * @description Description of promo code (metadata.descrption in Stripe), if available + */ + promo_code_description?: string; }; /** SuccessResponse */ SuccessResponse: { @@ -3771,6 +3736,11 @@ export interface components { * @description DSL rule json */ dsl_rule?: string; + /** + * Projection Id + * @description Projection ID + */ + projection_id: string; }; /** TagStatus */ TagStatus: { @@ -7558,7 +7528,7 @@ export interface operations { * Validate Promo Code * @description Validate a promo code against a plan type using Stripe API */ - validate_promo_code_v1_stripe_promo_code_validate_get: { + validate_promo_code_v1_stripe_promo_code_validate_post: { requestBody: { content: { 'application/json': components['schemas']['ValidatePromoCodeRequest']; @@ -7782,8 +7752,8 @@ export interface operations { get_tag_request_v1_project_projection_tags_get_get: { parameters: { query: { - project_id: string; tag_id: string; + project_id?: string; }; }; responses: {