@hitc/netsuite-types 2024.1.10 → 2024.2.1

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/pgp.d.ts ADDED
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Use the N/pgp module to enable secure messaging, file encryption, and document signing. Based on OpenPGP encryption standards.
3
+ * PGP stands for Pretty Good Privacy and is most commonly used for encrypting emails.
4
+ */
5
+
6
+ import {Signer} from "./crypto/certificate";
7
+
8
+ /** Stores general configuration options that can be used for message decryption. Use the pgp.createConfig(options) method to create a new configuration object. */
9
+ interface Config {
10
+ /** Enables decryption that is not secured with signing keys. */
11
+ readonly allowInsecureDecryptionWithSigningKeys: boolean;
12
+ /** Allows messages without integrity protection. */
13
+ readonly allowMessagesWithoutIntegrityProtection: boolean;
14
+ /** Allows relaxed signature parsing for configuration objects. */
15
+ readonly useRelaxedSignatureParsing: boolean;
16
+ }
17
+
18
+ /**
19
+ * Stores multiple cryptographic keys and metadata.
20
+ * You can use this object in the Message.decrypt(options) and MessageData.encrypt(options) methods.
21
+ */
22
+ interface Key {
23
+ // TODO: Nothing in the documentation?
24
+ }
25
+
26
+ /** Stores an octet scalar that identifies a (sub)key. This object is used for verification signatures. */
27
+ interface KeyId {
28
+ /** Returns the Key ID as a hexadecimal string. */
29
+ asHex: () => string;
30
+ }
31
+
32
+ /**
33
+ * Stores processed PGP data. Responsible for enabling message serialization and providing a set of single-step processors to covert to a readable message.
34
+ * Use the MessageData.toMessage() and MessageData.encrypt(options) to create a Message object.
35
+ */
36
+ interface Message {
37
+ /** Message type that specifies how a message is processed. Enables you to pick the appropriate method to process a message. */
38
+ readonly type: boolean;
39
+ /** Converts a message to ASCII armored format. */
40
+ asArmored: () => string;
41
+ /** Converts a pgp.Message object to message data without any processing. This method only works if the message is not encrypted. */
42
+ toMessageData: () => MessageData;
43
+ /** Decrypts a message and optionally verifies the signatures. */
44
+ decrypt: (options: DecryptMessageOptions) => MessageData;
45
+ }
46
+
47
+ /**
48
+ * Stores message data. The responsibilities of this object includes:
49
+ * - Store message contents with meta data.
50
+ * - Enable reading message contents and metadata.
51
+ * - For further processing, determines whether data is text or binary.
52
+ * - Provides a set of single-step processors for various PGP use cases.
53
+ * Use the pgp.createMessageData(options) method to create a message data object.
54
+ */
55
+ interface MessageData {
56
+ readonly filename: string;
57
+ readonly date: Date;
58
+ readonly format: Format;
59
+ /** Extracts the contents of the message as text. */
60
+ getText: () => string;
61
+ /** Creates a message with no signature, compression, or encryption. */
62
+ toMessage: () => Message;
63
+ /** Creates an encrypted message that is optionally signed. */
64
+ encrypt: (options: EncryptMessageDataOptions) => Message;
65
+ }
66
+
67
+ /** Stores verification results. Use the pgp.createVerification() method to create a Verification object. */
68
+ interface Verification {
69
+ /** Indicates whether the message verification was successful. */
70
+ readonly verified: null|boolean;
71
+ /** List of individual verifications, one per each signature. */
72
+ readonly signatures: null|VerificationSignature[];
73
+ }
74
+
75
+ /** Stores a verification result for single signature. */
76
+ interface VerificationSignature {
77
+ /** ID of the (sub)key that was used for signing. */
78
+ readonly keyId: KeyId;
79
+ /** Date when the message was signed. */
80
+ readonly dateSigned: Date;
81
+ /** Indicates whether verification was successful. */
82
+ readonly verified: boolean;
83
+ /** List of problems for more fine-grained decision making. */
84
+ readonly problems: string[];
85
+ }
86
+
87
+ /** Creates a new pgp.Config object. A configuration object stores general configuration options that can be used for message decryption. */
88
+ export function createConfig(options: CreateConfigOptions): Config;
89
+
90
+ /** Creates a new pgp.MessageData object. A message data object stores message content with metadata. */
91
+ export function createMessageData(options: CreateMessageDataOptions): MessageData;
92
+
93
+ /**
94
+ * Creates a certificate.Signer object for signing plain strings.
95
+ * If the given PGP key contains multiple valid signing sub keys, the most recently added will be used.
96
+ * This behavior is consistent with MessageData.encrypt(options) method.
97
+ */
98
+ export function createSigner(options: { key: Key, algorithm: string }): Signer;
99
+
100
+ /** Creates an empty verification object. */
101
+ export function createVerification(): Verification;
102
+
103
+ /** Loads a key contents that are securely stored in a secret. */
104
+ export function loadKeyFromSecret(options: LoadKeyFromSecretOptions): Key;
105
+
106
+ /** Parses an existing PGP key. Use pgp.loadKeyFromSecret(options) to load private keys. */
107
+ export function parseKey(options: ParseKeyOptions): Key;
108
+
109
+ /** Parses a PGP message. Parameter value is ASCII armored representation of the message. */
110
+ export function parseMessage(options: { value: string }): Message;
111
+
112
+ export enum CompressionAlgorithm {
113
+ ZLIB
114
+ }
115
+
116
+ export enum Format {
117
+ UTF8,
118
+ BINARY
119
+ }
120
+
121
+ interface CreateConfigOptions {
122
+ /** Enables decryption that is not secured with signing keys. Default value is false. */
123
+ allowInsecureDecryptionWithSigningKeys?: boolean;
124
+ /** Allows messages without integrity protection. Default value is false. */
125
+ allowMessagesWithoutIntegrityProtection?: boolean;
126
+ /** Allows relaxed signature parsing for configuration objects. Default value is false. */
127
+ useRelaxedSignatureParsing?: boolean;
128
+ }
129
+
130
+ interface CreateMessageDataOptions {
131
+ /** Content of the message. */
132
+ content: string;
133
+ /** File name if the message represents a file, empty string otherwise. */
134
+ filename?: string;
135
+ /** Date of the message or modification date of the file. Default value = new Date(). */
136
+ date?: Date;
137
+ /** Literal data packet type. Default value = Format.UTF8, if content is a string. Format.BINARY otherwise. */
138
+ format?: Format;
139
+ }
140
+
141
+ interface DecryptMessageOptions {
142
+ /** Uses one or more keys to attempt message decryption. */
143
+ decryptionKeys: Key|Key[];
144
+ /**
145
+ * Uses zero or more keys to attempt message signature verification. If you do not provide a verification key, the message's signature (if any) will be ignored.
146
+ * If you do provide a verification key, at least one signature must be verifiable by one of the provided keys, otherwise an error will be thrown.
147
+ * An expired key works if the signature was made before the expiration. Default value = [].
148
+ */
149
+ verificationKeys?: Key|Key[];
150
+ /** An empty verification object. If you provide a value for this parameter, the verification results will be flushed instead of throwing an error for invalid signature. Default value = null. */
151
+ verification?: Verification;
152
+ /** If set to true, the verification errors will not be thrown. This value is implicitly set to true when the verification parameter is provided. Default value = false. */
153
+ suppressVerificationErrors?: boolean;
154
+ /** The configuration. Default value is pgp.createConfig(options). */
155
+ config?: Config;
156
+ }
157
+
158
+ interface EncryptMessageDataOptions {
159
+ /** One or more keys used to encrypt a message. If a key contains multiple valid encryption (sub)keys, the most recent key added will be used. */
160
+ encryptionKeys: Key|Key[];
161
+ /** Zero or more keys used for signing. If a key contains multiple valid signing (sub)keys, the most recent key added will be used. Default value = []. */
162
+ signingKeys?: Key|Key[];
163
+ /** The compression algorithm to use. Default value = CompressionAlgorithm.ZLIB. */
164
+ compressionAlgorithm?: CompressionAlgorithm;
165
+ }
166
+
167
+ interface LoadKeyFromSecretOptions {
168
+ /** Secret that contains a PGP key in ASCII armored format. */
169
+ secret: { scriptId: string };
170
+ /** Secret that contains a password to unlock the key. Applicable for private keys. */
171
+ password?: { scriptId: string };
172
+ }
173
+
174
+ interface ParseKeyOptions {
175
+ /** ASCII armored key */
176
+ value: string;
177
+ /** Password to unlock the key. Applicable for private keys. */
178
+ password?: string;
179
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Use the N/scriptTypes/restlet module to create custom HTTP responses for your RESTlet script.
3
+ * This module is available only to RESTlet script type.
4
+ */
5
+
6
+ /** An HTTP response of a RESTlet script. This object is read-only. Use restlet.createResponse(options) to create and return this object. */
7
+ interface Response {
8
+ /** The content of the RESTlet HTTP response. */
9
+ readonly content: string;
10
+ /** The Content-Type header of the RESTlet HTTP response. */
11
+ readonly contentType: string;
12
+ }
13
+
14
+ /** Creates a custom RESTlet HTTP response. */
15
+ export function createResponse(options: CreateResponseOptions): Response;
16
+
17
+ interface CreateResponseOptions {
18
+ /** The content of the response. */
19
+ content: string;
20
+ /**
21
+ * The Content-Type header of the response.
22
+ * This value overrides the default Content-Type header, which is the same as the Content-Type header of the RESTlet HTTP request.
23
+ */
24
+ contentType: string;
25
+ }
package/N/task.d.ts CHANGED
@@ -184,7 +184,7 @@ interface CsvImportTaskStatus {
184
184
  interface EntityDeduplicationTaskCreateOptions {
185
185
  taskType: TaskType.ENTITY_DEDUPLICATION;
186
186
  dedupeMode?: DedupeMode;
187
- entityType?: string;
187
+ entityType?: string | DedupeEntityType;
188
188
  masterRecordId?: string | number;
189
189
  masterSelectionMode?: MasterSelectionMode;
190
190
  recordIds?: number[];
package/N/workbook.d.ts CHANGED
@@ -36,11 +36,11 @@ interface ChartDefinition {
36
36
  /** The limiting and conditional filters of the chart definition. */
37
37
  aggregationFilters: (LimitingFilter|ConditionalFilter)[];
38
38
  /** The category of the chart definition. */
39
- category: string;
39
+ category: Category;
40
40
  /** The underlying dataset for the chart definition. */
41
41
  dataset: Dataset;
42
42
  /** The filter expressions for the chart definition. */
43
- filterExpression: Expression[];
43
+ filterExpressions: Expression[];
44
44
  /** The ID of chart definition. */
45
45
  id: string;
46
46
  /** The legend of the chart definition. */
@@ -48,15 +48,17 @@ interface ChartDefinition {
48
48
  /** The name of the chart definition. */
49
49
  name: string;
50
50
  /** The series of the chart definition. */
51
- series: Series;
51
+ series: Series[];
52
52
  /** The stacking type for the chart definition. */
53
53
  stacking: Stacking;
54
54
  /** The subtitle of the chart definition. */
55
- subtitle: string;
55
+ subTitle: string;
56
56
  /** The title of chart definition. */
57
57
  title: string;
58
58
  /** The chart type of the chart definition. */
59
- chartType: ChartType;
59
+ type: ChartType;
60
+ /** The dataset link of the chart definition. */
61
+ datasetLink?: DatasetLink;
60
62
  }
61
63
 
62
64
  /**
@@ -139,7 +141,7 @@ interface DataDimensionValue {
139
141
  }
140
142
 
141
143
  interface DataMeasure {
142
- aggregation: string;
144
+ aggregation: string|Aggregation;
143
145
  /** This property is used if the data measure is a single-expression measure. */
144
146
  expression: Expression;
145
147
  /** This property is used if the data measure is a multiple-expression measure. */
@@ -228,7 +230,7 @@ interface LimitingFilter {
228
230
  /** The row axis indicator for the limiting factor.*/
229
231
  row: boolean;
230
232
  /** The ordering elements of the limiting filter.*/
231
- sortBys: (DimensionSort|MeasureSort)[]
233
+ sortBys: (DimensionSort|MeasureSort)[];
232
234
  }
233
235
 
234
236
  /**
@@ -280,7 +282,7 @@ interface MeasureValueSelector {
280
282
  */
281
283
  interface PathSelector {
282
284
  /** The elements denoting 'xpath' of the path selector. */
283
- elements: PathSelector|DimensionSelector;
285
+ elements: PathSelector|DimensionSelector|(PathSelector|DimensionSelector)[];
284
286
  }
285
287
 
286
288
  /** A pivot axis. A pivot axis is used with you create a pivot definition.
@@ -290,7 +292,7 @@ interface PivotAxis {
290
292
  /** The root data for the pivot axis. */
291
293
  root: DataDimension|Section;
292
294
  /** The sort definitions of the pivot axis. */
293
- sortDefinitions: SortDefinition
295
+ sortDefinitions: SortDefinition|SortDefinition[];
294
296
  }
295
297
 
296
298
  /**
@@ -365,7 +367,7 @@ interface ReportStyleRule {
365
367
  */
366
368
  interface Section {
367
369
  /** The children of the section. */
368
- children: DataDimension|Measure|Section[];
370
+ children: (DataDimension|Measure|Section)[];
369
371
  /** The format for the total line on a section. */
370
372
  totalLine: TotalLine;
371
373
  }
@@ -389,11 +391,11 @@ interface Series {
389
391
  */
390
392
  interface Sort {
391
393
  /** The ascending sort indicator of the sort. */
392
- ascending: boolean,
394
+ ascending: boolean;
393
395
  /** The indicator that determines if the sort is case-sensitive. */
394
- caseSensitive: boolean,
396
+ caseSensitive: boolean;
395
397
  /** The locale of the sort. */
396
- locale: Operator,
398
+ locale: Operator;
397
399
  /** The indicator for placing nulls last of the sort. */
398
400
  nullsLast: boolean;
399
401
  }
@@ -406,7 +408,7 @@ interface SortDefinition {
406
408
  /** The selector for the sort definition. */
407
409
  selector: DimensionSelector|PathSelector;
408
410
  /** The ordering elements for the sort definition. */
409
- sortBys: DimensionSelector|MeasureSort[];
411
+ sortBys: (DimensionSort|MeasureSort)[];
410
412
  }
411
413
 
412
414
  interface SortByDataDimensionItem {
@@ -496,7 +498,7 @@ export interface Workbook {
496
498
  /** Executes the table and returns paginated data (the same as in N/query Module). */
497
499
  runTablePaged(options: RunTablePaged): PagedData;
498
500
  /** Chart definitions that can be included in a workbook when you create a new workbook. */
499
- chartDefinitions: ChartDefinition;
501
+ charts: ChartDefinition[];
500
502
  /** The description of the workbook. This is set when you create a workbook. */
501
503
  description: string;
502
504
  /** The ID of the workbook, that is set when you create a workbook. */
@@ -516,15 +518,15 @@ export interface Workbook {
516
518
  // interface AllSubNodesSelector { } // Commented out on 6 Dec 2021 - this is no longer in the Help?
517
519
 
518
520
  interface CreateOptions {
519
- chartDefinition?: ChartDefinition[];
521
+ charts?: ChartDefinition[];
520
522
  description?: string;
521
523
  name?: string;
522
524
  pivots?: Pivot[];
523
- tableDefinitions?: TableDefinition[];
525
+ tables?: TableDefinition[];
524
526
  }
525
527
 
526
528
  interface CreateAspectOptions {
527
- measure: Measure;
529
+ measure: Measure|DataMeasure;
528
530
  type?: AspectType;
529
531
  }
530
532
 
@@ -549,16 +551,17 @@ interface CreateChartAxis {
549
551
  interface CreateChartDefinition {
550
552
  aggregationFilters?: (ConditionalFilter|LimitingFilter)[];
551
553
  category: Category;
552
- dataset: Dataset;
553
- filterExpressions?: Expression;
554
+ dataset?: Dataset;
555
+ filterExpressions?: Expression[];
554
556
  id: string;
555
557
  legend: Legend;
556
558
  name: string;
557
- series: Series;
559
+ series: Series[];
558
560
  stacking?: Stacking;
559
561
  subTitle?: string;
560
562
  title?: string;
561
563
  type: ChartType;
564
+ datasetLink?: DatasetLink;
562
565
  }
563
566
 
564
567
  interface CreateColor {
@@ -587,7 +590,7 @@ interface CreateConditionalFormatRule {
587
590
 
588
591
  interface CreateConstant {
589
592
  constant: string|number|boolean|Date;
590
- tye?: ConstantType;
593
+ type?: ConstantType;
591
594
  }
592
595
 
593
596
  interface CreateDataDimension {
@@ -602,7 +605,7 @@ interface CreateDataDimensionItem {
602
605
  }
603
606
 
604
607
  interface CreateDataMeasure {
605
- aggregation: string;
608
+ aggregation: string|Aggregation;
606
609
  expression?: Expression;
607
610
  expressions?: Expression[];
608
611
  label: string;
@@ -635,7 +638,7 @@ interface CreateFontSize {
635
638
  interface CreateLegend {
636
639
  axes: ChartAxis[];
637
640
  root: Section|DataDimension;
638
- sortDefinitions?: SortDefinition[]
641
+ sortDefinitions?: SortDefinition[];
639
642
  }
640
643
 
641
644
  interface CreateLimitingFilter {
@@ -790,11 +793,11 @@ interface Load {
790
793
  }
791
794
 
792
795
  interface RunTable {
793
- id: string
796
+ id: string;
794
797
  }
795
798
 
796
799
  interface RunTablePaged {
797
- id: string
800
+ id: string;
798
801
  pageSize?: number;
799
802
  }
800
803
 
@@ -840,7 +843,7 @@ export function createChartAxis(options: CreateChartAxis): ChartAxis;
840
843
  * A chart is built from an underlying dataset and can also include a category, a legend, series, a type, expressions, filters, stacking behavior indicators, along with an ID, a name, a title, and a subtitle.
841
844
  * For more information on charts in SuiteAnalytics, see Workbook Charts.
842
845
  */
843
- export function createChartDefinition(options: CreateChartDefinition): Workbook;
846
+ export function createChart(options: CreateChartDefinition): ChartDefinition;
844
847
 
845
848
  /**
846
849
  * Creates a color.
@@ -1035,6 +1038,11 @@ export function createTable(options: CreateTableDefinition): TableDefinition;
1035
1038
  */
1036
1039
  export function createTableColumnFilter(options: CreateTableColumnFilter): TableColumnFilter;
1037
1040
 
1041
+ /**
1042
+ * Creates a record key.
1043
+ */
1044
+ export function createSimpleRecordKey({ key: number }): number;
1045
+
1038
1046
  /**
1039
1047
  * Lists all existing workbooks.
1040
1048
  */
@@ -1045,6 +1053,13 @@ export function list(): Object[];
1045
1053
  */
1046
1054
  export function load(options: { id: string }): Workbook;
1047
1055
 
1056
+ /**
1057
+ * A selector for descendant or self nodes object.
1058
+ *
1059
+ * A selector for descendant or self nodes object is used as a parameter in the workbook.createMeasureValueSelector(options), and workbook.createSortByMeasure(options) methods.
1060
+ */
1061
+ export const DescendantOrSelfNodesSelector;
1062
+
1048
1063
  declare enum Aggregation {
1049
1064
  COUNT,
1050
1065
  COUNT_DISTINCT,
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.10",
11
+ "version": "2024.2.1",
12
12
  "author": "Head in the Cloud Development <gurus@headintheclouddev.com> (www.headintheclouddev.com)",
13
13
  "license": "MIT",
14
14
  "repository": {