@openfeature/flagd-provider 0.11.0 → 0.11.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/index.cjs.js CHANGED
@@ -4153,7 +4153,7 @@ const Struct = {
4153
4153
  },
4154
4154
  fromJSON(object) {
4155
4155
  return {
4156
- fields: isObject$1(object.fields)
4156
+ fields: isObject$2(object.fields)
4157
4157
  ? Object.entries(object.fields).reduce((acc, [key, value]) => {
4158
4158
  acc[key] = value;
4159
4159
  return acc;
@@ -4360,7 +4360,7 @@ const Value = {
4360
4360
  numberValue: isSet$2(object.numberValue) ? Number(object.numberValue) : undefined,
4361
4361
  stringValue: isSet$2(object.stringValue) ? String(object.stringValue) : undefined,
4362
4362
  boolValue: isSet$2(object.boolValue) ? Boolean(object.boolValue) : undefined,
4363
- structValue: isObject$1(object.structValue) ? object.structValue : undefined,
4363
+ structValue: isObject$2(object.structValue) ? object.structValue : undefined,
4364
4364
  listValue: Array.isArray(object.listValue) ? [...object.listValue] : undefined,
4365
4365
  };
4366
4366
  },
@@ -4512,7 +4512,7 @@ const ListValue = {
4512
4512
  }
4513
4513
  },
4514
4514
  };
4515
- function isObject$1(value) {
4515
+ function isObject$2(value) {
4516
4516
  return typeof value === "object" && value !== null;
4517
4517
  }
4518
4518
  function isSet$2(value) {
@@ -4552,7 +4552,7 @@ const ResolveAllRequest = {
4552
4552
  return message;
4553
4553
  },
4554
4554
  fromJSON(object) {
4555
- return { context: isObject(object.context) ? object.context : undefined };
4555
+ return { context: isObject$1(object.context) ? object.context : undefined };
4556
4556
  },
4557
4557
  toJSON(message) {
4558
4558
  const obj = {};
@@ -4607,7 +4607,7 @@ const ResolveAllResponse = {
4607
4607
  },
4608
4608
  fromJSON(object) {
4609
4609
  return {
4610
- flags: isObject(object.flags)
4610
+ flags: isObject$1(object.flags)
4611
4611
  ? Object.entries(object.flags).reduce((acc, [key, value]) => {
4612
4612
  acc[key] = AnyFlag.fromJSON(value);
4613
4613
  return acc;
@@ -4802,7 +4802,7 @@ const AnyFlag = {
4802
4802
  boolValue: isSet$1(object.boolValue) ? Boolean(object.boolValue) : undefined,
4803
4803
  stringValue: isSet$1(object.stringValue) ? String(object.stringValue) : undefined,
4804
4804
  doubleValue: isSet$1(object.doubleValue) ? Number(object.doubleValue) : undefined,
4805
- objectValue: isObject(object.objectValue) ? object.objectValue : undefined,
4805
+ objectValue: isObject$1(object.objectValue) ? object.objectValue : undefined,
4806
4806
  };
4807
4807
  },
4808
4808
  toJSON(message) {
@@ -4885,7 +4885,7 @@ const ResolveBooleanRequest = {
4885
4885
  fromJSON(object) {
4886
4886
  return {
4887
4887
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
4888
- context: isObject(object.context) ? object.context : undefined,
4888
+ context: isObject$1(object.context) ? object.context : undefined,
4889
4889
  };
4890
4890
  },
4891
4891
  toJSON(message) {
@@ -4972,7 +4972,7 @@ const ResolveBooleanResponse = {
4972
4972
  value: isSet$1(object.value) ? Boolean(object.value) : false,
4973
4973
  reason: isSet$1(object.reason) ? String(object.reason) : "",
4974
4974
  variant: isSet$1(object.variant) ? String(object.variant) : "",
4975
- metadata: isObject(object.metadata) ? object.metadata : undefined,
4975
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
4976
4976
  };
4977
4977
  },
4978
4978
  toJSON(message) {
@@ -5047,7 +5047,7 @@ const ResolveStringRequest = {
5047
5047
  fromJSON(object) {
5048
5048
  return {
5049
5049
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5050
- context: isObject(object.context) ? object.context : undefined,
5050
+ context: isObject$1(object.context) ? object.context : undefined,
5051
5051
  };
5052
5052
  },
5053
5053
  toJSON(message) {
@@ -5134,7 +5134,7 @@ const ResolveStringResponse = {
5134
5134
  value: isSet$1(object.value) ? String(object.value) : "",
5135
5135
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5136
5136
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5137
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5137
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5138
5138
  };
5139
5139
  },
5140
5140
  toJSON(message) {
@@ -5209,7 +5209,7 @@ const ResolveFloatRequest = {
5209
5209
  fromJSON(object) {
5210
5210
  return {
5211
5211
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5212
- context: isObject(object.context) ? object.context : undefined,
5212
+ context: isObject$1(object.context) ? object.context : undefined,
5213
5213
  };
5214
5214
  },
5215
5215
  toJSON(message) {
@@ -5296,7 +5296,7 @@ const ResolveFloatResponse = {
5296
5296
  value: isSet$1(object.value) ? Number(object.value) : 0,
5297
5297
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5298
5298
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5299
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5299
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5300
5300
  };
5301
5301
  },
5302
5302
  toJSON(message) {
@@ -5371,7 +5371,7 @@ const ResolveIntRequest = {
5371
5371
  fromJSON(object) {
5372
5372
  return {
5373
5373
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5374
- context: isObject(object.context) ? object.context : undefined,
5374
+ context: isObject$1(object.context) ? object.context : undefined,
5375
5375
  };
5376
5376
  },
5377
5377
  toJSON(message) {
@@ -5458,7 +5458,7 @@ const ResolveIntResponse = {
5458
5458
  value: isSet$1(object.value) ? String(object.value) : "0",
5459
5459
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5460
5460
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5461
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5461
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5462
5462
  };
5463
5463
  },
5464
5464
  toJSON(message) {
@@ -5533,7 +5533,7 @@ const ResolveObjectRequest = {
5533
5533
  fromJSON(object) {
5534
5534
  return {
5535
5535
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5536
- context: isObject(object.context) ? object.context : undefined,
5536
+ context: isObject$1(object.context) ? object.context : undefined,
5537
5537
  };
5538
5538
  },
5539
5539
  toJSON(message) {
@@ -5617,10 +5617,10 @@ const ResolveObjectResponse = {
5617
5617
  },
5618
5618
  fromJSON(object) {
5619
5619
  return {
5620
- value: isObject(object.value) ? object.value : undefined,
5620
+ value: isObject$1(object.value) ? object.value : undefined,
5621
5621
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5622
5622
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5623
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5623
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5624
5624
  };
5625
5625
  },
5626
5626
  toJSON(message) {
@@ -5695,7 +5695,7 @@ const EventStreamResponse = {
5695
5695
  fromJSON(object) {
5696
5696
  return {
5697
5697
  type: isSet$1(object.type) ? String(object.type) : "",
5698
- data: isObject(object.data) ? object.data : undefined,
5698
+ data: isObject$1(object.data) ? object.data : undefined,
5699
5699
  };
5700
5700
  },
5701
5701
  toJSON(message) {
@@ -5827,7 +5827,7 @@ if (minimal.util.Long !== long) {
5827
5827
  minimal.util.Long = long;
5828
5828
  minimal.configure();
5829
5829
  }
5830
- function isObject(value) {
5830
+ function isObject$1(value) {
5831
5831
  return typeof value === "object" && value !== null;
5832
5832
  }
5833
5833
  function isSet$1(value) {
@@ -6276,12 +6276,12 @@ const GetMetadataRequest = {
6276
6276
  },
6277
6277
  };
6278
6278
  function createBaseGetMetadataResponse() {
6279
- return { metadata: [] };
6279
+ return { metadata: undefined };
6280
6280
  }
6281
6281
  const GetMetadataResponse = {
6282
6282
  encode(message, writer = minimal.Writer.create()) {
6283
- for (const v of message.metadata) {
6284
- KeyValue.encode(v, writer.uint32(10).fork()).ldelim();
6283
+ if (message.metadata !== undefined) {
6284
+ Struct.encode(Struct.wrap(message.metadata), writer.uint32(18).fork()).ldelim();
6285
6285
  }
6286
6286
  return writer;
6287
6287
  },
@@ -6292,11 +6292,11 @@ const GetMetadataResponse = {
6292
6292
  while (reader.pos < end) {
6293
6293
  const tag = reader.uint32();
6294
6294
  switch (tag >>> 3) {
6295
- case 1:
6296
- if (tag !== 10) {
6295
+ case 2:
6296
+ if (tag !== 18) {
6297
6297
  break;
6298
6298
  }
6299
- message.metadata.push(KeyValue.decode(reader, reader.uint32()));
6299
+ message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
6300
6300
  continue;
6301
6301
  }
6302
6302
  if ((tag & 7) === 4 || tag === 0) {
@@ -6307,13 +6307,12 @@ const GetMetadataResponse = {
6307
6307
  return message;
6308
6308
  },
6309
6309
  fromJSON(object) {
6310
- return { metadata: Array.isArray(object === null || object === void 0 ? void 0 : object.metadata) ? object.metadata.map((e) => KeyValue.fromJSON(e)) : [] };
6310
+ return { metadata: isObject(object.metadata) ? object.metadata : undefined };
6311
6311
  },
6312
6312
  toJSON(message) {
6313
- var _a;
6314
6313
  const obj = {};
6315
- if ((_a = message.metadata) === null || _a === void 0 ? void 0 : _a.length) {
6316
- obj.metadata = message.metadata.map((e) => KeyValue.toJSON(e));
6314
+ if (message.metadata !== undefined) {
6315
+ obj.metadata = message.metadata;
6317
6316
  }
6318
6317
  return obj;
6319
6318
  },
@@ -6323,71 +6322,7 @@ const GetMetadataResponse = {
6323
6322
  fromPartial(object) {
6324
6323
  var _a;
6325
6324
  const message = createBaseGetMetadataResponse();
6326
- message.metadata = ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.map((e) => KeyValue.fromPartial(e))) || [];
6327
- return message;
6328
- },
6329
- };
6330
- function createBaseKeyValue() {
6331
- return { key: "", value: "" };
6332
- }
6333
- const KeyValue = {
6334
- encode(message, writer = minimal.Writer.create()) {
6335
- if (message.key !== "") {
6336
- writer.uint32(10).string(message.key);
6337
- }
6338
- if (message.value !== "") {
6339
- writer.uint32(18).string(message.value);
6340
- }
6341
- return writer;
6342
- },
6343
- decode(input, length) {
6344
- const reader = input instanceof minimal.Reader ? input : minimal.Reader.create(input);
6345
- let end = length === undefined ? reader.len : reader.pos + length;
6346
- const message = createBaseKeyValue();
6347
- while (reader.pos < end) {
6348
- const tag = reader.uint32();
6349
- switch (tag >>> 3) {
6350
- case 1:
6351
- if (tag !== 10) {
6352
- break;
6353
- }
6354
- message.key = reader.string();
6355
- continue;
6356
- case 2:
6357
- if (tag !== 18) {
6358
- break;
6359
- }
6360
- message.value = reader.string();
6361
- continue;
6362
- }
6363
- if ((tag & 7) === 4 || tag === 0) {
6364
- break;
6365
- }
6366
- reader.skipType(tag & 7);
6367
- }
6368
- return message;
6369
- },
6370
- fromJSON(object) {
6371
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
6372
- },
6373
- toJSON(message) {
6374
- const obj = {};
6375
- if (message.key !== "") {
6376
- obj.key = message.key;
6377
- }
6378
- if (message.value !== "") {
6379
- obj.value = message.value;
6380
- }
6381
- return obj;
6382
- },
6383
- create(base) {
6384
- return KeyValue.fromPartial(base !== null && base !== void 0 ? base : {});
6385
- },
6386
- fromPartial(object) {
6387
- var _a, _b;
6388
- const message = createBaseKeyValue();
6389
- message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
6390
- message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
6325
+ message.metadata = (_a = object.metadata) !== null && _a !== void 0 ? _a : undefined;
6391
6326
  return message;
6392
6327
  },
6393
6328
  };
@@ -6421,6 +6356,9 @@ const FlagSyncServiceService = {
6421
6356
  },
6422
6357
  };
6423
6358
  const FlagSyncServiceClient = grpcJs.makeGenericClientConstructor(FlagSyncServiceService, "flagd.sync.v1.FlagSyncService");
6359
+ function isObject(value) {
6360
+ return typeof value === "object" && value !== null;
6361
+ }
6424
6362
  function isSet(value) {
6425
6363
  return value !== null && value !== undefined;
6426
6364
  }
package/index.esm.js CHANGED
@@ -4149,7 +4149,7 @@ const Struct = {
4149
4149
  },
4150
4150
  fromJSON(object) {
4151
4151
  return {
4152
- fields: isObject$1(object.fields)
4152
+ fields: isObject$2(object.fields)
4153
4153
  ? Object.entries(object.fields).reduce((acc, [key, value]) => {
4154
4154
  acc[key] = value;
4155
4155
  return acc;
@@ -4356,7 +4356,7 @@ const Value = {
4356
4356
  numberValue: isSet$2(object.numberValue) ? Number(object.numberValue) : undefined,
4357
4357
  stringValue: isSet$2(object.stringValue) ? String(object.stringValue) : undefined,
4358
4358
  boolValue: isSet$2(object.boolValue) ? Boolean(object.boolValue) : undefined,
4359
- structValue: isObject$1(object.structValue) ? object.structValue : undefined,
4359
+ structValue: isObject$2(object.structValue) ? object.structValue : undefined,
4360
4360
  listValue: Array.isArray(object.listValue) ? [...object.listValue] : undefined,
4361
4361
  };
4362
4362
  },
@@ -4508,7 +4508,7 @@ const ListValue = {
4508
4508
  }
4509
4509
  },
4510
4510
  };
4511
- function isObject$1(value) {
4511
+ function isObject$2(value) {
4512
4512
  return typeof value === "object" && value !== null;
4513
4513
  }
4514
4514
  function isSet$2(value) {
@@ -4548,7 +4548,7 @@ const ResolveAllRequest = {
4548
4548
  return message;
4549
4549
  },
4550
4550
  fromJSON(object) {
4551
- return { context: isObject(object.context) ? object.context : undefined };
4551
+ return { context: isObject$1(object.context) ? object.context : undefined };
4552
4552
  },
4553
4553
  toJSON(message) {
4554
4554
  const obj = {};
@@ -4603,7 +4603,7 @@ const ResolveAllResponse = {
4603
4603
  },
4604
4604
  fromJSON(object) {
4605
4605
  return {
4606
- flags: isObject(object.flags)
4606
+ flags: isObject$1(object.flags)
4607
4607
  ? Object.entries(object.flags).reduce((acc, [key, value]) => {
4608
4608
  acc[key] = AnyFlag.fromJSON(value);
4609
4609
  return acc;
@@ -4798,7 +4798,7 @@ const AnyFlag = {
4798
4798
  boolValue: isSet$1(object.boolValue) ? Boolean(object.boolValue) : undefined,
4799
4799
  stringValue: isSet$1(object.stringValue) ? String(object.stringValue) : undefined,
4800
4800
  doubleValue: isSet$1(object.doubleValue) ? Number(object.doubleValue) : undefined,
4801
- objectValue: isObject(object.objectValue) ? object.objectValue : undefined,
4801
+ objectValue: isObject$1(object.objectValue) ? object.objectValue : undefined,
4802
4802
  };
4803
4803
  },
4804
4804
  toJSON(message) {
@@ -4881,7 +4881,7 @@ const ResolveBooleanRequest = {
4881
4881
  fromJSON(object) {
4882
4882
  return {
4883
4883
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
4884
- context: isObject(object.context) ? object.context : undefined,
4884
+ context: isObject$1(object.context) ? object.context : undefined,
4885
4885
  };
4886
4886
  },
4887
4887
  toJSON(message) {
@@ -4968,7 +4968,7 @@ const ResolveBooleanResponse = {
4968
4968
  value: isSet$1(object.value) ? Boolean(object.value) : false,
4969
4969
  reason: isSet$1(object.reason) ? String(object.reason) : "",
4970
4970
  variant: isSet$1(object.variant) ? String(object.variant) : "",
4971
- metadata: isObject(object.metadata) ? object.metadata : undefined,
4971
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
4972
4972
  };
4973
4973
  },
4974
4974
  toJSON(message) {
@@ -5043,7 +5043,7 @@ const ResolveStringRequest = {
5043
5043
  fromJSON(object) {
5044
5044
  return {
5045
5045
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5046
- context: isObject(object.context) ? object.context : undefined,
5046
+ context: isObject$1(object.context) ? object.context : undefined,
5047
5047
  };
5048
5048
  },
5049
5049
  toJSON(message) {
@@ -5130,7 +5130,7 @@ const ResolveStringResponse = {
5130
5130
  value: isSet$1(object.value) ? String(object.value) : "",
5131
5131
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5132
5132
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5133
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5133
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5134
5134
  };
5135
5135
  },
5136
5136
  toJSON(message) {
@@ -5205,7 +5205,7 @@ const ResolveFloatRequest = {
5205
5205
  fromJSON(object) {
5206
5206
  return {
5207
5207
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5208
- context: isObject(object.context) ? object.context : undefined,
5208
+ context: isObject$1(object.context) ? object.context : undefined,
5209
5209
  };
5210
5210
  },
5211
5211
  toJSON(message) {
@@ -5292,7 +5292,7 @@ const ResolveFloatResponse = {
5292
5292
  value: isSet$1(object.value) ? Number(object.value) : 0,
5293
5293
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5294
5294
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5295
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5295
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5296
5296
  };
5297
5297
  },
5298
5298
  toJSON(message) {
@@ -5367,7 +5367,7 @@ const ResolveIntRequest = {
5367
5367
  fromJSON(object) {
5368
5368
  return {
5369
5369
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5370
- context: isObject(object.context) ? object.context : undefined,
5370
+ context: isObject$1(object.context) ? object.context : undefined,
5371
5371
  };
5372
5372
  },
5373
5373
  toJSON(message) {
@@ -5454,7 +5454,7 @@ const ResolveIntResponse = {
5454
5454
  value: isSet$1(object.value) ? String(object.value) : "0",
5455
5455
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5456
5456
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5457
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5457
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5458
5458
  };
5459
5459
  },
5460
5460
  toJSON(message) {
@@ -5529,7 +5529,7 @@ const ResolveObjectRequest = {
5529
5529
  fromJSON(object) {
5530
5530
  return {
5531
5531
  flagKey: isSet$1(object.flagKey) ? String(object.flagKey) : "",
5532
- context: isObject(object.context) ? object.context : undefined,
5532
+ context: isObject$1(object.context) ? object.context : undefined,
5533
5533
  };
5534
5534
  },
5535
5535
  toJSON(message) {
@@ -5613,10 +5613,10 @@ const ResolveObjectResponse = {
5613
5613
  },
5614
5614
  fromJSON(object) {
5615
5615
  return {
5616
- value: isObject(object.value) ? object.value : undefined,
5616
+ value: isObject$1(object.value) ? object.value : undefined,
5617
5617
  reason: isSet$1(object.reason) ? String(object.reason) : "",
5618
5618
  variant: isSet$1(object.variant) ? String(object.variant) : "",
5619
- metadata: isObject(object.metadata) ? object.metadata : undefined,
5619
+ metadata: isObject$1(object.metadata) ? object.metadata : undefined,
5620
5620
  };
5621
5621
  },
5622
5622
  toJSON(message) {
@@ -5691,7 +5691,7 @@ const EventStreamResponse = {
5691
5691
  fromJSON(object) {
5692
5692
  return {
5693
5693
  type: isSet$1(object.type) ? String(object.type) : "",
5694
- data: isObject(object.data) ? object.data : undefined,
5694
+ data: isObject$1(object.data) ? object.data : undefined,
5695
5695
  };
5696
5696
  },
5697
5697
  toJSON(message) {
@@ -5823,7 +5823,7 @@ if (minimal.util.Long !== long) {
5823
5823
  minimal.util.Long = long;
5824
5824
  minimal.configure();
5825
5825
  }
5826
- function isObject(value) {
5826
+ function isObject$1(value) {
5827
5827
  return typeof value === "object" && value !== null;
5828
5828
  }
5829
5829
  function isSet$1(value) {
@@ -6272,12 +6272,12 @@ const GetMetadataRequest = {
6272
6272
  },
6273
6273
  };
6274
6274
  function createBaseGetMetadataResponse() {
6275
- return { metadata: [] };
6275
+ return { metadata: undefined };
6276
6276
  }
6277
6277
  const GetMetadataResponse = {
6278
6278
  encode(message, writer = minimal.Writer.create()) {
6279
- for (const v of message.metadata) {
6280
- KeyValue.encode(v, writer.uint32(10).fork()).ldelim();
6279
+ if (message.metadata !== undefined) {
6280
+ Struct.encode(Struct.wrap(message.metadata), writer.uint32(18).fork()).ldelim();
6281
6281
  }
6282
6282
  return writer;
6283
6283
  },
@@ -6288,11 +6288,11 @@ const GetMetadataResponse = {
6288
6288
  while (reader.pos < end) {
6289
6289
  const tag = reader.uint32();
6290
6290
  switch (tag >>> 3) {
6291
- case 1:
6292
- if (tag !== 10) {
6291
+ case 2:
6292
+ if (tag !== 18) {
6293
6293
  break;
6294
6294
  }
6295
- message.metadata.push(KeyValue.decode(reader, reader.uint32()));
6295
+ message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
6296
6296
  continue;
6297
6297
  }
6298
6298
  if ((tag & 7) === 4 || tag === 0) {
@@ -6303,13 +6303,12 @@ const GetMetadataResponse = {
6303
6303
  return message;
6304
6304
  },
6305
6305
  fromJSON(object) {
6306
- return { metadata: Array.isArray(object === null || object === void 0 ? void 0 : object.metadata) ? object.metadata.map((e) => KeyValue.fromJSON(e)) : [] };
6306
+ return { metadata: isObject(object.metadata) ? object.metadata : undefined };
6307
6307
  },
6308
6308
  toJSON(message) {
6309
- var _a;
6310
6309
  const obj = {};
6311
- if ((_a = message.metadata) === null || _a === void 0 ? void 0 : _a.length) {
6312
- obj.metadata = message.metadata.map((e) => KeyValue.toJSON(e));
6310
+ if (message.metadata !== undefined) {
6311
+ obj.metadata = message.metadata;
6313
6312
  }
6314
6313
  return obj;
6315
6314
  },
@@ -6319,71 +6318,7 @@ const GetMetadataResponse = {
6319
6318
  fromPartial(object) {
6320
6319
  var _a;
6321
6320
  const message = createBaseGetMetadataResponse();
6322
- message.metadata = ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.map((e) => KeyValue.fromPartial(e))) || [];
6323
- return message;
6324
- },
6325
- };
6326
- function createBaseKeyValue() {
6327
- return { key: "", value: "" };
6328
- }
6329
- const KeyValue = {
6330
- encode(message, writer = minimal.Writer.create()) {
6331
- if (message.key !== "") {
6332
- writer.uint32(10).string(message.key);
6333
- }
6334
- if (message.value !== "") {
6335
- writer.uint32(18).string(message.value);
6336
- }
6337
- return writer;
6338
- },
6339
- decode(input, length) {
6340
- const reader = input instanceof minimal.Reader ? input : minimal.Reader.create(input);
6341
- let end = length === undefined ? reader.len : reader.pos + length;
6342
- const message = createBaseKeyValue();
6343
- while (reader.pos < end) {
6344
- const tag = reader.uint32();
6345
- switch (tag >>> 3) {
6346
- case 1:
6347
- if (tag !== 10) {
6348
- break;
6349
- }
6350
- message.key = reader.string();
6351
- continue;
6352
- case 2:
6353
- if (tag !== 18) {
6354
- break;
6355
- }
6356
- message.value = reader.string();
6357
- continue;
6358
- }
6359
- if ((tag & 7) === 4 || tag === 0) {
6360
- break;
6361
- }
6362
- reader.skipType(tag & 7);
6363
- }
6364
- return message;
6365
- },
6366
- fromJSON(object) {
6367
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
6368
- },
6369
- toJSON(message) {
6370
- const obj = {};
6371
- if (message.key !== "") {
6372
- obj.key = message.key;
6373
- }
6374
- if (message.value !== "") {
6375
- obj.value = message.value;
6376
- }
6377
- return obj;
6378
- },
6379
- create(base) {
6380
- return KeyValue.fromPartial(base !== null && base !== void 0 ? base : {});
6381
- },
6382
- fromPartial(object) {
6383
- var _a, _b;
6384
- const message = createBaseKeyValue();
6385
- message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
6386
- message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
6321
+ message.metadata = (_a = object.metadata) !== null && _a !== void 0 ? _a : undefined;
6387
6322
  return message;
6388
6323
  },
6389
6324
  };
@@ -6417,6 +6352,9 @@ const FlagSyncServiceService = {
6417
6352
  },
6418
6353
  };
6419
6354
  const FlagSyncServiceClient = makeGenericClientConstructor(FlagSyncServiceService, "flagd.sync.v1.FlagSyncService");
6355
+ function isObject(value) {
6356
+ return typeof value === "object" && value !== null;
6357
+ }
6420
6358
  function isSet(value) {
6421
6359
  return value !== null && value !== undefined;
6422
6360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeature/flagd-provider",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "scripts": {
5
5
  "publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
6
6
  "current-version": "echo $npm_package_version"
@@ -62,12 +62,9 @@ export interface GetMetadataRequest {
62
62
  }
63
63
  /** GetMetadataResponse contains metadata from the sync service */
64
64
  export interface GetMetadataResponse {
65
- metadata: KeyValue[];
66
- }
67
- /** KeyValue represents a key/value pair */
68
- export interface KeyValue {
69
- key: string;
70
- value: string;
65
+ metadata: {
66
+ [key: string]: any;
67
+ } | undefined;
71
68
  }
72
69
  export declare const SyncFlagsRequest: {
73
70
  encode(message: SyncFlagsRequest, writer?: _m0.Writer): _m0.Writer;
@@ -156,64 +153,26 @@ export declare const GetMetadataResponse: {
156
153
  toJSON(message: GetMetadataResponse): unknown;
157
154
  create<I extends {
158
155
  metadata?: {
159
- key?: string | undefined;
160
- value?: string | undefined;
161
- }[] | undefined;
156
+ [x: string]: any;
157
+ } | undefined;
162
158
  } & {
163
159
  metadata?: ({
164
- key?: string | undefined;
165
- value?: string | undefined;
166
- }[] & ({
167
- key?: string | undefined;
168
- value?: string | undefined;
160
+ [x: string]: any;
169
161
  } & {
170
- key?: string | undefined;
171
- value?: string | undefined;
172
- } & { [K in Exclude<keyof I["metadata"][number], keyof KeyValue>]: never; })[] & { [K_1 in Exclude<keyof I["metadata"], keyof {
173
- key?: string | undefined;
174
- value?: string | undefined;
175
- }[]>]: never; }) | undefined;
176
- } & { [K_2 in Exclude<keyof I, "metadata">]: never; }>(base?: I | undefined): GetMetadataResponse;
162
+ [x: string]: any;
163
+ } & { [K in Exclude<keyof I["metadata"], string | number>]: never; }) | undefined;
164
+ } & { [K_1 in Exclude<keyof I, "metadata">]: never; }>(base?: I | undefined): GetMetadataResponse;
177
165
  fromPartial<I_1 extends {
178
166
  metadata?: {
179
- key?: string | undefined;
180
- value?: string | undefined;
181
- }[] | undefined;
167
+ [x: string]: any;
168
+ } | undefined;
182
169
  } & {
183
170
  metadata?: ({
184
- key?: string | undefined;
185
- value?: string | undefined;
186
- }[] & ({
187
- key?: string | undefined;
188
- value?: string | undefined;
171
+ [x: string]: any;
189
172
  } & {
190
- key?: string | undefined;
191
- value?: string | undefined;
192
- } & { [K_3 in Exclude<keyof I_1["metadata"][number], keyof KeyValue>]: never; })[] & { [K_4 in Exclude<keyof I_1["metadata"], keyof {
193
- key?: string | undefined;
194
- value?: string | undefined;
195
- }[]>]: never; }) | undefined;
196
- } & { [K_5 in Exclude<keyof I_1, "metadata">]: never; }>(object: I_1): GetMetadataResponse;
197
- };
198
- export declare const KeyValue: {
199
- encode(message: KeyValue, writer?: _m0.Writer): _m0.Writer;
200
- decode(input: _m0.Reader | Uint8Array, length?: number): KeyValue;
201
- fromJSON(object: any): KeyValue;
202
- toJSON(message: KeyValue): unknown;
203
- create<I extends {
204
- key?: string | undefined;
205
- value?: string | undefined;
206
- } & {
207
- key?: string | undefined;
208
- value?: string | undefined;
209
- } & { [K in Exclude<keyof I, keyof KeyValue>]: never; }>(base?: I | undefined): KeyValue;
210
- fromPartial<I_1 extends {
211
- key?: string | undefined;
212
- value?: string | undefined;
213
- } & {
214
- key?: string | undefined;
215
- value?: string | undefined;
216
- } & { [K_1 in Exclude<keyof I_1, keyof KeyValue>]: never; }>(object: I_1): KeyValue;
173
+ [x: string]: any;
174
+ } & { [K_2 in Exclude<keyof I_1["metadata"], string | number>]: never; }) | undefined;
175
+ } & { [K_3 in Exclude<keyof I_1, "metadata">]: never; }>(object: I_1): GetMetadataResponse;
217
176
  };
218
177
  /** FlagService implements a server streaming to provide realtime flag configurations */
219
178
  export type FlagSyncServiceService = typeof FlagSyncServiceService;