Socket
Socket
Sign inDemoInstall

@microsoft/kiota-abstractions

Package Overview
Dependencies
6
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-preview.51 to 1.0.0-preview.52

dist/es/src/utils/inNodeEnv.d.ts

6

dist/es/src/apiClientBuilder.d.ts

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type ParseNodeFactory, type SerializationWriterFactory } from "./serialization";

@@ -2,0 +8,0 @@ /**

14

dist/es/src/apiClientBuilder.js

@@ -0,3 +1,9 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry } from "./serialization";
import { BackingStoreParseNodeFactory, BackingStoreSerializationWriterProxyFactory, } from "./store";
import { BackingStoreParseNodeFactory, BackingStoreSerializationWriterProxyFactory } from "./store";
/**

@@ -62,4 +68,3 @@ * Registers the default serializer to the registry.

for (const [k, v] of registry.contentTypeAssociatedFactories) {
if (!(v instanceof BackingStoreParseNodeFactory ||
v instanceof ParseNodeFactoryRegistry)) {
if (!(v instanceof BackingStoreParseNodeFactory || v instanceof ParseNodeFactoryRegistry)) {
registry.contentTypeAssociatedFactories.set(k, new BackingStoreParseNodeFactory(v));

@@ -71,4 +76,3 @@ }

for (const [k, v] of registry.contentTypeAssociatedFactories) {
if (!(v instanceof BackingStoreSerializationWriterProxyFactory ||
v instanceof SerializationWriterFactoryRegistry)) {
if (!(v instanceof BackingStoreSerializationWriterProxyFactory || v instanceof SerializationWriterFactoryRegistry)) {
registry.contentTypeAssociatedFactories.set(k, new BackingStoreSerializationWriterProxyFactory(v));

@@ -75,0 +79,0 @@ }

@@ -0,10 +1,13 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { getPathParameters } from "./getPathParameters";
import { HttpMethod } from "./httpMethod";
import { RequestInformation, } from "./requestInformation";
import { RequestInformation } from "./requestInformation";
function sanitizeMethodName(methodName) {
if (methodName.startsWith("to")) {
return methodName
.substring(2)
.replace("RequestInformation", "")
.toLowerCase();
return methodName.substring(2).replace("RequestInformation", "").toLowerCase();
}

@@ -41,10 +44,6 @@ return methodName;

if (typeof metadata.requestBodySerializer === "function") {
requestInfo.setContentFromParsable(requestAdapter, metadata.requestBodyContentType
? metadata.requestBodyContentType
: bodyMediaType, body, metadata.requestBodySerializer);
requestInfo.setContentFromParsable(requestAdapter, metadata.requestBodyContentType ? metadata.requestBodyContentType : bodyMediaType, body, metadata.requestBodySerializer);
}
else {
requestInfo.setContentFromScalar(requestAdapter, metadata.requestBodyContentType
? metadata.requestBodyContentType
: bodyMediaType, body);
requestInfo.setContentFromScalar(requestAdapter, metadata.requestBodyContentType ? metadata.requestBodyContentType : bodyMediaType, body);
}

@@ -55,5 +54,3 @@ }

throw new Error("body cannot be undefined");
requestInfo.setStreamContent(body, metadata.requestBodyContentType
? metadata.requestBodyContentType
: bodyMediaType);
requestInfo.setStreamContent(body, metadata.requestBodyContentType ? metadata.requestBodyContentType : bodyMediaType);
}

@@ -68,5 +65,3 @@ return requestInfo;

function getRequestMediaTypeUserDefinedValue(requestMetadata, args) {
if (args.length > 2 &&
!requestMetadata.requestBodySerializer &&
requestMetadata.requestInformationContentSetMethod === "setStreamContent") {
if (args.length > 2 && !requestMetadata.requestBodySerializer && requestMetadata.requestInformationContentSetMethod === "setStreamContent") {
// request body with unknown media type so we have an argument for it.

@@ -197,4 +192,3 @@ return args[1];

if (navigationCandidate) {
if (!navigationCandidate.pathParametersMappings ||
navigationCandidate.pathParametersMappings.length === 0) {
if (!navigationCandidate.pathParametersMappings || navigationCandidate.pathParametersMappings.length === 0) {
// navigation property

@@ -206,4 +200,3 @@ return apiClientProxifier(requestAdapter, getPathParameters(pathParameters), navigationCandidate.navigationMetadata, navigationCandidate.requestsMetadata);

const downWardPathParameters = getPathParameters(pathParameters);
if (navigationCandidate.pathParametersMappings &&
navigationCandidate.pathParametersMappings.length > 0) {
if (navigationCandidate.pathParametersMappings && navigationCandidate.pathParametersMappings.length > 0) {
for (let i = 0; i < argArray.length; i++) {

@@ -210,0 +203,0 @@ const element = argArray[i];

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/** Parent interface for errors thrown by the client when receiving failed responses to its requests. */

@@ -2,0 +8,0 @@ export interface ApiError extends Error {

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/** Default error type used when no error mapping is registered for the status code */

@@ -2,0 +8,0 @@ export class DefaultApiError extends Error {

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type AllowedHostsValidator } from "./allowedHostsValidator";

@@ -2,0 +8,0 @@ /**

@@ -1,2 +0,7 @@

/** Maintains a list of valid hosts and allows authentication providers to check whether a host is valid before authenticating a request */
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export declare class AllowedHostsValidator {

@@ -3,0 +8,0 @@ private allowedHosts;

@@ -1,2 +0,7 @@

/** Maintains a list of valid hosts and allows authentication providers to check whether a host is valid before authenticating a request */
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export class AllowedHostsValidator {

@@ -47,6 +52,6 @@ /**

}
//@ts-ignore
// @ts-ignore
if (window && window.location && window.location.host) {
// we're in a browser, and we're using paths only ../path, ./path, /path, etc.
//@ts-ignore
// @ts-ignore
return this.allowedHosts.has((_a = window.location.host) === null || _a === void 0 ? void 0 : _a.toLowerCase());

@@ -70,3 +75,3 @@ }

}
hostsToValidate.forEach(host => {
hostsToValidate.forEach((host) => {
if (host.toLowerCase().startsWith("http://") || host.toLowerCase().startsWith("https://")) {

@@ -73,0 +78,0 @@ throw new Error("host should not contain http or https prefix");

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type RequestInformation } from "../requestInformation";

@@ -2,0 +8,0 @@ import { type AuthenticationProvider } from "./authenticationProvider";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type RequestInformation } from "../requestInformation";

@@ -2,0 +8,0 @@ import type { AuthenticationProvider } from "./authenticationProvider";

@@ -22,4 +22,3 @@ import { AllowedHostsValidator } from "./allowedHostsValidator";

}
if (location !== ApiKeyLocation.QueryParameter &&
location !== ApiKeyLocation.Header) {
if (location !== ApiKeyLocation.QueryParameter && location !== ApiKeyLocation.Header) {
throw new Error("location must be either QueryParameter or Header");

@@ -39,7 +38,3 @@ }

case ApiKeyLocation.QueryParameter:
request.URL +=
(url.indexOf("?") === -1 ? "?" : "&") +
this.parameterName +
"=" +
this.apiKey;
request.URL += (url.indexOf("?") === -1 ? "?" : "&") + this.parameterName + "=" + this.apiKey;
break;

@@ -46,0 +41,0 @@ case ApiKeyLocation.Header:

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type RequestInformation } from "../requestInformation";

@@ -2,0 +8,0 @@ /**

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { Headers } from "../headers";

@@ -14,9 +20,6 @@ /** Provides a base class for implementing AuthenticationProvider for Bearer token scheme. */

}
if (additionalAuthenticationContext &&
additionalAuthenticationContext["claims"] &&
request.headers.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey)) {
if ((additionalAuthenticationContext === null || additionalAuthenticationContext === void 0 ? void 0 : additionalAuthenticationContext.claims) && request.headers.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey)) {
request.headers.delete(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey);
}
if (!request.headers ||
!request.headers.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey)) {
if (!request.headers || !request.headers.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey)) {
const token = await this.accessTokenProvider.getAuthorizationToken(request.URL, additionalAuthenticationContext);

@@ -23,0 +26,0 @@ if (!request.headers) {

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./accessTokenProvider";

@@ -2,0 +8,0 @@ export * from "./allowedHostsValidator";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./accessTokenProvider";

@@ -2,0 +8,0 @@ export * from "./allowedHostsValidator";

@@ -0,1 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { inNodeEnv } from "../utils";
const localhostStrings = new Set(["localhost", "[::1]", "::1", "127.0.0.1"]);

@@ -8,4 +15,6 @@ export function validateProtocol(url) {

function windowUrlStartsWithHttps() {
// @ts-ignore
return typeof window !== "undefined" && typeof window.location !== "undefined" && window.location.protocol.toLowerCase() !== "https:";
if (!inNodeEnv()) {
return window.location.protocol.toLocaleLowerCase() === "https:";
}
return false;
}

@@ -12,0 +21,0 @@ export function isLocalhostUrl(urlString) {

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export interface BaseRequestBuilder<T> {

@@ -2,0 +8,0 @@ withUrl(rawUrl: string): T;

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Represents a date only. ISO 8601.

@@ -12,3 +18,3 @@ */

*/
constructor({ year, month, day, }: Partial<DateOnlyInterface>);
constructor({ year, month, day }: Partial<DateOnlyInterface>);
year: number;

@@ -15,0 +21,0 @@ month: number;

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Represents a date only. ISO 8601.

@@ -12,3 +18,3 @@ */

*/
constructor({ year = 0, month = 1, day = 1, }) {
constructor({ year = 0, month = 1, day = 1 }) {
this.day = day;

@@ -15,0 +21,0 @@ this.month = month;

@@ -17,3 +17,3 @@ /**

*/
constructor({ years, months, weeks, days, hours, minutes, seconds, negative, }: Partial<DurationInterface>);
constructor({ years, months, weeks, days, hours, minutes, seconds, negative }: Partial<DurationInterface>);
years: number;

@@ -20,0 +20,0 @@ months: number;

@@ -1,3 +0,9 @@

import { parse as parseDuration, serialize as serializeDuration, } from "tinyduration";
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { parse as parseDuration, serialize as serializeDuration } from "tinyduration";
/**
* Represents a duration value. ISO 8601.

@@ -18,24 +24,27 @@ */

*/
constructor({ years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, negative = false, }) {
constructor({ years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, negative = false }) {
if (years < 0 || years > 9999) {
throw new Error("Year must be between 0 and 9999");
}
if (months < 0 || months > 11) {
throw new Error("Month must be between 0 and 11");
if (months < 0) {
throw new Error("Month must be greater or equal to 0");
}
if (weeks < 0 || weeks > 53) {
throw new Error("Week must be between 0 and 53");
if (weeks < 0) {
throw new Error("Week must be greater or equal to 0");
}
if (days < 0 || days > 6) {
throw new Error("Day must be between 0 and 6");
if (days < 0) {
throw new Error("Day must be greater or equal to 0");
}
if (hours < 0 || hours > 23) {
throw new Error("Hour must be between 0 and 23");
if (hours < 0) {
throw new Error("Hour must be greater or equal to 0");
}
if (minutes < 0 || minutes > 59) {
throw new Error("Minute must be between 0 and 59");
if (minutes < 0) {
throw new Error("Minute must be greater or equal to 0");
}
if (seconds < 0 || seconds > 59) {
throw new Error("Second must be between 0 and 59");
if (seconds < 0) {
throw new Error("Second must be greater or equal to 0");
}
if (weeks > 0 && (days > 0 || hours > 0 || minutes > 0 || seconds > 0)) {
throw new Error("Cannot have weeks and days or hours or minutes or seconds");
}
if ((years > 0 || months > 0) && weeks > 0) {

@@ -42,0 +51,0 @@ throw new Error("Cannot have weeks and months or weeks and years");

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { RequestInformation } from "./requestInformation";

@@ -2,0 +8,0 @@ export function getPathParameters(parameters) {

@@ -12,3 +12,3 @@ /**

private headers;
private singleValueHeaders;
private readonly singleValueHeaders;
/**

@@ -15,0 +15,0 @@ * Creates a new Headers object.

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { createRecordWithCaseInsensitiveKeys } from "./recordWithCaseInsensitiveKeys";

@@ -27,7 +33,3 @@ /**

this.headers = createRecordWithCaseInsensitiveKeys();
this.singleValueHeaders = new Set([
"Content-Type",
"Content-Encoding",
"Content-Length",
]);
this.singleValueHeaders = new Set(["Content-Type", "Content-Encoding", "Content-Length"]);
if (entries) {

@@ -224,3 +226,3 @@ entries.forEach(([key, value]) => {

toString() {
return JSON.stringify(this.headers, (_key, value) => value instanceof Set ? [...value] : value);
return JSON.stringify(this.headers, (_key, value) => (value instanceof Set ? [...value] : value));
}

@@ -227,0 +229,0 @@ /**

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Represents the HTTP method used by a request.

@@ -3,0 +9,0 @@ */

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Represents the HTTP method used by a request.

@@ -3,0 +9,0 @@ */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./apiClientBuilder";

@@ -2,0 +8,0 @@ export * from "./apiClientProxifier";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./apiClientBuilder";

@@ -2,0 +8,0 @@ export * from "./apiClientProxifier";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { Guid } from "guid-typescript";

@@ -133,4 +139,3 @@ /**

if (!partSerializationWriter) {
throw new Error("no serialization writer factory for content type: " +
part.contentType);
throw new Error("no serialization writer factory for content type: " + part.contentType);
}

@@ -137,0 +142,0 @@ partSerializationWriter.writeObjectValue(undefined, part.content, part.serializationCallback);

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { ErrorMappings } from "./requestAdapter";

@@ -2,0 +8,0 @@ import type { ResponseHandler } from "./responseHandler";

var _a;
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { NativeResponseHandler } from "./nativeResponseHandler";

@@ -3,0 +9,0 @@ /** This class can be used to wrap a request using the fluent API and get the native response object in return. */

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* A wrapper for type Record that creates a Record with case insensitive keys

@@ -3,0 +9,0 @@ * @returns A new object that can be used as a dictionary with case-insensitive keys.

/**
* A Proxy that allows implementation of a Object with case insensitive keys
* @param canon A function that takes a property name and returns its canonical form.
* @returns A new object that can be used as a dictionary with case-insensitive keys.
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/

@@ -70,5 +71,5 @@ function dictionaryWithCanonicalKeys(canon) {

*/
const record = dictionaryWithCanonicalKeys((p) => typeof p === "string" ? p.toLowerCase() : p.toString().toLowerCase());
const record = dictionaryWithCanonicalKeys((p) => (typeof p === "string" ? p.toLowerCase() : p.toString().toLowerCase()));
return record;
}
//# sourceMappingURL=recordWithCaseInsensitiveKeys.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { DateOnly } from "./dateOnly";

@@ -2,0 +8,0 @@ import type { Duration } from "./duration";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { RequestOption } from "./requestOption";

@@ -2,0 +8,0 @@ /**

@@ -56,4 +56,4 @@ import { Headers } from "./headers";

setContentFromParsable: <T extends Parsable>(requestAdapter?: RequestAdapter | undefined, contentType?: string | undefined, value?: T[] | T, modelSerializerFunction?: ModelSerializerFunction<T>) => void;
private setContentAndContentType;
private getSerializationWriter;
private readonly setContentAndContentType;
private readonly getSerializationWriter;
/**

@@ -60,0 +60,0 @@ * Sets the request body from a model with the specified content type.

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { trace } from "@opentelemetry/api";

@@ -33,5 +39,3 @@ import { StdUriTemplate } from "@std-uritemplate/std-uritemplate";

this.setContentFromParsable = (requestAdapter, contentType, value, modelSerializerFunction) => {
trace
.getTracer(RequestInformation.tracerKey)
.startActiveSpan("setContentFromParsable", (span) => {
trace.getTracer(RequestInformation.tracerKey).startActiveSpan("setContentFromParsable", (span) => {
try {

@@ -76,5 +80,3 @@ const writer = this.getSerializationWriter(requestAdapter, contentType, value);

}
return requestAdapter
.getSerializationWriterFactory()
.getSerializationWriter(contentType);
return requestAdapter.getSerializationWriterFactory().getSerializationWriter(contentType);
};

@@ -89,5 +91,3 @@ /**

this.setContentFromScalar = (requestAdapter, contentType, value) => {
trace
.getTracer(RequestInformation.tracerKey)
.startActiveSpan("setContentFromScalar", (span) => {
trace.getTracer(RequestInformation.tracerKey).startActiveSpan("setContentFromScalar", (span) => {
try {

@@ -94,0 +94,0 @@ const writer = this.getSerializationWriter(requestAdapter, contentType, value);

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/** Represents a request option. */

@@ -2,0 +8,0 @@ export interface RequestOption {

@@ -0,2 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export {};
//# sourceMappingURL=requestOption.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type ErrorMappings } from "./requestAdapter";

@@ -2,0 +8,0 @@ /** Defines the contract for a response handler. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/** Defines a contract for models that can hold additional data besides the described properties. */

@@ -2,0 +8,0 @@ export interface AdditionalDataHolder {

@@ -0,2 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export {};
//# sourceMappingURL=additionalDataHolder.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./additionalDataHolder";

@@ -2,0 +8,0 @@ export * from "./kiotaJsonSerializer";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./additionalDataHolder";

@@ -2,0 +8,0 @@ export * from "./kiotaJsonSerializer";

@@ -1,2 +0,8 @@

import { deserialize, deserializeCollection, serialize, serializeCollection, serializeCollectionToString as serializeCollectionAsString, serializeToString as serializeAsString, } from "./kiotaSerializer";
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { deserialize, deserializeCollection, serialize, serializeCollection, serializeCollectionToString as serializeCollectionAsString, serializeToString as serializeAsString } from "./kiotaSerializer";
const jsonContentType = "application/json";

@@ -3,0 +9,0 @@ /**

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -2,0 +8,0 @@ import type { ParsableFactory } from "./parsableFactory";

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Defines a serializable model object.

@@ -3,0 +9,0 @@ */

@@ -0,2 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export {};
//# sourceMappingURL=parsable.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -2,0 +8,0 @@ import type { ParseNode } from "./parseNode";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Guid } from "guid-typescript";

@@ -2,0 +8,0 @@ import type { DateOnly } from "../dateOnly";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { ParseNode } from "./parseNode";

@@ -2,0 +8,0 @@ /**

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { ParseNode } from "./parseNode";

@@ -2,0 +8,0 @@ import type { ParseNodeFactory } from "./parseNodeFactory";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -2,0 +8,0 @@ import type { ParseNode } from "./parseNode";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -2,0 +8,0 @@ import type { ParseNode } from "./parseNode";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Guid } from "guid-typescript";

@@ -2,0 +8,0 @@ import type { DateOnly } from "../dateOnly";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { SerializationWriter } from "./serializationWriter";

@@ -2,0 +8,0 @@ /** Defines the contract for a factory that creates SerializationWriter instances. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { SerializationWriter } from "./serializationWriter";

@@ -2,0 +8,0 @@ import type { SerializationWriterFactory } from "./serializationWriterFactory";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -2,0 +8,0 @@ import type { SerializationWriter } from "./serializationWriter";

@@ -35,5 +35,5 @@ /** Proxy factory that allows the composition of before and after callbacks on existing factories. */

};
writer.onStartObjectSerialization = (value, writer) => {
this._onStart && this._onStart(value, writer);
originalStart && originalStart(value, writer);
writer.onStartObjectSerialization = (value, writer_) => {
this._onStart && this._onStart(value, writer_);
originalStart && originalStart(value, writer_);
};

@@ -40,0 +40,0 @@ return writer;

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines an interface for defining an untyped array. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { isUntypedNode } from "./untypedNode";

@@ -9,5 +15,3 @@ /**

const proposedNode = node;
return (proposedNode &&
proposedNode.value instanceof Array &&
proposedNode.value.every((item) => isUntypedNode(item)));
return proposedNode && proposedNode.value instanceof Array && proposedNode.value.every((item) => isUntypedNode(item));
}

@@ -21,3 +25,3 @@ /**

return {
value: value,
value,
getValue: () => value,

@@ -24,0 +28,0 @@ };

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines an interface for defining an untyped boolean. */

@@ -17,3 +17,3 @@ /**

return {
value: value,
value,
getValue: () => value,

@@ -20,0 +20,0 @@ };

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { Parsable } from "./parsable";

@@ -18,3 +24,3 @@ import type { ParseNode } from "./parseNode";

*/
export declare function createUntypedNodeFromDiscriminatorValue(_parseNode: ParseNode | undefined): (instance?: Parsable) => Record<string, (node: ParseNode) => void>;
export declare function createUntypedNodeFromDiscriminatorValue(_parseNode: ParseNode | undefined): (_instance?: Parsable) => Record<string, (_node: ParseNode) => void>;
/**

@@ -21,0 +27,0 @@ * Type guard to assert that an object instance is an UntypedNode.

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Factory to create an UntypedNode from a string during deserialization.

@@ -14,3 +20,3 @@ */

const potentialNode = node;
return potentialNode && potentialNode.getValue !== undefined;
return (potentialNode === null || potentialNode === void 0 ? void 0 : potentialNode.getValue) !== undefined;
}

@@ -22,6 +28,6 @@ /**

return {
value: (n) => {
value: (_n) => {
untypedNode.value = null;
},
getValue: (n) => {
getValue: (_n) => {
untypedNode.getValue = () => untypedNode.value;

@@ -28,0 +34,0 @@ },

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines the interface for defining an untyped null value. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines the interface for defining an untyped number value. */

@@ -17,3 +17,3 @@ /**

return {
value: value,
value,
getValue: () => value,

@@ -20,0 +20,0 @@ };

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines the interface for defining an untyped object value. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { isUntypedNode } from "./untypedNode";

@@ -9,6 +15,3 @@ /**

const proposedNode = node;
return (proposedNode &&
proposedNode.value instanceof Object &&
proposedNode.value instanceof Array === false &&
Object.values(proposedNode.value).every((item) => isUntypedNode(item)));
return proposedNode && proposedNode.value instanceof Object && proposedNode.value instanceof Array === false && Object.values(proposedNode.value).every((item) => isUntypedNode(item));
}

@@ -22,3 +25,3 @@ /**

return {
value: value,
value,
getValue: () => value,

@@ -25,0 +28,0 @@ };

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { UntypedNode } from "./untypedNode";

@@ -2,0 +8,0 @@ /** Defines the interface for defining an untyped string value. */

@@ -17,3 +17,3 @@ /**

return {
value: value,
value,
getValue: () => value,

@@ -20,0 +20,0 @@ };

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { BackingStore } from "./backingStore";

@@ -2,0 +8,0 @@ /** Defines the contracts for a model that is backed by a store. */

@@ -1,2 +0,2 @@

export declare function createBackedModelProxyHandler<T extends {}>(): ProxyHandler<T>;
export declare function createBackedModelProxyHandler<T extends object>(): ProxyHandler<T>;
//# sourceMappingURL=backedModelProxy.d.ts.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { BackingStoreFactorySingleton } from "./backingStoreFactorySingleton";

@@ -10,4 +16,4 @@ // A method that creates a ProxyHandler for a generic model T and attaches it to a backing store.

const handler = {
get(target, prop, receiver) {
if (prop === 'backingStore') {
get(_target, prop, _receiver) {
if (prop === "backingStore") {
return backingStore;

@@ -18,3 +24,3 @@ }

set(target, prop, value, receiver) {
if (prop === 'backingStore') {
if (prop === "backingStore") {
console.warn(`BackingStore - Ignoring attempt to set 'backingStore' property`);

@@ -21,0 +27,0 @@ return true;

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
/**
* Stores model information in a different location than the object properties. Implementations can provide dirty tracking capabilities, caching capabilities or integration with 3rd party stores.

@@ -3,0 +9,0 @@ */

@@ -0,2 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export {};
//# sourceMappingURL=backingStore.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { BackingStore } from "./backingStore";

@@ -2,0 +8,0 @@ /** Defines the contract for a factory that creates backing stores. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { BackingStoreFactory } from "./backingStoreFactory";

@@ -2,0 +8,0 @@ export declare class BackingStoreFactorySingleton {

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type ParseNodeFactory, ParseNodeProxyFactory } from "../serialization";

@@ -2,0 +8,0 @@ /** Proxy implementation of ParseNodeFactory for the backing store that automatically sets the state of the backing store when deserializing. */

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { ParseNodeProxyFactory } from "../serialization";

@@ -11,3 +17,3 @@ /** Proxy implementation of ParseNodeFactory for the backing store that automatically sets the state of the backing store when deserializing. */

const backedModel = value;
if (backedModel && backedModel.backingStore) {
if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {
backedModel.backingStore.initializationCompleted = false;

@@ -17,3 +23,3 @@ }

const backedModel = value;
if (backedModel && backedModel.backingStore) {
if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {
backedModel.backingStore.initializationCompleted = true;

@@ -20,0 +26,0 @@ }

@@ -0,3 +1,9 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type SerializationWriterFactory, SerializationWriterProxyFactory } from "../serialization";
/**Proxy implementation of SerializationWriterFactory for the backing store that automatically sets the state of the backing store when serializing. */
/** Proxy implementation of SerializationWriterFactory for the backing store that automatically sets the state of the backing store when serializing. */
export declare class BackingStoreSerializationWriterProxyFactory extends SerializationWriterProxyFactory {

@@ -4,0 +10,0 @@ /**

@@ -0,3 +1,9 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { SerializationWriterProxyFactory } from "../serialization";
/**Proxy implementation of SerializationWriterFactory for the backing store that automatically sets the state of the backing store when serializing. */
/** Proxy implementation of SerializationWriterFactory for the backing store that automatically sets the state of the backing store when serializing. */
export class BackingStoreSerializationWriterProxyFactory extends SerializationWriterProxyFactory {

@@ -11,3 +17,3 @@ /**

const backedModel = value;
if (backedModel && backedModel.backingStore) {
if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {
backedModel.backingStore.returnOnlyChangedValues = true;

@@ -17,3 +23,3 @@ }

const backedModel = value;
if (backedModel && backedModel.backingStore) {
if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {
backedModel.backingStore.returnOnlyChangedValues = false;

@@ -24,3 +30,3 @@ backedModel.backingStore.initializationCompleted = true;

const backedModel = value;
if (backedModel && backedModel.backingStore) {
if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {
const keys = backedModel.backingStore.enumerateKeysForValuesChangedToNull();

@@ -27,0 +33,0 @@ for (const key of keys) {

@@ -0,9 +1,15 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type ParseNode } from "../serialization";
export declare const BackingStoreKey = "backingStoreEnabled";
/**
* Check if the object is an instance a BackedModel
* @param obj
* @returns
*/
* Check if the object is an instance a BackedModel
* @param obj
* @returns
*/
export declare function isBackingStoreEnabled(fields: Record<string, (node: ParseNode) => void>): boolean;
//# sourceMappingURL=backingStoreUtils.d.ts.map
export const BackingStoreKey = "backingStoreEnabled";
/**
* Check if the object is an instance a BackedModel
* @param obj
* @returns
*/
* Check if the object is an instance a BackedModel
* @param obj
* @returns
*/
export function isBackingStoreEnabled(fields) {

@@ -11,3 +11,2 @@ // Check if the fields contain the backing store key

}
;
//# sourceMappingURL=backingStoreUtils.js.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./backedModel";

@@ -2,0 +8,0 @@ export * from "./backingStore";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./backedModel";

@@ -2,0 +8,0 @@ export * from "./backingStore";

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { v4 as uuidv4 } from "uuid";

@@ -12,5 +18,3 @@ /** In-memory implementation of the backing store. Allows for dirty tracking of changes. */

const wrapper = this.store.get(key);
if (wrapper &&
((this.returnOnlyChangedValues && wrapper.changed) ||
!this.returnOnlyChangedValues)) {
if (wrapper && ((this.returnOnlyChangedValues && wrapper.changed) || !this.returnOnlyChangedValues)) {
return wrapper.value;

@@ -17,0 +21,0 @@ }

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import type { BackingStore } from "./backingStore";

@@ -2,0 +8,0 @@ import type { BackingStoreFactory } from "./backingStoreFactory";

@@ -11,3 +11,3 @@ export declare class TimeOnly implements TimeOnlyInterface {

*/
constructor({ hours, minutes, seconds, picoseconds, }: Partial<TimeOnlyInterface>);
constructor({ hours, minutes, seconds, picoseconds }: Partial<TimeOnlyInterface>);
hours: number;

@@ -14,0 +14,0 @@ minutes: number;

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { formatSegment } from "./dateOnly";

@@ -15,3 +21,3 @@ /*

*/
constructor({ hours = 0, minutes = 0, seconds = 0, picoseconds = 0, }) {
constructor({ hours = 0, minutes = 0, seconds = 0, picoseconds = 0 }) {
if (hours < 0 || hours > 23) {

@@ -18,0 +24,0 @@ throw new Error("Hour must be between 0 and 23");

@@ -0,3 +1,9 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { Guid } from "guid-typescript";
export declare function parseGuidString(source?: string): Guid | undefined;
//# sourceMappingURL=guidUtils.d.ts.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { Guid } from "guid-typescript";

@@ -2,0 +8,0 @@ export function parseGuidString(source) {

@@ -0,3 +1,10 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./stringUtils";
export * from "./guidUtils";
export * from "./inNodeEnv";
//# sourceMappingURL=index.d.ts.map

@@ -0,3 +1,10 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export * from "./stringUtils";
export * from "./guidUtils";
export * from "./inNodeEnv";
//# sourceMappingURL=index.js.map

@@ -0,2 +1,8 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export declare function toFirstCharacterUpper(source?: string): string;
//# sourceMappingURL=stringUtils.d.ts.map

@@ -0,1 +1,7 @@

/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
export function toFirstCharacterUpper(source) {

@@ -2,0 +8,0 @@ if (source && source.length > 0) {

{
"name": "@microsoft/kiota-abstractions",
"version": "1.0.0-preview.51",
"description": "Core abstractions for kiota generated libraries in TypeScript and JavaScript",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
"types": "dist/cjs/src/index.d.ts",
"scripts": {
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.es.json",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"clean": "rm -r ./dist",
"karma": "npm run rollup && karma start --single-run --browsers ChromeHeadless karma.conf.js",
"rollup": "rollup -c",
"test": "npm run build && mocha 'dist/cjs/test/common/**/*.js'"
},
"repository": "git://github.com/microsoft/kiota-typescript.git",
"keywords": [
"kiota",
"openAPI",
"Microsoft",
"Graph"
],
"author": "Microsoft",
"license": "MIT",
"bugs": {
"url": "https://github.com/microsoft/kiota-typescript/issues"
},
"homepage": "https://github.com/microsoft/kiota#readme",
"devDependencies": {
"@types/node": "^20.11.15",
"@types/uuid": "^9.0.8"
},
"dependencies": {
"@opentelemetry/api": "^1.7.0",
"@std-uritemplate/std-uritemplate": "^0.0.57",
"guid-typescript": "^1.0.9",
"tinyduration": "^3.3.0",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "8b6e35c21fdd163b9412bbb7e7fcdf11d475eaab"
"name": "@microsoft/kiota-abstractions",
"version": "1.0.0-preview.52",
"description": "Core abstractions for kiota generated libraries in TypeScript and JavaScript",
"main": "dist/es/src/index.js",
"module": "dist/es/src/index.js",
"types": "dist/es/src/index.d.ts",
"scripts": {
"build": "npm run build:esm",
"build:esm": "tsc",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"clean": "rm -rf ./dist",
"test:browser": "vitest run --browser.name=chrome --browser.headless",
"test:node": "vitest --run",
"test": "npm run test:node && npm run test:browser"
},
"repository": "git://github.com/microsoft/kiota-typescript.git",
"keywords": [
"kiota",
"openAPI",
"Microsoft",
"Graph"
],
"author": "Microsoft",
"license": "MIT",
"bugs": {
"url": "https://github.com/microsoft/kiota-typescript/issues"
},
"homepage": "https://github.com/microsoft/kiota#readme",
"devDependencies": {
"@types/node": "^20.11.15",
"@types/uuid": "^9.0.8"
},
"dependencies": {
"@opentelemetry/api": "^1.7.0",
"@std-uritemplate/std-uritemplate": "^0.0.57",
"guid-typescript": "^1.0.9",
"tinyduration": "^3.3.0",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "395b1b29ee2dcdd4a0f03a5222c506b02f449164"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc