@hitc/netsuite-types 2022.2.8 → 2022.2.9
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/N/task.d.ts +113 -1
- package/package.json +1 -1
package/N/task.d.ts
CHANGED
|
@@ -11,8 +11,103 @@ type TaskCreateOptions =
|
|
|
11
11
|
| MapReduceScriptTaskCreateOptions
|
|
12
12
|
| ScheduledScriptTaskCreateOptions
|
|
13
13
|
| WorkflowTriggerTaskCreateOptions
|
|
14
|
+
| QueryTaskCreateOptions
|
|
15
|
+
| RecordActionTaskCreateOptions
|
|
16
|
+
| SuiteQLTaskCreateOptions
|
|
14
17
|
| SearchTaskCreateOptions;
|
|
15
18
|
|
|
19
|
+
interface RecordActionTaskCreateOptions {
|
|
20
|
+
taskType: TaskType.RECORD_ACTION
|
|
21
|
+
action: string;
|
|
22
|
+
condition: ActionCondition;
|
|
23
|
+
params: {}[];
|
|
24
|
+
recordType: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface RecordActionTaskStatus {
|
|
28
|
+
readonly complete: number;
|
|
29
|
+
readonly errors: {};
|
|
30
|
+
readonly failed: number;
|
|
31
|
+
readonly pending: number;
|
|
32
|
+
readonly results: {};
|
|
33
|
+
readonly status: string;
|
|
34
|
+
readonly succeeded: number;
|
|
35
|
+
readonly taskId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The properties of a record action task. Use the methods and properties for this object to submit a record action task into the task queue and to execute it asynchronously. */
|
|
39
|
+
interface RecordActionTask {
|
|
40
|
+
/** Submits a record action task script deployment for processing and returns its task ID. */
|
|
41
|
+
submit(): string;
|
|
42
|
+
action: string;
|
|
43
|
+
condition: ActionCondition;
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* Property of type function that takes record ID and returns the parameter object for the specified record ID. Is to be used in conjunction with task.ActionCondition.
|
|
47
|
+
* This parameter cannot be specified when RecordActionTask.params is specified.
|
|
48
|
+
*/
|
|
49
|
+
paramCallback?(taskId: string): {};
|
|
50
|
+
/**
|
|
51
|
+
* An array of parameter objects. Each object corresponds to one record ID of the record for which the action is to be executed.
|
|
52
|
+
* The object has the following form: {recordId: 1, someParam: 'example1', otherParam: 'example2'}
|
|
53
|
+
*/
|
|
54
|
+
params: {}[];
|
|
55
|
+
recordType: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface AddInboundDependencyOptions {
|
|
59
|
+
/** The script ID of the scheduled script record or map/reduce script record for the dependent task. */
|
|
60
|
+
scriptId: string;
|
|
61
|
+
/** The type of dependent task. This property uses one of the following values in the task.TaskType enum. */
|
|
62
|
+
taskType: string;
|
|
63
|
+
/** The script ID of the script deployment record for the dependent task. */
|
|
64
|
+
deploymentId?: string;
|
|
65
|
+
/** The parameters for the scheduled script or map/reduce script. */
|
|
66
|
+
params?: {}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface SuiteQLTaskCreateOptions {
|
|
70
|
+
taskType: TaskType.SUITE_QL;
|
|
71
|
+
/** The internal ID of the CSV file to export search results to. */
|
|
72
|
+
fileId?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The path of the CSV file to export search results to.
|
|
75
|
+
* This parameter is mutually exclusive with the options.fileId parameter. If you specify values for both parameters, an error occurs.
|
|
76
|
+
*/
|
|
77
|
+
filePath?: string;
|
|
78
|
+
params?: (string|boolean|number)[];
|
|
79
|
+
query?: Query|string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** The status of an asynchronous SuiteQL task (task.SuiteQLTask) in the NetSuite task queue. */
|
|
83
|
+
interface SuiteQLTaskStatus {
|
|
84
|
+
readonly fileId: number;
|
|
85
|
+
params: (string|boolean|number)[];
|
|
86
|
+
readonly query: string;
|
|
87
|
+
readonly status: string;
|
|
88
|
+
readonly taskId: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface SuiteQLTask {
|
|
92
|
+
/** Submits the SuiteQL task for asynchronous processing. */
|
|
93
|
+
submit(): string;
|
|
94
|
+
/** Adds a scheduled script task or map/reduce script task as a dependent task to the SuiteQL task. */
|
|
95
|
+
addInboundDependency(dependency: ScheduledScriptTask | MapReduceScriptTask | { taskType: TaskType, scriptId: string, deploymentId?: string, params?: {} } ): void;
|
|
96
|
+
query: string;
|
|
97
|
+
fileId: number;
|
|
98
|
+
filePath: string;
|
|
99
|
+
/**
|
|
100
|
+
* Key-value pairs that contain information about the dependent tasks added to the SuiteQL task.
|
|
101
|
+
* Use this property to verify the properties of dependent tasks after you add the tasks using SuiteQLTask.addInboundDependency(options).
|
|
102
|
+
* This property uses nested objects to store information about each dependent task.
|
|
103
|
+
* A nested object is included for each dependent task added to the SuiteQL task, and these objects are referenced by their index (starting at 0).
|
|
104
|
+
* Dependent tasks are indexed in the order they are added to the SuiteQL task.
|
|
105
|
+
* Each nested object contains the task type, script ID, script deployment ID, and script parameters.
|
|
106
|
+
*/
|
|
107
|
+
readonly inboundDependencies: {}[];
|
|
108
|
+
/** Parameters for the SuiteQL query. */
|
|
109
|
+
params: (string|boolean|number)[];
|
|
110
|
+
}
|
|
16
111
|
|
|
17
112
|
interface SearchTaskCreateOptions {
|
|
18
113
|
taskType: TaskType.SEARCH
|
|
@@ -28,6 +123,13 @@ interface QueryTaskCreateOptions {
|
|
|
28
123
|
filePath?: string;
|
|
29
124
|
}
|
|
30
125
|
|
|
126
|
+
interface QueryTaskStatus {
|
|
127
|
+
readonly fileId: number;
|
|
128
|
+
readonly query: string;
|
|
129
|
+
readonly status: string;
|
|
130
|
+
readonly taskId: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
31
133
|
interface QueryTask {
|
|
32
134
|
submit(): string;
|
|
33
135
|
addInboundDependency(dependency: ScheduledScriptTask | MapReduceScriptTask): void;
|
|
@@ -187,7 +289,15 @@ export function create(options: ScheduledScriptTaskCreateOptions): ScheduledScri
|
|
|
187
289
|
export function create(options: WorkflowTriggerTaskCreateOptions): WorkflowTriggerTask;
|
|
188
290
|
export function create(options: SearchTaskCreateOptions): SearchTask;
|
|
189
291
|
export function create(options: QueryTaskCreateOptions): QueryTask;
|
|
190
|
-
export function
|
|
292
|
+
export function create(options: RecordActionTaskCreateOptions): RecordActionTask;
|
|
293
|
+
export function create(options: SuiteQLTaskCreateOptions): SuiteQLTask;
|
|
294
|
+
export function checkStatus(options: CheckStatusOptions): ScheduledScriptTaskStatus | MapReduceScriptTaskStatus | CsvImportTaskStatus | EntityDeduplicationTaskStatus | WorkflowTriggerTaskStatus | SuiteQLTaskStatus | QueryTaskStatus | RecordActionTaskStatus;
|
|
295
|
+
|
|
296
|
+
/** Holds the string values for the possible record action conditions. */
|
|
297
|
+
declare enum ActionCondition {
|
|
298
|
+
ALL_QUALIFIED_INSTANCES
|
|
299
|
+
}
|
|
300
|
+
|
|
191
301
|
export enum DedupeEntityType {
|
|
192
302
|
CUSTOMER,
|
|
193
303
|
CONTACT,
|
|
@@ -228,5 +338,7 @@ export enum TaskType {
|
|
|
228
338
|
ENTITY_DEDUPLICATION = "ENTITY_DEDUPLICATION",
|
|
229
339
|
WORKFLOW_TRIGGER = "WORKFLOW_TRIGGER",
|
|
230
340
|
SEARCH = "SEARCH",
|
|
341
|
+
RECORD_ACTION = "RECORD_ACTION",
|
|
342
|
+
SUITE_QL = "SUITE_QL",
|
|
231
343
|
QUERY = "QUERY"
|
|
232
344
|
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"posttest": "npm run cleanup"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://github.com/headintheclouddev/typings-suitescript-2.0",
|
|
11
|
-
"version": "2022.2.
|
|
11
|
+
"version": "2022.2.9",
|
|
12
12
|
"author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|