@azure/ai-form-recognizer 4.0.0-beta.4 → 4.0.0

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.
Files changed (92) hide show
  1. package/README.md +206 -184
  2. package/dist/index.js +588 -1992
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/documentAnalysisClient.js +30 -227
  7. package/dist-esm/src/documentAnalysisClient.js.map +1 -1
  8. package/dist-esm/src/documentModel.js +71 -0
  9. package/dist-esm/src/documentModel.js.map +1 -0
  10. package/dist-esm/src/documentModelAdministrationClient.js +59 -59
  11. package/dist-esm/src/documentModelAdministrationClient.js.map +1 -1
  12. package/dist-esm/src/generated/generatedClient.js +63 -101
  13. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  14. package/dist-esm/src/generated/models/index.js +40 -9
  15. package/dist-esm/src/generated/models/index.js.map +1 -1
  16. package/dist-esm/src/generated/models/mappers.js +207 -205
  17. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  18. package/dist-esm/src/generated/models/parameters.js +4 -38
  19. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  20. package/dist-esm/src/index.js +1 -1
  21. package/dist-esm/src/index.js.map +1 -1
  22. package/dist-esm/src/lro/{training.js → administration.js} +4 -4
  23. package/dist-esm/src/lro/administration.js.map +1 -0
  24. package/dist-esm/src/lro/{analyze.js → analysis.js} +12 -11
  25. package/dist-esm/src/lro/analysis.js.map +1 -0
  26. package/dist-esm/src/models/documentElements.js.map +1 -1
  27. package/dist-esm/src/models/index.js.map +1 -1
  28. package/dist-esm/src/options/AnalyzeDocumentsOptions.js.map +1 -1
  29. package/dist-esm/src/options/{CopyModelOptions.js → BeginCopyModelOptions.js} +1 -1
  30. package/dist-esm/src/options/BeginCopyModelOptions.js.map +1 -0
  31. package/dist-esm/src/options/BuildModelOptions.js.map +1 -1
  32. package/dist-esm/src/options/DeleteModelOptions.js.map +1 -1
  33. package/dist-esm/src/options/FormRecognizerClientOptions.js +3 -2
  34. package/dist-esm/src/options/FormRecognizerClientOptions.js.map +1 -1
  35. package/dist-esm/src/options/{GetInfoOptions.js → GetResourceDetailsOptions.js} +1 -1
  36. package/dist-esm/src/options/GetResourceDetailsOptions.js.map +1 -0
  37. package/dist-esm/src/options/index.js.map +1 -1
  38. package/dist-esm/src/util.js.map +1 -1
  39. package/package.json +16 -10
  40. package/types/ai-form-recognizer.d.ts +388 -1753
  41. package/dist-esm/src/generated/generatedClientContext.js +0 -41
  42. package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
  43. package/dist-esm/src/lro/analyze.js.map +0 -1
  44. package/dist-esm/src/lro/training.js.map +0 -1
  45. package/dist-esm/src/models/GeneralDocumentResult.js +0 -13
  46. package/dist-esm/src/models/GeneralDocumentResult.js.map +0 -1
  47. package/dist-esm/src/models/LayoutResult.js +0 -15
  48. package/dist-esm/src/models/LayoutResult.js.map +0 -1
  49. package/dist-esm/src/models/ReadResult.js +0 -18
  50. package/dist-esm/src/models/ReadResult.js.map +0 -1
  51. package/dist-esm/src/options/CopyModelOptions.js.map +0 -1
  52. package/dist-esm/src/options/GetInfoOptions.js.map +0 -1
  53. package/dist-esm/src/prebuilt/index.js +0 -9
  54. package/dist-esm/src/prebuilt/index.js.map +0 -1
  55. package/dist-esm/src/prebuilt/modelSchemas/businessCard.js +0 -5
  56. package/dist-esm/src/prebuilt/modelSchemas/businessCard.js.map +0 -1
  57. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-businessCard.json.js +0 -93
  58. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-businessCard.json.js.map +0 -1
  59. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-document.json.js +0 -12
  60. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-document.json.js.map +0 -1
  61. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-healthInsuranceCard.us.json.js +0 -153
  62. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-healthInsuranceCard.us.json.js.map +0 -1
  63. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-idDocument.json.js +0 -89
  64. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-idDocument.json.js.map +0 -1
  65. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-invoice.json.js +0 -144
  66. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-invoice.json.js.map +0 -1
  67. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-layout.json.js +0 -12
  68. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-layout.json.js.map +0 -1
  69. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-read.json.js +0 -12
  70. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-read.json.js.map +0 -1
  71. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-receipt.json.js +0 -341
  72. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-receipt.json.js.map +0 -1
  73. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-tax.us.w2.json.js +0 -155
  74. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-tax.us.w2.json.js.map +0 -1
  75. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-vaccinationCard.json.js +0 -50
  76. package/dist-esm/src/prebuilt/modelSchemas/data/prebuilt-vaccinationCard.json.js.map +0 -1
  77. package/dist-esm/src/prebuilt/modelSchemas/healthInsuranceCard.js +0 -5
  78. package/dist-esm/src/prebuilt/modelSchemas/healthInsuranceCard.js.map +0 -1
  79. package/dist-esm/src/prebuilt/modelSchemas/idDocument.js +0 -5
  80. package/dist-esm/src/prebuilt/modelSchemas/idDocument.js.map +0 -1
  81. package/dist-esm/src/prebuilt/modelSchemas/invoice.js +0 -5
  82. package/dist-esm/src/prebuilt/modelSchemas/invoice.js.map +0 -1
  83. package/dist-esm/src/prebuilt/modelSchemas/receipt.js +0 -5
  84. package/dist-esm/src/prebuilt/modelSchemas/receipt.js.map +0 -1
  85. package/dist-esm/src/prebuilt/modelSchemas/vaccinationCard.js +0 -5
  86. package/dist-esm/src/prebuilt/modelSchemas/vaccinationCard.js.map +0 -1
  87. package/dist-esm/src/prebuilt/modelSchemas/w2.js +0 -5
  88. package/dist-esm/src/prebuilt/modelSchemas/w2.js.map +0 -1
  89. package/dist-esm/src/prebuilt/models.js +0 -150
  90. package/dist-esm/src/prebuilt/models.js.map +0 -1
  91. package/dist-esm/src/prebuilt/schema.js +0 -4
  92. package/dist-esm/src/prebuilt/schema.js.map +0 -1
@@ -52,6 +52,7 @@ export function toDocumentLineFromGenerated(generated, page) {
52
52
  return Object.assign(Object.assign({}, word), { polygon: toBoundingPolygon(word.polygon) });
53
53
  })) !== null && _b !== void 0 ? _b : []);
54
54
  };
55
+ generated.polygon = toBoundingPolygon(generated.polygon);
55
56
  Object.defineProperty(generated, "words", {
56
57
  enumerable: false,
57
58
  });
@@ -138,19 +139,19 @@ export function* fastGetChildren(spans, childrenArray) {
138
139
  * Convert a generated AnalyzeResult into a convenience layer AnalyzeResult.
139
140
  * @internal
140
141
  */
141
- export function toAnalyzeResultFromGenerated(result, mapDocuments) {
142
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
142
+ export function toAnalyzeResultFromGenerated(result) {
143
+ var _a, _b, _c, _d;
143
144
  return {
144
145
  apiVersion: result.apiVersion,
145
146
  modelId: result.modelId,
146
147
  content: result.content,
147
148
  pages: result.pages.map((page) => toDocumentPageFromGenerated(page)),
148
- tables: (_b = (_a = result.tables) === null || _a === void 0 ? void 0 : _a.map((table) => toDocumentTableFromGenerated(table))) !== null && _b !== void 0 ? _b : [],
149
- keyValuePairs: (_d = (_c = result.keyValuePairs) === null || _c === void 0 ? void 0 : _c.map((pair) => toKeyValuePairFromGenerated(pair))) !== null && _d !== void 0 ? _d : [],
150
- languages: (_e = result.languages) !== null && _e !== void 0 ? _e : [],
151
- styles: (_f = result.styles) !== null && _f !== void 0 ? _f : [],
152
- documents: (_h = (_g = result.documents) === null || _g === void 0 ? void 0 : _g.map((doc) => mapDocuments(doc))) !== null && _h !== void 0 ? _h : [],
153
- paragraphs: (_k = (_j = result.paragraphs) === null || _j === void 0 ? void 0 : _j.map((para) => (Object.assign(Object.assign({}, para), { boundingRegions: toBoundingRegions(para.boundingRegions) })))) !== null && _k !== void 0 ? _k : [],
149
+ tables: (_a = result.tables) === null || _a === void 0 ? void 0 : _a.map((table) => toDocumentTableFromGenerated(table)),
150
+ keyValuePairs: (_b = result.keyValuePairs) === null || _b === void 0 ? void 0 : _b.map((pair) => toKeyValuePairFromGenerated(pair)),
151
+ languages: result.languages,
152
+ styles: result.styles,
153
+ paragraphs: (_c = result.paragraphs) === null || _c === void 0 ? void 0 : _c.map((para) => (Object.assign(Object.assign({}, para), { boundingRegions: toBoundingRegions(para.boundingRegions) }))),
154
+ documents: (_d = result.documents) === null || _d === void 0 ? void 0 : _d.map(toAnalyzedDocumentFromGenerated),
154
155
  };
155
156
  }
156
157
  /**
@@ -161,8 +162,8 @@ export function toDocumentAnalysisPollOperationState(definition, modelId, operat
161
162
  return {
162
163
  status: response.status,
163
164
  modelId: modelId,
164
- lastUpdatedOn: response.lastUpdatedDateTime,
165
- createdOn: response.createdDateTime,
165
+ lastUpdatedOn: response.lastUpdatedOn,
166
+ createdOn: response.createdOn,
166
167
  operationLocation,
167
168
  result: response.analyzeResult && definition.transformResult(response.analyzeResult),
168
169
  error: response.error && new FormRecognizerError(response.error),
@@ -171,4 +172,4 @@ export function toDocumentAnalysisPollOperationState(definition, modelId, operat
171
172
  isCompleted: response.status === "succeeded",
172
173
  };
173
174
  }
174
- //# sourceMappingURL=analyze.js.map
175
+ //# sourceMappingURL=analysis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analysis.js","sourceRoot":"","sources":["../../../src/lro/analysis.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EA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EAAE,EAAE,CAAC,iCACxC,IAAI,KACP,eAAe,EAAE,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,IACxD,CAAC;QACH,SAAS,EAAE,MAAA,MAAM,CAAC,SAAS,0CAAE,GAAG,CAAC,+BAA+B,CAAC;KAClE,CAAC;AACJ,CAAC;AAeD;;;GAGG;AACH,MAAM,UAAU,oCAAoC,CAClD,UAA+C,EAC/C,OAAe,EACf,iBAAyB,EACzB,QAAgC;IAEhC,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,OAAO,EAAE,OAAO;QAChB,aAAa,EAAE,QAAQ,CAAC,aAAa;QACrC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,iBAAiB;QACjB,MAAM,EAAE,QAAQ,CAAC,aAAa,IAAI,UAAU,CAAC,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC;QACpF,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChE,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,QAAQ,CAAC,MAAM,KAAK,YAAY;QAC3C,WAAW,EAAE,QAAQ,CAAC,MAAM,KAAK,WAAW;KAC7C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport { FormRecognizerError } from \"../error\";\nimport {\n AnalyzeResult as GeneratedAnalyzeResult,\n AnalyzeResultOperation,\n AnalyzeResultOperationStatus as AnalyzeOperationStatus,\n DocumentLanguage,\n DocumentSpan,\n DocumentStyle,\n} from \"../generated\";\nimport { DocumentField, toAnalyzedDocumentFieldsFromGenerated } from \"../models/fields\";\nimport { FormRecognizerApiVersion, PollerOptions } from \"../options\";\nimport { AnalyzeDocumentOptions } from \"../options/AnalyzeDocumentsOptions\";\nimport {\n toBoundingPolygon,\n toBoundingRegions,\n toDocumentTableFromGenerated,\n toKeyValuePairFromGenerated,\n} from \"../transforms/polygon\";\nimport {\n BoundingRegion,\n DocumentTable,\n DocumentKeyValuePair,\n DocumentPage,\n DocumentLine,\n DocumentParagraph,\n} from \"../models/documentElements\";\nimport {\n Document as GeneratedDocument,\n DocumentPage as GeneratedDocumentPage,\n DocumentLine as GeneratedDocumentLine,\n} from \"../generated\";\n\n/**\n * A request input that can be uploaded as binary data to the Form Recognizer service. Form Recognizer treats `string`\n * inputs as URLs, so to send a string as a _binary_ input, first convert the string to one of the following input\n * types.\n */\nexport type FormRecognizerRequestBody =\n | NodeJS.ReadableStream\n | Blob\n | ArrayBuffer\n | ArrayBufferView;\n\n/**\n * An extracted document object.\n *\n * An AnalyzedDocument is an instance of one of the document types within a model. Its fields correspond to the field\n * schema of the document type.\n */\nexport interface AnalyzedDocument {\n /**\n * The type of the document that was extracted. A model can have multiple document types (for example, in a composed\n * model), so this property indicates which document type the fields of this document correspond to.\n */\n docType: string;\n\n /**\n * The extracted fields, which correspond to the document type's field schema.\n */\n fields: { [field: string]: DocumentField };\n\n /**\n * Bounding regions covering the document.\n */\n boundingRegions?: BoundingRegion[];\n\n /**\n * Locations of the document's elements in the `content` text (reading-order-concatenated content).\n */\n spans: DocumentSpan[];\n\n /**\n * The service's confidence that it has correctly extracted the document.\n */\n confidence: number;\n}\n\n/**\n * Transform a REST-level Document response object into the more strongly-typed AnalyzedDocument.\n *\n * @internal\n * @param document - a REST-level document response object\n * @returns an AnalyzedDocument (which has had its fields mapped to stronger DocumentField types)\n */\nexport function toAnalyzedDocumentFromGenerated(document: GeneratedDocument): AnalyzedDocument {\n return {\n ...document,\n boundingRegions: toBoundingRegions(document.boundingRegions),\n fields: toAnalyzedDocumentFieldsFromGenerated(document.fields ?? {}),\n };\n}\n\n/**\n * The common fields of all AnalyzeResult-like types, such as LayoutResult, ReadResult, and GeneralDocumentResult.\n */\nexport interface AnalyzeResultCommon {\n /**\n * The service API version used to produce this result.\n */\n apiVersion: FormRecognizerApiVersion;\n\n /**\n * The unique ID of the model that was used to produce this result.\n */\n modelId: string;\n\n /**\n * A string representation of all textual and visual elements in the input, concatenated by reading order (the order\n * in which the service \"reads\" or extracts the textual and visual content from the document).\n */\n content: string;\n}\n\n/**\n * The result of an analysis operation. The type of the Document may be determined by the model used to perform the\n * analysis.\n */\nexport interface AnalyzeResult<Document = AnalyzedDocument> extends AnalyzeResultCommon {\n /**\n * Extracted pages.\n */\n pages?: DocumentPage[];\n\n /**\n * Extracted tables.\n */\n tables?: DocumentTable[];\n\n /**\n * Extracted key-value pairs.\n */\n keyValuePairs?: DocumentKeyValuePair[];\n\n /**\n * Extracted text languages.\n */\n languages?: DocumentLanguage[];\n\n /**\n * Extracted font styles.\n */\n styles?: DocumentStyle[];\n\n /**\n * Extracted documents (instances of any of the model's document types and corresponding field schemas).\n */\n documents?: Document[];\n\n /**\n * Extracted document paragraphs.\n */\n paragraphs?: DocumentParagraph[];\n}\n\n/**\n * Tests if one span contains another, by testing that the outer span starts before or at the same character as the\n * inner span, and that the end position of the outer span is greater than or equal to the end position of the inner\n * span.\n *\n * @internal\n * @param outer - the outer (potentially containing) span\n * @param inner - the span to test if `outer` contains\n * @returns true if `inner` is contained inside of `outer`.\n */\nexport function contains(outer: DocumentSpan, inner: DocumentSpan): boolean {\n return outer.offset <= inner.offset && outer.offset + outer.length >= inner.offset + inner.length;\n}\n\n/**\n * Make an empty generator. This might seem silly, but it's useful for satisfying invariants.\n */\nfunction* empty(): Generator<never> {\n /* intentionally empty */\n}\n\n/**\n * Produces an iterator of the given items starting from the given index.\n *\n * @param items - the items to iterate over\n * @param idx - the index of the first item to begin iterating from\n */\nexport function* iterFrom<T>(items: T[], idx: number): Generator<T> {\n let i = idx;\n\n while (i < items.length) {\n yield items[i++];\n }\n}\n\nexport function toDocumentLineFromGenerated(\n generated: GeneratedDocumentLine,\n page: GeneratedDocumentPage\n): DocumentLine {\n (generated as DocumentLine).words = () =>\n fastGetChildren(\n iterFrom(generated.spans, 0),\n page.words?.map((word) => {\n return { ...word, polygon: toBoundingPolygon(word.polygon) };\n }) ?? []\n );\n\n (generated as DocumentLine).polygon = toBoundingPolygon(generated.polygon);\n\n Object.defineProperty(generated, \"words\", {\n enumerable: false,\n });\n\n return generated as DocumentLine;\n}\n\nexport function toDocumentPageFromGenerated(generated: GeneratedDocumentPage): DocumentPage {\n return {\n ...generated,\n lines: generated.lines?.map((line) => toDocumentLineFromGenerated(line, generated)),\n selectionMarks: generated.selectionMarks?.map((mark) => ({\n ...mark,\n polygon: toBoundingPolygon(mark.polygon),\n })),\n words: generated.words?.map((word) => ({\n ...word,\n polygon: toBoundingPolygon(word.polygon),\n })),\n };\n}\n\n/**\n * Binary search through an array of items to find the first item that could possibly be contained by the given span,\n * then return an iterator beginning from that item.\n *\n * This allows a program to quickly find the first relevant item in the array for consideration when testing for span\n * inclusion.\n *\n * @internal\n * @param span - the span to use when testing each individual item\n * @param items - an array of items to binary search through\n * @returns an iterator beginning from the item identified by the search\n */\nexport function iteratorFromFirstMatchBinarySearch<Spanned extends { span: DocumentSpan }>(\n span: DocumentSpan,\n items: Spanned[]\n): IterableIterator<Spanned> {\n let idx = Math.floor(items.length / 2);\n let prevIdx = idx;\n let min = 0;\n let max = items.length;\n\n const found = (): boolean =>\n // The item is found if it starts after the current span and the item before it does not. That means it is the first\n // item in the array that could be a child if the spans are sorted.\n items[idx].span.offset >= span.offset && (items[idx - 1]?.span?.offset ?? -1) < span.offset;\n\n // Binary search to find the first element that could be a child\n do {\n if (found()) {\n return iterFrom(items, idx);\n } else if (span.offset > items[idx].span.offset) {\n min = prevIdx = idx;\n idx = Math.floor(idx + (max - idx) / 2);\n } else {\n max = prevIdx = idx;\n idx = Math.floor(idx - (idx - min) / 2);\n }\n } while (idx !== prevIdx);\n\n // This might seem weird, but it's a simple way to make the types a little more elegant.\n return empty();\n}\n\n/**\n * This fast algorithm tests the elements of `childArray` for inclusion in any of the given `spans`, assuming that both\n * the spans and child items are sorted.\n *\n * INVARIANT: the items in both the `spans` iterator and `childrenArray` MUST BE SORTED INCREASING by span _offset_.\n *\n * @internal\n * @param spans - the spans that contain the child elements\n * @param childrenArray - an array of child items (items that have spans) to test for inclusion in the spans\n * @returns - an IterableIterator of child items that are included in any span in the `spans` iterator\n */\nexport function* fastGetChildren<Spanned extends { span: DocumentSpan }>(\n spans: Iterator<DocumentSpan>,\n childrenArray: Spanned[]\n): Generator<Spanned> {\n let curSpan = spans.next();\n\n // Need to exit early if there are no spans.\n if (curSpan.done) {\n return;\n }\n\n const children = iteratorFromFirstMatchBinarySearch(curSpan.value as DocumentSpan, childrenArray);\n let curChild = children.next();\n\n while (!(curChild.done || curSpan.done)) {\n if (contains(curSpan.value, curChild.value.span)) {\n // The span is contained, so yield the current child and advance it.\n yield curChild.value;\n curChild = children.next();\n } else if (curSpan.value.offset + curSpan.value.length < curChild.value.span.offset) {\n // The current span ends before the next potential child starts, so advance the span\n curSpan = spans.next();\n } else {\n // The current child was not contained in the current span, so advance to the next child.\n curChild = children.next();\n }\n }\n}\n\n/**\n * The state of an analysis operation, which will eventually produce the result type that corresponds to the model.\n */\nexport interface DocumentAnalysisPollOperationState<Result = AnalyzeResult<AnalyzedDocument>>\n extends PollOperationState<Result> {\n /**\n * The status of the operation. One of:\n *\n * - \"notStarted\"\n * - \"running\"\n * - \"succeeded\"\n * - \"failed\"\n */\n status: AnalyzeOperationStatus;\n\n /**\n * The model ID that the analysis operation will use to produce the result.\n */\n modelId: string;\n\n /**\n * The URL to the operation.\n */\n operationLocation: string;\n\n /**\n * The Date and Time that the operation was created.\n */\n createdOn: Date;\n\n /**\n * The date & time that the operation state was last modified.\n */\n lastUpdatedOn: Date;\n}\n\n/**\n * A long-running operation (poller) that tracks the state of an analysis operation, eventually producing the result\n * type that corresponds to the model.\n */\nexport type AnalysisPoller<Result = AnalyzeResult<AnalyzedDocument>> = PollerLike<\n DocumentAnalysisPollOperationState<Result>,\n Result\n>;\n\n/**\n * Convert a generated AnalyzeResult into a convenience layer AnalyzeResult.\n * @internal\n */\nexport function toAnalyzeResultFromGenerated(result: GeneratedAnalyzeResult): AnalyzeResult {\n return {\n apiVersion: result.apiVersion as FormRecognizerApiVersion,\n modelId: result.modelId,\n content: result.content,\n pages: result.pages.map((page) => toDocumentPageFromGenerated(page)),\n tables: result.tables?.map((table) => toDocumentTableFromGenerated(table)),\n keyValuePairs: result.keyValuePairs?.map((pair) => toKeyValuePairFromGenerated(pair)),\n languages: result.languages,\n styles: result.styles,\n paragraphs: result.paragraphs?.map((para) => ({\n ...para,\n boundingRegions: toBoundingRegions(para.boundingRegions),\n })),\n documents: result.documents?.map(toAnalyzedDocumentFromGenerated),\n };\n}\n\n/**\n * Defines an analysis operation by the initial request model ID, poller options, and a transform to apply to the\n * eventual result,\n *\n * @internal\n */\nexport interface AnalysisOperationDefinition<Result = AnalyzeResult> {\n transformResult: (primitiveResult: GeneratedAnalyzeResult) => Result;\n initialModelId: string;\n options: PollerOptions<DocumentAnalysisPollOperationState<Result>> &\n AnalyzeDocumentOptions<Result>;\n}\n\n/**\n * Converts an AnalyzeResultOperation (LRO response) to a DocumentAnalysisPollOperationState\n * @internal\n */\nexport function toDocumentAnalysisPollOperationState<Result>(\n definition: AnalysisOperationDefinition<Result>,\n modelId: string,\n operationLocation: string,\n response: AnalyzeResultOperation\n): DocumentAnalysisPollOperationState<Result> {\n return {\n status: response.status,\n modelId: modelId,\n lastUpdatedOn: response.lastUpdatedOn,\n createdOn: response.createdOn,\n operationLocation,\n result: response.analyzeResult && definition.transformResult(response.analyzeResult),\n error: response.error && new FormRecognizerError(response.error),\n isCancelled: false, // Not supported\n isStarted: response.status !== \"notStarted\",\n isCompleted: response.status === \"succeeded\",\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"documentElements.js","sourceRoot":"","sources":["../../../src/models/documentElements.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Point2D } from \"../transforms/polygon\";\nimport {\n DocumentPageKind,\n DocumentSpan,\n DocumentTableCellKind,\n DocumentField as GeneratedDocumentField,\n LengthUnit,\n ParagraphRole,\n SelectionMarkState,\n} from \"../generated\";\n\n/** Simple document elements such as words, selection marks and lines are bounded by the polygon. */\nexport interface HasBoundingPolygon {\n /** Bounding polygon of the entity. */\n polygon?: Point2D[];\n}\n\n// ------------------------------------\n// Following are the interfaces that are redefined with the property `polygon?: Point2D[];`\n// instead of the generated `polygon?: number[];` for the interfaces in the generated code with the same names.\n//\n// To avoid going out-of-sync with the generated types, we test the re-constructed interfaces are following the shapes in the generated interfaces in the following test file.\n// `test/internal/convenienceModelAssignability.spec.ts`\n//\n// If the generated code is updated and if there are new additions in the generated interfaces, the function calls \"checkAssign\" would fail in the test file, which would mean we need to revisit the re-constructed shapes here.\n\n/** Bounding polygon on a specific page of the input. */\nexport interface BoundingRegion extends HasBoundingPolygon {\n /** 1-based page number of page containing the bounding region. */\n pageNumber: number;\n}\n\n/** A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word. */\nexport interface DocumentWord extends HasBoundingPolygon {\n /** Text content of the word. */\n content: string;\n /** Location of the word in the reading order concatenated content. */\n span: DocumentSpan;\n /** Confidence of correctly extracting the word. */\n confidence: number;\n}\n\n/** A selection mark object representing check boxes, radio buttons, and other elements indicating a selection. */\nexport interface DocumentSelectionMark extends HasBoundingPolygon {\n /** State of the selection mark. */\n state: SelectionMarkState;\n /** Location of the selection mark in the reading order concatenated content. */\n span: DocumentSpan;\n /** Confidence of correctly extracting the selection mark. */\n confidence: number;\n}\n\n/** A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. */\nexport interface DocumentLine extends HasBoundingPolygon {\n /** Concatenated content of the contained elements in reading order. */\n content: string;\n /** Location of the line in the reading order concatenated content. */\n spans: DocumentSpan[];\n /**\n * Compute the `DocumentWord`s that are related to this line.\n *\n * This function produces a lazy iterator that will yield one word before computing the next.\n */\n words: () => IterableIterator<DocumentWord>;\n}\n\n/** A paragraph object consisting with contiguous lines generally with common alignment and spacing. */\nexport interface DocumentParagraph {\n /** Semantic role of the paragraph. */\n role?: ParagraphRole;\n /** Concatenated content of the paragraph in reading order. */\n content: string;\n /** Bounding regions covering the paragraph. */\n boundingRegions?: BoundingRegion[];\n /** Location of the paragraph in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** A table object consisting table cells arranged in a rectangular layout. */\nexport interface DocumentTable {\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: DocumentTableCell[];\n /** Bounding regions covering the table. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table cell. */\nexport interface DocumentTableCell {\n /** Table cell kind. */\n kind?: DocumentTableCellKind;\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?: BoundingRegion[];\n /** Location of the table cell in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table caption. */\nexport interface DocumentCaption {\n /** Table caption content. */\n content: string;\n /** Bounding regions covering the table caption. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table caption in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table footnote. */\nexport interface DocumentFootnote {\n /** Table footnote content. */\n content: string;\n /** Bounding regions covering the table footnote. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table footnote in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the field key or value in a key-value pair. */\nexport interface DocumentKeyValueElement {\n /** Concatenated content of the key-value element in reading order. */\n content: string;\n /** Bounding regions covering the key-value element. */\n boundingRegions?: BoundingRegion[];\n /** Location of the key-value element in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object describing the location and semantic content of a document. */\nexport interface Document {\n /** Document type. */\n docType: string;\n /** Bounding regions covering the document. */\n boundingRegions?: BoundingRegion[];\n /** Location of the document in the reading order concatenated content. */\n spans: DocumentSpan[];\n /** Dictionary of named field values. */\n fields?: { [propertyName: string]: GeneratedDocumentField };\n /** Confidence of correctly extracting the document. */\n confidence: number;\n}\n\n/** An object representing a form field with distinct field label (key) and field value (may be empty). */\nexport interface DocumentKeyValuePair {\n /** Field label of the key-value pair. */\n key: DocumentKeyValueElement;\n /** Field value of the key-value pair. */\n value?: DocumentKeyValueElement;\n /** Confidence of correctly extracting the key-value pair. */\n confidence: number;\n}\n\n/** Content and layout elements extracted from a page from the input. */\nexport interface DocumentPage {\n /** Kind of document page. */\n kind: DocumentPageKind;\n /** 1-based page number in the input document. */\n pageNumber: number;\n /** The general orientation of the content in clockwise direction, measured in degrees between (-180, 180]. */\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 /** The unit used by the width, height, and polygon properties. For images, the unit is \"pixel\". PDF, the unit is \"inch\". */\n unit?: LengthUnit;\n /** Location of the page in the reading order concatenated content. */\n spans: DocumentSpan[];\n /** Extracted words from the page. */\n words?: DocumentWord[];\n /** Extracted selection marks from the page. */\n selectionMarks?: DocumentSelectionMark[];\n /** Extracted lines from the page, potentially containing both textual and visual elements. */\n lines?: DocumentLine[];\n}\n"]}
1
+ {"version":3,"file":"documentElements.js","sourceRoot":"","sources":["../../../src/models/documentElements.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Point2D } from \"../transforms/polygon\";\nimport {\n DocumentSpan,\n DocumentTableCellKind,\n DocumentField as GeneratedDocumentField,\n LengthUnit,\n ParagraphRole,\n SelectionMarkState,\n} from \"../generated\";\n\n/** Simple document elements such as words, selection marks and lines are bounded by the polygon. */\nexport interface HasBoundingPolygon {\n /** Bounding polygon of the entity. */\n polygon?: Point2D[];\n}\n\n// ------------------------------------\n// Following are the interfaces that are redefined with the property `polygon?: Point2D[];`\n// instead of the generated `polygon?: number[];` for the interfaces in the generated code with the same names.\n//\n// To avoid going out-of-sync with the generated types, we test the re-constructed interfaces are following the shapes in the generated interfaces in the following test file.\n// `test/internal/convenienceModelAssignability.spec.ts`\n//\n// If the generated code is updated and if there are new additions in the generated interfaces, the function calls \"checkAssign\" would fail in the test file, which would mean we need to revisit the re-constructed shapes here.\n\n/** Bounding polygon on a specific page of the input. */\nexport interface BoundingRegion extends HasBoundingPolygon {\n /** 1-based page number of page containing the bounding region. */\n pageNumber: number;\n}\n\n/** A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word. */\nexport interface DocumentWord extends HasBoundingPolygon {\n /** Text content of the word. */\n content: string;\n /** Location of the word in the reading order concatenated content. */\n span: DocumentSpan;\n /** Confidence of correctly extracting the word. */\n confidence: number;\n}\n\n/** A selection mark object representing check boxes, radio buttons, and other elements indicating a selection. */\nexport interface DocumentSelectionMark extends HasBoundingPolygon {\n /** State of the selection mark. */\n state: SelectionMarkState;\n /** Location of the selection mark in the reading order concatenated content. */\n span: DocumentSpan;\n /** Confidence of correctly extracting the selection mark. */\n confidence: number;\n}\n\n/** A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. */\nexport interface DocumentLine extends HasBoundingPolygon {\n /** Concatenated content of the contained elements in reading order. */\n content: string;\n /** Location of the line in the reading order concatenated content. */\n spans: DocumentSpan[];\n /**\n * Compute the `DocumentWord`s that are related to this line.\n *\n * This function produces a lazy iterator that will yield one word before computing the next.\n */\n words: () => IterableIterator<DocumentWord>;\n}\n\n/** A paragraph object consisting with contiguous lines generally with common alignment and spacing. */\nexport interface DocumentParagraph {\n /** Semantic role of the paragraph. */\n role?: ParagraphRole;\n /** Concatenated content of the paragraph in reading order. */\n content: string;\n /** Bounding regions covering the paragraph. */\n boundingRegions?: BoundingRegion[];\n /** Location of the paragraph in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** A table object consisting table cells arranged in a rectangular layout. */\nexport interface DocumentTable {\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: DocumentTableCell[];\n /** Bounding regions covering the table. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table cell. */\nexport interface DocumentTableCell {\n /** Table cell kind. */\n kind?: DocumentTableCellKind;\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?: BoundingRegion[];\n /** Location of the table cell in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table caption. */\nexport interface DocumentCaption {\n /** Table caption content. */\n content: string;\n /** Bounding regions covering the table caption. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table caption in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the location and content of a table footnote. */\nexport interface DocumentFootnote {\n /** Table footnote content. */\n content: string;\n /** Bounding regions covering the table footnote. */\n boundingRegions?: BoundingRegion[];\n /** Location of the table footnote in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object representing the field key or value in a key-value pair. */\nexport interface DocumentKeyValueElement {\n /** Concatenated content of the key-value element in reading order. */\n content: string;\n /** Bounding regions covering the key-value element. */\n boundingRegions?: BoundingRegion[];\n /** Location of the key-value element in the reading order concatenated content. */\n spans: DocumentSpan[];\n}\n\n/** An object describing the location and semantic content of a document. */\nexport interface Document {\n /** Document type. */\n docType: string;\n /** Bounding regions covering the document. */\n boundingRegions?: BoundingRegion[];\n /** Location of the document in the reading order concatenated content. */\n spans: DocumentSpan[];\n /** Dictionary of named field values. */\n fields?: { [propertyName: string]: GeneratedDocumentField };\n /** Confidence of correctly extracting the document. */\n confidence: number;\n}\n\n/** An object representing a form field with distinct field label (key) and field value (may be empty). */\nexport interface DocumentKeyValuePair {\n /** Field label of the key-value pair. */\n key: DocumentKeyValueElement;\n /** Field value of the key-value pair. */\n value?: DocumentKeyValueElement;\n /** Confidence of correctly extracting the key-value pair. */\n confidence: number;\n}\n\n/** Content and layout elements extracted from a page from the input. */\nexport interface DocumentPage {\n /** 1-based page number in the input document. */\n pageNumber: number;\n /** The general orientation of the content in clockwise direction, measured in degrees between (-180, 180]. */\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 /** The unit used by the width, height, and polygon properties. For images, the unit is \"pixel\". PDF, the unit is \"inch\". */\n unit?: LengthUnit;\n /** Location of the page in the reading order concatenated content. */\n spans: DocumentSpan[];\n /** Extracted words from the page. */\n words?: DocumentWord[];\n /** Extracted selection marks from the page. */\n selectionMarks?: DocumentSelectionMark[];\n /** Extracted lines from the page, potentially containing both textual and visual elements. */\n lines?: DocumentLine[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { GeneralDocumentResult } from \"./GeneralDocumentResult\";\nexport { LayoutResult } from \"./LayoutResult\";\nexport { ReadResult } from \"./ReadResult\";\n\nexport {\n DocumentPhoneNumberField,\n DocumentDateField,\n DocumentNumberField,\n DocumentTimeField,\n DocumentArrayField,\n DocumentObjectField,\n DocumentStringField,\n DocumentCountryRegionField,\n DocumentIntegerField,\n DocumentFieldCommon,\n DocumentValueField,\n DocumentSelectionMarkField,\n DocumentSignatureField,\n DocumentCurrencyField,\n DocumentAddressField,\n DocumentField,\n} from \"./fields\";\nexport {\n BoundingRegion,\n DocumentKeyValueElement,\n DocumentKeyValuePair,\n DocumentLine,\n DocumentParagraph,\n DocumentSelectionMark,\n DocumentTable,\n DocumentCaption,\n DocumentTableCell,\n DocumentFootnote,\n DocumentWord,\n HasBoundingPolygon,\n DocumentPage,\n} from \"./documentElements\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n DocumentPhoneNumberField,\n DocumentDateField,\n DocumentNumberField,\n DocumentTimeField,\n DocumentArrayField,\n DocumentObjectField,\n DocumentStringField,\n DocumentCountryRegionField,\n DocumentIntegerField,\n DocumentFieldCommon,\n DocumentValueField,\n DocumentSelectionMarkField,\n DocumentSignatureField,\n DocumentCurrencyField,\n DocumentAddressField,\n DocumentField,\n} from \"./fields\";\nexport {\n BoundingRegion,\n DocumentKeyValueElement,\n DocumentKeyValuePair,\n DocumentLine,\n DocumentParagraph,\n DocumentSelectionMark,\n DocumentTable,\n DocumentCaption,\n DocumentTableCell,\n DocumentFootnote,\n DocumentWord,\n HasBoundingPolygon,\n DocumentPage,\n} from \"./documentElements\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyzeDocumentsOptions.js","sourceRoot":"","sources":["../../../src/options/AnalyzeDocumentsOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n AnalyzeResult,\n AnalyzedDocument,\n DocumentAnalysisPollOperationState,\n} from \"../lro/analyze\";\nimport { PollerOptions } from \"./PollerOptions\";\n\n/**\n * Options for the document analysis operation.\n */\nexport interface AnalyzeDocumentOptions<Result = AnalyzeResult<AnalyzedDocument>>\n extends OperationOptions,\n PollerOptions<DocumentAnalysisPollOperationState<Result>> {\n /**\n * Locale hint for text recognition and document analysis.\n *\n * The value may specify only the two-letter language code or a BCP-47 language tag indicating both language and region.\n *\n * Examples:\n * - \"en-US\" (US English)\n * - \"fr\" (French - no region)\n */\n locale?: string;\n /**\n * A list of page ranges (1-indexed) within the input document to analyze, separated by commas\n *\n * Examples: \"1\", \"3-5\", \"1,3-5\"\n */\n pages?: string;\n}\n"]}
1
+ {"version":3,"file":"AnalyzeDocumentsOptions.js","sourceRoot":"","sources":["../../../src/options/AnalyzeDocumentsOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n AnalyzeResult,\n AnalyzedDocument,\n DocumentAnalysisPollOperationState,\n} from \"../lro/analysis\";\nimport { PollerOptions } from \"./PollerOptions\";\n\n/**\n * Options for the document analysis operation.\n */\nexport interface AnalyzeDocumentOptions<Result = AnalyzeResult<AnalyzedDocument>>\n extends OperationOptions,\n PollerOptions<DocumentAnalysisPollOperationState<Result>> {\n /**\n * Locale hint for text recognition and document analysis.\n *\n * The value may specify only the two-letter language code or a BCP-47 language tag indicating both language and region.\n *\n * Examples:\n * - \"en-US\" (US English)\n * - \"fr\" (French - no region)\n */\n locale?: string;\n /**\n * A list of page ranges (1-indexed) within the input document to analyze, separated by commas\n *\n * Examples: \"1\", \"3-5\", \"1,3-5\"\n */\n pages?: string;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  export {};
4
- //# sourceMappingURL=CopyModelOptions.js.map
4
+ //# sourceMappingURL=BeginCopyModelOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BeginCopyModelOptions.js","sourceRoot":"","sources":["../../../src/options/BeginCopyModelOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { DocumentModelOperationState } from \"../lro/administration\";\nimport { PollerOptions } from \"./PollerOptions\";\n\n/**\n * Options for the copy model operation.\n */\nexport interface BeginCopyModelOptions\n extends OperationOptions,\n PollerOptions<DocumentModelOperationState> {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BuildModelOptions.js","sourceRoot":"","sources":["../../../src/options/BuildModelOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqBlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC;;;OAGG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { TrainingPollOperationState } from \"../lro/training\";\nimport { PollerOptions } from \"./PollerOptions\";\n\n/**\n * Supported model build modes. The model build mode selects the engine that the service uses to train the model based\n * on the labeled training data.\n *\n * The options are:\n * - \"neural\", which yields the highest quality of model that is capable of extracting data from classes of documents\n * that have the same structure of data, but different layouts (for example, W2 tax forms, which may vary from company\n * to company, but always contain the same information).\n * - \"template\", which requires all documents to have the same fixed layout (template).\n *\n * Please see the following link for more information: https://aka.ms/azsdk/formrecognizer/buildmode\n */\nexport type DocumentModelBuildMode =\n typeof DocumentModelBuildMode[keyof typeof DocumentModelBuildMode];\n\n/**\n * Supported values of `DocumentModelBuildMode`.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const DocumentModelBuildMode = {\n /**\n * A mode that builds a model assuming that documents all follow the same, fixed template layout (the same relative\n * positioning of fields between documents).\n */\n Template: \"template\",\n /**\n * A mode that uses a neural engine to extract fields, allowing for documents that have different visual appearances,\n * but that contain the same information.\n */\n Neural: \"neural\",\n} as const;\n\n/**\n * Options common to all operations that define new models, such as `beginBuildModel`, `beginComposeModel`, and\n * `getCopyAuthorization`.\n */\nexport interface CommonModelCreationOptions {\n /**\n * A textual description of the model (can be any text).\n */\n description?: string;\n\n /**\n * Additional, user-specified key-value pairs to associate with the model as persistent metadata.\n */\n tags?: Record<string, string>;\n}\n\n/**\n * Options for the model build operation.\n */\nexport interface BuildModelOptions\n extends OperationOptions,\n CommonModelCreationOptions,\n PollerOptions<TrainingPollOperationState> {}\n"]}
1
+ {"version":3,"file":"BuildModelOptions.js","sourceRoot":"","sources":["../../../src/options/BuildModelOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqBlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC;;;OAGG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { DocumentModelOperationState } from \"../lro/administration\";\nimport { PollerOptions } from \"./PollerOptions\";\n\n/**\n * Supported model build modes. The model build mode selects the engine that the service uses to train the model based\n * on the labeled training data.\n *\n * The options are:\n * - \"neural\", which yields the highest quality of model that is capable of extracting data from classes of documents\n * that have the same structure of data, but different layouts (for example, W2 tax forms, which may vary from company\n * to company, but always contain the same information).\n * - \"template\", which requires all documents to have the same fixed layout (template).\n *\n * Please see the following link for more information: https://aka.ms/azsdk/formrecognizer/buildmode\n */\nexport type DocumentModelBuildMode =\n typeof DocumentModelBuildMode[keyof typeof DocumentModelBuildMode];\n\n/**\n * Supported values of `DocumentModelBuildMode`.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const DocumentModelBuildMode = {\n /**\n * A mode that builds a model assuming that documents all follow the same, fixed template layout (the same relative\n * positioning of fields between documents).\n */\n Template: \"template\",\n /**\n * A mode that uses a neural engine to extract fields, allowing for documents that have different visual appearances,\n * but that contain the same information.\n */\n Neural: \"neural\",\n} as const;\n\n/**\n * Options common to all operations that define new models, such as `beginBuildDocumentModel`,\n * `beginComposeDocumentModel`, and `getCopyAuthorization`.\n */\nexport interface CommonModelCreationOptions {\n /**\n * A textual description of the model (can be any text).\n */\n description?: string;\n\n /**\n * Additional, user-specified key-value pairs to associate with the model as persistent metadata.\n */\n tags?: Record<string, string>;\n}\n\n/**\n * Options for the model creation operation.\n */\nexport interface CreateDocumentModelOptions\n extends OperationOptions,\n CommonModelCreationOptions,\n PollerOptions<DocumentModelOperationState> {}\n\n/**\n * Options for the model build operation.\n */\nexport interface BeginBuildDocumentModelOptions extends CreateDocumentModelOptions {}\n\n/**\n * Options for the model compose operation.\n */\nexport interface BeginComposeDocumentModelOptions extends CreateDocumentModelOptions {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteModelOptions.js","sourceRoot":"","sources":["../../../src/options/DeleteModelOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for model deletion.\n */\nexport interface DeleteModelOptions extends OperationOptions {}\n"]}
1
+ {"version":3,"file":"DeleteModelOptions.js","sourceRoot":"","sources":["../../../src/options/DeleteModelOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for model deletion.\n */\nexport interface DeleteDocumentModelOptions extends OperationOptions {}\n"]}
@@ -11,9 +11,10 @@ export const FormRecognizerApiVersion = {
11
11
  * If using a beta package version, this will be identical to the latest preview version. Otherwise, it will be
12
12
  * identical to the latest stable version.
13
13
  */
14
- Latest: "2022-06-30-preview",
14
+ Latest: "2022-08-31",
15
15
  // TODO (GA): Add a `Stable` version selector that picks the latest GA version, even in beta packages, and an exact
16
16
  // version entry for the GA version.
17
+ Stable: "2022-08-31",
17
18
  };
18
19
  /**
19
20
  * Supported values of StringIndexType.
@@ -36,6 +37,6 @@ export const StringIndexType = {
36
37
  */
37
38
  export const DEFAULT_GENERATED_CLIENT_OPTIONS = {
38
39
  stringIndexType: StringIndexType.Utf16CodeUnit,
39
- apiVersion: FormRecognizerApiVersion.Latest,
40
+ apiVersion: FormRecognizerApiVersion.Stable,
40
41
  };
41
42
  //# sourceMappingURL=FormRecognizerClientOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;;;;;OAKG;IACH,MAAM,EAAE,oBAAoB;IAC5B,mHAAmH;IACnH,oCAAoC;CAC5B,CAAC;AAOX;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAkC;IAC7E,eAAe,EAAE,eAAe,CAAC,aAAa;IAC9C,UAAU,EAAE,wBAAwB,CAAC,MAAM;CAC5C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommonClientOptions } from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"../generated\";\n\n/**\n * Valid values of the Form Recognizer service REST API version.\n */\nexport type FormRecognizerApiVersion =\n typeof FormRecognizerApiVersion[keyof typeof FormRecognizerApiVersion];\n\n/**\n * Supported and common values of FormRecognizerApiVersion.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const FormRecognizerApiVersion = {\n /**\n * The newest version of the service known to be supported by the client (default).\n *\n * If using a beta package version, this will be identical to the latest preview version. Otherwise, it will be\n * identical to the latest stable version.\n */\n Latest: \"2022-06-30-preview\",\n // TODO (GA): Add a `Stable` version selector that picks the latest GA version, even in beta packages, and an exact\n // version entry for the GA version.\n} as const;\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = typeof StringIndexType[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS: GeneratedClientOptionalParams = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n apiVersion: FormRecognizerApiVersion.Latest,\n};\n\n/**\n * Configurable options for the Form Recognizer service clients (DocumentAnalysisClient and\n * DocumentModelAdministrationClient).\n */\nexport interface FormRecognizerCommonClientOptions extends CommonClientOptions {\n /**\n * The version of the Form Recognizer REST API to call. Service versions 2.1 and lower (non-date-based versions) are\n * not supported by this client. To use API version 2.1, please use version 3 of the Azure Form Recognizer SDK for\n * JavaScript (\\@azure/ai-form-recognizer\\@^3.2.0).\n *\n * Default: FormRecognizerApiVersion.Latest (\"2022-06-30-preview\")\n */\n apiVersion?: FormRecognizerApiVersion;\n}\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends FormRecognizerCommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions\n extends FormRecognizerCommonClientOptions {}\n"]}
1
+ {"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;;;;;OAKG;IACH,MAAM,EAAE,YAAY;IACpB,mHAAmH;IACnH,oCAAoC;IACpC,MAAM,EAAE,YAAY;CACZ,CAAC;AAOX;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,eAAe,EAAE,eAAe,CAAC,aAAa;IAC9C,UAAU,EAAE,wBAAwB,CAAC,MAAM;CACnC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommonClientOptions } from \"@azure/core-client\";\n\n/**\n * Valid values of the Form Recognizer service REST API version.\n */\nexport type FormRecognizerApiVersion =\n typeof FormRecognizerApiVersion[keyof typeof FormRecognizerApiVersion];\n\n/**\n * Supported and common values of FormRecognizerApiVersion.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const FormRecognizerApiVersion = {\n /**\n * The newest version of the service known to be supported by the client (default).\n *\n * If using a beta package version, this will be identical to the latest preview version. Otherwise, it will be\n * identical to the latest stable version.\n */\n Latest: \"2022-08-31\",\n // TODO (GA): Add a `Stable` version selector that picks the latest GA version, even in beta packages, and an exact\n // version entry for the GA version.\n Stable: \"2022-08-31\",\n} as const;\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = typeof StringIndexType[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n apiVersion: FormRecognizerApiVersion.Stable,\n} as const;\n\n/**\n * Configurable options for the Form Recognizer service clients (DocumentAnalysisClient and\n * DocumentModelAdministrationClient).\n */\nexport interface FormRecognizerCommonClientOptions extends CommonClientOptions {\n /**\n * The version of the Form Recognizer REST API to call. Service versions 2.1 and lower (non-date-based versions) are\n * not supported by this client. To use API version 2.1, please use version 3 of the Azure Form Recognizer SDK for\n * JavaScript (\\@azure/ai-form-recognizer\\@^3.2.0).\n *\n * Default: FormRecognizerApiVersion.Stable (\"2022-08-31\")\n */\n apiVersion?: FormRecognizerApiVersion;\n}\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends FormRecognizerCommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions\n extends FormRecognizerCommonClientOptions {}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  export {};
4
- //# sourceMappingURL=GetInfoOptions.js.map
4
+ //# sourceMappingURL=GetResourceDetailsOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetResourceDetailsOptions.js","sourceRoot":"","sources":["../../../src/options/GetResourceDetailsOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for retrieving Form Recognizer resource information.\n */\nexport interface GetResourceDetailsOptions extends OperationOptions {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/options/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAGL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGL,wBAAwB,EAExB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAKL,sBAAsB,EAYtB,eAAe,EACf,wBAAwB,GACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AnalyzeDocumentOptions } from \"./AnalyzeDocumentsOptions\";\nimport {\n BuildModelOptions,\n CommonModelCreationOptions,\n DocumentModelBuildMode,\n} from \"./BuildModelOptions\";\nimport { CopyModelOptions } from \"./CopyModelOptions\";\nimport { DeleteModelOptions } from \"./DeleteModelOptions\";\nimport {\n DocumentAnalysisClientOptions,\n DocumentModelAdministrationClientOptions,\n FormRecognizerApiVersion,\n FormRecognizerCommonClientOptions,\n StringIndexType,\n} from \"./FormRecognizerClientOptions\";\nimport { GetCopyAuthorizationOptions } from \"./GetCopyAuthorizationOptions\";\nimport { GetInfoOptions } from \"./GetInfoOptions\";\nimport { GetModelOptions } from \"./GetModelOptions\";\nimport { GetOperationOptions } from \"./GetOperationOptions\";\nimport { ListModelsOptions } from \"./ListModelsOptions\";\nimport { ListOperationsOptions } from \"./ListOperationsOptions\";\nimport { PollerOptions } from \"./PollerOptions\";\n\nexport {\n AnalyzeDocumentOptions,\n BuildModelOptions,\n CommonModelCreationOptions,\n CopyModelOptions,\n DocumentModelBuildMode,\n FormRecognizerCommonClientOptions,\n DocumentAnalysisClientOptions,\n DocumentModelAdministrationClientOptions,\n GetCopyAuthorizationOptions,\n GetInfoOptions,\n GetModelOptions,\n GetOperationOptions,\n DeleteModelOptions,\n ListModelsOptions,\n ListOperationsOptions,\n PollerOptions,\n StringIndexType,\n FormRecognizerApiVersion,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/options/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAGL,sBAAsB,GAGvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGL,wBAAwB,EAExB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAOL,sBAAsB,EAYtB,eAAe,EACf,wBAAwB,GACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AnalyzeDocumentOptions } from \"./AnalyzeDocumentsOptions\";\nimport {\n CreateDocumentModelOptions,\n CommonModelCreationOptions,\n DocumentModelBuildMode,\n BeginBuildDocumentModelOptions,\n BeginComposeDocumentModelOptions,\n} from \"./BuildModelOptions\";\nimport { BeginCopyModelOptions } from \"./BeginCopyModelOptions\";\nimport { DeleteDocumentModelOptions } from \"./DeleteModelOptions\";\nimport {\n DocumentAnalysisClientOptions,\n DocumentModelAdministrationClientOptions,\n FormRecognizerApiVersion,\n FormRecognizerCommonClientOptions,\n StringIndexType,\n} from \"./FormRecognizerClientOptions\";\nimport { GetCopyAuthorizationOptions } from \"./GetCopyAuthorizationOptions\";\nimport { GetResourceDetailsOptions } from \"./GetResourceDetailsOptions\";\nimport { GetModelOptions } from \"./GetModelOptions\";\nimport { GetOperationOptions } from \"./GetOperationOptions\";\nimport { ListModelsOptions } from \"./ListModelsOptions\";\nimport { ListOperationsOptions } from \"./ListOperationsOptions\";\nimport { PollerOptions } from \"./PollerOptions\";\n\nexport {\n AnalyzeDocumentOptions,\n CreateDocumentModelOptions,\n BeginBuildDocumentModelOptions,\n BeginComposeDocumentModelOptions,\n CommonModelCreationOptions,\n BeginCopyModelOptions,\n DocumentModelBuildMode,\n FormRecognizerCommonClientOptions,\n DocumentAnalysisClientOptions,\n DocumentModelAdministrationClientOptions,\n GetCopyAuthorizationOptions,\n GetResourceDetailsOptions,\n GetModelOptions,\n GetOperationOptions,\n DeleteDocumentModelOptions,\n ListModelsOptions,\n ListOperationsOptions,\n PollerOptions,\n StringIndexType,\n FormRecognizerApiVersion,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,4CAA4C,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,eAAe,EAAiC,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,2CAA2C;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAE3D,gBAAgB;AAChB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAI,CAAI,EAAK,EAAE,CAAC,CAAC,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAA4B,CAAS,EAAmB,EAAE,CACpF,CAA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\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createFormRecognizerAzureKeyCredentialPolicy } from \"./azureKeyCredentialPolicy\";\nimport { DEFAULT_COGNITIVE_SCOPE } from \"./constants\";\nimport { GeneratedClient, GeneratedClientOptionalParams } from \"./generated\";\nimport { DEFAULT_GENERATED_CLIENT_OPTIONS } from \"./options/FormRecognizerClientOptions\";\n\nimport * as Mappers from \"./generated/models/mappers\";\nimport { createSerializer } from \"@azure/core-client\";\nexport { Mappers };\n\n// This is used for URL request processing.\nexport const SERIALIZER = createSerializer(Mappers, false);\n\n/** @internal */\nexport const identity = <T>(x: T): T => x;\n\n/**\n * Type-strong uncapitalization.\n * @internal\n */\nexport const uncapitalize = <S extends string = string>(s: string): Uncapitalize<S> =>\n (s.substring(0, 1).toLowerCase() + s.substring(1)) as Uncapitalize<S>;\n\n/**\n * Type-strong capitalization\n * @internal\n */\nexport const capitalize = <S extends string = string>(s: S): Capitalize<S> =>\n (s.substring(0, 1).toUpperCase() + s.substring(1)) as Capitalize<S>;\n\n/**\n * A string that is a capital letter. See the `Acronymic` type for the use of this seemingly-trivial type.\n * @hidden\n */\nexport type EnglishCapitalLetter =\n | \"A\"\n | \"B\"\n | \"C\"\n | \"D\"\n | \"E\"\n | \"F\"\n | \"G\"\n | \"H\"\n | \"I\"\n | \"J\"\n | \"K\"\n | \"L\"\n | \"M\"\n | \"N\"\n | \"O\"\n | \"P\"\n | \"Q\"\n | \"R\"\n | \"S\"\n | \"T\"\n | \"U\"\n | \"V\"\n | \"W\"\n | \"X\"\n | \"Y\"\n | \"Z\";\n\n/**\n * The type of a string that starts with at least two capital letters. Such strings appear to be \"acronymic\" for the\n * purposes of our naming convention. This information is used to determine whether or not a field of a document object\n * should be uncapitalized.\n *\n * Examples:\n * - \"SSN\" (Acronymic), will be mapped to a field of the same name (\"SSN\")\n * - \"SocialSecurityNumber\" (not Acronymic), will be mapped to the camelCase field name \"socialSecurityNumber\"\n *\n * @hidden\n */\nexport type Acronymic = `${EnglishCapitalLetter}${EnglishCapitalLetter}${string}`;\n\n/**\n * Tests if a string looks like it begins with an acronym, i.e. it starts with two capital letters.\n * @internal\n */\nexport const isAcronymic = (s: string): s is Acronymic => {\n return /^[A-Z][A-Z]/.test(s);\n};\n\n/**\n * Map an optional value through a function\n * @internal\n */\nexport const maybemap = <T1, T2>(value: T1 | undefined, f: (v: T1) => T2): T2 | undefined =>\n value === undefined ? undefined : f(value);\n\n/**\n * Create a GeneratedClient.\n * @internal\n */\nexport function makeServiceClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: GeneratedClientOptionalParams\n): GeneratedClient {\n const client = new GeneratedClient(endpoint?.replace(/\\/$/, \"\"), {\n ...DEFAULT_GENERATED_CLIENT_OPTIONS,\n ...options,\n });\n\n const authPolicy = isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy({\n credential,\n scopes: DEFAULT_COGNITIVE_SCOPE,\n })\n : createFormRecognizerAzureKeyCredentialPolicy(credential);\n\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,4CAA4C,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,eAAe,EAAiC,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oB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V,CAAC;IAEH,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;QAC9C,CAAC,CAAC,+BAA+B,CAAC;YAC9B,UAAU;YACV,MAAM,EAAE,uBAAuB;SAChC,CAAC;QACJ,CAAC,CAAC,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAE7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createFormRecognizerAzureKeyCredentialPolicy } from \"./azureKeyCredentialPolicy\";\nimport { DEFAULT_COGNITIVE_SCOPE } from \"./constants\";\nimport { GeneratedClient, GeneratedClientOptionalParams } from \"./generated\";\nimport { DEFAULT_GENERATED_CLIENT_OPTIONS } from \"./options/FormRecognizerClientOptions\";\n\nimport * as Mappers from \"./generated/models/mappers\";\nimport { createSerializer } from \"@azure/core-client\";\nexport { Mappers };\n\n// This is used for URL request processing.\nexport const SERIALIZER = createSerializer(Mappers, false);\n\n/** @internal */\nexport const identity = <T>(x: T): T => x;\n\n/**\n * Type-strong uncapitalization.\n * @internal\n */\nexport const uncapitalize = <S extends string = string>(s: string): Uncapitalize<S> =>\n (s.substring(0, 1).toLowerCase() + s.substring(1)) as Uncapitalize<S>;\n\n/**\n * Type-strong capitalization\n * @internal\n */\nexport const capitalize = <S extends string = string>(s: S): Capitalize<S> =>\n (s.substring(0, 1).toUpperCase() + s.substring(1)) as Capitalize<S>;\n\n/**\n * Tests if a string looks like it begins with an acronym, i.e. it starts with two capital letters.\n * @internal\n */\nexport const isAcronymic = (s: string): boolean => {\n return /^[A-Z][A-Z]/.test(s);\n};\n\n/**\n * Map an optional value through a function\n * @internal\n */\nexport const maybemap = <T1, T2>(value: T1 | undefined, f: (v: T1) => T2): T2 | undefined =>\n value === undefined ? undefined : f(value);\n\n/**\n * Create a GeneratedClient.\n * @internal\n */\nexport function makeServiceClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: GeneratedClientOptionalParams\n): GeneratedClient {\n const client = new GeneratedClient(endpoint?.replace(/\\/$/, \"\"), {\n ...DEFAULT_GENERATED_CLIENT_OPTIONS,\n ...options,\n });\n\n const authPolicy = isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy({\n credential,\n scopes: DEFAULT_COGNITIVE_SCOPE,\n })\n : createFormRecognizerAzureKeyCredentialPolicy(credential);\n\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "An isomorphic client library for the Azure Form Recognizer service.",
6
- "version": "4.0.0-beta.4",
6
+ "version": "4.0.0",
7
7
  "keywords": [
8
8
  "node",
9
9
  "azure",
@@ -15,9 +15,6 @@
15
15
  "license": "MIT",
16
16
  "main": "./dist/index.js",
17
17
  "module": "./dist-esm/src/index.js",
18
- "browser": {
19
- "./dist-esm/src/utils/utils.node.js": "./dist-esm/src/utils/utils.browser.js"
20
- },
21
18
  "types": "./types/ai-form-recognizer.d.ts",
22
19
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/formrecognizer/ai-form-recognizer/",
23
20
  "repository": "github:Azure/azure-sdk-for-js",
@@ -57,12 +54,13 @@
57
54
  "build:node": "tsc -p . && dev-tool run bundle",
58
55
  "build:samples": "echo Obsolete.",
59
56
  "build:test": "tsc -p . && dev-tool run bundle",
60
- "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
61
- "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
57
+ "build": "npm run clean && tsc -p . && dev-tool run bundle && npm run bundle:bin && api-extractor run --local",
58
+ "bundle:bin": "rollup -c rollup.config.bin.js 2>&1",
59
+ "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"bin/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
62
60
  "clean": "rimraf dist dist-* temp types *.tgz *.log test-results.*xml",
63
61
  "execute:samples": "dev-tool samples run samples-dev/",
64
62
  "extract-api": "tsc -p . && api-extractor run --local",
65
- "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
63
+ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"bin/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
66
64
  "generate:client": "autorest --typescript swagger/README.md",
67
65
  "integration-test:browser": "dev-tool run test:browser",
68
66
  "integration-test:node": "dev-tool run test:node-js-input -- --timeout 1200000 --exclude 'dist-esm/**/browser/*.spec.js' \"dist-esm/test/**/*.spec.js\" \"dist-esm/test/**/node/*.spec.js\"",
@@ -99,9 +97,11 @@
99
97
  "@azure-tools/test-credential": "^1.0.0",
100
98
  "@azure-tools/test-recorder": "^2.0.0",
101
99
  "@microsoft/api-extractor": "7.18.11",
100
+ "@rollup/plugin-node-resolve": "~13.3.0",
102
101
  "@types/chai": "^4.1.6",
103
102
  "@types/mocha": "^7.0.2",
104
103
  "@types/node": "^12.0.0",
104
+ "@types/prettier": "~2.6.3",
105
105
  "@types/sinon": "^9.0.4",
106
106
  "chai": "^4.2.0",
107
107
  "chai-as-promised": "^7.1.1",
@@ -120,11 +120,13 @@
120
120
  "karma-mocha": "^2.0.1",
121
121
  "karma-mocha-reporter": "^2.2.5",
122
122
  "karma-sourcemap-loader": "^0.3.8",
123
+ "magic-string": "~0.26.2",
123
124
  "mocha": "^7.1.1",
124
125
  "mocha-junit-reporter": "^2.0.0",
125
126
  "nyc": "^15.0.0",
126
127
  "prettier": "^2.5.1",
127
128
  "rimraf": "^3.0.0",
129
+ "rollup": "~2.75.5",
128
130
  "sinon": "^9.0.2",
129
131
  "source-map-support": "^0.5.9",
130
132
  "typescript": "~4.6.0"
@@ -159,9 +161,9 @@
159
161
  "typescript/assets/forms/selection_mark_form.pdf",
160
162
  "javascript/assets/forms/selection_mark_form.pdf"
161
163
  ],
162
- "./assets/identityDocument/license.jpg": [
163
- "typescript/assets/identityDocument/license.jpg",
164
- "javascript/assets/identityDocument/license.jpg"
164
+ "./assets/identityDocument/license.png": [
165
+ "typescript/assets/identityDocument/license.png",
166
+ "javascript/assets/identityDocument/license.png"
165
167
  ],
166
168
  "./assets/invoice/sample_invoice.jpg": [
167
169
  "typescript/assets/invoice/sample_invoice.jpg",
@@ -170,6 +172,10 @@
170
172
  "./assets/receipt/contoso-allinone.jpg": [
171
173
  "typescript/assets/receipt/contoso-allinone.jpg",
172
174
  "javascript/assets/receipt/contoso-allinone.jpg"
175
+ ],
176
+ "./assets/w2/w2-single.png": [
177
+ "typescript/assets/w2/w2-single.png",
178
+ "javascript/assets/w2/w2-single.png"
173
179
  ]
174
180
  }
175
181
  }