@ganaka/sdk 1.8.0 → 1.9.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 CHANGED
@@ -79,7 +79,9 @@ declare const deleteRun: {
79
79
  }, z.core.$strip>;
80
80
  };
81
81
 
82
- declare const fetchAvailableDates: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
82
+ export declare type fetchAvailableDates = ReturnType<typeof fetchAvailableDates_2>;
83
+
84
+ declare const fetchAvailableDates_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
83
85
  developerToken: string;
84
86
  apiDomain: string;
85
87
  runId: string | null;
@@ -87,9 +89,11 @@ declare const fetchAvailableDates: ({ developerToken, apiDomain, runId, currentT
87
89
  currentTimezone?: string;
88
90
  }) => () => Promise<default_2.infer<typeof v1_developer_available_dates_schemas.getAvailableDates.response>["data"]>;
89
91
 
90
- export declare type FetchAvailableDatesResponse = Awaited<ReturnType<ReturnType<typeof fetchAvailableDates>>>;
92
+ export declare type FetchAvailableDatesResponse = Awaited<ReturnType<ReturnType<typeof fetchAvailableDates_2>>>;
93
+
94
+ export declare type fetchCandles = ReturnType<typeof fetchCandles_2>;
91
95
 
92
- declare const fetchCandles: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
96
+ declare const fetchCandles_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
93
97
  developerToken: string;
94
98
  apiDomain: string;
95
99
  runId: string | null;
@@ -97,9 +101,11 @@ declare const fetchCandles: ({ developerToken, apiDomain, runId, currentTimestam
97
101
  currentTimezone?: string;
98
102
  }) => (params: default_2.infer<typeof v1_developer_groww_schemas.getGrowwHistoricalCandles.query>) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwHistoricalCandles.response>["data"]>;
99
103
 
100
- export declare type FetchCandlesResponse = Awaited<ReturnType<ReturnType<typeof fetchCandles>>>;
104
+ export declare type FetchCandlesResponse = Awaited<ReturnType<ReturnType<typeof fetchCandles_2>>>;
105
+
106
+ export declare type fetchHolidays = ReturnType<typeof fetchHolidays_2>;
101
107
 
102
- declare const fetchHolidays: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
108
+ declare const fetchHolidays_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
103
109
  developerToken: string;
104
110
  apiDomain: string;
105
111
  runId: string | null;
@@ -107,9 +113,11 @@ declare const fetchHolidays: ({ developerToken, apiDomain, runId, currentTimesta
107
113
  currentTimezone?: string;
108
114
  }) => () => Promise<default_2.infer<typeof v1_developer_holidays_schemas.getHolidays.response>["data"]>;
109
115
 
110
- export declare type FetchHolidaysResponse = Awaited<ReturnType<ReturnType<typeof fetchHolidays>>>;
116
+ export declare type FetchHolidaysResponse = Awaited<ReturnType<ReturnType<typeof fetchHolidays_2>>>;
111
117
 
112
- declare const fetchNiftyQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
118
+ export declare type fetchNiftyQuote = ReturnType<typeof fetchNiftyQuote_2>;
119
+
120
+ declare const fetchNiftyQuote_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
113
121
  developerToken: string;
114
122
  apiDomain: string;
115
123
  runId: string | null;
@@ -117,9 +125,11 @@ declare const fetchNiftyQuote: ({ developerToken, apiDomain, runId, currentTimes
117
125
  currentTimezone?: string;
118
126
  }) => (params: default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuote.query>) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuote.response>["data"] | null>;
119
127
 
120
- export declare type FetchNiftyQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuote>>>;
128
+ export declare type FetchNiftyQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuote_2>>>;
129
+
130
+ export declare type fetchNiftyQuoteTimeline = ReturnType<typeof fetchNiftyQuoteTimeline_2>;
121
131
 
122
- declare const fetchNiftyQuoteTimeline: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
132
+ declare const fetchNiftyQuoteTimeline_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
123
133
  developerToken: string;
124
134
  apiDomain: string;
125
135
  runId: string | null;
@@ -131,9 +141,11 @@ declare const fetchNiftyQuoteTimeline: ({ developerToken, apiDomain, runId, curr
131
141
  */
132
142
  end_datetime: string) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuoteTimeline.response>["data"]["niftyTimeline"]>;
133
143
 
134
- export declare type FetchNiftyQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuoteTimeline>>>;
144
+ export declare type FetchNiftyQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuoteTimeline_2>>>;
135
145
 
136
- declare const fetchQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
146
+ export declare type fetchQuote = ReturnType<typeof fetchQuote_2>;
147
+
148
+ declare const fetchQuote_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
137
149
  developerToken: string;
138
150
  apiDomain: string;
139
151
  runId: string | null;
@@ -141,9 +153,11 @@ declare const fetchQuote: ({ developerToken, apiDomain, runId, currentTimestamp,
141
153
  currentTimezone?: string;
142
154
  }) => (params: default_2.infer<typeof v1_developer_groww_schemas.getGrowwQuote.query>) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwQuote.response>["data"] | null>;
143
155
 
144
- export declare type FetchQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchQuote>>>;
156
+ export declare type FetchQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchQuote_2>>>;
157
+
158
+ export declare type fetchQuoteTimeline = ReturnType<typeof fetchQuoteTimeline_2>;
145
159
 
146
- declare const fetchQuoteTimeline: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
160
+ declare const fetchQuoteTimeline_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
147
161
  developerToken: string;
148
162
  apiDomain: string;
149
163
  runId: string | null;
@@ -155,9 +169,11 @@ declare const fetchQuoteTimeline: ({ developerToken, apiDomain, runId, currentTi
155
169
  */
156
170
  end_datetime: string) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwQuoteTimeline.response>["data"]["quoteTimeline"]>;
157
171
 
158
- export declare type FetchQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchQuoteTimeline>>>;
172
+ export declare type FetchQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchQuoteTimeline_2>>>;
159
173
 
160
- declare const fetchShortlist: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
174
+ export declare type fetchShortlist = ReturnType<typeof fetchShortlist_2>;
175
+
176
+ declare const fetchShortlist_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
161
177
  developerToken: string;
162
178
  apiDomain: string;
163
179
  runId: string | null;
@@ -165,7 +181,9 @@ declare const fetchShortlist: ({ developerToken, apiDomain, runId, currentTimest
165
181
  currentTimezone?: string;
166
182
  }) => (queryParams: default_2.infer<typeof v1_developer_lists_schemas.getLists.query>) => Promise<default_2.infer<typeof v1_developer_lists_schemas.getLists.response>["data"] | null>;
167
183
 
168
- declare const fetchShortlistPersistence: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
184
+ export declare type fetchShortlistPersistence = ReturnType<typeof fetchShortlistPersistence_2>;
185
+
186
+ declare const fetchShortlistPersistence_2: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
169
187
  developerToken: string;
170
188
  apiDomain: string;
171
189
  runId: string | null;
@@ -173,7 +191,7 @@ declare const fetchShortlistPersistence: ({ developerToken, apiDomain, runId, cu
173
191
  currentTimezone?: string;
174
192
  }) => (queryParams: default_2.infer<typeof v1_developer_shortlist_persistence_schemas.getShortlistPersistence.query>) => Promise<default_2.infer<typeof v1_developer_shortlist_persistence_schemas.getShortlistPersistence.response>["data"] | null>;
175
193
 
176
- export declare type FetchShortlistResponse = Awaited<ReturnType<ReturnType<typeof fetchShortlist>>>;
194
+ export declare type FetchShortlistResponse = Awaited<ReturnType<ReturnType<typeof fetchShortlist_2>>>;
177
195
 
178
196
  export declare function ganaka<T>({ fn, startTime, endTime, intervalMinutes, deleteRunAfterCompletion, name, tags, }: {
179
197
  fn: (context: RunContext) => Promise<T>;
@@ -1161,21 +1179,21 @@ declare const placeOrder: ({ runId, apiClient }: {
1161
1179
 
1162
1180
  export declare interface RunContext {
1163
1181
  placeOrder: ReturnType<typeof placeOrder>;
1164
- fetchCandles: ReturnType<typeof fetchCandles>;
1165
- fetchQuote: ReturnType<typeof fetchQuote>;
1166
- fetchNiftyQuote: ReturnType<typeof fetchNiftyQuote>;
1182
+ fetchCandles: ReturnType<typeof fetchCandles_2>;
1183
+ fetchQuote: ReturnType<typeof fetchQuote_2>;
1184
+ fetchNiftyQuote: ReturnType<typeof fetchNiftyQuote_2>;
1167
1185
  /**
1168
1186
  * Given an end_datetime, returns the NIFTY quote timeline for the given date
1169
1187
  *
1170
1188
  * @param end_datetime - The end datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
1171
1189
  * @returns The NIFTY quote timeline for the given date
1172
1190
  */
1173
- fetchNiftyQuoteTimeline: ReturnType<typeof fetchNiftyQuoteTimeline>;
1191
+ fetchNiftyQuoteTimeline: ReturnType<typeof fetchNiftyQuoteTimeline_2>;
1174
1192
  /**
1175
1193
  * Given a symbol and a end_datetime, returns the quote timeline for the given date
1176
1194
  */
1177
- fetchQuoteTimeline: ReturnType<typeof fetchQuoteTimeline>;
1178
- fetchShortlist: ReturnType<typeof fetchShortlist>;
1195
+ fetchQuoteTimeline: ReturnType<typeof fetchQuoteTimeline_2>;
1196
+ fetchShortlist: ReturnType<typeof fetchShortlist_2>;
1179
1197
  /**
1180
1198
  * Given a shortlist type and a start and end datetime,
1181
1199
  * returns the list of instruments that appeared in the shortlist during the time range
@@ -1184,21 +1202,21 @@ export declare interface RunContext {
1184
1202
  * This helps identify the stocks that have been consistently appearing in the shortlist
1185
1203
  * over a given period of time.
1186
1204
  */
1187
- fetchShortlistPersistence: ReturnType<typeof fetchShortlistPersistence>;
1205
+ fetchShortlistPersistence: ReturnType<typeof fetchShortlistPersistence_2>;
1188
1206
  /**
1189
1207
  * Fetch available dates with timestamps.
1190
1208
  * Returns which dates have data available, grouped by date with all timestamps for each date.
1191
1209
  *
1192
1210
  * @returns Available dates data with dates and timestamps
1193
1211
  */
1194
- fetchAvailableDates: ReturnType<typeof fetchAvailableDates>;
1212
+ fetchAvailableDates: ReturnType<typeof fetchAvailableDates_2>;
1195
1213
  /**
1196
1214
  * Fetch market holidays.
1197
1215
  * Returns all dates marked as market holidays.
1198
1216
  *
1199
1217
  * @returns Holidays data
1200
1218
  */
1201
- fetchHolidays: ReturnType<typeof fetchHolidays>;
1219
+ fetchHolidays: ReturnType<typeof fetchHolidays_2>;
1202
1220
  /**
1203
1221
  * Current timestamp in IST string format (YYYY-MM-DDTHH:mm:ss)
1204
1222
  * for every loop iteration