@azure-rest/ai-document-intelligence 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -26
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist-esm/src/clientDefinitions.js.map +1 -1
- package/dist-esm/src/documentIntelligence.js +2 -2
- package/dist-esm/src/documentIntelligence.js.map +1 -1
- package/dist-esm/src/isUnexpected.js.map +1 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/outputModels.js.map +1 -1
- package/dist-esm/src/paginateHelper.js.map +1 -1
- package/dist-esm/src/parameters.js.map +1 -1
- package/dist-esm/src/pollingHelper.js.map +1 -1
- package/dist-esm/src/responses.js.map +1 -1
- package/package.json +8 -11
- package/review/ai-document-intelligence.api.md +257 -16
- package/types/ai-document-intelligence.d.ts +268 -47
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Paged } from \"@azure/core-paging\";\n\n/** Operation info. */\nexport interface OperationDetailsOutputParent {\n /** Operation ID */\n operationId: string;\n /**\n * Operation status.\n *\n * Possible values: notStarted, running, failed, succeeded, canceled\n */\n status: string;\n /** Operation progress (0-100). */\n percentCompleted?: number;\n /** Date and time (UTC) when the operation was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** URL of the resource targeted by this operation. */\n resourceLocation: string;\n /** API version used to create this operation. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /** Encountered error. */\n error?: ErrorModelOutput;\n kind: string;\n}\n\n/** The error object. */\nexport interface ErrorModelOutput {\n /** One of a server-defined set of error codes. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of details about specific errors that led to this reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n}\n\n/** An object containing more specific information about the error. */\nexport interface InnerErrorOutput {\n /** One of a server-defined set of error codes. */\n code?: string;\n /** A human-readable representation of the error. */\n message?: string;\n /** Inner error. */\n innererror?: InnerErrorOutput;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelBuildOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelBuild\";\n}\n\n/** Document model info. */\nexport interface DocumentModelDetailsOutput {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /** Date and time (UTC) when the document model was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document model will expire. */\n expirationDateTime?: string;\n /** API version used to create this document model. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /**\n * Custom document model build mode.\n *\n * Possible values: template, neural\n */\n buildMode?: string;\n /**\n * Azure Blob Storage location containing the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n /** Supported document types. */\n docTypes?: Record<string, DocumentTypeDetailsOutput>;\n}\n\n/** Azure Blob Storage content. */\nexport interface AzureBlobContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Blob name prefix. */\n prefix?: string;\n}\n\n/** File list in Azure Blob Storage. */\nexport interface AzureBlobFileListContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Path to a JSONL file within the container specifying a subset of documents. */\n fileList: string;\n}\n\n/** Document type info. */\nexport interface DocumentTypeDetailsOutput {\n /** Document model description. */\n description?: string;\n /**\n * Custom document model build mode.\n *\n * Possible values: template, neural\n */\n buildMode?: string;\n /** Description of the document semantic schema using a JSON Schema style syntax. */\n fieldSchema: Record<string, DocumentFieldSchemaOutput>;\n /** Estimated confidence for each field. */\n fieldConfidence?: Record<string, number>;\n}\n\n/** Description of the field semantic schema using a JSON Schema style syntax. */\nexport interface DocumentFieldSchemaOutput {\n /**\n * Semantic data type of the field value.\n *\n * Possible values: string, date, time, phoneNumber, number, integer, selectionMark, countryRegion, signature, array, object, currency, address, boolean\n */\n type: string;\n /** Field description. */\n description?: string;\n /** Example field content. */\n example?: string;\n /** Field type schema of each array element. */\n items?: DocumentFieldSchemaOutput;\n /** Named sub-fields of the object field. */\n properties?: Record<string, DocumentFieldSchemaOutput>;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelComposeOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCompose\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelCopyToOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCopyTo\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentClassifierBuildOperationDetailsOutput\n extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentClassifierDetailsOutput;\n /** Type of operation. */\n kind: \"documentClassifierBuild\";\n}\n\n/** Document classifier info. */\nexport interface DocumentClassifierDetailsOutput {\n /** Unique document classifier name. */\n classifierId: string;\n /** Document classifier description. */\n description?: string;\n /** Date and time (UTC) when the document classifier was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document classifier will expire. */\n expirationDateTime?: string;\n /** API version used to create this document classifier. */\n apiVersion: string;\n /** List of document types to classify against. */\n docTypes: Record<string, ClassifierDocumentTypeDetailsOutput>;\n}\n\n/** Classifier document type info. */\nexport interface ClassifierDocumentTypeDetailsOutput {\n /**\n * Type of training data source.\n *\n * Possible values: url, base64, azureBlob, azureBlobFileList\n */\n sourceKind?: string;\n /**\n * Azure Blob Storage location containing the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n}\n\n/** Error response object. */\nexport interface ErrorResponseOutput {\n /** Error info. */\n error: ErrorModelOutput;\n}\n\n/** General information regarding the current resource. */\nexport interface ResourceDetailsOutput {\n /** Details regarding custom document models. */\n customDocumentModels: CustomDocumentModelsDetailsOutput;\n /** Quota used, limit, and next reset date/time. */\n customNeuralDocumentModelBuilds: QuotaDetailsOutput;\n}\n\n/** Details regarding custom document models. */\nexport interface CustomDocumentModelsDetailsOutput {\n /** Number of custom document models in the current resource. */\n count: number;\n /** Maximum number of custom document models supported in the current resource. */\n limit: number;\n}\n\n/** Quota used, limit, and next reset date/time. */\nexport interface QuotaDetailsOutput {\n /** Amount of the resource quota used. */\n used: number;\n /** Resource quota limit. */\n quota: number;\n /** Date/time when the resource quota usage will be reset. */\n quotaResetDateTime: string;\n}\n\n/** Status and result of the analyze operation. */\nexport interface AnalyzeResultOperationOutput {\n /**\n * Operation status.\n *\n * Possible values: notStarted, running, failed, succeeded, canceled\n */\n status: string;\n /** Date and time (UTC) when the analyze operation was submitted. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** Encountered error during document analysis. */\n error?: ErrorModelOutput;\n /** Document analysis result. */\n analyzeResult?: AnalyzeResultOutput;\n}\n\n/** Document analysis result. */\nexport interface AnalyzeResultOutput {\n /** API version used to produce this result. */\n apiVersion: string;\n /** Document model ID used to produce this result. */\n modelId: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: textElements, unicodeCodePoint, utf16CodeUnit\n */\n stringIndexType: string;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: text, markdown\n */\n contentFormat?: string;\n /**\n * Concatenate string representation of all textual and visual elements in reading\n * order.\n */\n content: string;\n /** Analyzed pages. */\n pages: Array<DocumentPageOutput>;\n /** Extracted paragraphs. */\n paragraphs?: Array<DocumentParagraphOutput>;\n /** Extracted tables. */\n tables?: Array<DocumentTableOutput>;\n /** Extracted figures. */\n figures?: Array<DocumentFigureOutput>;\n /** Extracted lists. */\n lists?: Array<DocumentListOutput>;\n /** Extracted sections. */\n sections?: Array<DocumentSectionOutput>;\n /** Extracted key-value pairs. */\n keyValuePairs?: Array<DocumentKeyValuePairOutput>;\n /** Extracted font styles. */\n styles?: Array<DocumentStyleOutput>;\n /** Detected languages. */\n languages?: Array<DocumentLanguageOutput>;\n /** Extracted documents. */\n documents?: Array<DocumentOutput>;\n}\n\n/** Content and layout elements extracted from a page from the input. */\nexport interface DocumentPageOutput {\n /** 1-based page number in the input document. */\n pageNumber: number;\n /**\n * The general orientation of the content in clockwise direction, measured in\n * degrees between (-180, 180].\n */\n angle?: number;\n /** The width of the image/PDF in pixels/inches, respectively. */\n width?: number;\n /** The height of the image/PDF in pixels/inches, respectively. */\n height?: number;\n /**\n * The unit used by the width, height, and polygon properties. For images, the\n * unit is \"pixel\". For PDF, the unit is \"inch\".\n *\n * Possible values: pixel, inch\n */\n unit?: string;\n /** Location of the page in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Extracted words from the page. */\n words?: Array<DocumentWordOutput>;\n /** Extracted selection marks from the page. */\n selectionMarks?: Array<DocumentSelectionMarkOutput>;\n /**\n * Extracted lines from the page, potentially containing both textual and visual\n * elements.\n */\n lines?: Array<DocumentLineOutput>;\n /** Extracted barcodes from the page. */\n barcodes?: Array<DocumentBarcodeOutput>;\n /** Extracted formulas from the page. */\n formulas?: Array<DocumentFormulaOutput>;\n}\n\n/**\n * Contiguous region of the concatenated content property, specified as an offset\n * and length.\n */\nexport interface DocumentSpanOutput {\n /** Zero-based index of the content represented by the span. */\n offset: number;\n /** Number of characters in the content represented by the span. */\n length: number;\n}\n\n/**\n * A word object consisting of a contiguous sequence of characters. For non-space\n * delimited languages, such as Chinese, Japanese, and Korean, each character is\n * represented as its own word.\n */\nexport interface DocumentWordOutput {\n /** Text content of the word. */\n content: string;\n /**\n * Bounding polygon of the word, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the word in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the word. */\n confidence: number;\n}\n\n/**\n * A selection mark object representing check boxes, radio buttons, and other\n * elements indicating a selection.\n */\nexport interface DocumentSelectionMarkOutput {\n /**\n * State of the selection mark.\n *\n * Possible values: selected, unselected\n */\n state: string;\n /**\n * Bounding polygon of the selection mark, with coordinates specified relative\n * to the top-left of the page. The numbers represent the x, y values of the\n * polygon vertices, clockwise from the left (-180 degrees inclusive) relative\n * to the element orientation.\n */\n polygon?: number[];\n /** Location of the selection mark in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the selection mark. */\n confidence: number;\n}\n\n/**\n * A content line object consisting of an adjacent sequence of content elements,\n * such as words and selection marks.\n */\nexport interface DocumentLineOutput {\n /** Concatenated content of the contained elements in reading order. */\n content: string;\n /**\n * Bounding polygon of the line, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the line in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** A barcode object. */\nexport interface DocumentBarcodeOutput {\n /**\n * Barcode kind.\n *\n * Possible values: QRCode, PDF417, UPCA, UPCE, Code39, Code128, EAN8, EAN13, DataBar, Code93, Codabar, DataBarExpanded, ITF, MicroQRCode, Aztec, DataMatrix, MaxiCode\n */\n kind: string;\n /** Barcode value. */\n value: string;\n /**\n * Bounding polygon of the barcode, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the barcode in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the barcode. */\n confidence: number;\n}\n\n/** A formula object. */\nexport interface DocumentFormulaOutput {\n /**\n * Formula kind.\n *\n * Possible values: inline, display\n */\n kind: string;\n /** LaTex expression describing the formula. */\n value: string;\n /**\n * Bounding polygon of the formula, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the formula in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the formula. */\n confidence: number;\n}\n\n/**\n * A paragraph object consisting with contiguous lines generally with common\n * alignment and spacing.\n */\nexport interface DocumentParagraphOutput {\n /**\n * Semantic role of the paragraph.\n *\n * Possible values: pageHeader, pageFooter, pageNumber, title, sectionHeading, footnote, formulaBlock\n */\n role?: string;\n /** Concatenated content of the paragraph in reading order. */\n content: string;\n /** Bounding regions covering the paragraph. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the paragraph in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** Bounding polygon on a specific page of the input. */\nexport interface BoundingRegionOutput {\n /** 1-based page number of page containing the bounding region. */\n pageNumber: number;\n /**\n * Bounding polygon on the page, or the entire page if not specified.\n * Coordinates specified relative to the top-left of the page. The numbers\n * represent the x, y values of the polygon vertices, clockwise from the left\n * (-180 degrees inclusive) relative to the element orientation.\n */\n polygon: number[];\n}\n\n/** A table object consisting table cells arranged in a rectangular layout. */\nexport interface DocumentTableOutput {\n /** Number of rows in the table. */\n rowCount: number;\n /** Number of columns in the table. */\n columnCount: number;\n /** Cells contained within the table. */\n cells: Array<DocumentTableCellOutput>;\n /** Bounding regions covering the table. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Caption associated with the table. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the table. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing the location and content of a table cell. */\nexport interface DocumentTableCellOutput {\n /**\n * Table cell kind.\n *\n * Possible values: content, rowHeader, columnHeader, stubHead, description\n */\n kind?: string;\n /** Row index of the cell. */\n rowIndex: number;\n /** Column index of the cell. */\n columnIndex: number;\n /** Number of rows spanned by this cell. */\n rowSpan?: number;\n /** Number of columns spanned by this cell. */\n columnSpan?: number;\n /** Concatenated content of the table cell in reading order. */\n content: string;\n /** Bounding regions covering the table cell. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table cell in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the table cell. */\n elements?: string[];\n}\n\n/** A caption object describing a table or figure. */\nexport interface DocumentCaptionOutput {\n /** Content of the caption. */\n content: string;\n /** Bounding regions covering the caption. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the caption in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the caption. */\n elements?: string[];\n}\n\n/** A footnote object describing a table or figure. */\nexport interface DocumentFootnoteOutput {\n /** Content of the footnote. */\n content: string;\n /** Bounding regions covering the footnote. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the footnote in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the footnote. */\n elements?: string[];\n}\n\n/** An object representing a figure in the document. */\nexport interface DocumentFigureOutput {\n /** Bounding regions covering the figure. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the figure in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the figure, excluding any caption or footnotes. */\n elements?: string[];\n /** Caption associated with the figure. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the figure. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing a list in the document. */\nexport interface DocumentListOutput {\n /** Location of the list in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Items in the list. */\n items: Array<DocumentListItemOutput>;\n}\n\n/** An object representing a list item in the document. */\nexport interface DocumentListItemOutput {\n /** Level of the list item (1-indexed). */\n level: number;\n /** Content of the list item. */\n content: string;\n /** Bounding regions covering the list item. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the list item in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the list item. */\n elements?: string[];\n}\n\n/** An object representing a section in the document. */\nexport interface DocumentSectionOutput {\n /** Location of the section in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the section. */\n elements?: string[];\n}\n\n/**\n * An object representing a form field with distinct field label (key) and field\n * value (may be empty).\n */\nexport interface DocumentKeyValuePairOutput {\n /** Field label of the key-value pair. */\n key: DocumentKeyValueElementOutput;\n /** Field value of the key-value pair. */\n value?: DocumentKeyValueElementOutput;\n /** Confidence of correctly extracting the key-value pair. */\n confidence: number;\n}\n\n/** An object representing the field key or value in a key-value pair. */\nexport interface DocumentKeyValueElementOutput {\n /** Concatenated content of the key-value element in reading order. */\n content: string;\n /** Bounding regions covering the key-value element. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the key-value element in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** An object representing observed text styles. */\nexport interface DocumentStyleOutput {\n /** Is content handwritten? */\n isHandwritten?: boolean;\n /**\n * Visually most similar font from among the set of supported font families, with\n * fallback fonts following CSS convention (ex. 'Arial, sans-serif').\n */\n similarFontFamily?: string;\n /**\n * Font style.\n *\n * Possible values: normal, italic\n */\n fontStyle?: string;\n /**\n * Font weight.\n *\n * Possible values: normal, bold\n */\n fontWeight?: string;\n /** Foreground color in #rrggbb hexadecimal format. */\n color?: string;\n /** Background color in #rrggbb hexadecimal format.. */\n backgroundColor?: string;\n /** Location of the text elements in the concatenated content the style applies to. */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the style. */\n confidence: number;\n}\n\n/** An object representing the detected language for a given text span. */\nexport interface DocumentLanguageOutput {\n /**\n * Detected language. Value may an ISO 639-1 language code (ex. \"en\", \"fr\")\n * or BCP 47 language tag (ex. \"zh-Hans\").\n */\n locale: string;\n /**\n * Location of the text elements in the concatenated content the language applies\n * to.\n */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the language. */\n confidence: number;\n}\n\n/** An object describing the location and semantic content of a document. */\nexport interface DocumentOutput {\n /** Document type. */\n docType: string;\n /** Bounding regions covering the document. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the document in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Dictionary of named field values. */\n fields?: Record<string, DocumentFieldOutput>;\n /** Confidence of correctly extracting the document. */\n confidence: number;\n}\n\n/** An object representing the content and location of a field value. */\nexport interface DocumentFieldOutput {\n /**\n * Data type of the field value.\n *\n * Possible values: string, date, time, phoneNumber, number, integer, selectionMark, countryRegion, signature, array, object, currency, address, boolean\n */\n type: string;\n /** String value. */\n valueString?: string;\n /** Date value in YYYY-MM-DD format (ISO 8601). */\n valueDate?: string;\n /** Time value in hh:mm:ss format (ISO 8601). */\n valueTime?: string;\n /** Phone number value in E.164 format (ex. +19876543210). */\n valuePhoneNumber?: string;\n /** Floating point value. */\n valueNumber?: number;\n /** Integer value. */\n valueInteger?: number;\n /**\n * Selection mark value.\n *\n * Possible values: selected, unselected\n */\n valueSelectionMark?: string;\n /**\n * Presence of signature.\n *\n * Possible values: signed, unsigned\n */\n valueSignature?: string;\n /** 3-letter country code value (ISO 3166-1 alpha-3). */\n valueCountryRegion?: string;\n /** Array of field values. */\n valueArray?: Array<DocumentFieldOutput>;\n /** Dictionary of named field values. */\n valueObject?: Record<string, DocumentFieldOutput>;\n /** Currency value. */\n valueCurrency?: CurrencyValueOutput;\n /** Address value. */\n valueAddress?: AddressValueOutput;\n /** Boolean value. */\n valueBoolean?: boolean;\n /** Field content. */\n content?: string;\n /** Bounding regions covering the field. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the field in the reading order concatenated content. */\n spans?: Array<DocumentSpanOutput>;\n /** Confidence of correctly extracting the field. */\n confidence?: number;\n}\n\n/** Currency field value. */\nexport interface CurrencyValueOutput {\n /** Currency amount. */\n amount: number;\n /** Currency symbol label, if any. */\n currencySymbol?: string;\n /** Resolved currency code (ISO 4217), if any. */\n currencyCode?: string;\n}\n\n/** Address field value. */\nexport interface AddressValueOutput {\n /** House or building number. */\n houseNumber?: string;\n /** Post office box number. */\n poBox?: string;\n /** Street name. */\n road?: string;\n /** Name of city, town, village, etc. */\n city?: string;\n /** First-level administrative division. */\n state?: string;\n /** Postal code used for mail sorting. */\n postalCode?: string;\n /** Country/region. */\n countryRegion?: string;\n /** Street-level address, excluding city, state, countryRegion, and postalCode. */\n streetAddress?: string;\n /** Apartment or office number */\n unit?: string;\n /**\n * Districts or boroughs within a city, such as Brooklyn in New York City or City\n * of Westminster in London.\n */\n cityDistrict?: string;\n /** Second-level administrative division used in certain locales. */\n stateDistrict?: string;\n /** Unofficial neighborhood name, like Chinatown. */\n suburb?: string;\n /** Build name, such as World Trade Center. */\n house?: string;\n /** Floor number, such as 3F. */\n level?: string;\n}\n\n/**\n * Authorization to copy a document model to the specified target resource and\n * modelId.\n */\nexport interface CopyAuthorizationOutput {\n /** ID of the target Azure resource where the document model should be copied to. */\n targetResourceId: string;\n /**\n * Location of the target Azure resource where the document model should be copied\n * to.\n */\n targetResourceRegion: string;\n /** Identifier of the target document model. */\n targetModelId: string;\n /** URL of the copied document model in the target account. */\n targetModelLocation: string;\n /** Token used to authorize the request. */\n accessToken: string;\n /** Date/time when the access token expires. */\n expirationDateTime: string;\n}\n\n/** Operation info. */\nexport type OperationDetailsOutput =\n | DocumentModelBuildOperationDetailsOutput\n | DocumentModelComposeOperationDetailsOutput\n | DocumentModelCopyToOperationDetailsOutput\n | DocumentClassifierBuildOperationDetailsOutput;\n/** Paged collection of OperationDetails items */\nexport type PagedOperationDetailsOutput = Paged<OperationDetailsOutput>;\n/** Paged collection of DocumentModelDetails items */\nexport type PagedDocumentModelDetailsOutput = Paged<DocumentModelDetailsOutput>;\n/** Paged collection of DocumentClassifierDetails items */\nexport type PagedDocumentClassifierDetailsOutput = Paged<DocumentClassifierDetailsOutput>;\n"]}
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Paged } from \"@azure/core-paging\";\n\n/** Operation info. */\nexport interface OperationDetailsOutputParent {\n /** Operation ID */\n operationId: string;\n /**\n * Operation status. notStarted, running, completed, or failed\n *\n * Possible values: \"notStarted\", \"running\", \"failed\", \"succeeded\", \"completed\", \"canceled\"\n */\n status: string;\n /** Operation progress (0-100). */\n percentCompleted?: number;\n /** Date and time (UTC) when the operation was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** URL of the resource targeted by this operation. */\n resourceLocation: string;\n /** API version used to create this operation. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /** Encountered error. */\n error?: ErrorModelOutput;\n kind: string;\n}\n\n/** The error object. */\nexport interface ErrorModelOutput {\n /** One of a server-defined set of error codes. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of details about specific errors that led to this reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n}\n\n/** An object containing more specific information about the error. */\nexport interface InnerErrorOutput {\n /** One of a server-defined set of error codes. */\n code?: string;\n /** A human-readable representation of the error. */\n message?: string;\n /** Inner error. */\n innererror?: InnerErrorOutput;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelBuildOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelBuild\";\n}\n\n/** Document model info. */\nexport interface DocumentModelDetailsOutput {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /** Date and time (UTC) when the document model was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document model will expire. */\n expirationDateTime?: string;\n /** API version used to create this document model. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /**\n * Custom document model build mode.\n *\n * Possible values: \"template\", \"neural\"\n */\n buildMode?: string;\n /**\n * Azure Blob Storage location containing the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n /** Supported document types. */\n docTypes?: Record<string, DocumentTypeDetailsOutput>;\n /** List of warnings encountered while building the model. */\n warnings?: Array<WarningOutput>;\n}\n\n/** Azure Blob Storage content. */\nexport interface AzureBlobContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Blob name prefix. */\n prefix?: string;\n}\n\n/** File list in Azure Blob Storage. */\nexport interface AzureBlobFileListContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Path to a JSONL file within the container specifying a subset of documents. */\n fileList: string;\n}\n\n/** Document type info. */\nexport interface DocumentTypeDetailsOutput {\n /** Document model description. */\n description?: string;\n /**\n * Custom document model build mode.\n *\n * Possible values: \"template\", \"neural\"\n */\n buildMode?: string;\n /** Description of the document semantic schema using a JSON Schema style syntax. */\n fieldSchema: Record<string, DocumentFieldSchemaOutput>;\n /** Estimated confidence for each field. */\n fieldConfidence?: Record<string, number>;\n}\n\n/** Description of the field semantic schema using a JSON Schema style syntax. */\nexport interface DocumentFieldSchemaOutput {\n /**\n * Semantic data type of the field value.\n *\n * Possible values: \"string\", \"date\", \"time\", \"phoneNumber\", \"number\", \"integer\", \"selectionMark\", \"countryRegion\", \"signature\", \"array\", \"object\", \"currency\", \"address\", \"boolean\", \"selectionGroup\"\n */\n type: string;\n /** Field description. */\n description?: string;\n /** Example field content. */\n example?: string;\n /** Field type schema of each array element. */\n items?: DocumentFieldSchemaOutput;\n /** Named sub-fields of the object field. */\n properties?: Record<string, DocumentFieldSchemaOutput>;\n}\n\n/** The error object. */\nexport interface WarningOutput {\n /** One of a server-defined set of warning codes. */\n code: string;\n /** A human-readable representation of the warning. */\n message: string;\n /** The target of the error. */\n target?: string;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelComposeOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCompose\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelCopyToOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCopyTo\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentClassifierBuildOperationDetailsOutput\n extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentClassifierDetailsOutput;\n /** Type of operation. */\n kind: \"documentClassifierBuild\";\n}\n\n/** Document classifier info. */\nexport interface DocumentClassifierDetailsOutput {\n /** Unique document classifier name. */\n classifierId: string;\n /** Document classifier description. */\n description?: string;\n /** Date and time (UTC) when the document classifier was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document classifier will expire. */\n expirationDateTime?: string;\n /** API version used to create this document classifier. */\n apiVersion: string;\n /** Base classifierId on top of which the classifier was trained. */\n baseClassifierId?: string;\n /** List of document types to classify against. */\n docTypes: Record<string, ClassifierDocumentTypeDetailsOutput>;\n /** List of warnings encountered while building the classifier. */\n warnings?: Array<WarningOutput>;\n}\n\n/** Classifier document type info. */\nexport interface ClassifierDocumentTypeDetailsOutput {\n /**\n * Type of training data source.\n *\n * Possible values: \"url\", \"base64\", \"azureBlob\", \"azureBlobFileList\"\n */\n sourceKind?: string;\n /**\n * Azure Blob Storage location containing the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n}\n\n/** Error response object. */\nexport interface ErrorResponseOutput {\n /** Error info. */\n error: ErrorModelOutput;\n}\n\n/** Provides the 'x-ms-client-request-id' header to enable request correlation in requests and responses. */\nexport interface ClientRequestIdHeaderOutput {}\n\n/** General information regarding the current resource. */\nexport interface ResourceDetailsOutput {\n /** Details regarding custom document models. */\n customDocumentModels: CustomDocumentModelsDetailsOutput;\n /** Quota used, limit, and next reset date/time. */\n customNeuralDocumentModelBuilds: QuotaDetailsOutput;\n}\n\n/** Details regarding custom document models. */\nexport interface CustomDocumentModelsDetailsOutput {\n /** Number of custom document models in the current resource. */\n count: number;\n /** Maximum number of custom document models supported in the current resource. */\n limit: number;\n}\n\n/** Quota used, limit, and next reset date/time. */\nexport interface QuotaDetailsOutput {\n /** Amount of the resource quota used. */\n used: number;\n /** Resource quota limit. */\n quota: number;\n /** Date/time when the resource quota usage will be reset. */\n quotaResetDateTime: string;\n}\n\n/** Status and result of the analyze operation. */\nexport interface AnalyzeResultOperationOutput {\n /**\n * Operation status. notStarted, running, succeeded, or failed\n *\n * Possible values: \"notStarted\", \"running\", \"failed\", \"succeeded\", \"completed\", \"canceled\"\n */\n status: string;\n /** Date and time (UTC) when the analyze operation was submitted. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** Encountered error during document analysis. */\n error?: ErrorModelOutput;\n /** Document analysis result. */\n analyzeResult?: AnalyzeResultOutput;\n}\n\n/** Document analysis result. */\nexport interface AnalyzeResultOutput {\n /** API version used to produce this result. */\n apiVersion: string;\n /** Document model ID used to produce this result. */\n modelId: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType: string;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n contentFormat?: string;\n /**\n * Concatenate string representation of all textual and visual elements in reading\n * order.\n */\n content: string;\n /** Analyzed pages. */\n pages: Array<DocumentPageOutput>;\n /** Extracted paragraphs. */\n paragraphs?: Array<DocumentParagraphOutput>;\n /** Extracted tables. */\n tables?: Array<DocumentTableOutput>;\n /** Extracted figures. */\n figures?: Array<DocumentFigureOutput>;\n /** Extracted lists. */\n lists?: Array<DocumentListOutput>;\n /** Extracted sections. */\n sections?: Array<DocumentSectionOutput>;\n /** Extracted key-value pairs. */\n keyValuePairs?: Array<DocumentKeyValuePairOutput>;\n /** Extracted font styles. */\n styles?: Array<DocumentStyleOutput>;\n /** Detected languages. */\n languages?: Array<DocumentLanguageOutput>;\n /** Extracted documents. */\n documents?: Array<DocumentOutput>;\n}\n\n/** Content and layout elements extracted from a page from the input. */\nexport interface DocumentPageOutput {\n /** 1-based page number in the input document. */\n pageNumber: number;\n /**\n * The general orientation of the content in clockwise direction, measured in\n * degrees between (-180, 180].\n */\n angle?: number;\n /** The width of the image/PDF in pixels/inches, respectively. */\n width?: number;\n /** The height of the image/PDF in pixels/inches, respectively. */\n height?: number;\n /**\n * The unit used by the width, height, and polygon properties. For images, the\n * unit is \"pixel\". For PDF, the unit is \"inch\".\n *\n * Possible values: \"pixel\", \"inch\"\n */\n unit?: string;\n /** Location of the page in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Extracted words from the page. */\n words?: Array<DocumentWordOutput>;\n /** Extracted selection marks from the page. */\n selectionMarks?: Array<DocumentSelectionMarkOutput>;\n /**\n * Extracted lines from the page, potentially containing both textual and visual\n * elements.\n */\n lines?: Array<DocumentLineOutput>;\n /** Extracted barcodes from the page. */\n barcodes?: Array<DocumentBarcodeOutput>;\n /** Extracted formulas from the page. */\n formulas?: Array<DocumentFormulaOutput>;\n}\n\n/**\n * Contiguous region of the concatenated content property, specified as an offset\n * and length.\n */\nexport interface DocumentSpanOutput {\n /** Zero-based index of the content represented by the span. */\n offset: number;\n /** Number of characters in the content represented by the span. */\n length: number;\n}\n\n/**\n * A word object consisting of a contiguous sequence of characters. For non-space\n * delimited languages, such as Chinese, Japanese, and Korean, each character is\n * represented as its own word.\n */\nexport interface DocumentWordOutput {\n /** Text content of the word. */\n content: string;\n /**\n * Bounding polygon of the word, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the word in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the word. */\n confidence: number;\n}\n\n/**\n * A selection mark object representing check boxes, radio buttons, and other\n * elements indicating a selection.\n */\nexport interface DocumentSelectionMarkOutput {\n /**\n * State of the selection mark.\n *\n * Possible values: \"selected\", \"unselected\"\n */\n state: string;\n /**\n * Bounding polygon of the selection mark, with coordinates specified relative\n * to the top-left of the page. The numbers represent the x, y values of the\n * polygon vertices, clockwise from the left (-180 degrees inclusive) relative\n * to the element orientation.\n */\n polygon?: number[];\n /** Location of the selection mark in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the selection mark. */\n confidence: number;\n}\n\n/**\n * A content line object consisting of an adjacent sequence of content elements,\n * such as words and selection marks.\n */\nexport interface DocumentLineOutput {\n /** Concatenated content of the contained elements in reading order. */\n content: string;\n /**\n * Bounding polygon of the line, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the line in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** A barcode object. */\nexport interface DocumentBarcodeOutput {\n /**\n * Barcode kind.\n *\n * Possible values: \"QRCode\", \"PDF417\", \"UPCA\", \"UPCE\", \"Code39\", \"Code128\", \"EAN8\", \"EAN13\", \"DataBar\", \"Code93\", \"Codabar\", \"DataBarExpanded\", \"ITF\", \"MicroQRCode\", \"Aztec\", \"DataMatrix\", \"MaxiCode\"\n */\n kind: string;\n /** Barcode value. */\n value: string;\n /**\n * Bounding polygon of the barcode, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the barcode in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the barcode. */\n confidence: number;\n}\n\n/** A formula object. */\nexport interface DocumentFormulaOutput {\n /**\n * Formula kind.\n *\n * Possible values: \"inline\", \"display\"\n */\n kind: string;\n /** LaTex expression describing the formula. */\n value: string;\n /**\n * Bounding polygon of the formula, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the formula in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the formula. */\n confidence: number;\n}\n\n/**\n * A paragraph object consisting with contiguous lines generally with common\n * alignment and spacing.\n */\nexport interface DocumentParagraphOutput {\n /**\n * Semantic role of the paragraph.\n *\n * Possible values: \"pageHeader\", \"pageFooter\", \"pageNumber\", \"title\", \"sectionHeading\", \"footnote\", \"formulaBlock\"\n */\n role?: string;\n /** Concatenated content of the paragraph in reading order. */\n content: string;\n /** Bounding regions covering the paragraph. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the paragraph in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** Bounding polygon on a specific page of the input. */\nexport interface BoundingRegionOutput {\n /** 1-based page number of page containing the bounding region. */\n pageNumber: number;\n /**\n * Bounding polygon on the page, or the entire page if not specified.\n * Coordinates specified relative to the top-left of the page. The numbers\n * represent the x, y values of the polygon vertices, clockwise from the left\n * (-180 degrees inclusive) relative to the element orientation.\n */\n polygon: number[];\n}\n\n/** A table object consisting table cells arranged in a rectangular layout. */\nexport interface DocumentTableOutput {\n /** Number of rows in the table. */\n rowCount: number;\n /** Number of columns in the table. */\n columnCount: number;\n /** Cells contained within the table. */\n cells: Array<DocumentTableCellOutput>;\n /** Bounding regions covering the table. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Caption associated with the table. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the table. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing the location and content of a table cell. */\nexport interface DocumentTableCellOutput {\n /**\n * Table cell kind.\n *\n * Possible values: \"content\", \"rowHeader\", \"columnHeader\", \"stubHead\", \"description\"\n */\n kind?: string;\n /** Row index of the cell. */\n rowIndex: number;\n /** Column index of the cell. */\n columnIndex: number;\n /** Number of rows spanned by this cell. */\n rowSpan?: number;\n /** Number of columns spanned by this cell. */\n columnSpan?: number;\n /** Concatenated content of the table cell in reading order. */\n content: string;\n /** Bounding regions covering the table cell. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table cell in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the table cell. */\n elements?: string[];\n}\n\n/** A caption object describing a table or figure. */\nexport interface DocumentCaptionOutput {\n /** Content of the caption. */\n content: string;\n /** Bounding regions covering the caption. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the caption in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the caption. */\n elements?: string[];\n}\n\n/** A footnote object describing a table or figure. */\nexport interface DocumentFootnoteOutput {\n /** Content of the footnote. */\n content: string;\n /** Bounding regions covering the footnote. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the footnote in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the footnote. */\n elements?: string[];\n}\n\n/** An object representing a figure in the document. */\nexport interface DocumentFigureOutput {\n /** Bounding regions covering the figure. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the figure in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the figure, excluding any caption or footnotes. */\n elements?: string[];\n /** Caption associated with the figure. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the figure. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing a list in the document. */\nexport interface DocumentListOutput {\n /** Location of the list in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Items in the list. */\n items: Array<DocumentListItemOutput>;\n}\n\n/** An object representing a list item in the document. */\nexport interface DocumentListItemOutput {\n /** Level of the list item (1-indexed). */\n level: number;\n /** Content of the list item. */\n content: string;\n /** Bounding regions covering the list item. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the list item in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the list item. */\n elements?: string[];\n}\n\n/** An object representing a section in the document. */\nexport interface DocumentSectionOutput {\n /** Location of the section in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the section. */\n elements?: string[];\n}\n\n/**\n * An object representing a form field with distinct field label (key) and field\n * value (may be empty).\n */\nexport interface DocumentKeyValuePairOutput {\n /** Field label of the key-value pair. */\n key: DocumentKeyValueElementOutput;\n /** Field value of the key-value pair. */\n value?: DocumentKeyValueElementOutput;\n /** Confidence of correctly extracting the key-value pair. */\n confidence: number;\n}\n\n/** An object representing the field key or value in a key-value pair. */\nexport interface DocumentKeyValueElementOutput {\n /** Concatenated content of the key-value element in reading order. */\n content: string;\n /** Bounding regions covering the key-value element. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the key-value element in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** An object representing observed text styles. */\nexport interface DocumentStyleOutput {\n /** Is content handwritten? */\n isHandwritten?: boolean;\n /**\n * Visually most similar font from among the set of supported font families, with\n * fallback fonts following CSS convention (ex. 'Arial, sans-serif').\n */\n similarFontFamily?: string;\n /**\n * Font style.\n *\n * Possible values: \"normal\", \"italic\"\n */\n fontStyle?: string;\n /**\n * Font weight.\n *\n * Possible values: \"normal\", \"bold\"\n */\n fontWeight?: string;\n /** Foreground color in #rrggbb hexadecimal format. */\n color?: string;\n /** Background color in #rrggbb hexadecimal format.. */\n backgroundColor?: string;\n /** Location of the text elements in the concatenated content the style applies to. */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the style. */\n confidence: number;\n}\n\n/** An object representing the detected language for a given text span. */\nexport interface DocumentLanguageOutput {\n /**\n * Detected language. Value may an ISO 639-1 language code (ex. \"en\", \"fr\")\n * or BCP 47 language tag (ex. \"zh-Hans\").\n */\n locale: string;\n /**\n * Location of the text elements in the concatenated content the language applies\n * to.\n */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the language. */\n confidence: number;\n}\n\n/** An object describing the location and semantic content of a document. */\nexport interface DocumentOutput {\n /** Document type. */\n docType: string;\n /** Bounding regions covering the document. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the document in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Dictionary of named field values. */\n fields?: Record<string, DocumentFieldOutput>;\n /** Confidence of correctly extracting the document. */\n confidence: number;\n}\n\n/** An object representing the content and location of a field value. */\nexport interface DocumentFieldOutput {\n /**\n * Data type of the field value.\n *\n * Possible values: \"string\", \"date\", \"time\", \"phoneNumber\", \"number\", \"integer\", \"selectionMark\", \"countryRegion\", \"signature\", \"array\", \"object\", \"currency\", \"address\", \"boolean\", \"selectionGroup\"\n */\n type: string;\n /** String value. */\n valueString?: string;\n /** Date value in YYYY-MM-DD format (ISO 8601). */\n valueDate?: string;\n /** Time value in hh:mm:ss format (ISO 8601). */\n valueTime?: string;\n /** Phone number value in E.164 format (ex. +19876543210). */\n valuePhoneNumber?: string;\n /** Floating point value. */\n valueNumber?: number;\n /** Integer value. */\n valueInteger?: number;\n /**\n * Selection mark value.\n *\n * Possible values: \"selected\", \"unselected\"\n */\n valueSelectionMark?: string;\n /**\n * Presence of signature.\n *\n * Possible values: \"signed\", \"unsigned\"\n */\n valueSignature?: string;\n /** 3-letter country code value (ISO 3166-1 alpha-3). */\n valueCountryRegion?: string;\n /** Array of field values. */\n valueArray?: Array<DocumentFieldOutput>;\n /** Dictionary of named field values. */\n valueObject?: Record<string, DocumentFieldOutput>;\n /** Currency value. */\n valueCurrency?: CurrencyValueOutput;\n /** Address value. */\n valueAddress?: AddressValueOutput;\n /** Boolean value. */\n valueBoolean?: boolean;\n /** Selection group value. */\n valueSelectionGroup?: string[];\n /** Field content. */\n content?: string;\n /** Bounding regions covering the field. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the field in the reading order concatenated content. */\n spans?: Array<DocumentSpanOutput>;\n /** Confidence of correctly extracting the field. */\n confidence?: number;\n}\n\n/** Currency field value. */\nexport interface CurrencyValueOutput {\n /** Currency amount. */\n amount: number;\n /** Currency symbol label, if any. */\n currencySymbol?: string;\n /** Resolved currency code (ISO 4217), if any. */\n currencyCode?: string;\n}\n\n/** Address field value. */\nexport interface AddressValueOutput {\n /** House or building number. */\n houseNumber?: string;\n /** Post office box number. */\n poBox?: string;\n /** Street name. */\n road?: string;\n /** Name of city, town, village, etc. */\n city?: string;\n /** First-level administrative division. */\n state?: string;\n /** Postal code used for mail sorting. */\n postalCode?: string;\n /** Country/region. */\n countryRegion?: string;\n /** Street-level address, excluding city, state, countryRegion, and postalCode. */\n streetAddress?: string;\n /** Apartment or office number */\n unit?: string;\n /**\n * Districts or boroughs within a city, such as Brooklyn in New York City or City\n * of Westminster in London.\n */\n cityDistrict?: string;\n /** Second-level administrative division used in certain locales. */\n stateDistrict?: string;\n /** Unofficial neighborhood name, like Chinatown. */\n suburb?: string;\n /** Build name, such as World Trade Center. */\n house?: string;\n /** Floor number, such as 3F. */\n level?: string;\n}\n\n/**\n * Authorization to copy a document model to the specified target resource and\n * modelId.\n */\nexport interface CopyAuthorizationOutput {\n /** ID of the target Azure resource where the document model should be copied to. */\n targetResourceId: string;\n /**\n * Location of the target Azure resource where the document model should be copied\n * to.\n */\n targetResourceRegion: string;\n /** Identifier of the target document model. */\n targetModelId: string;\n /** URL of the copied document model in the target account. */\n targetModelLocation: string;\n /** Token used to authorize the request. */\n accessToken: string;\n /** Date/time when the access token expires. */\n expirationDateTime: string;\n}\n\n/** Operation info. */\nexport type OperationDetailsOutput =\n | OperationDetailsOutputParent\n | DocumentModelBuildOperationDetailsOutput\n | DocumentModelComposeOperationDetailsOutput\n | DocumentModelCopyToOperationDetailsOutput\n | DocumentClassifierBuildOperationDetailsOutput;\n/** Paged collection of OperationDetails items */\nexport type PagedOperationDetailsOutput = Paged<OperationDetailsOutput>;\n/** Paged collection of DocumentModelDetails items */\nexport type PagedDocumentModelDetailsOutput = Paged<DocumentModelDetailsOutput>;\n/** Paged collection of DocumentClassifierDetails items */\nexport type PagedDocumentClassifierDetailsOutput = Paged<DocumentClassifierDetailsOutput>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AnalyzeDocumentRequest,\n BuildDocumentModelRequest,\n ComposeDocumentModelRequest,\n AuthorizeCopyRequest,\n CopyAuthorization,\n BuildDocumentClassifierRequest,\n ClassifyDocumentRequest,\n} from \"./models\";\n\nexport type ListOperationsParameters = RequestParameters;\nexport type GetDocumentModelBuildOperationParameters = RequestParameters;\nexport type GetDocumentModelComposeOperationParameters = RequestParameters;\nexport type GetDocumentModelCopyToOperationParameters = RequestParameters;\nexport type GetDocumentClassifierBuildOperationParameters = RequestParameters;\nexport type GetOperationParameters = RequestParameters;\nexport type GetResourceInfoParameters = RequestParameters;\nexport type GetAnalyzeResultParameters = RequestParameters;\n\nexport interface AnalyzeDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: textElements, unicodeCodePoint, utf16CodeUnit\n */\n stringIndexType?: string;\n /** List of optional analysis features. */\n features?: string[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: text, markdown\n */\n outputContentFormat?: string;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParam {\n queryParameters?: AnalyzeDocumentFromStreamQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type AnalyzeDocumentFromStreamParameters = AnalyzeDocumentFromStreamQueryParam &\n AnalyzeDocumentFromStreamMediaTypesParam &\n AnalyzeDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface AnalyzeDocumentBodyParam {\n /** Analyze request parameters. */\n body?: AnalyzeDocumentRequest;\n}\n\nexport interface AnalyzeDocumentQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: textElements, unicodeCodePoint, utf16CodeUnit\n */\n stringIndexType?: string;\n /** List of optional analysis features. */\n features?: string[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: text, markdown\n */\n outputContentFormat?: string;\n}\n\nexport interface AnalyzeDocumentQueryParam {\n queryParameters?: AnalyzeDocumentQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeDocumentParameters = AnalyzeDocumentQueryParam &\n AnalyzeDocumentMediaTypesParam &\n AnalyzeDocumentBodyParam &\n RequestParameters;\nexport type GetModelParameters = RequestParameters;\n\nexport interface BuildModelBodyParam {\n /** Build request parameters. */\n body: BuildDocumentModelRequest;\n}\n\nexport type BuildModelParameters = BuildModelBodyParam & RequestParameters;\n\nexport interface ComposeModelBodyParam {\n /** Compose request parameters. */\n body: ComposeDocumentModelRequest;\n}\n\nexport type ComposeModelParameters = ComposeModelBodyParam & RequestParameters;\n\nexport interface AuthorizeModelCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeCopyRequest;\n}\n\nexport type AuthorizeModelCopyParameters = AuthorizeModelCopyBodyParam & RequestParameters;\n\nexport interface CopyModelToBodyParam {\n /** Copy to request parameters. */\n body: CopyAuthorization;\n}\n\nexport type CopyModelToParameters = CopyModelToBodyParam & RequestParameters;\nexport type ListModelsParameters = RequestParameters;\nexport type DeleteModelParameters = RequestParameters;\n\nexport interface BuildClassifierBodyParam {\n /** Build request parameters. */\n body: BuildDocumentClassifierRequest;\n}\n\nexport type BuildClassifierParameters = BuildClassifierBodyParam & RequestParameters;\nexport type ListClassifiersParameters = RequestParameters;\nexport type GetClassifierParameters = RequestParameters;\nexport type DeleteClassifierParameters = RequestParameters;\n\nexport interface ClassifyDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: textElements, unicodeCodePoint, utf16CodeUnit\n */\n stringIndexType?: string;\n /**\n * Document splitting mode.\n *\n * Possible values: auto, none, perPage\n */\n split?: string;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParam {\n queryParameters?: ClassifyDocumentFromStreamQueryParamProperties;\n}\n\nexport interface ClassifyDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type ClassifyDocumentFromStreamParameters = ClassifyDocumentFromStreamQueryParam &\n ClassifyDocumentFromStreamMediaTypesParam &\n ClassifyDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface ClassifyDocumentBodyParam {\n /** Classify request parameters. */\n body: ClassifyDocumentRequest;\n}\n\nexport interface ClassifyDocumentQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: textElements, unicodeCodePoint, utf16CodeUnit\n */\n stringIndexType?: string;\n /**\n * Document splitting mode.\n *\n * Possible values: auto, none, perPage\n */\n split?: string;\n}\n\nexport interface ClassifyDocumentQueryParam {\n queryParameters?: ClassifyDocumentQueryParamProperties;\n}\n\nexport interface ClassifyDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type ClassifyDocumentParameters = ClassifyDocumentQueryParam &\n ClassifyDocumentMediaTypesParam &\n ClassifyDocumentBodyParam &\n RequestParameters;\nexport type GetClassifyResultParameters = RequestParameters;\n"]}
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AnalyzeDocumentRequest,\n BuildDocumentModelRequest,\n ComposeDocumentModelRequest,\n AuthorizeCopyRequest,\n CopyAuthorization,\n BuildDocumentClassifierRequest,\n ClassifyDocumentRequest,\n} from \"./models\";\n\nexport interface ListOperationsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListOperationsHeaderParam {\n headers?: RawHttpHeadersInput & ListOperationsHeaders;\n}\n\nexport type ListOperationsParameters = ListOperationsHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelBuildOperationHeaders;\n}\n\nexport type GetDocumentModelBuildOperationParameters = GetDocumentModelBuildOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentModelComposeOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelComposeOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelComposeOperationHeaders;\n}\n\nexport type GetDocumentModelComposeOperationParameters =\n GetDocumentModelComposeOperationHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelCopyToOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelCopyToOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelCopyToOperationHeaders;\n}\n\nexport type GetDocumentModelCopyToOperationParameters = GetDocumentModelCopyToOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentClassifierBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentClassifierBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentClassifierBuildOperationHeaders;\n}\n\nexport type GetDocumentClassifierBuildOperationParameters =\n GetDocumentClassifierBuildOperationHeaderParam & RequestParameters;\n\nexport interface GetOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetOperationHeaders;\n}\n\nexport type GetOperationParameters = GetOperationHeaderParam & RequestParameters;\nexport type GetResourceInfoParameters = RequestParameters;\nexport type GetAnalyzeResultParameters = RequestParameters;\n\nexport interface AnalyzeDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: string;\n /** List of optional analysis features. */\n features?: string[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: string;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParam {\n queryParameters?: AnalyzeDocumentFromStreamQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type AnalyzeDocumentFromStreamParameters = AnalyzeDocumentFromStreamQueryParam &\n AnalyzeDocumentFromStreamMediaTypesParam &\n AnalyzeDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface AnalyzeDocumentBodyParam {\n /** Analyze request parameters. */\n body?: AnalyzeDocumentRequest;\n}\n\nexport interface AnalyzeDocumentQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: string;\n /** List of optional analysis features. */\n features?: string[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: string;\n}\n\nexport interface AnalyzeDocumentQueryParam {\n queryParameters?: AnalyzeDocumentQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeDocumentParameters = AnalyzeDocumentQueryParam &\n AnalyzeDocumentMediaTypesParam &\n AnalyzeDocumentBodyParam &\n RequestParameters;\n\nexport interface GetModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetModelHeaderParam {\n headers?: RawHttpHeadersInput & GetModelHeaders;\n}\n\nexport type GetModelParameters = GetModelHeaderParam & RequestParameters;\n\nexport interface BuildModelBodyParam {\n /** Build request parameters. */\n body: BuildDocumentModelRequest;\n}\n\nexport type BuildModelParameters = BuildModelBodyParam & RequestParameters;\n\nexport interface ComposeModelBodyParam {\n /** Compose request parameters. */\n body: ComposeDocumentModelRequest;\n}\n\nexport type ComposeModelParameters = ComposeModelBodyParam & RequestParameters;\n\nexport interface AuthorizeModelCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeCopyRequest;\n}\n\nexport type AuthorizeModelCopyParameters = AuthorizeModelCopyBodyParam & RequestParameters;\n\nexport interface CopyModelToBodyParam {\n /** Copy to request parameters. */\n body: CopyAuthorization;\n}\n\nexport type CopyModelToParameters = CopyModelToBodyParam & RequestParameters;\n\nexport interface ListModelsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListModelsHeaderParam {\n headers?: RawHttpHeadersInput & ListModelsHeaders;\n}\n\nexport type ListModelsParameters = ListModelsHeaderParam & RequestParameters;\n\nexport interface DeleteModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteModelHeaderParam {\n headers?: RawHttpHeadersInput & DeleteModelHeaders;\n}\n\nexport type DeleteModelParameters = DeleteModelHeaderParam & RequestParameters;\n\nexport interface BuildClassifierBodyParam {\n /** Build request parameters. */\n body: BuildDocumentClassifierRequest;\n}\n\nexport type BuildClassifierParameters = BuildClassifierBodyParam & RequestParameters;\n\nexport interface ListClassifiersHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListClassifiersHeaderParam {\n headers?: RawHttpHeadersInput & ListClassifiersHeaders;\n}\n\nexport type ListClassifiersParameters = ListClassifiersHeaderParam & RequestParameters;\n\nexport interface GetClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetClassifierHeaderParam {\n headers?: RawHttpHeadersInput & GetClassifierHeaders;\n}\n\nexport type GetClassifierParameters = GetClassifierHeaderParam & RequestParameters;\n\nexport interface DeleteClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteClassifierHeaderParam {\n headers?: RawHttpHeadersInput & DeleteClassifierHeaders;\n}\n\nexport type DeleteClassifierParameters = DeleteClassifierHeaderParam & RequestParameters;\n\nexport interface ClassifyDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: string;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: string;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParam {\n queryParameters?: ClassifyDocumentFromStreamQueryParamProperties;\n}\n\nexport interface ClassifyDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type ClassifyDocumentFromStreamParameters = ClassifyDocumentFromStreamQueryParam &\n ClassifyDocumentFromStreamMediaTypesParam &\n ClassifyDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface ClassifyDocumentBodyParam {\n /** Classify request parameters. */\n body: ClassifyDocumentRequest;\n}\n\nexport interface ClassifyDocumentQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: string;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: string;\n}\n\nexport interface ClassifyDocumentQueryParam {\n queryParameters?: ClassifyDocumentQueryParamProperties;\n}\n\nexport interface ClassifyDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type ClassifyDocumentParameters = ClassifyDocumentQueryParam &\n ClassifyDocumentMediaTypesParam &\n ClassifyDocumentBodyParam &\n RequestParameters;\nexport type GetClassifyResultParameters = RequestParameters;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AA4EzB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,qBAAqB,GAAG,MAAA,OAAO,CAAC,qBAAqB,mCAAI,IAAI,CAAC;IACtE,OAAO,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AA4EzB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,qBAAqB,GAAG,MAAA,OAAO,CAAC,qBAAqB,mCAAI,IAAI,CAAC;IACtE,OAAO,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocumentFromStreamDefaultResponse,\n AnalyzeDocumentFromStreamLogicalResponse,\n BuildModel202Response,\n BuildModelDefaultResponse,\n BuildModelLogicalResponse,\n ComposeModel202Response,\n ComposeModelDefaultResponse,\n ComposeModelLogicalResponse,\n CopyModelTo202Response,\n CopyModelToDefaultResponse,\n CopyModelToLogicalResponse,\n BuildClassifier202Response,\n BuildClassifierDefaultResponse,\n BuildClassifierLogicalResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocumentFromStreamDefaultResponse,\n ClassifyDocumentFromStreamLogicalResponse,\n} from \"./responses\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildModel202Response | BuildModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n>(\n client: Client,\n initialResponse: ComposeModel202Response | ComposeModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n PagedOperationDetailsOutput,\n ErrorResponseOutput,\n DocumentModelBuildOperationDetailsOutput,\n DocumentModelComposeOperationDetailsOutput,\n DocumentModelCopyToOperationDetailsOutput,\n DocumentClassifierBuildOperationDetailsOutput,\n OperationDetailsOutput,\n ResourceDetailsOutput,\n AnalyzeResultOperationOutput,\n DocumentModelDetailsOutput,\n CopyAuthorizationOutput,\n PagedDocumentModelDetailsOutput,\n PagedDocumentClassifierDetailsOutput,\n DocumentClassifierDetailsOutput,\n} from \"./outputModels\";\n\n/** The request has succeeded. */\nexport interface ListOperations200Response extends HttpResponse {\n status: \"200\";\n body: PagedOperationDetailsOutput;\n}\n\nexport interface ListOperationsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelBuildOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelBuildOperationDetailsOutput;\n}\n\nexport interface GetDocumentModelBuildOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelComposeOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelComposeOperationDetailsOutput;\n}\n\nexport interface GetDocumentModelComposeOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelCopyToOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelCopyToOperationDetailsOutput;\n}\n\nexport interface GetDocumentModelCopyToOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentClassifierBuildOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentClassifierBuildOperationDetailsOutput;\n}\n\nexport interface GetDocumentClassifierBuildOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetOperation200Response extends HttpResponse {\n status: \"200\";\n body: OperationDetailsOutput;\n}\n\nexport interface GetOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetResourceInfo200Response extends HttpResponse {\n status: \"200\";\n body: ResourceDetailsOutput;\n}\n\nexport interface GetResourceInfoDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetAnalyzeResult200Response extends HttpResponse {\n status: \"200\";\n body: AnalyzeResultOperationOutput;\n}\n\nexport interface GetAnalyzeResultDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface AnalyzeDocumentFromStream202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface AnalyzeDocumentFromStream202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & AnalyzeDocumentFromStream202Headers;\n}\n\nexport interface AnalyzeDocumentFromStreamDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running analyzeDocumentFromStream operation */\nexport interface AnalyzeDocumentFromStreamLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface AnalyzeDocument202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface AnalyzeDocument202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & AnalyzeDocument202Headers;\n}\n\nexport interface AnalyzeDocumentDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running analyzeDocument operation */\nexport interface AnalyzeDocumentLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface GetModel200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelDetailsOutput;\n}\n\nexport interface GetModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface BuildModel202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface BuildModel202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & BuildModel202Headers;\n}\n\nexport interface BuildModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running buildModel operation */\nexport interface BuildModelLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ComposeModel202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ComposeModel202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ComposeModel202Headers;\n}\n\nexport interface ComposeModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running composeModel operation */\nexport interface ComposeModelLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface AuthorizeModelCopy200Response extends HttpResponse {\n status: \"200\";\n body: CopyAuthorizationOutput;\n}\n\nexport interface AuthorizeModelCopyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface CopyModelTo202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface CopyModelTo202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & CopyModelTo202Headers;\n}\n\nexport interface CopyModelToDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running copyModelTo operation */\nexport interface CopyModelToLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface ListModels200Response extends HttpResponse {\n status: \"200\";\n body: PagedDocumentModelDetailsOutput;\n}\n\nexport interface ListModelsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteModel204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface BuildClassifier202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface BuildClassifier202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & BuildClassifier202Headers;\n}\n\nexport interface BuildClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running buildClassifier operation */\nexport interface BuildClassifierLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface ListClassifiers200Response extends HttpResponse {\n status: \"200\";\n body: PagedDocumentClassifierDetailsOutput;\n}\n\nexport interface ListClassifiersDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetClassifier200Response extends HttpResponse {\n status: \"200\";\n body: DocumentClassifierDetailsOutput;\n}\n\nexport interface GetClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteClassifier204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface ClassifyDocumentFromStream202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ClassifyDocumentFromStream202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ClassifyDocumentFromStream202Headers;\n}\n\nexport interface ClassifyDocumentFromStreamDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running classifyDocumentFromStream operation */\nexport interface ClassifyDocumentFromStreamLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ClassifyDocument202Headers {\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ClassifyDocument202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ClassifyDocument202Headers;\n}\n\nexport interface ClassifyDocumentDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running classifyDocument operation */\nexport interface ClassifyDocumentLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface GetClassifyResult200Response extends HttpResponse {\n status: \"200\";\n body: AnalyzeResultOperationOutput;\n}\n\nexport interface GetClassifyResultDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n PagedOperationDetailsOutput,\n ErrorResponseOutput,\n DocumentModelBuildOperationDetailsOutput,\n DocumentModelComposeOperationDetailsOutput,\n DocumentModelCopyToOperationDetailsOutput,\n DocumentClassifierBuildOperationDetailsOutput,\n OperationDetailsOutput,\n ResourceDetailsOutput,\n AnalyzeResultOperationOutput,\n DocumentModelDetailsOutput,\n CopyAuthorizationOutput,\n PagedDocumentModelDetailsOutput,\n PagedDocumentClassifierDetailsOutput,\n DocumentClassifierDetailsOutput,\n} from \"./outputModels\";\n\nexport interface ListOperations200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListOperations200Response extends HttpResponse {\n status: \"200\";\n body: PagedOperationDetailsOutput;\n headers: RawHttpHeaders & ListOperations200Headers;\n}\n\nexport interface ListOperationsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetDocumentModelBuildOperation200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelBuildOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelBuildOperationDetailsOutput;\n headers: RawHttpHeaders & GetDocumentModelBuildOperation200Headers;\n}\n\nexport interface GetDocumentModelBuildOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetDocumentModelComposeOperation200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelComposeOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelComposeOperationDetailsOutput;\n headers: RawHttpHeaders & GetDocumentModelComposeOperation200Headers;\n}\n\nexport interface GetDocumentModelComposeOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetDocumentModelCopyToOperation200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentModelCopyToOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelCopyToOperationDetailsOutput;\n headers: RawHttpHeaders & GetDocumentModelCopyToOperation200Headers;\n}\n\nexport interface GetDocumentModelCopyToOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetDocumentClassifierBuildOperation200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetDocumentClassifierBuildOperation200Response extends HttpResponse {\n status: \"200\";\n body: DocumentClassifierBuildOperationDetailsOutput;\n headers: RawHttpHeaders & GetDocumentClassifierBuildOperation200Headers;\n}\n\nexport interface GetDocumentClassifierBuildOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetOperation200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetOperation200Response extends HttpResponse {\n status: \"200\";\n body: OperationDetailsOutput;\n headers: RawHttpHeaders & GetOperation200Headers;\n}\n\nexport interface GetOperationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetResourceInfo200Response extends HttpResponse {\n status: \"200\";\n body: ResourceDetailsOutput;\n}\n\nexport interface GetResourceInfoDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetAnalyzeResult200Response extends HttpResponse {\n status: \"200\";\n body: AnalyzeResultOperationOutput;\n}\n\nexport interface GetAnalyzeResultDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface AnalyzeDocumentFromStream202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface AnalyzeDocumentFromStream202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & AnalyzeDocumentFromStream202Headers;\n}\n\nexport interface AnalyzeDocumentFromStreamDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running analyzeDocumentFromStream operation */\nexport interface AnalyzeDocumentFromStreamLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface AnalyzeDocument202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface AnalyzeDocument202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & AnalyzeDocument202Headers;\n}\n\nexport interface AnalyzeDocumentDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running analyzeDocument operation */\nexport interface AnalyzeDocumentLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface GetModel200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetModel200Response extends HttpResponse {\n status: \"200\";\n body: DocumentModelDetailsOutput;\n headers: RawHttpHeaders & GetModel200Headers;\n}\n\nexport interface GetModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface BuildModel202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface BuildModel202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & BuildModel202Headers;\n}\n\nexport interface BuildModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running buildModel operation */\nexport interface BuildModelLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ComposeModel202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ComposeModel202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ComposeModel202Headers;\n}\n\nexport interface ComposeModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running composeModel operation */\nexport interface ComposeModelLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface AuthorizeModelCopy200Response extends HttpResponse {\n status: \"200\";\n body: CopyAuthorizationOutput;\n}\n\nexport interface AuthorizeModelCopyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface CopyModelTo202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface CopyModelTo202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & CopyModelTo202Headers;\n}\n\nexport interface CopyModelToDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running copyModelTo operation */\nexport interface CopyModelToLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ListModels200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListModels200Response extends HttpResponse {\n status: \"200\";\n body: PagedDocumentModelDetailsOutput;\n headers: RawHttpHeaders & ListModels200Headers;\n}\n\nexport interface ListModelsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface DeleteModel204Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteModel204Response extends HttpResponse {\n status: \"204\";\n headers: RawHttpHeaders & DeleteModel204Headers;\n}\n\nexport interface DeleteModelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface BuildClassifier202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface BuildClassifier202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & BuildClassifier202Headers;\n}\n\nexport interface BuildClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running buildClassifier operation */\nexport interface BuildClassifierLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ListClassifiers200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListClassifiers200Response extends HttpResponse {\n status: \"200\";\n body: PagedDocumentClassifierDetailsOutput;\n headers: RawHttpHeaders & ListClassifiers200Headers;\n}\n\nexport interface ListClassifiersDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface GetClassifier200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetClassifier200Response extends HttpResponse {\n status: \"200\";\n body: DocumentClassifierDetailsOutput;\n headers: RawHttpHeaders & GetClassifier200Headers;\n}\n\nexport interface GetClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface DeleteClassifier204Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteClassifier204Response extends HttpResponse {\n status: \"204\";\n headers: RawHttpHeaders & DeleteClassifier204Headers;\n}\n\nexport interface DeleteClassifierDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface ClassifyDocumentFromStream202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ClassifyDocumentFromStream202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ClassifyDocumentFromStream202Headers;\n}\n\nexport interface ClassifyDocumentFromStreamDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running classifyDocumentFromStream operation */\nexport interface ClassifyDocumentFromStreamLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\nexport interface ClassifyDocument202Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n \"operation-location\": string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface ClassifyDocument202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & ClassifyDocument202Headers;\n}\n\nexport interface ClassifyDocumentDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/** The final response for long-running classifyDocument operation */\nexport interface ClassifyDocumentLogicalResponse extends HttpResponse {\n status: \"200\";\n}\n\n/** The request has succeeded. */\nexport interface GetClassifyResult200Response extends HttpResponse {\n status: \"200\";\n body: AnalyzeResultOperationOutput;\n}\n\nexport interface GetClassifyResultDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure-rest/ai-document-intelligence",
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"version": "1.0.0-beta.
|
|
5
|
+
"version": "1.0.0-beta.2",
|
|
6
6
|
"description": "Azure Document Intelligence Rest Client",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
@@ -32,17 +32,16 @@
|
|
|
32
32
|
"node": ">=18.0.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
|
36
35
|
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
|
|
37
36
|
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
|
|
38
37
|
"build:samples": "echo skipped.",
|
|
39
38
|
"build:test": "tsc -p . && dev-tool run bundle",
|
|
40
39
|
"build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
|
|
41
|
-
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
40
|
+
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
42
41
|
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
43
42
|
"execute:samples": "echo skipped",
|
|
44
43
|
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
|
|
45
|
-
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
44
|
+
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
46
45
|
"generate:client": "echo skipped",
|
|
47
46
|
"integration-test:browser": "echo skipped",
|
|
48
47
|
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
|
|
@@ -61,9 +60,9 @@
|
|
|
61
60
|
"sideEffects": false,
|
|
62
61
|
"autoPublish": false,
|
|
63
62
|
"dependencies": {
|
|
64
|
-
"@azure/core-auth": "^1.
|
|
65
|
-
"@azure-rest/core-client": "^1.
|
|
66
|
-
"@azure/core-rest-pipeline": "^1.
|
|
63
|
+
"@azure/core-auth": "^1.6.0",
|
|
64
|
+
"@azure-rest/core-client": "^1.2.0",
|
|
65
|
+
"@azure/core-rest-pipeline": "^1.14.0",
|
|
67
66
|
"@azure/logger": "^1.0.0",
|
|
68
67
|
"tslib": "^2.2.0",
|
|
69
68
|
"@azure/core-paging": "^1.5.0",
|
|
@@ -77,19 +76,17 @@
|
|
|
77
76
|
"dotenv": "^16.0.0",
|
|
78
77
|
"eslint": "^8.0.0",
|
|
79
78
|
"mkdirp": "^2.1.2",
|
|
80
|
-
"prettier": "^2.5.1",
|
|
81
79
|
"rimraf": "^5.0.0",
|
|
82
80
|
"source-map-support": "^0.5.9",
|
|
83
|
-
"typescript": "~5.
|
|
81
|
+
"typescript": "~5.3.3",
|
|
84
82
|
"@azure/dev-tool": "^1.0.0",
|
|
85
83
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
86
84
|
"@azure-tools/test-credential": "^1.0.0",
|
|
87
|
-
"@azure/identity": "^
|
|
85
|
+
"@azure/identity": "^4.0.1",
|
|
88
86
|
"@azure-tools/test-recorder": "^3.0.0",
|
|
89
87
|
"mocha": "^10.0.0",
|
|
90
88
|
"esm": "^3.2.18",
|
|
91
89
|
"@types/mocha": "^10.0.0",
|
|
92
|
-
"mocha-junit-reporter": "^1.18.0",
|
|
93
90
|
"cross-env": "^7.0.2",
|
|
94
91
|
"@types/chai": "^4.2.8",
|
|
95
92
|
"chai": "^4.2.0",
|