@hitc/netsuite-types 2024.1.8 → 2024.1.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.
@@ -168,7 +168,7 @@ export interface getAccountsContext {
168
168
  */
169
169
  export type getAccounts = (options: getAccountsContext) => void;
170
170
 
171
- interface addDaraChunkOptions {
171
+ interface addDataChunkOptions {
172
172
 
173
173
  /**
174
174
  * This function enables you to transmit the financial institution’s data file to NetSuite as a series of chunks.
@@ -215,7 +215,7 @@ export interface getTransactionDataContext {
215
215
  * It encrypts the incoming chunks before storing them in the database. Each chunk size has a 25–million
216
216
  * character limit.
217
217
  */
218
- addDataChunk: (options: addDaraChunkOptions) => void;
218
+ addDataChunk: (options: addDataChunkOptions) => void;
219
219
 
220
220
  /**
221
221
  * This function enables you to return the list of accounts queried by the plug-in, as well as the reason
package/N/record.d.ts CHANGED
@@ -562,8 +562,13 @@ export interface ClientCurrentRecord {
562
562
  hasSublistSubrecord(options: GetSublistValueOptions): boolean;
563
563
  /** Returns a value indicating whether the field contains a subrecord. */
564
564
  hasSubrecord(options: HasSubrecordOptions): boolean;
565
- /** The internal ID of a specific record. */
566
- id: number;
565
+ /**
566
+ * The internal ID of a specific record.
567
+ *
568
+ * If {@link isNew} is true, this is normally null, but there are exceptions,
569
+ * such as when {@link isNew} is true in the afterSubmit() entrypoint of a user event script.
570
+ */
571
+ id: number | null;
567
572
  /** Inserts a sublist line. */
568
573
  insertLine(options: InsertLineOptions): this; // Issue #132
569
574
  /**
@@ -599,7 +604,7 @@ export interface ClientCurrentRecord {
599
604
  * Removes the subrecord for the associated field.
600
605
  * @return {Record} same record, for chaining
601
606
  */
602
- removeSubrecord(options: RecordGetLineCountOptions): this;
607
+ removeSubrecord(options: GetFieldOptions): this;
603
608
  /** Selects an existing line in a sublist. */
604
609
  selectLine(options: SelectLineOptions): this;
605
610
  selectLine(sublistId: string, line: number): this;
@@ -760,8 +765,8 @@ interface RecordDetachFunction {
760
765
  * @throws {SuiteScriptError} SSS_MISSING_REQD_ARGUMENT if options.type or options.id is missing
761
766
  */
762
767
  interface RecordLoadFunction {
763
- (options: CopyLoadOptions): Record;
764
- promise(options: CopyLoadOptions): Promise<Record>;
768
+ (options: CopyLoadOptions): Record & { id: number };
769
+ promise(options: CopyLoadOptions): Promise<Record & { id: number }>;
765
770
  }
766
771
  /**
767
772
  * Delete a record object based on provided type, id and return the id of deleted record
package/N/types.d.ts CHANGED
@@ -201,7 +201,7 @@ export namespace EntryPoints {
201
201
  type beforeSubmit = (scriptContext: beforeSubmitContext) => void;
202
202
 
203
203
  interface afterSubmitContext {
204
- newRecord: N_record.Record;
204
+ newRecord: N_record.Record & { id: number };
205
205
  oldRecord: N_record.Record;
206
206
  type: UserEventType;
207
207
  UserEventType: UserEventTypes;
package/N/url.d.ts CHANGED
@@ -14,7 +14,7 @@ interface resolveHostOptions {
14
14
 
15
15
  interface resolveRecordOptions {
16
16
  recordType: string | record.Type; // Documentation says it just accepts string, but record.Type values are strings.
17
- recordId: string | number;
17
+ recordId?: string | number; // Omitting this property produces a URL to a NEW record
18
18
  isEditMode?: boolean;
19
19
  params?: any;
20
20
  }
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.1.8",
11
+ "version": "2024.1.10",
12
12
  "author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
13
13
  "license": "MIT",
14
14
  "repository": {