UNPKG

@loopback/docs

Version:
1,057 lines (1,056 loc) 33.6 kB
{ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "7.7.10", "schemaVersion": 1003, "oldestForwardsCompatibleVersion": 1001 }, "kind": "Package", "canonicalReference": "@loopback/rest-crud!", "docComment": "", "name": "@loopback/rest-crud", "members": [ { "kind": "EntryPoint", "canonicalReference": "@loopback/rest-crud!", "name": "", "members": [ { "kind": "Class", "canonicalReference": "@loopback/rest-crud!CrudRestApiBuilder:class", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export declare class CrudRestApiBuilder implements " }, { "kind": "Reference", "text": "ModelApiBuilder", "canonicalReference": "@loopback/model-api-builder!ModelApiBuilder:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "CrudRestApiBuilder", "members": [ { "kind": "Method", "canonicalReference": "@loopback/rest-crud!CrudRestApiBuilder#build:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "build(application: " }, { "kind": "Reference", "text": "ApplicationWithRepositories", "canonicalReference": "@loopback/repository!ApplicationWithRepositories:interface" }, { "kind": "Content", "text": ", modelClass: " }, { "kind": "Content", "text": "typeof " }, { "kind": "Reference", "text": "Model", "canonicalReference": "@loopback/repository!Model:class" }, { "kind": "Content", "text": " & {\n prototype: " }, { "kind": "Reference", "text": "Model", "canonicalReference": "@loopback/repository!Model:class" }, { "kind": "Content", "text": ";\n }" }, { "kind": "Content", "text": ", cfg: " }, { "kind": "Reference", "text": "ModelApiConfig", "canonicalReference": "@loopback/model-api-builder!ModelApiConfig:type" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "Promise", "canonicalReference": "!Promise:interface" }, { "kind": "Content", "text": "<void>" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 11, "endIndex": 13 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "application", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } }, { "parameterName": "modelClass", "parameterTypeTokenRange": { "startIndex": 3, "endIndex": 8 } }, { "parameterName": "cfg", "parameterTypeTokenRange": { "startIndex": 9, "endIndex": 10 } } ], "name": "build" }, { "kind": "Property", "canonicalReference": "@loopback/rest-crud!CrudRestApiBuilder#pattern:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly pattern: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "pattern", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false } ], "implementsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Class", "canonicalReference": "@loopback/rest-crud!CrudRestComponent:class", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export declare class CrudRestComponent implements " }, { "kind": "Reference", "text": "Component", "canonicalReference": "@loopback/core!Component:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "CrudRestComponent", "members": [ { "kind": "Property", "canonicalReference": "@loopback/rest-crud!CrudRestComponent#bindings:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "bindings: " }, { "kind": "Content", "text": "import(\"@loopback/core\")." }, { "kind": "Reference", "text": "Binding", "canonicalReference": "@loopback/context!Binding:class" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "CrudRestApiBuilder", "canonicalReference": "@loopback/rest-crud!CrudRestApiBuilder:class" }, { "kind": "Content", "text": ">[]" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "bindings", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 6 }, "isStatic": false } ], "implementsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/rest-crud!CrudRestController:interface", "docComment": "/**\n * This interface describes prototype members of the controller class returned by `defineCrudRestController`.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface CrudRestController<T extends " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": ", IdType, IdName extends " }, { "kind": "Content", "text": "keyof T" }, { "kind": "Content", "text": ", Relations extends " }, { "kind": "Content", "text": "object " }, { "kind": "Content", "text": "= " }, { "kind": "Content", "text": "{}" }, { "kind": "Content", "text": "> " } ], "releaseTag": "Public", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdType", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdName", "constraintTokenRange": { "startIndex": 3, "endIndex": 4 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "Relations", "constraintTokenRange": { "startIndex": 5, "endIndex": 6 }, "defaultTypeTokenRange": { "startIndex": 7, "endIndex": 8 } } ], "name": "CrudRestController", "members": [ { "kind": "MethodSignature", "canonicalReference": "@loopback/rest-crud!CrudRestController#create:member(1)", "docComment": "/**\n * Implementation of the endpoint `POST /`.\n *\n * @param - data Model data\n */\n", "excerptTokens": [ { "kind": "Content", "text": "create(data: " }, { "kind": "Reference", "text": "Omit", "canonicalReference": "!Omit:type" }, { "kind": "Content", "text": "<T, IdName>" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "Promise", "canonicalReference": "!Promise:interface" }, { "kind": "Content", "text": "<T>" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 4, "endIndex": 6 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "data", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ], "name": "create" }, { "kind": "PropertySignature", "canonicalReference": "@loopback/rest-crud!CrudRestController#repository:member", "docComment": "/**\n * The backing repository used to access & modify model data.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "readonly repository: " }, { "kind": "Reference", "text": "EntityCrudRepository", "canonicalReference": "@loopback/repository!EntityCrudRepository:interface" }, { "kind": "Content", "text": "<T, IdType>" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "repository", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ], "extendsTokenRanges": [] }, { "kind": "Interface", "canonicalReference": "@loopback/rest-crud!CrudRestControllerCtor:interface", "docComment": "/**\n * Constructor of the controller class returned by `defineCrudRestController`.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface CrudRestControllerCtor<T extends " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": ", IdType, IdName extends " }, { "kind": "Content", "text": "keyof T" }, { "kind": "Content", "text": ", Relations extends " }, { "kind": "Content", "text": "object " }, { "kind": "Content", "text": "= " }, { "kind": "Content", "text": "{}" }, { "kind": "Content", "text": "> " } ], "releaseTag": "Public", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdType", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdName", "constraintTokenRange": { "startIndex": 3, "endIndex": 4 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "Relations", "constraintTokenRange": { "startIndex": 5, "endIndex": 6 }, "defaultTypeTokenRange": { "startIndex": 7, "endIndex": 8 } } ], "name": "CrudRestControllerCtor", "members": [ { "kind": "ConstructSignature", "canonicalReference": "@loopback/rest-crud!CrudRestControllerCtor:new(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "new (repository: " }, { "kind": "Reference", "text": "EntityCrudRepository", "canonicalReference": "@loopback/repository!EntityCrudRepository:interface" }, { "kind": "Content", "text": "<T, IdType, Relations>" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "CrudRestController", "canonicalReference": "@loopback/rest-crud!CrudRestController:interface" }, { "kind": "Content", "text": "<T, IdType, IdName, Relations>" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 4, "endIndex": 6 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "repository", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ] } ], "extendsTokenRanges": [] }, { "kind": "Interface", "canonicalReference": "@loopback/rest-crud!CrudRestControllerOptions:interface", "docComment": "/**\n * Options to configure different aspects of a CRUD REST Controller.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface CrudRestControllerOptions " } ], "releaseTag": "Public", "name": "CrudRestControllerOptions", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/rest-crud!CrudRestControllerOptions#basePath:member", "docComment": "/**\n * The base path where to \"mount\" the controller.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "basePath: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "basePath", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "extendsTokenRanges": [] }, { "kind": "Function", "canonicalReference": "@loopback/rest-crud!defineCrudRepositoryClass:function(1)", "docComment": "/**\n * Create (define) a repository class for the given model.\n *\n * @param - modelCtor A model class, e.g. `Product`.\n *\n * @example\n * ```ts\n * const ProductRepository = defineCrudRepositoryClass(Product);\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function defineCrudRepositoryClass<T extends " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": ", IdType, Relations extends " }, { "kind": "Content", "text": "object " }, { "kind": "Content", "text": "= " }, { "kind": "Content", "text": "{}" }, { "kind": "Content", "text": ">(entityClass: " }, { "kind": "Content", "text": "typeof " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": " & {\n prototype: T;\n}" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "RepositoryClass", "canonicalReference": "@loopback/rest-crud!RepositoryClass:interface" }, { "kind": "Content", "text": "<T, IdType, Relations>" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 11, "endIndex": 13 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "entityClass", "parameterTypeTokenRange": { "startIndex": 7, "endIndex": 10 } } ], "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdType", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "Relations", "constraintTokenRange": { "startIndex": 3, "endIndex": 4 }, "defaultTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "defineCrudRepositoryClass" }, { "kind": "Function", "canonicalReference": "@loopback/rest-crud!defineCrudRestController:function(1)", "docComment": "/**\n * Create (define) a CRUD Controller class for the given model.\n *\n * @param - modelCtor A model class, e.g. `Product`.\n *\n * @param - options Configuration options, e.g. `{basePath: '/products'}`.\n *\n * @example\n * ```ts\n * const ProductController = defineCrudRestController<\n * Product,\n * typeof Product.prototype.id,\n * 'id'\n * >(Product, {basePath: '/products'});\n *\n * inject('repositories.ProductRepository')(\n * ProductController,\n * undefined,\n * 0,\n * );\n *\n * app.controller(ProductController);\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function defineCrudRestController<T extends " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": ", IdType, IdName extends " }, { "kind": "Content", "text": "keyof T" }, { "kind": "Content", "text": ", Relations extends " }, { "kind": "Content", "text": "object " }, { "kind": "Content", "text": "= " }, { "kind": "Content", "text": "{}" }, { "kind": "Content", "text": ">(modelCtor: " }, { "kind": "Content", "text": "typeof " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": " & {\n prototype: T & {\n [key in IdName]: IdType;\n };\n}" }, { "kind": "Content", "text": ", options: " }, { "kind": "Reference", "text": "CrudRestControllerOptions", "canonicalReference": "@loopback/rest-crud!CrudRestControllerOptions:interface" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "CrudRestControllerCtor", "canonicalReference": "@loopback/rest-crud!CrudRestControllerCtor:interface" }, { "kind": "Content", "text": "<T, IdType, IdName, Relations>" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 15, "endIndex": 17 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "modelCtor", "parameterTypeTokenRange": { "startIndex": 9, "endIndex": 12 } }, { "parameterName": "options", "parameterTypeTokenRange": { "startIndex": 13, "endIndex": 14 } } ], "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdType", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdName", "constraintTokenRange": { "startIndex": 3, "endIndex": 4 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "Relations", "constraintTokenRange": { "startIndex": 5, "endIndex": 6 }, "defaultTypeTokenRange": { "startIndex": 7, "endIndex": 8 } } ], "name": "defineCrudRestController" }, { "kind": "Interface", "canonicalReference": "@loopback/rest-crud!ModelCrudRestApiConfig:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface ModelCrudRestApiConfig extends " }, { "kind": "Reference", "text": "ModelApiConfig", "canonicalReference": "@loopback/model-api-builder!ModelApiConfig:type" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "ModelCrudRestApiConfig", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/rest-crud!ModelCrudRestApiConfig#basePath:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "basePath: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "basePath", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/rest-crud!RepositoryClass:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface RepositoryClass<T extends " }, { "kind": "Reference", "text": "Entity", "canonicalReference": "@loopback/repository!Entity:class" }, { "kind": "Content", "text": ", IdType, Relations extends " }, { "kind": "Content", "text": "object" }, { "kind": "Content", "text": "> " } ], "releaseTag": "Public", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "IdType", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } }, { "typeParameterName": "Relations", "constraintTokenRange": { "startIndex": 3, "endIndex": 4 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } } ], "name": "RepositoryClass", "members": [ { "kind": "ConstructSignature", "canonicalReference": "@loopback/rest-crud!RepositoryClass:new(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "new (ds: " }, { "kind": "Reference", "text": "juggler.DataSource", "canonicalReference": "loopback-datasource-juggler!DataSource:class" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "EntityCrudRepository", "canonicalReference": "@loopback/repository!EntityCrudRepository:interface" }, { "kind": "Content", "text": "<T, IdType, Relations>" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 3, "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "ds", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ] } ], "extendsTokenRanges": [] } ] } ] }