Skip to content

Commit

Permalink
bump API types (#80)
Browse files Browse the repository at this point in the history
Bumping types
<!-- ELLIPSIS_HIDDEN -->


----

> [!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.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=nomic-ai%2Fts-nomic&utm_source=github&utm_medium=referral)<sup> for 8a3ab04. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
bmschmidt authored Oct 10, 2024
1 parent e82b9da commit 5e5ce3e
Showing 1 changed file with 52 additions and 82 deletions.
134 changes: 52 additions & 82 deletions src/type-gen/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2770,47 +2752,16 @@ export interface components {
* Permissions
* @description User permissions in organization
*/
permissions: components['schemas']['OrganizationPermissions'];
permissions: {
[key: string]: boolean;
};
/**
* Email
* @description User email
* @example nomic@gmail.com
*/
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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -3771,6 +3736,11 @@ export interface components {
* @description DSL rule json
*/
dsl_rule?: string;
/**
* Projection Id
* @description Projection ID
*/
projection_id: string;
};
/** TagStatus */
TagStatus: {
Expand Down Expand Up @@ -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'];
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 5e5ce3e

Please sign in to comment.