@servicenow/sdk - v4.9.0
    Preparing search index...
    • Creates an activity definition metadata object.

      The build plugin matches on ActivityDefinition(...) call expressions and resolves sys_ids by traversing the flow/action and activityType references.

      Type safety is inferred from the backing flow/action inputs and activity type experience properties, filtered by inputDisplayPreferences/experienceDisplayPreferences. When inputDisplayPreferences is omitted, all inputs from the backing flow are exposed.

      Type Parameters

      Parameters

      • config: {
            $id: string | number | ExplicitKey<string>;
            action?: undefined;
            activityType?: Type;
            defaultExperienceProperties?: { [K in string]?: any };
            defaultInputs?: { [K in string]?: any };
            experienceDisplayPreferences?: ExperienceDisplay;
            flow: Flow;
            inputDisplayPreferences?: InputDisplay;
            label: string;
        }

      Returns InferredActivityDef<Flow, Type, InputDisplay, ExperienceDisplay>

      const MyDef = ActivityDefinition({
      $id: Now.ID['my-def'],
      flow: MyCustomFlow,
      activityType: MyCustomType,
      inputDisplayPreferences: {
      message: 'all',
      priority: 'advanced',
      },
      })
    • Creates an activity definition metadata object.

      The build plugin matches on ActivityDefinition(...) call expressions and resolves sys_ids by traversing the flow/action and activityType references.

      Type safety is inferred from the backing flow/action inputs and activity type experience properties, filtered by inputDisplayPreferences/experienceDisplayPreferences. When inputDisplayPreferences is omitted, all inputs from the backing flow are exposed.

      Type Parameters

      Parameters

      • config: {
            $id: string | number | ExplicitKey<string>;
            action: Action;
            activityType?: Type;
            defaultExperienceProperties?: { [K in string]?: any };
            defaultInputs?: { [K in string]?: any };
            experienceDisplayPreferences?: ExperienceDisplay;
            flow?: undefined;
            inputDisplayPreferences?: InputDisplay;
            label: string;
        }

      Returns InferredActivityDef<Action, Type, InputDisplay, ExperienceDisplay>

      const MyDef = ActivityDefinition({
      $id: Now.ID['my-def'],
      flow: MyCustomFlow,
      activityType: MyCustomType,
      inputDisplayPreferences: {
      message: 'all',
      priority: 'advanced',
      },
      })
    • Creates an activity definition metadata object.

      The build plugin matches on ActivityDefinition(...) call expressions and resolves sys_ids by traversing the flow/action and activityType references.

      Type safety is inferred from the backing flow/action inputs and activity type experience properties, filtered by inputDisplayPreferences/experienceDisplayPreferences. When inputDisplayPreferences is omitted, all inputs from the backing flow are exposed.

      Type Parameters

      Parameters

      • config: {
            $id: string | number | ExplicitKey<string>;
            activityType?: Type;
            defaultExperienceProperties?: { [K in string]?: any };
            label: string;
        }

      Returns InferredActivityDef<undefined, Type, undefined, undefined>

      const MyDef = ActivityDefinition({
      $id: Now.ID['my-def'],
      flow: MyCustomFlow,
      activityType: MyCustomType,
      inputDisplayPreferences: {
      message: 'all',
      priority: 'advanced',
      },
      })