diff --git a/generate/generate.py b/generate/generate.py index add07ce63..0a90ca01d 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -626,7 +626,7 @@ def generateTypes(cwd: str, parser: dict): for key in schemas: schema = schemas[key] print("generating schema: ", key) - generateType(path, key, schema) + generateType(path, key, schema, data) if 'oneOf' not in schema: f.write("from ." + camel_to_snake(key) + " import " + key + "\n") @@ -634,7 +634,7 @@ def generateTypes(cwd: str, parser: dict): f.close() -def generateType(path: str, name: str, schema: dict): +def generateType(path: str, name: str, schema: dict, data: dict): file_path = path if path.endswith(".py") is False: # Generate the type. @@ -644,7 +644,7 @@ def generateType(path: str, name: str, schema: dict): if 'type' in schema: type_name = schema['type'] if type_name == 'object': - generateObjectType(file_path, name, schema, type_name) + generateObjectType(file_path, name, schema, type_name, data) elif type_name == 'string' and 'enum' in schema: generateEnumType(file_path, name, schema, type_name) elif type_name == 'integer': @@ -660,19 +660,19 @@ def generateType(path: str, name: str, schema: dict): # Skip it since we will already have generated it. return elif 'oneOf' in schema: - generateOneOfType(file_path, name, schema) + generateOneOfType(file_path, name, schema, data) else: print(" schema: ", [schema]) print(" unsupported type: ", name) raise Exception(" unsupported type: ", name) -def generateOneOfType(path: str, name: str, schema: dict): +def generateOneOfType(path: str, name: str, schema: dict, data): for t in schema['oneOf']: # Get the name for the reference. if '$ref' in t: name = t['$ref'].replace('#/components/schemas/', '') - generateType(path, name, t) + generateType(path, name, t, data) else: print(" schema: ", [t]) print(" oneOf must be a ref: ", name) @@ -747,7 +747,12 @@ def generateEnumType(path: str, name: str, schema: dict, type_name: str): f.close() -def generateObjectType(path: str, name: str, schema: dict, type_name: str): +def generateObjectType( + path: str, + name: str, + schema: dict, + type_name: str, + data: dict): print("generating type: ", name, " at: ", path) print(" schema: ", [schema]) f = open(path, "w") @@ -783,104 +788,7 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str): # Iterate over the properties. for property_name in schema['properties']: property_schema = schema['properties'][property_name] - if 'type' in property_schema: - property_type = property_schema['type'] - - # Write the property. - if property_type == 'string': - if 'format' in property_schema: - if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': - f.write( - "\t" + - property_name + - ": Union[Unset, datetime.datetime] = UNSET\n") - continue - - f.write( - "\t" + - property_name + - ": Union[Unset, str] = UNSET\n") - elif property_type == 'object': - if 'additionalProperties' in property_schema: - return generateType( - path, property_name, property_schema['additionalProperties']) - else: - print(" property type: ", property_type) - print(" property schema: ", property_schema) - raise Exception(" unknown type: ", property_type) - elif property_type == 'integer': - f.write( - "\t" + - property_name + - ": Union[Unset, int] = UNSET\n") - elif property_type == 'number': - f.write( - "\t" + - property_name + - ": Union[Unset, float] = UNSET\n") - elif property_type == 'boolean': - f.write( - "\t" + - property_name + - ": Union[Unset, bool] = False\n") - elif property_type == 'array': - if 'items' in property_schema: - if '$ref' in property_schema['items']: - property_type = property_schema['items']['$ref'] - property_type = property_type.replace( - '#/components/schemas/', '') - f.write( - "\tfrom ..models." + - camel_to_snake(property_type) + - " import " + - property_type + - "\n") - elif 'type' in property_schema['items']: - if property_schema['items']['type'] == 'string': - property_type = 'str' - else: - print(" property: ", property_schema) - raise Exception("Unknown property type") - else: - print(" array: ", [property_schema]) - print(" array: ", [property_schema['items']]) - raise Exception("Unknown array type") - - f.write( - "\t" + - property_name + - ": Union[Unset, List[" + - property_type + - "]] = UNSET\n") - else: - raise Exception("Unknown array type") - else: - print(" property type: ", property_type) - raise Exception(" unknown type: ", property_type) - elif '$ref' in property_schema: - ref = property_schema['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t" + - property_name + - ": Union[Unset, " + - ref + - "] = UNSET\n") - elif 'allOf' in property_schema: - thing = property_schema['allOf'][0] - if '$ref' in thing: - ref = thing['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t" + - property_name + - ": Union[Unset, " + - ref + - "] = UNSET\n") - else: - raise Exception(" unknown allOf type: ", property_schema) - else: - raise Exception(" unknown schema: ", property_schema) + renderTypeInit(f, path, property_name, property_schema, data) # Finish writing the class. f.write("\n") @@ -893,135 +801,7 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str): # Iternate over the properties. for property_name in schema['properties']: property_schema = schema['properties'][property_name] - if 'type' in property_schema: - property_type = property_schema['type'] - - # Write the property. - if property_type == 'string': - if 'format' in property_schema: - if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': - f.write( - "\t\t" + - property_name + - ": Union[Unset, str] = UNSET\n") - f.write( - "\t\tif not isinstance(self." + property_name + ", Unset):\n") - f.write( - "\t\t\t" + - property_name + - " = self." + - property_name + - ".isoformat()\n") - continue - - f.write( - "\t\t" + - property_name + - " = self." + - property_name + - "\n") - elif property_type == 'integer': - f.write( - "\t\t" + - property_name + - " = self." + - property_name + - "\n") - elif property_type == 'number': - f.write( - "\t\t" + - property_name + - " = self." + - property_name + - "\n") - elif property_type == 'boolean': - f.write( - "\t\t" + - property_name + - " = self." + - property_name + - "\n") - elif property_type == 'array': - if 'items' in property_schema: - if '$ref' in property_schema['items']: - property_type = property_schema['items']['$ref'] - property_type = property_type.replace( - '#/components/schemas/', '') - f.write( - "\t\tfrom ..models." + - camel_to_snake(property_type) + - " import " + - property_type + - "\n") - elif 'type' in property_schema['items']: - if property_schema['items']['type'] == 'string': - property_type = 'str' - else: - print(" property: ", property_schema) - raise Exception("Unknown property type") - else: - print(" array: ", [property_schema]) - print(" array: ", [property_schema['items']]) - raise Exception("Unknown array type") - - f.write( - "\t\t" + - property_name + - ": Union[Unset, List[" + - property_type + - "]] = UNSET\n") - f.write( - "\t\tif not isinstance(self." + - property_name + - ", Unset):\n") - f.write( - "\t\t\t" + - property_name + - " = self." + - property_name + - "\n") - else: - raise Exception(" unknown type: ", property_type) - elif '$ref' in property_schema: - ref = property_schema['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t\t" + - property_name + - ": Union[Unset, str] = UNSET\n") - f.write( - "\t\tif not isinstance(self." + - property_name + - ", Unset):\n") - f.write( - "\t\t\t" + - property_name + - " = self." + - property_name + - ".value\n") - elif 'allOf' in property_schema: - thing = property_schema['allOf'][0] - if '$ref' in thing: - ref = thing['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t\t" + - property_name + - ": Union[Unset, str] = UNSET\n") - f.write( - "\t\tif not isinstance(self." + - property_name + - ", Unset):\n") - f.write( - "\t\t\t" + - property_name + - " = self." + - property_name + - ".value\n") - else: - raise Exception(" unknown allOf type: ", property_schema) - else: - raise Exception(" unknown schema: ", property_schema) + renderTypeToDict(f, property_name, property_schema, data) # Finish writing the to_dict method. f.write("\n") @@ -1053,144 +833,7 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str): # Iternate over the properties. for property_name in schema['properties']: property_schema = schema['properties'][property_name] - if 'type' in property_schema: - property_type = property_schema['type'] - - # Write the property. - if property_type == 'string': - if 'format' in property_schema: - if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': - f.write( - "\t\t_" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write( - "\t\t" + - property_name + - ": Union[Unset, datetime.datetime]\n") - f.write( - "\t\tif isinstance(_" + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") - f.write("\t\telse:\n") - f.write("\t\t\t" + property_name + - " = isoparse(_" + property_name + ")\n") - f.write("\n") - continue - - f.write( - "\t\t" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\n") - elif property_type == 'integer': - f.write( - "\t\t" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\n") - elif property_type == 'number': - f.write( - "\t\t" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\n") - elif property_type == 'boolean': - f.write( - "\t\t" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\n") - elif property_type == 'array': - if 'items' in property_schema: - if '$ref' in property_schema['items']: - property_type = property_schema['items']['$ref'] - property_type = property_type.replace( - '#/components/schemas/', '') - f.write( - "\t\tfrom ..models." + - camel_to_snake(property_type) + - " import " + - property_type + - "\n") - elif 'type' in property_schema['items']: - if property_schema['items']['type'] == 'string': - property_type = 'str' - else: - raise Exception( - " unknown array type: ", - property_schema['items']['type']) - else: - print(" array: ", [property_schema]) - print(" array: ", [property_schema['items']]) - raise Exception("Unknown array type") - - f.write( - "\t\t" + - property_name + - " = cast(List[" + property_type + "], d.pop(\"" + - property_name + - "\", UNSET))\n") - f.write("\n") - else: - print(" unknown type: ", property_type) - raise Exception(" unknown type: ", property_type) - elif '$ref' in property_schema: - ref = property_schema['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t\t_" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\t\t" + property_name + - ": Union[Unset, " + ref + "]\n") - f.write( - "\t\tif isinstance(_" + - property_name + - ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") - f.write("\t\telse:\n") - f.write("\t\t\t" + property_name + " = " + - ref + "(_" + property_name + ")\n") - f.write("\n") - elif 'allOf' in property_schema: - thing = property_schema['allOf'][0] - if '$ref' in thing: - ref = thing['$ref'].replace( - '#/components/schemas/', '') - f.write( - "\t\t_" + - property_name + - " = d.pop(\"" + - property_name + - "\", UNSET)\n") - f.write("\t\t" + property_name + - ": Union[Unset, " + ref + "]\n") - f.write( - "\t\tif isinstance(_" + - property_name + - ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") - f.write("\t\telse:\n") - f.write("\t\t\t" + property_name + " = " + - ref + "(_" + property_name + ")\n") - f.write("\n") - else: - raise Exception(" unknown allOf type: ", property_schema) - else: - print(" unknown schema: ", property_schema) - raise Exception(" unknown schema: ", property_schema) + renderTypeFromDict(f, property_name, property_schema, data) # Finish writing the from_dict method. f.write("\n") @@ -1232,6 +875,429 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str): f.close() +def renderTypeToDict( + f, + property_name: str, + property_schema: dict, + data: dict): + if 'type' in property_schema: + property_type = property_schema['type'] + + # Write the property. + if property_type == 'string': + if 'format' in property_schema: + if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': + f.write( + "\t\t" + + property_name + + ": Union[Unset, str] = UNSET\n") + f.write( + "\t\tif not isinstance(self." + + property_name + + ", Unset):\n") + f.write( + "\t\t\t" + + property_name + + " = self." + + property_name + + ".isoformat()\n") + # return early + return + + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + elif property_type == 'integer': + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + elif property_type == 'number': + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + elif property_type == 'boolean': + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + elif property_type == 'array': + if 'items' in property_schema: + if '$ref' in property_schema['items']: + property_type = property_schema['items']['$ref'] + property_type = property_type.replace( + '#/components/schemas/', '') + f.write( + "\t\tfrom ..models." + + camel_to_snake(property_type) + + " import " + + property_type + + "\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") + else: + print(" array: ", [property_schema]) + print(" array: ", [property_schema['items']]) + raise Exception("Unknown array type") + + f.write( + "\t\t" + + property_name + + ": Union[Unset, List[" + + property_type + + "]] = UNSET\n") + f.write( + "\t\tif not isinstance(self." + + property_name + + ", Unset):\n") + f.write( + "\t\t\t" + + property_name + + " = self." + + property_name + + "\n") + else: + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + elif '$ref' in property_schema: + ref = property_schema['$ref'].replace( + '#/components/schemas/', '') + f.write( + "\t\t" + + property_name + + ": Union[Unset, str] = UNSET\n") + f.write( + "\t\tif not isinstance(self." + + property_name + + ", Unset):\n") + f.write( + "\t\t\t" + + property_name + + " = self." + + property_name + + ".value\n") + elif 'allOf' in property_schema: + thing = property_schema['allOf'][0] + if '$ref' in thing: + ref = thing['$ref'].replace( + '#/components/schemas/', '') + if ref == "Uuid": + return renderTypeToDict( + f, property_name, data['components']['schemas'][ref], data) + f.write( + "\t\t" + + property_name + + ": Union[Unset, str] = UNSET\n") + f.write( + "\t\tif not isinstance(self." + + property_name + + ", Unset):\n") + f.write( + "\t\t\t" + + property_name + + " = self." + + property_name + + ".value\n") + else: + raise Exception(" unknown allOf type: ", property_schema) + else: + f.write( + "\t\t" + + property_name + + " = self." + + property_name + + "\n") + + +def renderTypeInit( + f, + path: str, + property_name: str, + property_schema: dict, + data: dict): + if 'type' in property_schema: + property_type = property_schema['type'] + + # Write the property. + if property_type == 'string': + if 'format' in property_schema: + if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': + f.write( + "\t" + + property_name + + ": Union[Unset, datetime.datetime] = UNSET\n") + # Return early. + return + + f.write( + "\t" + + property_name + + ": Union[Unset, str] = UNSET\n") + elif property_type == 'object': + f.write( + "\t" + + property_name + + ": Union[Unset, Any] = UNSET\n") + elif property_type == 'integer': + f.write( + "\t" + + property_name + + ": Union[Unset, int] = UNSET\n") + elif property_type == 'number': + f.write( + "\t" + + property_name + + ": Union[Unset, float] = UNSET\n") + elif property_type == 'boolean': + f.write( + "\t" + + property_name + + ": Union[Unset, bool] = False\n") + elif property_type == 'array': + if 'items' in property_schema: + if '$ref' in property_schema['items']: + property_type = property_schema['items']['$ref'] + property_type = property_type.replace( + '#/components/schemas/', '') + f.write( + "\tfrom ..models." + + camel_to_snake(property_type) + + " import " + + property_type + + "\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") + else: + print(" array: ", [property_schema]) + print(" array: ", [property_schema['items']]) + raise Exception("Unknown array type") + + f.write( + "\t" + + property_name + + ": Union[Unset, List[" + + property_type + + "]] = UNSET\n") + else: + raise Exception("Unknown array type") + else: + print(" property type: ", property_type) + raise Exception(" unknown type: ", property_type) + elif '$ref' in property_schema: + ref = property_schema['$ref'].replace( + '#/components/schemas/', '') + f.write( + "\t" + + property_name + + ": Union[Unset, " + + ref + + "] = UNSET\n") + elif 'allOf' in property_schema: + thing = property_schema['allOf'][0] + if '$ref' in thing: + ref = thing['$ref'].replace( + '#/components/schemas/', '') + if ref == "Uuid": + return renderTypeInit( + f, + path, + property_name, + data['components']['schemas'][ref], + data) + f.write( + "\t" + + property_name + + ": Union[Unset, " + + ref + + "] = UNSET\n") + else: + raise Exception(" unknown allOf type: ", property_schema) + else: + f.write( + "\t" + + property_name + + ": Union[Unset, Any] = UNSET\n") + + +def renderTypeFromDict( + f, + property_name: str, + property_schema: dict, + data: dict): + if 'type' in property_schema: + property_type = property_schema['type'] + + # Write the property. + if property_type == 'string': + if 'format' in property_schema: + if property_schema['format'] == 'date-time' or property_schema['format'] == 'partial-date-time': + f.write( + "\t\t_" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write( + "\t\t" + + property_name + + ": Union[Unset, datetime.datetime]\n") + f.write( + "\t\tif isinstance(_" + property_name + ", Unset):\n") + f.write("\t\t\t" + property_name + " = UNSET\n") + f.write("\t\telse:\n") + f.write("\t\t\t" + property_name + + " = isoparse(_" + property_name + ")\n") + f.write("\n") + # Return early. + return + + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\n") + elif property_type == 'integer': + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\n") + elif property_type == 'number': + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\n") + elif property_type == 'boolean': + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\n") + elif property_type == 'array': + if 'items' in property_schema: + if '$ref' in property_schema['items']: + property_type = property_schema['items']['$ref'] + property_type = property_type.replace( + '#/components/schemas/', '') + f.write( + "\t\tfrom ..models." + + camel_to_snake(property_type) + + " import " + + property_type + + "\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + raise Exception( + " unknown array type: ", + property_schema['items']['type']) + else: + print(" array: ", [property_schema]) + print(" array: ", [property_schema['items']]) + raise Exception("Unknown array type") + + f.write( + "\t\t" + + property_name + + " = cast(List[" + property_type + "], d.pop(\"" + + property_name + + "\", UNSET))\n") + f.write("\n") + else: + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + elif '$ref' in property_schema: + ref = property_schema['$ref'].replace( + '#/components/schemas/', '') + f.write( + "\t\t_" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\t\t" + property_name + + ": Union[Unset, " + ref + "]\n") + f.write( + "\t\tif isinstance(_" + + property_name + + ", Unset):\n") + f.write("\t\t\t" + property_name + " = UNSET\n") + f.write("\t\telse:\n") + f.write("\t\t\t" + property_name + " = " + + ref + "(_" + property_name + ")\n") + f.write("\n") + elif 'allOf' in property_schema: + thing = property_schema['allOf'][0] + if '$ref' in thing: + ref = thing['$ref'].replace( + '#/components/schemas/', '') + if ref == "Uuid": + return renderTypeFromDict( + f, property_name, data['components']['schemas'][ref], data) + f.write( + "\t\t_" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + f.write("\t\t" + property_name + + ": Union[Unset, " + ref + "]\n") + f.write( + "\t\tif isinstance(_" + + property_name + + ", Unset):\n") + f.write("\t\t\t" + property_name + " = UNSET\n") + f.write("\t\telse:\n") + f.write("\t\t\t" + property_name + " = " + + ref + "(_" + property_name + ")\n") + f.write("\n") + else: + raise Exception(" unknown allOf type: ", property_schema) + else: + f.write( + "\t\t" + + property_name + + " = d.pop(\"" + + property_name + + "\", UNSET)\n") + + def hasDateTime(schema: dict) -> bool: # Generate the type. if 'type' in schema: @@ -1262,9 +1328,6 @@ def getRefs(schema: dict) -> [str]: if 'allOf' in schema: for sub_schema in schema['allOf']: refs.extend(getRefs(sub_schema)) - else: - print(" unsupported type: ", schema) - raise Exception(" unsupported type: ", schema) else: type_name = schema['type'] if type_name == 'object': diff --git a/kittycad/api/api-calls/get_async_operation.py b/kittycad/api/api-calls/get_async_operation.py index 93283caeb..3706aa408 100644 --- a/kittycad/api/api-calls/get_async_operation.py +++ b/kittycad/api/api-calls/get_async_operation.py @@ -5,6 +5,7 @@ import httpx from ...client import Client from ...models.file_conversion import FileConversion from ...models.file_mass import FileMass +from ...models.file_density import FileDensity from ...models.file_volume import FileVolume from ...models.error import Error from ...types import Response @@ -27,7 +28,7 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: if response.status_code == 200: data = response.json() try: @@ -44,6 +45,13 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return option except: pass + try: + if not isinstance(data, dict): + raise TypeError() + option = FileDensity.from_dict(data) + return option + except: + pass try: if not isinstance(data, dict): raise TypeError() @@ -60,7 +68,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return None -def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: return Response( status_code=response.status_code, content=response.content, @@ -73,7 +81,7 @@ def sync_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -91,7 +99,7 @@ def sync( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async operation. This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. If the user is not authenticated to view the specified async operation, then it is not returned. @@ -107,7 +115,7 @@ async def asyncio_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -123,7 +131,7 @@ async def asyncio( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async operation. This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. If the user is not authenticated to view the specified async operation, then it is not returned. diff --git a/kittycad/api/api-calls/list_async_operations.py b/kittycad/api/api-calls/list_async_operations.py new file mode 100644 index 000000000..445c45fd2 --- /dev/null +++ b/kittycad/api/api-calls/list_async_operations.py @@ -0,0 +1,140 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.async_api_call_results_page import AsyncApiCallResultsPage +from ...models.error import Error +from ...models.created_at_sort_mode import CreatedAtSortMode +from ...models.api_call_status import APICallStatus +from ...types import Response + +def _get_kwargs( + limit: int, + page_token: str, + sort_by: CreatedAtSortMode, + status: APICallStatus, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/async/operations?limit={limit}&page_token={page_token}&sort_by={sort_by}&status={status}".format(client.base_url, limit=limit, page_token=page_token, sort_by=sort_by, status=status) + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]: + if response.status_code == 200: + response_200 = AsyncApiCallResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return None + + +def _build_response(*, response: httpx.Response) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + limit: int, + page_token: str, + sort_by: CreatedAtSortMode, + status: APICallStatus, + *, + client: Client, +) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]: + kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + limit: int, + page_token: str, + sort_by: CreatedAtSortMode, + status: APICallStatus, + *, + client: Client, +) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]: + """ For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. +This endpoint requires authentication by a KittyCAD employee. """ + + return sync_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, + ).parsed + + +async def asyncio_detailed( + limit: int, + page_token: str, + sort_by: CreatedAtSortMode, + status: APICallStatus, + *, + client: Client, +) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]: + kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + limit: int, + page_token: str, + sort_by: CreatedAtSortMode, + status: APICallStatus, + *, + client: Client, +) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]: + """ For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. +This endpoint requires authentication by a KittyCAD employee. """ + + return ( + await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, + ) + ).parsed diff --git a/kittycad/api/file/create_file_conversion.py b/kittycad/api/file/create_file_conversion.py index 20c0a89c5..076669f23 100644 --- a/kittycad/api/file/create_file_conversion.py +++ b/kittycad/api/file/create_file_conversion.py @@ -81,7 +81,7 @@ def sync( *, client: Client, ) -> Optional[Union[Any, FileConversion, Error]]: - """ Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously. + """ Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ @@ -120,7 +120,7 @@ async def asyncio( *, client: Client, ) -> Optional[Union[Any, FileConversion, Error]]: - """ Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously. + """ Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py new file mode 100644 index 000000000..4ed9967ff --- /dev/null +++ b/kittycad/api/file/create_file_density.py @@ -0,0 +1,131 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.file_density import FileDensity +from ...models.error import Error +from ...models.file_source_format import FileSourceFormat +from ...types import Response + +def _get_kwargs( + material_mass: float, + src_format: FileSourceFormat, + body: bytes, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/file/density?material_mass={material_mass}&src_format={src_format}".format(client.base_url, material_mass=material_mass, src_format=src_format) + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "content": body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileDensity, Error]]: + if response.status_code == 201: + response_201 = FileDensity.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return None + + +def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileDensity, Error]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + material_mass: float, + src_format: FileSourceFormat, + body: bytes, + *, + client: Client, +) -> Response[Union[Any, FileDensity, Error]]: + kwargs = _get_kwargs( + material_mass=material_mass, + src_format=src_format, + body=body, + client=client, + ) + + response = httpx.post( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + material_mass: float, + src_format: FileSourceFormat, + body: bytes, + *, + client: Client, +) -> Optional[Union[Any, FileDensity, Error]]: + """ Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ + + return sync_detailed( + material_mass=material_mass, + src_format=src_format, + body=body, + client=client, + ).parsed + + +async def asyncio_detailed( + material_mass: float, + src_format: FileSourceFormat, + body: bytes, + *, + client: Client, +) -> Response[Union[Any, FileDensity, Error]]: + kwargs = _get_kwargs( + material_mass=material_mass, + src_format=src_format, + body=body, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.post(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + material_mass: float, + src_format: FileSourceFormat, + body: bytes, + *, + client: Client, +) -> Optional[Union[Any, FileDensity, Error]]: + """ Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ + + return ( + await asyncio_detailed( + material_mass=material_mass, + src_format=src_format, + body=body, + client=client, + ) + ).parsed diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index 8565160f3..a3ac9f76a 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -80,7 +80,7 @@ def sync( *, client: Client, ) -> Optional[Union[Any, FileMass, Error]]: - """ Get the mass of an object in a CAD file. If the file is larger than 30MB, it will be performed asynchronously. + """ Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ return sync_detailed( @@ -118,7 +118,7 @@ async def asyncio( *, client: Client, ) -> Optional[Union[Any, FileMass, Error]]: - """ Get the mass of an object in a CAD file. If the file is larger than 30MB, it will be performed asynchronously. + """ Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ return ( diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index 9b70d7a16..3f390ba14 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -76,7 +76,7 @@ def sync( *, client: Client, ) -> Optional[Union[Any, FileVolume, Error]]: - """ Get the volume of an object in a CAD file. If the file is larger than 30MB, it will be performed asynchronously. + """ Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ return sync_detailed( @@ -110,7 +110,7 @@ async def asyncio( *, client: Client, ) -> Optional[Union[Any, FileVolume, Error]]: - """ Get the volume of an object in a CAD file. If the file is larger than 30MB, it will be performed asynchronously. + """ Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """ return ( diff --git a/kittycad/api/file/get_file_conversion.py b/kittycad/api/file/get_file_conversion.py index 47cf09e6f..1523d6d9b 100644 --- a/kittycad/api/file/get_file_conversion.py +++ b/kittycad/api/file/get_file_conversion.py @@ -5,6 +5,7 @@ import httpx from ...client import Client from ...models.file_conversion import FileConversion from ...models.file_mass import FileMass +from ...models.file_density import FileDensity from ...models.file_volume import FileVolume from ...models.error import Error from ...types import Response @@ -27,7 +28,7 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: if response.status_code == 200: data = response.json() try: @@ -44,6 +45,13 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return option except: pass + try: + if not isinstance(data, dict): + raise TypeError() + option = FileDensity.from_dict(data) + return option + except: + pass try: if not isinstance(data, dict): raise TypeError() @@ -60,7 +68,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return None -def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: return Response( status_code=response.status_code, content=response.content, @@ -73,7 +81,7 @@ def sync_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -91,7 +99,7 @@ def sync( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async file conversion. This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. If the user is not authenticated to view the specified file conversion, then it is not returned. @@ -107,7 +115,7 @@ async def asyncio_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -123,7 +131,7 @@ async def asyncio( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async file conversion. This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. If the user is not authenticated to view the specified file conversion, then it is not returned. diff --git a/kittycad/api/file/get_file_conversion_for_user.py b/kittycad/api/file/get_file_conversion_for_user.py index e39b7951a..09117053f 100644 --- a/kittycad/api/file/get_file_conversion_for_user.py +++ b/kittycad/api/file/get_file_conversion_for_user.py @@ -5,6 +5,7 @@ import httpx from ...client import Client from ...models.file_conversion import FileConversion from ...models.file_mass import FileMass +from ...models.file_density import FileDensity from ...models.file_volume import FileVolume from ...models.error import Error from ...types import Response @@ -27,7 +28,7 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: if response.status_code == 200: data = response.json() try: @@ -44,6 +45,13 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return option except: pass + try: + if not isinstance(data, dict): + raise TypeError() + option = FileDensity.from_dict(data) + return option + except: + pass try: if not isinstance(data, dict): raise TypeError() @@ -60,7 +68,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv return None -def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: return Response( status_code=response.status_code, content=response.content, @@ -73,7 +81,7 @@ def sync_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -91,7 +99,7 @@ def sync( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string. This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """ @@ -105,7 +113,7 @@ async def asyncio_detailed( id: str, *, client: Client, -) -> Response[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Response[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: kwargs = _get_kwargs( id=id, client=client, @@ -121,7 +129,7 @@ async def asyncio( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, FileMass, FileVolume, Error]]: +) -> Optional[Union[Any, FileConversion, FileMass, FileDensity, FileVolume, Error]]: """ Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string. This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """ diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index de95b33cc..1116478c8 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -8,6 +8,9 @@ from .api_call_with_price import ApiCallWithPrice from .api_call_with_price_results_page import ApiCallWithPriceResultsPage from .api_token import ApiToken from .api_token_results_page import ApiTokenResultsPage +from .async_api_call_type import AsyncAPICallType +from .async_api_call import AsyncApiCall +from .async_api_call_results_page import AsyncApiCallResultsPage from .billing_info import BillingInfo from .cache_metadata import CacheMetadata from .card_details import CardDetails @@ -25,6 +28,7 @@ from .error import Error from .extended_user import ExtendedUser from .extended_user_results_page import ExtendedUserResultsPage from .file_conversion import FileConversion +from .file_density import FileDensity from .file_mass import FileMass from .file_output_format import FileOutputFormat from .file_source_format import FileSourceFormat @@ -43,6 +47,7 @@ from .login_params import LoginParams from .meta_cluster_info import MetaClusterInfo from .metadata import Metadata from .method import Method +from .output_file import OutputFile from .payment_intent import PaymentIntent from .payment_method import PaymentMethod from .payment_method_card_checks import PaymentMethodCardChecks diff --git a/kittycad/models/address.py b/kittycad/models/address.py index 4b59a753e..f2f20c456 100644 --- a/kittycad/models/address.py +++ b/kittycad/models/address.py @@ -16,7 +16,7 @@ class Address: city: Union[Unset, str] = UNSET country: Union[Unset, str] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, Uuid] = UNSET + id: Union[Unset, str] = UNSET state: Union[Unset, str] = UNSET street1: Union[Unset, str] = UNSET street2: Union[Unset, str] = UNSET @@ -32,9 +32,7 @@ class Address: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - id: Union[Unset, str] = UNSET - if not isinstance(self.id, Unset): - id = self.id.value + id = self.id state = self.state street1 = self.street1 street2 = self.street2 @@ -84,12 +82,7 @@ class Address: else: created_at = isoparse(_created_at) - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = Uuid(_id) + id = d.pop("id", UNSET) state = d.pop("state", UNSET) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index e5528422b..28c1575ee 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -20,7 +20,7 @@ class ApiCallWithPrice: duration: Union[Unset, int] = UNSET email: Union[Unset, str] = UNSET endpoint: Union[Unset, str] = UNSET - id: Union[Unset, Uuid] = UNSET + id: Union[Unset, str] = UNSET ip_address: Union[Unset, str] = UNSET method: Union[Unset, Method] = UNSET minutes: Union[Unset, int] = UNSET @@ -32,7 +32,7 @@ class ApiCallWithPrice: started_at: Union[Unset, datetime.datetime] = UNSET status_code: Union[Unset, StatusCode] = UNSET stripe_invoice_item_id: Union[Unset, str] = UNSET - token: Union[Unset, Uuid] = UNSET + token: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_agent: Union[Unset, str] = UNSET user_id: Union[Unset, str] = UNSET @@ -49,9 +49,7 @@ class ApiCallWithPrice: duration = self.duration email = self.email endpoint = self.endpoint - id: Union[Unset, str] = UNSET - if not isinstance(self.id, Unset): - id = self.id.value + id = self.id ip_address = self.ip_address method: Union[Unset, str] = UNSET if not isinstance(self.method, Unset): @@ -69,9 +67,7 @@ class ApiCallWithPrice: if not isinstance(self.status_code, Unset): status_code = self.status_code.value stripe_invoice_item_id = self.stripe_invoice_item_id - token: Union[Unset, str] = UNSET - if not isinstance(self.token, Unset): - token = self.token.value + token = self.token updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -149,12 +145,7 @@ class ApiCallWithPrice: endpoint = d.pop("endpoint", UNSET) - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = Uuid(_id) + id = d.pop("id", UNSET) ip_address = d.pop("ip_address", UNSET) @@ -193,12 +184,7 @@ class ApiCallWithPrice: stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = Uuid(_token) + token = d.pop("token", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index ef690484f..544822e28 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -16,7 +16,7 @@ class ApiToken: created_at: Union[Unset, datetime.datetime] = UNSET id: Union[Unset, str] = UNSET is_valid: Union[Unset, bool] = False - token: Union[Unset, Uuid] = UNSET + token: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -28,9 +28,7 @@ class ApiToken: created_at = self.created_at.isoformat() id = self.id is_valid = self.is_valid - token: Union[Unset, str] = UNSET - if not isinstance(self.token, Unset): - token = self.token.value + token = self.token updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -68,12 +66,7 @@ class ApiToken: is_valid = d.pop("is_valid", UNSET) - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = Uuid(_token) + token = d.pop("token", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py new file mode 100644 index 000000000..345105bef --- /dev/null +++ b/kittycad/models/async_api_call.py @@ -0,0 +1,176 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.uuid import Uuid +from ..models.api_call_status import APICallStatus +from ..models.async_api_call_type import AsyncAPICallType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AsyncApiCall") + + +@attr.s(auto_attribs=True) +class AsyncApiCall: + """ """ + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, Any] = UNSET + output: Union[Unset, Any] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, APICallStatus] = UNSET + type: Union[Unset, AsyncAPICallType] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + worker: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + output = self.output + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + worker = self.worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict['completed_at'] = completed_at + if created_at is not UNSET: + field_dict['created_at'] = created_at + if error is not UNSET: + field_dict['error'] = error + if id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if output is not UNSET: + field_dict['output'] = output + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if type is not UNSET: + field_dict['type'] = type + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id + if worker is not UNSET: + field_dict['worker'] = worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + id = d.pop("id", UNSET) + + input = d.pop("input", UNSET) + output = d.pop("output", UNSET) + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, APICallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = APICallStatus(_status) + + _type = d.pop("type", UNSET) + type: Union[Unset, AsyncAPICallType] + if isinstance(_type, Unset): + type = UNSET + else: + type = AsyncAPICallType(_type) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + user_id = d.pop("user_id", UNSET) + + worker = d.pop("worker", UNSET) + + async_api_call = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + output=output, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + worker=worker, + ) + + async_api_call.additional_properties = d + return async_api_call + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py new file mode 100644 index 000000000..99bfbd2ae --- /dev/null +++ b/kittycad/models/async_api_call_results_page.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AsyncApiCallResultsPage") + + +@attr.s(auto_attribs=True) +class AsyncApiCallResultsPage: + """ """ + from ..models.async_api_call import AsyncApiCall + items: Union[Unset, List[AsyncApiCall]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.async_api_call import AsyncApiCall + items: Union[Unset, List[AsyncApiCall]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + from ..models.async_api_call import AsyncApiCall + items = cast(List[AsyncApiCall], d.pop("items", UNSET)) + + next_page = d.pop("next_page", UNSET) + + async_api_call_results_page = cls( + items=items, + next_page=next_page, + ) + + async_api_call_results_page.additional_properties = d + return async_api_call_results_page + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py new file mode 100644 index 000000000..480916479 --- /dev/null +++ b/kittycad/models/async_api_call_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AsyncAPICallType(str, Enum): + FILE_CONVERSION = 'FileConversion' + FILE_VOLUME = 'FileVolume' + FILE_MASS = 'FileMass' + FILE_DENSITY = 'FileDensity' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index df0334a64..4ee55a41e 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -11,6 +11,8 @@ T = TypeVar("T", bound="CodeOutput") class CodeOutput: """ """ output: Union[Unset, str] = UNSET + from ..models.output_file import OutputFile + output_files: Union[Unset, List[OutputFile]] = UNSET stderr: Union[Unset, str] = UNSET stdout: Union[Unset, str] = UNSET @@ -18,6 +20,10 @@ class CodeOutput: def to_dict(self) -> Dict[str, Any]: output = self.output + from ..models.output_file import OutputFile + output_files: Union[Unset, List[OutputFile]] = UNSET + if not isinstance(self.output_files, Unset): + output_files = self.output_files stderr = self.stderr stdout = self.stdout @@ -26,6 +32,8 @@ class CodeOutput: field_dict.update({}) if output is not UNSET: field_dict['output'] = output + if output_files is not UNSET: + field_dict['output_files'] = output_files if stderr is not UNSET: field_dict['stderr'] = stderr if stdout is not UNSET: @@ -38,12 +46,16 @@ class CodeOutput: d = src_dict.copy() output = d.pop("output", UNSET) + from ..models.output_file import OutputFile + output_files = cast(List[OutputFile], d.pop("output_files", UNSET)) + stderr = d.pop("stderr", UNSET) stdout = d.pop("stdout", UNSET) code_output = cls( output=output, + output_files=output_files, stderr=stderr, stdout=stdout, ) diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index fd8e95178..1b9c83f49 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -31,3 +31,422 @@ class Connection: http_base_path: Union[Unset, str] = UNSET http_host: Union[Unset, str] = UNSET http_port: Union[Unset, int] = UNSET + http_req_stats: Union[Unset, Any] = UNSET + https_port: Union[Unset, int] = UNSET + id: Union[Unset, int] = UNSET + in_bytes: Union[Unset, int] = UNSET + in_msgs: Union[Unset, int] = UNSET + ip: Union[Unset, str] = UNSET + jetstream: Union[Unset, Jetstream] = UNSET + leaf: Union[Unset, LeafNode] = UNSET + leafnodes: Union[Unset, int] = UNSET + max_connections: Union[Unset, int] = UNSET + max_control_line: Union[Unset, int] = UNSET + max_payload: Union[Unset, int] = UNSET + max_pending: Union[Unset, int] = UNSET + mem: Union[Unset, int] = UNSET + now: Union[Unset, datetime.datetime] = UNSET + out_bytes: Union[Unset, int] = UNSET + out_msgs: Union[Unset, int] = UNSET + ping_interval: Union[Unset, int] = UNSET + ping_max: Union[Unset, int] = UNSET + port: Union[Unset, int] = UNSET + proto: Union[Unset, int] = UNSET + remotes: Union[Unset, int] = UNSET + routes: Union[Unset, int] = UNSET + rtt: Union[Unset, Duration] = UNSET + server_id: Union[Unset, str] = UNSET + server_name: Union[Unset, str] = UNSET + slow_consumers: Union[Unset, int] = UNSET + start: Union[Unset, datetime.datetime] = UNSET + subscriptions: Union[Unset, int] = UNSET + system_account: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + total_connections: Union[Unset, int] = UNSET + uptime: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + write_deadline: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + cluster: Union[Unset, str] = UNSET + if not isinstance(self.cluster, Unset): + cluster = self.cluster.value + config_load_time: Union[Unset, str] = UNSET + if not isinstance(self.config_load_time, Unset): + config_load_time = self.config_load_time.isoformat() + connections = self.connections + cores = self.cores + cpu = self.cpu + gateway: Union[Unset, str] = UNSET + if not isinstance(self.gateway, Unset): + gateway = self.gateway.value + git_commit = self.git_commit + go = self.go + gomaxprocs = self.gomaxprocs + host = self.host + http_base_path = self.http_base_path + http_host = self.http_host + http_port = self.http_port + http_req_stats = self.http_req_stats + https_port = self.https_port + id = self.id + in_bytes = self.in_bytes + in_msgs = self.in_msgs + ip = self.ip + jetstream: Union[Unset, str] = UNSET + if not isinstance(self.jetstream, Unset): + jetstream = self.jetstream.value + leaf: Union[Unset, str] = UNSET + if not isinstance(self.leaf, Unset): + leaf = self.leaf.value + leafnodes = self.leafnodes + max_connections = self.max_connections + max_control_line = self.max_control_line + max_payload = self.max_payload + max_pending = self.max_pending + mem = self.mem + now: Union[Unset, str] = UNSET + if not isinstance(self.now, Unset): + now = self.now.isoformat() + out_bytes = self.out_bytes + out_msgs = self.out_msgs + ping_interval = self.ping_interval + ping_max = self.ping_max + port = self.port + proto = self.proto + remotes = self.remotes + routes = self.routes + rtt: Union[Unset, str] = UNSET + if not isinstance(self.rtt, Unset): + rtt = self.rtt.value + server_id = self.server_id + server_name = self.server_name + slow_consumers = self.slow_consumers + start: Union[Unset, str] = UNSET + if not isinstance(self.start, Unset): + start = self.start.isoformat() + subscriptions = self.subscriptions + system_account = self.system_account + tls_timeout = self.tls_timeout + total_connections = self.total_connections + uptime = self.uptime + version = self.version + write_deadline = self.write_deadline + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if cluster is not UNSET: + field_dict['cluster'] = cluster + if config_load_time is not UNSET: + field_dict['config_load_time'] = config_load_time + if connections is not UNSET: + field_dict['connections'] = connections + if cores is not UNSET: + field_dict['cores'] = cores + if cpu is not UNSET: + field_dict['cpu'] = cpu + if gateway is not UNSET: + field_dict['gateway'] = gateway + if git_commit is not UNSET: + field_dict['git_commit'] = git_commit + if go is not UNSET: + field_dict['go'] = go + if gomaxprocs is not UNSET: + field_dict['gomaxprocs'] = gomaxprocs + if host is not UNSET: + field_dict['host'] = host + if http_base_path is not UNSET: + field_dict['http_base_path'] = http_base_path + if http_host is not UNSET: + field_dict['http_host'] = http_host + if http_port is not UNSET: + field_dict['http_port'] = http_port + if http_req_stats is not UNSET: + field_dict['http_req_stats'] = http_req_stats + if https_port is not UNSET: + field_dict['https_port'] = https_port + if id is not UNSET: + field_dict['id'] = id + if in_bytes is not UNSET: + field_dict['in_bytes'] = in_bytes + if in_msgs is not UNSET: + field_dict['in_msgs'] = in_msgs + if ip is not UNSET: + field_dict['ip'] = ip + if jetstream is not UNSET: + field_dict['jetstream'] = jetstream + if leaf is not UNSET: + field_dict['leaf'] = leaf + if leafnodes is not UNSET: + field_dict['leafnodes'] = leafnodes + if max_connections is not UNSET: + field_dict['max_connections'] = max_connections + if max_control_line is not UNSET: + field_dict['max_control_line'] = max_control_line + if max_payload is not UNSET: + field_dict['max_payload'] = max_payload + if max_pending is not UNSET: + field_dict['max_pending'] = max_pending + if mem is not UNSET: + field_dict['mem'] = mem + if now is not UNSET: + field_dict['now'] = now + if out_bytes is not UNSET: + field_dict['out_bytes'] = out_bytes + if out_msgs is not UNSET: + field_dict['out_msgs'] = out_msgs + if ping_interval is not UNSET: + field_dict['ping_interval'] = ping_interval + if ping_max is not UNSET: + field_dict['ping_max'] = ping_max + if port is not UNSET: + field_dict['port'] = port + if proto is not UNSET: + field_dict['proto'] = proto + if remotes is not UNSET: + field_dict['remotes'] = remotes + if routes is not UNSET: + field_dict['routes'] = routes + if rtt is not UNSET: + field_dict['rtt'] = rtt + if server_id is not UNSET: + field_dict['server_id'] = server_id + if server_name is not UNSET: + field_dict['server_name'] = server_name + if slow_consumers is not UNSET: + field_dict['slow_consumers'] = slow_consumers + if start is not UNSET: + field_dict['start'] = start + if subscriptions is not UNSET: + field_dict['subscriptions'] = subscriptions + if system_account is not UNSET: + field_dict['system_account'] = system_account + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + if total_connections is not UNSET: + field_dict['total_connections'] = total_connections + if uptime is not UNSET: + field_dict['uptime'] = uptime + if version is not UNSET: + field_dict['version'] = version + if write_deadline is not UNSET: + field_dict['write_deadline'] = write_deadline + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) + + _cluster = d.pop("cluster", UNSET) + cluster: Union[Unset, Cluster] + if isinstance(_cluster, Unset): + cluster = UNSET + else: + cluster = Cluster(_cluster) + + _config_load_time = d.pop("config_load_time", UNSET) + config_load_time: Union[Unset, datetime.datetime] + if isinstance(_config_load_time, Unset): + config_load_time = UNSET + else: + config_load_time = isoparse(_config_load_time) + + connections = d.pop("connections", UNSET) + + cores = d.pop("cores", UNSET) + + cpu = d.pop("cpu", UNSET) + + _gateway = d.pop("gateway", UNSET) + gateway: Union[Unset, Gateway] + if isinstance(_gateway, Unset): + gateway = UNSET + else: + gateway = Gateway(_gateway) + + git_commit = d.pop("git_commit", UNSET) + + go = d.pop("go", UNSET) + + gomaxprocs = d.pop("gomaxprocs", UNSET) + + host = d.pop("host", UNSET) + + http_base_path = d.pop("http_base_path", UNSET) + + http_host = d.pop("http_host", UNSET) + + http_port = d.pop("http_port", UNSET) + + http_req_stats = d.pop("http_req_stats", UNSET) + https_port = d.pop("https_port", UNSET) + + id = d.pop("id", UNSET) + + in_bytes = d.pop("in_bytes", UNSET) + + in_msgs = d.pop("in_msgs", UNSET) + + ip = d.pop("ip", UNSET) + + _jetstream = d.pop("jetstream", UNSET) + jetstream: Union[Unset, Jetstream] + if isinstance(_jetstream, Unset): + jetstream = UNSET + else: + jetstream = Jetstream(_jetstream) + + _leaf = d.pop("leaf", UNSET) + leaf: Union[Unset, LeafNode] + if isinstance(_leaf, Unset): + leaf = UNSET + else: + leaf = LeafNode(_leaf) + + leafnodes = d.pop("leafnodes", UNSET) + + max_connections = d.pop("max_connections", UNSET) + + max_control_line = d.pop("max_control_line", UNSET) + + max_payload = d.pop("max_payload", UNSET) + + max_pending = d.pop("max_pending", UNSET) + + mem = d.pop("mem", UNSET) + + _now = d.pop("now", UNSET) + now: Union[Unset, datetime.datetime] + if isinstance(_now, Unset): + now = UNSET + else: + now = isoparse(_now) + + out_bytes = d.pop("out_bytes", UNSET) + + out_msgs = d.pop("out_msgs", UNSET) + + ping_interval = d.pop("ping_interval", UNSET) + + ping_max = d.pop("ping_max", UNSET) + + port = d.pop("port", UNSET) + + proto = d.pop("proto", UNSET) + + remotes = d.pop("remotes", UNSET) + + routes = d.pop("routes", UNSET) + + _rtt = d.pop("rtt", UNSET) + rtt: Union[Unset, Duration] + if isinstance(_rtt, Unset): + rtt = UNSET + else: + rtt = Duration(_rtt) + + server_id = d.pop("server_id", UNSET) + + server_name = d.pop("server_name", UNSET) + + slow_consumers = d.pop("slow_consumers", UNSET) + + _start = d.pop("start", UNSET) + start: Union[Unset, datetime.datetime] + if isinstance(_start, Unset): + start = UNSET + else: + start = isoparse(_start) + + subscriptions = d.pop("subscriptions", UNSET) + + system_account = d.pop("system_account", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + total_connections = d.pop("total_connections", UNSET) + + uptime = d.pop("uptime", UNSET) + + version = d.pop("version", UNSET) + + write_deadline = d.pop("write_deadline", UNSET) + + connection = cls( + auth_timeout=auth_timeout, + cluster=cluster, + config_load_time=config_load_time, + connections=connections, + cores=cores, + cpu=cpu, + gateway=gateway, + git_commit=git_commit, + go=go, + gomaxprocs=gomaxprocs, + host=host, + http_base_path=http_base_path, + http_host=http_host, + http_port=http_port, + http_req_stats=http_req_stats, + https_port=https_port, + id=id, + in_bytes=in_bytes, + in_msgs=in_msgs, + ip=ip, + jetstream=jetstream, + leaf=leaf, + leafnodes=leafnodes, + max_connections=max_connections, + max_control_line=max_control_line, + max_payload=max_payload, + max_pending=max_pending, + mem=mem, + now=now, + out_bytes=out_bytes, + out_msgs=out_msgs, + ping_interval=ping_interval, + ping_max=ping_max, + port=port, + proto=proto, + remotes=remotes, + routes=routes, + rtt=rtt, + server_id=server_id, + server_name=server_name, + slow_consumers=slow_consumers, + start=start, + subscriptions=subscriptions, + system_account=system_account, + tls_timeout=tls_timeout, + total_connections=total_connections, + uptime=uptime, + version=version, + write_deadline=write_deadline, + ) + + connection.additional_properties = d + return connection + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index 1da397c5e..cbfef0099 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -22,3 +22,128 @@ class Customer: delinquent: Union[Unset, bool] = False email: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + metadata: Union[Unset, Any] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, PhoneNumber] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address: Union[Unset, str] = UNSET + if not isinstance(self.address, Unset): + address = self.address.value + balance = self.balance + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + currency: Union[Unset, str] = UNSET + if not isinstance(self.currency, Unset): + currency = self.currency.value + delinquent = self.delinquent + email = self.email + id = self.id + metadata = self.metadata + name = self.name + phone: Union[Unset, str] = UNSET + if not isinstance(self.phone, Unset): + phone = self.phone.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict['address'] = address + if balance is not UNSET: + field_dict['balance'] = balance + if created_at is not UNSET: + field_dict['created_at'] = created_at + if currency is not UNSET: + field_dict['currency'] = currency + if delinquent is not UNSET: + field_dict['delinquent'] = delinquent + if email is not UNSET: + field_dict['email'] = email + if id is not UNSET: + field_dict['id'] = id + if metadata is not UNSET: + field_dict['metadata'] = metadata + if name is not UNSET: + field_dict['name'] = name + if phone is not UNSET: + field_dict['phone'] = phone + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, Address] + if isinstance(_address, Unset): + address = UNSET + else: + address = Address(_address) + + balance = d.pop("balance", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = Currency(_currency) + + delinquent = d.pop("delinquent", UNSET) + + email = d.pop("email", UNSET) + + id = d.pop("id", UNSET) + + metadata = d.pop("metadata", UNSET) + name = d.pop("name", UNSET) + + _phone = d.pop("phone", UNSET) + phone: Union[Unset, PhoneNumber] + if isinstance(_phone, Unset): + phone = UNSET + else: + phone = PhoneNumber(_phone) + + customer = cls( + address=address, + balance=balance, + created_at=created_at, + currency=currency, + delinquent=delinquent, + email=email, + id=id, + metadata=metadata, + name=name, + phone=phone, + ) + + customer.additional_properties = d + return customer + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/engine_metadata.py b/kittycad/models/engine_metadata.py index d213a0242..77ad4b90a 100644 --- a/kittycad/models/engine_metadata.py +++ b/kittycad/models/engine_metadata.py @@ -2,6 +2,8 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr +from ..models.cache_metadata import CacheMetadata +from ..models.environment import Environment from ..models.file_system_metadata import FileSystemMetadata from ..models.connection import Connection from ..types import UNSET, Unset @@ -13,6 +15,8 @@ T = TypeVar("T", bound="EngineMetadata") class EngineMetadata: """ """ async_jobs_running: Union[Unset, bool] = False + cache: Union[Unset, CacheMetadata] = UNSET + environment: Union[Unset, Environment] = UNSET fs: Union[Unset, FileSystemMetadata] = UNSET git_hash: Union[Unset, str] = UNSET pubsub: Union[Unset, Connection] = UNSET @@ -21,6 +25,12 @@ class EngineMetadata: def to_dict(self) -> Dict[str, Any]: async_jobs_running = self.async_jobs_running + cache: Union[Unset, str] = UNSET + if not isinstance(self.cache, Unset): + cache = self.cache.value + environment: Union[Unset, str] = UNSET + if not isinstance(self.environment, Unset): + environment = self.environment.value fs: Union[Unset, str] = UNSET if not isinstance(self.fs, Unset): fs = self.fs.value @@ -34,6 +44,10 @@ class EngineMetadata: field_dict.update({}) if async_jobs_running is not UNSET: field_dict['async_jobs_running'] = async_jobs_running + if cache is not UNSET: + field_dict['cache'] = cache + if environment is not UNSET: + field_dict['environment'] = environment if fs is not UNSET: field_dict['fs'] = fs if git_hash is not UNSET: @@ -48,6 +62,20 @@ class EngineMetadata: d = src_dict.copy() async_jobs_running = d.pop("async_jobs_running", UNSET) + _cache = d.pop("cache", UNSET) + cache: Union[Unset, CacheMetadata] + if isinstance(_cache, Unset): + cache = UNSET + else: + cache = CacheMetadata(_cache) + + _environment = d.pop("environment", UNSET) + environment: Union[Unset, Environment] + if isinstance(_environment, Unset): + environment = UNSET + else: + environment = Environment(_environment) + _fs = d.pop("fs", UNSET) fs: Union[Unset, FileSystemMetadata] if isinstance(_fs, Unset): @@ -66,6 +94,8 @@ class EngineMetadata: engine_metadata = cls( async_jobs_running=async_jobs_running, + cache=cache, + environment=environment, fs=fs, git_hash=git_hash, pubsub=pubsub, diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index 27f6a9f93..96dd3e28a 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -18,7 +18,8 @@ class FileConversion: """ """ completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, Uuid] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET output: Union[Unset, str] = UNSET output_format: Union[Unset, FileOutputFormat] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET @@ -36,9 +37,8 @@ class FileConversion: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - id: Union[Unset, str] = UNSET - if not isinstance(self.id, Unset): - id = self.id.value + error = self.error + id = self.id output = self.output output_format: Union[Unset, str] = UNSET if not isinstance(self.output_format, Unset): @@ -64,6 +64,8 @@ class FileConversion: field_dict['completed_at'] = completed_at if created_at is not UNSET: field_dict['created_at'] = created_at + if error is not UNSET: + field_dict['error'] = error if id is not UNSET: field_dict['id'] = id if output is not UNSET: @@ -100,12 +102,9 @@ class FileConversion: else: created_at = isoparse(_created_at) - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = Uuid(_id) + error = d.pop("error", UNSET) + + id = d.pop("id", UNSET) output = d.pop("output", UNSET) @@ -149,6 +148,7 @@ class FileConversion: file_conversion = cls( completed_at=completed_at, created_at=created_at, + error=error, id=id, output=output, output_format=output_format, diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py new file mode 100644 index 000000000..fa4deaed6 --- /dev/null +++ b/kittycad/models/file_density.py @@ -0,0 +1,171 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.uuid import Uuid +from ..models.file_source_format import FileSourceFormat +from ..models.api_call_status import APICallStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FileDensity") + + +@attr.s(auto_attribs=True) +class FileDensity: + """ """ + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + density: Union[Unset, float] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + material_mass: Union[Unset, float] = UNSET + src_format: Union[Unset, FileSourceFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, APICallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + density = self.density + error = self.error + id = self.id + material_mass = self.material_mass + src_format: Union[Unset, str] = UNSET + if not isinstance(self.src_format, Unset): + src_format = self.src_format.value + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict['completed_at'] = completed_at + if created_at is not UNSET: + field_dict['created_at'] = created_at + if density is not UNSET: + field_dict['density'] = density + if error is not UNSET: + field_dict['error'] = error + if id is not UNSET: + field_dict['id'] = id + if material_mass is not UNSET: + field_dict['material_mass'] = material_mass + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + density = d.pop("density", UNSET) + + error = d.pop("error", UNSET) + + id = d.pop("id", UNSET) + + material_mass = d.pop("material_mass", UNSET) + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileSourceFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = FileSourceFormat(_src_format) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, APICallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = APICallStatus(_status) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + user_id = d.pop("user_id", UNSET) + + file_density = cls( + completed_at=completed_at, + created_at=created_at, + density=density, + error=error, + id=id, + material_mass=material_mass, + src_format=src_format, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + file_density.additional_properties = d + return file_density + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index 9aaa08f26..0f44b95df 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -18,7 +18,7 @@ class FileMass: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET - id: Union[Unset, Uuid] = UNSET + id: Union[Unset, str] = UNSET mass: Union[Unset, float] = UNSET material_density: Union[Unset, float] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET @@ -37,9 +37,7 @@ class FileMass: if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() error = self.error - id: Union[Unset, str] = UNSET - if not isinstance(self.id, Unset): - id = self.id.value + id = self.id mass = self.mass material_density = self.material_density src_format: Union[Unset, str] = UNSET @@ -103,12 +101,7 @@ class FileMass: error = d.pop("error", UNSET) - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = Uuid(_id) + id = d.pop("id", UNSET) mass = d.pop("mass", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 464789c0e..8e56b7107 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -18,7 +18,7 @@ class FileVolume: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET - id: Union[Unset, Uuid] = UNSET + id: Union[Unset, str] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, APICallStatus] = UNSET @@ -36,9 +36,7 @@ class FileVolume: if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() error = self.error - id: Union[Unset, str] = UNSET - if not isinstance(self.id, Unset): - id = self.id.value + id = self.id src_format: Union[Unset, str] = UNSET if not isinstance(self.src_format, Unset): src_format = self.src_format.value @@ -99,12 +97,7 @@ class FileVolume: error = d.pop("error", UNSET) - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = Uuid(_id) + id = d.pop("id", UNSET) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileSourceFormat] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 35fa9b449..0def7d80f 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -27,3 +27,197 @@ class Invoice: invoice_url: Union[Unset, str] = UNSET from ..models.invoice_line_item import InvoiceLineItem lines: Union[Unset, List[InvoiceLineItem]] = UNSET + metadata: Union[Unset, Any] = UNSET + number: Union[Unset, str] = UNSET + paid: Union[Unset, bool] = False + receipt_number: Union[Unset, str] = UNSET + statement_descriptor: Union[Unset, str] = UNSET + status: Union[Unset, InvoiceStatus] = UNSET + subtotal: Union[Unset, int] = UNSET + tax: Union[Unset, int] = UNSET + total: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount_due = self.amount_due + amount_paid = self.amount_paid + amount_remaining = self.amount_remaining + attempt_count = self.attempt_count + attempted = self.attempted + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + currency: Union[Unset, str] = UNSET + if not isinstance(self.currency, Unset): + currency = self.currency.value + description = self.description + id = self.id + invoice_pdf = self.invoice_pdf + invoice_url = self.invoice_url + from ..models.invoice_line_item import InvoiceLineItem + lines: Union[Unset, List[InvoiceLineItem]] = UNSET + if not isinstance(self.lines, Unset): + lines = self.lines + metadata = self.metadata + number = self.number + paid = self.paid + receipt_number = self.receipt_number + statement_descriptor = self.statement_descriptor + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + subtotal = self.subtotal + tax = self.tax + total = self.total + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount_due is not UNSET: + field_dict['amount_due'] = amount_due + if amount_paid is not UNSET: + field_dict['amount_paid'] = amount_paid + if amount_remaining is not UNSET: + field_dict['amount_remaining'] = amount_remaining + if attempt_count is not UNSET: + field_dict['attempt_count'] = attempt_count + if attempted is not UNSET: + field_dict['attempted'] = attempted + if created_at is not UNSET: + field_dict['created_at'] = created_at + if currency is not UNSET: + field_dict['currency'] = currency + if description is not UNSET: + field_dict['description'] = description + if id is not UNSET: + field_dict['id'] = id + if invoice_pdf is not UNSET: + field_dict['invoice_pdf'] = invoice_pdf + if invoice_url is not UNSET: + field_dict['invoice_url'] = invoice_url + if lines is not UNSET: + field_dict['lines'] = lines + if metadata is not UNSET: + field_dict['metadata'] = metadata + if number is not UNSET: + field_dict['number'] = number + if paid is not UNSET: + field_dict['paid'] = paid + if receipt_number is not UNSET: + field_dict['receipt_number'] = receipt_number + if statement_descriptor is not UNSET: + field_dict['statement_descriptor'] = statement_descriptor + if status is not UNSET: + field_dict['status'] = status + if subtotal is not UNSET: + field_dict['subtotal'] = subtotal + if tax is not UNSET: + field_dict['tax'] = tax + if total is not UNSET: + field_dict['total'] = total + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + amount_due = d.pop("amount_due", UNSET) + + amount_paid = d.pop("amount_paid", UNSET) + + amount_remaining = d.pop("amount_remaining", UNSET) + + attempt_count = d.pop("attempt_count", UNSET) + + attempted = d.pop("attempted", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = Currency(_currency) + + description = d.pop("description", UNSET) + + id = d.pop("id", UNSET) + + invoice_pdf = d.pop("invoice_pdf", UNSET) + + invoice_url = d.pop("invoice_url", UNSET) + + from ..models.invoice_line_item import InvoiceLineItem + lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) + + metadata = d.pop("metadata", UNSET) + number = d.pop("number", UNSET) + + paid = d.pop("paid", UNSET) + + receipt_number = d.pop("receipt_number", UNSET) + + statement_descriptor = d.pop("statement_descriptor", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, InvoiceStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = InvoiceStatus(_status) + + subtotal = d.pop("subtotal", UNSET) + + tax = d.pop("tax", UNSET) + + total = d.pop("total", UNSET) + + invoice = cls( + amount_due=amount_due, + amount_paid=amount_paid, + amount_remaining=amount_remaining, + attempt_count=attempt_count, + attempted=attempted, + created_at=created_at, + currency=currency, + description=description, + id=id, + invoice_pdf=invoice_pdf, + invoice_url=invoice_url, + lines=lines, + metadata=metadata, + number=number, + paid=paid, + receipt_number=receipt_number, + statement_descriptor=statement_descriptor, + status=status, + subtotal=subtotal, + tax=tax, + total=total, + ) + + invoice.additional_properties = d + return invoice + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index 207dd1a80..8347d58ad 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -16,3 +16,82 @@ class InvoiceLineItem: description: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET invoice_item: Union[Unset, str] = UNSET + metadata: Union[Unset, Any] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount = self.amount + currency: Union[Unset, str] = UNSET + if not isinstance(self.currency, Unset): + currency = self.currency.value + description = self.description + id = self.id + invoice_item = self.invoice_item + metadata = self.metadata + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount is not UNSET: + field_dict['amount'] = amount + if currency is not UNSET: + field_dict['currency'] = currency + if description is not UNSET: + field_dict['description'] = description + if id is not UNSET: + field_dict['id'] = id + if invoice_item is not UNSET: + field_dict['invoice_item'] = invoice_item + if metadata is not UNSET: + field_dict['metadata'] = metadata + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + amount = d.pop("amount", UNSET) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = Currency(_currency) + + description = d.pop("description", UNSET) + + id = d.pop("id", UNSET) + + invoice_item = d.pop("invoice_item", UNSET) + + metadata = d.pop("metadata", UNSET) + + invoice_line_item = cls( + amount=amount, + currency=currency, + description=description, + id=id, + invoice_item=invoice_item, + metadata=metadata, + ) + + invoice_line_item.additional_properties = d + return invoice_line_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py new file mode 100644 index 000000000..e2e2d1fae --- /dev/null +++ b/kittycad/models/output_file.py @@ -0,0 +1,61 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OutputFile") + + +@attr.s(auto_attribs=True) +class OutputFile: + """ """ + contents: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + contents = self.contents + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict['contents'] = contents + if name is not UNSET: + field_dict['name'] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + contents = d.pop("contents", UNSET) + + name = d.pop("name", UNSET) + + output_file = cls( + contents=contents, + name=name, + ) + + output_file.additional_properties = d + return output_file + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index 33deb9078..809420f4d 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -19,3 +19,103 @@ class PaymentMethod: card: Union[Unset, CardDetails] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET id: Union[Unset, str] = UNSET + metadata: Union[Unset, Any] = UNSET + type: Union[Unset, PaymentMethodType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + billing_info: Union[Unset, str] = UNSET + if not isinstance(self.billing_info, Unset): + billing_info = self.billing_info.value + card: Union[Unset, str] = UNSET + if not isinstance(self.card, Unset): + card = self.card.value + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + metadata = self.metadata + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if billing_info is not UNSET: + field_dict['billing_info'] = billing_info + if card is not UNSET: + field_dict['card'] = card + if created_at is not UNSET: + field_dict['created_at'] = created_at + if id is not UNSET: + field_dict['id'] = id + if metadata is not UNSET: + field_dict['metadata'] = metadata + if type is not UNSET: + field_dict['type'] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _billing_info = d.pop("billing_info", UNSET) + billing_info: Union[Unset, BillingInfo] + if isinstance(_billing_info, Unset): + billing_info = UNSET + else: + billing_info = BillingInfo(_billing_info) + + _card = d.pop("card", UNSET) + card: Union[Unset, CardDetails] + if isinstance(_card, Unset): + card = UNSET + else: + card = CardDetails(_card) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + id = d.pop("id", UNSET) + + metadata = d.pop("metadata", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, PaymentMethodType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PaymentMethodType(_type) + + payment_method = cls( + billing_info=billing_info, + card=card, + created_at=created_at, + id=id, + metadata=metadata, + type=type, + ) + + payment_method.additional_properties = d + return payment_method + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/session.py b/kittycad/models/session.py index d3fec1dc0..f09b5e9f1 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -16,7 +16,7 @@ class Session: created_at: Union[Unset, datetime.datetime] = UNSET expires: Union[Unset, datetime.datetime] = UNSET id: Union[Unset, str] = UNSET - session_token: Union[Unset, Uuid] = UNSET + session_token: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -30,9 +30,7 @@ class Session: if not isinstance(self.expires, Unset): expires = self.expires.isoformat() id = self.id - session_token: Union[Unset, str] = UNSET - if not isinstance(self.session_token, Unset): - session_token = self.session_token.value + session_token = self.session_token updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -75,12 +73,7 @@ class Session: id = d.pop("id", UNSET) - _session_token = d.pop("session_token", UNSET) - session_token: Union[Unset, Uuid] - if isinstance(_session_token, Unset): - session_token = UNSET - else: - session_token = Uuid(_session_token) + session_token = d.pop("session_token", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/spec.json b/spec.json index eb644ad15..9272b21c1 100644 --- a/spec.json +++ b/spec.json @@ -1,6415 +1,6983 @@ { - "components": { - "responses": { - "Error": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + "components": { + "responses": { + "Error": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error", + "x-scope": [ + "", + "#/components/responses/Error" + ] + } + } + }, + "description": "Error" } - } }, - "description": "Error" - } - }, - "schemas": { - "APICallStatus": { - "description": "The status of an async API call.", - "enum": [ - "Queued", - "Uploaded", - "In Progress", - "Completed", - "Failed" - ], - "type": "string" - }, - "Address": { - "description": "An address.", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component.", - "type": "string" - }, - "created_at": { - "description": "The time and date the address was created.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the address." - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "updated_at": { - "description": "The time and date the address was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID that this address belongs to.", - "type": "string" - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "updated_at" - ], - "type": "object" - }, - "ApiCallQueryGroup": { - "description": "A response for a query on the API call table that is grouped by something.", - "properties": { - "count": { - "format": "int64", - "type": "integer" - }, - "query": { - "type": "string" - } - }, - "required": [ - "count", - "query" - ], - "type": "object" - }, - "ApiCallQueryGroupBy": { - "description": "The field of an API call to group by.", - "enum": [ - "email", - "method", - "endpoint", - "user_id", - "origin", - "ip_address" - ], - "type": "string" - }, - "ApiCallWithPrice": { - "description": "An API call with the price.\n\nThis is a join of the `APICall` and `APICallPrice` tables.", - "properties": { - "completed_at": { - "description": "The date and time the API call completed billing.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The date and time the API call was created.", - "format": "partial-date-time", - "type": "string" - }, - "duration": { - "description": "The duration of the API call.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "email": { - "description": "The user's email address.", - "format": "email", - "type": "string" - }, - "endpoint": { - "description": "The endpoint requested by the API call.", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier for the API call." - }, - "ip_address": { - "description": "The ip address of the origin.", - "type": "string" - }, - "method": { - "allOf": [ - { - "$ref": "#/components/schemas/Method" - } - ], - "description": "The HTTP method requsted by the API call." - }, - "minutes": { - "description": "The number of minutes the API call was billed for.", - "format": "int32", - "nullable": true, - "type": "integer" - }, - "origin": { - "description": "The origin of the API call.", - "type": "string" - }, - "price": { - "description": "The price of the API call.", - "nullable": true, - "type": "number" - }, - "request_body": { - "description": "The request body sent by the API call.", - "nullable": true, - "type": "string" - }, - "request_query_params": { - "description": "The request query params sent by the API call.", - "type": "string" - }, - "response_body": { - "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", - "nullable": true, - "type": "string" - }, - "started_at": { - "description": "The date and time the API call started billing.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status_code": { - "allOf": [ - { - "$ref": "#/components/schemas/StatusCode" - } - ], - "description": "The status code returned by the API call.", - "nullable": true - }, - "stripe_invoice_item_id": { - "description": "The Stripe invoice item ID of the API call if it is billable.", - "type": "string" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token that made the API call." - }, - "updated_at": { - "description": "The date and time the API call was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_agent": { - "description": "The user agent of the request.", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that made the API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "method", - "token", - "updated_at", - "user_agent" - ], - "type": "object" - }, - "ApiCallWithPriceResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiCallWithPrice" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "ApiToken": { - "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", - "properties": { - "created_at": { - "description": "The date and time the API token was created.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "description": "The unique identifier for the API token.", - "type": "string" - }, - "is_valid": { - "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", - "type": "boolean" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token itself." - }, - "updated_at": { - "description": "The date and time the API token was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that owns the API token.", - "type": "string" - } - }, - "required": [ - "created_at", - "is_valid", - "token", - "updated_at" - ], - "type": "object" - }, - "ApiTokenResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiToken" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "AsyncAPICallType": { - "description": "The type of async API call.", - "enum": [ - "FileConversion", - "FileVolume", - "FileMass", - "FileDensity" - ], - "type": "string" - }, - "AsyncApiCall": { - "description": "An async API call.", - "properties": { - "completed_at": { - "description": "The time and date the async API call was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the async API call was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID." - }, - "input": { - "description": "The JSON input for the API call. These are determined by the endpoint that is run." - }, - "output": { - "description": "The JSON output for the API call. These are determined by the endpoint that is run.", - "nullable": true - }, - "started_at": { - "description": "The time and date the async API call was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the async API call." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AsyncAPICallType" - } - ], - "description": "The type of async API call." - }, - "updated_at": { - "description": "The time and date the async API call was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the async API call.", - "type": "string" - }, - "worker": { - "description": "The worker node that is performing or performed the async API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - "AsyncApiCallOutput": { - "description": "The output from the async API call.", - "oneOf": [ - { - "description": "A file conversion.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output": { - "description": "The converted file, if completed, base64 encoded.", - "nullable": true, - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the file conversion." - }, - "type": { + "schemas": { + "APICallStatus": { + "description": "The status of an async API call.", "enum": [ - "FileConversion" + "Queued", + "Uploaded", + "In Progress", + "Completed", + "Failed" ], "type": "string" - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - } }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file mass.", - "properties": { - "completed_at": { - "description": "The time and date the mass was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the mass was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } + "Address": { + "description": "An address.", + "properties": { + "city": { + "description": "The city component.", + "type": "string" + }, + "country": { + "description": "The country component.", + "type": "string" + }, + "created_at": { + "description": "The time and date the address was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/Customer", + "#/components/schemas/Address" + ] + } + ], + "description": "The unique identifier of the address." + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "updated_at": { + "description": "The time and date the address was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID that this address belongs to.", + "type": "string" + }, + "zip": { + "description": "The zip component.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "updated_at" ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." - }, - "mass": { - "description": "The resulting mass.", - "format": "double", - "nullable": true, - "type": "number" - }, - "material_density": { - "default": 0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } + "type": "object" + }, + "ApiCallQueryGroup": { + "description": "A response for a query on the API call table that is grouped by something.", + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "query": { + "type": "string" + } + }, + "required": [ + "count", + "query" ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the mass was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the mass." - }, - "type": { + "type": "object" + }, + "ApiCallQueryGroupBy": { + "description": "The field of an API call to group by.", "enum": [ - "FileMass" + "email", + "method", + "endpoint", + "user_id", + "origin", + "ip_address" ], "type": "string" - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file volume.", - "properties": { - "completed_at": { - "description": "The time and date the volume was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the volume was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } + "ApiCallWithPrice": { + "description": "An API call with the price.\n\nThis is a join of the `APICall` and `APICallPrice` tables.", + "properties": { + "completed_at": { + "description": "The date and time the API call completed billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The date and time the API call was created.", + "format": "partial-date-time", + "type": "string" + }, + "duration": { + "description": "The duration of the API call.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "email": { + "description": "The user's email address.", + "format": "email", + "type": "string" + }, + "endpoint": { + "description": "The endpoint requested by the API call.", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The unique identifier for the API call." + }, + "ip_address": { + "description": "The ip address of the origin.", + "type": "string" + }, + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/Method", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The HTTP method requsted by the API call." + }, + "minutes": { + "description": "The number of minutes the API call was billed for.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "origin": { + "description": "The origin of the API call.", + "type": "string" + }, + "price": { + "description": "The price of the API call.", + "nullable": true, + "type": "number" + }, + "request_body": { + "description": "The request body sent by the API call.", + "nullable": true, + "type": "string" + }, + "request_query_params": { + "description": "The request query params sent by the API call.", + "type": "string" + }, + "response_body": { + "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", + "nullable": true, + "type": "string" + }, + "started_at": { + "description": "The date and time the API call started billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status_code": { + "allOf": [ + { + "$ref": "#/components/schemas/StatusCode", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The status code returned by the API call.", + "nullable": true + }, + "stripe_invoice_item_id": { + "description": "The Stripe invoice item ID of the API call if it is billable.", + "type": "string" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The API token that made the API call." + }, + "updated_at": { + "description": "The date and time the API call was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_agent": { + "description": "The user agent of the request.", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that made the API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "method", + "token", + "updated_at", + "user_agent" ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } + "type": "object" + }, + "ApiCallWithPriceResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the volume was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } + "type": "object" + }, + "ApiToken": { + "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", + "properties": { + "created_at": { + "description": "The date and time the API token was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier for the API token.", + "type": "string" + }, + "is_valid": { + "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage", + "#/components/schemas/ApiToken" + ] + } + ], + "description": "The API token itself." + }, + "updated_at": { + "description": "The date and time the API token was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "type": "string" + } + }, + "required": [ + "created_at", + "is_valid", + "token", + "updated_at" ], - "description": "The status of the volume." - }, - "type": { + "type": "object" + }, + "ApiTokenResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "AsyncAPICallType": { + "description": "The type of async API call.", "enum": [ - "FileVolume" + "FileConversion", + "FileVolume", + "FileMass", + "FileDensity" ], "type": "string" - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "description": "The resulting volume.", - "format": "double", - "nullable": true, - "type": "number" - } }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file density.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "partial-date-time", - "type": "string" - }, - "density": { - "description": "The resulting density.", - "format": "double", - "nullable": true, - "type": "number" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } + "AsyncApiCall": { + "description": "An async API call.", + "properties": { + "completed_at": { + "description": "The time and date the async API call was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the async API call was created.", + "format": "partial-date-time", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ], + "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID." + }, + "input": { + "description": "The JSON input for the API call. These are determined by the endpoint that is run." + }, + "output": { + "description": "The JSON output for the API call. These are determined by the endpoint that is run.", + "nullable": true + }, + "started_at": { + "description": "The time and date the async API call was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ], + "description": "The status of the async API call." + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AsyncAPICallType", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ], + "description": "The type of async API call." + }, + "updated_at": { + "description": "The time and date the async API call was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the async API call.", + "type": "string" + }, + "worker": { + "description": "The worker node that is performing or performed the async API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "status", + "type", + "updated_at" ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "material_mass": { - "default": 0, - "description": "The material mass as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } + "type": "object" + }, + "AsyncApiCallOutput": { + "description": "The output from the async API call.", + "oneOf": [ + { + "$ref": "#/components/schemas/FileConversion", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + }, + { + "$ref": "#/components/schemas/FileMass", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + }, + { + "$ref": "#/components/schemas/FileDensity", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + }, + { + "$ref": "#/components/schemas/FileVolume", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "AsyncApiCallResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/AsyncApiCall", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } + "type": "object" + }, + "BillingInfo": { + "description": "The billing information for payments.", + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/Address", + "x-scope": [ + "", + "#/components/schemas/BillingInfo" + ] + } + ], + "description": "The address of the customer.", + "nullable": true + }, + "name": { + "description": "The name of the customer.", + "type": "string" + }, + "phone": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/BillingInfo" + ] + } + ], + "default": "", + "description": "The phone for the customer." + } + }, + "type": "object" + }, + "CacheMetadata": { + "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the cache returned an ok response from ping.", + "type": "boolean" + } + }, + "required": [ + "ok" ], - "description": "The status of the density." - }, - "type": { + "type": "object" + }, + "CardDetails": { + "description": "The card details of a payment method.", + "properties": { + "brand": { + "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "type": "string" + }, + "checks": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodCardChecks", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod", + "#/components/schemas/CardDetails" + ] + } + ], + "default": {}, + "description": "Checks on Card address and CVC if provided." + }, + "country": { + "description": "Two-letter ISO code representing the country of the card.", + "type": "string" + }, + "exp_month": { + "default": 0, + "description": "Two-digit number representing the card's expiration month.", + "format": "int64", + "type": "integer" + }, + "exp_year": { + "default": 0, + "description": "Four-digit number representing the card's expiration year.", + "format": "int64", + "type": "integer" + }, + "fingerprint": { + "description": "Uniquely identifies this particular card number.", + "type": "string" + }, + "funding": { + "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "Cluster information.", + "properties": { + "addr": { + "description": "The IP address of the cluster.", + "nullable": true, + "type": "string" + }, + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the cluster.", + "format": "int64", + "type": "integer" + }, + "cluster_port": { + "default": 0, + "description": "The port of the cluster.", + "format": "int64", + "type": "integer" + }, + "name": { + "default": "", + "description": "The name of the cluster.", + "type": "string" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the cluster.", + "format": "int64", + "type": "integer" + }, + "urls": { + "description": "The urls of the cluster.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CodeLanguage": { + "description": "The language code is written in.", "enum": [ - "FileDensity" + "go", + "rust", + "python", + "node" ], "type": "string" - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "partial-date-time", + }, + "CodeOutput": { + "description": "Output of the code being executed.", + "properties": { + "output": { + "default": "", + "description": "The first files content. Remove after backwards compat (TODO).", + "type": "string" + }, + "output_files": { + "description": "The contents of the files requested if they were passed.", + "items": { + "$ref": "#/components/schemas/OutputFile", + "x-scope": [ + "", + "#/components/schemas/CodeOutput" + ] + }, + "type": "array" + }, + "stderr": { + "default": "", + "description": "The stderr of the code.", + "type": "string" + }, + "stdout": { + "default": "", + "description": "The stdout of the code.", + "type": "string" + } + }, + "type": "object" + }, + "Connection": { + "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the server.", + "format": "int64", + "type": "integer" + }, + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/Cluster", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection" + ] + } + ], + "default": { + "auth_timeout": 0, + "cluster_port": 0, + "name": "", + "tls_timeout": 0 + }, + "description": "Information about the cluster." + }, + "config_load_time": { + "description": "The time the configuration was loaded.", + "format": "date-time", + "type": "string" + }, + "connections": { + "default": 0, + "description": "The number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "cores": { + "default": 0, + "description": "The CPU core usage of the server.", + "format": "int64", + "type": "integer" + }, + "cpu": { + "format": "double", + "nullable": true, + "type": "number" + }, + "gateway": { + "allOf": [ + { + "$ref": "#/components/schemas/Gateway", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection" + ] + } + ], + "default": { + "auth_timeout": 0, + "host": "", + "name": "", + "port": 0, + "tls_timeout": 0 + }, + "description": "Information about the gateway." + }, + "git_commit": { + "default": "", + "description": "The git commit.", + "type": "string" + }, + "go": { + "default": "", + "description": "The go version.", + "type": "string" + }, + "gomaxprocs": { + "default": 0, + "description": "`GOMAXPROCS` of the server.", + "format": "int64", + "type": "integer" + }, + "host": { + "description": "The host of the server.", + "type": "string" + }, + "http_base_path": { + "default": "", + "description": "The http base path of the server.", + "type": "string" + }, + "http_host": { + "default": "", + "description": "The http host of the server.", + "type": "string" + }, + "http_port": { + "default": 0, + "description": "The http port of the server.", + "format": "int64", + "type": "integer" + }, + "http_req_stats": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "type": "object" + }, + "https_port": { + "default": 0, + "description": "The https port of the server.", + "format": "int64", + "type": "integer" + }, + "id": { + "description": "The ID as known by the most recently connected server.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "in_bytes": { + "default": 0, + "description": "The count of inbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "in_msgs": { + "default": 0, + "description": "The number of inbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "ip": { + "description": "The client IP as known by the most recently connected server.", + "type": "string" + }, + "jetstream": { + "allOf": [ + { + "$ref": "#/components/schemas/Jetstream", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection" + ] + } + ], + "default": { + "config": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "meta": { + "cluster_size": 0, + "leader": "", + "name": "" + }, + "stats": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + } + }, + "description": "Jetstream information." + }, + "leaf": { + "allOf": [ + { + "$ref": "#/components/schemas/LeafNode", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection" + ] + } + ], + "default": { + "auth_timeout": 0, + "host": "", + "port": 0, + "tls_timeout": 0 + }, + "description": "Information about leaf nodes." + }, + "leafnodes": { + "default": 0, + "description": "The number of leaf nodes for the server.", + "format": "int64", + "type": "integer" + }, + "max_connections": { + "default": 0, + "description": "The max connections of the server.", + "format": "int64", + "type": "integer" + }, + "max_control_line": { + "default": 0, + "description": "The max control line of the server.", + "format": "int64", + "type": "integer" + }, + "max_payload": { + "default": 0, + "description": "The max payload of the server.", + "format": "int64", + "type": "integer" + }, + "max_pending": { + "default": 0, + "description": "The max pending of the server.", + "format": "int64", + "type": "integer" + }, + "mem": { + "default": 0, + "description": "The memory usage of the server.", + "format": "int64", + "type": "integer" + }, + "now": { + "description": "The time now.", + "format": "date-time", + "type": "string" + }, + "out_bytes": { + "default": 0, + "description": "The count of outbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "out_msgs": { + "default": 0, + "description": "The number of outbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "ping_interval": { + "default": 0, + "description": "The ping interval of the server.", + "format": "int64", + "type": "integer" + }, + "ping_max": { + "default": 0, + "description": "The ping max of the server.", + "format": "int64", + "type": "integer" + }, + "port": { + "default": 0, + "description": "The port of the server.", + "format": "int64", + "type": "integer" + }, + "proto": { + "default": 0, + "description": "The protocol version.", + "format": "int64", + "type": "integer" + }, + "remotes": { + "default": 0, + "description": "The number of remotes for the server.", + "format": "int64", + "type": "integer" + }, + "routes": { + "default": 0, + "description": "The number of routes for the server.", + "format": "int64", + "type": "integer" + }, + "rtt": { + "allOf": [ + { + "$ref": "#/components/schemas/Duration", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection" + ] + } + ], + "description": "The round trip time between this client and the server." + }, + "server_id": { + "default": "", + "description": "The server ID.", + "type": "string" + }, + "server_name": { + "default": "", + "description": "The server name.", + "type": "string" + }, + "slow_consumers": { + "default": 0, + "description": "The number of slow consumers for the server.", + "format": "int64", + "type": "integer" + }, + "start": { + "description": "When the server was started.", + "format": "date-time", + "type": "string" + }, + "subscriptions": { + "default": 0, + "description": "The number of subscriptions for the server.", + "format": "int64", + "type": "integer" + }, + "system_account": { + "default": "", + "description": "The system account.", + "type": "string" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout of the server.", + "format": "int64", + "type": "integer" + }, + "total_connections": { + "default": 0, + "description": "The total number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "uptime": { + "default": "", + "description": "The uptime of the server.", + "type": "string" + }, + "version": { + "default": "", + "description": "The version of the service.", + "type": "string" + }, + "write_deadline": { + "default": 0, + "description": "The write deadline of the server.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "config_load_time", + "host", + "http_req_stats", + "id", + "ip", + "now", + "rtt", + "start" + ], + "type": "object" + }, + "CreatedAtSortMode": { + "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", + "enum": [ + "created-at-ascending", + "created-at-descending" + ], "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", + }, + "Currency": { + "description": "Currency is the list of supported currencies.\n\nFor more details see .", + "enum": [ + "aed", + "afn", + "all", + "amd", + "ang", + "aoa", + "ars", + "aud", + "awg", + "azn", + "bam", + "bbd", + "bdt", + "bgn", + "bif", + "bmd", + "bnd", + "bob", + "brl", + "bsd", + "bwp", + "bzd", + "cad", + "cdf", + "chf", + "clp", + "cny", + "cop", + "crc", + "cve", + "czk", + "djf", + "dkk", + "dop", + "dzd", + "eek", + "egp", + "etb", + "eur", + "fjd", + "fkp", + "gbp", + "gel", + "gip", + "gmd", + "gnf", + "gtq", + "gyd", + "hkd", + "hnl", + "hrk", + "htg", + "huf", + "idr", + "ils", + "inr", + "isk", + "jmd", + "jpy", + "kes", + "kgs", + "khr", + "kmf", + "krw", + "kyd", + "kzt", + "lak", + "lbp", + "lkr", + "lrd", + "lsl", + "ltl", + "lvl", + "mad", + "mdl", + "mga", + "mkd", + "mnt", + "mop", + "mro", + "mur", + "mvr", + "mwk", + "mxn", + "myr", + "mzn", + "nad", + "ngn", + "nio", + "nok", + "npr", + "nzd", + "pab", + "pen", + "pgk", + "php", + "pkr", + "pln", + "pyg", + "qar", + "ron", + "rsd", + "rub", + "rwf", + "sar", + "sbd", + "scr", + "sek", + "sgd", + "shp", + "sll", + "sos", + "srd", + "std", + "svc", + "szl", + "thb", + "tjs", + "top", + "try", + "ttd", + "twd", + "tzs", + "uah", + "ugx", + "usd", + "uyu", + "uzs", + "vef", + "vnd", + "vuv", + "wst", + "xaf", + "xcd", + "xof", + "xpf", + "yer", + "zar", + "zmw" + ], "type": "string" - } }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - } - ] - }, - "AsyncApiCallResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/AsyncApiCall" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "BillingInfo": { - "description": "The billing information for payments.", - "properties": { - "address": { - "allOf": [ - { - "$ref": "#/components/schemas/Address" - } - ], - "description": "The address of the customer.", - "nullable": true - }, - "name": { - "description": "The name of the customer.", - "type": "string" - }, - "phone": { - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ], - "default": "", - "description": "The phone for the customer." - } - }, - "type": "object" - }, - "CacheMetadata": { - "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the cache returned an ok response from ping.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "CardDetails": { - "description": "The card details of a payment method.", - "properties": { - "brand": { - "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", - "type": "string" - }, - "checks": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodCardChecks" - } - ], - "default": {}, - "description": "Checks on Card address and CVC if provided." - }, - "country": { - "description": "Two-letter ISO code representing the country of the card.", - "type": "string" - }, - "exp_month": { - "default": 0, - "description": "Two-digit number representing the card's expiration month.", - "format": "int64", - "type": "integer" - }, - "exp_year": { - "default": 0, - "description": "Four-digit number representing the card's expiration year.", - "format": "int64", - "type": "integer" - }, - "fingerprint": { - "description": "Uniquely identifies this particular card number.", - "type": "string" - }, - "funding": { - "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", - "type": "string" - }, - "last4": { - "description": "The last four digits of the card.", - "type": "string" - } - }, - "type": "object" - }, - "Cluster": { - "description": "Cluster information.", - "properties": { - "addr": { - "description": "The IP address of the cluster.", - "nullable": true, - "type": "string" - }, - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the cluster.", - "format": "int64", - "type": "integer" - }, - "cluster_port": { - "default": 0, - "description": "The port of the cluster.", - "format": "int64", - "type": "integer" - }, - "name": { - "default": "", - "description": "The name of the cluster.", - "type": "string" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the cluster.", - "format": "int64", - "type": "integer" - }, - "urls": { - "description": "The urls of the cluster.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CodeLanguage": { - "description": "The language code is written in.", - "enum": [ - "go", - "rust", - "python", - "node" - ], - "type": "string" - }, - "CodeOutput": { - "description": "Output of the code being executed.", - "properties": { - "output": { - "default": "", - "description": "The first files content. Remove after backwards compat (TODO).", - "type": "string" - }, - "output_files": { - "description": "The contents of the files requested if they were passed.", - "items": { - "$ref": "#/components/schemas/OutputFile" - }, - "type": "array" - }, - "stderr": { - "default": "", - "description": "The stderr of the code.", - "type": "string" - }, - "stdout": { - "default": "", - "description": "The stdout of the code.", - "type": "string" - } - }, - "type": "object" - }, - "Connection": { - "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the server.", - "format": "int64", - "type": "integer" - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/Cluster" - } - ], - "default": { - "auth_timeout": 0, - "cluster_port": 0, - "name": "", - "tls_timeout": 0 - }, - "description": "Information about the cluster." - }, - "config_load_time": { - "description": "The time the configuration was loaded.", - "format": "date-time", - "type": "string" - }, - "connections": { - "default": 0, - "description": "The number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "cores": { - "default": 0, - "description": "The CPU core usage of the server.", - "format": "int64", - "type": "integer" - }, - "cpu": { - "format": "double", - "nullable": true, - "type": "number" - }, - "gateway": { - "allOf": [ - { - "$ref": "#/components/schemas/Gateway" - } - ], - "default": { - "auth_timeout": 0, - "host": "", - "name": "", - "port": 0, - "tls_timeout": 0 - }, - "description": "Information about the gateway." - }, - "git_commit": { - "default": "", - "description": "The git commit.", - "type": "string" - }, - "go": { - "default": "", - "description": "The go version.", - "type": "string" - }, - "gomaxprocs": { - "default": 0, - "description": "`GOMAXPROCS` of the server.", - "format": "int64", - "type": "integer" - }, - "host": { - "description": "The host of the server.", - "type": "string" - }, - "http_base_path": { - "default": "", - "description": "The http base path of the server.", - "type": "string" - }, - "http_host": { - "default": "", - "description": "The http host of the server.", - "type": "string" - }, - "http_port": { - "default": 0, - "description": "The http port of the server.", - "format": "int64", - "type": "integer" - }, - "http_req_stats": { - "additionalProperties": { - "format": "int64", - "type": "integer" - }, - "type": "object" - }, - "https_port": { - "default": 0, - "description": "The https port of the server.", - "format": "int64", - "type": "integer" - }, - "id": { - "description": "The ID as known by the most recently connected server.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "in_bytes": { - "default": 0, - "description": "The count of inbound bytes for the server.", - "format": "int64", - "type": "integer" - }, - "in_msgs": { - "default": 0, - "description": "The number of inbound messages for the server.", - "format": "int64", - "type": "integer" - }, - "ip": { - "description": "The client IP as known by the most recently connected server.", - "type": "string" - }, - "jetstream": { - "allOf": [ - { - "$ref": "#/components/schemas/Jetstream" - } - ], - "default": { - "config": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" - }, - "meta": { - "cluster_size": 0, - "leader": "", - "name": "" - }, - "stats": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 + "Customer": { + "description": "The resource representing a payment \"Customer\".", + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/Address", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ], + "description": "The customer's address.", + "nullable": true + }, + "balance": { + "default": 0, + "description": "Current balance, if any, being stored on the customer.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "format": "int64", + "type": "integer" + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ], + "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes." + }, + "delinquent": { + "default": false, + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", + "type": "boolean" + }, + "email": { + "description": "The customer's email address.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "type": "string" + }, + "phone": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ], + "default": "", + "description": "The customer's phone number." + } }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 - } + "required": [ + "created_at", + "currency" + ], + "type": "object" }, - "description": "Jetstream information." - }, - "leaf": { - "allOf": [ - { - "$ref": "#/components/schemas/LeafNode" - } - ], - "default": { - "auth_timeout": 0, - "host": "", - "port": 0, - "tls_timeout": 0 + "Duration": { + "format": "int64", + "type": "integer" }, - "description": "Information about leaf nodes." - }, - "leafnodes": { - "default": 0, - "description": "The number of leaf nodes for the server.", - "format": "int64", - "type": "integer" - }, - "max_connections": { - "default": 0, - "description": "The max connections of the server.", - "format": "int64", - "type": "integer" - }, - "max_control_line": { - "default": 0, - "description": "The max control line of the server.", - "format": "int64", - "type": "integer" - }, - "max_payload": { - "default": 0, - "description": "The max payload of the server.", - "format": "int64", - "type": "integer" - }, - "max_pending": { - "default": 0, - "description": "The max pending of the server.", - "format": "int64", - "type": "integer" - }, - "mem": { - "default": 0, - "description": "The memory usage of the server.", - "format": "int64", - "type": "integer" - }, - "now": { - "description": "The time now.", - "format": "date-time", - "type": "string" - }, - "out_bytes": { - "default": 0, - "description": "The count of outbound bytes for the server.", - "format": "int64", - "type": "integer" - }, - "out_msgs": { - "default": 0, - "description": "The number of outbound messages for the server.", - "format": "int64", - "type": "integer" - }, - "ping_interval": { - "default": 0, - "description": "The ping interval of the server.", - "format": "int64", - "type": "integer" - }, - "ping_max": { - "default": 0, - "description": "The ping max of the server.", - "format": "int64", - "type": "integer" - }, - "port": { - "default": 0, - "description": "The port of the server.", - "format": "int64", - "type": "integer" - }, - "proto": { - "default": 0, - "description": "The protocol version.", - "format": "int64", - "type": "integer" - }, - "remotes": { - "default": 0, - "description": "The number of remotes for the server.", - "format": "int64", - "type": "integer" - }, - "routes": { - "default": 0, - "description": "The number of routes for the server.", - "format": "int64", - "type": "integer" - }, - "rtt": { - "allOf": [ - { - "$ref": "#/components/schemas/Duration" - } - ], - "description": "The round trip time between this client and the server." - }, - "server_id": { - "default": "", - "description": "The server ID.", - "type": "string" - }, - "server_name": { - "default": "", - "description": "The server name.", - "type": "string" - }, - "slow_consumers": { - "default": 0, - "description": "The number of slow consumers for the server.", - "format": "int64", - "type": "integer" - }, - "start": { - "description": "When the server was started.", - "format": "date-time", - "type": "string" - }, - "subscriptions": { - "default": 0, - "description": "The number of subscriptions for the server.", - "format": "int64", - "type": "integer" - }, - "system_account": { - "default": "", - "description": "The system account.", - "type": "string" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout of the server.", - "format": "int64", - "type": "integer" - }, - "total_connections": { - "default": 0, - "description": "The total number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "uptime": { - "default": "", - "description": "The uptime of the server.", - "type": "string" - }, - "version": { - "default": "", - "description": "The version of the service.", - "type": "string" - }, - "write_deadline": { - "default": 0, - "description": "The write deadline of the server.", - "format": "int64", - "type": "integer" - } - }, - "required": [ - "config_load_time", - "host", - "http_req_stats", - "id", - "ip", - "now", - "rtt", - "start" - ], - "type": "object" - }, - "CreatedAtSortMode": { - "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", - "enum": [ - "created-at-ascending", - "created-at-descending" - ], - "type": "string" - }, - "Currency": { - "description": "Currency is the list of supported currencies.\n\nFor more details see \u003chttps://support.stripe.com/questions/which-currencies-does-stripe-support\u003e.", - "enum": [ - "aed", - "afn", - "all", - "amd", - "ang", - "aoa", - "ars", - "aud", - "awg", - "azn", - "bam", - "bbd", - "bdt", - "bgn", - "bif", - "bmd", - "bnd", - "bob", - "brl", - "bsd", - "bwp", - "bzd", - "cad", - "cdf", - "chf", - "clp", - "cny", - "cop", - "crc", - "cve", - "czk", - "djf", - "dkk", - "dop", - "dzd", - "eek", - "egp", - "etb", - "eur", - "fjd", - "fkp", - "gbp", - "gel", - "gip", - "gmd", - "gnf", - "gtq", - "gyd", - "hkd", - "hnl", - "hrk", - "htg", - "huf", - "idr", - "ils", - "inr", - "isk", - "jmd", - "jpy", - "kes", - "kgs", - "khr", - "kmf", - "krw", - "kyd", - "kzt", - "lak", - "lbp", - "lkr", - "lrd", - "lsl", - "ltl", - "lvl", - "mad", - "mdl", - "mga", - "mkd", - "mnt", - "mop", - "mro", - "mur", - "mvr", - "mwk", - "mxn", - "myr", - "mzn", - "nad", - "ngn", - "nio", - "nok", - "npr", - "nzd", - "pab", - "pen", - "pgk", - "php", - "pkr", - "pln", - "pyg", - "qar", - "ron", - "rsd", - "rub", - "rwf", - "sar", - "sbd", - "scr", - "sek", - "sgd", - "shp", - "sll", - "sos", - "srd", - "std", - "svc", - "szl", - "thb", - "tjs", - "top", - "try", - "ttd", - "twd", - "tzs", - "uah", - "ugx", - "usd", - "uyu", - "uzs", - "vef", - "vnd", - "vuv", - "wst", - "xaf", - "xcd", - "xof", - "xpf", - "yer", - "zar", - "zmw" - ], - "type": "string" - }, - "Customer": { - "description": "The resource representing a payment \"Customer\".", - "properties": { - "address": { - "allOf": [ - { - "$ref": "#/components/schemas/Address" - } - ], - "description": "The customer's address.", - "nullable": true - }, - "balance": { - "default": 0, - "description": "Current balance, if any, being stored on the customer.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", - "format": "int64", - "type": "integer" - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes." - }, - "delinquent": { - "default": false, - "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", - "type": "boolean" - }, - "email": { - "description": "The customer's email address.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "name": { - "description": "The customer's full name or business name.", - "type": "string" - }, - "phone": { - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ], - "default": "", - "description": "The customer's phone number." - } - }, - "required": [ - "created_at", - "currency" - ], - "type": "object" - }, - "Duration": { - "format": "int64", - "type": "integer" - }, - "EngineMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "async_jobs_running": { - "description": "If any async job is currently running.", - "type": "boolean" - }, - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." - } - }, - "required": [ - "async_jobs_running", - "cache", - "environment", - "fs", - "git_hash", - "pubsub" - ], - "type": "object" - }, - "Environment": { - "description": "The environment the server is running in.", - "enum": [ - "DEVELOPMENT", - "PREVIEW", - "PRODUCTION" - ], - "type": "string" - }, - "Error": { - "description": "Error information from a response.", - "properties": { - "error_code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "request_id": { - "type": "string" - } - }, - "required": [ - "message", - "request_id" - ], - "type": "object" - }, - "ExtendedUser": { - "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "partial-date-time", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "format": "email", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "mailchimp_id": { - "description": "The user's MailChimp ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ], - "default": "", - "description": "The user's phone number." - }, - "stripe_id": { - "description": "The user's Stripe ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "zendesk_id": { - "description": "The user's Zendesk ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - } - }, - "required": [ - "created_at", - "updated_at" - ], - "type": "object" - }, - "ExtendedUserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ExtendedUser" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "FileConversion": { - "description": "A file conversion.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output": { - "description": "The converted file, if completed, base64 encoded.", - "nullable": true, - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the file conversion." - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileDensity": { - "description": "A file density result.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "partial-date-time", - "type": "string" - }, - "density": { - "description": "The resulting density.", - "format": "double", - "nullable": true, - "type": "number" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "material_mass": { - "default": 0, - "description": "The material mass as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the density." - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileMass": { - "description": "A file mass result.", - "properties": { - "completed_at": { - "description": "The time and date the mass was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the mass was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." - }, - "mass": { - "description": "The resulting mass.", - "format": "double", - "nullable": true, - "type": "number" - }, - "material_density": { - "default": 0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the mass was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the mass." - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileOutputFormat": { - "description": "The valid types of output file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ], - "type": "string" - }, - "FileSourceFormat": { - "description": "The valid types of source file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ], - "type": "string" - }, - "FileSystemMetadata": { - "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the file system passed a sanity check.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "FileVolume": { - "description": "A file volume result.", - "properties": { - "completed_at": { - "description": "The time and date the volume was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the volume was created.", - "format": "partial-date-time", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the volume was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/APICallStatus" - } - ], - "description": "The status of the volume." - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "description": "The resulting volume.", - "format": "double", - "nullable": true, - "type": "number" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "Gateway": { - "description": "Gateway information.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the gateway.", - "format": "int64", - "type": "integer" - }, - "host": { - "default": "", - "description": "The host of the gateway.", - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the gateway.", - "type": "string" - }, - "port": { - "default": 0, - "description": "The port of the gateway.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the gateway.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "Invoice": { - "description": "An invoice.", - "properties": { - "amount_due": { - "default": 0, - "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", - "format": "int64", - "type": "integer" - }, - "amount_paid": { - "default": 0, - "description": "The amount, in %s, that was paid.", - "format": "int64", - "type": "integer" - }, - "amount_remaining": { - "default": 0, - "description": "The amount remaining, in %s, that is due.", - "format": "int64", - "type": "integer" - }, - "attempt_count": { - "default": 0, - "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "attempted": { - "default": false, - "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", - "type": "boolean" - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." - }, - "description": { - "description": "Description of the invoice.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "invoice_pdf": { - "description": "The link to download the PDF for the invoice.", - "type": "string" - }, - "invoice_url": { - "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", - "type": "string" - }, - "lines": { - "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", - "items": { - "$ref": "#/components/schemas/InvoiceLineItem" - }, - "type": "array" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "number": { - "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", - "type": "string" - }, - "paid": { - "default": false, - "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", - "type": "boolean" - }, - "receipt_number": { - "description": "This is the transaction number that appears on email receipts sent for this invoice.", - "type": "string" - }, - "statement_descriptor": { - "description": "Extra information about an invoice for the customer's credit card statement.", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/InvoiceStatus" - } - ], - "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", - "nullable": true - }, - "subtotal": { - "default": 0, - "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", - "format": "int64", - "type": "integer" - }, - "tax": { - "default": 0, - "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", - "format": "int64", - "type": "integer" - }, - "total": { - "default": 0, - "description": "Total after discounts and taxes.", - "format": "int64", - "type": "integer" - } - }, - "required": [ - "created_at", - "currency" - ], - "type": "object" - }, - "InvoiceLineItem": { - "description": "An invoice line item.", - "properties": { - "amount": { - "default": 0, - "description": "The amount, in %s.", - "format": "int64", - "type": "integer" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." - }, - "description": { - "description": "The description.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "invoice_item": { - "description": "The ID of the invoice item associated with this line item if any.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", - "type": "object" - } - }, - "required": [ - "currency" - ], - "type": "object" - }, - "InvoiceStatus": { - "description": "An enum representing the possible values of an `Invoice`'s `status` field.", - "enum": [ - "deleted", - "draft", - "open", - "paid", - "uncollectible", - "void" - ], - "type": "string" - }, - "Jetstream": { - "description": "Jetstream information.", - "properties": { - "config": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamConfig" - } - ], - "default": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" - }, - "description": "The Jetstream config." - }, - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/MetaClusterInfo" - } - ], - "default": { - "cluster_size": 0, - "leader": "", - "name": "" - }, - "description": "Meta information about the cluster." - }, - "stats": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamStats" - } - ], - "default": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 - }, - "description": "Jetstream statistics." - } - }, - "type": "object" - }, - "JetstreamApiStats": { - "description": "Jetstream API statistics.", - "properties": { - "errors": { - "default": 0, - "description": "The number of errors.", - "format": "int64", - "type": "integer" - }, - "inflight": { - "default": 0, - "description": "The number of inflight requests.", - "format": "int64", - "type": "integer" - }, - "total": { - "default": 0, - "description": "The number of requests.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "JetstreamConfig": { - "description": "Jetstream configuration.", - "properties": { - "domain": { - "default": "", - "description": "The domain.", - "type": "string" - }, - "max_memory": { - "default": 0, - "description": "The max memory.", - "format": "int64", - "type": "integer" - }, - "max_storage": { - "default": 0, - "description": "The max storage.", - "format": "int64", - "type": "integer" - }, - "store_dir": { - "default": "", - "description": "The store directory.", - "type": "string" - } - }, - "type": "object" - }, - "JetstreamStats": { - "description": "Jetstream statistics.", - "properties": { - "accounts": { - "default": 0, - "description": "The number of accounts.", - "format": "int64", - "type": "integer" - }, - "api": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamApiStats" - } - ], - "default": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "description": "API stats." - }, - "ha_assets": { - "default": 0, - "description": "The number of HA assets.", - "format": "int64", - "type": "integer" - }, - "memory": { - "default": 0, - "description": "The memory used by the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_memory": { - "default": 0, - "description": "The reserved memory for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_store": { - "default": 0, - "description": "The reserved storage for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "store": { - "default": 0, - "description": "The storage used by the Jetstream server.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "LeafNode": { - "description": "Leaf node information.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the leaf node.", - "format": "int64", - "type": "integer" - }, - "host": { - "default": "", - "description": "The host of the leaf node.", - "type": "string" - }, - "port": { - "default": 0, - "description": "The port of the leaf node.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the leaf node.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "LoginParams": { - "description": "The parameters passed to login.", - "properties": { - "session": { - "description": "The session token we should set as a cookie.", - "type": "string" - } - }, - "required": [ - "session" - ], - "type": "object" - }, - "MetaClusterInfo": { - "description": "Jetstream statistics.", - "properties": { - "cluster_size": { - "default": 0, - "description": "The size of the cluster.", - "format": "int64", - "type": "integer" - }, - "leader": { - "default": "", - "description": "The leader of the cluster.", - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the cluster.", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." - }, - "engine": { - "allOf": [ - { - "$ref": "#/components/schemas/EngineMetadata" - } - ], - "description": "Metadata about our engine API connection." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." - } - }, - "required": [ - "cache", - "engine", - "environment", - "fs", - "git_hash", - "pubsub" - ], - "type": "object" - }, - "Method": { - "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", - "enum": [ - "OPTIONS", - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "TRACE", - "CONNECT", - "PATCH", - "EXTENSION" - ], - "type": "string" - }, - "OutputFile": { - "description": "Output file contents.", - "properties": { - "contents": { - "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the file.", - "type": "string" - } - }, - "type": "object" - }, - "PaymentIntent": { - "description": "A payment intent response.", - "properties": { - "client_secret": { - "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", - "type": "string" - } - }, - "required": [ - "client_secret" - ], - "type": "object" - }, - "PaymentMethod": { - "description": "A payment method.", - "properties": { - "billing_info": { - "allOf": [ - { - "$ref": "#/components/schemas/BillingInfo" - } - ], - "description": "The billing info for the payment method." - }, - "card": { - "allOf": [ - { - "$ref": "#/components/schemas/CardDetails" - } - ], - "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", - "nullable": true - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodType" - } - ], - "description": "The type of payment method." - } - }, - "required": [ - "billing_info", - "created_at", - "type" - ], - "type": "object" - }, - "PaymentMethodCardChecks": { - "description": "Card checks.", - "properties": { - "address_line1_check": { - "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "address_postal_code_check": { - "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "cvc_check": { - "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - } - }, - "type": "object" - }, - "PaymentMethodType": { - "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", - "enum": [ - "card" - ], - "type": "string" - }, - "PhoneNumber": { - "format": "phone", - "title": "String", - "type": "string" - }, - "Pong": { - "description": "The response from the `/ping` endpoint.", - "properties": { - "message": { - "description": "The pong response.", - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - }, - "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", - "properties": { - "created_at": { - "description": "The date and time the session was created.", - "format": "partial-date-time", - "type": "string" - }, - "expires": { - "description": "The date and time the session expires.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "description": "The unique identifier for the session.", - "type": "string" - }, - "session_token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The session token." - }, - "updated_at": { - "description": "The date and time the session was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user that the session belongs to.", - "type": "string" - } - }, - "required": [ - "created_at", - "expires", - "session_token", - "updated_at" - ], - "type": "object" - }, - "StatusCode": { - "format": "int32", - "title": "int32", - "type": "integer" - }, - "UpdateUser": { - "description": "The user-modifiable parts of a User.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "phone": { - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ], - "default": "", - "description": "The user's phone number." - } - }, - "type": "object" - }, - "User": { - "description": "A user.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "partial-date-time", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "format": "email", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ], - "default": "", - "description": "The user's phone number." - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "partial-date-time", - "type": "string" - } - }, - "required": [ - "created_at", - "updated_at" - ], - "type": "object" - }, - "UserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "Uuid": { - "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", - "format": "uuid", - "type": "string" - } - } - }, - "info": { - "contact": { - "email": "api@kittycad.io", - "url": "https://kittycad.io" - }, - "description": "API server for KittyCAD", - "title": "KittyCAD API", - "version": "0.1.0", - "x-go": { - "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", - "install": "go get github.com/kittycad/kittycad.go" - } - }, - "openapi": "3.0.3", - "paths": { - "/": { - "get": { - "operationId": "get_schema", - "responses": { - "200": { - "content": { - "application/json": { - "schema": {} - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "EngineMetadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "async_jobs_running": { + "description": "If any async job is currently running.", + "type": "boolean" + }, + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "Metadata about our cache." + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "The environment we are running in." + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "allOf": [ + { + "$ref": "#/components/schemas/Connection", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "Metadata about our pub-sub connection." + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get OpenAPI schema.", - "tags": [ - "meta" - ], - "x-go": { - "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" - } - } - }, - "/_meta/info": { - "get": { - "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", - "operationId": "get_metadata", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metadata" - } - } + "required": [ + "async_jobs_running", + "cache", + "environment", + "fs", + "git_hash", + "pubsub" + ], + "type": "object" }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get the metadata about our currently running server.", - "tags": [ - "meta", - "hidden" - ], - "x-go": { - "example": "// Getdata: Get the metadata about our currently running server.\n//\n// This includes information on any of our other distributed systems it is connected to.\n// You must be a KittyCAD employee to perform this request.\nmetadata, err := client.Meta.Getdata()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata" - } - } - }, - "/api-call-metrics": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "description": "What field to group the metrics by.", - "in": "query", - "name": "group_by", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - }, - "title": "Array_of_ApiCallQueryGroup", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get API call metrics.", - "tags": [ - "api-calls", - "hidden" - ], - "x-go": { - "example": "// GetMetrics: Get API call metrics.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters:\n//\t- `groupBy`: What field to group the metrics by.\nAPICallQueryGroup, err := client.APICall.GetMetrics(groupBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" - } - } - }, - "/api-calls": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// List: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" - } - } - }, - "/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", - "operationId": "get_api_call", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get details of an API call.", - "tags": [ - "api-calls", - "hidden" - ], - "x-go": { - "example": "// Get: Get details of an API call.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n// If the user is not authenticated to view the specified API call, then it is not returned.\n// Only KittyCAD employees can view API calls for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.Get(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" - } - } - }, - "/async/operations": { - "get": { - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", - "operationId": "list_async_operations", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - }, - { - "description": "The status to filter by.", - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/APICallStatus" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List async operations.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListAsyncOperations: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListAsyncOperationsAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nasyncAPICallResultsPage, err := client.APICall.ListAsyncOperations(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListAsyncOperationsAllPages: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListAsyncOperations` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nAsyncAPICall, err := client.APICall.ListAsyncOperationsAllPages(sortBy, status)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListAsyncOperations" - } - } - }, - "/async/operations/{id}": { - "get": { - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", - "operationId": "get_async_operation", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an async operation.", - "tags": [ - "api-calls" - ], - "x-go": { - "example": "// GetAsyncOperation: Get an async operation.\n//\n// Get the status and output of an async operation.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n// If the user is not authenticated to view the specified async operation, then it is not returned.\n// Only KittyCAD employees with the proper access can view async operations for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.APICall.GetAsyncOperation(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetAsyncOperation" - } - } - }, - "/file/conversion/{src_format}/{output_format}": { - "post": { - "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_conversion", - "parameters": [ - { - "description": "The format the file should be converted to.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileOutputFormat" - }, - "style": "simple" - }, - { - "description": "The format of the file to convert.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "Environment": { + "description": "The environment the server is running in.", + "enum": [ + "DEVELOPMENT", + "PREVIEW", + "PRODUCTION" + ], "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "Error": { + "description": "Error information from a response.", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert CAD file.", - "tags": [ - "file" - ], - "x-go": { - "example": "// CreateConversion: Convert CAD file.\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversion, err := client.File.CreateConversion(outputFormat, srcFormat, body)\n\n// - OR -\n\n// CreateConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the CreateConversion function.\nfileConversion, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" - } - } - }, - "/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", - "operationId": "get_file_conversion", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "required": [ + "message", + "request_id" + ], + "type": "object" }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } + "ExtendedUser": { + "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "format": "email", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "mailchimp_id": { + "description": "The user's MailChimp ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/ExtendedUser" + ] + } + ], + "default": "", + "description": "The user's phone number." + }, + "stripe_id": { + "description": "The user's Stripe ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "zendesk_id": { + "description": "The user's Zendesk ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "ExtendedUserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "", + "#/components/schemas/ExtendedUserResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a file conversion.", - "tags": [ - "file" - ], - "x-go": { - "example": "// GetConversion: Get a file conversion.\n//\n// Get the status and output of an async file conversion.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n// If the user is not authenticated to view the specified file conversion, then it is not returned.\n// Only KittyCAD employees with the proper access can view file conversions for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.File.GetConversion(id)\n\n// - OR -\n\n// GetConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the GetConversion function.\nasyncAPICallOutput, err := client.File.GetConversionWithBase64Helper(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" - } - } - }, - "/file/density": { - "post": { - "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_density", - "parameters": [ - { - "description": "The material mass.", - "in": "query", - "name": "material_mass", - "required": true, - "schema": { - "format": "float", - "type": "number" + "required": [ + "items" + ], + "type": "object" }, - "style": "form" - }, - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "FileConversion": { + "description": "A file conversion.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "partial-date-time", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "nullable": true, + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileOutputFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The status of the file conversion." + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "FileDensity": { + "description": "A file density result.", + "properties": { + "completed_at": { + "description": "The time and date the density was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the density was created.", + "format": "partial-date-time", + "type": "string" + }, + "density": { + "description": "The resulting density.", + "format": "double", + "nullable": true, + "type": "number" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileDensity" + ] + } + ], + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + }, + "material_mass": { + "default": 0, + "description": "The material mass as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileDensity" + ] + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the density was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileDensity" + ] + } + ], + "description": "The status of the density." + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileMass": { + "description": "A file mass result.", + "properties": { + "completed_at": { + "description": "The time and date the mass was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the mass was created.", + "format": "partial-date-time", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileMass" + ] + } + ], + "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." + }, + "mass": { + "description": "The resulting mass.", + "format": "double", + "nullable": true, + "type": "number" + }, + "material_density": { + "default": 0, + "description": "The material density as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileMass" + ] + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the mass was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileMass" + ] + } + ], + "description": "The status of the mass." + }, + "updated_at": { + "description": "The time and date the mass was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the mass.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileOutputFormat": { + "description": "The valid types of output file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx", + "fbxb" + ], "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileDensity" - } - } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file density.", - "tags": [ - "file", - "beta" - ], - "x-go": { - "example": "// CreateDensity: Get CAD file density.\n//\n// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialMass`: The material mass.\n//\t- `srcFormat`: The format of the file.\nfileDensity, err := client.File.CreateDensity(materialMass, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateDensity" - } - } - }, - "/file/execute/{lang}": { - "post": { - "operationId": "create_file_execution", - "parameters": [ - { - "description": "The language of the code.", - "in": "path", - "name": "lang", - "required": true, - "schema": { - "$ref": "#/components/schemas/CodeLanguage" - }, - "style": "simple" - }, - { - "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", - "in": "query", - "name": "output", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "FileSourceFormat": { + "description": "The valid types of source file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx" + ], "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CodeOutput" - } - } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "FileSystemMetadata": { + "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the file system passed a sanity check.", + "type": "boolean" + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Execute a KittyCAD program in a specific language.", - "tags": [ - "file", - "hidden" - ], - "x-go": { - "example": "// CreateExecution: Execute a KittyCAD program in a specific language.\n//\n// Parameters:\n//\t- `lang`: The language of the code.\n//\t- `output`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\ncodeOutput, err := client.File.CreateExecution(lang, output, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateExecution" - } - } - }, - "/file/mass": { - "post": { - "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_mass", - "parameters": [ - { - "description": "The material density.", - "in": "query", - "name": "material_density", - "required": true, - "schema": { - "format": "float", - "type": "number" + "required": [ + "ok" + ], + "type": "object" }, - "style": "form" - }, - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "FileVolume": { + "description": "A file volume result.", + "properties": { + "completed_at": { + "description": "The time and date the volume was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the volume was created.", + "format": "partial-date-time", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileVolume" + ] + } + ], + "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileVolume" + ] + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the volume was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput", + "#/components/schemas/FileVolume" + ] + } + ], + "description": "The status of the volume." + }, + "updated_at": { + "description": "The time and date the volume was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the volume.", + "type": "string" + }, + "volume": { + "description": "The resulting volume.", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "Gateway": { + "description": "Gateway information.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the gateway.", + "format": "int64", + "type": "integer" + }, + "host": { + "default": "", + "description": "The host of the gateway.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the gateway.", + "type": "string" + }, + "port": { + "default": 0, + "description": "The port of the gateway.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the gateway.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "Invoice": { + "description": "An invoice.", + "properties": { + "amount_due": { + "default": 0, + "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "format": "int64", + "type": "integer" + }, + "amount_paid": { + "default": 0, + "description": "The amount, in %s, that was paid.", + "format": "int64", + "type": "integer" + }, + "amount_remaining": { + "default": 0, + "description": "The amount remaining, in %s, that is due.", + "format": "int64", + "type": "integer" + }, + "attempt_count": { + "default": 0, + "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "attempted": { + "default": false, + "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", + "type": "boolean" + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + } + ], + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + }, + "description": { + "description": "Description of the invoice.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice.", + "type": "string" + }, + "invoice_url": { + "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", + "type": "string" + }, + "lines": { + "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", + "items": { + "$ref": "#/components/schemas/InvoiceLineItem", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "number": { + "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", + "type": "string" + }, + "paid": { + "default": false, + "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatus", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + } + ], + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", + "nullable": true + }, + "subtotal": { + "default": 0, + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", + "format": "int64", + "type": "integer" + }, + "tax": { + "default": 0, + "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", + "format": "int64", + "type": "integer" + }, + "total": { + "default": 0, + "description": "Total after discounts and taxes.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "created_at", + "currency" + ], + "type": "object" + }, + "InvoiceLineItem": { + "description": "An invoice line item.", + "properties": { + "amount": { + "default": 0, + "description": "The amount, in %s.", + "format": "int64", + "type": "integer" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Invoice", + "#/components/schemas/InvoiceLineItem" + ] + } + ], + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + }, + "description": { + "description": "The description.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "invoice_item": { + "description": "The ID of the invoice item associated with this line item if any.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", + "type": "object" + } + }, + "required": [ + "currency" + ], + "type": "object" + }, + "InvoiceStatus": { + "description": "An enum representing the possible values of an `Invoice`'s `status` field.", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void" + ], "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileMass" - } - } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "Jetstream": { + "description": "Jetstream information.", + "properties": { + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamConfig", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ], + "default": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "description": "The Jetstream config." + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/MetaClusterInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ], + "default": { + "cluster_size": 0, + "leader": "", + "name": "" + }, + "description": "Meta information about the cluster." + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ], + "default": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + }, + "description": "Jetstream statistics." + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file mass.", - "tags": [ - "file", - "beta" - ], - "x-go": { - "example": "// CreateMass: Get CAD file mass.\n//\n// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialDensity`: The material density.\n//\t- `srcFormat`: The format of the file.\nfileMass, err := client.File.CreateMass(materialDensity, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateMass" - } - } - }, - "/file/volume": { - "post": { - "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_volume", - "parameters": [ - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "type": "object" }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "JetstreamApiStats": { + "description": "Jetstream API statistics.", + "properties": { + "errors": { + "default": 0, + "description": "The number of errors.", + "format": "int64", + "type": "integer" + }, + "inflight": { + "default": 0, + "description": "The number of inflight requests.", + "format": "int64", + "type": "integer" + }, + "total": { + "default": 0, + "description": "The number of requests.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "JetstreamConfig": { + "description": "Jetstream configuration.", + "properties": { + "domain": { + "default": "", + "description": "The domain.", + "type": "string" + }, + "max_memory": { + "default": 0, + "description": "The max memory.", + "format": "int64", + "type": "integer" + }, + "max_storage": { + "default": 0, + "description": "The max storage.", + "format": "int64", + "type": "integer" + }, + "store_dir": { + "default": "", + "description": "The store directory.", + "type": "string" + } + }, + "type": "object" + }, + "JetstreamStats": { + "description": "Jetstream statistics.", + "properties": { + "accounts": { + "default": 0, + "description": "The number of accounts.", + "format": "int64", + "type": "integer" + }, + "api": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamApiStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream", + "#/components/schemas/JetstreamStats" + ] + } + ], + "default": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "description": "API stats." + }, + "ha_assets": { + "default": 0, + "description": "The number of HA assets.", + "format": "int64", + "type": "integer" + }, + "memory": { + "default": 0, + "description": "The memory used by the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_memory": { + "default": 0, + "description": "The reserved memory for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_store": { + "default": 0, + "description": "The reserved storage for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "store": { + "default": 0, + "description": "The storage used by the Jetstream server.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "LeafNode": { + "description": "Leaf node information.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the leaf node.", + "format": "int64", + "type": "integer" + }, + "host": { + "default": "", + "description": "The host of the leaf node.", + "type": "string" + }, + "port": { + "default": 0, + "description": "The port of the leaf node.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the leaf node.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "LoginParams": { + "description": "The parameters passed to login.", + "properties": { + "session": { + "description": "The session token we should set as a cookie.", + "type": "string" + } + }, + "required": [ + "session" + ], + "type": "object" + }, + "MetaClusterInfo": { + "description": "Jetstream statistics.", + "properties": { + "cluster_size": { + "default": 0, + "description": "The size of the cluster.", + "format": "int64", + "type": "integer" + }, + "leader": { + "default": "", + "description": "The leader of the cluster.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the cluster.", + "type": "string" + } + }, + "type": "object" + }, + "Metadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our cache." + }, + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/EngineMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our engine API connection." + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "The environment we are running in." + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "allOf": [ + { + "$ref": "#/components/schemas/Connection", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our pub-sub connection." + } + }, + "required": [ + "cache", + "engine", + "environment", + "fs", + "git_hash", + "pubsub" + ], + "type": "object" + }, + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "enum": [ + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" + ], "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileVolume" - } - } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "OutputFile": { + "description": "Output file contents.", + "properties": { + "contents": { + "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the file.", + "type": "string" + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "type": "object" + }, + "PaymentIntent": { + "description": "A payment intent response.", + "properties": { + "client_secret": { + "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "type": "string" + } }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "required": [ + "client_secret" + ], + "type": "object" + }, + "PaymentMethod": { + "description": "A payment method.", + "properties": { + "billing_info": { + "allOf": [ + { + "$ref": "#/components/schemas/BillingInfo", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ], + "description": "The billing info for the payment method." + }, + "card": { + "allOf": [ + { + "$ref": "#/components/schemas/CardDetails", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ], + "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", + "nullable": true + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodType", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ], + "description": "The type of payment method." + } }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "required": [ + "billing_info", + "created_at", + "type" + ], + "type": "object" + }, + "PaymentMethodCardChecks": { + "description": "Card checks.", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + } }, - "style": "simple" - } + "type": "object" + }, + "PaymentMethodType": { + "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", + "enum": [ + "card" + ], + "type": "string" + }, + "PhoneNumber": { + "format": "phone", + "title": "String", + "type": "string" + }, + "Pong": { + "description": "The response from the `/ping` endpoint.", + "properties": { + "message": { + "description": "The pong response.", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "Session": { + "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "properties": { + "created_at": { + "description": "The date and time the session was created.", + "format": "partial-date-time", + "type": "string" + }, + "expires": { + "description": "The date and time the session expires.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier for the session.", + "type": "string" + }, + "session_token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/Session" + ] + } + ], + "description": "The session token." + }, + "updated_at": { + "description": "The date and time the session was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user that the session belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "session_token", + "updated_at" + ], + "type": "object" + }, + "StatusCode": { + "format": "int32", + "title": "int32", + "type": "integer" + }, + "UpdateUser": { + "description": "The user-modifiable parts of a User.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "phone": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/UpdateUser" + ] + } + ], + "default": "", + "description": "The user's phone number." + } + }, + "type": "object" + }, + "User": { + "description": "A user.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "format": "email", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/User" + ] + } + ], + "default": "", + "description": "The user's phone number." + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" + }, + "UserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "", + "#/components/schemas/UserResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "Uuid": { + "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", + "format": "uuid", + "type": "string" } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file volume.", - "tags": [ - "file", - "beta" - ], - "x-go": { - "example": "// CreateVolume: Get CAD file volume.\n//\n// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `srcFormat`: The format of the file.\nfileVolume, err := client.File.CreateVolume(srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateVolume" } - } }, - "/login": { - "post": { - "operationId": "login", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginParams" - } - } - }, - "required": true + "info": { + "contact": { + "email": "api@kittycad.io", + "url": "https://kittycad.io" }, - "responses": { - "204": { - "description": "resource updated", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "This endpoint sets a session cookie for a user.", - "tags": [ - "hidden" - ], + "description": "API server for KittyCAD", + "title": "KittyCAD API", + "version": "0.1.0", "x-go": { - "example": "// Login: This endpoint sets a session cookie for a user.\nif err := client.Hidden.Login(body); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.Login" + "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", + "install": "go get github.com/kittycad/kittycad.go" + }, + "x-python": { + "client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# KITTYCAD_API_TOKEN.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()", + "install": "pip install kittycad" } - } }, - "/ping": { - "get": { - "operationId": "ping", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pong" + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get_schema", + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get OpenAPI schema.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" + }, + "x-python": { + "example": "from kittycad.models import dict\nfrom kittycad.api.meta import get_schema\nfrom kittycad.types import Response\n\nfc: dict = get_schema.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[dict] = get_schema.sync_detailed(client=client)\n\n# OR run async\nfc: dict = await get_schema.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[dict] = await get_schema.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.get_schema.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Return pong.", - "tags": [ - "meta" - ], - "x-go": { - "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" + "/_meta/info": { + "get": { + "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", + "operationId": "get_metadata", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metadata", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get the metadata about our currently running server.", + "tags": [ + "meta", + "hidden" + ], + "x-go": { + "example": "// Getdata: Get the metadata about our currently running server.\n//\n// This includes information on any of our other distributed systems it is connected to.\n// You must be a KittyCAD employee to perform this request.\nmetadata, err := client.Meta.Getdata()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata" + }, + "x-python": { + "example": "from kittycad.models import Metadata\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.types import Response\n\nfc: Metadata = get_metadata.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Metadata] = get_metadata.sync_detailed(client=client)\n\n# OR run async\nfc: Metadata = await get_metadata.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Metadata] = await get_metadata.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.get_metadata.html" + } + } + }, + "/api-call-metrics": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "description": "What field to group the metrics by.", + "in": "query", + "name": "group_by", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup", + "x-scope": [ + "" + ] + }, + "title": "Array_of_ApiCallQueryGroup", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get API call metrics.", + "tags": [ + "api-calls", + "hidden" + ], + "x-go": { + "example": "// GetMetrics: Get API call metrics.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters:\n//\t- `groupBy`: What field to group the metrics by.\nAPICallQueryGroup, err := client.APICall.GetMetrics(groupBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" + }, + "x-python": { + "example": "from kittycad.models import [ApiCallQueryGroup]\nfrom kittycad.api.api-calls import get_api_call_metrics\nfrom kittycad.types import Response\n\nfc: [ApiCallQueryGroup] = get_api_call_metrics.sync(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[ApiCallQueryGroup]] = get_api_call_metrics.sync_detailed(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR run async\nfc: [ApiCallQueryGroup] = await get_api_call_metrics.asyncio(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR run async with more info\nresponse: Response[[ApiCallQueryGroup]] = await get_api_call_metrics.asyncio_detailed(client=client, group_by=ApiCallQueryGroupBy)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call_metrics.html" + } + } + }, + "/api-calls": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import list_api_calls\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = list_api_calls.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = list_api_calls.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await list_api_calls.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await list_api_calls.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_api_calls.html" + } + } + }, + "/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "operationId": "get_api_call", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get details of an API call.", + "tags": [ + "api-calls", + "hidden" + ], + "x-go": { + "example": "// Get: Get details of an API call.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n// If the user is not authenticated to view the specified API call, then it is not returned.\n// Only KittyCAD employees can view API calls for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPrice\nfrom kittycad.api.api-calls import get_api_call\nfrom kittycad.types import Response\n\nfc: ApiCallWithPrice = get_api_call.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPrice] = get_api_call.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ApiCallWithPrice = await get_api_call.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPrice] = await get_api_call.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call.html" + } + } + }, + "/async/operations": { + "get": { + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_async_operations", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + }, + { + "description": "The status to filter by.", + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/APICallStatus", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List async operations.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListAsyncOperations: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListAsyncOperationsAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nasyncAPICallResultsPage, err := client.APICall.ListAsyncOperations(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListAsyncOperationsAllPages: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListAsyncOperations` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nAsyncAPICall, err := client.APICall.ListAsyncOperationsAllPages(sortBy, status)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListAsyncOperations" + }, + "x-python": { + "example": "from kittycad.models import AsyncApiCallResultsPage\nfrom kittycad.api.api-calls import list_async_operations\nfrom kittycad.types import Response\n\nfc: AsyncApiCallResultsPage = list_async_operations.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=APICallStatus)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[AsyncApiCallResultsPage] = list_async_operations.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=APICallStatus)\n\n# OR run async\nfc: AsyncApiCallResultsPage = await list_async_operations.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=APICallStatus)\n\n# OR run async with more info\nresponse: Response[AsyncApiCallResultsPage] = await list_async_operations.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=APICallStatus)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_async_operations.html" + } + } + }, + "/async/operations/{id}": { + "get": { + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", + "operationId": "get_async_operation", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get an async operation.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetAsyncOperation: Get an async operation.\n//\n// Get the status and output of an async operation.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n// If the user is not authenticated to view the specified async operation, then it is not returned.\n// Only KittyCAD employees with the proper access can view async operations for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.APICall.GetAsyncOperation(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetAsyncOperation" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.api-calls import get_async_operation\nfrom kittycad.types import Response\n\nfc: FileConversion = get_async_operation.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_async_operation.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_async_operation.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await get_async_operation.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_async_operation.html" + } + } + }, + "/file/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileOutputFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversion", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Convert CAD file.", + "tags": [ + "file" + ], + "x-go": { + "example": "// CreateConversion: Convert CAD file.\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversion, err := client.File.CreateConversion(outputFormat, srcFormat, body)\n\n// - OR -\n\n// CreateConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the CreateConversion function.\nfileConversion, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import create_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = create_file_conversion_with_base64_helper.sync(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = create_file_conversion_with_base64_helper.sync_detailed(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileConversion = await create_file_conversion_with_base64_helper.asyncio(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await create_file_conversion_with_base64_helper.asyncio_detailed(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_conversion_with_base64_helper.html" + } + } + }, + "/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", + "operationId": "get_file_conversion", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a file conversion.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversion: Get a file conversion.\n//\n// Get the status and output of an async file conversion.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n// If the user is not authenticated to view the specified file conversion, then it is not returned.\n// Only KittyCAD employees with the proper access can view file conversions for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.File.GetConversion(id)\n\n// - OR -\n\n// GetConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the GetConversion function.\nasyncAPICallOutput, err := client.File.GetConversionWithBase64Helper(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import get_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = get_file_conversion_with_base64_helper.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_file_conversion_with_base64_helper.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_file_conversion_with_base64_helper.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await get_file_conversion_with_base64_helper.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.get_file_conversion_with_base64_helper.html" + } + } + }, + "/file/density": { + "post": { + "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_density", + "parameters": [ + { + "description": "The material mass.", + "in": "query", + "name": "material_mass", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + }, + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileDensity", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get CAD file density.", + "tags": [ + "file", + "beta" + ], + "x-go": { + "example": "// CreateDensity: Get CAD file density.\n//\n// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialMass`: The material mass.\n//\t- `srcFormat`: The format of the file.\nfileDensity, err := client.File.CreateDensity(materialMass, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateDensity" + }, + "x-python": { + "example": "from kittycad.models import FileDensity\nfrom kittycad.api.file import create_file_density\nfrom kittycad.types import Response\n\nfc: FileDensity = create_file_density.sync(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileDensity] = create_file_density.sync_detailed(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileDensity = await create_file_density.asyncio(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileDensity] = await create_file_density.asyncio_detailed(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_density.html" + } + } + }, + "/file/execute/{lang}": { + "post": { + "operationId": "create_file_execution", + "parameters": [ + { + "description": "The language of the code.", + "in": "path", + "name": "lang", + "required": true, + "schema": { + "$ref": "#/components/schemas/CodeLanguage", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", + "in": "query", + "name": "output", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodeOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Execute a KittyCAD program in a specific language.", + "tags": [ + "file", + "hidden" + ], + "x-go": { + "example": "// CreateExecution: Execute a KittyCAD program in a specific language.\n//\n// Parameters:\n//\t- `lang`: The language of the code.\n//\t- `output`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\ncodeOutput, err := client.File.CreateExecution(lang, output, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateExecution" + }, + "x-python": { + "example": "from kittycad.models import CodeOutput\nfrom kittycad.api.file import create_file_execution\nfrom kittycad.types import Response\n\nfc: CodeOutput = create_file_execution.sync(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[CodeOutput] = create_file_execution.sync_detailed(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR run async\nfc: CodeOutput = await create_file_execution.asyncio(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR run async with more info\nresponse: Response[CodeOutput] = await create_file_execution.asyncio_detailed(client=client, lang=CodeLanguage, output=, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_execution.html" + } + } + }, + "/file/mass": { + "post": { + "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_mass", + "parameters": [ + { + "description": "The material density.", + "in": "query", + "name": "material_density", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + }, + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileMass", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get CAD file mass.", + "tags": [ + "file", + "beta" + ], + "x-go": { + "example": "// CreateMass: Get CAD file mass.\n//\n// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialDensity`: The material density.\n//\t- `srcFormat`: The format of the file.\nfileMass, err := client.File.CreateMass(materialDensity, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateMass" + }, + "x-python": { + "example": "from kittycad.models import FileMass\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.types import Response\n\nfc: FileMass = create_file_mass.sync(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileMass] = create_file_mass.sync_detailed(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileMass = await create_file_mass.asyncio(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileMass] = await create_file_mass.asyncio_detailed(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_mass.html" + } + } + }, + "/file/volume": { + "post": { + "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_volume", + "parameters": [ + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileVolume", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get CAD file volume.", + "tags": [ + "file", + "beta" + ], + "x-go": { + "example": "// CreateVolume: Get CAD file volume.\n//\n// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `srcFormat`: The format of the file.\nfileVolume, err := client.File.CreateVolume(srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateVolume" + }, + "x-python": { + "example": "from kittycad.models import FileVolume\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.types import Response\n\nfc: FileVolume = create_file_volume.sync(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileVolume] = create_file_volume.sync_detailed(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileVolume = await create_file_volume.asyncio(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileVolume] = await create_file_volume.asyncio_detailed(client=client, src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_volume.html" + } + } + }, + "/login": { + "post": { + "operationId": "login", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginParams", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "This endpoint sets a session cookie for a user.", + "tags": [ + "hidden" + ], + "x-go": { + "example": "// Login: This endpoint sets a session cookie for a user.\nif err := client.Hidden.Login(body); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.Login" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.hidden import login\nfrom kittycad.types import Response\n\nfc: Error = login.sync(client=client, body=LoginParams)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = login.sync_detailed(client=client, body=LoginParams)\n\n# OR run async\nfc: Error = await login.asyncio(client=client, body=LoginParams)\n\n# OR run async with more info\nresponse: Response[Error] = await login.asyncio_detailed(client=client, body=LoginParams)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.hidden.login.html" + } + } + }, + "/ping": { + "get": { + "operationId": "ping", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Return pong.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" + }, + "x-python": { + "example": "from kittycad.models import Pong\nfrom kittycad.api.meta import ping\nfrom kittycad.types import Response\n\nfc: Pong = ping.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Pong] = ping.sync_detailed(client=client)\n\n# OR run async\nfc: Pong = await ping.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Pong] = await ping.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.ping.html" + } + } + }, + "/user": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelf: Get your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nuser, err := client.User.GetSelf()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelf" + }, + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import get_user_self\nfrom kittycad.types import Response\n\nfc: User = get_user_self.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = get_user_self.sync_detailed(client=client)\n\n# OR run async\nfc: User = await get_user_self.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[User] = await get_user_self.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_self.html" + } + }, + "options": { + "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", + "operationId": "options_user_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "enum": [ + null + ], + "title": "Null", + "type": "string" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "OPTIONS endpoint for users.", + "tags": [ + "hidden" + ] + }, + "put": { + "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", + "operationId": "update_user_self", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUser", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Update your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// UpdateSelf: Update your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\nuser, err := client.User.UpdateSelf(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf" + }, + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import update_user_self\nfrom kittycad.types import Response\n\nfc: User = update_user_self.sync(client=client, body=UpdateUser)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = update_user_self.sync_detailed(client=client, body=UpdateUser)\n\n# OR run async\nfc: User = await update_user_self.asyncio(client=client, body=UpdateUser)\n\n# OR run async with more info\nresponse: Response[User] = await update_user_self.asyncio_detailed(client=client, body=UpdateUser)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.update_user_self.html" + } + } + }, + "/user/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "user_list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls for your user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// UserList: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `UserListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.UserList(limit, pageToken, sortBy)\n\n// - OR -\n\n// UserListAllPages: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `UserList` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.UserListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import user_list_api_calls\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = user_list_api_calls.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = user_list_api_calls.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await user_list_api_calls.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await user_list_api_calls.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.user_list_api_calls.html" + } + } + }, + "/user/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", + "operationId": "get_api_call_for_user", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get an API call for a user.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetForUser: Get an API call for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.GetForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPrice\nfrom kittycad.api.api-calls import get_api_call_for_user\nfrom kittycad.types import Response\n\nfc: ApiCallWithPrice = get_api_call_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPrice] = get_api_call_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ApiCallWithPrice = await get_api_call_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPrice] = await get_api_call_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call_for_user.html" + } + } + }, + "/user/api-tokens": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", + "operationId": "list_api_tokens_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API tokens for your user.", + "tags": [ + "api-tokens" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPITokenResultsPage, err := client.APIToken.ListForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPIToken, err := client.APIToken.ListForUserAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiTokenResultsPage\nfrom kittycad.api.api-tokens import list_api_tokens_for_user\nfrom kittycad.types import Response\n\nfc: ApiTokenResultsPage = list_api_tokens_for_user.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiTokenResultsPage] = list_api_tokens_for_user.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiTokenResultsPage = await list_api_tokens_for_user.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiTokenResultsPage] = await list_api_tokens_for_user.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.list_api_tokens_for_user.html" + } + }, + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", + "operationId": "create_api_token_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Create a new API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// CreateForUser: Create a new API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\naPIToken, err := client.APIToken.CreateForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiToken\nfrom kittycad.api.api-tokens import create_api_token_for_user\nfrom kittycad.types import Response\n\nfc: ApiToken = create_api_token_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiToken] = create_api_token_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: ApiToken = await create_api_token_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[ApiToken] = await create_api_token_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.create_api_token_for_user.html" + } + } + }, + "/user/api-tokens/{token}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "operationId": "delete_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Delete an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// DeleteForUser: Delete an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters:\n//\t- `token`: The API token.\nif err := client.APIToken.DeleteForUser(token); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.api-tokens import delete_api_token_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_api_token_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_api_token_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: Error = await delete_api_token_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[Error] = await delete_api_token_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.delete_api_token_for_user.html" + } + }, + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// GetForUser: Get an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\naPIToken, err := client.APIToken.GetForUser(token)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiToken\nfrom kittycad.api.api-tokens import get_api_token_for_user\nfrom kittycad.types import Response\n\nfc: ApiToken = get_api_token_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiToken] = get_api_token_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: ApiToken = await get_api_token_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[ApiToken] = await get_api_token_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.get_api_token_for_user.html" + } + }, + "options": { + "description": "This is necessary for some preflight requests, specifically DELETE.", + "operationId": "options_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "enum": [ + null + ], + "title": "Null", + "type": "string" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "OPTIONS endpoint for API tokens.", + "tags": [ + "hidden" + ] + } + }, + "/user/extended": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get extended information about your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelfExtended: Get extended information about your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUser\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUser = get_user_self_extended.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUser] = get_user_self_extended.sync_detailed(client=client)\n\n# OR run async\nfc: ExtendedUser = await get_user_self_extended.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[ExtendedUser] = await get_user_self_extended.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_self_extended.html" + } + } + }, + "/user/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", + "operationId": "get_file_conversion_for_user", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a file conversion for your user.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversionForUser: Get a file conversion for your user.\n//\n// Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.File.GetConversionForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import get_file_conversion_for_user\nfrom kittycad.types import Response\n\nfc: FileConversion = get_file_conversion_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_file_conversion_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_file_conversion_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await get_file_conversion_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.get_file_conversion_for_user.html" + } + } + }, + "/user/payment": { + "delete": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", + "operationId": "delete_payment_information_for_user", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Delete payment info for your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// DeleteInformationForUser: Delete payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\nif err := client.Payment.DeleteInformationForUser(); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteInformationForUser" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_payment_information_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_payment_information_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: Error = await delete_payment_information_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Error] = await delete_payment_information_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.delete_payment_information_for_user.html" + } + }, + "get": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", + "operationId": "get_payment_information_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get payment info about your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// GetInformationForUser: Get payment info about your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\ncustomer, err := client.Payment.GetInformationForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetInformationForUser" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = get_payment_information_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = get_payment_information_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: Customer = await get_payment_information_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Customer] = await get_payment_information_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.get_payment_information_for_user.html" + } + }, + "options": { + "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", + "operationId": "options_payment_information_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "enum": [ + null + ], + "title": "Null", + "type": "string" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "OPTIONS endpoint for user payment information.", + "tags": [ + "hidden" + ] + }, + "post": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD 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", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Create payment info for your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// CreateInformationForUser: Create payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\ncustomer, err := client.Payment.CreateInformationForUser(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = create_payment_information_for_user.sync(client=client, body=BillingInfo)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = create_payment_information_for_user.sync_detailed(client=client, body=BillingInfo)\n\n# OR run async\nfc: Customer = await create_payment_information_for_user.asyncio(client=client, body=BillingInfo)\n\n# OR run async with more info\nresponse: Response[Customer] = await create_payment_information_for_user.asyncio_detailed(client=client, body=BillingInfo)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.create_payment_information_for_user.html" + } + }, + "put": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD 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", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Update payment info for your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// UpdateInformationForUser: Update payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\ncustomer, err := client.Payment.UpdateInformationForUser(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = update_payment_information_for_user.sync(client=client, body=BillingInfo)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = update_payment_information_for_user.sync_detailed(client=client, body=BillingInfo)\n\n# OR run async\nfc: Customer = await update_payment_information_for_user.asyncio(client=client, body=BillingInfo)\n\n# OR run async with more info\nresponse: Response[Customer] = await update_payment_information_for_user.asyncio_detailed(client=client, body=BillingInfo)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.update_payment_information_for_user.html" + } + } + }, + "/user/payment/intent": { + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", + "operationId": "create_payment_intent_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Create a payment intent for your user.", + "tags": [ + "payments", + "hidden" + ], + "x-go": { + "example": "// CreateIntentForUser: Create a payment intent for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\npaymentIntent, err := client.Payment.CreateIntentForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateIntentForUser" + }, + "x-python": { + "example": "from kittycad.models import PaymentIntent\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.types import Response\n\nfc: PaymentIntent = create_payment_intent_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[PaymentIntent] = create_payment_intent_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: PaymentIntent = await create_payment_intent_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[PaymentIntent] = await create_payment_intent_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.create_payment_intent_for_user.html" + } + } + }, + "/user/payment/invoices": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", + "operationId": "list_invoices_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Invoice", + "x-scope": [ + "" + ] + }, + "title": "Array_of_Invoice", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List invoices for your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// ListInvoicesForUser: List invoices for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nInvoice, err := client.Payment.ListInvoicesForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListInvoicesForUser" + }, + "x-python": { + "example": "from kittycad.models import [Invoice]\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.types import Response\n\nfc: [Invoice] = list_invoices_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[Invoice]] = list_invoices_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: [Invoice] = await list_invoices_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[Invoice]] = await list_invoices_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.list_invoices_for_user.html" + } + } + }, + "/user/payment/methods": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", + "operationId": "list_payment_methods_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentMethod", + "x-scope": [ + "" + ] + }, + "title": "Array_of_PaymentMethod", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List payment methods for your user.", + "tags": [ + "payments" + ], + "x-go": { + "example": "// ListMethodsForUser: List payment methods for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nPaymentMethod, err := client.Payment.ListMethodsForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListMethodsForUser" + }, + "x-python": { + "example": "from kittycad.models import [PaymentMethod]\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.types import Response\n\nfc: [PaymentMethod] = list_payment_methods_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[PaymentMethod]] = list_payment_methods_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: [PaymentMethod] = await list_payment_methods_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[PaymentMethod]] = await list_payment_methods_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.list_payment_methods_for_user.html" + } + } + }, + "/user/payment/methods/{id}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", + "operationId": "delete_payment_method_for_user", + "parameters": [ + { + "description": "The ID of the payment method.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Delete a payment method for your user.", + "tags": [ + "payments", + "hidden" + ], + "x-go": { + "example": "// DeleteMethodForUser: Delete a payment method for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n//\n// Parameters:\n//\t- `id`: The ID of the payment method.\nif err := client.Payment.DeleteMethodForUser(id); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteMethodForUser" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_payment_method_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_payment_method_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: Error = await delete_payment_method_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[Error] = await delete_payment_method_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.delete_payment_method_for_user.html" + } + }, + "options": { + "description": "This is necessary for some preflight requests, specifically DELETE.", + "operationId": "options_payment_methods_for_user", + "parameters": [ + { + "description": "The ID of the payment method.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "enum": [ + null + ], + "title": "Null", + "type": "string" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "OPTIONS endpoint for user payment methods.", + "tags": [ + "hidden" + ] + } + }, + "/user/session/{token}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_session_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a session for your user.", + "tags": [ + "sessions" + ], + "x-go": { + "example": "// GetForUser: Get a session for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\nsession, err := client.Session.GetForUser(token)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#SessionService.GetForUser" + }, + "x-python": { + "example": "from kittycad.models import Session\nfrom kittycad.api.sessions import get_session_for_user\nfrom kittycad.types import Response\n\nfc: Session = get_session_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Session] = get_session_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: Session = await get_session_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[Session] = await get_session_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.sessions.get_session_for_user.html" + } + } + }, + "/users": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List users.", + "tags": [ + "users", + "hidden" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\nuserResultsPage, err := client.User.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nUser, err := client.User.ListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" + }, + "x-python": { + "example": "from kittycad.models import UserResultsPage\nfrom kittycad.api.users import list_users\nfrom kittycad.types import Response\n\nfc: UserResultsPage = list_users.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[UserResultsPage] = list_users.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: UserResultsPage = await list_users.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[UserResultsPage] = await list_users.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.list_users.html" + } + } + }, + "/users-extended": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUserResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List users with extended information.", + "tags": [ + "users", + "hidden" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListExtended: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListExtendedAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\nextendedUserResultsPage, err := client.User.ListExtended(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListExtendedAllPages: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `ListExtended` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nExtendedUser, err := client.User.ListExtendedAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUserResultsPage\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUserResultsPage = list_users_extended.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUserResultsPage] = list_users_extended.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ExtendedUserResultsPage = await list_users_extended.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ExtendedUserResultsPage] = await list_users_extended.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.list_users_extended.html" + } + } + }, + "/users-extended/{id}": { + "get": { + "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.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user_extended", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get extended information about a user.", + "tags": [ + "users", + "hidden" + ], + "x-go": { + "example": "// GetExtended: Get extended information about a user.\n//\n// 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// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nextendedUser, err := client.User.GetExtended(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUser\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUser = get_user_extended.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUser] = get_user_extended.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ExtendedUser = await get_user_extended.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ExtendedUser] = await get_user_extended.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_extended.html" + } + } + }, + "/users/{id}": { + "get": { + "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.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a user.", + "tags": [ + "users", + "hidden" + ], + "x-go": { + "example": "// Get: Get a user.\n//\n// 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// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nuser, err := client.User.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" + }, + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import get_user\nfrom kittycad.types import Response\n\nfc: User = get_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = get_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: User = await get_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[User] = await get_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user.html" + } + } + }, + "/users/{id}/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls for a user.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.ListForUser(id, limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListForUserAllPages(id , sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import list_api_calls_for_user\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = list_api_calls_for_user.sync(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = list_api_calls_for_user.sync_detailed(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await list_api_calls_for_user.asyncio(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await list_api_calls_for_user.asyncio_detailed(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_api_calls_for_user.html" + } + } } - } }, - "/user": { - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + "tags": [ + { + "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-calls" }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "name": "api-calls" }, - "summary": "Get your user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// GetSelf: Get your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nuser, err := client.User.GetSelf()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelf" + { + "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-tokens" + }, + "name": "api-tokens" + }, + { + "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/beta" + }, + "name": "beta" + }, + { + "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + }, + "name": "file" + }, + { + "description": "Hidden API endpoints that should not show up in the docs.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/hidden" + }, + "name": "hidden" + }, + { + "description": "Meta information about the API.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/meta" + }, + "name": "meta" + }, + { + "description": "Operations around payments and billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/payments" + }, + "name": "payments" + }, + { + "description": "Sessions allow users to call the API from their session cookie in the browser.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/sessions" + }, + "name": "sessions" + }, + { + "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/users" + }, + "name": "users" } - }, - "options": { - "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", - "operationId": "options_user_self", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "enum": [ - null - ], - "title": "Null", - "type": "string" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint for users.", - "tags": [ - "hidden" - ] - }, - "put": { - "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", - "operationId": "update_user_self", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUser" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Update your user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// UpdateSelf: Update your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\nuser, err := client.User.UpdateSelf(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf" - } - } - }, - "/user/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "user_list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls for your user.", - "tags": [ - "api-calls" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// UserList: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `UserListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.UserList(limit, pageToken, sortBy)\n\n// - OR -\n\n// UserListAllPages: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `UserList` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.UserListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" - } - } - }, - "/user/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", - "operationId": "get_api_call_for_user", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an API call for a user.", - "tags": [ - "api-calls" - ], - "x-go": { - "example": "// GetForUser: Get an API call for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.GetForUser(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" - } - } - }, - "/user/api-tokens": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", - "operationId": "list_api_tokens_for_user", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiTokenResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API tokens for your user.", - "tags": [ - "api-tokens" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListForUser: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPITokenResultsPage, err := client.APIToken.ListForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPIToken, err := client.APIToken.ListForUserAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" - } - }, - "post": { - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", - "operationId": "create_api_token_for_user", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create a new API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// CreateForUser: Create a new API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\naPIToken, err := client.APIToken.CreateForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" - } - } - }, - "/user/api-tokens/{token}": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", - "operationId": "delete_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete an API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// DeleteForUser: Delete an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters:\n//\t- `token`: The API token.\nif err := client.APIToken.DeleteForUser(token); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" - } - }, - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// GetForUser: Get an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\naPIToken, err := client.APIToken.GetForUser(token)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" - } - }, - "options": { - "description": "This is necessary for some preflight requests, specifically DELETE.", - "operationId": "options_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "enum": [ - null - ], - "title": "Null", - "type": "string" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint for API tokens.", - "tags": [ - "hidden" - ] - } - }, - "/user/extended": { - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self_extended", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get extended information about your user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// GetSelfExtended: Get extended information about your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" - } - } - }, - "/user/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", - "operationId": "get_file_conversion_for_user", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a file conversion for your user.", - "tags": [ - "file" - ], - "x-go": { - "example": "// GetConversionForUser: Get a file conversion for your user.\n//\n// Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.File.GetConversionForUser(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" - } - } - }, - "/user/payment": { - "delete": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", - "operationId": "delete_payment_information_for_user", - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete payment info for your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// DeleteInformationForUser: Delete payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\nif err := client.Payment.DeleteInformationForUser(); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteInformationForUser" - } - }, - "get": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", - "operationId": "get_payment_information_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get payment info about your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// GetInformationForUser: Get payment info about your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\ncustomer, err := client.Payment.GetInformationForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetInformationForUser" - } - }, - "options": { - "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", - "operationId": "options_payment_information_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "enum": [ - null - ], - "title": "Null", - "type": "string" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint for user payment information.", - "tags": [ - "hidden" - ] - }, - "post": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD 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": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create payment info for your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// CreateInformationForUser: Create payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\ncustomer, err := client.Payment.CreateInformationForUser(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser" - } - }, - "put": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD 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": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Update payment info for your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// UpdateInformationForUser: Update payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\ncustomer, err := client.Payment.UpdateInformationForUser(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser" - } - } - }, - "/user/payment/intent": { - "post": { - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", - "operationId": "create_payment_intent_for_user", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentIntent" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create a payment intent for your user.", - "tags": [ - "payments", - "hidden" - ], - "x-go": { - "example": "// CreateIntentForUser: Create a payment intent for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\npaymentIntent, err := client.Payment.CreateIntentForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateIntentForUser" - } - } - }, - "/user/payment/invoices": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", - "operationId": "list_invoices_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Invoice" - }, - "title": "Array_of_Invoice", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List invoices for your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// ListInvoicesForUser: List invoices for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nInvoice, err := client.Payment.ListInvoicesForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListInvoicesForUser" - } - } - }, - "/user/payment/methods": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", - "operationId": "list_payment_methods_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PaymentMethod" - }, - "title": "Array_of_PaymentMethod", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List payment methods for your user.", - "tags": [ - "payments" - ], - "x-go": { - "example": "// ListMethodsForUser: List payment methods for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nPaymentMethod, err := client.Payment.ListMethodsForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListMethodsForUser" - } - } - }, - "/user/payment/methods/{id}": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", - "operationId": "delete_payment_method_for_user", - "parameters": [ - { - "description": "The ID of the payment method.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete a payment method for your user.", - "tags": [ - "payments", - "hidden" - ], - "x-go": { - "example": "// DeleteMethodForUser: Delete a payment method for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n//\n// Parameters:\n//\t- `id`: The ID of the payment method.\nif err := client.Payment.DeleteMethodForUser(id); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteMethodForUser" - } - }, - "options": { - "description": "This is necessary for some preflight requests, specifically DELETE.", - "operationId": "options_payment_methods_for_user", - "parameters": [ - { - "description": "The ID of the payment method.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "enum": [ - null - ], - "title": "Null", - "type": "string" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint for user payment methods.", - "tags": [ - "hidden" - ] - } - }, - "/user/session/{token}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_session_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a session for your user.", - "tags": [ - "sessions" - ], - "x-go": { - "example": "// GetForUser: Get a session for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\nsession, err := client.Session.GetForUser(token)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#SessionService.GetForUser" - } - } - }, - "/users": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List users.", - "tags": [ - "users", - "hidden" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// List: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\nuserResultsPage, err := client.User.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nUser, err := client.User.ListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" - } - } - }, - "/users-extended": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users_extended", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List users with extended information.", - "tags": [ - "users", - "hidden" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListExtended: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListExtendedAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\nextendedUserResultsPage, err := client.User.ListExtended(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListExtendedAllPages: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `ListExtended` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nExtendedUser, err := client.User.ListExtendedAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" - } - } - }, - "/users-extended/{id}": { - "get": { - "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.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user_extended", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get extended information about a user.", - "tags": [ - "users", - "hidden" - ], - "x-go": { - "example": "// GetExtended: Get extended information about a user.\n//\n// 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// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nextendedUser, err := client.User.GetExtended(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" - } - } - }, - "/users/{id}": { - "get": { - "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.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a user.", - "tags": [ - "users", - "hidden" - ], - "x-go": { - "example": "// Get: Get a user.\n//\n// 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// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nuser, err := client.User.Get(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" - } - } - }, - "/users/{id}/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls_for_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls for a user.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListForUser: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retrieve the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.ListForUser(id, limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListForUserAllPages(id , sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" - } - } - } - }, - "tags": [ - { - "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-calls" - }, - "name": "api-calls" - }, - { - "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-tokens" - }, - "name": "api-tokens" - }, - { - "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/beta" - }, - "name": "beta" - }, - { - "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/file" - }, - "name": "file" - }, - { - "description": "Hidden API endpoints that should not show up in the docs.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/hidden" - }, - "name": "hidden" - }, - { - "description": "Meta information about the API.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/meta" - }, - "name": "meta" - }, - { - "description": "Operations around payments and billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/payments" - }, - "name": "payments" - }, - { - "description": "Sessions allow users to call the API from their session cookie in the browser.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/sessions" - }, - "name": "sessions" - }, - { - "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/users" - }, - "name": "users" - } - ] + ] } \ No newline at end of file