@azure/ai-text-analytics 5.1.1-alpha.20221017.1 → 5.1.1-alpha.20230126.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../src/lro/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAqC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI5E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+ChC;;;GAGG;AACH,MAAM,OAAgB,cAAgC,SAAQ,MAAuB;IAArF;;QACE;;WAEG;QACI,uBAAkB,GAAW,IAAI,CAAC;IAQ3C,CAAC;IANC;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAgB,qBAAqB;IAGzC,YAAmB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAcpC;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState, Poller } from \"@azure/core-lro\";\nimport { TracingClient } from \"@azure/core-tracing\";\nimport { GeneratedClient } from \"../generated/generatedClient\";\nimport { State, TextDocumentInput } from \"../generated/models\";\nimport { delay } from \"../util\";\n\n/**\n * Common parameters to a Poller.\n * @internal\n */\nexport interface AnalysisPollerOptions {\n readonly client: GeneratedClient;\n readonly tracing: TracingClient;\n readonly documents: TextDocumentInput[];\n updateIntervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * Metadata information for an analysis poller operation.\n */\nexport interface OperationMetadata {\n /**\n * The date and time the operation was created.\n */\n createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n expiresOn?: Date;\n /**\n * The operation id.\n */\n operationId: string;\n /**\n * The time the operation status was last updated.\n */\n lastModifiedOn: Date;\n /**\n * The current status of the operation.\n */\n status: State;\n}\n\n/**\n * An interface representing the state of an analysis poller operation.\n */\nexport interface AnalysisPollOperationState<TResult>\n extends PollOperationState<TResult>,\n OperationMetadata {}\n\n/**\n * Common properties and methods of analysis Pollers.\n * @internal\n */\nexport abstract class AnalysisPoller<TState, TResult> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public updateIntervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return delay(this.updateIntervalInMs);\n }\n}\n\n/**\n * Common properties and methods of polling operations.\n * @internal\n */\nexport abstract class AnalysisPollOperation<TState, TResult>\n implements PollOperation<TState, TResult>\n{\n constructor(public state: TState) {}\n\n /**\n * Meant to reach to the service and update the Poller operation.\n * @param options - The optional parameters, which is only an abortSignal from \\@azure/abort-controller\n */\n public abstract update(): Promise<PollOperation<TState, TResult>>;\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n * @param options - The optional parameters, which is only an abortSignal from \\@azure/abort-controller\n */\n public abstract cancel(): Promise<PollOperation<TState, TResult>>;\n\n /**\n * Serializes the Poller operation.\n */\n public toString(): string {\n return JSON.stringify({\n state: this.state,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../src/lro/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAqC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI5E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+ChC;;;GAGG;AACH,MAAM,OAAgB,cAGpB,SAAQ,MAAuB;IAHjC;;QAIE;;WAEG;QACI,uBAAkB,GAAW,IAAI,CAAC;IAQ3C,CAAC;IANC;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAgB,qBAAqB;IAGzC,YAAmB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAcpC;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState, Poller } from \"@azure/core-lro\";\nimport { TracingClient } from \"@azure/core-tracing\";\nimport { GeneratedClient } from \"../generated/generatedClient\";\nimport { State, TextDocumentInput } from \"../generated/models\";\nimport { delay } from \"../util\";\n\n/**\n * Common parameters to a Poller.\n * @internal\n */\nexport interface AnalysisPollerOptions {\n readonly client: GeneratedClient;\n readonly tracing: TracingClient;\n readonly documents: TextDocumentInput[];\n updateIntervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * Metadata information for an analysis poller operation.\n */\nexport interface OperationMetadata {\n /**\n * The date and time the operation was created.\n */\n createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n expiresOn?: Date;\n /**\n * The operation id.\n */\n operationId: string;\n /**\n * The time the operation status was last updated.\n */\n lastModifiedOn: Date;\n /**\n * The current status of the operation.\n */\n status: State;\n}\n\n/**\n * An interface representing the state of an analysis poller operation.\n */\nexport interface AnalysisPollOperationState<TResult>\n extends PollOperationState<TResult>,\n OperationMetadata {}\n\n/**\n * Common properties and methods of analysis Pollers.\n * @internal\n */\nexport abstract class AnalysisPoller<\n TState extends PollOperationState<TResult>,\n TResult\n> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public updateIntervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return delay(this.updateIntervalInMs);\n }\n}\n\n/**\n * Common properties and methods of polling operations.\n * @internal\n */\nexport abstract class AnalysisPollOperation<TState, TResult>\n implements PollOperation<TState, TResult>\n{\n constructor(public state: TState) {}\n\n /**\n * Meant to reach to the service and update the Poller operation.\n * @param options - The optional parameters, which is only an abortSignal from \\@azure/abort-controller\n */\n public abstract update(): Promise<PollOperation<TState, TResult>>;\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n * @param options - The optional parameters, which is only an abortSignal from \\@azure/abort-controller\n */\n public abstract cancel(): Promise<PollOperation<TState, TResult>>;\n\n /**\n * Serializes the Poller operation.\n */\n public toString(): string {\n return JSON.stringify({\n state: this.state,\n });\n }\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 Text Analytics service.",
6
- "version": "5.1.1-alpha.20221017.1",
6
+ "version": "5.1.1-alpha.20230126.1",
7
7
  "keywords": [
8
8
  "node",
9
9
  "azure",
@@ -107,7 +107,7 @@
107
107
  "@azure/identity": "^2.0.1",
108
108
  "@azure/test-utils": ">=1.0.0-alpha <1.0.0-alphb",
109
109
  "@azure-tools/test-recorder": "^2.0.0",
110
- "@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
110
+ "@azure-tools/test-credential": "^1.0.0",
111
111
  "@microsoft/api-extractor": "^7.31.1",
112
112
  "@types/chai": "^4.1.6",
113
113
  "@types/chai-as-promised": "^7.1.0",
@@ -139,6 +139,6 @@
139
139
  "sinon": "^9.0.2",
140
140
  "source-map-support": "^0.5.9",
141
141
  "ts-node": "^10.0.0",
142
- "typescript": "~4.6.0"
142
+ "typescript": "~4.8.0"
143
143
  }
144
144
  }