Skip to content

Commit

Permalink
feat: add type of custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcarman committed May 21, 2024
1 parent af6d6a8 commit a4a612c
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions src/common/metadata-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
export type SfCustomField = {
CustomField: SfCustomFieldContents;
};

export type SfCustomFieldContents = {
fullName?: string;
description?: string;
encryptionScheme?: string;
externalId?: boolean;
label?: string;
required?: boolean;
trackFeedHistory?: boolean;
trackHistory?: boolean;
type?: string;
formula?: string;
formulaTreatBlanksAs?: string;
unique?: boolean;
inlineHelpText?: string;
isNameField?: boolean;
isSortingDisabled?: boolean;
length?: number;
visibleLines?: number;
precision?: number;
scale?: number;
deleteConstraint?: string;
referenceTo?: string;
relationshipLabel?: string;
relationshipName?: string;
valueSet?: SfValueSet;
lookupFilter?: SfLookupFilter;
};

export type SfValueSet = {
controllingField?: string;
restricted?: boolean;
valueSetDefinition?: SfValueSetDefinition;
valueSettings?: SfValueSetting[];
};

export type SfValueSetDefinition = {
sorted?: boolean;
value?: SfValue[];
};

export type SfValue = {
fullName?: string;
default?: boolean;
label?: string;
};

export type SfValueSetting = {
controllingFieldValue?: string[];
valueName?: string;
};

export type SfLookupFilter = {
active?: boolean;
errorMessage?: string;
filterItems?: SfFilterItems;
isOptional?: boolean;
};

export type SfFilterItems = {
field?: string;
operation?: string;
value?: string;
};

0 comments on commit a4a612c

Please sign in to comment.