@hitc/netsuite-types 2023.1.4 → 2023.1.5

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.
@@ -1,21 +1,40 @@
1
1
  /**
2
2
  * Use the N/recordContext Module to get all the available context types of the record, such as LOCALIZATION.
3
3
  * The LOCALIZATION context type indicates which country a script is using for execution.
4
+ * You can also use the N/recordContext module to create conditional statements within a script so that the script
5
+ * behaves differently based on the context.
4
6
  */
5
7
 
8
+ import record = require('N/record');
9
+
6
10
  interface GetContextOptions {
7
11
  /** The record type. Required if the record is not loaded in your script. */
8
12
  recordType?: string;
9
13
  /** The record ID. Required if the record is not loaded in your script. */
10
14
  recordId?: string;
11
15
  /** The record object. Required if the record is loaded in your script. */
12
- record?: string;
16
+ record?: record.Record | record.ClientCurrentRecord;
13
17
  /** The available context types. Optional. */
14
18
  contextTypes?: ContextType[];
15
19
  }
16
20
 
17
21
  /**
18
- * Method used to change the current user’s NetSuite email address (user name).
22
+ * Contains key-value pairs that represent context types and their values.
23
+ * Each key is the name of the context type, and each value is the record context.
24
+ * Multiple values for a single context type can be returned in an array.
25
+ * NOTE: This is commented out because here the function just returns and object directly.
26
+ */
27
+ // interface RecordContext {
28
+ //
29
+ // }
30
+
31
+ /**
32
+ * Returns the record context object for a given record.
33
+ * The parameters you specify for this method depend on whether the record is currently loaded in your script:
34
+ * - For records that are not loaded in your script, the record is defined by record type and ID.
35
+ * In this case, you must use the recordType and recordId parameters to specify the record to obtain the context for. You do not use the record parameter.
36
+ * - For records that are loaded in your script, the record is defined by the record object.
37
+ * In this case, you must use the record parameter to specify the record to obtain the context for. You do not use the recordType and recordId parameters.
19
38
  */
20
39
  export declare function getContext(options: GetContextOptions): { [contextType: string]: string|string[] }; // The example shows: { "localization": ["CA"] }
21
40
 
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": "2023.1.4",
11
+ "version": "2023.1.5",
12
12
  "author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
13
13
  "license": "MIT",
14
14
  "repository": {