iii-browser-sdk 0.11.4-next.5 → 0.11.5-next.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/index.d.cts CHANGED
@@ -403,7 +403,7 @@ interface ISdk {
403
403
  * const trigger = iii.registerTrigger({
404
404
  * type: 'cron',
405
405
  * function_id: 'my-service::process-batch',
406
- * config: { schedule: '*\/5 * * * *' },
406
+ * config: { expression: '0 *\/5 * * * * *' },
407
407
  * })
408
408
  *
409
409
  * // Later, remove the trigger
@@ -477,13 +477,13 @@ interface ISdk {
477
477
  *
478
478
  * @example
479
479
  * ```typescript
480
- * type CronConfig = { schedule: string }
480
+ * type CronConfig = { expression: string }
481
481
  *
482
482
  * iii.registerTriggerType<CronConfig>(
483
483
  * { id: 'cron', description: 'Fires on a cron schedule' },
484
484
  * {
485
485
  * async registerTrigger({ id, function_id, config }) {
486
- * startCronJob(id, config.schedule, () =>
486
+ * startCronJob(id, config.expression, () =>
487
487
  * iii.trigger({ function_id, payload: {} }),
488
488
  * )
489
489
  * },
@@ -586,7 +586,7 @@ type FunctionRef = {
586
586
  *
587
587
  * @example
588
588
  * ```typescript
589
- * type CronConfig = { schedule: string }
589
+ * type CronConfig = { expression: string }
590
590
  *
591
591
  * const cron = iii.registerTriggerType<CronConfig>(
592
592
  * { id: 'cron', description: 'Fires on a cron schedule' },
@@ -594,13 +594,13 @@ type FunctionRef = {
594
594
  * )
595
595
  *
596
596
  * // Register a trigger -- type is inferred as CronConfig
597
- * cron.registerTrigger('my-fn', { schedule: '* * * * *' })
597
+ * cron.registerTrigger('my::fn', { expression: '0 *\/5 * * * * *' })
598
598
  *
599
599
  * // Register a function and bind a trigger in one call
600
600
  * cron.registerFunction(
601
- * 'my-fn',
601
+ * 'my::fn',
602
602
  * async (data) => { return { ok: true } },
603
- * { description: 'Cron-triggered function' },
603
+ * { expression: '0 *\/5 * * * * *' },
604
604
  * )
605
605
  * ```
606
606
  */
package/dist/index.d.mts CHANGED
@@ -403,7 +403,7 @@ interface ISdk {
403
403
  * const trigger = iii.registerTrigger({
404
404
  * type: 'cron',
405
405
  * function_id: 'my-service::process-batch',
406
- * config: { schedule: '*\/5 * * * *' },
406
+ * config: { expression: '0 *\/5 * * * * *' },
407
407
  * })
408
408
  *
409
409
  * // Later, remove the trigger
@@ -477,13 +477,13 @@ interface ISdk {
477
477
  *
478
478
  * @example
479
479
  * ```typescript
480
- * type CronConfig = { schedule: string }
480
+ * type CronConfig = { expression: string }
481
481
  *
482
482
  * iii.registerTriggerType<CronConfig>(
483
483
  * { id: 'cron', description: 'Fires on a cron schedule' },
484
484
  * {
485
485
  * async registerTrigger({ id, function_id, config }) {
486
- * startCronJob(id, config.schedule, () =>
486
+ * startCronJob(id, config.expression, () =>
487
487
  * iii.trigger({ function_id, payload: {} }),
488
488
  * )
489
489
  * },
@@ -586,7 +586,7 @@ type FunctionRef = {
586
586
  *
587
587
  * @example
588
588
  * ```typescript
589
- * type CronConfig = { schedule: string }
589
+ * type CronConfig = { expression: string }
590
590
  *
591
591
  * const cron = iii.registerTriggerType<CronConfig>(
592
592
  * { id: 'cron', description: 'Fires on a cron schedule' },
@@ -594,13 +594,13 @@ type FunctionRef = {
594
594
  * )
595
595
  *
596
596
  * // Register a trigger -- type is inferred as CronConfig
597
- * cron.registerTrigger('my-fn', { schedule: '* * * * *' })
597
+ * cron.registerTrigger('my::fn', { expression: '0 *\/5 * * * * *' })
598
598
  *
599
599
  * // Register a function and bind a trigger in one call
600
600
  * cron.registerFunction(
601
- * 'my-fn',
601
+ * 'my::fn',
602
602
  * async (data) => { return { ok: true } },
603
- * { description: 'Cron-triggered function' },
603
+ * { expression: '0 *\/5 * * * * *' },
604
604
  * )
605
605
  * ```
606
606
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iii-browser-sdk",
3
- "version": "0.11.4-next.5",
3
+ "version": "0.11.5-next.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"