@aliyun-sls/web-types
Advanced tools
Comparing version 0.2.9 to 0.3.0
@@ -153,2 +153,3 @@ type Duration = number & { | ||
type WebTrackerBrowserOptions = Omit<WebTrackerOptions, 'installUnloadHook' | 'sendPayload'>; | ||
type WebTrackerNodeOptions = Omit<WebTrackerOptions, 'installUnloadHook' | 'sendPayload'>; | ||
@@ -165,2 +166,22 @@ declare const SLS_CLIENT_NAME = "SLS_CLIENT"; | ||
} | ||
interface StsOption { | ||
accessKeyId?: string; | ||
accessKeySecret?: string; | ||
securityToken?: string; | ||
refreshSTSTokenInterval?: number; | ||
refreshSTSToken?: () => Promise<{ | ||
accessKeyId: string; | ||
accessKeySecret: string; | ||
securityToken: string; | ||
}>; | ||
} | ||
interface StsPlugin { | ||
transString: (obj: Record<string, any>) => Record<string, any>; | ||
process: (url: string, payload: string) => Promise<{ | ||
data: any; | ||
header: { | ||
[k: string]: string; | ||
}; | ||
}>; | ||
} | ||
interface SLS_ClientBaseOptions { | ||
@@ -209,2 +230,6 @@ project: string; | ||
attribute?: Record<string, number>; | ||
/** | ||
* sts插件挂在opt上 | ||
*/ | ||
stsPlugin?: StsPlugin; | ||
} | ||
@@ -321,2 +346,2 @@ type SLS_MUTABLE_OPTION = Pick<SLS_ClientBaseOptions, 'uid' | 'nickname' | 'env' | 'service' | 'version' | 'custom' | 'namespace'>; | ||
export { BaseClientContext, BasePublicApi, ClientContext, ClientRef, ClocksState, Duration, IBasePlugin, IBaseSession, IEnableTrackRequestBody, IRequestExtra, ISession, IgnoreAllTypes, InternalPlugin, InternalPluginPriority, MatchCommonTypes, MatchFun, MatchRequestFun, MatchRequestTypes, MatchTraceRequestTypes, MiniPlatformOptions, NotifyData, OTHttpInfo, OTStatusCode, OTTrace, OmitedWebTrackerOptions, RelativeTime, SLS_BrowserClientOptions, SLS_CLIENT_NAME, SLS_ClientBaseOptions, SLS_MUTABLE_OPTION, SLS_TRACE_UID_KEY, SLS_TraceMiniClientOptions, ServerDuration, SubscribeCallback, SubscribeDep, TimeStamp, UnknownFunc, WebEventType, WebTrackerBrowserOptions, WebTrackerMiniOptions, WebTrackerOptions }; | ||
export { BaseClientContext, BasePublicApi, ClientContext, ClientRef, ClocksState, Duration, IBasePlugin, IBaseSession, IEnableTrackRequestBody, IRequestExtra, ISession, IgnoreAllTypes, InternalPlugin, InternalPluginPriority, MatchCommonTypes, MatchFun, MatchRequestFun, MatchRequestTypes, MatchTraceRequestTypes, MiniPlatformOptions, NotifyData, OTHttpInfo, OTStatusCode, OTTrace, OmitedWebTrackerOptions, RelativeTime, SLS_BrowserClientOptions, SLS_CLIENT_NAME, SLS_ClientBaseOptions, SLS_MUTABLE_OPTION, SLS_TRACE_UID_KEY, SLS_TraceMiniClientOptions, ServerDuration, StsOption, StsPlugin, SubscribeCallback, SubscribeDep, TimeStamp, UnknownFunc, WebEventType, WebTrackerBrowserOptions, WebTrackerMiniOptions, WebTrackerNodeOptions, WebTrackerOptions }; |
{ | ||
"name": "@aliyun-sls/web-types", | ||
"version": "0.2.9", | ||
"version": "0.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "types": "dist/web-types.d.ts", |
16766
467