Hyperlinkv0.8.0-beta.28

Process

Process.scheduleGroupSpecconstsrc/Process.ts:1719
{
  entries: Hyperlink.Marked<
    Hyperlink.Method<
      undefined,
      Schema.$Array<
        Schema.Struct<{
          readonly id: Schema.optionalKey<Schema.String>
          readonly startAt: Schema.DateTimeUtc
          readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
        }>
      >,
      Schema.Never,
      true,
      Hyperlink.MethodAnnotations & { description: string },
      Hyperlink.Derive
    >,
    { readonly _tag: "ref" }
  >
  set: Hyperlink.Method<
    Schema.$Array<
      Schema.Struct<{
        readonly id: Schema.optionalKey<Schema.String>
        readonly startAt: Schema.DateTimeUtc
        readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
      }>
    >,
    Schema.Void,
    Schema.Never,
    false,
    Hyperlink.MethodAnnotations & { description: string },
    Hyperlink.Derive
  >
  add: Hyperlink.Method<
    Schema.Struct<{
      readonly id: Schema.optionalKey<Schema.String>
      readonly startAt: Schema.DateTimeUtc
      readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
    }>,
    Schema.Void,
    Schema.Never,
    false,
    Hyperlink.MethodAnnotations & { description: string },
    Hyperlink.Derive
  >
  clear: Hyperlink.Method<
    undefined,
    Schema.Void,
    Schema.Never,
    false,
    Hyperlink.MethodAnnotations & {
      description: string
      destructive: true
    },
    Hyperlink.Derive
  >
}

The schedule mutation verbs a process gains when it owns an inline schedule. Reading is entries (reactive); mutation is set / add / clear. This is how you arm/disarm: armed is derived from the entries, so arming is done by mutating them.

scheduleschedule
Source src/Process.ts:171915 lines
export const scheduleGroupSpec = {
  entries: Hyperlink.ref(Schema.Array(processScheduleEntry)).annotate({
    description: "The process's current schedule entries (run windows), reactive.",
  }),
  set: Hyperlink.effectFn(Schema.Array(processScheduleEntry)).annotate({
    description: "Replace all schedule entries.",
  }),
  add: Hyperlink.effectFn(processScheduleEntry).annotate({
    description: "Append one schedule entry.",
  }),
  clear: Hyperlink.effect(Schema.Void).annotate({
    description: "Remove all schedule entries (disarms until new entries are added).",
    destructive: true,
  }),
};