-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathAlteryxDesigner.d.ts
312 lines (267 loc) · 10.8 KB
/
AlteryxDesigner.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
// ToDo: Renderer (and associated Manager functions)
// ToDo: FormulaData
// ToDo: DataItemContainer
// ToDo: LayoutData
// ToDo: GridData
// ToDo: SalesforceGridData
// ToDo: SimpleGraph
// ToDo: SimpleGraphData
// ToDo: SimpleLineGraph
declare module Alteryx {
export type FieldType = "Blob" | "Bool" | "Byte" | "Int16" | "Int32" | "Int64" | "FixedDecimal" | "Float" | "Double" | "String" | "WString" | "V_String" | "V_WString" | "Date" | "Time" | "DateTime" | "SpatialObj" | "Unknown"
export class FieldInfo {
constructor(_name: string, _type: FieldType, _size: number, _scale: number, _source: string, _desc: string)
strName: string
strType: FieldType
nSize: number
nScale: number
strSource: string
strDescription: string
GetFullSize(): string
}
export class FieldInfoUnknown extends FieldInfo {
constructor(_name: string)
}
export class FieldInfoManual extends FieldInfo {
constructor(_name: string, _type: FieldType, _size: number, _scale: number, _source: string, _desc: string)
}
export class DW2FieldType {
static IsBool(FieldType): boolean
static IsNumeric(FieldType): boolean
static IsString(FieldType): boolean
static IsFloat(FieldType): boolean
static IsInteger(FieldType): boolean
static IsStringOrDate(FieldType): boolean
static IsDateOrTime(FieldType): boolean
static IsDate(FieldType): boolean
static IsBinary(FieldType): boolean
static IsSpatialObj(FieldType): boolean
static GetDefaultSize(FieldType): number
}
export class FieldList {
constructor(eRecordInfo?: any, connectionName?: string)
_GetFields(): FieldInfo[]
AddField(fi: FieldInfo, isAddFieldOption?: boolean): void
CombineFields(fieldList: FieldList): void
SelectFieldTypes_All(fi: FieldInfo): boolean
SelectFieldTypes_NoBinary(fi: FieldInfo): boolean
SelectFieldTypes_NoBlob(fi: FieldInfo): boolean
SelectFieldTypes_NoSpatial(fi: FieldInfo): boolean
SelectFieldTypes_String(fi: FieldInfo): boolean
SelectFieldTypes_Date(fi: FieldInfo): boolean
SelectFieldTypes_DateOrTime(fi: FieldInfo): boolean
SelectFieldTypes_StringOrDate(fi: FieldInfo): boolean
SelectFieldTypes_Numeric(fi: FieldInfo): boolean
SelectFieldTypes_SpatialObj(fi: FieldInfo): boolean
SelectFieldTypes_Bool(fi: FieldInfo): boolean
SelectFieldTypes_Time(fi: FieldInfo): boolean
SelectFieldTypes_Blob(fi: FieldInfo): boolean
GetField(strName: string, bForce: boolean, bThrowException?: boolean, isAddFieldOption?: boolean): FieldInfo
GetFieldList_All(): FieldInfo[]
GetFieldList_NoBinary(): FieldInfo[]
GetFieldList_NoBlob(): FieldInfo[]
GetFieldList_NoSpatial(): FieldInfo[]
GetFieldList_String(): FieldInfo[]
GetFieldList_Numeric(): FieldInfo[]
GetFieldList_SpatialObj(): FieldInfo[]
}
export class FieldListArray {
constructor(eRecordInfo?: any)
Count: number
Get(nInput: number, nIndex?: number): FieldList | undefined
GetCopy(nInput: number, nIndex?: number): FieldList | undefined
GetCountMultiInputs(nInput: number): number
GetMultiInputs(nInput: number): FieldList
}
export class Manager {
constructor(incomingMetaInfo: any, renderer: any)
GetMetaInfo(input: number[]): FieldListArray | FieldList | undefined
GetMetaInfoCopy(input: number[]): FieldListArray | FieldList | undefined
CreateField(name: string, type: FieldType, size?: number, scale?: number, source?: string, desc?: string): FieldInfoManual
GetDataItems(): AlteryxDataItems.DataItem[]
GetDataItem(id: string): AlteryxDataItems.DataItem
GetDataItemByDataName(name: string): AlteryxDataItems.DataItem
AddDataItem(item: AlteryxDataItems.DataItem): void
RemoveDataItem(item: AlteryxDataItems.DataItem): void
RemoveDataItemByDataName(dataName: string): void
toolId: number
toolName: string
macroMode: boolean
isFirstConfig: boolean
}
export const AlteryxVersion: string
export const SDKVersion: string
export const Platform: string
export const LibDir: string
interface recentAndSavedExpressions {
recentExpressions: string[]
savedExpressions: string[]
}
interface beforeGetConfiguration {
Annotation?: string
Configuration: any
}
interface AlteryxGui {
manager: Manager
renderer: any
// Not sure any of these need exposing
Initialize(config: any): any
GetConfiguration(): void
SetConfiguration(args: any): any
AttachObserver(): void
// Needs to be set up (see Formula.tsx data type)
getRecentAndSavedExpressions: () => void
setRecentAndSavedExpressions: (expressions: recentAndSavedExpressions) => void
// Plug In Methods
BeforeLoad?: (manager: Manager, dataItems: AlteryxDataItemsModules, json: any) => void
AfterLoad?: (manager: Manager, dataItems: AlteryxDataItemsModule) => void
BeforeGetConfiguration?: (json: beforeGetConfiguration) => any
Annotation?: (manager: Manager) => string
}
export function JsEvent(jsonObject: string): void
export const Gui: AlteryxGui
export class AlteryxDataItemsModule {
DataItem: typeof AlteryxDataItems.DataItem
SimpleBool: typeof AlteryxDataItems.SimpleBool
SimpleString: typeof AlteryxDataItems.SimpleString
SimpleInt: typeof AlteryxDataItems.SimpleInt
SimpleFloat: typeof AlteryxDataItems.SimpleFloat
SimpleDate: typeof AlteryxDataItems.SimpleDate
SimpleTime: typeof AlteryxDataItems.SimpleTime
SimpleDateTime: typeof AlteryxDataItems.SimpleDateTime
StringSelector: typeof AlteryxDataItems.StringSelector
MultiStringSelector: typeof AlteryxDataItems.MultiStringSelector
FieldSelector: typeof AlteryxDataItems.FieldSelector
FieldSelectorMulti: typeof AlteryxDataItems.FieldSelectorMulti
FileBrowseData: typeof AlteryxDataItems.FileBrowseData
}
}
declare module AlteryxDataItems {
interface DataItemArgs {
dataname: string
id: string
}
interface SimpleBoolArgs extends DataItemArgs {
ischecked?: boolean
}
interface SimpleNumberArgs extends DataItemArgs {
initialValue?: number
}
interface MultiStringArgs extends DataItemArgs {
delimeter: string
}
interface SimpleStringArgs extends DataItemArgs {
initialValue?: string
password?: 'true' | 'false'
isEncrypted?: boolean
}
interface FileBrowseArgs extends DataItemArgs {
browseType: 'File' | 'Folder'
isWorkflowDependency: boolean
}
interface FieldSelectorArgs extends DataItemArgs {
inputNumber: number
connectionNumber: number
includenone: "True" | "False"
fieldtype: "All" | "NoBinary" | "NoBlob" | "NoSpatial" | "String" | "Date" | "DateOrTime" | "StringOrDate" | "Numeric" | "SpatialObj" | "Bool" | "Time" | "Blob"
onChangeHandler: (dataItem: DataItem, isNewField: boolean) => void
customFields?: string[]
}
interface FieldSelectorMultiArgs extends FieldSelectorArgs {
delimeter: string
}
export class DataItem {
constructor(dataname: string, id: string)
dataName: string
id: string
suppressed: boolean
getValue(): any
setValue(newValue: any, updateWidgetUI?: boolean): void
SetDependency(id: string, dataItem: DataItem): void
GetDependency(id: string): DataItem
BindDataChanged(func: (newValue: any) => void): void
BindUserDataChanged(func: (newValue: any) => void): void
StringToBoolean(input: string): boolean
BooleanToString(input: boolean): string
}
export class SimpleBool extends DataItem {
constructor(args: SimpleBoolArgs)
getValue(): boolean
setValue(newValue: boolean, updateWidgetUI?: boolean): void
}
export class SimpleString extends DataItem {
constructor(args: SimpleStringArgs)
getValue(): string
setValue(newValue: string | null | undefined, updateWidgetUI?: boolean): void
}
export class SimpleInt extends DataItem {
constructor(args: SimpleNumberArgs)
getValue(): number
setValue(newValue: string | number, updateWidgetUI?: boolean): void
}
export class SimpleFloat extends DataItem {
constructor(args: SimpleNumberArgs)
getValue(): number
setValue(newValue: string | number, updateWidgetUI?: boolean): void
}
export class SimpleDate extends DataItem {
constructor(args: DataItemArgs)
dateFormat?: string
getValue(): string
setValue(newValue: number | string, updateWidgetUI?: boolean): void
}
export class SimpleTime extends DataItem {
constructor(args: DataItemArgs)
timeFormat?: string
getValue(): string
setValue(newValue: number | string, updateWidgetUI?: boolean): void
}
export class SimpleDateTime extends DataItem {
constructor(args: DataItemArgs)
dateFormat?: string
timeFormat?: string
dateTimeFormat?: string
getValue(): string
setValue(newValue: number | string, updateWidgetUI?: boolean): void
}
interface EnumStringValue {
dataname: string
uiobject?: string
default?: boolean
}
export class StringSelector extends DataItem {
constructor(args: DataItemArgs)
StringListChanged: (newStringList: EnumStringValue[]) => void[]
setStringList(newStringList: EnumStringValue[], updateWidgetUI?: boolean): void
FieldExists(fieldName: string): boolean
setValue(newValue: string | null | undefined, updateWidgetUI?: boolean): void
}
export class MultiStringSelector extends StringSelector {
constructor(args: MultiStringArgs)
setValue(newValue: string[] | string | null | undefined, updateWidgetUI?: boolean): void
}
export class FileBrowseData extends DataItem {
constructor(args: FileBrowseArgs)
setValue(newValue: number | string, updateWidgetUI?: boolean): void
}
export class FieldSelector extends DataItem {
constructor(args: FieldSelectorArgs, manager: Alteryx.Manager)
GetFieldList(): Alteryx.FieldList
FieldExists(fieldName: string): boolean
GetFieldStatus(fieldName: string): '' | ' (Missing)' | ' (Bad Field Type)'
ChangeFieldList(fieldList: Alteryx.FieldList, bRemoveForcedFields?: boolean): void
ChangeFieldFilter(fieldFilter: (fi: Alteryx.FieldInfo) => boolean, bRemoveForcedFields?: boolean): void
ForceFieldInList(field: Alteryx.FieldInfo): void
IsForcedField(fieldName: string): boolean
setValue(newValue: string | null | undefined, updateWidgetUI?: boolean, isAddFieldOption?: boolean): void
}
export class FieldSelectorMulti extends DataItem {
constructor(args: FieldSelectorMultiArgs, manager: Alteryx.Manager)
GetFieldList(): Alteryx.FieldList
GetFieldStatus(fieldName: string): '' | ' (Missing)' | ' (Bad Field Type)'
ChangeFieldList(fieldList: Alteryx.FieldList, bRemoveForcedFields?: boolean): void
ChangeFieldFilter(fieldFilter: (fi: Alteryx.FieldInfo) => boolean, bRemoveForcedFields?: boolean): void
ForceFieldInList(field: Alteryx.FieldInfo): void
setValue(newValue: string[] | string | null | undefined, updateWidgetUI?: boolean, isAddFieldOption?: boolean): void
}
}