@amp-labs/react 2.8.7 → 2.9.0
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/build/amp-react.cjs.js +13 -13
- package/build/amp-react.cjs.js.map +1 -1
- package/build/amp-react.es.js +6293 -6274
- package/build/amp-react.es.js.map +1 -1
- package/build/index.d.ts +355 -297
- package/build/style.css +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -88,6 +88,12 @@ declare interface BaseProxyConfig {
|
|
|
88
88
|
* @memberof BaseProxyConfig
|
|
89
89
|
*/
|
|
90
90
|
enabled?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Default is false. If this is set to true, the base URL for the proxy action will be the module's base URL. Otherwise, it is assumed that the base URL is the provider's root base URL.
|
|
93
|
+
* @type {boolean}
|
|
94
|
+
* @memberof BaseProxyConfig
|
|
95
|
+
*/
|
|
96
|
+
useModule?: boolean;
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
/**
|
|
@@ -267,6 +273,12 @@ export declare interface ConfigContent {
|
|
|
267
273
|
* @memberof ConfigContent
|
|
268
274
|
*/
|
|
269
275
|
provider: string;
|
|
276
|
+
/**
|
|
277
|
+
* The SaaS module that we are integrating with.
|
|
278
|
+
* @type {string}
|
|
279
|
+
* @memberof ConfigContent
|
|
280
|
+
*/
|
|
281
|
+
module?: string;
|
|
270
282
|
/**
|
|
271
283
|
*
|
|
272
284
|
* @type {ReadConfig}
|
|
@@ -714,7 +726,7 @@ export declare type FieldMappingEntry = {
|
|
|
714
726
|
};
|
|
715
727
|
|
|
716
728
|
/**
|
|
717
|
-
*
|
|
729
|
+
* Metadata about a field. Please note that different providers have different levels of support for field metadata. Please reach out to support@withampersand.com if need expanded support for a particular provider.
|
|
718
730
|
* @export
|
|
719
731
|
* @interface FieldMetadata
|
|
720
732
|
*/
|
|
@@ -955,6 +967,12 @@ declare interface HydratedIntegration {
|
|
|
955
967
|
* @memberof HydratedIntegration
|
|
956
968
|
*/
|
|
957
969
|
displayName?: string;
|
|
970
|
+
/**
|
|
971
|
+
*
|
|
972
|
+
* @type {string}
|
|
973
|
+
* @memberof HydratedIntegration
|
|
974
|
+
*/
|
|
975
|
+
module?: string;
|
|
958
976
|
/**
|
|
959
977
|
*
|
|
960
978
|
* @type {string}
|
|
@@ -1143,6 +1161,12 @@ declare interface HydratedIntegrationProxy {
|
|
|
1143
1161
|
* @memberof HydratedIntegrationProxy
|
|
1144
1162
|
*/
|
|
1145
1163
|
enabled?: boolean;
|
|
1164
|
+
/**
|
|
1165
|
+
* Default is false. If this is set to true, the base URL for the proxy action will be the module's base URL. Otherwise, it is assumed that the base URL is the provider's root base URL.
|
|
1166
|
+
* @type {boolean}
|
|
1167
|
+
* @memberof HydratedIntegrationProxy
|
|
1168
|
+
*/
|
|
1169
|
+
useModule?: boolean;
|
|
1146
1170
|
}
|
|
1147
1171
|
|
|
1148
1172
|
/**
|
|
@@ -1688,13 +1712,13 @@ declare interface ReadConfigObject {
|
|
|
1688
1712
|
* @type {string}
|
|
1689
1713
|
* @memberof ReadConfigObject
|
|
1690
1714
|
*/
|
|
1691
|
-
schedule
|
|
1715
|
+
schedule?: string;
|
|
1692
1716
|
/**
|
|
1693
1717
|
* The name of the destination that the result should be sent to.
|
|
1694
1718
|
* @type {string}
|
|
1695
1719
|
* @memberof ReadConfigObject
|
|
1696
1720
|
*/
|
|
1697
|
-
destination
|
|
1721
|
+
destination?: string;
|
|
1698
1722
|
/**
|
|
1699
1723
|
* This is a map of field names to booleans indicating whether they should be read. If a field is already included in `selectedFieldMappings`, it does not need to be included here.
|
|
1700
1724
|
* @type {{ [key: string]: boolean; }}
|
|
@@ -1831,6 +1855,12 @@ export declare interface UpdateInstallationConfigContent {
|
|
|
1831
1855
|
* @memberof UpdateInstallationConfigContent
|
|
1832
1856
|
*/
|
|
1833
1857
|
provider?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* The SaaS module that we are integrating with.
|
|
1860
|
+
* @type {string}
|
|
1861
|
+
* @memberof UpdateInstallationConfigContent
|
|
1862
|
+
*/
|
|
1863
|
+
module?: string;
|
|
1834
1864
|
/**
|
|
1835
1865
|
*
|
|
1836
1866
|
* @type {BaseReadConfig}
|
|
@@ -1853,6 +1883,11 @@ export declare interface UpdateInstallationConfigContent {
|
|
|
1853
1883
|
|
|
1854
1884
|
export declare function useAmpersandProviderProps(): AmpersandContextValue;
|
|
1855
1885
|
|
|
1886
|
+
/**
|
|
1887
|
+
* Legacy hook for backwards compatibility (use useLocalConfig instead)
|
|
1888
|
+
* @deprecated
|
|
1889
|
+
* @returns
|
|
1890
|
+
*/
|
|
1856
1891
|
export declare function useConfig(): {
|
|
1857
1892
|
draft: Partial<ConfigContent>;
|
|
1858
1893
|
get: () => Partial<ConfigContent>;
|
|
@@ -1949,297 +1984,320 @@ declare interface UseIsIntegrationInstalledResult {
|
|
|
1949
1984
|
}
|
|
1950
1985
|
|
|
1951
1986
|
/**
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
1954
|
-
*
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
declare
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
declare
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
declare
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
1987
|
+
* useLocalConfig is used to manage a local draft state of the config
|
|
1988
|
+
* It's used to manage the config state with getters, setters, and resetters.
|
|
1989
|
+
* @returns {
|
|
1990
|
+
* draft: InstallationConfigContent;
|
|
1991
|
+
* get: () => InstallationConfigContent;
|
|
1992
|
+
* reset: () => void;
|
|
1993
|
+
* setDraft: (draft: InstallationConfigContent) => void;
|
|
1994
|
+
* readObject: (objectName: string) => BaseReadConfigObject | undefined;
|
|
1995
|
+
* writeObject: (objectName: string) => BaseWriteConfigObject | undefined;
|
|
1996
|
+
* proxy: () => ProxyHandlers;
|
|
1997
|
+
* }
|
|
1998
|
+
*/
|
|
1999
|
+
export declare function useLocalConfig(): {
|
|
2000
|
+
draft: Partial<ConfigContent>;
|
|
2001
|
+
get: () => Partial<ConfigContent>;
|
|
2002
|
+
reset: () => void;
|
|
2003
|
+
setDraft: Dispatch<SetStateAction<Partial<ConfigContent>>>;
|
|
2004
|
+
readObject: (objectName: string) => ReadObjectHandlers;
|
|
2005
|
+
writeObject: (objectName: string) => WriteObjectHandlers;
|
|
2006
|
+
proxy: () => ProxyHandlers;
|
|
2007
|
+
};
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* useManifest retrieves data from `amp.yaml` file, plus the customer's SaaS instance.
|
|
2011
|
+
* @returns Manifest object
|
|
2012
|
+
*
|
|
2013
|
+
* if object is not found, returns null for the object, getRequiredFields, getOptionalFields,
|
|
2014
|
+
* getCustomerFieldsForObject.
|
|
2015
|
+
*
|
|
2016
|
+
*/
|
|
2017
|
+
export declare function useManifest(): {
|
|
2018
|
+
isPending: boolean;
|
|
2019
|
+
isFetching: boolean;
|
|
2020
|
+
isError: boolean;
|
|
2021
|
+
isSuccess: boolean;
|
|
2022
|
+
error: Error | null;
|
|
2023
|
+
getReadObject: (objectName: string) => {
|
|
2024
|
+
object: HydratedIntegrationObject | null;
|
|
2025
|
+
getRequiredFields: () => HydratedIntegrationField[] | null;
|
|
2026
|
+
getOptionalFields: () => HydratedIntegrationField[] | null;
|
|
2027
|
+
};
|
|
2028
|
+
getWriteObject: (objectName: string) => {
|
|
2029
|
+
object: HydratedIntegrationWriteObject | null;
|
|
2030
|
+
};
|
|
2031
|
+
getCustomerFieldsForObject: (objectName: string) => {
|
|
2032
|
+
allFields: {
|
|
2033
|
+
[key: string]: FieldMetadata;
|
|
2034
|
+
} | null;
|
|
2035
|
+
getField: (field: string) => FieldMetadata | null;
|
|
2036
|
+
};
|
|
2037
|
+
data: HydratedRevision | undefined;
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* update installation hook
|
|
2042
|
+
* @returns {Object} An object containing:
|
|
2043
|
+
* - `updateInstallation` (function): A function to update the installation.
|
|
2044
|
+
* - `isIdle` (boolean): Whether the mutation is idle.
|
|
2045
|
+
* - `isPending` (boolean): Whether the mutation is pending.
|
|
2046
|
+
* - `error` (Error | null): The error object, if any.
|
|
2047
|
+
* - `errorMsg` (string | null): The error message, if any.
|
|
2048
|
+
*/
|
|
2049
|
+
export declare function useUpdateInstallation(): {
|
|
2050
|
+
updateInstallation: ({ config, onSuccess, onError, onSettled, }: {
|
|
2051
|
+
config: InstallationConfigContent;
|
|
2052
|
+
onSuccess?: (data: Installation) => void;
|
|
2053
|
+
onError?: (error: Error) => void;
|
|
2054
|
+
onSettled?: () => void;
|
|
2055
|
+
}) => void;
|
|
2056
|
+
isIdle: boolean;
|
|
2057
|
+
isPending: boolean;
|
|
2058
|
+
error: Error | null;
|
|
2059
|
+
errorMsg: string | null;
|
|
2060
|
+
};
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* @type ValueDefault
|
|
2064
|
+
*
|
|
2065
|
+
* @export
|
|
2066
|
+
*/
|
|
2067
|
+
declare type ValueDefault = ValueDefaultBoolean | ValueDefaultInteger | ValueDefaultString;
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* Ampersand public API
|
|
2071
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2072
|
+
*
|
|
2073
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2074
|
+
*
|
|
2075
|
+
*
|
|
2076
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2077
|
+
* https://openapi-generator.tech
|
|
2078
|
+
* Do not edit the class manually.
|
|
2079
|
+
*/
|
|
2080
|
+
/**
|
|
2081
|
+
*
|
|
2082
|
+
* @export
|
|
2083
|
+
* @interface ValueDefaultBoolean
|
|
2084
|
+
*/
|
|
2085
|
+
declare interface ValueDefaultBoolean {
|
|
2086
|
+
/**
|
|
2087
|
+
* The value to be used as a default.
|
|
2088
|
+
* @type {boolean}
|
|
2089
|
+
* @memberof ValueDefaultBoolean
|
|
2090
|
+
*/
|
|
2091
|
+
value: boolean;
|
|
2092
|
+
/**
|
|
2093
|
+
* Whether the default value should be applied when updating a record.
|
|
2094
|
+
* If set to `always`, the default value will be applied when updating a record.
|
|
2095
|
+
* If set to `never`, the default value will not be applied when updating a record,
|
|
2096
|
+
* only when creating a record.
|
|
2097
|
+
* If unspecified, then `always` is assumed.
|
|
2098
|
+
* @type {string}
|
|
2099
|
+
* @memberof ValueDefaultBoolean
|
|
2100
|
+
*/
|
|
2101
|
+
applyOnUpdate?: ValueDefaultBooleanApplyOnUpdateEnum;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
/**
|
|
2105
|
+
* @export
|
|
2106
|
+
*/
|
|
2107
|
+
declare const ValueDefaultBooleanApplyOnUpdateEnum: {
|
|
2108
|
+
readonly Always: "always";
|
|
2109
|
+
readonly Never: "never";
|
|
2110
|
+
};
|
|
2111
|
+
|
|
2112
|
+
declare type ValueDefaultBooleanApplyOnUpdateEnum = typeof ValueDefaultBooleanApplyOnUpdateEnum[keyof typeof ValueDefaultBooleanApplyOnUpdateEnum];
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* Ampersand public API
|
|
2116
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2117
|
+
*
|
|
2118
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2119
|
+
*
|
|
2120
|
+
*
|
|
2121
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2122
|
+
* https://openapi-generator.tech
|
|
2123
|
+
* Do not edit the class manually.
|
|
2124
|
+
*/
|
|
2125
|
+
/**
|
|
2126
|
+
*
|
|
2127
|
+
* @export
|
|
2128
|
+
* @interface ValueDefaultInteger
|
|
2129
|
+
*/
|
|
2130
|
+
declare interface ValueDefaultInteger {
|
|
2131
|
+
/**
|
|
2132
|
+
* The value to be used as a default.
|
|
2133
|
+
* @type {number}
|
|
2134
|
+
* @memberof ValueDefaultInteger
|
|
2135
|
+
*/
|
|
2136
|
+
value: number;
|
|
2137
|
+
/**
|
|
2138
|
+
* Whether the default value should be applied when updating a record.
|
|
2139
|
+
* If set to `always`, the default value will be applied when updating a record.
|
|
2140
|
+
* If set to `never`, the default value will not be applied when updating a record,
|
|
2141
|
+
* only when creating a record.
|
|
2142
|
+
* If unspecified, then `always` is assumed.
|
|
2143
|
+
* @type {string}
|
|
2144
|
+
* @memberof ValueDefaultInteger
|
|
2145
|
+
*/
|
|
2146
|
+
applyOnUpdate?: ValueDefaultIntegerApplyOnUpdateEnum;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* @export
|
|
2151
|
+
*/
|
|
2152
|
+
declare const ValueDefaultIntegerApplyOnUpdateEnum: {
|
|
2153
|
+
readonly Always: "always";
|
|
2154
|
+
readonly Never: "never";
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
declare type ValueDefaultIntegerApplyOnUpdateEnum = typeof ValueDefaultIntegerApplyOnUpdateEnum[keyof typeof ValueDefaultIntegerApplyOnUpdateEnum];
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* Ampersand public API
|
|
2161
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2162
|
+
*
|
|
2163
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2164
|
+
*
|
|
2165
|
+
*
|
|
2166
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2167
|
+
* https://openapi-generator.tech
|
|
2168
|
+
* Do not edit the class manually.
|
|
2169
|
+
*/
|
|
2170
|
+
/**
|
|
2171
|
+
* Configuration to set default write values for object fields.
|
|
2172
|
+
* @export
|
|
2173
|
+
* @interface ValueDefaults
|
|
2174
|
+
*/
|
|
2175
|
+
declare interface ValueDefaults {
|
|
2176
|
+
/**
|
|
2177
|
+
* If true, users can set default values for any field.
|
|
2178
|
+
* @type {boolean}
|
|
2179
|
+
* @memberof ValueDefaults
|
|
2180
|
+
*/
|
|
2181
|
+
allowAnyFields?: boolean;
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
/**
|
|
2185
|
+
* Ampersand public API
|
|
2186
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2187
|
+
*
|
|
2188
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2189
|
+
*
|
|
2190
|
+
*
|
|
2191
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2192
|
+
* https://openapi-generator.tech
|
|
2193
|
+
* Do not edit the class manually.
|
|
2194
|
+
*/
|
|
2195
|
+
/**
|
|
2196
|
+
*
|
|
2197
|
+
* @export
|
|
2198
|
+
* @interface ValueDefaultString
|
|
2199
|
+
*/
|
|
2200
|
+
declare interface ValueDefaultString {
|
|
2201
|
+
/**
|
|
2202
|
+
* The value to be used as a default.
|
|
2203
|
+
* @type {string}
|
|
2204
|
+
* @memberof ValueDefaultString
|
|
2205
|
+
*/
|
|
2206
|
+
value: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Whether the default value should be applied when updating a record.
|
|
2209
|
+
* If set to `always`, the default value will be applied when updating a record.
|
|
2210
|
+
* If set to `never`, the default value will not be applied when updating a record,
|
|
2211
|
+
* only when creating a record.
|
|
2212
|
+
* If unspecified, then `always` is assumed.
|
|
2213
|
+
* @type {string}
|
|
2214
|
+
* @memberof ValueDefaultString
|
|
2215
|
+
*/
|
|
2216
|
+
applyOnUpdate?: ValueDefaultStringApplyOnUpdateEnum;
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
/**
|
|
2220
|
+
* @export
|
|
2221
|
+
*/
|
|
2222
|
+
declare const ValueDefaultStringApplyOnUpdateEnum: {
|
|
2223
|
+
readonly Always: "always";
|
|
2224
|
+
readonly Never: "never";
|
|
2225
|
+
};
|
|
2226
|
+
|
|
2227
|
+
declare type ValueDefaultStringApplyOnUpdateEnum = typeof ValueDefaultStringApplyOnUpdateEnum[keyof typeof ValueDefaultStringApplyOnUpdateEnum];
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
*
|
|
2231
|
+
* @export
|
|
2232
|
+
* @interface WriteConfig
|
|
2233
|
+
*/
|
|
2234
|
+
declare interface WriteConfig {
|
|
2235
|
+
/**
|
|
2236
|
+
*
|
|
2237
|
+
* @type {{ [key: string]: WriteConfigObject; }}
|
|
2238
|
+
* @memberof WriteConfig
|
|
2239
|
+
*/
|
|
2240
|
+
objects?: {
|
|
2241
|
+
[key: string]: WriteConfigObject;
|
|
2242
|
+
};
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
*
|
|
2247
|
+
* @export
|
|
2248
|
+
* @interface WriteConfigObject
|
|
2249
|
+
*/
|
|
2250
|
+
declare interface WriteConfigObject {
|
|
2251
|
+
/**
|
|
2252
|
+
* The name of the object to write to.
|
|
2253
|
+
* @type {string}
|
|
2254
|
+
* @memberof WriteConfigObject
|
|
2255
|
+
*/
|
|
2256
|
+
objectName: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* This is a map of field names to default values. These values will be used when writing to the object.
|
|
2259
|
+
* @type {{ [key: string]: ValueDefault; }}
|
|
2260
|
+
* @memberof WriteConfigObject
|
|
2261
|
+
* @deprecated
|
|
2262
|
+
*/
|
|
2263
|
+
selectedValueDefaults?: {
|
|
2264
|
+
[key: string]: ValueDefault;
|
|
2265
|
+
};
|
|
2266
|
+
/**
|
|
2267
|
+
* This is a map of field names to their settings.
|
|
2268
|
+
* @type {{ [key: string]: FieldSetting; }}
|
|
2269
|
+
* @memberof WriteConfigObject
|
|
2270
|
+
*/
|
|
2271
|
+
selectedFieldSettings?: {
|
|
2272
|
+
[key: string]: FieldSetting;
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
export declare type WriteObjectHandlers = {
|
|
2277
|
+
object: BaseWriteConfigObject | undefined;
|
|
2278
|
+
setEnableWrite: () => void;
|
|
2279
|
+
setDisableWrite: () => void;
|
|
2280
|
+
getWriteObject: () => BaseWriteConfigObject | undefined;
|
|
2281
|
+
getSelectedFieldSettings: (fieldName: string) => FieldSetting | undefined;
|
|
2282
|
+
setSelectedFieldSettings: (params: {
|
|
2283
|
+
fieldName: string;
|
|
2284
|
+
settings: FieldSetting;
|
|
2285
|
+
}) => void;
|
|
2286
|
+
getDefaultValues: (fieldName: string) => FieldSettingDefault | undefined;
|
|
2287
|
+
setDefaultValues: (params: {
|
|
2288
|
+
fieldName: string;
|
|
2289
|
+
value: FieldSettingDefault;
|
|
2290
|
+
}) => void;
|
|
2291
|
+
getWriteOnCreateSetting: (fieldName: string) => FieldSettingWriteOnCreateEnum | undefined;
|
|
2292
|
+
setWriteOnCreateSetting: (params: {
|
|
2293
|
+
fieldName: string;
|
|
2294
|
+
value: FieldSettingWriteOnCreateEnum;
|
|
2295
|
+
}) => void;
|
|
2296
|
+
getWriteOnUpdateSetting: (fieldName: string) => FieldSettingWriteOnUpdateEnum | undefined;
|
|
2297
|
+
setWriteOnUpdateSetting: (params: {
|
|
2298
|
+
fieldName: string;
|
|
2299
|
+
value: FieldSettingWriteOnUpdateEnum;
|
|
2300
|
+
}) => void;
|
|
2301
|
+
};
|
|
2302
|
+
|
|
2303
|
+
export { }
|