@ganaka/sdk 1.7.0 → 1.8.0
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.d.ts +89 -0
- package/dist/index.js +727 -477
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +727 -477
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,16 @@ declare const deleteRun: {
|
|
|
79
79
|
}, z.core.$strip>;
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
+
declare const fetchAvailableDates: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
83
|
+
developerToken: string;
|
|
84
|
+
apiDomain: string;
|
|
85
|
+
runId: string | null;
|
|
86
|
+
currentTimestamp: string;
|
|
87
|
+
currentTimezone?: string;
|
|
88
|
+
}) => () => Promise<default_2.infer<typeof v1_developer_available_dates_schemas.getAvailableDates.response>["data"]>;
|
|
89
|
+
|
|
90
|
+
export declare type FetchAvailableDatesResponse = Awaited<ReturnType<ReturnType<typeof fetchAvailableDates>>>;
|
|
91
|
+
|
|
82
92
|
declare const fetchCandles: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
83
93
|
developerToken: string;
|
|
84
94
|
apiDomain: string;
|
|
@@ -89,6 +99,16 @@ declare const fetchCandles: ({ developerToken, apiDomain, runId, currentTimestam
|
|
|
89
99
|
|
|
90
100
|
export declare type FetchCandlesResponse = Awaited<ReturnType<ReturnType<typeof fetchCandles>>>;
|
|
91
101
|
|
|
102
|
+
declare const fetchHolidays: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
103
|
+
developerToken: string;
|
|
104
|
+
apiDomain: string;
|
|
105
|
+
runId: string | null;
|
|
106
|
+
currentTimestamp: string;
|
|
107
|
+
currentTimezone?: string;
|
|
108
|
+
}) => () => Promise<default_2.infer<typeof v1_developer_holidays_schemas.getHolidays.response>["data"]>;
|
|
109
|
+
|
|
110
|
+
export declare type FetchHolidaysResponse = Awaited<ReturnType<ReturnType<typeof fetchHolidays>>>;
|
|
111
|
+
|
|
92
112
|
declare const fetchNiftyQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
93
113
|
developerToken: string;
|
|
94
114
|
apiDomain: string;
|
|
@@ -269,6 +289,20 @@ export declare class GanakaClient {
|
|
|
269
289
|
* @returns Promise resolving to shortlist persistence data or null
|
|
270
290
|
*/
|
|
271
291
|
fetchShortlistPersistence(queryParams: z.infer<typeof v1_developer_shortlist_persistence_schemas.getShortlistPersistence.query>): Promise<z.infer<typeof v1_developer_shortlist_persistence_schemas.getShortlistPersistence.response>["data"] | null>;
|
|
292
|
+
/**
|
|
293
|
+
* Fetch available dates with timestamps.
|
|
294
|
+
* Returns which dates have data available, grouped by date with all timestamps for each date.
|
|
295
|
+
*
|
|
296
|
+
* @returns Promise resolving to available dates data with dates and timestamps
|
|
297
|
+
*/
|
|
298
|
+
fetchAvailableDates(): Promise<z.infer<typeof v1_developer_available_dates_schemas.getAvailableDates.response>["data"]>;
|
|
299
|
+
/**
|
|
300
|
+
* Fetch market holidays.
|
|
301
|
+
* Returns all dates marked as market holidays.
|
|
302
|
+
*
|
|
303
|
+
* @returns Promise resolving to holidays data
|
|
304
|
+
*/
|
|
305
|
+
fetchHolidays(): Promise<z.infer<typeof v1_developer_holidays_schemas.getHolidays.response>["data"]>;
|
|
272
306
|
}
|
|
273
307
|
|
|
274
308
|
export declare interface GanakaClientConfig {
|
|
@@ -285,6 +319,20 @@ export declare interface GanakaClientConfig {
|
|
|
285
319
|
apiDomain?: string;
|
|
286
320
|
}
|
|
287
321
|
|
|
322
|
+
declare const getAvailableDates: {
|
|
323
|
+
query: z.ZodObject<{}, z.core.$strip>;
|
|
324
|
+
response: z.ZodObject<{
|
|
325
|
+
statusCode: z.ZodNumber;
|
|
326
|
+
message: z.ZodString;
|
|
327
|
+
data: z.ZodObject<{
|
|
328
|
+
dates: z.ZodArray<z.ZodObject<{
|
|
329
|
+
date: z.ZodString;
|
|
330
|
+
timestamps: z.ZodArray<z.ZodString>;
|
|
331
|
+
}, z.core.$strip>>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
};
|
|
335
|
+
|
|
288
336
|
declare const getAvailableDatetimes: {
|
|
289
337
|
query: z.ZodObject<{}, z.core.$strip>;
|
|
290
338
|
response: z.ZodObject<{
|
|
@@ -700,6 +748,21 @@ declare const getGrowwToken: {
|
|
|
700
748
|
}, z.core.$strip>;
|
|
701
749
|
};
|
|
702
750
|
|
|
751
|
+
declare const getHolidays: {
|
|
752
|
+
response: z.ZodObject<{
|
|
753
|
+
statusCode: z.ZodNumber;
|
|
754
|
+
message: z.ZodString;
|
|
755
|
+
data: z.ZodObject<{
|
|
756
|
+
holidays: z.ZodArray<z.ZodObject<{
|
|
757
|
+
id: z.ZodString;
|
|
758
|
+
date: z.ZodString;
|
|
759
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
760
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
761
|
+
}, z.core.$strip>>;
|
|
762
|
+
}, z.core.$strip>;
|
|
763
|
+
}, z.core.$strip>;
|
|
764
|
+
};
|
|
765
|
+
|
|
703
766
|
declare const getLists: {
|
|
704
767
|
query: z.ZodObject<{
|
|
705
768
|
type: z.ZodEnum<{
|
|
@@ -1122,6 +1185,20 @@ export declare interface RunContext {
|
|
|
1122
1185
|
* over a given period of time.
|
|
1123
1186
|
*/
|
|
1124
1187
|
fetchShortlistPersistence: ReturnType<typeof fetchShortlistPersistence>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Fetch available dates with timestamps.
|
|
1190
|
+
* Returns which dates have data available, grouped by date with all timestamps for each date.
|
|
1191
|
+
*
|
|
1192
|
+
* @returns Available dates data with dates and timestamps
|
|
1193
|
+
*/
|
|
1194
|
+
fetchAvailableDates: ReturnType<typeof fetchAvailableDates>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Fetch market holidays.
|
|
1197
|
+
* Returns all dates marked as market holidays.
|
|
1198
|
+
*
|
|
1199
|
+
* @returns Holidays data
|
|
1200
|
+
*/
|
|
1201
|
+
fetchHolidays: ReturnType<typeof fetchHolidays>;
|
|
1125
1202
|
/**
|
|
1126
1203
|
* Current timestamp in IST string format (YYYY-MM-DDTHH:mm:ss)
|
|
1127
1204
|
* for every loop iteration
|
|
@@ -1297,6 +1374,12 @@ declare namespace v1_dashboard_shortlists_schemas {
|
|
|
1297
1374
|
}
|
|
1298
1375
|
}
|
|
1299
1376
|
|
|
1377
|
+
declare namespace v1_developer_available_dates_schemas {
|
|
1378
|
+
export {
|
|
1379
|
+
getAvailableDates
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1300
1383
|
declare namespace v1_developer_groww_schemas {
|
|
1301
1384
|
export {
|
|
1302
1385
|
growwHistoricalCandlesSchema,
|
|
@@ -1309,6 +1392,12 @@ declare namespace v1_developer_groww_schemas {
|
|
|
1309
1392
|
}
|
|
1310
1393
|
}
|
|
1311
1394
|
|
|
1395
|
+
declare namespace v1_developer_holidays_schemas {
|
|
1396
|
+
export {
|
|
1397
|
+
getHolidays
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1312
1401
|
declare namespace v1_developer_lists_schemas {
|
|
1313
1402
|
export {
|
|
1314
1403
|
listSchema,
|