@hitc/netsuite-types 2022.2.8 → 2022.2.10
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/SuiteGL.d.ts +4 -1
- package/SuiteScriptV1.d.ts +2 -2
- 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/SuiteGL.d.ts
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* AccountingBook object represents a different accounting book each time the plug-in implementation executes.
|
|
6
6
|
*/
|
|
7
7
|
interface AccountingBook {
|
|
8
|
-
|
|
8
|
+
/** Returns the internal NetSuite ID for the accounting book to be passed to a Custom GL Lines plug-in implementation. */
|
|
9
|
+
getId(): number;
|
|
10
|
+
/** Returns true if the book object is the primary accounting book for the NetSuite account or returns false if the accounting book is a secondary accounting book. */
|
|
11
|
+
isPrimary(): boolean;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
/** These methods exist for both Custom lines and Standard lines. */
|
package/SuiteScriptV1.d.ts
CHANGED
|
@@ -2971,11 +2971,11 @@ declare function nlapiLoadSearch(type: string, id: string): NLObjSearch;
|
|
|
2971
2971
|
/**
|
|
2972
2972
|
* Create an entry in the script execution log (note that execution log entries are automatically purged after 30 days).
|
|
2973
2973
|
*
|
|
2974
|
-
* @param {
|
|
2974
|
+
* @param {'DEBUG' | 'AUDIT' | 'ERROR' | 'EMERGENCY' | 'debug' | 'audit' | 'error' | 'emergency'} type
|
|
2975
2975
|
* @param {string} title Log title (up to 90 characters supported)
|
|
2976
2976
|
* @param {string|number|boolean} details Log details (up to 3000 characters supported)
|
|
2977
2977
|
*/
|
|
2978
|
-
declare function nlapiLogExecution(type:
|
|
2978
|
+
declare function nlapiLogExecution(type: 'DEBUG' | 'AUDIT' | 'ERROR' | 'EMERGENCY' | 'debug' | 'audit' | 'error' | 'emergency', title: string, details?: string|number|boolean): void;
|
|
2979
2979
|
/**
|
|
2980
2980
|
* Fetch the value of one or more fields on a record. This API uses search to look up the fields and is much
|
|
2981
2981
|
* faster than loading the record in order to get the field.
|
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.10",
|
|
12
12
|
"author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|