@azure/core-client 1.9.3-alpha.20241029.3 → 1.9.3-alpha.20241030.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/dist/browser/authorizeRequestOnClaimChallenge.d.ts +1 -1
- package/dist/browser/authorizeRequestOnClaimChallenge.d.ts.map +1 -1
- package/dist/browser/authorizeRequestOnClaimChallenge.js.map +1 -1
- package/dist/browser/authorizeRequestOnTenantChallenge.d.ts +1 -1
- package/dist/browser/authorizeRequestOnTenantChallenge.d.ts.map +1 -1
- package/dist/browser/authorizeRequestOnTenantChallenge.js.map +1 -1
- package/dist/browser/deserializationPolicy.d.ts +2 -2
- package/dist/browser/deserializationPolicy.d.ts.map +1 -1
- package/dist/browser/deserializationPolicy.js +2 -2
- package/dist/browser/deserializationPolicy.js.map +1 -1
- package/dist/browser/httpClientCache.d.ts +1 -1
- package/dist/browser/httpClientCache.d.ts.map +1 -1
- package/dist/browser/httpClientCache.js.map +1 -1
- package/dist/browser/interfaceHelpers.d.ts +1 -1
- package/dist/browser/interfaceHelpers.d.ts.map +1 -1
- package/dist/browser/interfaceHelpers.js.map +1 -1
- package/dist/browser/interfaces.d.ts +3 -3
- package/dist/browser/interfaces.d.ts.map +1 -1
- package/dist/browser/interfaces.js.map +1 -1
- package/dist/browser/operationHelpers.d.ts +1 -1
- package/dist/browser/operationHelpers.d.ts.map +1 -1
- package/dist/browser/operationHelpers.js.map +1 -1
- package/dist/browser/pipeline.d.ts +4 -4
- package/dist/browser/pipeline.d.ts.map +1 -1
- package/dist/browser/pipeline.js.map +1 -1
- package/dist/browser/serializationPolicy.d.ts +2 -2
- package/dist/browser/serializationPolicy.d.ts.map +1 -1
- package/dist/browser/serializationPolicy.js +1 -1
- package/dist/browser/serializationPolicy.js.map +1 -1
- package/dist/browser/serializer.d.ts +1 -1
- package/dist/browser/serializer.d.ts.map +1 -1
- package/dist/browser/serializer.js +1 -1
- package/dist/browser/serializer.js.map +1 -1
- package/dist/browser/serviceClient.d.ts +3 -3
- package/dist/browser/serviceClient.d.ts.map +1 -1
- package/dist/browser/serviceClient.js +1 -1
- package/dist/browser/serviceClient.js.map +1 -1
- package/dist/browser/state-browser.d.mts.map +1 -1
- package/dist/browser/state-browser.mjs.map +1 -1
- package/dist/browser/state.d.ts +1 -1
- package/dist/browser/urlHelpers.d.ts +1 -1
- package/dist/browser/urlHelpers.d.ts.map +1 -1
- package/dist/browser/urlHelpers.js.map +1 -1
- package/dist/browser/utils.d.ts +1 -1
- package/dist/browser/utils.d.ts.map +1 -1
- package/dist/browser/utils.js.map +1 -1
- package/dist/commonjs/authorizeRequestOnClaimChallenge.d.ts +1 -1
- package/dist/commonjs/authorizeRequestOnClaimChallenge.d.ts.map +1 -1
- package/dist/commonjs/authorizeRequestOnClaimChallenge.js.map +1 -1
- package/dist/commonjs/authorizeRequestOnTenantChallenge.d.ts +1 -1
- package/dist/commonjs/authorizeRequestOnTenantChallenge.d.ts.map +1 -1
- package/dist/commonjs/authorizeRequestOnTenantChallenge.js.map +1 -1
- package/dist/commonjs/deserializationPolicy.d.ts +2 -2
- package/dist/commonjs/deserializationPolicy.d.ts.map +1 -1
- package/dist/commonjs/deserializationPolicy.js.map +1 -1
- package/dist/commonjs/httpClientCache.d.ts +1 -1
- package/dist/commonjs/httpClientCache.d.ts.map +1 -1
- package/dist/commonjs/httpClientCache.js.map +1 -1
- package/dist/commonjs/interfaceHelpers.d.ts +1 -1
- package/dist/commonjs/interfaceHelpers.d.ts.map +1 -1
- package/dist/commonjs/interfaceHelpers.js.map +1 -1
- package/dist/commonjs/interfaces.d.ts +3 -3
- package/dist/commonjs/interfaces.d.ts.map +1 -1
- package/dist/commonjs/interfaces.js.map +1 -1
- package/dist/commonjs/operationHelpers.d.ts +1 -1
- package/dist/commonjs/operationHelpers.d.ts.map +1 -1
- package/dist/commonjs/operationHelpers.js.map +1 -1
- package/dist/commonjs/pipeline.d.ts +4 -4
- package/dist/commonjs/pipeline.d.ts.map +1 -1
- package/dist/commonjs/pipeline.js.map +1 -1
- package/dist/commonjs/serializationPolicy.d.ts +2 -2
- package/dist/commonjs/serializationPolicy.d.ts.map +1 -1
- package/dist/commonjs/serializationPolicy.js.map +1 -1
- package/dist/commonjs/serializer.d.ts +1 -1
- package/dist/commonjs/serializer.d.ts.map +1 -1
- package/dist/commonjs/serializer.js.map +1 -1
- package/dist/commonjs/serviceClient.d.ts +3 -3
- package/dist/commonjs/serviceClient.d.ts.map +1 -1
- package/dist/commonjs/serviceClient.js.map +1 -1
- package/dist/commonjs/urlHelpers.d.ts +1 -1
- package/dist/commonjs/urlHelpers.d.ts.map +1 -1
- package/dist/commonjs/urlHelpers.js.map +1 -1
- package/dist/commonjs/utils.d.ts +1 -1
- package/dist/commonjs/utils.d.ts.map +1 -1
- package/dist/commonjs/utils.js.map +1 -1
- package/dist/core-client.d.ts +13 -13
- package/dist/esm/authorizeRequestOnClaimChallenge.d.ts +1 -1
- package/dist/esm/authorizeRequestOnClaimChallenge.d.ts.map +1 -1
- package/dist/esm/authorizeRequestOnClaimChallenge.js.map +1 -1
- package/dist/esm/authorizeRequestOnTenantChallenge.d.ts +1 -1
- package/dist/esm/authorizeRequestOnTenantChallenge.d.ts.map +1 -1
- package/dist/esm/authorizeRequestOnTenantChallenge.js.map +1 -1
- package/dist/esm/deserializationPolicy.d.ts +2 -2
- package/dist/esm/deserializationPolicy.d.ts.map +1 -1
- package/dist/esm/deserializationPolicy.js +2 -2
- package/dist/esm/deserializationPolicy.js.map +1 -1
- package/dist/esm/httpClientCache.d.ts +1 -1
- package/dist/esm/httpClientCache.d.ts.map +1 -1
- package/dist/esm/httpClientCache.js.map +1 -1
- package/dist/esm/interfaceHelpers.d.ts +1 -1
- package/dist/esm/interfaceHelpers.d.ts.map +1 -1
- package/dist/esm/interfaceHelpers.js.map +1 -1
- package/dist/esm/interfaces.d.ts +3 -3
- package/dist/esm/interfaces.d.ts.map +1 -1
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/operationHelpers.d.ts +1 -1
- package/dist/esm/operationHelpers.d.ts.map +1 -1
- package/dist/esm/operationHelpers.js.map +1 -1
- package/dist/esm/pipeline.d.ts +4 -4
- package/dist/esm/pipeline.d.ts.map +1 -1
- package/dist/esm/pipeline.js.map +1 -1
- package/dist/esm/serializationPolicy.d.ts +2 -2
- package/dist/esm/serializationPolicy.d.ts.map +1 -1
- package/dist/esm/serializationPolicy.js +1 -1
- package/dist/esm/serializationPolicy.js.map +1 -1
- package/dist/esm/serializer.d.ts +1 -1
- package/dist/esm/serializer.d.ts.map +1 -1
- package/dist/esm/serializer.js +1 -1
- package/dist/esm/serializer.js.map +1 -1
- package/dist/esm/serviceClient.d.ts +3 -3
- package/dist/esm/serviceClient.d.ts.map +1 -1
- package/dist/esm/serviceClient.js +1 -1
- package/dist/esm/serviceClient.js.map +1 -1
- package/dist/esm/state.d.ts +1 -1
- package/dist/esm/state.d.ts.map +1 -1
- package/dist/esm/state.js.map +1 -1
- package/dist/esm/urlHelpers.d.ts +1 -1
- package/dist/esm/urlHelpers.d.ts.map +1 -1
- package/dist/esm/urlHelpers.js.map +1 -1
- package/dist/esm/utils.d.ts +1 -1
- package/dist/esm/utils.d.ts.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/react-native/authorizeRequestOnClaimChallenge.d.ts +1 -1
- package/dist/react-native/authorizeRequestOnClaimChallenge.d.ts.map +1 -1
- package/dist/react-native/authorizeRequestOnClaimChallenge.js.map +1 -1
- package/dist/react-native/authorizeRequestOnTenantChallenge.d.ts +1 -1
- package/dist/react-native/authorizeRequestOnTenantChallenge.d.ts.map +1 -1
- package/dist/react-native/authorizeRequestOnTenantChallenge.js.map +1 -1
- package/dist/react-native/deserializationPolicy.d.ts +2 -2
- package/dist/react-native/deserializationPolicy.d.ts.map +1 -1
- package/dist/react-native/deserializationPolicy.js +2 -2
- package/dist/react-native/deserializationPolicy.js.map +1 -1
- package/dist/react-native/httpClientCache.d.ts +1 -1
- package/dist/react-native/httpClientCache.d.ts.map +1 -1
- package/dist/react-native/httpClientCache.js.map +1 -1
- package/dist/react-native/interfaceHelpers.d.ts +1 -1
- package/dist/react-native/interfaceHelpers.d.ts.map +1 -1
- package/dist/react-native/interfaceHelpers.js.map +1 -1
- package/dist/react-native/interfaces.d.ts +3 -3
- package/dist/react-native/interfaces.d.ts.map +1 -1
- package/dist/react-native/interfaces.js.map +1 -1
- package/dist/react-native/operationHelpers.d.ts +1 -1
- package/dist/react-native/operationHelpers.d.ts.map +1 -1
- package/dist/react-native/operationHelpers.js.map +1 -1
- package/dist/react-native/pipeline.d.ts +4 -4
- package/dist/react-native/pipeline.d.ts.map +1 -1
- package/dist/react-native/pipeline.js.map +1 -1
- package/dist/react-native/serializationPolicy.d.ts +2 -2
- package/dist/react-native/serializationPolicy.d.ts.map +1 -1
- package/dist/react-native/serializationPolicy.js +1 -1
- package/dist/react-native/serializationPolicy.js.map +1 -1
- package/dist/react-native/serializer.d.ts +1 -1
- package/dist/react-native/serializer.d.ts.map +1 -1
- package/dist/react-native/serializer.js +1 -1
- package/dist/react-native/serializer.js.map +1 -1
- package/dist/react-native/serviceClient.d.ts +3 -3
- package/dist/react-native/serviceClient.d.ts.map +1 -1
- package/dist/react-native/serviceClient.js +1 -1
- package/dist/react-native/serviceClient.js.map +1 -1
- package/dist/react-native/state.d.ts +1 -1
- package/dist/react-native/state.d.ts.map +1 -1
- package/dist/react-native/state.js.map +1 -1
- package/dist/react-native/urlHelpers.d.ts +1 -1
- package/dist/react-native/urlHelpers.d.ts.map +1 -1
- package/dist/react-native/urlHelpers.js.map +1 -1
- package/dist/react-native/utils.d.ts +1 -1
- package/dist/react-native/utils.d.ts.map +1 -1
- package/dist/react-native/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"interf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MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,GAAG,UAAU,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAC/B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n HttpClient,\n HttpMethods,\n PipelineOptions,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n TransferProgressEvent,\n} from \"@azure/core-rest-pipeline\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n/**\n * Options to govern behavior of xml parser and builder.\n */\nexport interface XmlOptions {\n /**\n * indicates the name of the root element in the resulting XML when building XML.\n */\n rootName?: string;\n /**\n * indicates whether the root element is to be included or not in the output when parsing XML.\n */\n includeRoot?: boolean;\n /**\n * key used to access the XML value content when parsing XML.\n */\n xmlCharKey?: string;\n}\n/**\n * Options to configure serialization/de-serialization behavior.\n */\nexport interface SerializerOptions {\n /**\n * Options to configure xml parser/builder behavior.\n */\n xml: XmlOptions;\n /**\n * Normally additional properties are included in the result object, even if there is no mapper for them.\n * This flag disables this behavior when true. It is used when parsing headers to avoid polluting the result object.\n */\n ignoreUnknownProperties?: boolean;\n}\n\nexport type RequiredSerializerOptions = {\n [K in keyof SerializerOptions]: Required<SerializerOptions[K]>;\n};\n\n/**\n * A type alias for future proofing.\n */\nexport type OperationRequest = PipelineRequest;\n\n/**\n * Metadata that is used to properly parse a response.\n */\nexport interface OperationRequestInfo {\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n\n /**\n * Used to encode the request.\n */\n operationArguments?: OperationArguments;\n\n /**\n * A function that returns the proper OperationResponseMap for the given OperationSpec and\n * PipelineResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: PipelineResponse,\n ) => undefined | OperationResponseMap;\n\n /**\n * Whether or not the PipelineResponse should be deserialized. Defaults to true.\n */\n shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);\n}\n\n/**\n * The base options type for all operations.\n */\nexport interface OperationOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: OperationRequestOptions;\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n /**\n * Options to override serialization/de-serialization behavior.\n */\n serializerOptions?: SerializerOptions;\n\n /**\n * A function to be called each time a response is received from the server\n * while performing the requested operation.\n * May be called multiple times.\n */\n onResponse?: RawResponseCallback;\n}\n\n/**\n * Options used when creating and sending HTTP requests for this operation.\n */\nexport interface OperationRequestOptions {\n /**\n * User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);\n\n /**\n * Set to true if the request is sent over HTTP instead of HTTPS\n */\n allowInsecureConnection?: boolean;\n}\n\n/**\n * A collection of properties that apply to a single invocation of an operation.\n */\nexport interface OperationArguments {\n /**\n * The parameters that were passed to the operation method.\n */\n [parameterName: string]: unknown;\n\n /**\n * The optional arguments that are provided to an operation.\n */\n options?: OperationOptions;\n}\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport type QueryCollectionFormat = \"CSV\" | \"SSV\" | \"TSV\" | \"Pipes\" | \"Multi\";\n\n/**\n * Encodes how to reach a particular property on an object.\n */\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * An OperationResponse that can be returned from an operation request for a single status code.\n */\nexport interface OperationResponseMap {\n /**\n * The mapper that will be used to deserialize the response headers.\n */\n headersMapper?: Mapper;\n\n /**\n * The mapper that will be used to deserialize the response body.\n */\n bodyMapper?: Mapper;\n\n /**\n * Indicates if this is an error response\n */\n isError?: boolean;\n}\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The media type of the request body.\n * This value can be used to aide in serialization if it is provided.\n */\n readonly mediaType?:\n | \"json\"\n | \"xml\"\n | \"form\"\n | \"binary\"\n | \"multipart\"\n | \"text\"\n | \"unknown\"\n | string;\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray<OperationURLParameter>;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray<OperationQueryParameter>;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray<OperationParameter>;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray<OperationParameter>;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponseMap };\n}\n\n/**\n * Wrapper object for http request and response. Deserialized object is stored in\n * the `parsedBody` property when the response body is received in JSON or XML.\n */\nexport interface FullOperationResponse extends PipelineResponse {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders?: { [key: string]: unknown };\n\n /**\n * The response body as parsed JSON or XML.\n */\n parsedBody?: any;\n\n /**\n * The request that generated the response.\n */\n request: OperationRequest;\n}\n\n/**\n * A function to be called each time a response is received from the server\n * while performing the requested operation.\n * May be called multiple times.\n */\nexport type RawResponseCallback = (\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n) => void;\n\n/**\n * Used to map raw response objects to final shapes.\n * Helps packing and unpacking Dates and other encoded types that are not intrinsic to JSON.\n * Also allows pulling values from headers, as well as inserting default values and constants.\n */\nexport interface Serializer {\n /**\n * The provided model mapper.\n */\n readonly modelMappers: { [key: string]: any };\n /**\n * Whether the contents are XML or not.\n */\n readonly isXML: boolean;\n\n /**\n * Validates constraints, if any. This function will throw if the provided value does not respect those constraints.\n * @param mapper - The definition of data models.\n * @param value - The value.\n * @param objectName - Name of the object. Used in the error messages.\n * @deprecated Removing the constraints validation on client side.\n */\n validateConstraints(mapper: Mapper, value: any, objectName: string): void;\n\n /**\n * Serialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param object - A valid Javascript object to be serialized.\n * @param objectName - Name of the serialized object.\n * @param options - additional options to deserialization.\n * @returns A valid serialized Javascript object.\n */\n serialize(mapper: Mapper, object: any, objectName?: string, options?: SerializerOptions): any;\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param responseBody - A valid Javascript entity to be deserialized.\n * @param objectName - Name of the deserialized object.\n * @param options - Controls behavior of XML parser and builder.\n * @returns A valid deserialized Javascript object.\n */\n deserialize(\n mapper: Mapper,\n responseBody: any,\n objectName: string,\n options?: SerializerOptions,\n ): any;\n}\n\n/**\n * Description of various value constraints such as integer ranges and string regex.\n */\nexport interface MapperConstraints {\n /**\n * The value should be less than or equal to the `InclusiveMaximum` value.\n */\n InclusiveMaximum?: number;\n /**\n * The value should be less than the `ExclusiveMaximum` value.\n */\n ExclusiveMaximum?: number;\n /**\n * The value should be greater than or equal to the `InclusiveMinimum` value.\n */\n InclusiveMinimum?: number;\n /**\n * The value should be greater than the `InclusiveMinimum` value.\n */\n ExclusiveMinimum?: number;\n /**\n * The length should be smaller than the `MaxLength`.\n */\n MaxLength?: number;\n /**\n * The length should be bigger than the `MinLength`.\n */\n MinLength?: number;\n /**\n * The value must match the pattern.\n */\n Pattern?: RegExp;\n /**\n * The value must contain fewer items than the MaxItems value.\n */\n MaxItems?: number;\n /**\n * The value must contain more items than the `MinItems` value.\n */\n MinItems?: number;\n /**\n * The value must contain only unique items.\n */\n UniqueItems?: true;\n /**\n * The value should be exactly divisible by the `MultipleOf` value.\n */\n MultipleOf?: number;\n}\n\n/**\n * Type of the mapper. Includes known mappers.\n */\nexport type MapperType =\n | SimpleMapperType\n | CompositeMapperType\n | SequenceMapperType\n | DictionaryMapperType\n | EnumMapperType;\n\n/**\n * The type of a simple mapper.\n */\nexport interface SimpleMapperType {\n /**\n * Name of the type of the property.\n */\n name:\n | \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\n/**\n * Helps build a mapper that describes how to map a set of properties of an object based on other mappers.\n *\n * Only one of the following properties should be present: `className`, `modelProperties` and `additionalProperties`.\n */\nexport interface CompositeMapperType {\n /**\n * Name of the composite mapper type.\n */\n name: \"Composite\";\n\n /**\n * Use `className` to reference another type definition.\n */\n className?: string;\n\n /**\n * Use `modelProperties` when the reference to the other type has been resolved.\n */\n modelProperties?: { [propertyName: string]: Mapper };\n\n /**\n * Used when a model has `additionalProperties: true`. Allows the generic processing of unnamed model properties on the response object.\n */\n additionalProperties?: Mapper;\n\n /**\n * The name of the top-most parent scheme, the one that has no parents.\n */\n uberParent?: string;\n\n /**\n * A polymorphic discriminator.\n */\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\n/**\n * Helps build a mapper that describes how to parse a sequence of mapped values.\n */\nexport interface SequenceMapperType {\n /**\n * Name of the sequence type mapper.\n */\n name: \"Sequence\";\n /**\n * The mapper to use to map each one of the properties of the sequence.\n */\n element: Mapper;\n}\n\n/**\n * Helps build a mapper that describes how to parse a dictionary of mapped values.\n */\nexport interface DictionaryMapperType {\n /**\n * Name of the sequence type mapper.\n */\n name: \"Dictionary\";\n /**\n * The mapper to use to map the value of each property in the dictionary.\n */\n value: Mapper;\n}\n\n/**\n * Helps build a mapper that describes how to parse an enum value.\n */\nexport interface EnumMapperType {\n /**\n * Name of the enum type mapper.\n */\n name: \"Enum\";\n /**\n * Values allowed by this mapper.\n */\n allowedValues: any[];\n}\n\n/**\n * The base definition of a mapper. Can be used for XML and plain JavaScript objects.\n */\nexport interface BaseMapper {\n /**\n * Name for the xml element\n */\n xmlName?: string;\n /**\n * Xml element namespace\n */\n xmlNamespace?: string;\n /**\n * Xml element namespace prefix\n */\n xmlNamespacePrefix?: string;\n /**\n * Determines if the current property should be serialized as an attribute of the parent xml element\n */\n xmlIsAttribute?: boolean;\n /**\n * Determines if the current property should be serialized as the inner content of the xml element\n */\n xmlIsMsText?: boolean;\n /**\n * Name for the xml elements when serializing an array\n */\n xmlElementName?: string;\n /**\n * Whether or not the current property should have a wrapping XML element\n */\n xmlIsWrapped?: boolean;\n /**\n * Whether or not the current property is readonly\n */\n readOnly?: boolean;\n /**\n * Whether or not the current property is a constant\n */\n isConstant?: boolean;\n /**\n * Whether or not the current property is required\n */\n required?: boolean;\n /**\n * Whether or not the current property allows mull as a value\n */\n nullable?: boolean;\n /**\n * The name to use when serializing\n */\n serializedName?: string;\n /**\n * Type of the mapper\n */\n type: MapperType;\n /**\n * Default value when one is not explicitly provided\n */\n defaultValue?: any;\n /**\n * Constraints to test the current value against\n */\n constraints?: MapperConstraints;\n}\n\n/**\n * Mappers are definitions of the data models used in the library.\n * These data models are part of the Operation or Client definitions in the responses or parameters.\n */\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\n/**\n * Used to disambiguate discriminated type unions.\n * For example, if response can have many shapes but also includes a 'kind' field (or similar),\n * that field can be used to determine how to deserialize the response to the correct type.\n */\nexport interface PolymorphicDiscriminator {\n /**\n * Name of the discriminant property in the original JSON payload, e.g. `@odata.kind`.\n */\n serializedName: string;\n /**\n * Name to use on the resulting object instead of the original property name.\n * Useful since the JSON property could be difficult to work with.\n * For example: For a field received as `@odata.kind`, the final object could instead include a property simply named `kind`.\n */\n clientName: string;\n /**\n * It may contain any other property.\n */\n [key: string]: string;\n}\n\n/**\n * A mapper composed of other mappers.\n */\nexport interface CompositeMapper extends BaseMapper {\n /**\n * The type descriptor of the `CompositeMapper`.\n */\n type: CompositeMapperType;\n}\n\n/**\n * A mapper describing arrays.\n */\nexport interface SequenceMapper extends BaseMapper {\n /**\n * The type descriptor of the `SequenceMapper`.\n */\n type: SequenceMapperType;\n}\n\n/**\n * A mapper describing plain JavaScript objects used as key/value pairs.\n */\nexport interface DictionaryMapper extends BaseMapper {\n /**\n * The type descriptor of the `DictionaryMapper`.\n */\n type: DictionaryMapperType;\n /**\n * Optionally, a prefix to add to the header collection.\n */\n headerCollectionPrefix?: string;\n}\n\n/**\n * A mapper describing an enum value.\n */\nexport interface EnumMapper extends BaseMapper {\n /**\n * The type descriptor of the `EnumMapper`.\n */\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n/**\n * Configuration for creating a new Tracing Span\n */\nexport interface SpanConfig {\n /**\n * Package name prefix\n */\n packagePrefix: string;\n /**\n * Service namespace\n */\n namespace: string;\n}\n\n/**\n * Used to configure additional policies added to the pipeline at construction.\n */\nexport interface AdditionalPolicyConfig {\n /**\n * A policy to be added.\n */\n policy: PipelinePolicy;\n /**\n * Determines if this policy be applied before or after retry logic.\n * Only use `perRetry` if you need to modify the request again\n * each time the operation is retried due to retryable service\n * issues.\n */\n position: \"perCall\" | \"perRetry\";\n}\n\n/**\n * The common set of options that high level clients are expected to expose.\n */\nexport interface CommonClientOptions extends PipelineOptions {\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * Set to true if the request is sent over HTTP instead of HTTPS\n */\n allowInsecureConnection?: boolean;\n /**\n * Additional policies to include in the HTTP pipeline.\n */\n additionalPolicies?: AdditionalPolicyConfig[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAC/B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n HttpClient,\n HttpMethods,\n PipelineOptions,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n TransferProgressEvent,\n} from \"@azure/core-rest-pipeline\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n/**\n * Options to govern behavior of xml parser and builder.\n */\nexport interface XmlOptions {\n /**\n * indicates the name of the root element in the resulting XML when building XML.\n */\n rootName?: string;\n /**\n * indicates whether the root element is to be included or not in the output when parsing XML.\n */\n includeRoot?: boolean;\n /**\n * key used to access the XML value content when parsing XML.\n */\n xmlCharKey?: string;\n}\n/**\n * Options to configure serialization/de-serialization behavior.\n */\nexport interface SerializerOptions {\n /**\n * Options to configure xml parser/builder behavior.\n */\n xml: XmlOptions;\n /**\n * Normally additional properties are included in the result object, even if there is no mapper for them.\n * This flag disables this behavior when true. It is used when parsing headers to avoid polluting the result object.\n */\n ignoreUnknownProperties?: boolean;\n}\n\nexport type RequiredSerializerOptions = {\n [K in keyof SerializerOptions]: Required<SerializerOptions[K]>;\n};\n\n/**\n * A type alias for future proofing.\n */\nexport type OperationRequest = PipelineRequest;\n\n/**\n * Metadata that is used to properly parse a response.\n */\nexport interface OperationRequestInfo {\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n\n /**\n * Used to encode the request.\n */\n operationArguments?: OperationArguments;\n\n /**\n * A function that returns the proper OperationResponseMap for the given OperationSpec and\n * PipelineResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: PipelineResponse,\n ) => undefined | OperationResponseMap;\n\n /**\n * Whether or not the PipelineResponse should be deserialized. Defaults to true.\n */\n shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);\n}\n\n/**\n * The base options type for all operations.\n */\nexport interface OperationOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: OperationRequestOptions;\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n /**\n * Options to override serialization/de-serialization behavior.\n */\n serializerOptions?: SerializerOptions;\n\n /**\n * A function to be called each time a response is received from the server\n * while performing the requested operation.\n * May be called multiple times.\n */\n onResponse?: RawResponseCallback;\n}\n\n/**\n * Options used when creating and sending HTTP requests for this operation.\n */\nexport interface OperationRequestOptions {\n /**\n * User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);\n\n /**\n * Set to true if the request is sent over HTTP instead of HTTPS\n */\n allowInsecureConnection?: boolean;\n}\n\n/**\n * A collection of properties that apply to a single invocation of an operation.\n */\nexport interface OperationArguments {\n /**\n * The parameters that were passed to the operation method.\n */\n [parameterName: string]: unknown;\n\n /**\n * The optional arguments that are provided to an operation.\n */\n options?: OperationOptions;\n}\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport type QueryCollectionFormat = \"CSV\" | \"SSV\" | \"TSV\" | \"Pipes\" | \"Multi\";\n\n/**\n * Encodes how to reach a particular property on an object.\n */\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * An OperationResponse that can be returned from an operation request for a single status code.\n */\nexport interface OperationResponseMap {\n /**\n * The mapper that will be used to deserialize the response headers.\n */\n headersMapper?: Mapper;\n\n /**\n * The mapper that will be used to deserialize the response body.\n */\n bodyMapper?: Mapper;\n\n /**\n * Indicates if this is an error response\n */\n isError?: boolean;\n}\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The media type of the request body.\n * This value can be used to aide in serialization if it is provided.\n */\n readonly mediaType?:\n | \"json\"\n | \"xml\"\n | \"form\"\n | \"binary\"\n | \"multipart\"\n | \"text\"\n | \"unknown\"\n | string;\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray<OperationURLParameter>;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray<OperationQueryParameter>;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray<OperationParameter>;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray<OperationParameter>;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponseMap };\n}\n\n/**\n * Wrapper object for http request and response. Deserialized object is stored in\n * the `parsedBody` property when the response body is received in JSON or XML.\n */\nexport interface FullOperationResponse extends PipelineResponse {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders?: { [key: string]: unknown };\n\n /**\n * The response body as parsed JSON or XML.\n */\n parsedBody?: any;\n\n /**\n * The request that generated the response.\n */\n request: OperationRequest;\n}\n\n/**\n * A function to be called each time a response is received from the server\n * while performing the requested operation.\n * May be called multiple times.\n */\nexport type RawResponseCallback = (\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n) => void;\n\n/**\n * Used to map raw response objects to final shapes.\n * Helps packing and unpacking Dates and other encoded types that are not intrinsic to JSON.\n * Also allows pulling values from headers, as well as inserting default values and constants.\n */\nexport interface Serializer {\n /**\n * The provided model mapper.\n */\n readonly modelMappers: { [key: string]: any };\n /**\n * Whether the contents are XML or not.\n */\n readonly isXML: boolean;\n\n /**\n * Validates constraints, if any. This function will throw if the provided value does not respect those constraints.\n * @param mapper - The definition of data models.\n * @param value - The value.\n * @param objectName - Name of the object. Used in the error messages.\n * @deprecated Removing the constraints validation on client side.\n */\n validateConstraints(mapper: Mapper, value: any, objectName: string): void;\n\n /**\n * Serialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param object - A valid Javascript object to be serialized.\n * @param objectName - Name of the serialized object.\n * @param options - additional options to deserialization.\n * @returns A valid serialized Javascript object.\n */\n serialize(mapper: Mapper, object: any, objectName?: string, options?: SerializerOptions): any;\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param responseBody - A valid Javascript entity to be deserialized.\n * @param objectName - Name of the deserialized object.\n * @param options - Controls behavior of XML parser and builder.\n * @returns A valid deserialized Javascript object.\n */\n deserialize(\n mapper: Mapper,\n responseBody: any,\n objectName: string,\n options?: SerializerOptions,\n ): any;\n}\n\n/**\n * Description of various value constraints such as integer ranges and string regex.\n */\nexport interface MapperConstraints {\n /**\n * The value should be less than or equal to the `InclusiveMaximum` value.\n */\n InclusiveMaximum?: number;\n /**\n * The value should be less than the `ExclusiveMaximum` value.\n */\n ExclusiveMaximum?: number;\n /**\n * The value should be greater than or equal to the `InclusiveMinimum` value.\n */\n InclusiveMinimum?: number;\n /**\n * The value should be greater than the `InclusiveMinimum` value.\n */\n ExclusiveMinimum?: number;\n /**\n * The length should be smaller than the `MaxLength`.\n */\n MaxLength?: number;\n /**\n * The length should be bigger than the `MinLength`.\n */\n MinLength?: number;\n /**\n * The value must match the pattern.\n */\n Pattern?: RegExp;\n /**\n * The value must contain fewer items than the MaxItems value.\n */\n MaxItems?: number;\n /**\n * The value must contain more items than the `MinItems` value.\n */\n MinItems?: number;\n /**\n * The value must contain only unique items.\n */\n UniqueItems?: true;\n /**\n * The value should be exactly divisible by the `MultipleOf` value.\n */\n MultipleOf?: number;\n}\n\n/**\n * Type of the mapper. Includes known mappers.\n */\nexport type MapperType =\n | SimpleMapperType\n | CompositeMapperType\n | SequenceMapperType\n | DictionaryMapperType\n | EnumMapperType;\n\n/**\n * The type of a simple mapper.\n */\nexport interface SimpleMapperType {\n /**\n * Name of the type of the property.\n */\n name:\n | \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\n/**\n * Helps build a mapper that describes how to map a set of properties of an object based on other mappers.\n *\n * Only one of the following properties should be present: `className`, `modelProperties` and `additionalProperties`.\n */\nexport interface CompositeMapperType {\n /**\n * Name of the composite mapper type.\n */\n name: \"Composite\";\n\n /**\n * Use `className` to reference another type definition.\n */\n className?: string;\n\n /**\n * Use `modelProperties` when the reference to the other type has been resolved.\n */\n modelProperties?: { [propertyName: string]: Mapper };\n\n /**\n * Used when a model has `additionalProperties: true`. Allows the generic processing of unnamed model properties on the response object.\n */\n additionalProperties?: Mapper;\n\n /**\n * The name of the top-most parent scheme, the one that has no parents.\n */\n uberParent?: string;\n\n /**\n * A polymorphic discriminator.\n */\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\n/**\n * Helps build a mapper that describes how to parse a sequence of mapped values.\n */\nexport interface SequenceMapperType {\n /**\n * Name of the sequence type mapper.\n */\n name: \"Sequence\";\n /**\n * The mapper to use to map each one of the properties of the sequence.\n */\n element: Mapper;\n}\n\n/**\n * Helps build a mapper that describes how to parse a dictionary of mapped values.\n */\nexport interface DictionaryMapperType {\n /**\n * Name of the sequence type mapper.\n */\n name: \"Dictionary\";\n /**\n * The mapper to use to map the value of each property in the dictionary.\n */\n value: Mapper;\n}\n\n/**\n * Helps build a mapper that describes how to parse an enum value.\n */\nexport interface EnumMapperType {\n /**\n * Name of the enum type mapper.\n */\n name: \"Enum\";\n /**\n * Values allowed by this mapper.\n */\n allowedValues: any[];\n}\n\n/**\n * The base definition of a mapper. Can be used for XML and plain JavaScript objects.\n */\nexport interface BaseMapper {\n /**\n * Name for the xml element\n */\n xmlName?: string;\n /**\n * Xml element namespace\n */\n xmlNamespace?: string;\n /**\n * Xml element namespace prefix\n */\n xmlNamespacePrefix?: string;\n /**\n * Determines if the current property should be serialized as an attribute of the parent xml element\n */\n xmlIsAttribute?: boolean;\n /**\n * Determines if the current property should be serialized as the inner content of the xml element\n */\n xmlIsMsText?: boolean;\n /**\n * Name for the xml elements when serializing an array\n */\n xmlElementName?: string;\n /**\n * Whether or not the current property should have a wrapping XML element\n */\n xmlIsWrapped?: boolean;\n /**\n * Whether or not the current property is readonly\n */\n readOnly?: boolean;\n /**\n * Whether or not the current property is a constant\n */\n isConstant?: boolean;\n /**\n * Whether or not the current property is required\n */\n required?: boolean;\n /**\n * Whether or not the current property allows mull as a value\n */\n nullable?: boolean;\n /**\n * The name to use when serializing\n */\n serializedName?: string;\n /**\n * Type of the mapper\n */\n type: MapperType;\n /**\n * Default value when one is not explicitly provided\n */\n defaultValue?: any;\n /**\n * Constraints to test the current value against\n */\n constraints?: MapperConstraints;\n}\n\n/**\n * Mappers are definitions of the data models used in the library.\n * These data models are part of the Operation or Client definitions in the responses or parameters.\n */\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\n/**\n * Used to disambiguate discriminated type unions.\n * For example, if response can have many shapes but also includes a 'kind' field (or similar),\n * that field can be used to determine how to deserialize the response to the correct type.\n */\nexport interface PolymorphicDiscriminator {\n /**\n * Name of the discriminant property in the original JSON payload, e.g. `@odata.kind`.\n */\n serializedName: string;\n /**\n * Name to use on the resulting object instead of the original property name.\n * Useful since the JSON property could be difficult to work with.\n * For example: For a field received as `@odata.kind`, the final object could instead include a property simply named `kind`.\n */\n clientName: string;\n /**\n * It may contain any other property.\n */\n [key: string]: string;\n}\n\n/**\n * A mapper composed of other mappers.\n */\nexport interface CompositeMapper extends BaseMapper {\n /**\n * The type descriptor of the `CompositeMapper`.\n */\n type: CompositeMapperType;\n}\n\n/**\n * A mapper describing arrays.\n */\nexport interface SequenceMapper extends BaseMapper {\n /**\n * The type descriptor of the `SequenceMapper`.\n */\n type: SequenceMapperType;\n}\n\n/**\n * A mapper describing plain JavaScript objects used as key/value pairs.\n */\nexport interface DictionaryMapper extends BaseMapper {\n /**\n * The type descriptor of the `DictionaryMapper`.\n */\n type: DictionaryMapperType;\n /**\n * Optionally, a prefix to add to the header collection.\n */\n headerCollectionPrefix?: string;\n}\n\n/**\n * A mapper describing an enum value.\n */\nexport interface EnumMapper extends BaseMapper {\n /**\n * The type descriptor of the `EnumMapper`.\n */\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n/**\n * Configuration for creating a new Tracing Span\n */\nexport interface SpanConfig {\n /**\n * Package name prefix\n */\n packagePrefix: string;\n /**\n * Service namespace\n */\n namespace: string;\n}\n\n/**\n * Used to configure additional policies added to the pipeline at construction.\n */\nexport interface AdditionalPolicyConfig {\n /**\n * A policy to be added.\n */\n policy: PipelinePolicy;\n /**\n * Determines if this policy be applied before or after retry logic.\n * Only use `perRetry` if you need to modify the request again\n * each time the operation is retried due to retryable service\n * issues.\n */\n position: \"perCall\" | \"perRetry\";\n}\n\n/**\n * The common set of options that high level clients are expected to expose.\n */\nexport interface CommonClientOptions extends PipelineOptions {\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * Set to true if the request is sent over HTTP instead of HTTPS\n */\n allowInsecureConnection?: boolean;\n /**\n * Additional policies to include in the HTTP pipeline.\n */\n additionalPolicies?: AdditionalPolicyConfig[];\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OperationArguments, OperationParameter, OperationRequest, OperationRequestInfo } from "./interfaces.js";
|
|
1
|
+
import type { OperationArguments, OperationParameter, OperationRequest, OperationRequestInfo } from "./interfaces.js";
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
* Retrieves the value to use for a given operation argument
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationHelpers.d.ts","sourceRoot":"","sources":["../../src/operationHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"operationHelpers.d.ts","sourceRoot":"","sources":["../../src/operationHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;GAOG;AACH,wBAAgB,sCAAsC,CACpD,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,kBAAkB,EAC7B,cAAc,CAAC,EAAE;IAAE,CAAC,aAAa,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAChD,GAAG,CAsDL;AAqCD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,oBAAoB,CAWvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationHelpers.js","sourceRoot":"","sources":["../../src/operationHelpers.ts"],"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C;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAEhF,SAAS,kBAAkB,CACzB,OAAyB;IAEzB,OAAO,qBAAqB,IAAI,OAAO,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAyB;IAC/D,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,OAAO,uBAAuB,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,EAAE,CAAC;QACV,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CompositeMapper,\n Mapper,\n OperationArguments,\n OperationParameter,\n OperationRequest,\n OperationRequestInfo,\n ParameterPath,\n} from \"./interfaces.js\";\n\nimport { state } from \"./state.js\";\n\n/**\n * @internal\n * Retrieves the value to use for a given operation argument\n * @param operationArguments - The arguments passed from the generated client\n * @param parameter - The parameter description\n * @param fallbackObject - If something isn't found in the arguments bag, look here.\n * Generally used to look at the service client properties.\n */\nexport function getOperationArgumentValueFromParameter(\n operationArguments: OperationArguments,\n parameter: OperationParameter,\n fallbackObject?: { [parameterName: string]: any },\n): any {\n let parameterPath = parameter.parameterPath;\n const parameterMapper = parameter.mapper;\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n\n if (!propertySearchResult.propertyFound && fallbackObject) {\n propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![\n propertyName\n ];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameter(\n operationArguments,\n {\n parameterPath: propertyPath,\n mapper: propertyMapper,\n },\n fallbackObject,\n );\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(\n parent: { [parameterName: string]: any },\n parameterPath: string[],\n): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nconst originalRequestSymbol = Symbol.for(\"@azure/core-client original request\");\n\nfunction hasOriginalRequest(\n request: OperationRequest,\n): request is OperationRequest & { [originalRequestSymbol]: OperationRequest } {\n return originalRequestSymbol in request;\n}\n\nexport function getOperationRequestInfo(request: OperationRequest): OperationRequestInfo {\n if (hasOriginalRequest(request)) {\n return getOperationRequestInfo(request[originalRequestSymbol]);\n }\n let info = state.operationRequestMap.get(request);\n\n if (!info) {\n info = {};\n state.operationRequestMap.set(request, info);\n }\n return info;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operationHelpers.js","sourceRoot":"","sources":["../../src/operationHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;GAOG;AACH,MAAM,UAAU,sCAAsC,CACpD,kBAAsC,EACtC,SAA6B,EAC7B,cAAiD;IAEjD,IAAI,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;IAC5C,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,CAAC;IACzC,IAAI,KAAU,CAAC;IACf,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACtC,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,eAAe,CAAC,UAAU,EAAE,CAAC;gBAC/B,KAAK,GAAG,eAAe,CAAC,YAAY,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,IAAI,oBAAoB,GAAG,4BAA4B,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;gBAE3F,IAAI,CAAC,oBAAoB,CAAC,aAAa,IAAI,cAAc,EAAE,CAAC;oBAC1D,oBAAoB,GAAG,4BAA4B,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;gBACrF,CAAC;gBAED,IAAI,eAAe,GAAG,KAAK,CAAC;gBAC5B,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,CAAC;oBACxC,eAAe;wBACb,eAAe,CAAC,QAAQ;4BACxB,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBACnE,CAAC;gBACD,K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;IACD,IAAI,CAAC,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;QAC/B,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC;QAC9B,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAEhF,SAAS,kBAAkB,CACzB,OAAyB;IAEzB,OAAO,qBAAqB,IAAI,OAAO,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAyB;IAC/D,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,OAAO,uBAAuB,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,EAAE,CAAC;QACV,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CompositeMapper,\n Mapper,\n OperationArguments,\n OperationParameter,\n OperationRequest,\n OperationRequestInfo,\n ParameterPath,\n} from \"./interfaces.js\";\n\nimport { state } from \"./state.js\";\n\n/**\n * @internal\n * Retrieves the value to use for a given operation argument\n * @param operationArguments - The arguments passed from the generated client\n * @param parameter - The parameter description\n * @param fallbackObject - If something isn't found in the arguments bag, look here.\n * Generally used to look at the service client properties.\n */\nexport function getOperationArgumentValueFromParameter(\n operationArguments: OperationArguments,\n parameter: OperationParameter,\n fallbackObject?: { [parameterName: string]: any },\n): any {\n let parameterPath = parameter.parameterPath;\n const parameterMapper = parameter.mapper;\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n\n if (!propertySearchResult.propertyFound && fallbackObject) {\n propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![\n propertyName\n ];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameter(\n operationArguments,\n {\n parameterPath: propertyPath,\n mapper: propertyMapper,\n },\n fallbackObject,\n );\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(\n parent: { [parameterName: string]: any },\n parameterPath: string[],\n): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nconst originalRequestSymbol = Symbol.for(\"@azure/core-client original request\");\n\nfunction hasOriginalRequest(\n request: OperationRequest,\n): request is OperationRequest & { [originalRequestSymbol]: OperationRequest } {\n return originalRequestSymbol in request;\n}\n\nexport function getOperationRequestInfo(request: OperationRequest): OperationRequestInfo {\n if (hasOriginalRequest(request)) {\n return getOperationRequestInfo(request[originalRequestSymbol]);\n }\n let info = state.operationRequestMap.get(request);\n\n if (!info) {\n info = {};\n state.operationRequestMap.set(request, info);\n }\n return info;\n}\n"]}
|
package/dist/esm/pipeline.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DeserializationPolicyOptions } from "./deserializationPolicy.js";
|
|
2
|
-
import { InternalPipelineOptions, Pipeline } from "@azure/core-rest-pipeline";
|
|
3
|
-
import { SerializationPolicyOptions } from "./serializationPolicy.js";
|
|
4
|
-
import { TokenCredential } from "@azure/core-auth";
|
|
1
|
+
import type { DeserializationPolicyOptions } from "./deserializationPolicy.js";
|
|
2
|
+
import type { InternalPipelineOptions, Pipeline } from "@azure/core-rest-pipeline";
|
|
3
|
+
import type { SerializationPolicyOptions } from "./serializationPolicy.js";
|
|
4
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
5
5
|
/**
|
|
6
6
|
* Options for creating a Pipeline to use with ServiceClient.
|
|
7
7
|
* Mostly for customizing the auth policy (if using token auth) or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKnF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC5E;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,eAAe,CAAA;KAAE,CAAC;IACzF;;OAEG;IACH,sBAAsB,CAAC,EAAE,4BAA4B,CAAC;IACtD;;OAEG;IACH,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,6BAAkC,GAAG,QAAQ,CAiB1F"}
|
package/dist/esm/pipeline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAuB/D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAyC,EAAE;IAC9E,MAAM,QAAQ,GAAG,yBAAyB,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IAC1D,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC9B,QAAQ,CAAC,SAAS,CAChB,+BAA+B,CAAC;YAC9B,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU;YAChD,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;SACnD,CAAC,CACH,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9F,QAAQ,CAAC,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;QACxE,KAAK,EAAE,aAAa;KACrB,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DeserializationPolicyOptions } from \"./deserializationPolicy.js\";\nimport { deserializationPolicy } from \"./deserializationPolicy.js\";\nimport type { InternalPipelineOptions, Pipeline } from \"@azure/core-rest-pipeline\";\nimport {\n bearerTokenAuthenticationPolicy,\n createPipelineFromOptions,\n} from \"@azure/core-rest-pipeline\";\nimport type { SerializationPolicyOptions } from \"./serializationPolicy.js\";\nimport { serializationPolicy } from \"./serializationPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options for creating a Pipeline to use with ServiceClient.\n * Mostly for customizing the auth policy (if using token auth) or\n * the deserialization options when using XML.\n */\nexport interface InternalClientPipelineOptions extends InternalPipelineOptions {\n /**\n * Options to customize bearerTokenAuthenticationPolicy.\n */\n credentialOptions?: { credentialScopes: string | string[]; credential: TokenCredential };\n /**\n * Options to customize deserializationPolicy.\n */\n deserializationOptions?: DeserializationPolicyOptions;\n /**\n * Options to customize serializationPolicy.\n */\n serializationOptions?: SerializationPolicyOptions;\n}\n\n/**\n * Creates a new Pipeline for use with a Service Client.\n * Adds in deserializationPolicy by default.\n * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential.\n * @param options - Options to customize the created pipeline.\n */\nexport function createClientPipeline(options: InternalClientPipelineOptions = {}): Pipeline {\n const pipeline = createPipelineFromOptions(options ?? {});\n if (options.credentialOptions) {\n pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential: options.credentialOptions.credential,\n scopes: options.credentialOptions.credentialScopes,\n }),\n );\n }\n\n pipeline.addPolicy(serializationPolicy(options.serializationOptions), { phase: \"Serialize\" });\n pipeline.addPolicy(deserializationPolicy(options.deserializationOptions), {\n phase: \"Deserialize\",\n });\n\n return pipeline;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OperationArguments, OperationRequest, OperationSpec, SerializerOptions, XmlOptions } from "./interfaces.js";
|
|
2
|
-
import { PipelinePolicy } from "@azure/core-rest-pipeline";
|
|
1
|
+
import type { OperationArguments, OperationRequest, OperationSpec, SerializerOptions, XmlOptions } from "./interfaces.js";
|
|
2
|
+
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
|
3
3
|
/**
|
|
4
4
|
* The programmatic identifier of the serializationPolicy.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializationPolicy.d.ts","sourceRoot":"","sources":["../../src/serializationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"serializationPolicy.d.ts","sourceRoot":"","sources":["../../src/serializationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EAEb,iBAAiB,EACjB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,2BAA2B,CAAC;AAQ/F;;GAEG;AACH,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM,CAAC;IAEvD;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,cAAc,CAgB5F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,GAC3B,IAAI,CA+BN;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,YAAY,GAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,UAAU,KAAK,MAE9C,GACA,IAAI,CAgHN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { XML_ATTRKEY, XML_CHARKEY
|
|
3
|
+
import { XML_ATTRKEY, XML_CHARKEY } from "./interfaces.js";
|
|
4
4
|
import { getOperationArgumentValueFromParameter, getOperationRequestInfo, } from "./operationHelpers.js";
|
|
5
5
|
import { MapperTypeNames } from "./serializer.js";
|
|
6
6
|
import { getPathStringFromParameter } from "./interfaceHelpers.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializationPolicy.js","sourceRoot":"","sources":["../../src/serializationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAOL,WAAW,EACX,WAAW,GAEZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sCAAsC,EACtC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAiB7D;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAsC,EAAE;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAE1C,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,KAAK,CAAC,WA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W,CAAC,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,MAAM,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1D,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DictionaryMapper,\n OperationArguments,\n OperationRequest,\n OperationSpec,\n RequiredSerializerOptions,\n SerializerOptions,\n XML_ATTRKEY,\n XML_CHARKEY,\n XmlOptions,\n} from \"./interfaces.js\";\nimport { PipelinePolicy, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport {\n getOperationArgumentValueFromParameter,\n getOperationRequestInfo,\n} from \"./operationHelpers.js\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\n\n/**\n * The programmatic identifier of the serializationPolicy.\n */\nexport const serializationPolicyName = \"serializationPolicy\";\n\n/**\n * Options to configure API request serialization.\n */\nexport interface SerializationPolicyOptions {\n /**\n * A function that is able to write XML. Required for XML support.\n */\n stringifyXML?: (obj: any, opts?: XmlOptions) => string;\n\n /**\n * Configures behavior of xml parser and builder.\n */\n serializerOptions?: SerializerOptions;\n}\n\n/**\n * This policy handles assembling the request body and headers using\n * an OperationSpec and OperationArguments on the request.\n */\nexport function serializationPolicy(options: SerializationPolicyOptions = {}): PipelinePolicy {\n const stringifyXML = options.stringifyXML;\n\n return {\n name: serializationPolicyName,\n async sendRequest(request: OperationRequest, next: SendRequest): Promise<PipelineResponse> {\n const operationInfo = getOperationRequestInfo(request);\n const operationSpec = operationInfo?.operationSpec;\n const operationArguments = operationInfo?.operationArguments;\n if (operationSpec && operationArguments) {\n serializeHeaders(request, operationArguments, operationSpec);\n serializeRequestBody(request, operationArguments, operationSpec, stringifyXML);\n }\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function serializeHeaders(\n request: OperationRequest,\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n): void {\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue = getOperationArgumentValueFromParameter(operationArguments, headerParameter);\n if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) {\n headerValue = operationSpec.serializer.serialize(\n headerParameter.mapper,\n headerValue,\n getPathStringFromParameter(headerParameter),\n );\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper)\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n request.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n request.headers.set(\n headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter),\n headerValue,\n );\n }\n }\n }\n }\n const customHeaders = operationArguments.options?.requestOptions?.customHeaders;\n if (customHeaders) {\n for (const customHeaderName of Object.keys(customHeaders)) {\n request.headers.set(customHeaderName, customHeaders[customHeaderName]);\n }\n }\n}\n\n/**\n * @internal\n */\nexport function serializeRequestBody(\n request: OperationRequest,\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n stringifyXML: (obj: any, opts?: XmlOptions) => string = function () {\n throw new Error(\"XML serialization unsupported!\");\n },\n): void {\n const serializerOptions = operationArguments.options?.serializerOptions;\n const updatedOptions: RequiredSerializerOptions = {\n xml: {\n rootName: serializerOptions?.xml.rootName ?? \"\",\n includeRoot: serializerOptions?.xml.includeRoot ?? false,\n xmlCharKey: serializerOptions?.xml.xmlCharKey ?? XML_CHARKEY,\n },\n };\n\n const xmlCharKey = updatedOptions.xml.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n request.body = getOperationArgumentValueFromParameter(\n operationArguments,\n operationSpec.requestBody,\n );\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const {\n required,\n serializedName,\n xmlName,\n xmlElementName,\n xmlNamespace,\n xmlNamespacePrefix,\n nullable,\n } = bodyMapper;\n const typeName = bodyMapper.type.name;\n\n try {\n if (\n (request.body !== undefined && request.body !== null) ||\n (nullable && request.body === null) ||\n required\n ) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(\n operationSpec.requestBody,\n );\n request.body = operationSpec.serializer.serialize(\n bodyMapper,\n request.body,\n requestBodyParameterPathString,\n updatedOptions,\n );\n\n const isStream = typeName === MapperTypeNames.Stream;\n\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(\n xmlNamespace,\n xmlnsKey,\n typeName,\n request.body,\n updatedOptions,\n );\n\n if (typeName === MapperTypeNames.Sequence) {\n request.body = stringifyXML(\n prepareXMLRootList(\n value,\n xmlElementName || xmlName || serializedName!,\n xmlnsKey,\n xmlNamespace,\n ),\n { rootName: xmlName || serializedName, xmlCharKey },\n );\n } else if (!isStream) {\n request.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n } else if (\n typeName === MapperTypeNames.String &&\n (operationSpec.contentType?.match(\"text/plain\") || operationSpec.mediaType === \"text\")\n ) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n } else if (!isStream) {\n request.body = JSON.stringify(request.body);\n }\n }\n } catch (error: any) {\n throw new Error(\n `Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(\n serializedName,\n undefined,\n \" \",\n )}.`,\n );\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n request.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue = getOperationArgumentValueFromParameter(\n operationArguments,\n formDataParameter,\n );\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName: string =\n formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(\n formDataParameter.mapper,\n formDataParameterValue,\n getPathStringFromParameter(formDataParameter),\n updatedOptions,\n );\n }\n }\n }\n}\n\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(\n xmlNamespace: string | undefined,\n xmlnsKey: string,\n typeName: string,\n serializedValue: any,\n options: RequiredSerializerOptions,\n): any {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result: any = {};\n result[options.xml.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n\n return serializedValue;\n}\n\nfunction prepareXMLRootList(\n obj: any,\n elementName: string,\n xmlNamespaceKey?: string,\n xmlNamespace?: string,\n): { [key: string]: any[] } {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n\n const result = { [elementName]: obj };\n result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n return result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"serializationPolicy.js","sourceRoot":"","sources":["../../src/serializationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EACL,sCAAsC,EACtC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAiB7D;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAsC,EAAE;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAE1C,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,CAAC,YAAY,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,MAAM,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1D,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n DictionaryMapper,\n OperationArguments,\n OperationRequest,\n OperationSpec,\n RequiredSerializerOptions,\n SerializerOptions,\n XmlOptions,\n} from \"./interfaces.js\";\nimport { XML_ATTRKEY, XML_CHARKEY } from \"./interfaces.js\";\nimport type { PipelinePolicy, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport {\n getOperationArgumentValueFromParameter,\n getOperationRequestInfo,\n} from \"./operationHelpers.js\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\n\n/**\n * The programmatic identifier of the serializationPolicy.\n */\nexport const serializationPolicyName = \"serializationPolicy\";\n\n/**\n * Options to configure API request serialization.\n */\nexport interface SerializationPolicyOptions {\n /**\n * A function that is able to write XML. Required for XML support.\n */\n stringifyXML?: (obj: any, opts?: XmlOptions) => string;\n\n /**\n * Configures behavior of xml parser and builder.\n */\n serializerOptions?: SerializerOptions;\n}\n\n/**\n * This policy handles assembling the request body and headers using\n * an OperationSpec and OperationArguments on the request.\n */\nexport function serializationPolicy(options: SerializationPolicyOptions = {}): PipelinePolicy {\n const stringifyXML = options.stringifyXML;\n\n return {\n name: serializationPolicyName,\n async sendRequest(request: OperationRequest, next: SendRequest): Promise<PipelineResponse> {\n const operationInfo = getOperationRequestInfo(request);\n const operationSpec = operationInfo?.operationSpec;\n const operationArguments = operationInfo?.operationArguments;\n if (operationSpec && operationArguments) {\n serializeHeaders(request, operationArguments, operationSpec);\n serializeRequestBody(request, operationArguments, operationSpec, stringifyXML);\n }\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function serializeHeaders(\n request: OperationRequest,\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n): void {\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue = getOperationArgumentValueFromParameter(operationArguments, headerParameter);\n if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) {\n headerValue = operationSpec.serializer.serialize(\n headerParameter.mapper,\n headerValue,\n getPathStringFromParameter(headerParameter),\n );\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper)\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n request.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n request.headers.set(\n headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter),\n headerValue,\n );\n }\n }\n }\n }\n const customHeaders = operationArguments.options?.requestOptions?.customHeaders;\n if (customHeaders) {\n for (const customHeaderName of Object.keys(customHeaders)) {\n request.headers.set(customHeaderName, customHeaders[customHeaderName]);\n }\n }\n}\n\n/**\n * @internal\n */\nexport function serializeRequestBody(\n request: OperationRequest,\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n stringifyXML: (obj: any, opts?: XmlOptions) => string = function () {\n throw new Error(\"XML serialization unsupported!\");\n },\n): void {\n const serializerOptions = operationArguments.options?.serializerOptions;\n const updatedOptions: RequiredSerializerOptions = {\n xml: {\n rootName: serializerOptions?.xml.rootName ?? \"\",\n includeRoot: serializerOptions?.xml.includeRoot ?? false,\n xmlCharKey: serializerOptions?.xml.xmlCharKey ?? XML_CHARKEY,\n },\n };\n\n const xmlCharKey = updatedOptions.xml.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n request.body = getOperationArgumentValueFromParameter(\n operationArguments,\n operationSpec.requestBody,\n );\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const {\n required,\n serializedName,\n xmlName,\n xmlElementName,\n xmlNamespace,\n xmlNamespacePrefix,\n nullable,\n } = bodyMapper;\n const typeName = bodyMapper.type.name;\n\n try {\n if (\n (request.body !== undefined && request.body !== null) ||\n (nullable && request.body === null) ||\n required\n ) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(\n operationSpec.requestBody,\n );\n request.body = operationSpec.serializer.serialize(\n bodyMapper,\n request.body,\n requestBodyParameterPathString,\n updatedOptions,\n );\n\n const isStream = typeName === MapperTypeNames.Stream;\n\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(\n xmlNamespace,\n xmlnsKey,\n typeName,\n request.body,\n updatedOptions,\n );\n\n if (typeName === MapperTypeNames.Sequence) {\n request.body = stringifyXML(\n prepareXMLRootList(\n value,\n xmlElementName || xmlName || serializedName!,\n xmlnsKey,\n xmlNamespace,\n ),\n { rootName: xmlName || serializedName, xmlCharKey },\n );\n } else if (!isStream) {\n request.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n } else if (\n typeName === MapperTypeNames.String &&\n (operationSpec.contentType?.match(\"text/plain\") || operationSpec.mediaType === \"text\")\n ) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n } else if (!isStream) {\n request.body = JSON.stringify(request.body);\n }\n }\n } catch (error: any) {\n throw new Error(\n `Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(\n serializedName,\n undefined,\n \" \",\n )}.`,\n );\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n request.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue = getOperationArgumentValueFromParameter(\n operationArguments,\n formDataParameter,\n );\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName: string =\n formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(\n formDataParameter.mapper,\n formDataParameterValue,\n getPathStringFromParameter(formDataParameter),\n updatedOptions,\n );\n }\n }\n }\n}\n\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(\n xmlNamespace: string | undefined,\n xmlnsKey: string,\n typeName: string,\n serializedValue: any,\n options: RequiredSerializerOptions,\n): any {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result: any = {};\n result[options.xml.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n\n return serializedValue;\n}\n\nfunction prepareXMLRootList(\n obj: any,\n elementName: string,\n xmlNamespaceKey?: string,\n xmlNamespace?: string,\n): { [key: string]: any[] } {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n\n const result = { [elementName]: obj };\n result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n return result;\n}\n"]}
|
package/dist/esm/serializer.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/serializer.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/serializer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAUV,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAmTzB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAO,EACzC,KAAK,GAAE,OAAe,GACrB,UAAU,CAEZ;AAs2BD;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAiBlB,CAAC"}
|
package/dist/esm/serializer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import * as base64 from "./base64.js";
|
|
4
|
-
import { XML_ATTRKEY, XML_CHARKEY
|
|
4
|
+
import { XML_ATTRKEY, XML_CHARKEY } from "./interfaces.js";
|
|
5
5
|
import { isDuration, isValidUuid } from "./utils.js";
|
|
6
6
|
class SerializerImpl {
|
|
7
7
|
constructor(modelMappers = {}, isXML = false) {
|