Skip to content

Commit

Permalink
controller
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalian committed Sep 18, 2024
1 parent 7cde16f commit f08b97b
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 8 deletions.
200 changes: 198 additions & 2 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11202,6 +11202,32 @@
}
}
},
"/v1/organization/user/accept_terms": {
"post": {
"operationId": "AcceptTerms",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Result_null.string_"
}
}
}
}
},
"tags": [
"Organization"
],
"security": [
{
"api_key": []
}
],
"parameters": []
}
},
"/v1/organization/create": {
"post": {
"operationId": "CreateNewOrganization",
Expand Down Expand Up @@ -11987,7 +12013,105 @@
"description": "Ok",
"content": {
"application/json": {
"schema": {}
"schema": {
"properties": {
"total": {
"type": "number",
"format": "double"
},
"tax": {
"type": "number",
"format": "double",
"nullable": true
},
"subtotal": {
"type": "number",
"format": "double"
},
"discount": {
"properties": {
"coupon": {
"properties": {
"percent_off": {
"type": "number",
"format": "double",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
}
},
"required": [
"percent_off",
"name"
],
"type": "object"
}
},
"required": [
"coupon"
],
"type": "object",
"nullable": true
},
"lines": {
"properties": {
"data": {
"items": {
"properties": {
"description": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"id": {
"type": "string",
"nullable": true
}
},
"required": [
"description",
"amount",
"id"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object",
"nullable": true
},
"next_payment_attempt": {
"type": "number",
"format": "double",
"nullable": true
},
"currency": {
"type": "string",
"nullable": true
}
},
"required": [
"total",
"tax",
"subtotal",
"discount",
"lines",
"next_payment_attempt",
"currency"
],
"type": "object",
"nullable": true
}
}
}
}
Expand Down Expand Up @@ -12060,7 +12184,79 @@
"description": "Ok",
"content": {
"application/json": {
"schema": {}
"schema": {
"properties": {
"items": {
"items": {
"properties": {
"price": {
"properties": {
"product": {
"properties": {
"name": {
"type": "string",
"nullable": true
}
},
"required": [
"name"
],
"type": "object",
"nullable": true
}
},
"required": [
"product"
],
"type": "object"
},
"quantity": {
"type": "number",
"format": "double"
}
},
"required": [
"price"
],
"type": "object"
},
"type": "array"
},
"trial_end": {
"type": "number",
"format": "double",
"nullable": true
},
"id": {
"type": "string"
},
"current_period_start": {
"type": "number",
"format": "double"
},
"current_period_end": {
"type": "number",
"format": "double"
},
"cancel_at_period_end": {
"type": "boolean"
},
"status": {
"type": "string"
}
},
"required": [
"items",
"trial_end",
"id",
"current_period_start",
"current_period_end",
"cancel_at_period_end",
"status"
],
"type": "object",
"nullable": true
}
}
}
}
Expand Down
61 changes: 59 additions & 2 deletions helicone-node/api/generatedTypes/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ export interface paths {
"/v1/customer/query": {
post: operations["GetCustomers"];
};
"/v1/organization/user/accept_terms": {
post: operations["AcceptTerms"];
};
"/v1/organization/create": {
post: operations["CreateNewOrganization"];
};
Expand Down Expand Up @@ -4008,6 +4011,16 @@ export interface operations {
};
};
};
AcceptTerms: {
responses: {
/** @description Ok */
200: {
content: {
"application/json": components["schemas"]["Result_null.string_"];
};
};
};
};
CreateNewOrganization: {
requestBody: {
content: {
Expand Down Expand Up @@ -4322,7 +4335,32 @@ export interface operations {
/** @description Ok */
200: {
content: {
"application/json": unknown;
"application/json": ({
/** Format: double */
total: number;
/** Format: double */
tax: number | null;
/** Format: double */
subtotal: number;
discount: ({
coupon: {
/** Format: double */
percent_off: number | null;
name: string | null;
};
}) | null;
lines: ({
data: ({
description: string | null;
/** Format: double */
amount: number | null;
id: string | null;
})[];
}) | null;
/** Format: double */
next_payment_attempt: number | null;
currency: string | null;
}) | null;
};
};
};
Expand Down Expand Up @@ -4350,7 +4388,26 @@ export interface operations {
/** @description Ok */
200: {
content: {
"application/json": unknown;
"application/json": ({
items: ({
price: {
product: ({
name: string | null;
}) | null;
};
/** Format: double */
quantity?: number;
})[];
/** Format: double */
trial_end: number | null;
id: string;
/** Format: double */
current_period_start: number;
/** Format: double */
current_period_end: number;
cancel_at_period_end: boolean;
status: string;
}) | null;
};
};
};
Expand Down
61 changes: 59 additions & 2 deletions web/lib/clients/jawnTypes/private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ export interface paths {
"/v1/stripe/webhook": {
post: operations["HandleStripeWebhook"];
};
"/v1/organization/user/accept_terms": {
post: operations["AcceptTerms"];
};
"/v1/organization/create": {
post: operations["CreateNewOrganization"];
};
Expand Down Expand Up @@ -4103,7 +4106,32 @@ export interface operations {
/** @description Ok */
200: {
content: {
"application/json": unknown;
"application/json": ({
/** Format: double */
total: number;
/** Format: double */
tax: number | null;
/** Format: double */
subtotal: number;
discount: ({
coupon: {
/** Format: double */
percent_off: number | null;
name: string | null;
};
}) | null;
lines: ({
data: ({
description: string | null;
/** Format: double */
amount: number | null;
id: string | null;
})[];
}) | null;
/** Format: double */
next_payment_attempt: number | null;
currency: string | null;
}) | null;
};
};
};
Expand Down Expand Up @@ -4131,7 +4159,26 @@ export interface operations {
/** @description Ok */
200: {
content: {
"application/json": unknown;
"application/json": ({
items: ({
price: {
product: ({
name: string | null;
}) | null;
};
/** Format: double */
quantity?: number;
})[];
/** Format: double */
trial_end: number | null;
id: string;
/** Format: double */
current_period_start: number;
/** Format: double */
current_period_end: number;
cancel_at_period_end: boolean;
status: string;
}) | null;
};
};
};
Expand All @@ -4149,6 +4196,16 @@ export interface operations {
};
};
};
AcceptTerms: {
responses: {
/** @description Ok */
200: {
content: {
"application/json": components["schemas"]["Result_null.string_"];
};
};
};
};
CreateNewOrganization: {
requestBody: {
content: {
Expand Down
Loading

0 comments on commit f08b97b

Please sign in to comment.