diff --git a/spec.json b/spec.json index 7ed5d2cd..5e363bae 100644 --- a/spec.json +++ b/spec.json @@ -12675,17 +12675,17 @@ } } }, - "/user/extended": { - "get": { + "/user/crm": { + "options": { "tags": [ - "users" + "hidden" ], - "summary": "Get extended information about your user.", - "description": "Get the user information for the authenticated user.\n\nAlternatively, you can also use the `/users-extended/me` endpoint.", - "operationId": "get_user_self_extended", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_patch_user_crm", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -12735,13 +12735,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } } }, "4XX": { @@ -12751,19 +12744,27 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/oauth2/providers": { - "get": { + }, + "patch": { "tags": [ - "users" + "users", + "hidden" ], - "summary": "Get the OAuth2 providers for your user.", - "description": "If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.\n\nThis endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.", - "operationId": "get_oauth2_providers_for_user", + "summary": "Update properties in the CRM", + "operationId": "patch_user_crm", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CrmData" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -12813,17 +12814,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_AccountProvider", - "type": "array", - "items": { - "$ref": "#/components/schemas/AccountProvider" - } - } - } } }, "4XX": { @@ -12835,15 +12825,14 @@ } } }, - "/user/onboarding": { + "/user/extended": { "get": { "tags": [ - "users", - "hidden" + "users" ], - "summary": "Get your user's onboarding status.", - "description": "Checks key part of their api usage to determine their onboarding progress", - "operationId": "get_user_onboarding_self", + "summary": "Get extended information about your user.", + "description": "Get the user information for the authenticated user.\n\nAlternatively, you can also use the `/users-extended/me` endpoint.", + "operationId": "get_user_self_extended", "responses": { "200": { "description": "successful operation", @@ -12900,7 +12889,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Onboarding" + "$ref": "#/components/schemas/ExtendedUser" } } } @@ -12914,18 +12903,28 @@ } } }, - "/user/org": { - "get": { + "/user/form": { + "put": { "tags": [ - "orgs", - "users" + "users", + "hidden" ], - "summary": "Get a user's org.", - "description": "This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.\n\nIf the user is not a member of an org, this endpoint will return a 404.", - "operationId": "get_user_org", + "summary": "Create a new support/sales ticket from the website contact form. This endpoint is authenticated.", + "description": "It gets attached to the user's account.", + "operationId": "put_user_form_self", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InquiryForm" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -12975,13 +12974,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserOrgInfo" - } - } } }, "4XX": { @@ -12991,19 +12983,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment": { - "get": { + }, + "options": { "tags": [ - "payments" + "hidden" ], - "summary": "Get payment info about your user.", - "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.", - "operationId": "get_payment_information_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_put_user_form_self", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13053,13 +13043,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } } }, "4XX": { @@ -13069,24 +13052,16 @@ "$ref": "#/components/responses/Error" } } - }, - "put": { + } + }, + "/user/oauth2/providers": { + "get": { "tags": [ - "payments" + "users" ], - "summary": "Update payment info for your user.", - "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.", - "operationId": "update_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, + "summary": "Get the OAuth2 providers for your user.", + "description": "If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.\n\nThis endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.", + "operationId": "get_oauth2_providers_for_user", "responses": { "200": { "description": "successful operation", @@ -13143,7 +13118,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "title": "Array_of_AccountProvider", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountProvider" + } } } } @@ -13155,27 +13134,20 @@ "$ref": "#/components/responses/Error" } } - }, - "post": { + } + }, + "/user/onboarding": { + "get": { "tags": [ - "payments" + "users", + "hidden" ], - "summary": "Create payment info for your user.", - "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.", - "operationId": "create_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, + "summary": "Get your user's onboarding status.", + "description": "Checks key part of their api usage to determine their onboarding progress", + "operationId": "get_user_onboarding_self", "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13229,7 +13201,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/Onboarding" } } } @@ -13241,17 +13213,20 @@ "$ref": "#/components/responses/Error" } } - }, - "delete": { + } + }, + "/user/org": { + "get": { "tags": [ - "payments" + "orgs", + "users" ], - "summary": "Delete payment info for your user.", - "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.", - "operationId": "delete_payment_information_for_user", + "summary": "Get a user's org.", + "description": "This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.\n\nIf the user is not a member of an org, this endpoint will return a 404.", + "operationId": "get_user_org", "responses": { - "204": { - "description": "successful deletion", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13301,6 +13276,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserOrgInfo" + } + } } }, "4XX": { @@ -13310,17 +13292,19 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/user/payment": { + "get": { "tags": [ - "hidden" + "payments" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_information_for_user", + "summary": "Get payment info about your user.", + "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.", + "operationId": "get_payment_information_for_user", "responses": { - "204": { - "description": "resource updated", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13370,6 +13354,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } } }, "4XX": { @@ -13379,28 +13370,26 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/balance": { - "get": { + }, + "put": { "tags": [ "payments" ], - "summary": "Get balance for your user.", - "description": "This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.", - "operationId": "get_payment_balance_for_user", - "parameters": [ - { - "in": "query", - "name": "include_total_due", - "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { + "summary": "Update payment info for your user.", + "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.", + "operationId": "update_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } + } + }, + "required": true + }, + "responses": { + "200": { "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { @@ -13455,7 +13444,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerBalance" + "$ref": "#/components/schemas/Customer" } } } @@ -13467,17 +13456,24 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/intent": { + }, "post": { "tags": [ - "payments", - "hidden" + "payments" ], - "summary": "Create a payment intent for your user.", - "description": "This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.", - "operationId": "create_payment_intent_for_user", + "summary": "Create payment info for your user.", + "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.", + "operationId": "create_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } + } + }, + "required": true + }, "responses": { "201": { "description": "successful creation", @@ -13534,7 +13530,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentIntent" + "$ref": "#/components/schemas/Customer" } } } @@ -13547,16 +13543,16 @@ } } }, - "options": { + "delete": { "tags": [ - "hidden" + "payments" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_intent_for_user", + "summary": "Delete payment info for your user.", + "description": "This includes billing address, phone, and name.\n\nThis endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.", + "operationId": "delete_payment_information_for_user", "responses": { "204": { - "description": "resource updated", + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13615,19 +13611,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/invoices": { - "get": { + }, + "options": { "tags": [ - "payments" + "hidden" ], - "summary": "List invoices for your user.", - "description": "This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.", - "operationId": "list_invoices_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_information_for_user", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13677,17 +13671,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_Invoice", - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - } } }, "4XX": { @@ -13699,14 +13682,24 @@ } } }, - "/user/payment/methods": { + "/user/payment/balance": { "get": { "tags": [ "payments" ], - "summary": "List payment methods for your user.", - "description": "This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.", - "operationId": "list_payment_methods_for_user", + "summary": "Get balance for your user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.", + "operationId": "get_payment_balance_for_user", + "parameters": [ + { + "in": "query", + "name": "include_total_due", + "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "successful operation", @@ -13763,11 +13756,7 @@ "content": { "application/json": { "schema": { - "title": "Array_of_PaymentMethod", - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } + "$ref": "#/components/schemas/CustomerBalance" } } } @@ -13781,29 +13770,18 @@ } } }, - "/user/payment/methods/{id}": { - "delete": { + "/user/payment/intent": { + "post": { "tags": [ "payments", "hidden" ], - "summary": "Delete a payment method for your user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.", - "operationId": "delete_payment_method_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create a payment intent for your user.", + "description": "This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.", + "operationId": "create_payment_intent_for_user", "responses": { - "204": { - "description": "successful deletion", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13853,6 +13831,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent" + } + } } }, "4XX": { @@ -13869,21 +13854,10 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_methods_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "options_payment_intent_for_user", "responses": { "204": { - "description": "successful operation, no content", + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -13944,14 +13918,14 @@ } } }, - "/user/payment/subscriptions": { + "/user/payment/invoices": { "get": { "tags": [ "payments" ], - "summary": "Get the subscription for a user.", - "description": "This endpoint requires authentication by any Zoo user. It gets the subscription for the user.", - "operationId": "get_user_subscription", + "summary": "List invoices for your user.", + "description": "This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.", + "operationId": "list_invoices_for_user", "responses": { "200": { "description": "successful operation", @@ -14008,7 +13982,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ZooProductSubscriptions" + "title": "Array_of_Invoice", + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } } } } @@ -14020,24 +13998,16 @@ "$ref": "#/components/responses/Error" } } - }, - "put": { + } + }, + "/user/payment/methods": { + "get": { "tags": [ "payments" ], - "summary": "Update the user's subscription.", - "description": "This endpoint requires authentication by any Zoo user. It updates the subscription for the user.", - "operationId": "update_user_subscription", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ZooProductSubscriptionsUserRequest" - } - } - }, - "required": true - }, + "summary": "List payment methods for your user.", + "description": "This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.", + "operationId": "list_payment_methods_for_user", "responses": { "200": { "description": "successful operation", @@ -14094,7 +14064,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ZooProductSubscriptions" + "title": "Array_of_PaymentMethod", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } } } } @@ -14106,27 +14080,31 @@ "$ref": "#/components/responses/Error" } } - }, - "post": { + } + }, + "/user/payment/methods/{id}": { + "delete": { "tags": [ - "payments" + "payments", + "hidden" ], - "summary": "Create the subscription for a user.", - "description": "This endpoint requires authentication by any Zoo user. It creates the subscription for the user.", - "operationId": "create_user_subscription", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ZooProductSubscriptionsUserRequest" - } + "summary": "Delete a payment method for your user.", + "description": "This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.", + "operationId": "delete_payment_method_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { - "201": { - "description": "successful creation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14176,13 +14154,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ZooProductSubscriptions" - } - } } }, "4XX": { @@ -14199,10 +14170,21 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_user_subscription", + "operationId": "options_payment_methods_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "204": { - "description": "resource updated", + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14263,18 +14245,17 @@ } } }, - "/user/payment/tax": { + "/user/payment/subscriptions": { "get": { "tags": [ - "payments", - "hidden" + "payments" ], - "summary": "Validate a user's information is correct and valid for automatic tax.", - "description": "This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.", - "operationId": "validate_customer_tax_information_for_user", + "summary": "Get the subscription for a user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the subscription for the user.", + "operationId": "get_user_subscription", "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14324,6 +14305,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } } }, "4XX": { @@ -14333,16 +14321,24 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/privacy": { - "get": { + }, + "put": { "tags": [ - "users" + "payments" ], - "summary": "Get the privacy settings for a user.", - "description": "This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.", - "operationId": "get_user_privacy_settings", + "summary": "Update the user's subscription.", + "description": "This endpoint requires authentication by any Zoo user. It updates the subscription for the user.", + "operationId": "update_user_subscription", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptionsUserRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "successful operation", @@ -14399,7 +14395,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivacySettings" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } } @@ -14412,26 +14408,26 @@ } } }, - "put": { + "post": { "tags": [ - "users" + "payments" ], - "summary": "Update the user's privacy settings.", - "description": "This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.", - "operationId": "update_user_privacy_settings", + "summary": "Create the subscription for a user.", + "description": "This endpoint requires authentication by any Zoo user. It creates the subscription for the user.", + "operationId": "create_user_subscription", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivacySettings" + "$ref": "#/components/schemas/ZooProductSubscriptionsUserRequest" } } }, "required": true }, "responses": { - "200": { - "description": "successful operation", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14485,7 +14481,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivacySettings" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } } @@ -14504,7 +14500,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_user_privacy_settings", + "operationId": "options_user_subscription", "responses": { "204": { "description": "resource updated", @@ -14568,28 +14564,18 @@ } } }, - "/user/session/{token}": { + "/user/payment/tax": { "get": { "tags": [ - "users" - ], - "summary": "Get a session for your user.", - "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", - "operationId": "get_session_for_user", - "parameters": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "$ref": "#/components/schemas/SessionUuid" - } - } + "payments", + "hidden" ], + "summary": "Validate a user's information is correct and valid for automatic tax.", + "description": "This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.", + "operationId": "validate_customer_tax_information_for_user", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14639,13 +14625,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } } }, "4XX": { @@ -14657,44 +14636,14 @@ } } }, - "/user/shortlinks": { + "/user/privacy": { "get": { "tags": [ - "users", - "shortlinks" - ], - "summary": "Get the shortlinks for a user.", - "description": "This endpoint requires authentication by any Zoo user. It gets the shortlinks for the user.", - "operationId": "get_user_shortlinks", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } - } + "users" ], + "summary": "Get the privacy settings for a user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.", + "operationId": "get_user_privacy_settings", "responses": { "200": { "description": "successful operation", @@ -14751,7 +14700,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShortlinkResultsPage" + "$ref": "#/components/schemas/PrivacySettings" } } } @@ -14762,32 +14711,28 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } }, - "post": { + "put": { "tags": [ - "users", - "shortlinks" + "users" ], - "summary": "Create a shortlink for a user.", - "description": "This endpoint requires authentication by any Zoo user. It creates a shortlink for the user.", - "operationId": "create_user_shortlink", + "summary": "Update the user's privacy settings.", + "description": "This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.", + "operationId": "update_user_privacy_settings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateShortlinkRequest" + "$ref": "#/components/schemas/PrivacySettings" } } }, "required": true }, "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14841,7 +14786,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateShortlinkResponse" + "$ref": "#/components/schemas/PrivacySettings" } } } @@ -14860,7 +14805,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_user_shortlinks", + "operationId": "options_user_privacy_settings", "responses": { "204": { "description": "resource updated", @@ -14924,30 +14869,28 @@ } } }, - "/user/shortlinks/{key}": { + "/user/session/{token}": { "get": { "tags": [ - "hidden", - "users", - "shortlinks" + "users" ], - "summary": "Redirect the user to the URL for the shortlink.", - "description": "This endpoint might require authentication by a Zoo user. It gets the shortlink for the user and redirects them to the URL. If the shortlink is owned by an org, the user must be a member of the org.", - "operationId": "redirect_user_shortlink", + "summary": "Get a session for your user.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", + "operationId": "get_session_for_user", "parameters": [ { "in": "path", - "name": "key", - "description": "The key of the shortlink.", + "name": "token", + "description": "The API token.", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/SessionUuid" } } ], "responses": { - "302": { - "description": "Temporary Redirect", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -14997,6 +14940,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } } }, "4XX": { @@ -15006,39 +14956,49 @@ "$ref": "#/components/responses/Error" } } - }, - "put": { + } + }, + "/user/shortlinks": { + "get": { "tags": [ "users", "shortlinks" ], - "summary": "Update a shortlink for a user.", - "description": "This endpoint requires authentication by any Zoo user. It updates a shortlink for the user.\n\nThis endpoint really only allows you to change the `restrict_to_org` setting of a shortlink. Thus it is only useful for folks who are part of an org. If you are not part of an org, you will not be able to change the `restrict_to_org` status.", - "operationId": "update_user_shortlink", + "summary": "Get the shortlinks for a user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the shortlinks for the user.", + "operationId": "get_user_shortlinks", "parameters": [ { - "in": "path", - "name": "key", - "description": "The key of the shortlink.", - "required": true, + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", "schema": { + "nullable": true, "type": "string" } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateShortlinkRequest" - } - } - }, - "required": true - }, "responses": { - "204": { - "description": "resource updated", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -15088,6 +15048,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShortlinkResultsPage" + } + } } }, "4XX": { @@ -15096,24 +15063,737 @@ "5XX": { "$ref": "#/components/responses/Error" } - } + }, + "x-dropshot-pagination": { + "required": [] + } + }, + "post": { + "tags": [ + "users", + "shortlinks" + ], + "summary": "Create a shortlink for a user.", + "description": "This endpoint requires authentication by any Zoo user. It creates a shortlink for the user.", + "operationId": "create_user_shortlink", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShortlinkRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShortlinkResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_user_shortlinks", + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/shortlinks/{key}": { + "get": { + "tags": [ + "hidden", + "users", + "shortlinks" + ], + "summary": "Redirect the user to the URL for the shortlink.", + "description": "This endpoint might require authentication by a Zoo user. It gets the shortlink for the user and redirects them to the URL. If the shortlink is owned by an org, the user must be a member of the org.", + "operationId": "redirect_user_shortlink", + "parameters": [ + { + "in": "path", + "name": "key", + "description": "The key of the shortlink.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "tags": [ + "users", + "shortlinks" + ], + "summary": "Update a shortlink for a user.", + "description": "This endpoint requires authentication by any Zoo user. It updates a shortlink for the user.\n\nThis endpoint really only allows you to change the `restrict_to_org` setting of a shortlink. Thus it is only useful for folks who are part of an org. If you are not part of an org, you will not be able to change the `restrict_to_org` status.", + "operationId": "update_user_shortlink", + "parameters": [ + { + "in": "path", + "name": "key", + "description": "The key of the shortlink.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateShortlinkRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "tags": [ + "users", + "shortlinks" + ], + "summary": "Delete a shortlink for a user.", + "description": "This endpoint requires authentication by any Zoo user. It deletes a shortlink for the user.", + "operationId": "delete_user_shortlink", + "parameters": [ + { + "in": "path", + "name": "key", + "description": "The key of the shortlink.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_delete_user_shortlinks", + "parameters": [ + { + "in": "path", + "name": "key", + "description": "The key of the shortlink.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/text-to-cad": { + "get": { + "tags": [ + "ml" + ], + "summary": "List text-to-CAD models you've generated.", + "description": "This will always return the STEP file contents as well as the format the user originally requested.\n\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.", + "operationId": "list_text_to_cad_models_for_user", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + }, + { + "in": "query", + "name": "no_models", + "description": "If we should return the model file contents or just the metadata.", + "schema": { + "nullable": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCadResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/user/text-to-cad/{id}": { + "get": { + "tags": [ + "ml" + ], + "summary": "Get a text-to-CAD response.", + "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.", + "operationId": "get_text_to_cad_model_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The id of the model to give feedback to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCad" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } }, - "delete": { + "post": { "tags": [ - "users", - "shortlinks" + "ml" ], - "summary": "Delete a shortlink for a user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes a shortlink for the user.", - "operationId": "delete_user_shortlink", + "summary": "Give feedback to a specific ML response.", + "description": "This can be a text-to-CAD creation or iteration.\n\nThis endpoint requires authentication by any Zoo user. The user must be the owner of the ML response, in order to give feedback.", + "operationId": "create_text_to_cad_model_feedback", "parameters": [ { "in": "path", - "name": "key", - "description": "The key of the shortlink.", + "name": "id", + "description": "The id of the model to give feedback to.", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "in": "query", + "name": "feedback", + "description": "The feedback.", + "required": true, + "schema": { + "$ref": "#/components/schemas/MlFeedback" } } ], @@ -15185,15 +15865,16 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_delete_user_shortlinks", + "operationId": "options_text_to_cad_model_feedback", "parameters": [ { "in": "path", - "name": "key", - "description": "The key of the shortlink.", + "name": "id", + "description": "The id of the model to give feedback to.", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -15260,14 +15941,15 @@ } } }, - "/user/text-to-cad": { + "/users": { "get": { "tags": [ - "ml" + "users", + "hidden" ], - "summary": "List text-to-CAD models you've generated.", - "description": "This will always return the STEP file contents as well as the format the user originally requested.\n\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.", - "operationId": "list_text_to_cad_models_for_user", + "summary": "List users.", + "description": "This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", "parameters": [ { "in": "query", @@ -15295,15 +15977,6 @@ "schema": { "$ref": "#/components/schemas/CreatedAtSortMode" } - }, - { - "in": "query", - "name": "no_models", - "description": "If we should return the model file contents or just the metadata.", - "schema": { - "nullable": true, - "type": "boolean" - } } ], "responses": { @@ -15362,7 +16035,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TextToCadResultsPage" + "$ref": "#/components/schemas/UserResultsPage" } } } @@ -15379,23 +16052,41 @@ } } }, - "/user/text-to-cad/{id}": { + "/users-extended": { "get": { "tags": [ - "ml" + "users", + "hidden" ], - "summary": "Get a text-to-CAD response.", - "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.", - "operationId": "get_text_to_cad_model_for_user", + "summary": "List users with extended information.", + "description": "This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", "parameters": [ { - "in": "path", - "name": "id", - "description": "The id of the model to give feedback to.", - "required": true, + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/CreatedAtSortMode" } } ], @@ -15455,7 +16146,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TextToCad" + "$ref": "#/components/schemas/ExtendedUserResultsPage" } } } @@ -15466,39 +16157,35 @@ "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } - }, - "post": { + } + }, + "/users-extended/{id}": { + "get": { "tags": [ - "ml" + "users", + "hidden" ], - "summary": "Give feedback to a specific ML response.", - "description": "This can be a text-to-CAD creation or iteration.\n\nThis endpoint requires authentication by any Zoo user. The user must be the owner of the ML response, in order to give feedback.", - "operationId": "create_text_to_cad_model_feedback", + "summary": "Get extended information about a user.", + "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n\nTo get information about any Zoo user, you must be a Zoo employee.", + "operationId": "get_user_extended", "parameters": [ { "in": "path", "name": "id", - "description": "The id of the model to give feedback to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "in": "query", - "name": "feedback", - "description": "The feedback.", + "description": "The user's identifier (uuid or email).", "required": true, "schema": { - "$ref": "#/components/schemas/MlFeedback" + "$ref": "#/components/schemas/UserIdentifier" } } ], "responses": { - "204": { - "description": "resource updated", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -15548,6 +16235,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } } }, "4XX": { @@ -15557,29 +16251,31 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/users/{id}": { + "get": { "tags": [ + "users", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_text_to_cad_model_feedback", + "summary": "Get a user.", + "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\n\nTo get information about any Zoo user, you must be a Zoo employee.", + "operationId": "get_user", "parameters": [ { "in": "path", "name": "id", - "description": "The id of the model to give feedback to.", + "description": "The user's identifier (uuid or email).", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/UserIdentifier" } } ], "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -15629,6 +16325,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } } }, "4XX": { @@ -15640,16 +16343,25 @@ } } }, - "/users": { + "/users/{id}/api-calls": { "get": { "tags": [ - "users", + "api-calls", "hidden" ], - "summary": "List users.", - "description": "This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users", + "summary": "List API calls for a user.", + "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n\nIf the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.\n\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", "parameters": [ + { + "in": "path", + "name": "id", + "description": "The user's identifier (uuid or email).", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserIdentifier" + } + }, { "in": "query", "name": "limit", @@ -15734,7 +16446,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserResultsPage" + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" } } } @@ -15751,41 +16463,31 @@ } } }, - "/users-extended": { + "/users/{id}/payment/balance": { "get": { "tags": [ - "users", + "payments", "hidden" ], - "summary": "List users with extended information.", - "description": "This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users_extended", + "summary": "Get balance for an user.", + "description": "This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.", + "operationId": "get_payment_balance_for_any_user", "parameters": [ { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", + "in": "path", + "name": "id", + "description": "The user's identifier (uuid or email).", + "required": true, "schema": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/UserIdentifier" } }, { "in": "query", - "name": "sort_by", + "name": "include_total_due", + "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "boolean" } } ], @@ -15845,7 +16547,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" + "$ref": "#/components/schemas/CustomerBalance" } } } @@ -15856,21 +16558,16 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/users-extended/{id}": { - "get": { + }, + "put": { "tags": [ - "users", + "payments", "hidden" ], - "summary": "Get extended information about a user.", - "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n\nTo get information about any Zoo user, you must be a Zoo employee.", - "operationId": "get_user_extended", + "summary": "Update balance for an user.", + "description": "This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.", + "operationId": "update_payment_balance_for_any_user", "parameters": [ { "in": "path", @@ -15880,8 +16577,26 @@ "schema": { "$ref": "#/components/schemas/UserIdentifier" } + }, + { + "in": "query", + "name": "include_total_due", + "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", + "schema": { + "type": "boolean" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePaymentBalance" + } + } + }, + "required": true + }, "responses": { "200": { "description": "successful operation", @@ -15938,7 +16653,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUser" + "$ref": "#/components/schemas/CustomerBalance" } } } @@ -15950,17 +16665,14 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/users/{id}": { - "get": { + }, + "options": { "tags": [ - "users", "hidden" ], - "summary": "Get a user.", - "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\n\nTo get information about any Zoo user, you must be a Zoo employee.", - "operationId": "get_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_balance_for_any_user", "parameters": [ { "in": "path", @@ -15973,8 +16685,8 @@ } ], "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -16019,79 +16731,44 @@ "X-Api-Call-Id": { "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/users/{id}/api-calls": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "List API calls for a user.", - "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n\nIf the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.\n\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The user's identifier (uuid or email).", - "required": true, - "schema": { - "$ref": "#/components/schemas/UserIdentifier" - } - }, - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" + "required": true, + "schema": { + "type": "string" + } + } } }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } + } + } + }, + "/website/form": { + "put": { + "tags": [ + "users", + "hidden" ], + "summary": "Creates a new support/sales ticket from the website contact form. This endpoint is for untrusted", + "description": "users and is not authenticated.", + "operationId": "put_public_form", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InquiryForm" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -16141,13 +16818,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } } }, "4XX": { @@ -16156,43 +16826,18 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/users/{id}/payment/balance": { - "get": { + }, + "options": { "tags": [ - "payments", "hidden" ], - "summary": "Get balance for an user.", - "description": "This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.", - "operationId": "get_payment_balance_for_any_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The user's identifier (uuid or email).", - "required": true, - "schema": { - "$ref": "#/components/schemas/UserIdentifier" - } - }, - { - "in": "query", - "name": "include_total_due", - "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", - "schema": { - "type": "boolean" - } - } - ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_put_public_form", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -16242,13 +16887,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBalance" - } - } } }, "4XX": { @@ -16258,47 +16896,29 @@ "$ref": "#/components/responses/Error" } } - }, + } + }, + "/website/subscribe": { "put": { "tags": [ - "payments", + "users", "hidden" ], - "summary": "Update balance for an user.", - "description": "This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.", - "operationId": "update_payment_balance_for_any_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The user's identifier (uuid or email).", - "required": true, - "schema": { - "$ref": "#/components/schemas/UserIdentifier" - } - }, - { - "in": "query", - "name": "include_total_due", - "description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.", - "schema": { - "type": "boolean" - } - } - ], + "summary": "Subscribes a user to the newsletter.", + "operationId": "put_public_subscribe", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePaymentBalance" + "$ref": "#/components/schemas/Subscribe" } } }, "required": true }, "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -16348,13 +16968,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBalance" - } - } } }, "4XX": { @@ -16371,21 +16984,10 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_balance_for_any_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The user's identifier (uuid or email).", - "required": true, - "schema": { - "$ref": "#/components/schemas/UserIdentifier" - } - } - ], + "operationId": "options_put_public_subscribe", "responses": { "204": { - "description": "successful operation, no content", + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -19763,6 +20365,27 @@ } ] }, + "CrmData": { + "description": "The data for subscribing a user to the newsletter.", + "type": "object", + "properties": { + "cad_industry": { + "nullable": true, + "description": "The industry of the user.", + "type": "string" + }, + "cad_user_count": { + "nullable": true, + "description": "The user count of the user.", + "type": "string" + }, + "cad_user_type": { + "nullable": true, + "description": "The user type.", + "type": "string" + } + } + }, "Currency": { "description": "Currency is the list of supported currencies. Always lowercase.\n\nThis comes from the Stripe API docs: For more details see .", "type": "string" @@ -20763,7 +21386,7 @@ ] }, { - "description": "The preview environment. This is when PRs are created and a service is deployed for testing.", + "description": "The preview environment. This is deployed to api.dev.zoo.dev.", "type": "string", "enum": [ "PREVIEW" @@ -21094,6 +21717,11 @@ "type": "string", "format": "uri" }, + "is_onboarded": { + "description": "If the user has finished onboarding.", + "default": false, + "type": "boolean" + }, "is_service_account": { "description": "If the user is tied to a service account.", "default": false, @@ -22707,6 +23335,120 @@ } ] }, + "InquiryForm": { + "description": "The form for a public inquiry submission.", + "type": "object", + "properties": { + "company": { + "nullable": true, + "description": "The company name.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string", + "format": "email" + }, + "first_name": { + "description": "The first name of the user.", + "type": "string" + }, + "industry": { + "nullable": true, + "description": "The industry of the user.", + "type": "string" + }, + "inquiry_type": { + "description": "The type of inquiry.", + "allOf": [ + { + "$ref": "#/components/schemas/InquiryType" + } + ] + }, + "last_name": { + "description": "The last name of the user.", + "type": "string" + }, + "message": { + "description": "The message content.", + "type": "string" + }, + "phone": { + "nullable": true, + "description": "The phone number of the user.", + "type": "string" + } + }, + "required": [ + "email", + "first_name", + "inquiry_type", + "last_name", + "message" + ] + }, + "InquiryType": { + "description": "The type of inquiry.", + "oneOf": [ + { + "description": "General inquiry about the service or product.", + "type": "string", + "enum": [ + "general_inquiry" + ] + }, + { + "description": "Questions related to sales or purchasing.", + "type": "string", + "enum": [ + "sales_question" + ] + }, + { + "description": "Inquiry from a developer, typically technical in nature.", + "type": "string", + "enum": [ + "developer_inquiry" + ] + }, + { + "description": "Opportunity for partnership or collaboration.", + "type": "string", + "enum": [ + "partnership_opportunity" + ] + }, + { + "description": "Other inquiries related to sales that do not fit predefined categories.", + "type": "string", + "enum": [ + "other_sales_inquiry" + ] + }, + { + "description": "Request for technical support or troubleshooting.", + "type": "string", + "enum": [ + "technical_support" + ] + }, + { + "description": "Questions or requests related to account management.", + "type": "string", + "enum": [ + "account_management" + ] + }, + { + "description": "Other support-related inquiries that do not fit predefined categories.", + "type": "string", + "enum": [ + "other_support_inquiry" + ] + } + ] + }, "Invoice": { "description": "An invoice.", "type": "object", @@ -33355,6 +34097,20 @@ "percent_off" ] }, + "Subscribe": { + "description": "The data for subscribing a user to the newsletter.", + "type": "object", + "properties": { + "email": { + "description": "The email", + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, "SubscriptionTierFeature": { "description": "A subscription tier feature.", "type": "object", @@ -36187,6 +36943,11 @@ "type": "string", "format": "uri" }, + "is_onboarded": { + "nullable": true, + "description": "If the user is now onboarded.", + "type": "boolean" + }, "last_name": { "description": "The user's last name.", "type": "string" @@ -36232,7 +36993,7 @@ "format": "date-time" }, "deletion_scheduled": { - "description": "If the user is scheduled for deletion", + "description": "If the user is scheduled for deletion.", "default": false, "type": "boolean" }, @@ -36274,6 +37035,11 @@ "type": "string", "format": "uri" }, + "is_onboarded": { + "description": "If the user has finished onboarding.", + "default": false, + "type": "boolean" + }, "is_service_account": { "description": "If the user is tied to a service account.", "default": false,