@nangohq/runner-sdk 0.64.0 → 0.64.1

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/scripts.d.ts CHANGED
@@ -45,10 +45,21 @@ export interface CreateSyncProps<TModels extends Record<string, ZodModel>, TMeta
45
45
  * @example 'every hour'
46
46
  */
47
47
  frequency: string;
48
+ /**
49
+ * The models that will be synced by this script.
50
+ * You need one endpoint per model.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * models: {
55
+ * GithubIssue: z.object({
56
+ * id: z.string(),
57
+ * }),
58
+ * },
59
+ */
48
60
  models: TModels;
49
61
  /**
50
62
  * The type of the sync.
51
- * @default 'full'
52
63
  */
53
64
  syncType: 'full' | 'incremental';
54
65
  /**
@@ -257,10 +268,45 @@ export interface CreateActionResponse<TInput extends z.ZodTypeAny, TOutput exten
257
268
  */
258
269
  export declare function createAction<TInput extends z.ZodTypeAny, TOutput extends z.ZodTypeAny, TMetadata extends ZodMetadata = undefined>(params: CreateActionProps<TInput, TOutput, TMetadata>): CreateActionResponse<TInput, TOutput, TMetadata>;
259
270
  export interface CreateOnEventProps<TMetadata extends ZodMetadata = undefined> {
271
+ /**
272
+ * The version of the onEvent script.
273
+ * Use it to track changes to the onEvent script inside Nango's UI.
274
+ *
275
+ * @default '0.0.1'
276
+ * @example '1.0.0'
277
+ */
260
278
  version?: string;
279
+ /**
280
+ * The description of the onEvent script.
281
+ *
282
+ * @example 'Fetch id from GitHub'
283
+ */
261
284
  description: string;
285
+ /**
286
+ * The event that will trigger this script.
287
+ */
262
288
  event: 'post-connection-creation' | 'pre-connection-deletion';
289
+ /**
290
+ * The connection's metadata of the script.
291
+ *
292
+ * @default z.void();
293
+ * @example
294
+ * ```ts
295
+ * metadata: z.object({
296
+ * userId: z.string(),
297
+ * });
298
+ * ```
299
+ */
263
300
  metadata?: TMetadata;
301
+ /**
302
+ * The function that will be called when the onEvent script is triggered.
303
+ * @example
304
+ * ```ts
305
+ * exec: async (nango) => {
306
+ * await nango.log('Hello, world!');
307
+ * }
308
+ * ```
309
+ */
264
310
  exec: (nango: NangoActionBase<TMetadata>) => MaybePromise<void>;
265
311
  }
266
312
  export interface CreateOnEventResponse<TMetadata extends ZodMetadata = undefined> extends CreateOnEventProps<TMetadata> {
@@ -1 +1 @@
1
- {"version":3,"file":"scripts.js","sourceRoot":"","sources":["../lib/scripts.ts"],"names":[],"mappings":"AA+IA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CACtB,MAA2C;IAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACvC,CAAC;AAuGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY,CACxB,MAAqD;IAErD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;AACzC,CAAC;AAaD;;GAEG;AACH,MAAM,UAAU,aAAa,CAA4C,MAAqC;IAC1G,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"scripts.js","sourceRoot":"","sources":["../lib/scripts.ts"],"names":[],"mappings":"AA0JA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CACtB,MAA2C;IAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACvC,CAAC;AAuGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY,CACxB,MAAqD;IAErD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;AACzC,CAAC;AAoDD;;GAEG;AACH,MAAM,UAAU,aAAa,CAA4C,MAAqC;IAC1G,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@nangohq/runner-sdk",
3
- "version": "0.64.0",
3
+ "version": "0.64.1",
4
4
  "description": "Nango's Runner SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "dependencies": {
8
- "@nangohq/node": "0.64.0",
9
- "@nangohq/providers": "0.64.0",
8
+ "@nangohq/node": "0.64.1",
9
+ "@nangohq/providers": "0.64.1",
10
10
  "ajv": "8.17.1",
11
11
  "ajv-formats": "3.0.1",
12
12
  "lodash-es": "4.17.21",
13
13
  "parse-link-header": "2.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@nangohq/types": "0.64.0",
16
+ "@nangohq/types": "0.64.1",
17
17
  "@types/json-schema": "7.0.15",
18
18
  "axios": "1.9.0",
19
19
  "json-schema": "0.4.0",