@google-cloud/pubsub 4.4.1 → 4.5.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
6
6
 
7
+ ## [4.5.0](https://github.com/googleapis/nodejs-pubsub/compare/v4.4.1...v4.5.0) (2024-06-11)
8
+
9
+
10
+ ### Features
11
+
12
+ * Add service_account_email for export subscriptions ([#1927](https://github.com/googleapis/nodejs-pubsub/issues/1927)) ([c532854](https://github.com/googleapis/nodejs-pubsub/commit/c53285473c2c0973baf5932e52d2d135958c6948))
13
+
7
14
  ## [4.4.1](https://github.com/googleapis/nodejs-pubsub/compare/v4.4.0...v4.4.1) (2024-05-30)
8
15
 
9
16
 
@@ -1141,6 +1141,14 @@ message BigQueryConfig {
1141
1141
  // write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
1142
1142
  // enabled at the same time.
1143
1143
  bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL];
1144
+
1145
+ // Optional. The service account to use to write to BigQuery. The subscription
1146
+ // creator or updater that specifies this field must have
1147
+ // `iam.serviceAccounts.actAs` permission on the service account. If not
1148
+ // specified, the Pub/Sub [service
1149
+ // agent](https://cloud.google.com/iam/docs/service-agents),
1150
+ // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
1151
+ string service_account_email = 7 [(google.api.field_behavior) = OPTIONAL];
1144
1152
  }
1145
1153
 
1146
1154
  // Configuration for a Cloud Storage subscription.
@@ -1227,6 +1235,14 @@ message CloudStorageConfig {
1227
1235
  // Output only. An output-only field that indicates whether or not the
1228
1236
  // subscription can receive messages.
1229
1237
  State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
1238
+
1239
+ // Optional. The service account to use to write to Cloud Storage. The
1240
+ // subscription creator or updater that specifies this field must have
1241
+ // `iam.serviceAccounts.actAs` permission on the service account. If not
1242
+ // specified, the Pub/Sub
1243
+ // [service agent](https://cloud.google.com/iam/docs/service-agents),
1244
+ // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
1245
+ string service_account_email = 11 [(google.api.field_behavior) = OPTIONAL];
1230
1246
  }
1231
1247
 
1232
1248
  // A message and its corresponding acknowledgment ID.
@@ -3601,6 +3601,9 @@ export namespace google {
3601
3601
 
3602
3602
  /** BigQueryConfig useTableSchema */
3603
3603
  useTableSchema?: (boolean|null);
3604
+
3605
+ /** BigQueryConfig serviceAccountEmail */
3606
+ serviceAccountEmail?: (string|null);
3604
3607
  }
3605
3608
 
3606
3609
  /** Represents a BigQueryConfig. */
@@ -3630,6 +3633,9 @@ export namespace google {
3630
3633
  /** BigQueryConfig useTableSchema. */
3631
3634
  public useTableSchema: boolean;
3632
3635
 
3636
+ /** BigQueryConfig serviceAccountEmail. */
3637
+ public serviceAccountEmail: string;
3638
+
3633
3639
  /**
3634
3640
  * Creates a new BigQueryConfig instance using the specified properties.
3635
3641
  * @param [properties] Properties to set
@@ -3750,6 +3756,9 @@ export namespace google {
3750
3756
 
3751
3757
  /** CloudStorageConfig state */
3752
3758
  state?: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State|null);
3759
+
3760
+ /** CloudStorageConfig serviceAccountEmail */
3761
+ serviceAccountEmail?: (string|null);
3753
3762
  }
3754
3763
 
3755
3764
  /** Represents a CloudStorageConfig. */
@@ -3788,6 +3797,9 @@ export namespace google {
3788
3797
  /** CloudStorageConfig state. */
3789
3798
  public state: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State);
3790
3799
 
3800
+ /** CloudStorageConfig serviceAccountEmail. */
3801
+ public serviceAccountEmail: string;
3802
+
3791
3803
  /** CloudStorageConfig outputFormat. */
3792
3804
  public outputFormat?: ("textConfig"|"avroConfig");
3793
3805
 
@@ -8267,6 +8267,7 @@
8267
8267
  * @property {boolean|null} [dropUnknownFields] BigQueryConfig dropUnknownFields
8268
8268
  * @property {google.pubsub.v1.BigQueryConfig.State|null} [state] BigQueryConfig state
8269
8269
  * @property {boolean|null} [useTableSchema] BigQueryConfig useTableSchema
8270
+ * @property {string|null} [serviceAccountEmail] BigQueryConfig serviceAccountEmail
8270
8271
  */
8271
8272
 
8272
8273
  /**
@@ -8332,6 +8333,14 @@
8332
8333
  */
8333
8334
  BigQueryConfig.prototype.useTableSchema = false;
8334
8335
 
8336
+ /**
8337
+ * BigQueryConfig serviceAccountEmail.
8338
+ * @member {string} serviceAccountEmail
8339
+ * @memberof google.pubsub.v1.BigQueryConfig
8340
+ * @instance
8341
+ */
8342
+ BigQueryConfig.prototype.serviceAccountEmail = "";
8343
+
8335
8344
  /**
8336
8345
  * Creates a new BigQueryConfig instance using the specified properties.
8337
8346
  * @function create
@@ -8368,6 +8377,8 @@
8368
8377
  writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state);
8369
8378
  if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema"))
8370
8379
  writer.uint32(/* id 6, wireType 0 =*/48).bool(message.useTableSchema);
8380
+ if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail"))
8381
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccountEmail);
8371
8382
  return writer;
8372
8383
  };
8373
8384
 
@@ -8426,6 +8437,10 @@
8426
8437
  message.useTableSchema = reader.bool();
8427
8438
  break;
8428
8439
  }
8440
+ case 7: {
8441
+ message.serviceAccountEmail = reader.string();
8442
+ break;
8443
+ }
8429
8444
  default:
8430
8445
  reader.skipType(tag & 7);
8431
8446
  break;
@@ -8488,6 +8503,9 @@
8488
8503
  if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema"))
8489
8504
  if (typeof message.useTableSchema !== "boolean")
8490
8505
  return "useTableSchema: boolean expected";
8506
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
8507
+ if (!$util.isString(message.serviceAccountEmail))
8508
+ return "serviceAccountEmail: string expected";
8491
8509
  return null;
8492
8510
  };
8493
8511
 
@@ -8545,6 +8563,8 @@
8545
8563
  }
8546
8564
  if (object.useTableSchema != null)
8547
8565
  message.useTableSchema = Boolean(object.useTableSchema);
8566
+ if (object.serviceAccountEmail != null)
8567
+ message.serviceAccountEmail = String(object.serviceAccountEmail);
8548
8568
  return message;
8549
8569
  };
8550
8570
 
@@ -8568,6 +8588,7 @@
8568
8588
  object.dropUnknownFields = false;
8569
8589
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
8570
8590
  object.useTableSchema = false;
8591
+ object.serviceAccountEmail = "";
8571
8592
  }
8572
8593
  if (message.table != null && message.hasOwnProperty("table"))
8573
8594
  object.table = message.table;
@@ -8581,6 +8602,8 @@
8581
8602
  object.state = options.enums === String ? $root.google.pubsub.v1.BigQueryConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.BigQueryConfig.State[message.state] : message.state;
8582
8603
  if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema"))
8583
8604
  object.useTableSchema = message.useTableSchema;
8605
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
8606
+ object.serviceAccountEmail = message.serviceAccountEmail;
8584
8607
  return object;
8585
8608
  };
8586
8609
 
@@ -8650,6 +8673,7 @@
8650
8673
  * @property {google.protobuf.IDuration|null} [maxDuration] CloudStorageConfig maxDuration
8651
8674
  * @property {number|Long|null} [maxBytes] CloudStorageConfig maxBytes
8652
8675
  * @property {google.pubsub.v1.CloudStorageConfig.State|null} [state] CloudStorageConfig state
8676
+ * @property {string|null} [serviceAccountEmail] CloudStorageConfig serviceAccountEmail
8653
8677
  */
8654
8678
 
8655
8679
  /**
@@ -8739,6 +8763,14 @@
8739
8763
  */
8740
8764
  CloudStorageConfig.prototype.state = 0;
8741
8765
 
8766
+ /**
8767
+ * CloudStorageConfig serviceAccountEmail.
8768
+ * @member {string} serviceAccountEmail
8769
+ * @memberof google.pubsub.v1.CloudStorageConfig
8770
+ * @instance
8771
+ */
8772
+ CloudStorageConfig.prototype.serviceAccountEmail = "";
8773
+
8742
8774
  // OneOf field names bound to virtual getters and setters
8743
8775
  var $oneOfFields;
8744
8776
 
@@ -8795,6 +8827,8 @@
8795
8827
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state);
8796
8828
  if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat"))
8797
8829
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.filenameDatetimeFormat);
8830
+ if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail"))
8831
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.serviceAccountEmail);
8798
8832
  return writer;
8799
8833
  };
8800
8834
 
@@ -8865,6 +8899,10 @@
8865
8899
  message.state = reader.int32();
8866
8900
  break;
8867
8901
  }
8902
+ case 11: {
8903
+ message.serviceAccountEmail = reader.string();
8904
+ break;
8905
+ }
8868
8906
  default:
8869
8907
  reader.skipType(tag & 7);
8870
8908
  break;
@@ -8950,6 +8988,9 @@
8950
8988
  case 4:
8951
8989
  break;
8952
8990
  }
8991
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
8992
+ if (!$util.isString(message.serviceAccountEmail))
8993
+ return "serviceAccountEmail: string expected";
8953
8994
  return null;
8954
8995
  };
8955
8996
 
@@ -9025,6 +9066,8 @@
9025
9066
  message.state = 4;
9026
9067
  break;
9027
9068
  }
9069
+ if (object.serviceAccountEmail != null)
9070
+ message.serviceAccountEmail = String(object.serviceAccountEmail);
9028
9071
  return message;
9029
9072
  };
9030
9073
 
@@ -9053,6 +9096,7 @@
9053
9096
  object.maxBytes = options.longs === String ? "0" : 0;
9054
9097
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
9055
9098
  object.filenameDatetimeFormat = "";
9099
+ object.serviceAccountEmail = "";
9056
9100
  }
9057
9101
  if (message.bucket != null && message.hasOwnProperty("bucket"))
9058
9102
  object.bucket = message.bucket;
@@ -9081,6 +9125,8 @@
9081
9125
  object.state = options.enums === String ? $root.google.pubsub.v1.CloudStorageConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.CloudStorageConfig.State[message.state] : message.state;
9082
9126
  if (message.filenameDatetimeFormat != null && message.hasOwnProperty("filenameDatetimeFormat"))
9083
9127
  object.filenameDatetimeFormat = message.filenameDatetimeFormat;
9128
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
9129
+ object.serviceAccountEmail = message.serviceAccountEmail;
9084
9130
  return object;
9085
9131
  };
9086
9132
 
@@ -1274,6 +1274,13 @@
1274
1274
  "options": {
1275
1275
  "(google.api.field_behavior)": "OPTIONAL"
1276
1276
  }
1277
+ },
1278
+ "serviceAccountEmail": {
1279
+ "type": "string",
1280
+ "id": 7,
1281
+ "options": {
1282
+ "(google.api.field_behavior)": "OPTIONAL"
1283
+ }
1277
1284
  }
1278
1285
  },
1279
1286
  "nested": {
@@ -1361,6 +1368,13 @@
1361
1368
  "options": {
1362
1369
  "(google.api.field_behavior)": "OUTPUT_ONLY"
1363
1370
  }
1371
+ },
1372
+ "serviceAccountEmail": {
1373
+ "type": "string",
1374
+ "id": 11,
1375
+ "options": {
1376
+ "(google.api.field_behavior)": "OPTIONAL"
1377
+ }
1364
1378
  }
1365
1379
  },
1366
1380
  "nested": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@google-cloud/pubsub",
3
3
  "description": "Cloud Pub/Sub Client Library for Node.js",
4
- "version": "4.4.1",
4
+ "version": "4.5.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc.",
7
7
  "engines": {
@@ -51,7 +51,7 @@
51
51
  "@google-cloud/precise-date": "^4.0.0",
52
52
  "@google-cloud/projectify": "^4.0.0",
53
53
  "@google-cloud/promisify": "^4.0.0",
54
- "@opentelemetry/api": "^1.6.0",
54
+ "@opentelemetry/api": "~1.8.0",
55
55
  "@opentelemetry/semantic-conventions": "~1.21.0",
56
56
  "arrify": "^2.0.0",
57
57
  "extend": "^3.0.2",
@@ -84,7 +84,7 @@
84
84
  "jsdoc": "^4.0.0",
85
85
  "jsdoc-fresh": "^3.0.0",
86
86
  "jsdoc-region-tag": "^3.0.0",
87
- "linkinator": "^5.0.0",
87
+ "linkinator": "~4.0.0",
88
88
  "mocha": "^9.2.2",
89
89
  "mv": "^2.1.1",
90
90
  "ncp": "^2.0.0",