Skip to content

Commit 40087fa

Browse files
feat: improved types
1 parent 679d990 commit 40087fa

File tree

2 files changed

+39
-14
lines changed

2 files changed

+39
-14
lines changed

src/types.d.ts

+38-13
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ declare namespace bigquery {
9696
*/
9797
type IArimaFittingMetrics = {
9898
/**
99-
* AIC
99+
* AIC.
100100
*/
101101
aic?: number;
102102
/**
103-
* log-likelihood
103+
* Log-likelihood.
104104
*/
105105
logLikelihood?: number;
106106
/**
107-
* variance.
107+
* Variance.
108108
*/
109109
variance?: number;
110110
};
@@ -121,10 +121,32 @@ declare namespace bigquery {
121121
* Arima fitting metrics.
122122
*/
123123
arimaFittingMetrics?: IArimaFittingMetrics;
124+
/**
125+
* Whether Arima model fitted with drift or not. It is always false
126+
* when d is not 1.
127+
*/
128+
hasDrift?: boolean;
124129
/**
125130
* Non-seasonal order.
126131
*/
127132
nonSeasonalOrder?: IArimaOrder;
133+
/**
134+
* Seasonal periods. Repeated because multiple periods are supported
135+
* for one time series.
136+
*/
137+
seasonalPeriods?: Array<
138+
| 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
139+
| 'NO_SEASONALITY'
140+
| 'DAILY'
141+
| 'WEEKLY'
142+
| 'MONTHLY'
143+
| 'QUARTERLY'
144+
| 'YEARLY'
145+
>;
146+
/**
147+
* The id to indicate different time series.
148+
*/
149+
timeSeriesId?: string;
128150
};
129151

130152
/**
@@ -466,6 +488,17 @@ declare namespace bigquery {
466488
rows?: Array<IRow>;
467489
};
468490

491+
type IConnectionProperty = {
492+
/**
493+
* [Required] Name of the connection property to set.
494+
*/
495+
key?: string;
496+
/**
497+
* [Required] Value of the connection property.
498+
*/
499+
value?: string;
500+
};
501+
469502
type ICsvOptions = {
470503
/**
471504
* [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
@@ -894,10 +927,6 @@ declare namespace bigquery {
894927
* [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
895928
*/
896929
googleSheetsOptions?: IGoogleSheetsOptions;
897-
/**
898-
* [Optional, Trusted Tester] Deprecated, do not use. Please set hivePartitioningOptions instead.
899-
*/
900-
hivePartitioningMode?: string;
901930
/**
902931
* [Optional, Trusted Tester] Options to configure hive partitioning support.
903932
*/
@@ -1223,10 +1252,6 @@ declare namespace bigquery {
12231252
* [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
12241253
*/
12251254
fieldDelimiter?: string;
1226-
/**
1227-
* [Optional, Trusted Tester] Deprecated, do not use. Please set hivePartitioningOptions instead.
1228-
*/
1229-
hivePartitioningMode?: string;
12301255
/**
12311256
* [Optional, Trusted Tester] Options to configure hive partitioning support.
12321257
*/
@@ -1309,7 +1334,7 @@ declare namespace bigquery {
13091334
/**
13101335
* Connection properties.
13111336
*/
1312-
connectionProperties?: Array<any>;
1337+
connectionProperties?: Array<IConnectionProperty>;
13131338
/**
13141339
* [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
13151340
*/
@@ -2035,7 +2060,7 @@ declare namespace bigquery {
20352060
/**
20362061
* Connection properties.
20372062
*/
2038-
connectionProperties?: Array<any>;
2063+
connectionProperties?: Array<IConnectionProperty>;
20392064
/**
20402065
* [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'.
20412066
*/

synth.metadata

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/nodejs-bigquery.git",
7-
"sha": "d6c95667577df2d32bff6f9d07117d011379ecd2"
7+
"sha": "679d990f391433fbef180a4bbba2e32442e358da"
88
}
99
},
1010
{

0 commit comments

Comments
 (0)