@hitc/netsuite-types 2023.1.4 → 2023.1.6

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/https.d.ts CHANGED
@@ -97,6 +97,15 @@ interface RequestRestletFunction {
97
97
  (options: RequestRestletOptions): ClientResponse
98
98
  }
99
99
 
100
+ interface RequestSuiteletOptions extends RequestRestletOptions {
101
+ /** Specifies whether to perform the request as an unauthenticated user; this case uses the Online Form User role. */
102
+ external?: boolean,
103
+ }
104
+
105
+ interface RequestSuiteletFunction {
106
+ (options: RequestSuiteletOptions): ClientResponse
107
+ }
108
+
100
109
  interface RequestSuiteTalkRestOptions {
101
110
  /** The PUT/POST data. This is ignored if the options.method parameter is not POST or PUT. */
102
111
  body?: string | Object,
@@ -156,6 +165,17 @@ export var createSecureString: HttpsCreateSecureStringFunction;
156
165
  */
157
166
  export var requestRestlet: RequestRestletFunction;
158
167
 
168
+ /**
169
+ * Sends an HTTPS request to a Suitelet and returns the response.
170
+ *
171
+ * Use this method to perform an outbound HTTPS request in an anonymous client-side context. You can do this by performing the HTTPS request inside a Suitelet that is available without login, then calling the Suitelet inside your client script using the https.requestSuitelet(options) method.
172
+ *
173
+ * Currently, this method is supported only with the options.external parameter set to true
174
+ *
175
+ * @governance 10 units
176
+ */
177
+ export var requestSuitelet: RequestSuiteletFunction;
178
+
159
179
  /**
160
180
  * Sends an HTTPS request to a SuiteTalk REST endpoint and returns the response. Authentication headers are automatically added.
161
181
  *
@@ -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.6",
12
12
  "author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
13
13
  "license": "MIT",
14
14
  "repository": {