@discomedia/utils 1.0.3 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +651 -903
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +653 -903
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +50 -0
- package/dist/test.js +755 -6495
- package/dist/test.js.map +1 -1
- package/dist/types/alpaca-market-data-api.d.ts +2 -15
- package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types/alpaca-trading-api.d.ts +3 -6
- package/dist/types/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -28
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/market-time.d.ts +187 -117
- package/dist/types/market-time.d.ts.map +1 -1
- package/dist/types/testing/market-time-refactor-test.d.ts +1 -0
- package/dist/types/testing/market-time-refactor-test.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/index-frontend.cjs +0 -7798
- package/dist/index-frontend.cjs.map +0 -1
- package/dist/index-frontend.mjs +0 -7792
- package/dist/index-frontend.mjs.map +0 -1
- package/dist/types/index-frontend.d.ts +0 -18
- package/dist/types/index-frontend.d.ts.map +0 -1
- package/dist/types/testing/frontend-test.d.ts +0 -2
- package/dist/types/testing/frontend-test.d.ts.map +0 -1
- package/dist/types/time-utils.d.ts +0 -17
- package/dist/types/time-utils.d.ts.map +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as llm from './llm-openai';
|
|
2
|
-
import * as llmImages from './llm-images';
|
|
3
|
-
export type { LLMResponse, LLMOptions, LLMUsage, OpenAIModel, DeepseekModel, LLMModel, OpenAIResponseFormat, ImageGenerationOptions, ImageModel, ImageGenerateParams, ImagesResponse, Image } from './types/llm-types';
|
|
4
|
-
export declare const disco: {
|
|
5
|
-
llm: {
|
|
6
|
-
call: typeof llm.makeLLMCall;
|
|
7
|
-
seek: <T = any>(content: string | import("openai/resources/index").ChatCompletionContentPart[], responseFormat?: import("./types/llm-types").OpenAIResponseFormat, options?: import("./types/llm-types").LLMOptions) => Promise<import("./types/llm-types").LLMResponse<T>>;
|
|
8
|
-
images: typeof llmImages.makeImagesCall;
|
|
9
|
-
responsesAPI: <T = any>(input: string | import("openai/resources/responses/responses").ResponseCreateParamsNonStreaming["input"], options?: Omit<import("openai/resources/responses/responses").ResponseCreateParamsNonStreaming, "input" | "model"> & {
|
|
10
|
-
apiKey?: string;
|
|
11
|
-
model?: string;
|
|
12
|
-
}) => Promise<import("./types/llm-types").LLMResponse<T>>;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export { makeLLMCall, makeResponsesAPICall } from './llm-openai';
|
|
16
|
-
export { makeImagesCall } from './llm-images';
|
|
17
|
-
export { makeDeepseekCall } from './llm-deepseek';
|
|
18
|
-
//# sourceMappingURL=index-frontend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-frontend.d.ts","sourceRoot":"","sources":["../../src/index-frontend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAI1C,YAAY,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,KAAK,EACN,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,KAAK;;;;;;kBAYsiE,CAAC;iBAAmB,CAAC;;;CAL5kE,CAAC;AAGF,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-test.d.ts","sourceRoot":"","sources":["../../../src/testing/frontend-test.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const toUnixTimestamp: (ts: string) => number;
|
|
2
|
-
export declare function getTimeAgo(dateString: string): string;
|
|
3
|
-
export declare function normalizeDate(timestamp: number): string;
|
|
4
|
-
export declare function calculateTimeRange(range: string): string;
|
|
5
|
-
export declare const calculateDaysLeft: (accountCreationDate: Date) => number;
|
|
6
|
-
export declare const timeAgo: (timestamp?: Date) => string;
|
|
7
|
-
export declare const formatDate: (dateString: string, updateDate?: boolean) => string;
|
|
8
|
-
export declare const formatDateToString: (date: Date) => string;
|
|
9
|
-
export declare const parseETDateFromAV: (dateString: string) => Date;
|
|
10
|
-
export declare const formatToUSEastern: (date: Date, justDate?: boolean) => string;
|
|
11
|
-
export declare const unixTimetoUSEastern: (timestamp: number) => {
|
|
12
|
-
date: Date;
|
|
13
|
-
timeString: string;
|
|
14
|
-
dateString: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const timeDiffString: (milliseconds: number) => string;
|
|
17
|
-
//# sourceMappingURL=time-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-utils.d.ts","sourceRoot":"","sources":["../../src/time-utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,KAAG,MAE5C,CAAC;AAEF,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,UAiC5C;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGvD;AAGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UA2B/C;AAeD,eAAO,MAAM,iBAAiB,GAAI,qBAAqB,IAAI,KAAG,MAS7D,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,YAAY,IAAI,KAAG,MAe1C,CAAC;AAGF,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,EAAE,aAAa,OAAO,WAOlE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,KAAG,MAgB/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,IActD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,WAAW,OAAO,KAAG,MAelE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAK3G,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,cAAc,MAAM,KAAG,MAerD,CAAC"}
|