push neon reactor

This commit is contained in:
2026-07-12 15:11:38 +02:00
parent 172e72dbcd
commit aeab5f7820
9597 changed files with 2407488 additions and 0 deletions
@@ -0,0 +1,41 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export interface InitWithPortMessage {
messageType: 'initCommunicationWithPort';
instanceId: string;
}
/** Handshake response sent by the host via the MessagePort. */
export interface InitCommunicationMessage {
messageType: 'initCommunication';
antiCSRFToken: string;
}
/** Plugin call sent by the app to the host on the port. */
export interface PluginCallMessage {
isPluginCall: true;
callbackId: string;
/** @deprecated Use fully-qualified action keys instead (e.g. 'AppLifecycle.getContext'). */
service?: string;
action: string;
actionArgs: unknown[];
antiCSRFToken: string | undefined;
}
/** Plugin response sent by the host to the app on the port. */
export interface PluginResponseMessage {
isPluginCall: true;
callbackId: string;
status: (typeof PluginCallStatus)[keyof typeof PluginCallStatus];
args: unknown[];
keepCallback: boolean;
}
/** Status codes for plugin call responses. */
export declare const PluginCallStatus: {
readonly Pending: 0;
readonly Success: 1;
readonly Error: 2;
};
/** Type guard for InitWithPortMessage. */
export declare function isInitWithPortMessage(data: unknown): data is InitWithPortMessage;
/** Type guard for PluginCallMessage. */
export declare function isPluginCallMessage(data: unknown): data is PluginCallMessage;
//# sourceMappingURL=MessageProtocol.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MessageProtocol.d.ts","sourceRoot":"","sources":["../../src/communication/MessageProtocol.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,2BAA2B,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;IACjE,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,0CAA0C;AAC1C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,mBAAmB,CAMhF;AAED,wCAAwC;AACxC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,iBAAiB,CAW5E"}
@@ -0,0 +1,29 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/** Status codes for plugin call responses. */
export const PluginCallStatus = {
Pending: 0,
Success: 1,
Error: 2,
};
/** Type guard for InitWithPortMessage. */
export function isInitWithPortMessage(data) {
if (typeof data !== 'object' || data === null) {
return false;
}
const msg = data;
return msg.messageType === 'initCommunicationWithPort' && typeof msg.instanceId === 'string';
}
/** Type guard for PluginCallMessage. */
export function isPluginCallMessage(data) {
if (typeof data !== 'object' || data === null) {
return false;
}
const msg = data;
return (msg.isPluginCall === true &&
typeof msg.callbackId === 'string' &&
typeof msg.action === 'string' &&
Array.isArray(msg.actionArgs));
}
//# sourceMappingURL=MessageProtocol.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MessageProtocol.js","sourceRoot":"","sources":["../../src/communication/MessageProtocol.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiCH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,CAAC;CACA,CAAC;AAEX,0CAA0C;AAC1C,MAAM,UAAU,qBAAqB,CAAC,IAAa;IACjD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,IAA+B,CAAC;IAC5C,OAAO,GAAG,CAAC,WAAW,KAAK,2BAA2B,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC;AAC/F,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,mBAAmB,CAAC,IAAa;IAC/C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,IAA+B,CAAC;IAC5C,OAAO,CACL,GAAG,CAAC,YAAY,KAAK,IAAI;QACzB,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ;QAClC,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ;QAC9B,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,48 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* **Wire Contract Guards — Message Protocol Compile-Time Layer**
*
* This file uses TypeScript conditional types to assert exact type equality
* for every message envelope interface. If any interface changes shape,
* `tsc` will fail.
*
* This file produces no runtime output — it exists solely for `bun run check-types`.
*/
import type { InitCommunicationMessage, InitWithPortMessage, PluginCallMessage, PluginCallStatus, PluginResponseMessage } from './MessageProtocol.js';
type IsExact<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => G extends U ? 1 : 2 ? true : false;
type Assert<T extends true> = T;
type _InitWithPortMessage = Assert<IsExact<InitWithPortMessage, {
messageType: 'initCommunicationWithPort';
instanceId: string;
}>>;
type _InitCommunicationMessage = Assert<IsExact<InitCommunicationMessage, {
messageType: 'initCommunication';
antiCSRFToken: string;
}>>;
type _PluginCallMessage = Assert<IsExact<PluginCallMessage, {
isPluginCall: true;
callbackId: string;
/** @deprecated */ service?: string;
action: string;
actionArgs: unknown[];
antiCSRFToken: string | undefined;
}>>;
type _PluginResponseMessage = Assert<IsExact<PluginResponseMessage, {
isPluginCall: true;
callbackId: string;
status: (typeof PluginCallStatus)[keyof typeof PluginCallStatus];
args: unknown[];
keepCallback: boolean;
}>>;
type _PluginCallStatusType = Assert<IsExact<(typeof PluginCallStatus)[keyof typeof PluginCallStatus], 0 | 1 | 2>>;
export type _ContractChecks = [
_InitWithPortMessage,
_InitCommunicationMessage,
_PluginCallMessage,
_PluginResponseMessage,
_PluginCallStatusType
];
export {};
//# sourceMappingURL=MessageProtocolContracts.typecheck.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MessageProtocolContracts.typecheck.d.ts","sourceRoot":"","sources":["../../src/communication/MessageProtocolContracts.typecheck.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAI3B,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IACf,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AACrF,KAAK,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;AAIhC,KAAK,oBAAoB,GAAG,MAAM,CAChC,OAAO,CACL,mBAAmB,EACnB;IACE,WAAW,EAAE,2BAA2B,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB,CACF,CACF,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CACrC,OAAO,CACL,wBAAwB,EACxB;IACE,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,CACF,CACF,CAAC;AAEF,KAAK,kBAAkB,GAAG,MAAM,CAC9B,OAAO,CACL,iBAAiB,EACjB;IACE,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CACF,CACF,CAAC;AAEF,KAAK,sBAAsB,GAAG,MAAM,CAClC,OAAO,CACL,qBAAqB,EACrB;IACE,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;IACjE,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB,CACF,CACF,CAAC;AAIF,KAAK,qBAAqB,GAAG,MAAM,CACjC,OAAO,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAC7E,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,oBAAoB;IACpB,yBAAyB;IACzB,kBAAkB;IAClB,sBAAsB;IACtB,qBAAqB;CACtB,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export {};
//# sourceMappingURL=MessageProtocolContracts.typecheck.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MessageProtocolContracts.typecheck.js","sourceRoot":"","sources":["../../src/communication/MessageProtocolContracts.typecheck.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { InitCommunicationMessage, InitWithPortMessage, isInitWithPortMessage, isPluginCallMessage, PluginCallMessage, PluginCallStatus, PluginResponseMessage, } from './MessageProtocol.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/communication/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { isInitWithPortMessage, isPluginCallMessage, PluginCallStatus, } from './MessageProtocol.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/communication/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EAEnB,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,40 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Plain object representing a serialized error that survives `structuredClone`
* and `postMessage` across iframe boundaries.
*
* The `__type` discriminator allows receivers to distinguish a serialized error
* from an arbitrary object.
*/
export interface SerializedError {
readonly __type: 'SerializedError';
readonly name: string;
readonly message: string;
readonly code?: string;
readonly stack?: string;
readonly httpStatus?: number;
readonly details?: unknown;
}
/**
* Type guard: returns `true` when `value` is a {@link SerializedError}.
*/
export declare function isSerializedError(value: unknown): value is SerializedError;
/**
* Convert any thrown value into a {@link SerializedError}.
*
* Duck-types against known SDK error shapes so callers don't need to import
* concrete error classes:
*
* - `SdkError` instances -> extracts `code`, `details`
* - Objects with `status: number` -> extracts as `httpStatus` (covers HttpError)
* - Objects with `responseData` -> extracts as `details` (covers HttpError)
* - Strings / primitives -> wraps as `{ name: 'Error', message: String(value) }`
* - Already a `SerializedError` -> returns as-is (idempotent)
*
* **Security:** Deliberately omits `HttpError.config` which may contain auth
* tokens in request headers.
*/
export declare function serializeError(error: unknown): SerializedError;
//# sourceMappingURL=ErrorSerialization.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ErrorSerialization.d.ts","sourceRoot":"","sources":["../../src/errors/ErrorSerialization.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAM1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CA0D9D"}
@@ -0,0 +1,78 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import { SdkError } from './SdkError.js';
/**
* Type guard: returns `true` when `value` is a {@link SerializedError}.
*/
export function isSerializedError(value) {
return (typeof value === 'object' &&
value !== null &&
value.__type === 'SerializedError');
}
/**
* Convert any thrown value into a {@link SerializedError}.
*
* Duck-types against known SDK error shapes so callers don't need to import
* concrete error classes:
*
* - `SdkError` instances -> extracts `code`, `details`
* - Objects with `status: number` -> extracts as `httpStatus` (covers HttpError)
* - Objects with `responseData` -> extracts as `details` (covers HttpError)
* - Strings / primitives -> wraps as `{ name: 'Error', message: String(value) }`
* - Already a `SerializedError` -> returns as-is (idempotent)
*
* **Security:** Deliberately omits `HttpError.config` which may contain auth
* tokens in request headers.
*/
export function serializeError(error) {
// Already serialized — return as-is.
if (isSerializedError(error)) {
return error;
}
// Non-object / null / primitive — wrap as a simple Error shape.
if (typeof error !== 'object' || error === null) {
return {
__type: 'SerializedError',
name: 'Error',
message: String(error),
};
}
const obj = error;
const name = typeof obj.name === 'string' ? obj.name : 'Error';
const message = typeof obj.message === 'string' ? obj.message : String(error);
const stack = typeof obj.stack === 'string' ? obj.stack : undefined;
// SdkError-derived: extract code + details.
if (error instanceof SdkError) {
const result = {
__type: 'SerializedError',
name,
message,
code: error.code,
stack,
details: error.details,
};
// Duck-type for HttpError's `status` property.
if (typeof obj.status === 'number') {
return { ...result, httpStatus: obj.status };
}
return result;
}
// Plain Error or unknown object — duck-type for HttpError-like shapes.
const result = {
__type: 'SerializedError',
name,
message,
stack,
};
const code = typeof obj.code === 'string' ? obj.code : undefined;
const httpStatus = typeof obj.status === 'number' ? obj.status : undefined;
const details = obj.responseData !== undefined ? obj.responseData : obj.details;
return {
...result,
...(code !== undefined && { code }),
...(httpStatus !== undefined && { httpStatus }),
...(details !== undefined && { details }),
};
}
//# sourceMappingURL=ErrorSerialization.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ErrorSerialization.js","sourceRoot":"","sources":["../../src/errors/ErrorSerialization.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAmBtC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAiC,CAAC,MAAM,KAAK,iBAAiB,CAChE,CAAC;AACJ,CAAC;AAED;;;;;;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ChB,CAAC;IAED,uEAAuE;IACvE,MAAM,MAAM,GAAoB;QAC9B,MAAM,EAAE,iBAAiB;QACzB,IAAI;QACJ,OAAO;QACP,KAAK;KACN,CAAC;IAEF,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3E,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;IAEhF,OAAO;QACL,GAAG,MAAM;QACT,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC;QACnC,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC;QAC/C,GAAG,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Base error class for all SDK error types.
*
* Provides a structured `code` (machine-readable identifier) and optional
* `details` payload so that error information survives serialization across
* iframe boundaries.
*/
export declare class SdkError extends Error {
readonly code: string;
readonly details?: unknown;
constructor(code: string, message: string, details?: unknown);
}
//# sourceMappingURL=SdkError.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SdkError.d.ts","sourceRoot":"","sources":["../../src/errors/SdkError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEf,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAM7D"}
@@ -0,0 +1,21 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Base error class for all SDK error types.
*
* Provides a structured `code` (machine-readable identifier) and optional
* `details` payload so that error information survives serialization across
* iframe boundaries.
*/
export class SdkError extends Error {
code;
details;
constructor(code, message, details) {
super(message);
this.name = 'SdkError';
this.code = code;
this.details = details;
}
}
//# sourceMappingURL=SdkError.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SdkError.js","sourceRoot":"","sources":["../../src/errors/SdkError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,IAAI,CAAS;IACb,OAAO,CAAW;IAE3B,YAAY,IAAY,EAAE,OAAe,EAAE,OAAiB;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,7 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export type { SerializedError } from './ErrorSerialization.js';
export { isSerializedError, serializeError } from './ErrorSerialization.js';
export { SdkError } from './SdkError.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,6 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { isSerializedError, serializeError } from './ErrorSerialization.js';
export { SdkError } from './SdkError.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,12 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Parse a CAE (Continuous Access Evaluation) claims challenge from a
* WWW-Authenticate header.
*
* Returns the decoded claims JSON string when a Bearer challenge with
* `error="insufficient_claims"` is found, or `undefined` otherwise.
*/
export declare function parseCaeChallenge(wwwAuthenticate: string | undefined): string | undefined;
//# sourceMappingURL=CaeUtils.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CaeUtils.d.ts","sourceRoot":"","sources":["../../src/http/CaeUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA2BzF"}
@@ -0,0 +1,35 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Parse a CAE (Continuous Access Evaluation) claims challenge from a
* WWW-Authenticate header.
*
* Returns the decoded claims JSON string when a Bearer challenge with
* `error="insufficient_claims"` is found, or `undefined` otherwise.
*/
export function parseCaeChallenge(wwwAuthenticate) {
if (!wwwAuthenticate) {
return undefined;
}
// Split on "Bearer " to handle multiple challenges in one header.
const challenges = wwwAuthenticate.split('Bearer ');
for (const challenge of challenges) {
if (!challenge.includes('error="insufficient_claims"')) {
continue;
}
const claimsMatch = challenge.match(/claims="([^"]+)"/);
if (!claimsMatch) {
continue;
}
try {
return atob(claimsMatch[1]);
}
catch {
// Malformed base64 — treat as no challenge.
return undefined;
}
}
return undefined;
}
//# sourceMappingURL=CaeUtils.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CaeUtils.js","sourceRoot":"","sources":["../../src/http/CaeUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,eAAmC;IACnE,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,kEAAkE;IAClE,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEpD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE,CAAC;YACvD,SAAS;QACX,CAAC;QAED,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACxD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,SAAS;QACX,CAAC;QAED,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,4CAA4C;YAC5C,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,70 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { ServiceEndpoint } from '../services/ServiceEndpoint.js';
import type { ILogger } from '../telemetry/ILogger.js';
import type { IAuthenticationProvider } from '../types/AuthenticationTypes.js';
import type { HttpRequestConfig, HttpResponse, RequestInterceptor, ResponseInterceptor } from './HttpTypes.js';
/** Options for creating an HttpClient instance. */
export interface HttpClientOptions {
/** Authentication provider for automatic token acquisition. */
authProvider?: IAuthenticationProvider;
/** Default headers included in every request. */
defaultHeaders?: Record<string, string>;
/** Default timeout in milliseconds for all requests. */
defaultTimeoutMs?: number;
/** Custom fetch implementation (defaults to globalThis.fetch). */
fetch?: typeof globalThis.fetch;
/** Logger for automatic HTTP request telemetry. */
logger?: ILogger;
}
/** Generic HTTP client with auth, service name routing, interceptors, and CAE support. */
export declare class HttpClient {
private readonly defaultHeaders;
private readonly defaultTimeoutMs;
private readonly fetchFn;
private readonly requestInterceptors;
private readonly responseInterceptors;
private readonly authProvider?;
private readonly logger?;
private readonly endpoints;
constructor(options?: HttpClientOptions);
/** Register a named service endpoint for service-name URL resolution. Returns the registered name. */
registerEndpoint(name: string, endpoint: ServiceEndpoint): string;
/** Add a request interceptor. Returns a function to remove it. */
addRequestInterceptor(interceptor: RequestInterceptor): () => void;
/** Add a response interceptor. Returns a function to remove it. */
addResponseInterceptor(interceptor: ResponseInterceptor): () => void;
/** Send a GET request. */
get<T = unknown>(url: string, config?: Omit<HttpRequestConfig, 'url' | 'method'>): Promise<HttpResponse<T>>;
/** Send a POST request. */
post<T = unknown>(url: string, body?: unknown, config?: Omit<HttpRequestConfig, 'url' | 'method' | 'body'>): Promise<HttpResponse<T>>;
/** Send a PUT request. */
put<T = unknown>(url: string, body?: unknown, config?: Omit<HttpRequestConfig, 'url' | 'method' | 'body'>): Promise<HttpResponse<T>>;
/** Send a PATCH request. */
patch<T = unknown>(url: string, body?: unknown, config?: Omit<HttpRequestConfig, 'url' | 'method' | 'body'>): Promise<HttpResponse<T>>;
/** Send a DELETE request. */
delete<T = unknown>(url: string, config?: Omit<HttpRequestConfig, 'url' | 'method'>): Promise<HttpResponse<T>>;
/** Send an HTTP request with the given configuration. */
request<T = unknown>(config: HttpRequestConfig): Promise<HttpResponse<T>>;
/** Execute fetch with CAE retry logic. Returns the response and whether a retry occurred. */
private executeWithCaeRetry;
/**
* Execute the raw fetch, parse the response, throw HttpError on !ok,
* and apply response interceptors.
*/
private executeFetch;
/**
* Resolve a URL to its final form and determine the auth resource.
*
* 1. Absolute URL — used as-is; resource resolved by matching registered
* endpoint baseUrls (or undefined if no match).
* 2. Service name prefix — first path segment matches a registered endpoint.
* 3. Unresolved — passed through as-is; no resource.
*/
private resolveUrl;
private composeAbortSignals;
/** Assemble and emit the HTTP telemetry event. */
private logRequest;
}
//# sourceMappingURL=HttpClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAWrB,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,0FAA0F;AAC1F,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA4B;IAChE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA6B;IAClE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAA0B;IACxD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAU;IAClC,O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3B,6BAA6B;IACvB,MAAM,CAAC,CAAC,GAAG,OAAO,EACtB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,QAAQ,CAAC,GACjD,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAI3B,yDAAyD;IACnD,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAgE/E,6FAA6F;YAC/E,mBAAmB;IAgCjC;;;OAGG;YACW,YAAY;IA0F1B;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAoClB,OAAO,CAAC,mBAAmB;IAQ3B,kDAAkD;IAClD,OAAO,CAAC,UAAU;CAuFnB"}
@@ -0,0 +1,339 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import { parseCaeChallenge } from './CaeUtils.js';
import { HttpError } from './HttpTypes.js';
/** Generic HTTP client with auth, service name routing, interceptors, and CAE support. */
export class HttpClient {
defaultHeaders;
defaultTimeoutMs;
fetchFn;
requestInterceptors = [];
responseInterceptors = [];
authProvider;
logger;
endpoints = new Map();
constructor(options = {}) {
this.defaultHeaders = options.defaultHeaders ?? {};
this.defaultTimeoutMs = options.defaultTimeoutMs ?? 30_000;
this.fetchFn = options.fetch ?? globalThis.fetch.bind(globalThis);
this.authProvider = options.authProvider;
this.logger = options.logger;
}
/** Register a named service endpoint for service-name URL resolution. Returns the registered name. */
registerEndpoint(name, endpoint) {
this.endpoints.set(name, endpoint);
return name;
}
/** Add a request interceptor. Returns a function to remove it. */
addRequestInterceptor(interceptor) {
this.requestInterceptors.push(interceptor);
return () => {
const index = this.requestInterceptors.indexOf(interceptor);
if (index !== -1) {
this.requestInterceptors.splice(index, 1);
}
};
}
/** Add a response interceptor. Returns a function to remove it. */
addResponseInterceptor(interceptor) {
this.responseInterceptors.push(interceptor);
return () => {
const index = this.responseInterceptors.indexOf(interceptor);
if (index !== -1) {
this.responseInterceptors.splice(index, 1);
}
};
}
/** Send a GET request. */
async get(url, config) {
return this.request({ ...config, url, method: 'GET' });
}
/** Send a POST request. */
async post(url, body, config) {
return this.request({ ...config, url, method: 'POST', body });
}
/** Send a PUT request. */
async put(url, body, config) {
return this.request({ ...config, url, method: 'PUT', body });
}
/** Send a PATCH request. */
async patch(url, body, config) {
return this.request({ ...config, url, method: 'PATCH', body });
}
/** Send a DELETE request. */
async delete(url, config) {
return this.request({ ...config, url, method: 'DELETE' });
}
/** Send an HTTP request with the given configuration. */
async request(config) {
let processedConfig = { ...config };
// Apply request interceptors
for (const interceptor of this.requestInterceptors) {
processedConfig = await interceptor(processedConfig);
}
// Resolve service-name URLs and determine auth resource + endpoint metadata
const { resolvedUrl, resource, endpointHeaders, extractTelemetryProperties } = this.resolveUrl(processedConfig.url);
processedConfig = { ...processedConfig, url: resolvedUrl };
// Resolve endpoint headers (evaluating functions) and merge under per-request headers
let resolvedEndpointHeaders;
if (endpointHeaders) {
resolvedEndpointHeaders = {};
for (const [name, value] of Object.entries(endpointHeaders)) {
resolvedEndpointHeaders[name] = typeof value === 'function' ? value() : value;
}
processedConfig = {
...processedConfig,
headers: { ...resolvedEndpointHeaders, ...processedConfig.headers },
};
}
// Stamp auth token if provider is configured and no Authorization header is already set
if (this.authProvider && resource && !processedConfig.headers?.['Authorization']) {
const token = await this.authProvider.getToken({ resource });
processedConfig = {
...processedConfig,
headers: { ...processedConfig.headers, Authorization: `Bearer ${token.accessToken}` },
};
}
// Execute with timing and telemetry
const startTime = this.logger ? performance.now() : 0;
try {
const { response, isRetried } = await this.executeWithCaeRetry(processedConfig, resource);
if (this.logger) {
this.logRequest(config, processedConfig, response, startTime, {
resource,
resolvedEndpointHeaders,
isRetried,
extractTelemetryProperties,
});
}
return response;
}
catch (error) {
if (this.logger) {
const status = error instanceof HttpError ? error.status : undefined;
const responseHeaders = error instanceof HttpError ? error.responseHeaders : undefined;
this.logRequest(config, processedConfig, { status, headers: responseHeaders }, startTime, {
resource,
resolvedEndpointHeaders,
isRetried: false,
extractTelemetryProperties,
});
}
throw error;
}
}
/** Execute fetch with CAE retry logic. Returns the response and whether a retry occurred. */
async executeWithCaeRetry(processedConfig, resource) {
try {
const response = await this.executeFetch(processedConfig);
return { response, isRetried: false };
}
catch (error) {
// CAE retry: on 401 with claims challenge, re-acquire token and retry once
if (this.authProvider && resource && error instanceof HttpError && error.status === 401) {
const claims = parseCaeChallenge(error.responseHeaders?.['www-authenticate']);
if (claims) {
const freshToken = await this.authProvider.getToken({
resource,
claims,
bypassCache: true,
});
const retryConfig = {
...processedConfig,
headers: {
...processedConfig.headers,
Authorization: `Bearer ${freshToken.accessToken}`,
},
};
const response = await this.executeFetch(retryConfig);
return { response, isRetried: true };
}
}
throw error;
}
}
/**
* Execute the raw fetch, parse the response, throw HttpError on !ok,
* and apply response interceptors.
*/
async executeFetch(processedConfig) {
const method = processedConfig.method ?? 'GET';
const headers = {
...this.defaultHeaders,
...processedConfig.headers,
};
// Auto-set Content-Type for object bodies
if (processedConfig.body !== undefined &&
typeof processedConfig.body === 'object' &&
!headers['Content-Type']) {
headers['Content-Type'] = 'application/json';
}
const timeoutMs = processedConfig.timeoutMs ?? this.defaultTimeoutMs;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
// Compose signals if caller provided one
const signal = processedConfig.signal
? this.composeAbortSignals(processedConfig.signal, controller.signal)
: controller.signal;
try {
const response = await this.fetchFn(processedConfig.url, {
method,
headers,
body: processedConfig.body !== undefined
? typeof processedConfig.body === 'string'
? processedConfig.body
: JSON.stringify(processedConfig.body)
: undefined,
signal,
});
const responseHeaders = {};
response.headers.forEach((value, key) => {
responseHeaders[key] = value;
});
let data;
const contentType = response.headers.get('content-type');
if (contentType?.includes('application/json')) {
data = (await response.json());
}
else {
data = (await response.text());
}
if (!response.ok) {
throw new HttpError(`HTTP ${response.status}: ${response.statusText}`, processedConfig, response.status, data, responseHeaders);
}
let result = {
status: response.status,
statusText: response.statusText,
data,
headers: responseHeaders,
};
// Apply response interceptors
for (const interceptor of this.responseInterceptors) {
result = await interceptor(result);
}
return result;
}
catch (error) {
if (error instanceof HttpError) {
throw error;
}
if (error instanceof Error && error.name === 'AbortError') {
throw new HttpError('Request timed out', processedConfig);
}
throw new HttpError(error instanceof Error ? error.message : 'Unknown request error', processedConfig);
}
finally {
clearTimeout(timeoutId);
}
}
/**
* Resolve a URL to its final form and determine the auth resource.
*
* 1. Absolute URL — used as-is; resource resolved by matching registered
* endpoint baseUrls (or undefined if no match).
* 2. Service name prefix — first path segment matches a registered endpoint.
* 3. Unresolved — passed through as-is; no resource.
*/
resolveUrl(url) {
// Absolute URL
if (url.startsWith('http://') || url.startsWith('https://')) {
// Check if URL starts with any registered endpoint's baseUrl
for (const endpoint of this.endpoints.values()) {
if (url.startsWith(endpoint.baseUrl)) {
return {
resolvedUrl: url,
resource: endpoint.resource,
endpointHeaders: endpoint.headers,
extractTelemetryProperties: endpoint.extractTelemetryProperties,
};
}
}
return { resolvedUrl: url };
}
// Service name prefix: check if the first path segment matches a registered endpoint
const slashIndex = url.indexOf('/');
const firstSegment = slashIndex === -1 ? url : url.substring(0, slashIndex);
const endpoint = this.endpoints.get(firstSegment);
if (endpoint) {
const remainingPath = slashIndex === -1 ? '' : url.substring(slashIndex);
const base = endpoint.baseUrl.replace(/\/$/, '');
const resolvedUrl = remainingPath ? `${base}/${remainingPath.replace(/^\//, '')}` : base;
return {
resolvedUrl,
resource: endpoint.resource,
endpointHeaders: endpoint.headers,
extractTelemetryProperties: endpoint.extractTelemetryProperties,
};
}
return { resolvedUrl: url };
}
composeAbortSignals(userSignal, timeoutSignal) {
const controller = new AbortController();
const onAbort = () => controller.abort();
userSignal.addEventListener('abort', onAbort, { once: true });
timeoutSignal.addEventListener('abort', onAbort, { once: true });
return controller.signal;
}
/** Assemble and emit the HTTP telemetry event. */
logRequest(originalConfig, processedConfig, outcome, startTime, context) {
const duration = performance.now() - startTime;
const status = outcome.status ?? 0;
const succeeded = status >= 200 && status < 300;
const responseHeaders = outcome.headers;
// Layer 1: Endpoint-extracted properties
const endpointProps = context.extractTelemetryProperties
? context.extractTelemetryProperties(originalConfig)
: {};
// Layer 2: Per-request telemetry properties
const requestProps = originalConfig.telemetryProperties ?? {};
// Layer 3: Computed properties (wins over layers 1 & 2)
const computedProps = {
url: processedConfig.url,
httpMethod: processedConfig.method ?? 'GET',
httpStatus: status,
duration,
succeeded,
isRetried: context.isRetried,
};
if (context.resource) {
computedProps.resourceUrl = context.resource;
}
// Log all resolved endpoint headers as telemetry properties
if (context.resolvedEndpointHeaders) {
for (const [name, value] of Object.entries(context.resolvedEndpointHeaders)) {
computedProps[`requestHeader.${name}`] = value;
}
}
const authHeader = processedConfig.headers?.['Authorization'];
if (authHeader) {
computedProps.requestAuthorizationHeaderLength = authHeader.length;
}
if (responseHeaders) {
const correlationRequestId = responseHeaders['x-ms-correlation-request-id'];
if (correlationRequestId) {
computedProps.correlationRequestId = correlationRequestId;
}
const serverRequestId = responseHeaders['x-ms-request-id'];
if (serverRequestId) {
computedProps.serverRequestId = serverRequestId;
}
const contentType = responseHeaders['content-type'];
if (contentType) {
computedProps.responseContentTypeHeader = contentType;
}
const contentLength = responseHeaders['content-length'];
if (contentLength) {
computedProps.contentLength = contentLength;
}
const serverLocation = responseHeaders['x-ms-server-location'];
if (serverLocation) {
computedProps.serverLocation = serverLocation;
}
}
// Merge: endpoint → request → computed (later wins)
const properties = { ...endpointProps, ...requestProps, ...computedProps };
this.logger.trackActivityEvent(originalConfig.operationName ?? 'unknown', properties, 'HttpClient.SendHttpAsync');
}
}
//# sourceMappingURL=HttpClient.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,50 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import { SdkError } from '../errors/SdkError.js';
export interface HttpRequestConfig {
/** Request URL (absolute, service-name prefixed, or relative). */
url: string;
/** HTTP method. Defaults to 'GET'. */
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
/** Request headers. */
headers?: Record<string, string>;
/** Request body (will be JSON-serialized if an object). */
body?: unknown;
/** Request timeout in milliseconds. */
timeoutMs?: number;
/** AbortSignal for request cancellation. */
signal?: AbortSignal;
/** API operation name for telemetry (e.g. 'Connections.GetConnections'). Defaults to 'unknown'. */
operationName?: string;
/** Additional telemetry properties merged into the HTTP telemetry event. */
telemetryProperties?: Record<string, unknown>;
}
/** Typed HTTP response. */
export interface HttpResponse<T = unknown> {
/** Parsed response body. */
data: T;
/** Response headers. */
headers: Record<string, string>;
/** Response status code. */
status: number;
/** Response status text. */
statusText: string;
}
/** Error thrown when an HTTP request fails. */
export declare class HttpError extends SdkError {
/** HTTP status code, or undefined if the request did not complete. */
readonly status?: number;
/** The original request config. */
readonly config: HttpRequestConfig;
/** Parsed response body, if available. */
readonly responseData?: unknown;
/** Parsed response headers, if available. */
readonly responseHeaders?: Record<string, string>;
constructor(message: string, config: HttpRequestConfig, status?: number, responseData?: unknown, responseHeaders?: Record<string, string>);
}
/** Interceptor that can modify a request before it is sent. */
export type RequestInterceptor = (config: HttpRequestConfig) => HttpRequestConfig | Promise<HttpRequestConfig>;
/** Interceptor that can modify a response before it is returned. */
export type ResponseInterceptor = <T>(response: HttpResponse<T>) => HttpResponse<T> | Promise<HttpResponse<T>>;
//# sourceMappingURL=HttpTypes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"HttpTypes.d.ts","sourceRoot":"","sources":["../../src/http/HttpTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrD,uBAAuB;IACvB,OAAO,CAAC,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CAAC,iBAAiB,CAAC,CAAC;AAEpD,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,EAClC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,KACtB,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import { SdkError } from '../errors/SdkError.js';
/** Error thrown when an HTTP request fails. */
export class HttpError extends SdkError {
/** HTTP status code, or undefined if the request did not complete. */
status;
/** The original request config. */
config;
/** Parsed response body, if available. */
responseData;
/** Parsed response headers, if available. */
responseHeaders;
constructor(message, config, status, responseData, responseHeaders) {
super('HTTP_REQUEST_FAILED', message);
this.name = 'HttpError';
this.config = config;
this.status = status;
this.responseData = responseData;
this.responseHeaders = responseHeaders;
}
}
//# sourceMappingURL=HttpTypes.js.map
@@ -0,0 +1 @@
{"version":3,"file":"HttpTypes.js","sourceRoot":"","sources":["../../src/http/HttpTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiC9C,+CAA+C;AAC/C,MAAM,OAAO,SAAU,SAAQ,QAAQ;IACrC,sEAAsE;IAC7D,MAAM,CAAU;IACzB,mCAAmC;IAC1B,MAAM,CAAoB;IACnC,0CAA0C;IACjC,YAAY,CAAW;IAChC,6CAA6C;IACpC,eAAe,CAA0B;IAElD,YACE,OAAe,EACf,MAAyB,EACzB,MAAe,EACf,YAAsB,EACtB,eAAwC;QAExC,KAAK,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,7 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { parseCaeChallenge } from './CaeUtils.js';
export { HttpClient, HttpClientOptions } from './HttpClient.js';
export { HttpError, HttpRequestConfig, HttpResponse, RequestInterceptor, ResponseInterceptor, } from './HttpTypes.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { parseCaeChallenge } from './CaeUtils.js';
export { HttpClient } from './HttpClient.js';
export { HttpError, } from './HttpTypes.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAC7D,OAAO,EACL,SAAS,GAKV,MAAM,aAAa,CAAC"}
@@ -0,0 +1,70 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export type AppLoadClientState = 'healthy' | 'unhealthy' | 'throttled' | 'unknown';
export type AppLoadResult = 'optimal' | 'other';
export type AppLoadNonOptimalReason = 'interactionRequired' | 'throttled' | 'screenNavigatedAway' | 'other';
export type AppType = 'CodeApp';
export type AppLoadUnsuccessfulReason = 'AppConnectionsFailed' | 'AppForbidden' | 'AppForbiddenAppIsInQuarantine' | 'AppForbiddenPlansIssue' | 'AppIsPackaging' | 'AppLoadFailed' | 'AppNotFound' | 'CookiesBlocked' | 'InvokeScriptBlocked' | 'NetworkError' | 'PlatformError' | 'PopupError' | 'ProxyError' | 'StorageBlocked' | 'Unknown' | 'UserCancelAppConnections' | 'UserCancelled' | 'UserNotLoggedIn' | 'UserUnauthorized' | 'UserUnsupportedAppVersion' | 'UserUnsupportedBrowser';
export type SessionLoadSummaryMetricData = {
/** Whether this app launch was successful */
successfulAppLaunch: boolean;
/** The reason the app launch was not successful */
unsuccessfulReason?: AppLoadUnsuccessfulReason;
/** The type of state the client loaded in. */
appLoadClientState: AppLoadClientState;
/** The type of app load */
appLoadResult: AppLoadResult;
/** The reason the app load was not considered optimal */
appLoadNonOptimalReason?: AppLoadNonOptimalReason;
/** The type of app */
appType?: AppType;
/** Time in milliseconds for the app to become interactive */
timeToAppInteractive?: number;
/** Date this app was last published */
lastPublishedDate?: string;
};
export type SessionLoadSummaryMetric = {
type: 'sessionLoadSummary';
data: SessionLoadSummaryMetricData;
};
export type NetworkRequestMetricData = {
/** The URL of the network request */
url: string;
/** The HTTP method of the request */
method: string;
/** The status code of the response */
statusCode: number;
/** The time taken for the request in milliseconds */
duration: number;
/** The size of the response in bytes */
responseSize?: number;
};
export type NetworkRequestMetric = {
type: 'networkRequest';
data: NetworkRequestMetricData;
};
export type DataRequestsSummaryMetricData = {
/** Total number of data requests made */
totalDataRequests: number;
/** Number of failed data requests */
failedDataRequests: number;
/** Breakdown of failures by type */
failureCountsByType: Record<string, number>;
/** Optional latency data in milliseconds */
dataRequestsLatency?: number;
/** User agent string */
userAgent?: string;
/** Current client state */
clientState?: string;
/** When the app was last published */
lastPublishedDate?: string;
/** Type of app ('CodeApp') */
appType?: AppType;
};
export type DataRequestsSummaryMetric = {
type: 'dataRequestsSummary';
data: DataRequestsSummaryMetricData;
};
export type Metric = SessionLoadSummaryMetric | NetworkRequestMetric | DataRequestsSummaryM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","sourceRoot":"","sources":["../../src/metrics/Metrics.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export type { AppLoadClientState, AppLoadNonOptimalReason, AppLoadResult, AppLoadUnsuccessfulReason, AppType, DataRequestsSummaryMetric, DataRequestsSummaryMetricData, Metric, NetworkRequestMetric, NetworkRequestMetricData, SessionLoadSummaryMetric, SessionLoadSummaryMetricData, } from './Metrics.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metrics/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,OAAO,EACP,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,EACN,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,WAAW,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export {};
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metrics/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,14 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Maps legacy wire-format `service.action` keys to canonical plugin keys.
*
* **IMPORTANT — backwards compatibility:** These aliases exist because deployed apps send
* plugin calls using the legacy `service` + `action` wire format. The PluginRouter combines
* them into `${service}.${action}` and resolves through this map. Removing any entry will
* break all apps that still use the old wire format. **Never remove entries from this map.**
* New canonical keys should be added to the plugin definitions instead.
*/
export declare const PluginAliases: ReadonlyMap<string, string>;
//# sourceMappingURL=PluginAliases.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginAliases.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginAliases.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAgBpD,CAAC"}
@@ -0,0 +1,30 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Maps legacy wire-format `service.action` keys to canonical plugin keys.
*
* **IMPORTANT — backwards compatibility:** These aliases exist because deployed apps send
* plugin calls using the legacy `service` + `action` wire format. The PluginRouter combines
* them into `${service}.${action}` and resolves through this map. Removing any entry will
* break all apps that still use the old wire format. **Never remove entries from this map.**
* New canonical keys should be added to the plugin definitions instead.
*/
export const PluginAliases = new Map([
['AppPowerAppsClientPlugin.getAppCdsDataSourceConfigsAsync', 'DataSources.getCds'],
['AppPowerAppsClientPlugin.loadAppConnectionsAsync_v2', 'DataSources.getAppConnections'],
['AppHttpClientPlugin.sendHttpAsync', 'Http.send'],
['SendMessagePlugin.getVersionInfo', 'Messaging.getVersionInfo'],
['SendMessagePlugin.sendMessage', 'Messaging.send'],
[
'AppPowerAppsClientPlugin.loadNonCompositeConnectionsAsync',
'DataSources.loadNonCompositeConnections',
],
[
'AppPowerAppsClientPlugin.resolveCompositeConnectionsAsync',
'DataSources.resolveCompositeConnections',
],
['PublishedAppTelemetry.trackEvent', 'Telemetry.trackEvent'],
['PublishedAppTelemetry.trackException', 'Telemetry.trackException'],
]);
//# sourceMappingURL=PluginAliases.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginAliases.js","sourceRoot":"","sources":["../../src/plugins/PluginAliases.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgC,IAAI,GAAG,CAAC;IAChE,CAAC,0DAA0D,EAAE,oBAAoB,CAAC;IAClF,CAAC,qDAAqD,EAAE,+BAA+B,CAAC;IACxF,CAAC,mCAAmC,EAAE,WAAW,CAAC;IAClD,CAAC,kCAAkC,EAAE,0BAA0B,CAAC;IAChE,CAAC,+BAA+B,EAAE,gBAAgB,CAAC;IACnD;QACE,2DAA2D;QAC3D,yCAAyC;KAC1C;IACD;QACE,2DAA2D;QAC3D,yCAAyC;KAC1C;IACD,CAAC,kCAAkC,EAAE,sBAAsB,CAAC;IAC5D,CAAC,sCAAsC,EAAE,0BAA0B,CAAC;CACrE,CAAC,CAAC"}
@@ -0,0 +1,15 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export declare const PluginAction: {
readonly GetAppConnections: "DataSources.getAppConnections";
readonly GetCds: "DataSources.getCds";
readonly GetContext: "AppLifecycle.getContext";
readonly HttpSend: "Http.send";
readonly MessagingGetVersionInfo: "Messaging.getVersionInfo";
readonly MessagingSend: "Messaging.send";
readonly NotifyAppSdkLoaded: "AppLifecycle.notifyAppSdkLoaded";
readonly TelemetryTrackEvent: "Telemetry.trackEvent";
readonly TelemetryTrackException: "Telemetry.trackException";
};
//# sourceMappingURL=PluginConstants.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginConstants.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginConstants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC"}
@@ -0,0 +1,22 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import { GetAppConnectionsKey } from './definitions/GetAppConnectionsPlugin.js';
import { GetCdsKey } from './definitions/GetCdsPlugin.js';
import { GetContextKey } from './definitions/GetContextPlugin.js';
import { HttpSendKey } from './definitions/HttpSendPlugin.js';
import { MessagingGetVersionInfoKey, MessagingSendKey } from './definitions/MessagingPlugin.js';
import { NotifyAppSdkLoadedKey } from './definitions/NotifyAppSdkLoadedPlugin.js';
import { TelemetryTrackEventKey, TelemetryTrackExceptionKey } from './definitions/TelemetryPlugin.js';
export const PluginAction = {
GetAppConnections: GetAppConnectionsKey,
GetCds: GetCdsKey,
GetContext: GetContextKey,
HttpSend: HttpSendKey,
MessagingGetVersionInfo: MessagingGetVersionInfoKey,
MessagingSend: MessagingSendKey,
NotifyAppSdkLoaded: NotifyAppSdkLoadedKey,
TelemetryTrackEvent: TelemetryTrackEventKey,
TelemetryTrackException: TelemetryTrackExceptionKey,
};
//# sourceMappingURL=PluginConstants.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginConstants.js","sourceRoot":"","sources":["../../src/plugins/PluginConstants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEnG,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,iBAAiB,EAAE,oBAAoB;IACvC,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,uBAAuB,EAAE,0BAA0B;IACnD,aAAa,EAAE,gBAAgB;IAC/B,kBAAkB,EAAE,qBAAqB;IACzC,mBAAmB,EAAE,sBAAsB;IAC3C,uBAAuB,EAAE,0BAA0B;CAC3C,CAAC"}
@@ -0,0 +1,118 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* **Wire Contract Guards — Compile-Time Layer**
*
* This file uses TypeScript conditional types to assert exact type equality
* for every plugin interface. If any interface changes shape (field added,
* removed, renamed, type changed, or optionality changed), `tsc` will fail.
*
* This file produces no runtime output — it exists solely for `bun run check-types`.
*/
import type { CompatibleReceiverMessage, GetAppConnectionsHandler, GetCdsHandler, GetContextHandler, GetVersionInfoHandler, HttpSendHandler, IAppContext, ICdsDataSource, IConnectionReference, IContext, IHostContext, IUserContext, NotifyAppSdkLoadedHandler, SendHttpRequest, SendHttpResponse, SendMessageSendHandler, TelemetryTrackEventHandler, TelemetryTrackExceptionHandler } from './definitions/index.js';
import type { PluginHandler, PluginKey } from './PluginMap.js';
type IsExact<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => G extends U ? 1 : 2 ? true : false;
type Assert<T extends true> = T;
type _IAppContext = Assert<IsExact<IAppContext, {
appId: string;
appSettings: object;
environmentId: string;
queryParams: Record<string, string>;
}>>;
type _IHostContext = Assert<IsExact<IHostContext, {
sessionId: string;
}>>;
type _IUserContext = Assert<IsExact<IUserContext, {
fullName?: string;
objectId?: string;
tenantId?: string;
userPrincipalName?: string;
}>>;
type _IContext = Assert<IsExact<IContext, {
app: IAppContext;
host: IHostContext;
user: IUserContext;
}>>;
type _SendHttpResponse = Assert<IsExact<SendHttpResponse, {
statusCode: number;
headers: Record<string, string>;
body: unknown;
}>>;
type _IConnectionReference = Assert<IsExact<IConnectionReference, {
apiId?: string;
connectionName?: string;
datasetName?: string;
datasetNameOverride?: string;
isShareableConnection?: string;
runtimePolicyName?: string;
runtimeUrl?: string;
}>>;
type _ICdsDataSource = Assert<IsExact<ICdsDataSource, {
entitySetName: string;
logicalName: string;
runtimeUrl: string;
version: string;
}>>;
type _CompatibleReceiverMessage = Assert<IsExact<CompatibleReceiverMessage, {
isUpdate: boolean;
message: string;
}>>;
type _SendHttpRequest = Assert<IsExact<SendHttpRequest, {
url: string;
method: string;
headers: Record<string, string>;
body?: string;
connectionId?: string;
}>>;
type _GetContextHandler = Assert<IsExact<GetContextHandler, () => Promise<IContext>>>;
type _NotifyAppSdkLoadedHandler = Assert<IsExact<NotifyAppSdkLoadedHandler, (perfData: Record<string, unknown>) => Promise<void>>>;
type _GetAppConnectionsHandler = Assert<IsExact<GetAppConnectionsHandler, () => Promise<Record<string, IConnectionReference>>>>;
type _GetCdsHandler = Assert<IsExact<GetCdsHandler, () => Promise<Record<string, ICdsDataSource>>>>;
type _HttpSendHandler = Assert<IsExact<HttpSendHandler, (request: SendHttpRequest) => Promise<SendHttpResponse>>>;
type _GetVersionInfoHandler = Assert<IsExact<GetVersionInfoHandler, (receiverName: string) => Promise<string>>>;
type _SendMessageSendHandler = Assert<IsExact<SendMessageSendHandler, (receiverName: string, message: string, correlationId: string) => Promise<CompatibleReceiverMessage>>>;
type _TelemetryTrackEventHandler = Assert<IsExact<TelemetryTrackEventHandler, (eventName: string, eventData: Record<string, unknown>) => Promise<void>>>;
type _TelemetryTrackExceptionHandler = Assert<IsExact<TelemetryTrackExceptionHandler, (error: Record<string, unknown>) => Promise<void>>>;
type _PluginKey = Assert<IsExact<PluginKey, 'AppLifecycle.getContext' | 'AppLifecycle.notifyAppSdkLoaded' | 'DataSources.getAppConnections' | 'DataSources.getCds' | 'Http.send' | 'Messaging.getVersionInfo' | 'Messaging.send' | 'Telemetry.trackEvent' | 'Telemetry.trackException'>>;
type _HandlerGetContext = Assert<IsExact<PluginHandler<'AppLifecycle.getContext'>, GetContextHandler>>;
type _HandlerNotifyLoaded = Assert<IsExact<PluginHandler<'AppLifecycle.notifyAppSdkLoaded'>, NotifyAppSdkLoadedHandler>>;
type _HandlerGetAppConns = Assert<IsExact<PluginHandler<'DataSources.getAppConnections'>, GetAppConnectionsHandler>>;
type _HandlerGetCds = Assert<IsExact<PluginHandler<'DataSources.getCds'>, GetCdsHandler>>;
type _HandlerHttpSend = Assert<IsExact<PluginHandler<'Http.send'>, HttpSendHandler>>;
type _HandlerGetVersionInfo = Assert<IsExact<PluginHandler<'Messaging.getVersionInfo'>, GetVersionInfoHandler>>;
type _HandlerMessagingSend = Assert<IsExact<PluginHandler<'Messaging.send'>, SendMessageSendHandler>>;
type _HandlerTelemetryTrackEvent = Assert<IsExact<PluginHandler<'Telemetry.trackEvent'>, TelemetryTrackEventHandler>>;
type _HandlerTelemetryTrackException = Assert<IsExact<PluginHandler<'Telemetry.trackException'>, TelemetryTrackExceptionHandler>>;
export type _ContractChecks = [
_IAppContext,
_IHostContext,
_IUserContext,
_IContext,
_SendHttpResponse,
_IConnectionReference,
_ICdsDataSource,
_CompatibleReceiverMessage,
_SendHttpRequest,
_GetContextHandler,
_NotifyAppSdkLoadedHandler,
_GetAppConnectionsHandler,
_GetCdsHandler,
_HttpSendHandler,
_GetVersionInfoHandler,
_SendMessageSendHandler,
_PluginKey,
_HandlerGetContext,
_HandlerNotifyLoaded,
_HandlerGetAppConns,
_HandlerGetCds,
_HandlerHttpSend,
_HandlerGetVersionInfo,
_HandlerMessagingSend,
_TelemetryTrackEventHandler,
_TelemetryTrackExceptionHandler,
_HandlerTelemetryTrackEvent,
_HandlerTelemetryTrackException
];
export {};
//# sourceMappingURL=PluginContracts.typecheck.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginContracts.typecheck.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginContracts.typecheck.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI5D,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IACf,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AACrF,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,+BAA+B;CAChC,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export {};
//# sourceMappingURL=PluginContracts.typecheck.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginContracts.typecheck.js","sourceRoot":"","sources":["../../src/plugins/PluginContracts.typecheck.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,17 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Generic definition entry type. Maps a plugin key to its async handler.
*
* Each plugin definition file should use this to define its map entry,
* ensuring a consistent `{ [key]: handler }` shape:
*
* ```ts
* export type MyPluginDefinition = PluginDefinition<typeof MyPluginKey, MyPluginHandler>;
* ```
*/
export type PluginDefinition<K extends string, H extends (...args: any[]) => Promise<any>> = {
[P in K]: H;
};
//# sourceMappingURL=PluginDefinition.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginDefinition.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginDefinition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AAEH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,IAAI;KAC1F,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export {};
//# sourceMappingURL=PluginDefinition.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginDefinition.js","sourceRoot":"","sources":["../../src/plugins/PluginDefinition.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,28 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { GetAppConnectionsPluginDefinition } from './definitions/GetAppConnectionsPlugin.js';
import type { GetCdsPluginDefinition } from './definitions/GetCdsPlugin.js';
import type { GetContextPluginDefinition } from './definitions/GetContextPlugin.js';
import type { HttpSendPluginDefinition } from './definitions/HttpSendPlugin.js';
import type { MessagingGetVersionInfoPluginDefinition, MessagingSendPluginDefinition } from './definitions/MessagingPlugin.js';
import type { NotifyAppSdkLoadedPluginDefinition } from './definitions/NotifyAppSdkLoadedPlugin.js';
import type { TelemetryTrackEventPluginDefinition, TelemetryTrackExceptionPluginDefinition } from './definitions/TelemetryPlugin.js';
/**
* Single source of truth for all plugin definitions.
* Each key is a dot-namespaced action string (e.g. 'AppLifecycle.getContext'),
* and each value is a typed async handler.
*
* To add a new plugin, create a definition file in `./definitions/` and
* extend its definition type here.
*/
export type PluginMap = GetAppConnectionsPluginDefinition & GetCdsPluginDefinition & GetContextPluginDefinition & HttpSendPluginDefinition & MessagingGetVersionInfoPluginDefinition & MessagingSendPluginDefinition & NotifyAppSdkLoadedPluginDefinition & TelemetryTrackEventPluginDefinition & TelemetryTrackExceptionPluginDefinition;
/** All known plugin keys (e.g. 'AppLifecycle.getContext'). */
export type PluginKey = keyof PluginMap;
/** Typed parameter tuple for a given plugin key. */
export type PluginParams<K extends PluginKey> = Parameters<PluginMap[K]>;
/** Typed return value (unwrapped from Promise) for a given plugin key. */
export type PluginResponse<K extends PluginKey> = Awaited<ReturnType<PluginMap[K]>>;
/** A typed async handler for a given plugin key. */
export type PluginHandler<K extends PluginKey> = PluginMap[K];
//# sourceMappingURL=PluginMap.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginMap.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EACV,uCAAuC,EACvC,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,KAAK,EACV,mCAAmC,EACnC,uCAAuC,EACxC,MAAM,+BAA+B,CAAC;AAIvC;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,iCAAiC,GACvD,sBAAsB,GACtB,0BAA0B,GAC1B,wBAAwB,GACxB,uCAAuC,GACvC,6BAA6B,GAC7B,kCAAkC,GAClC,mCAAmC,GACnC,uCAAuC,CAAC;AAI1C,8DAA8D;AAC9D,MAAM,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC;AAExC,oDAAoD;AACpD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpF,oDAAoD;AACpD,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export {};
//# sourceMappingURL=PluginMap.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PluginMap.js","sourceRoot":"","sources":["../../src/plugins/PluginMap.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,17 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const GetAppConnectionsKey: "DataSources.getAppConnections";
export interface IConnectionReference {
apiId?: string;
connectionName?: string;
datasetName?: string;
datasetNameOverride?: string;
isShareableConnection?: string;
runtimePolicyName?: string;
runtimeUrl?: string;
}
export type GetAppConnectionsHandler = () => Promise<Record<string, IConnectionReference>>;
export type GetAppConnectionsPluginDefinition = PluginDefinition<typeof GetAppConnectionsKey, GetAppConnectionsHandler>;
//# sourceMappingURL=GetAppConnectionsPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"GetAppConnectionsPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/GetAppConnectionsPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAG,+BAAwC,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAE3F,MAAM,MAAM,iCAAiC,GAAG,gBAAgB,CAC9D,OAAO,oBAAoB,EAC3B,wBAAwB,CACzB,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const GetAppConnectionsKey = 'DataSources.getAppConnections';
//# sourceMappingURL=GetAppConnectionsPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"GetAppConnectionsPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/GetAppConnectionsPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,+BAAwC,CAAC"}
@@ -0,0 +1,14 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const GetCdsKey: "DataSources.getCds";
export interface ICdsDataSource {
entitySetName: string;
logicalName: string;
runtimeUrl: string;
version: string;
}
export type GetCdsHandler = () => Promise<Record<string, ICdsDataSource>>;
export type GetCdsPluginDefinition = PluginDefinition<typeof GetCdsKey, GetCdsHandler>;
//# sourceMappingURL=GetCdsPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"GetCdsPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/GetCdsPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,SAAS,EAAG,oBAA6B,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const GetCdsKey = 'DataSources.getCds';
//# sourceMappingURL=GetCdsPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"GetCdsPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/GetCdsPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,SAAS,GAAG,oBAA6B,CAAC"}
@@ -0,0 +1,28 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const GetContextKey: "AppLifecycle.getContext";
export interface IContext {
app: IAppContext;
host: IHostContext;
user: IUserContext;
}
export interface IAppContext {
appId: string;
appSettings: object;
environmentId: string;
queryParams: Record<string, string>;
}
export interface IHostContext {
sessionId: string;
}
export interface IUserContext {
fullName?: string;
objectId?: string;
tenantId?: string;
userPrincipalName?: string;
}
export type GetContextHandler = () => Promise<IContext>;
export type GetContextPluginDefinition = PluginDefinition<typeof GetContextKey, GetContextHandler>;
//# sourceMappingURL=GetContextPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"GetContextPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/GetContextPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAG,yBAAkC,CAAC;AAEhE,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,WAAW,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,OAAO,aAAa,EAAE,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const GetContextKey = 'AppLifecycle.getContext';
//# sourceMappingURL=GetContextPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"GetContextPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/GetContextPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAG,yBAAkC,CAAC"}
@@ -0,0 +1,20 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const HttpSendKey: "Http.send";
export interface SendHttpRequest {
url: string;
method: string;
headers: Record<string, string>;
body?: string;
connectionId?: string;
}
export interface SendHttpResponse {
statusCode: number;
headers: Record<string, string>;
body: unknown;
}
export type HttpSendHandler = (request: SendHttpRequest) => Promise<SendHttpResponse>;
export type HttpSendPluginDefinition = PluginDefinition<typeof HttpSendKey, HttpSendHandler>;
//# sourceMappingURL=HttpSendPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"HttpSendPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/HttpSendPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAG,WAAoB,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEtF,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,OAAO,WAAW,EAAE,eAAe,CAAC,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const HttpSendKey = 'Http.send';
//# sourceMappingURL=HttpSendPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"HttpSendPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/HttpSendPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAG,WAAoB,CAAC"}
@@ -0,0 +1,16 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const MessagingGetVersionInfoKey: "Messaging.getVersionInfo";
export declare const MessagingSendKey: "Messaging.send";
/** Response payload for sendMessage plugin calls. */
export interface CompatibleReceiverMessage {
isUpdate: boolean;
message: string;
}
export type GetVersionInfoHandler = (receiverName: string) => Promise<string>;
export type SendMessageSendHandler = (receiverName: string, message: string, correlationId: string) => Promise<CompatibleReceiverMessage>;
export type MessagingGetVersionInfoPluginDefinition = PluginDefinition<typeof MessagingGetVersionInfoKey, GetVersionInfoHandler>;
export type MessagingSendPluginDefinition = PluginDefinition<typeof MessagingSendKey, SendMessageSendHandler>;
//# sourceMappingURL=MessagingPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MessagingPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/MessagingPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,eAAO,MAAM,0BAA0B,EAAG,0BAAmC,CAAC;AAC9E,eAAO,MAAM,gBAAgB,EAAG,gBAAyB,CAAC;AAI1D,qDAAqD;AACrD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CACnC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,KAClB,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAIxC,MAAM,MAAM,uCAAuC,GAAG,gBAAgB,CACpE,OAAO,0BAA0B,EACjC,qBAAqB,CACtB,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAC1D,OAAO,gBAAgB,EACvB,sBAAsB,CACvB,CAAC"}
@@ -0,0 +1,7 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
// ── Action keys ──────────────────────────────────────────────────────────────
export const MessagingGetVersionInfoKey = 'Messaging.getVersionInfo';
export const MessagingSendKey = 'Messaging.send';
//# sourceMappingURL=MessagingPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MessagingPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/MessagingPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,0BAA0B,GAAG,0BAAmC,CAAC;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAyB,CAAC"}
@@ -0,0 +1,8 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const NotifyAppSdkLoadedKey: "AppLifecycle.notifyAppSdkLoaded";
export type NotifyAppSdkLoadedHandler = (perfData: Record<string, unknown>) => Promise<void>;
export type NotifyAppSdkLoadedPluginDefinition = PluginDefinition<typeof NotifyAppSdkLoadedKey, NotifyAppSdkLoadedHandler>;
//# sourceMappingURL=NotifyAppSdkLoadedPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NotifyAppSdkLoadedPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/NotifyAppSdkLoadedPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,qBAAqB,EAAG,iCAA0C,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7F,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,CAC/D,OAAO,qBAAqB,EAC5B,yBAAyB,CAC1B,CAAC"}
@@ -0,0 +1,5 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const NotifyAppSdkLoadedKey = 'AppLifecycle.notifyAppSdkLoaded';
//# sourceMappingURL=NotifyAppSdkLoadedPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"NotifyAppSdkLoadedPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/NotifyAppSdkLoadedPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iCAA0C,CAAC"}
@@ -0,0 +1,11 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
import type { PluginDefinition } from '../PluginDefinition.js';
export declare const TelemetryTrackEventKey: "Telemetry.trackEvent";
export declare const TelemetryTrackExceptionKey: "Telemetry.trackException";
export type TelemetryTrackEventHandler = (eventName: string, eventData: Record<string, unknown>) => Promise<void>;
export type TelemetryTrackExceptionHandler = (error: Record<string, unknown>) => Promise<void>;
export type TelemetryTrackEventPluginDefinition = PluginDefinition<typeof TelemetryTrackEventKey, TelemetryTrackEventHandler>;
export type TelemetryTrackExceptionPluginDefinition = PluginDefinition<typeof TelemetryTrackExceptionKey, TelemetryTrackExceptionHandler>;
//# sourceMappingURL=TelemetryPlugin.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"TelemetryPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/TelemetryPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,sBAAsB,EAAG,sBAA+B,CAAC;AACtE,eAAO,MAAM,0BAA0B,EAAG,0BAAmC,CAAC;AAE9E,MAAM,MAAM,0BAA0B,GAAG,CACvC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/F,MAAM,MAAM,mCAAmC,GAAG,gBAAgB,CAChE,OAAO,sBAAsB,EAC7B,0BAA0B,CAC3B,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG,gBAAgB,CACpE,OAAO,0BAA0B,EACjC,8BAA8B,CAC/B,CAAC"}
@@ -0,0 +1,6 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export const TelemetryTrackEventKey = 'Telemetry.trackEvent';
export const TelemetryTrackExceptionKey = 'Telemetry.trackException';
//# sourceMappingURL=TelemetryPlugin.js.map
@@ -0,0 +1 @@
{"version":3,"file":"TelemetryPlugin.js","sourceRoot":"","sources":["../../../src/plugins/definitions/TelemetryPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAA+B,CAAC;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAG,0BAAmC,CAAC"}
@@ -0,0 +1,19 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export type { PluginDefinition } from '../PluginDefinition.js';
export type { GetAppConnectionsHandler, GetAppConnectionsPluginDefinition, IConnectionReference, } from './GetAppConnectionsPlugin.js';
export { GetAppConnectionsKey } from './GetAppConnectionsPlugin.js';
export type { GetCdsHandler, GetCdsPluginDefinition, ICdsDataSource } from './GetCdsPlugin.js';
export { GetCdsKey } from './GetCdsPlugin.js';
export type { GetContextHandler, GetContextPluginDefinition, IAppContext, IContext, IHostContext, IUserContext, } from './GetContextPlugin.js';
export { GetContextKey } from './GetContextPlugin.js';
export type { HttpSendHandler, HttpSendPluginDefinition, SendHttpRequest, SendHttpResponse, } from './HttpSendPlugin.js';
export { HttpSendKey } from './HttpSendPlugin.js';
export type { CompatibleReceiverMessage, GetVersionInfoHandler, MessagingGetVersionInfoPluginDefinition, MessagingSendPluginDefinition, SendMessageSendHandler, } from './MessagingPlugin.js';
export { MessagingGetVersionInfoKey, MessagingSendKey } from './MessagingPlugin.js';
export type { NotifyAppSdkLoadedHandler, NotifyAppSdkLoadedPluginDefinition, } from './NotifyAppSdkLoadedPlugin.js';
export { NotifyAppSdkLoadedKey } from './NotifyAppSdkLoadedPlugin.js';
export type { TelemetryTrackEventHandler, TelemetryTrackEventPluginDefinition, TelemetryTrackExceptionHandler, TelemetryTrackExceptionPluginDefinition, } from './TelemetryPlugin.js';
export { TelemetryTrackEventKey, TelemetryTrackExceptionKey } from './TelemetryPlugin.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,wBAAwB,EACxB,iCAAiC,EACjC,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,uCAAuC,EACvC,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACjF,YAAY,EACV,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EACV,0BAA0B,EAC1B,mCAAmC,EACnC,8BAA8B,EAC9B,uCAAuC,GACxC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,11 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
export { GetAppConnectionsKey } from './GetAppConnectionsPlugin.js';
export { GetCdsKey } from './GetCdsPlugin.js';
export { GetContextKey } from './GetContextPlugin.js';
export { HttpSendKey } from './HttpSendPlugin.js';
export { MessagingGetVersionInfoKey, MessagingSendKey } from './MessagingPlugin.js';
export { NotifyAppSdkLoadedKey } from './NotifyAppSdkLoadedPlugin.js';
export { TelemetryTrackEventKey, TelemetryTrackExceptionKey } from './TelemetryPlugin.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAS3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOnE,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC"}

Some files were not shown because too many files have changed in this diff Show More