Skip to content

[V] $lib

const $lib: TypeSpecLibrary<{
bad-record-type: {
extendUnknown: CallableMessage<["name", "keyword", "typeName", "keyword"]>;
recordWithProperties: CallableMessage<["name", "keyword", "typeName"]>;
};
client-request-id-trait-missing: {
default: CallableMessage<[]>;
};
conditional-requests-trait-missing: {
default: CallableMessage<[]>;
};
expected-success-response: {
default: "The operation must have a success response";
};
expected-trait-diagnostic-missing: {
default: "Expected trait entries must have a \"diagnostic\" field with a valid diagnostic code for the missing trait.";
};
expected-trait-missing: {
default: CallableMessage<["trait", "message"]>;
};
invalid-final-operation: {
default: "The operation linked in the '@finalOperation' decorator must have a 200 response that includes a model.";
};
invalid-final-state: {
badValue: CallableMessage<["finalStateValue"]>;
noHeader: CallableMessage<["finalStateValue"]>;
notPut: "The final state value 'original-uri' can only be used in http PUT operations";
};
invalid-parameter: {
default: CallableMessage<["propertyName", "kind"]>;
};
invalid-polling-operation-parameter: {
default: CallableMessage<["name"]>;
};
invalid-resource-type: {
missingKey: CallableMessage<["name"]>;
missingSegment: CallableMessage<["name"]>;
};
invalid-trait-context: {
default: "The trait context can only be an enum member, union of enum members, or `unknown`.";
};
invalid-trait-property-count: {
default: CallableMessage<["modelName"]>;
};
invalid-trait-property-type: {
default: CallableMessage<["modelName", "propertyName"]>;
};
lro-polling-data-missing-from-operation-response: {
default: "At least one operation response must contain a field marked with `@lroStatus`";
};
lro-status-missing: {
default: CallableMessage<["states"]>;
};
lro-status-monitor-invalid-result-property: {
default: CallableMessage<["resultType", "decorator"]>;
};
lro-status-property-invalid-type: {
default: "Property type must be a union of strings or an enum.";
};
lro-status-union-non-string: {
default: CallableMessage<["type"]>;
};
no-object: {
default: "Don't use 'object'.\n - If you want an object with any properties, use `Record<unknown>`\n - If you meant anything, use `unknown`.";
};
operation-link-parameter-invalid: {
default: "Parameters must be of template type RequestParameter<T> or ResponseProperty<T>.";
};
operation-link-parameter-invalid-target: {
default: CallableMessage<["name"]>;
};
polling-operation-no-lro-failure: {
default: "The status monitor returned from the polling operation must have a status property, with a known status value the indicates failure. This known value may be named 'Failed' or marked with the '@lroFailed' decorator.";
};
polling-operation-no-lro-success: {
default: "The status monitor returned from the polling operation must have a status property, with a known status value the indicates successful completion. This known value may be named 'Succeeded' or marked with the '@lroSucceeded' decorator.";
};
polling-operation-no-ref-or-link: {
default: "An operation decorated with '@pollingOperation' must either return a response with an 'Operation-Location' header that will contain a runtime link to the polling operation, or specify parameters and return type properties to map into the polling operation parameters. A map into polling operation parameters can be created using the '@pollingOperationParameter' decorator";
};
polling-operation-no-status-monitor: {
default: "The operation linked in @pollingOperation must return a valid status monitor. The status monitor model must contain a 'status' property, or a property decorated with '@lroStatus'. The status field must be of Enum or Union type and contain terminal status values for success and failure.";
};
polling-operation-return-model: {
default: "An operation annotated with @pollingOperation must return a model or union of model.";
};
preview-version-invalid-enum-member: {
default: "@previewVersion can only be applied to members of a Version enum.";
};
preview-version-last-member: {
default: "@previewVersion can only be applied to the last member of a Version enum. Having it on other members will cause unstable apis to show up in subsequent stable versions.";
};
repeatable-requests-trait-missing: {
default: CallableMessage<[]>;
};
request-parameter-invalid: {
default: CallableMessage<["name"]>;
};
response-property-invalid: {
default: CallableMessage<["name"]>;
};
rpc-operation-needs-route: {
default: "The operation needs a @route";
};
trait-property-without-location: {
default: CallableMessage<["modelName", "propertyName"]>;
};
union-enums-circular: {
default: "Union is referencing itself and cannot be resolved as an enum.";
};
union-enums-invalid-kind: {
default: CallableMessage<["kind"]>;
};
union-enums-multiple-kind: {
default: CallableMessage<["kinds"]>;
};
unique-items-invalid-type: {
default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
};
verb-conflict: {
default: CallableMessage<["templateName", "requiredVerb", "verb"]>;
};
}, Record<string, any>,
| "trait"
| "lroStatus"
| "lroSucceeded"
| "lroCanceled"
| "lroFailed"
| "lroResult"
| "lroErrorResult"
| "pollingOperationParameter"
| "pollingLocationInfo"
| "finalLocations"
| "finalLocationResults"
| "finalStateOverride"
| "needsRoute"
| "ensureVerb"
| "embeddingVector"
| "armResourceIdentifierConfig"
| "operationLink"
| "requestParameter"
| "responseParameter"
| "resourceOperation"
| "traitSource"
| "traitContext"
| "traitLocation"
| "uniqueItems"
| "parameterizedNextLinkConfig"
| "previewVersion">;