@hitc/netsuite-types 2024.2.9 → 2024.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/dataset.d.ts CHANGED
@@ -58,7 +58,7 @@ export interface Dataset {
58
58
  * The maximum number of results per page is 1000. The minimum number of results per page is 5, except for the last page, which may include fewer than 5 results.
59
59
  */
60
60
  runPaged(options?: { pageSize: number }): PagedData;
61
- save(): void; // May need to test what this returns. Documentation says an object, but what object? The dataset itself?
61
+ save(options: SaveOptions): SaveResult;
62
62
  columns: Column[];
63
63
  condition: Condition;
64
64
  description: string;
@@ -67,6 +67,18 @@ export interface Dataset {
67
67
  type: string;
68
68
  }
69
69
 
70
+ type DatasetId = `custdataset${string}`; // This type is a template literal type where the Dataset ID must begin with the fixed prefix "custdataset"
71
+
72
+ interface SaveOptions {
73
+ name: string;
74
+ description?: string;
75
+ id?: DatasetId;
76
+ }
77
+
78
+ interface SaveResult {
79
+ id: string;
80
+ }
81
+
70
82
  interface CreateOptions {
71
83
  columns?: Column[];
72
84
  condition?: Condition;
package/N/search.d.ts CHANGED
@@ -70,19 +70,19 @@ export interface Column {
70
70
  /** Returns the object type name */
71
71
  toString(): string;
72
72
  /** Get JSON format of the object */
73
- toJSON(): {
74
- name: string;
75
- join: string | null | undefined;
76
- summary: keyof typeof Summary | null | undefined;
77
- label: string | null;
78
- type: string | null;
79
- formula: string | null | undefined;
80
- function: string | null | undefined;
81
- sortdir: keyof typeof Sort;
82
- whenorderedby: string | null | undefined;
83
- whenorderedbyjoin: string | null | undefined;
84
- whenorderedbyalias: string | null | undefined;
85
- };
73
+ // toJSON(): { // See https://github.com/headintheclouddev/typings-suitescript-2.0/issues/320
74
+ // name: string;
75
+ // join: string | null | undefined;
76
+ // summary: keyof typeof Summary | null | undefined;
77
+ // label: string | null;
78
+ // type: string | null;
79
+ // formula: string | null | undefined;
80
+ // function: string | null | undefined;
81
+ // sortdir: keyof typeof Sort;
82
+ // whenorderedby: string | null | undefined;
83
+ // whenorderedbyjoin: string | null | undefined;
84
+ // whenorderedbyalias: string | null | undefined;
85
+ // };
86
86
  }
87
87
 
88
88
  export interface Result {
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": "2024.2.9",
11
+ "version": "2024.2.10",
12
12
  "author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
13
13
  "license": "MIT",
14
14
  "repository": {