@trackunit/iris-app-api 1.4.10 → 1.4.13
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.4.13 (2025-07-16)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 1.4.12 (2025-07-15)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 1.4.11 (2025-07-15)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
1
13
|
## 1.4.10 (2025-07-11)
|
|
2
14
|
|
|
3
15
|
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranslationKey, TranslationLanguageKeys } from "./irisAppExtensionManifest";
|
|
2
|
-
export declare type CustomFieldDefinitionType = "STRING" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS" | "JSON" | "MONETARY";
|
|
2
|
+
export declare type CustomFieldDefinitionType = "STRING" | "STRING_LIST" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS" | "JSON" | "MONETARY";
|
|
3
3
|
export declare type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP";
|
|
4
4
|
export declare const ScopeType: {
|
|
5
5
|
/**
|
|
@@ -83,6 +83,13 @@ export interface StringFieldDefinition extends AbstractCustomFieldDefinition {
|
|
|
83
83
|
maximumLength?: number;
|
|
84
84
|
pattern?: string;
|
|
85
85
|
}
|
|
86
|
+
export interface StringListFieldDefinition extends AbstractCustomFieldDefinition {
|
|
87
|
+
type: "STRING_LIST";
|
|
88
|
+
itemMinimumLength?: number;
|
|
89
|
+
itemMaximumLength?: number;
|
|
90
|
+
pattern?: string;
|
|
91
|
+
maximumItems?: number;
|
|
92
|
+
}
|
|
86
93
|
export interface EmailFieldDefinition extends AbstractCustomFieldDefinition {
|
|
87
94
|
type: "EMAIL";
|
|
88
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppCustomFields.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCustomFields.ts"],"names":[],"mappings":"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","sourcesContent":["import { TranslationKey, TranslationLanguageKeys } from \"./irisAppExtensionManifest\";\n\nexport declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\"\n | \"JSON\"\n | \"MONETARY\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\";\n\nexport const ScopeType = {\n /**\n * Values with account scope will be shared within a single account\n */\n ACCOUNT: \"ACCOUNT\",\n /**\n * Values will be shared within a single account (write) and visible to all accounts (read)\n */\n ACCOUNT_WRITE_GLOBAL_READ: \"ACCOUNT_WRITE_GLOBAL_READ\",\n /**\n * Values with global scope will be shared between all accounts with access to the entity.\n */\n GLOBAL: \"GLOBAL\",\n} as const;\nexport type ScopeTypeType = (typeof ScopeType)[keyof typeof ScopeType];\n\n/**\n * Test if the object is a CustomFieldTranslation array.\n */\nexport const isCustomFieldTranslationArray = (\n object: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey }\n): object is CustomFieldTranslationArray => {\n return Array.isArray(object);\n};\n\nexport interface CustomFieldTranslation {\n language: TranslationLanguageKeys;\n title: string;\n description?: string;\n}\n\nexport interface CustomFieldTranslationWithoutEnglish {\n language: Exclude<TranslationLanguageKeys, \"en\">;\n title: string;\n description?: string;\n}\n\nexport type CustomFieldTranslationArray = [\n { language: \"en\"; title: string; description?: string },\n ...Array<CustomFieldTranslationWithoutEnglish>,\n];\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * Who can access the field value. Default is only within the users account.\n */\n scopeType?: ScopeTypeType;\n\n /**\n * The translations for the custom field definition.\n * For Arrays of translations, the list must contain the language \"en\" as the default.\n * Either a list of translations or a single translation object with\n * translation keys it will look for all available languages in src/locales/<languagecode>/translation.json\n */\n translations: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey };\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n multiSelect?: boolean;\n allValues?: Array<string>;\n /**\n * Map from old values not in the allValues to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport const UnitOfMeasurement = {\n NEWTON: \"NEWTON\",\n PASCAL: \"PASCAL\",\n KILOPASCAL: \"KILOPASCAL\",\n WATT: \"WATT\",\n BAR: \"BAR\",\n CENTIMETRE: \"CENTIMETRE\",\n MILLIMETRE: \"MILLIMETRE\",\n METRE: \"METRE\",\n KILOMETRE: \"KILOMETRE\",\n GRAM: \"GRAM\",\n KILOGRAM: \"KILOGRAM\",\n VOLT: \"VOLT\",\n AMPERE_HOUR: \"AMPERE_HOUR\",\n KILOWATT: \"KILOWATT\",\n KILOWATT_HOUR: \"KILOWATT_HOUR\",\n KILOGRAM_PER_HOUR: \"KILOGRAM_PER_HOUR\",\n KILOGRAM_PER_SECOND: \"KILOGRAM_PER_SECOND\",\n SQUARE_KILOMETRE: \"SQUARE_KILOMETRE\",\n KILOMETRE_PER_HOUR: \"KILOMETRE_PER_HOUR\",\n LITRE: \"LITRE\",\n SQUARE_METRE: \"SQUARE_METRE\",\n CUBIC_METRE: \"CUBIC_METRE\",\n METRE_PER_SECOND: \"METRE_PER_SECOND\",\n METRE_PER_SECOND_SQUARED: \"METRE_PER_SECOND_SQUARED\",\n METRIC_TON: \"METRIC_TON\",\n ARE: \"ARE\",\n HECTARE: \"HECTARE\",\n YEAR: \"YEAR\",\n MONTH: \"MONTH\",\n DAY: \"DAY\",\n HOUR: \"HOUR\",\n LITRES_PER_HOUR: \"LITRES_PER_HOUR\",\n REVOLUTIONS_PER_MINUTE: \"REVOLUTIONS_PER_MINUTE\",\n VOLT_AMPERE: \"VOLT_AMPERE\",\n G_FORCE: \"G_FORCE\",\n CELSIUS: \"CELSIUS\",\n PERCENT: \"PERCENT\",\n DEGREE_ANGLE: \"DEGREE_ANGLE\",\n MILLISECOND: \"MILLISECOND\",\n SECOND: \"SECOND\",\n MINUTE: \"MINUTE\",\n WEEK: \"WEEK\",\n AMPERE: \"AMPERE\",\n HERTZ: \"HERTZ\",\n ACRE: \"ACRE\",\n FOOT: \"FOOT\",\n SQUARE_FOOT: \"SQUARE_FOOT\",\n CUBIC_FOOT: \"CUBIC_FOOT\",\n GALLON_LIQUID: \"GALLON_LIQUID\",\n INCH: \"INCH\",\n POUND: \"POUND\",\n POUND_PER_HOUR: \"POUND_PER_HOUR\",\n POUND_PER_SECOND: \"POUND_PER_SECOND\",\n MILE: \"MILE\",\n MILE_PER_HOUR: \"MILE_PER_HOUR\",\n OUNCE: \"OUNCE\",\n US_TON: \"US_TON\",\n YARD: \"YARD\",\n POUND_PER_SQUARE_INCH: \"POUND_PER_SQUARE_INCH\",\n INCHES_OF_WATER: \"INCHES_OF_WATER\",\n GALLONS_PER_HOUR: \"GALLONS_PER_HOUR\",\n FAHRENHEIT: \"FAHRENHEIT\",\n} as const;\nexport type UnitOfMeasurementType = (typeof UnitOfMeasurement)[keyof typeof UnitOfMeasurement];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitUs = {\n acre: \"ACRE\",\n foot: \"FOOT\",\n square_foot: \"SQUARE_FOOT\",\n cubic_foot: \"CUBIC_FOOT\",\n gallon_liquid: \"GALLON_LIQUID\",\n inch: \"INCH\",\n pound: \"POUND\",\n pound_per_hour: \"POUND_PER_HOUR\",\n pound_per_second: \"POUND_PER_SECOND\",\n mile: \"MILE\",\n mile_per_hour: \"MILE_PER_HOUR\",\n ounce: \"OUNCE\",\n ton_us: \"US_TON\",\n yard: \"YARD\",\n pound_per_square_inch: \"POUND_PER_SQUARE_INCH\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitUsType = (typeof UnitUs)[keyof typeof UnitUs];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitSi = {\n newton: \"NEWTON\",\n pascal: \"PASCAL\",\n kilopascal: \"KILOPASCAL\",\n amperehour: \"AMPERE_HOUR\",\n volt: \"VOLT\",\n watt: \"WATT\",\n bar: \"BAR\",\n centimetre: \"CENTIMETRE\",\n millimetre: \"MILLIMETRE\",\n metre: \"METRE\",\n kilometre: \"KILOMETRE\",\n gram: \"GRAM\",\n kilogram: \"KILOGRAM\",\n kilowatt: \"KILOWATT\",\n kilowatthour: \"KILOWATT_HOUR\",\n kilogram_per_hour: \"KILOGRAM_PER_HOUR\",\n kilogram_per_second: \"KILOGRAM_PER_SECOND\",\n square_kilometre: \"SQUARE_KILOMETRE\",\n kilometre_per_hour: \"KILOMETRE_PER_HOUR\",\n litre: \"LITRE\",\n square_metre: \"SQUARE_METRE\",\n cubic_metre: \"CUBIC_METRE\",\n metre_per_second: \"METRE_PER_SECOND\",\n metre_per_second_squared: \"METRE_PER_SECOND_SQUARED\",\n ton: \"TON\",\n hectare: \"HECTARE\",\n hour: \"HOUR\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitSiType = (typeof UnitSi)[keyof typeof UnitSi];\n\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitOfMeasurementType;\n unitUs?: UnitOfMeasurementType;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport type JSONValue = string | number | boolean | null | { [x: string]: JSONValue } | Array<JSONValue>;\n\nexport interface JsonFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"JSON\";\n}\n\nexport interface MonetaryFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"MONETARY\";\n /**\n * The currency of the monetary field definition - ISO 4217 compliant.\n */\n currency: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"irisAppCustomFields.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCustomFields.ts"],"names":[],"mappings":"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","sourcesContent":["import { TranslationKey, TranslationLanguageKeys } from \"./irisAppExtensionManifest\";\n\nexport declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"STRING_LIST\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\"\n | \"JSON\"\n | \"MONETARY\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\";\n\nexport const ScopeType = {\n /**\n * Values with account scope will be shared within a single account\n */\n ACCOUNT: \"ACCOUNT\",\n /**\n * Values will be shared within a single account (write) and visible to all accounts (read)\n */\n ACCOUNT_WRITE_GLOBAL_READ: \"ACCOUNT_WRITE_GLOBAL_READ\",\n /**\n * Values with global scope will be shared between all accounts with access to the entity.\n */\n GLOBAL: \"GLOBAL\",\n} as const;\nexport type ScopeTypeType = (typeof ScopeType)[keyof typeof ScopeType];\n\n/**\n * Test if the object is a CustomFieldTranslation array.\n */\nexport const isCustomFieldTranslationArray = (\n object: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey }\n): object is CustomFieldTranslationArray => {\n return Array.isArray(object);\n};\n\nexport interface CustomFieldTranslation {\n language: TranslationLanguageKeys;\n title: string;\n description?: string;\n}\n\nexport interface CustomFieldTranslationWithoutEnglish {\n language: Exclude<TranslationLanguageKeys, \"en\">;\n title: string;\n description?: string;\n}\n\nexport type CustomFieldTranslationArray = [\n { language: \"en\"; title: string; description?: string },\n ...Array<CustomFieldTranslationWithoutEnglish>,\n];\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * Who can access the field value. Default is only within the users account.\n */\n scopeType?: ScopeTypeType;\n\n /**\n * The translations for the custom field definition.\n * For Arrays of translations, the list must contain the language \"en\" as the default.\n * Either a list of translations or a single translation object with\n * translation keys it will look for all available languages in src/locales/<languagecode>/translation.json\n */\n translations: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey };\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n}\n\nexport interface StringListFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING_LIST\";\n itemMinimumLength?: number;\n itemMaximumLength?: number;\n pattern?: string;\n maximumItems?: number;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n multiSelect?: boolean;\n allValues?: Array<string>;\n /**\n * Map from old values not in the allValues to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport const UnitOfMeasurement = {\n NEWTON: \"NEWTON\",\n PASCAL: \"PASCAL\",\n KILOPASCAL: \"KILOPASCAL\",\n WATT: \"WATT\",\n BAR: \"BAR\",\n CENTIMETRE: \"CENTIMETRE\",\n MILLIMETRE: \"MILLIMETRE\",\n METRE: \"METRE\",\n KILOMETRE: \"KILOMETRE\",\n GRAM: \"GRAM\",\n KILOGRAM: \"KILOGRAM\",\n VOLT: \"VOLT\",\n AMPERE_HOUR: \"AMPERE_HOUR\",\n KILOWATT: \"KILOWATT\",\n KILOWATT_HOUR: \"KILOWATT_HOUR\",\n KILOGRAM_PER_HOUR: \"KILOGRAM_PER_HOUR\",\n KILOGRAM_PER_SECOND: \"KILOGRAM_PER_SECOND\",\n SQUARE_KILOMETRE: \"SQUARE_KILOMETRE\",\n KILOMETRE_PER_HOUR: \"KILOMETRE_PER_HOUR\",\n LITRE: \"LITRE\",\n SQUARE_METRE: \"SQUARE_METRE\",\n CUBIC_METRE: \"CUBIC_METRE\",\n METRE_PER_SECOND: \"METRE_PER_SECOND\",\n METRE_PER_SECOND_SQUARED: \"METRE_PER_SECOND_SQUARED\",\n METRIC_TON: \"METRIC_TON\",\n ARE: \"ARE\",\n HECTARE: \"HECTARE\",\n YEAR: \"YEAR\",\n MONTH: \"MONTH\",\n DAY: \"DAY\",\n HOUR: \"HOUR\",\n LITRES_PER_HOUR: \"LITRES_PER_HOUR\",\n REVOLUTIONS_PER_MINUTE: \"REVOLUTIONS_PER_MINUTE\",\n VOLT_AMPERE: \"VOLT_AMPERE\",\n G_FORCE: \"G_FORCE\",\n CELSIUS: \"CELSIUS\",\n PERCENT: \"PERCENT\",\n DEGREE_ANGLE: \"DEGREE_ANGLE\",\n MILLISECOND: \"MILLISECOND\",\n SECOND: \"SECOND\",\n MINUTE: \"MINUTE\",\n WEEK: \"WEEK\",\n AMPERE: \"AMPERE\",\n HERTZ: \"HERTZ\",\n ACRE: \"ACRE\",\n FOOT: \"FOOT\",\n SQUARE_FOOT: \"SQUARE_FOOT\",\n CUBIC_FOOT: \"CUBIC_FOOT\",\n GALLON_LIQUID: \"GALLON_LIQUID\",\n INCH: \"INCH\",\n POUND: \"POUND\",\n POUND_PER_HOUR: \"POUND_PER_HOUR\",\n POUND_PER_SECOND: \"POUND_PER_SECOND\",\n MILE: \"MILE\",\n MILE_PER_HOUR: \"MILE_PER_HOUR\",\n OUNCE: \"OUNCE\",\n US_TON: \"US_TON\",\n YARD: \"YARD\",\n POUND_PER_SQUARE_INCH: \"POUND_PER_SQUARE_INCH\",\n INCHES_OF_WATER: \"INCHES_OF_WATER\",\n GALLONS_PER_HOUR: \"GALLONS_PER_HOUR\",\n FAHRENHEIT: \"FAHRENHEIT\",\n} as const;\nexport type UnitOfMeasurementType = (typeof UnitOfMeasurement)[keyof typeof UnitOfMeasurement];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitUs = {\n acre: \"ACRE\",\n foot: \"FOOT\",\n square_foot: \"SQUARE_FOOT\",\n cubic_foot: \"CUBIC_FOOT\",\n gallon_liquid: \"GALLON_LIQUID\",\n inch: \"INCH\",\n pound: \"POUND\",\n pound_per_hour: \"POUND_PER_HOUR\",\n pound_per_second: \"POUND_PER_SECOND\",\n mile: \"MILE\",\n mile_per_hour: \"MILE_PER_HOUR\",\n ounce: \"OUNCE\",\n ton_us: \"US_TON\",\n yard: \"YARD\",\n pound_per_square_inch: \"POUND_PER_SQUARE_INCH\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitUsType = (typeof UnitUs)[keyof typeof UnitUs];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitSi = {\n newton: \"NEWTON\",\n pascal: \"PASCAL\",\n kilopascal: \"KILOPASCAL\",\n amperehour: \"AMPERE_HOUR\",\n volt: \"VOLT\",\n watt: \"WATT\",\n bar: \"BAR\",\n centimetre: \"CENTIMETRE\",\n millimetre: \"MILLIMETRE\",\n metre: \"METRE\",\n kilometre: \"KILOMETRE\",\n gram: \"GRAM\",\n kilogram: \"KILOGRAM\",\n kilowatt: \"KILOWATT\",\n kilowatthour: \"KILOWATT_HOUR\",\n kilogram_per_hour: \"KILOGRAM_PER_HOUR\",\n kilogram_per_second: \"KILOGRAM_PER_SECOND\",\n square_kilometre: \"SQUARE_KILOMETRE\",\n kilometre_per_hour: \"KILOMETRE_PER_HOUR\",\n litre: \"LITRE\",\n square_metre: \"SQUARE_METRE\",\n cubic_metre: \"CUBIC_METRE\",\n metre_per_second: \"METRE_PER_SECOND\",\n metre_per_second_squared: \"METRE_PER_SECOND_SQUARED\",\n ton: \"TON\",\n hectare: \"HECTARE\",\n hour: \"HOUR\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitSiType = (typeof UnitSi)[keyof typeof UnitSi];\n\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitOfMeasurementType;\n unitUs?: UnitOfMeasurementType;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport type JSONValue = string | number | boolean | null | { [x: string]: JSONValue } | Array<JSONValue>;\n\nexport interface JsonFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"JSON\";\n}\n\nexport interface MonetaryFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"MONETARY\";\n /**\n * The currency of the monetary field definition - ISO 4217 compliant.\n */\n currency: string;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { CustomerHomeExtensionManifest } from "./extensions/customerHomeExtensio
|
|
|
5
5
|
import { LifecycleExtensionManifest } from "./extensions/lifecycleExtensionManifest";
|
|
6
6
|
import { ServerlessFunctionExtensionManifest } from "./extensions/serverlessFunctionExtensionManifest";
|
|
7
7
|
import { WidgetExtensionManifest } from "./extensions/widgetExtensionManifest";
|
|
8
|
-
import { BooleanFieldDefinition, DateFieldDefinition, DecimalNumberFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, IntegerNumberFieldDefinition, JsonFieldDefinition, MonetaryFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, WebAddressFieldDefinition } from "./irisAppCustomFields";
|
|
8
|
+
import { BooleanFieldDefinition, DateFieldDefinition, DecimalNumberFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, IntegerNumberFieldDefinition, JsonFieldDefinition, MonetaryFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, StringListFieldDefinition, WebAddressFieldDefinition } from "./irisAppCustomFields";
|
|
9
9
|
import { InstallationConfig, InstallationConfigExcludeAccountIds, InstallationConfigLegacy } from "./irisAppInstallationConfig";
|
|
10
10
|
import { Marketplace, Marketplace_1_0 } from "./irisAppMarketplace";
|
|
11
11
|
import { PermissionsPolicy } from "./permissionsPolicy";
|
|
@@ -72,7 +72,7 @@ export type RequiredOrOptionalScope = {
|
|
|
72
72
|
optional?: boolean;
|
|
73
73
|
};
|
|
74
74
|
export declare type IrisAppExtension = AssetHomeExtensionManifest | IrisAppSettingsExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | SiteHomeExtensionManifest | WidgetExtensionManifest | ReportExtensionManifest | CustomerHomeExtensionManifest | AssetEventsActionsExtensionManifest | LifecycleExtensionManifest | ServerlessFunctionExtensionManifest | AiAgentExtensionManifest;
|
|
75
|
-
export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition | JsonFieldDefinition | MonetaryFieldDefinition;
|
|
75
|
+
export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | StringListFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition | JsonFieldDefinition | MonetaryFieldDefinition;
|
|
76
76
|
/**
|
|
77
77
|
* @deprecated
|
|
78
78
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":"","sourcesContent":["import { CSPDirectives } from \"./cspDirectives\";\nimport {\n AdminExtensionManifest,\n AssetEventsActionsExtensionManifest,\n AssetHomeExtensionManifest,\n FleetExtensionManifest,\n IrisAppSettingsExtensionManifest,\n ReportExtensionManifest,\n SiteHomeExtensionManifest,\n} from \"./extensions\";\nimport { AiAgentExtensionManifest } from \"./extensions/aiAgentExtensionManifest\";\nimport { CustomerHomeExtensionManifest } from \"./extensions/customerHomeExtensionManifest\";\nimport { LifecycleExtensionManifest } from \"./extensions/lifecycleExtensionManifest\";\nimport { ServerlessFunctionExtensionManifest } from \"./extensions/serverlessFunctionExtensionManifest\";\nimport { WidgetExtensionManifest } from \"./extensions/widgetExtensionManifest\";\nimport {\n BooleanFieldDefinition,\n DateFieldDefinition,\n DecimalNumberFieldDefinition,\n DropDownFieldDefinition,\n EmailFieldDefinition,\n IntegerNumberFieldDefinition,\n JsonFieldDefinition,\n MonetaryFieldDefinition,\n PhoneNumberFieldDefinition,\n StringFieldDefinition,\n WebAddressFieldDefinition,\n} from \"./irisAppCustomFields\";\nimport {\n InstallationConfig,\n InstallationConfigExcludeAccountIds,\n InstallationConfigLegacy,\n} from \"./irisAppInstallationConfig\";\nimport { Marketplace, Marketplace_1_0 } from \"./irisAppMarketplace\";\nimport { PermissionsPolicy } from \"./permissionsPolicy\";\nimport { Scope } from \"./scopes\";\n\nexport interface IrisAppManifest\n extends Omit<\n IrisAppManifest_1_0,\n \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\" | \"consentConfig\"\n > {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.1\";\n\n /**\n * Configuration for the installation of the app.\n *\n * Each parameter can be combined to create rules to target specific customers.\n * Each parameter works as a filter to decide if an app is available to a specific customer.\n */\n installation: InstallationConfig | InstallationConfigExcludeAccountIds | InstallationConfigLegacy;\n\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace;\n\n /**\n * Scopes needed in app tokens, these scopes are used from the token - when contacting Trackunits backend.\n */\n scopes?: RequiredOrOptionalScope | Array<RequiredOrOptionalScope>;\n\n /**\n * Configuration of callback to get credentials to call the API after app installation.\n */\n tokenCallback?: {\n url: string;\n };\n\n /**\n * Configuration of the Content Security Policy (CSP) header for the app.\n *\n * We support a subset of the CSP directives. The supported directives are:\n * - [child-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/child-src)\n * - [connect-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src)\n * - [font-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src)\n * - [form-action](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/form-action)\n * - [frame-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-src)\n * - [img-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src)\n * - [media-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/media-src)\n * - [script-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src)\n * - [script-src-attr](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-attr)\n * - [script-src-elem](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-elem)\n * - [style-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src)\n * - [style-src-attr](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-attr)\n * - [style-src-elem](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-elem)\n * - [worker-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src)\n * - [default-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src)\n *\n * More information about CSP can be found [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).\n */\n cspHeader?: Partial<CSPDirectives>;\n\n /**\n * Configuration of the Permissions policy of the app\n *\n * More information about Permissions policies can be found [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy).\n */\n permissionsPolicy?: PermissionsPolicy;\n}\n\nexport type RequiredOrOptionalScope = { scope: Scope; optional?: boolean };\n\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | WidgetExtensionManifest\n | ReportExtensionManifest\n | CustomerHomeExtensionManifest\n | AssetEventsActionsExtensionManifest\n | LifecycleExtensionManifest\n | ServerlessFunctionExtensionManifest\n | AiAgentExtensionManifest;\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition\n | JsonFieldDefinition\n | MonetaryFieldDefinition;\n\n/**\n * @deprecated\n */\nexport interface ConsentConfig {\n /**\n * The application type. Should be one of WEB or BROWSER.\n */\n applicationType: \"WEB\" | \"BROWSER\";\n /**\n * List of scopes required by the application.\n */\n scopes: Array<string>;\n /**\n * List of redirect URIs to be used when returning an authorization code.\n */\n redirectUris?: Array<string>;\n}\n\nexport interface Dependencies {\n [packageName: string]: string;\n}\n\nexport type PublicIrisAppManifest = Omit<IrisAppManifest, \"dependencies\" | \"devDependencies\" | \"installation\"> & {\n /**\n * Relative path for this iris app.\n *\n * @returns {string} the path to the iris app\n */\n irisAppPath: string;\n\n installation: Omit<InstallationConfig, \"accountIds\"> | Omit<InstallationConfigLegacy, \"accountIds\">;\n};\n\n/**\n * @deprecated\n */\nexport interface IrisAppManifest_1_0 {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.0\";\n /**\n * The name of the exposed module from module federation build into the remoteEntry.js.\n * Basically the name of your app including workspace name, automatically parsed from your app-specific package.json.\n */\n moduleFederationName: string;\n\n /**\n * A configuration object for handling scoped token acquisition.\n *\n * @deprecated Use `scopes` instead.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Controls the visibility of your app and how it is installed.\n * The different modes are:\n * - Enabled means its enabled on the subscription when this Iris app is approved.\n * - Visible means it will be visible to the customer to choose for them selves to enable/disable it.\n *\n * - FORCE_ENABLE then it can not be removed by the end customer, and will be installed based on the selected subscription package.\n * - DEFAULT_ENABLE means it will be enabled when a customer activates a new subscription package.\n * - ALWAYS_VISIBLE then it will always be visible for all customers.\n * - CONTROLLED_MANUAL_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, not activating the app.\n * - CONTROLLED_AUTOMATIC_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, also adding.\n *\n * All modes will take into consideration both {@link IrisAppManifest_1_0.validForAccountIds} and {@link IrisAppManifest_1_0.marketplace}.allowForPackage\n *\n * @deprecated Use `installation.policy` instead.\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the app needs to communicate with.\n * The list is audited in the approval step of the app and every external API call\n * must be listed here to get through the verification process.\n * Even if it goes through without being listed, your app will fail to call the endpoint.\n *\n * @deprecated Use `cspHeader` instead\n */\n validDomains?: Array<string>;\n /**\n * Put `ALL_ACCOUNTS` in if your app is available to all users.\n * If you want to only make it available to certain users, provide a list of account ID's as strings.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | Array<string>;\n /**\n * A configuration object for the Marketplace entry.\n * Holds all the settings associated with your apps listing on the marketplace.\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the App.\n * Used for performance optimization and security scans.\n * It is automatically parsed from the package.json in root.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the App.\n * Used for security scans.\n */\n devDependencies: Dependencies;\n\n /**\n * A list of extensions to the UI that this app manifest exposes.\n * Extensions are automatically added when a new extension is generated.\n * The array contains an import of the extension manifest within the extension.\n * If an extension is required in multiple apps, the you must manually add it to the arrays of those apps.\n */\n extensions: Array<IrisAppExtension>;\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: Array<CustomFieldDefinition>;\n}\n\n/**\n * @deprecated\n */\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n"]}
|
|
1
|
+
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":"","sourcesContent":["import { CSPDirectives } from \"./cspDirectives\";\nimport {\n AdminExtensionManifest,\n AssetEventsActionsExtensionManifest,\n AssetHomeExtensionManifest,\n FleetExtensionManifest,\n IrisAppSettingsExtensionManifest,\n ReportExtensionManifest,\n SiteHomeExtensionManifest,\n} from \"./extensions\";\nimport { AiAgentExtensionManifest } from \"./extensions/aiAgentExtensionManifest\";\nimport { CustomerHomeExtensionManifest } from \"./extensions/customerHomeExtensionManifest\";\nimport { LifecycleExtensionManifest } from \"./extensions/lifecycleExtensionManifest\";\nimport { ServerlessFunctionExtensionManifest } from \"./extensions/serverlessFunctionExtensionManifest\";\nimport { WidgetExtensionManifest } from \"./extensions/widgetExtensionManifest\";\nimport {\n BooleanFieldDefinition,\n DateFieldDefinition,\n DecimalNumberFieldDefinition,\n DropDownFieldDefinition,\n EmailFieldDefinition,\n IntegerNumberFieldDefinition,\n JsonFieldDefinition,\n MonetaryFieldDefinition,\n PhoneNumberFieldDefinition,\n StringFieldDefinition,\n StringListFieldDefinition,\n WebAddressFieldDefinition,\n} from \"./irisAppCustomFields\";\nimport {\n InstallationConfig,\n InstallationConfigExcludeAccountIds,\n InstallationConfigLegacy,\n} from \"./irisAppInstallationConfig\";\nimport { Marketplace, Marketplace_1_0 } from \"./irisAppMarketplace\";\nimport { PermissionsPolicy } from \"./permissionsPolicy\";\nimport { Scope } from \"./scopes\";\n\nexport interface IrisAppManifest\n extends Omit<\n IrisAppManifest_1_0,\n \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\" | \"consentConfig\"\n > {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.1\";\n\n /**\n * Configuration for the installation of the app.\n *\n * Each parameter can be combined to create rules to target specific customers.\n * Each parameter works as a filter to decide if an app is available to a specific customer.\n */\n installation: InstallationConfig | InstallationConfigExcludeAccountIds | InstallationConfigLegacy;\n\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace;\n\n /**\n * Scopes needed in app tokens, these scopes are used from the token - when contacting Trackunits backend.\n */\n scopes?: RequiredOrOptionalScope | Array<RequiredOrOptionalScope>;\n\n /**\n * Configuration of callback to get credentials to call the API after app installation.\n */\n tokenCallback?: {\n url: string;\n };\n\n /**\n * Configuration of the Content Security Policy (CSP) header for the app.\n *\n * We support a subset of the CSP directives. The supported directives are:\n * - [child-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/child-src)\n * - [connect-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src)\n * - [font-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src)\n * - [form-action](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/form-action)\n * - [frame-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-src)\n * - [img-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src)\n * - [media-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/media-src)\n * - [script-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src)\n * - [script-src-attr](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-attr)\n * - [script-src-elem](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-elem)\n * - [style-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src)\n * - [style-src-attr](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-attr)\n * - [style-src-elem](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-elem)\n * - [worker-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src)\n * - [default-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src)\n *\n * More information about CSP can be found [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).\n */\n cspHeader?: Partial<CSPDirectives>;\n\n /**\n * Configuration of the Permissions policy of the app\n *\n * More information about Permissions policies can be found [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy).\n */\n permissionsPolicy?: PermissionsPolicy;\n}\n\nexport type RequiredOrOptionalScope = { scope: Scope; optional?: boolean };\n\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | WidgetExtensionManifest\n | ReportExtensionManifest\n | CustomerHomeExtensionManifest\n | AssetEventsActionsExtensionManifest\n | LifecycleExtensionManifest\n | ServerlessFunctionExtensionManifest\n | AiAgentExtensionManifest;\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | StringListFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition\n | JsonFieldDefinition\n | MonetaryFieldDefinition;\n\n/**\n * @deprecated\n */\nexport interface ConsentConfig {\n /**\n * The application type. Should be one of WEB or BROWSER.\n */\n applicationType: \"WEB\" | \"BROWSER\";\n /**\n * List of scopes required by the application.\n */\n scopes: Array<string>;\n /**\n * List of redirect URIs to be used when returning an authorization code.\n */\n redirectUris?: Array<string>;\n}\n\nexport interface Dependencies {\n [packageName: string]: string;\n}\n\nexport type PublicIrisAppManifest = Omit<IrisAppManifest, \"dependencies\" | \"devDependencies\" | \"installation\"> & {\n /**\n * Relative path for this iris app.\n *\n * @returns {string} the path to the iris app\n */\n irisAppPath: string;\n\n installation: Omit<InstallationConfig, \"accountIds\"> | Omit<InstallationConfigLegacy, \"accountIds\">;\n};\n\n/**\n * @deprecated\n */\nexport interface IrisAppManifest_1_0 {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.0\";\n /**\n * The name of the exposed module from module federation build into the remoteEntry.js.\n * Basically the name of your app including workspace name, automatically parsed from your app-specific package.json.\n */\n moduleFederationName: string;\n\n /**\n * A configuration object for handling scoped token acquisition.\n *\n * @deprecated Use `scopes` instead.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Controls the visibility of your app and how it is installed.\n * The different modes are:\n * - Enabled means its enabled on the subscription when this Iris app is approved.\n * - Visible means it will be visible to the customer to choose for them selves to enable/disable it.\n *\n * - FORCE_ENABLE then it can not be removed by the end customer, and will be installed based on the selected subscription package.\n * - DEFAULT_ENABLE means it will be enabled when a customer activates a new subscription package.\n * - ALWAYS_VISIBLE then it will always be visible for all customers.\n * - CONTROLLED_MANUAL_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, not activating the app.\n * - CONTROLLED_AUTOMATIC_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, also adding.\n *\n * All modes will take into consideration both {@link IrisAppManifest_1_0.validForAccountIds} and {@link IrisAppManifest_1_0.marketplace}.allowForPackage\n *\n * @deprecated Use `installation.policy` instead.\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the app needs to communicate with.\n * The list is audited in the approval step of the app and every external API call\n * must be listed here to get through the verification process.\n * Even if it goes through without being listed, your app will fail to call the endpoint.\n *\n * @deprecated Use `cspHeader` instead\n */\n validDomains?: Array<string>;\n /**\n * Put `ALL_ACCOUNTS` in if your app is available to all users.\n * If you want to only make it available to certain users, provide a list of account ID's as strings.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | Array<string>;\n /**\n * A configuration object for the Marketplace entry.\n * Holds all the settings associated with your apps listing on the marketplace.\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the App.\n * Used for performance optimization and security scans.\n * It is automatically parsed from the package.json in root.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the App.\n * Used for security scans.\n */\n devDependencies: Dependencies;\n\n /**\n * A list of extensions to the UI that this app manifest exposes.\n * Extensions are automatically added when a new extension is generated.\n * The array contains an import of the extension manifest within the extension.\n * If an extension is required in multiple apps, the you must manually add it to the arrays of those apps.\n */\n extensions: Array<IrisAppExtension>;\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: Array<CustomFieldDefinition>;\n}\n\n/**\n * @deprecated\n */\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n"]}
|