@jibb-open/jssdk 3.18.2 → 3.18.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jibb-open/jssdk",
3
- "version": "3.18.2",
3
+ "version": "3.18.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/types/jibb.pb.js CHANGED
@@ -3199,10 +3199,10 @@ export const user = $root.user = (() => {
3199
3199
  user.Level = function () {
3200
3200
  const valuesById = {},
3201
3201
  values = Object.create(valuesById);
3202
- values[valuesById[0] = "FREE"] = 0;
3203
- values[valuesById[1] = "BASIC"] = 1;
3204
- values[valuesById[3] = "PRO"] = 3;
3205
- values[valuesById[4] = "BUSINESS"] = 4;
3202
+ values[valuesById[0] = "UNKNOWN_USER"] = 0;
3203
+ values[valuesById[1] = "TRIAL"] = 1;
3204
+ values[valuesById[2] = "PRO"] = 2;
3205
+ values[valuesById[3] = "BUSINESS"] = 3;
3206
3206
  values[valuesById[5] = "ENTERPRISE"] = 5;
3207
3207
  return values;
3208
3208
  }();
@@ -3223,6 +3223,20 @@ export const user = $root.user = (() => {
3223
3223
  values[valuesById[2] = "CLOUD"] = 2;
3224
3224
  return values;
3225
3225
  }();
3226
+ user.SubscriptionStatus = function () {
3227
+ const valuesById = {},
3228
+ values = Object.create(valuesById);
3229
+ values[valuesById[0] = "UNKNOWN_STATUS"] = 0;
3230
+ values[valuesById[1] = "TRIALING"] = 1;
3231
+ values[valuesById[2] = "ACTIVE"] = 2;
3232
+ values[valuesById[3] = "INCOMPLETE"] = 3;
3233
+ values[valuesById[4] = "INCOMPLETE_EXPIRED"] = 4;
3234
+ values[valuesById[5] = "PAST_DUE"] = 5;
3235
+ values[valuesById[6] = "CANCELED"] = 6;
3236
+ values[valuesById[7] = "UNPAID"] = 7;
3237
+ values[valuesById[8] = "PAUSED"] = 8;
3238
+ return values;
3239
+ }();
3226
3240
  user.UserDetails = function () {
3227
3241
  function UserDetails(p) {
3228
3242
  if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
@@ -3237,6 +3251,7 @@ export const user = $root.user = (() => {
3237
3251
  UserDetails.prototype.userId = "";
3238
3252
  UserDetails.prototype.email = "";
3239
3253
  UserDetails.prototype.lastLogin = null;
3254
+ UserDetails.prototype.fileManagerEnabled = false;
3240
3255
  UserDetails.create = function create(properties) {
3241
3256
  return new UserDetails(properties);
3242
3257
  };
@@ -3252,6 +3267,7 @@ export const user = $root.user = (() => {
3252
3267
  if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) w.uint32(74).string(m.userId);
3253
3268
  if (m.email != null && Object.hasOwnProperty.call(m, "email")) w.uint32(82).string(m.email);
3254
3269
  if (m.lastLogin != null && Object.hasOwnProperty.call(m, "lastLogin")) $root.google.protobuf.Timestamp.encode(m.lastLogin, w.uint32(90).fork()).ldelim();
3270
+ if (m.fileManagerEnabled != null && Object.hasOwnProperty.call(m, "fileManagerEnabled")) w.uint32(96).bool(m.fileManagerEnabled);
3255
3271
  return w;
3256
3272
  };
3257
3273
  UserDetails.encodeDelimited = function encodeDelimited(message, writer) {
@@ -3294,6 +3310,9 @@ export const user = $root.user = (() => {
3294
3310
  case 11:
3295
3311
  m.lastLogin = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3296
3312
  break;
3313
+ case 12:
3314
+ m.fileManagerEnabled = r.bool();
3315
+ break;
3297
3316
  default:
3298
3317
  r.skipType(t & 7);
3299
3318
  break;
@@ -3316,8 +3335,8 @@ export const user = $root.user = (() => {
3316
3335
  return "level: enum value expected";
3317
3336
  case 0:
3318
3337
  case 1:
3338
+ case 2:
3319
3339
  case 3:
3320
- case 4:
3321
3340
  case 5:
3322
3341
  break;
3323
3342
  }
@@ -3357,6 +3376,9 @@ export const user = $root.user = (() => {
3357
3376
  if (e) return "lastLogin." + e;
3358
3377
  }
3359
3378
  }
3379
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3380
+ if (typeof m.fileManagerEnabled !== "boolean") return "fileManagerEnabled: boolean expected";
3381
+ }
3360
3382
  return null;
3361
3383
  };
3362
3384
  UserDetails.fromObject = function fromObject(d) {
@@ -3366,21 +3388,21 @@ export const user = $root.user = (() => {
3366
3388
  m.organizationName = String(d.organizationName);
3367
3389
  }
3368
3390
  switch (d.level) {
3369
- case "FREE":
3391
+ case "UNKNOWN_USER":
3370
3392
  case 0:
3371
3393
  m.level = 0;
3372
3394
  break;
3373
- case "BASIC":
3395
+ case "TRIAL":
3374
3396
  case 1:
3375
3397
  m.level = 1;
3376
3398
  break;
3377
3399
  case "PRO":
3378
- case 3:
3379
- m.level = 3;
3400
+ case 2:
3401
+ m.level = 2;
3380
3402
  break;
3381
3403
  case "BUSINESS":
3382
- case 4:
3383
- m.level = 4;
3404
+ case 3:
3405
+ m.level = 3;
3384
3406
  break;
3385
3407
  case "ENTERPRISE":
3386
3408
  case 5:
@@ -3427,6 +3449,9 @@ export const user = $root.user = (() => {
3427
3449
  if (typeof d.lastLogin !== "object") throw TypeError(".user.UserDetails.lastLogin: object expected");
3428
3450
  m.lastLogin = $root.google.protobuf.Timestamp.fromObject(d.lastLogin);
3429
3451
  }
3452
+ if (d.fileManagerEnabled != null) {
3453
+ m.fileManagerEnabled = Boolean(d.fileManagerEnabled);
3454
+ }
3430
3455
  return m;
3431
3456
  };
3432
3457
  UserDetails.toObject = function toObject(m, o) {
@@ -3434,7 +3459,7 @@ export const user = $root.user = (() => {
3434
3459
  var d = {};
3435
3460
  if (o.defaults) {
3436
3461
  d.organizationName = "";
3437
- d.level = o.enums === String ? "FREE" : 0;
3462
+ d.level = o.enums === String ? "UNKNOWN_USER" : 0;
3438
3463
  d.firstName = "";
3439
3464
  d.lastName = "";
3440
3465
  d.organizationId = 0;
@@ -3443,6 +3468,7 @@ export const user = $root.user = (() => {
3443
3468
  d.userId = "";
3444
3469
  d.email = "";
3445
3470
  d.lastLogin = null;
3471
+ d.fileManagerEnabled = false;
3446
3472
  }
3447
3473
  if (m.organizationName != null && m.hasOwnProperty("organizationName")) {
3448
3474
  d.organizationName = m.organizationName;
@@ -3474,6 +3500,9 @@ export const user = $root.user = (() => {
3474
3500
  if (m.lastLogin != null && m.hasOwnProperty("lastLogin")) {
3475
3501
  d.lastLogin = $root.google.protobuf.Timestamp.toObject(m.lastLogin, o);
3476
3502
  }
3503
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3504
+ d.fileManagerEnabled = m.fileManagerEnabled;
3505
+ }
3477
3506
  return d;
3478
3507
  };
3479
3508
  UserDetails.prototype.toJSON = function toJSON() {
@@ -3498,6 +3527,7 @@ export const user = $root.user = (() => {
3498
3527
  OrganizationDetails.prototype.deviceLicenseCount = 0;
3499
3528
  OrganizationDetails.prototype.devicesCount = 0;
3500
3529
  OrganizationDetails.prototype.imageCollection = false;
3530
+ OrganizationDetails.prototype.fileManagerEnabled = false;
3501
3531
  OrganizationDetails.create = function create(properties) {
3502
3532
  return new OrganizationDetails(properties);
3503
3533
  };
@@ -3516,6 +3546,7 @@ export const user = $root.user = (() => {
3516
3546
  if (m.devicesCount != null && Object.hasOwnProperty.call(m, "devicesCount")) w.uint32(88).int32(m.devicesCount);
3517
3547
  if (m.startDate != null && Object.hasOwnProperty.call(m, "startDate")) $root.google.protobuf.Timestamp.encode(m.startDate, w.uint32(98).fork()).ldelim();
3518
3548
  if (m.imageCollection != null && Object.hasOwnProperty.call(m, "imageCollection")) w.uint32(112).bool(m.imageCollection);
3549
+ if (m.fileManagerEnabled != null && Object.hasOwnProperty.call(m, "fileManagerEnabled")) w.uint32(120).bool(m.fileManagerEnabled);
3519
3550
  return w;
3520
3551
  };
3521
3552
  OrganizationDetails.encodeDelimited = function encodeDelimited(message, writer) {
@@ -3567,6 +3598,9 @@ export const user = $root.user = (() => {
3567
3598
  case 14:
3568
3599
  m.imageCollection = r.bool();
3569
3600
  break;
3601
+ case 15:
3602
+ m.fileManagerEnabled = r.bool();
3603
+ break;
3570
3604
  default:
3571
3605
  r.skipType(t & 7);
3572
3606
  break;
@@ -3592,8 +3626,8 @@ export const user = $root.user = (() => {
3592
3626
  return "level: enum value expected";
3593
3627
  case 0:
3594
3628
  case 1:
3629
+ case 2:
3595
3630
  case 3:
3596
- case 4:
3597
3631
  case 5:
3598
3632
  break;
3599
3633
  }
@@ -3637,6 +3671,9 @@ export const user = $root.user = (() => {
3637
3671
  if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
3638
3672
  if (typeof m.imageCollection !== "boolean") return "imageCollection: boolean expected";
3639
3673
  }
3674
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3675
+ if (typeof m.fileManagerEnabled !== "boolean") return "fileManagerEnabled: boolean expected";
3676
+ }
3640
3677
  return null;
3641
3678
  };
3642
3679
  OrganizationDetails.fromObject = function fromObject(d) {
@@ -3649,21 +3686,21 @@ export const user = $root.user = (() => {
3649
3686
  m.ownerEmail = String(d.ownerEmail);
3650
3687
  }
3651
3688
  switch (d.level) {
3652
- case "FREE":
3689
+ case "UNKNOWN_USER":
3653
3690
  case 0:
3654
3691
  m.level = 0;
3655
3692
  break;
3656
- case "BASIC":
3693
+ case "TRIAL":
3657
3694
  case 1:
3658
3695
  m.level = 1;
3659
3696
  break;
3660
3697
  case "PRO":
3661
- case 3:
3662
- m.level = 3;
3698
+ case 2:
3699
+ m.level = 2;
3663
3700
  break;
3664
3701
  case "BUSINESS":
3665
- case 4:
3666
- m.level = 4;
3702
+ case 3:
3703
+ m.level = 3;
3667
3704
  break;
3668
3705
  case "ENTERPRISE":
3669
3706
  case 5:
@@ -3703,6 +3740,9 @@ export const user = $root.user = (() => {
3703
3740
  if (d.imageCollection != null) {
3704
3741
  m.imageCollection = Boolean(d.imageCollection);
3705
3742
  }
3743
+ if (d.fileManagerEnabled != null) {
3744
+ m.fileManagerEnabled = Boolean(d.fileManagerEnabled);
3745
+ }
3706
3746
  return m;
3707
3747
  };
3708
3748
  OrganizationDetails.toObject = function toObject(m, o) {
@@ -3711,7 +3751,7 @@ export const user = $root.user = (() => {
3711
3751
  if (o.defaults) {
3712
3752
  d.name = "";
3713
3753
  d.ownerEmail = "";
3714
- d.level = o.enums === String ? "FREE" : 0;
3754
+ d.level = o.enums === String ? "UNKNOWN_USER" : 0;
3715
3755
  d.licenseCount = 0;
3716
3756
  d.usersCount = 0;
3717
3757
  d.creationDate = null;
@@ -3722,6 +3762,7 @@ export const user = $root.user = (() => {
3722
3762
  d.devicesCount = 0;
3723
3763
  d.startDate = null;
3724
3764
  d.imageCollection = false;
3765
+ d.fileManagerEnabled = false;
3725
3766
  }
3726
3767
  if (m.name != null && m.hasOwnProperty("name")) {
3727
3768
  d.name = m.name;
@@ -3762,6 +3803,9 @@ export const user = $root.user = (() => {
3762
3803
  if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
3763
3804
  d.imageCollection = m.imageCollection;
3764
3805
  }
3806
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3807
+ d.fileManagerEnabled = m.fileManagerEnabled;
3808
+ }
3765
3809
  return d;
3766
3810
  };
3767
3811
  OrganizationDetails.prototype.toJSON = function toJSON() {
@@ -3769,6 +3813,657 @@ export const user = $root.user = (() => {
3769
3813
  };
3770
3814
  return OrganizationDetails;
3771
3815
  }();
3816
+ user.Plan = function () {
3817
+ function Plan(p) {
3818
+ this.prices = [];
3819
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3820
+ }
3821
+ Plan.prototype.id = "";
3822
+ Plan.prototype.name = "";
3823
+ Plan.prototype.prices = $util.emptyArray;
3824
+ Plan.create = function create(properties) {
3825
+ return new Plan(properties);
3826
+ };
3827
+ Plan.encode = function encode(m, w) {
3828
+ if (!w) w = $Writer.create();
3829
+ if (m.id != null && Object.hasOwnProperty.call(m, "id")) w.uint32(10).string(m.id);
3830
+ if (m.name != null && Object.hasOwnProperty.call(m, "name")) w.uint32(18).string(m.name);
3831
+ if (m.prices != null && m.prices.length) {
3832
+ for (var i = 0; i < m.prices.length; ++i) $root.user.PriceItem.encode(m.prices[i], w.uint32(26).fork()).ldelim();
3833
+ }
3834
+ return w;
3835
+ };
3836
+ Plan.encodeDelimited = function encodeDelimited(message, writer) {
3837
+ return this.encode(message, writer).ldelim();
3838
+ };
3839
+ Plan.decode = function decode(r, l) {
3840
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3841
+ var c = l === undefined ? r.len : r.pos + l,
3842
+ m = new $root.user.Plan();
3843
+ while (r.pos < c) {
3844
+ var t = r.uint32();
3845
+ switch (t >>> 3) {
3846
+ case 1:
3847
+ m.id = r.string();
3848
+ break;
3849
+ case 2:
3850
+ m.name = r.string();
3851
+ break;
3852
+ case 3:
3853
+ if (!(m.prices && m.prices.length)) m.prices = [];
3854
+ m.prices.push($root.user.PriceItem.decode(r, r.uint32()));
3855
+ break;
3856
+ default:
3857
+ r.skipType(t & 7);
3858
+ break;
3859
+ }
3860
+ }
3861
+ return m;
3862
+ };
3863
+ Plan.decodeDelimited = function decodeDelimited(reader) {
3864
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3865
+ return this.decode(reader, reader.uint32());
3866
+ };
3867
+ Plan.verify = function verify(m) {
3868
+ if (typeof m !== "object" || m === null) return "object expected";
3869
+ if (m.id != null && m.hasOwnProperty("id")) {
3870
+ if (!$util.isString(m.id)) return "id: string expected";
3871
+ }
3872
+ if (m.name != null && m.hasOwnProperty("name")) {
3873
+ if (!$util.isString(m.name)) return "name: string expected";
3874
+ }
3875
+ if (m.prices != null && m.hasOwnProperty("prices")) {
3876
+ if (!Array.isArray(m.prices)) return "prices: array expected";
3877
+ for (var i = 0; i < m.prices.length; ++i) {
3878
+ {
3879
+ var e = $root.user.PriceItem.verify(m.prices[i]);
3880
+ if (e) return "prices." + e;
3881
+ }
3882
+ }
3883
+ }
3884
+ return null;
3885
+ };
3886
+ Plan.fromObject = function fromObject(d) {
3887
+ if (d instanceof $root.user.Plan) return d;
3888
+ var m = new $root.user.Plan();
3889
+ if (d.id != null) {
3890
+ m.id = String(d.id);
3891
+ }
3892
+ if (d.name != null) {
3893
+ m.name = String(d.name);
3894
+ }
3895
+ if (d.prices) {
3896
+ if (!Array.isArray(d.prices)) throw TypeError(".user.Plan.prices: array expected");
3897
+ m.prices = [];
3898
+ for (var i = 0; i < d.prices.length; ++i) {
3899
+ if (typeof d.prices[i] !== "object") throw TypeError(".user.Plan.prices: object expected");
3900
+ m.prices[i] = $root.user.PriceItem.fromObject(d.prices[i]);
3901
+ }
3902
+ }
3903
+ return m;
3904
+ };
3905
+ Plan.toObject = function toObject(m, o) {
3906
+ if (!o) o = {};
3907
+ var d = {};
3908
+ if (o.arrays || o.defaults) {
3909
+ d.prices = [];
3910
+ }
3911
+ if (o.defaults) {
3912
+ d.id = "";
3913
+ d.name = "";
3914
+ }
3915
+ if (m.id != null && m.hasOwnProperty("id")) {
3916
+ d.id = m.id;
3917
+ }
3918
+ if (m.name != null && m.hasOwnProperty("name")) {
3919
+ d.name = m.name;
3920
+ }
3921
+ if (m.prices && m.prices.length) {
3922
+ d.prices = [];
3923
+ for (var j = 0; j < m.prices.length; ++j) {
3924
+ d.prices[j] = $root.user.PriceItem.toObject(m.prices[j], o);
3925
+ }
3926
+ }
3927
+ return d;
3928
+ };
3929
+ Plan.prototype.toJSON = function toJSON() {
3930
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3931
+ };
3932
+ return Plan;
3933
+ }();
3934
+ user.PriceItem = function () {
3935
+ function PriceItem(p) {
3936
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3937
+ }
3938
+ PriceItem.prototype.id = "";
3939
+ PriceItem.prototype.amount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3940
+ PriceItem.prototype.interval = "";
3941
+ PriceItem.prototype.intervalCount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3942
+ PriceItem.prototype.trialPeriodDays = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3943
+ PriceItem.create = function create(properties) {
3944
+ return new PriceItem(properties);
3945
+ };
3946
+ PriceItem.encode = function encode(m, w) {
3947
+ if (!w) w = $Writer.create();
3948
+ if (m.id != null && Object.hasOwnProperty.call(m, "id")) w.uint32(10).string(m.id);
3949
+ if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(16).int64(m.amount);
3950
+ if (m.interval != null && Object.hasOwnProperty.call(m, "interval")) w.uint32(26).string(m.interval);
3951
+ if (m.intervalCount != null && Object.hasOwnProperty.call(m, "intervalCount")) w.uint32(32).int64(m.intervalCount);
3952
+ if (m.trialPeriodDays != null && Object.hasOwnProperty.call(m, "trialPeriodDays")) w.uint32(40).int64(m.trialPeriodDays);
3953
+ return w;
3954
+ };
3955
+ PriceItem.encodeDelimited = function encodeDelimited(message, writer) {
3956
+ return this.encode(message, writer).ldelim();
3957
+ };
3958
+ PriceItem.decode = function decode(r, l) {
3959
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3960
+ var c = l === undefined ? r.len : r.pos + l,
3961
+ m = new $root.user.PriceItem();
3962
+ while (r.pos < c) {
3963
+ var t = r.uint32();
3964
+ switch (t >>> 3) {
3965
+ case 1:
3966
+ m.id = r.string();
3967
+ break;
3968
+ case 2:
3969
+ m.amount = r.int64();
3970
+ break;
3971
+ case 3:
3972
+ m.interval = r.string();
3973
+ break;
3974
+ case 4:
3975
+ m.intervalCount = r.int64();
3976
+ break;
3977
+ case 5:
3978
+ m.trialPeriodDays = r.int64();
3979
+ break;
3980
+ default:
3981
+ r.skipType(t & 7);
3982
+ break;
3983
+ }
3984
+ }
3985
+ return m;
3986
+ };
3987
+ PriceItem.decodeDelimited = function decodeDelimited(reader) {
3988
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3989
+ return this.decode(reader, reader.uint32());
3990
+ };
3991
+ PriceItem.verify = function verify(m) {
3992
+ if (typeof m !== "object" || m === null) return "object expected";
3993
+ if (m.id != null && m.hasOwnProperty("id")) {
3994
+ if (!$util.isString(m.id)) return "id: string expected";
3995
+ }
3996
+ if (m.amount != null && m.hasOwnProperty("amount")) {
3997
+ if (!$util.isInteger(m.amount) && !(m.amount && $util.isInteger(m.amount.low) && $util.isInteger(m.amount.high))) return "amount: integer|Long expected";
3998
+ }
3999
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4000
+ if (!$util.isString(m.interval)) return "interval: string expected";
4001
+ }
4002
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4003
+ if (!$util.isInteger(m.intervalCount) && !(m.intervalCount && $util.isInteger(m.intervalCount.low) && $util.isInteger(m.intervalCount.high))) return "intervalCount: integer|Long expected";
4004
+ }
4005
+ if (m.trialPeriodDays != null && m.hasOwnProperty("trialPeriodDays")) {
4006
+ if (!$util.isInteger(m.trialPeriodDays) && !(m.trialPeriodDays && $util.isInteger(m.trialPeriodDays.low) && $util.isInteger(m.trialPeriodDays.high))) return "trialPeriodDays: integer|Long expected";
4007
+ }
4008
+ return null;
4009
+ };
4010
+ PriceItem.fromObject = function fromObject(d) {
4011
+ if (d instanceof $root.user.PriceItem) return d;
4012
+ var m = new $root.user.PriceItem();
4013
+ if (d.id != null) {
4014
+ m.id = String(d.id);
4015
+ }
4016
+ if (d.amount != null) {
4017
+ if ($util.Long) (m.amount = $util.Long.fromValue(d.amount)).unsigned = false;else if (typeof d.amount === "string") m.amount = parseInt(d.amount, 10);else if (typeof d.amount === "number") m.amount = d.amount;else if (typeof d.amount === "object") m.amount = new $util.LongBits(d.amount.low >>> 0, d.amount.high >>> 0).toNumber();
4018
+ }
4019
+ if (d.interval != null) {
4020
+ m.interval = String(d.interval);
4021
+ }
4022
+ if (d.intervalCount != null) {
4023
+ if ($util.Long) (m.intervalCount = $util.Long.fromValue(d.intervalCount)).unsigned = false;else if (typeof d.intervalCount === "string") m.intervalCount = parseInt(d.intervalCount, 10);else if (typeof d.intervalCount === "number") m.intervalCount = d.intervalCount;else if (typeof d.intervalCount === "object") m.intervalCount = new $util.LongBits(d.intervalCount.low >>> 0, d.intervalCount.high >>> 0).toNumber();
4024
+ }
4025
+ if (d.trialPeriodDays != null) {
4026
+ if ($util.Long) (m.trialPeriodDays = $util.Long.fromValue(d.trialPeriodDays)).unsigned = false;else if (typeof d.trialPeriodDays === "string") m.trialPeriodDays = parseInt(d.trialPeriodDays, 10);else if (typeof d.trialPeriodDays === "number") m.trialPeriodDays = d.trialPeriodDays;else if (typeof d.trialPeriodDays === "object") m.trialPeriodDays = new $util.LongBits(d.trialPeriodDays.low >>> 0, d.trialPeriodDays.high >>> 0).toNumber();
4027
+ }
4028
+ return m;
4029
+ };
4030
+ PriceItem.toObject = function toObject(m, o) {
4031
+ if (!o) o = {};
4032
+ var d = {};
4033
+ if (o.defaults) {
4034
+ d.id = "";
4035
+ if ($util.Long) {
4036
+ var n = new $util.Long(0, 0, false);
4037
+ d.amount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4038
+ } else d.amount = o.longs === String ? "0" : 0;
4039
+ d.interval = "";
4040
+ if ($util.Long) {
4041
+ var n = new $util.Long(0, 0, false);
4042
+ d.intervalCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4043
+ } else d.intervalCount = o.longs === String ? "0" : 0;
4044
+ if ($util.Long) {
4045
+ var n = new $util.Long(0, 0, false);
4046
+ d.trialPeriodDays = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4047
+ } else d.trialPeriodDays = o.longs === String ? "0" : 0;
4048
+ }
4049
+ if (m.id != null && m.hasOwnProperty("id")) {
4050
+ d.id = m.id;
4051
+ }
4052
+ if (m.amount != null && m.hasOwnProperty("amount")) {
4053
+ if (typeof m.amount === "number") d.amount = o.longs === String ? String(m.amount) : m.amount;else d.amount = o.longs === String ? $util.Long.prototype.toString.call(m.amount) : o.longs === Number ? new $util.LongBits(m.amount.low >>> 0, m.amount.high >>> 0).toNumber() : m.amount;
4054
+ }
4055
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4056
+ d.interval = m.interval;
4057
+ }
4058
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4059
+ if (typeof m.intervalCount === "number") d.intervalCount = o.longs === String ? String(m.intervalCount) : m.intervalCount;else d.intervalCount = o.longs === String ? $util.Long.prototype.toString.call(m.intervalCount) : o.longs === Number ? new $util.LongBits(m.intervalCount.low >>> 0, m.intervalCount.high >>> 0).toNumber() : m.intervalCount;
4060
+ }
4061
+ if (m.trialPeriodDays != null && m.hasOwnProperty("trialPeriodDays")) {
4062
+ if (typeof m.trialPeriodDays === "number") d.trialPeriodDays = o.longs === String ? String(m.trialPeriodDays) : m.trialPeriodDays;else d.trialPeriodDays = o.longs === String ? $util.Long.prototype.toString.call(m.trialPeriodDays) : o.longs === Number ? new $util.LongBits(m.trialPeriodDays.low >>> 0, m.trialPeriodDays.high >>> 0).toNumber() : m.trialPeriodDays;
4063
+ }
4064
+ return d;
4065
+ };
4066
+ PriceItem.prototype.toJSON = function toJSON() {
4067
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4068
+ };
4069
+ return PriceItem;
4070
+ }();
4071
+ user.Subscription = function () {
4072
+ function Subscription(p) {
4073
+ this.items = [];
4074
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
4075
+ }
4076
+ Subscription.prototype.stripeCustomerId = "";
4077
+ Subscription.prototype.stripeSubscriptionId = "";
4078
+ Subscription.prototype.planName = "";
4079
+ Subscription.prototype.status = 0;
4080
+ Subscription.prototype.currentPeriodStart = null;
4081
+ Subscription.prototype.currentPeriodEnd = null;
4082
+ Subscription.prototype.trialEnd = null;
4083
+ Subscription.prototype.cancelAtPeriodEnd = false;
4084
+ Subscription.prototype.items = $util.emptyArray;
4085
+ Subscription.prototype.interval = "";
4086
+ Subscription.prototype.intervalCount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
4087
+ let $oneOfFields;
4088
+ Object.defineProperty(Subscription.prototype, "_trialEnd", {
4089
+ get: $util.oneOfGetter($oneOfFields = ["trialEnd"]),
4090
+ set: $util.oneOfSetter($oneOfFields)
4091
+ });
4092
+ Subscription.create = function create(properties) {
4093
+ return new Subscription(properties);
4094
+ };
4095
+ Subscription.encode = function encode(m, w) {
4096
+ if (!w) w = $Writer.create();
4097
+ if (m.stripeCustomerId != null && Object.hasOwnProperty.call(m, "stripeCustomerId")) w.uint32(10).string(m.stripeCustomerId);
4098
+ if (m.stripeSubscriptionId != null && Object.hasOwnProperty.call(m, "stripeSubscriptionId")) w.uint32(18).string(m.stripeSubscriptionId);
4099
+ if (m.planName != null && Object.hasOwnProperty.call(m, "planName")) w.uint32(26).string(m.planName);
4100
+ if (m.status != null && Object.hasOwnProperty.call(m, "status")) w.uint32(32).int32(m.status);
4101
+ if (m.currentPeriodStart != null && Object.hasOwnProperty.call(m, "currentPeriodStart")) $root.google.protobuf.Timestamp.encode(m.currentPeriodStart, w.uint32(42).fork()).ldelim();
4102
+ if (m.currentPeriodEnd != null && Object.hasOwnProperty.call(m, "currentPeriodEnd")) $root.google.protobuf.Timestamp.encode(m.currentPeriodEnd, w.uint32(50).fork()).ldelim();
4103
+ if (m.trialEnd != null && Object.hasOwnProperty.call(m, "trialEnd")) $root.google.protobuf.Timestamp.encode(m.trialEnd, w.uint32(58).fork()).ldelim();
4104
+ if (m.cancelAtPeriodEnd != null && Object.hasOwnProperty.call(m, "cancelAtPeriodEnd")) w.uint32(64).bool(m.cancelAtPeriodEnd);
4105
+ if (m.items != null && m.items.length) {
4106
+ for (var i = 0; i < m.items.length; ++i) $root.user.SubscriptionItem.encode(m.items[i], w.uint32(74).fork()).ldelim();
4107
+ }
4108
+ if (m.interval != null && Object.hasOwnProperty.call(m, "interval")) w.uint32(82).string(m.interval);
4109
+ if (m.intervalCount != null && Object.hasOwnProperty.call(m, "intervalCount")) w.uint32(88).int64(m.intervalCount);
4110
+ return w;
4111
+ };
4112
+ Subscription.encodeDelimited = function encodeDelimited(message, writer) {
4113
+ return this.encode(message, writer).ldelim();
4114
+ };
4115
+ Subscription.decode = function decode(r, l) {
4116
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
4117
+ var c = l === undefined ? r.len : r.pos + l,
4118
+ m = new $root.user.Subscription();
4119
+ while (r.pos < c) {
4120
+ var t = r.uint32();
4121
+ switch (t >>> 3) {
4122
+ case 1:
4123
+ m.stripeCustomerId = r.string();
4124
+ break;
4125
+ case 2:
4126
+ m.stripeSubscriptionId = r.string();
4127
+ break;
4128
+ case 3:
4129
+ m.planName = r.string();
4130
+ break;
4131
+ case 4:
4132
+ m.status = r.int32();
4133
+ break;
4134
+ case 5:
4135
+ m.currentPeriodStart = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4136
+ break;
4137
+ case 6:
4138
+ m.currentPeriodEnd = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4139
+ break;
4140
+ case 7:
4141
+ m.trialEnd = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4142
+ break;
4143
+ case 8:
4144
+ m.cancelAtPeriodEnd = r.bool();
4145
+ break;
4146
+ case 9:
4147
+ if (!(m.items && m.items.length)) m.items = [];
4148
+ m.items.push($root.user.SubscriptionItem.decode(r, r.uint32()));
4149
+ break;
4150
+ case 10:
4151
+ m.interval = r.string();
4152
+ break;
4153
+ case 11:
4154
+ m.intervalCount = r.int64();
4155
+ break;
4156
+ default:
4157
+ r.skipType(t & 7);
4158
+ break;
4159
+ }
4160
+ }
4161
+ return m;
4162
+ };
4163
+ Subscription.decodeDelimited = function decodeDelimited(reader) {
4164
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
4165
+ return this.decode(reader, reader.uint32());
4166
+ };
4167
+ Subscription.verify = function verify(m) {
4168
+ if (typeof m !== "object" || m === null) return "object expected";
4169
+ var p = {};
4170
+ if (m.stripeCustomerId != null && m.hasOwnProperty("stripeCustomerId")) {
4171
+ if (!$util.isString(m.stripeCustomerId)) return "stripeCustomerId: string expected";
4172
+ }
4173
+ if (m.stripeSubscriptionId != null && m.hasOwnProperty("stripeSubscriptionId")) {
4174
+ if (!$util.isString(m.stripeSubscriptionId)) return "stripeSubscriptionId: string expected";
4175
+ }
4176
+ if (m.planName != null && m.hasOwnProperty("planName")) {
4177
+ if (!$util.isString(m.planName)) return "planName: string expected";
4178
+ }
4179
+ if (m.status != null && m.hasOwnProperty("status")) {
4180
+ if (!$util.isInteger(m.status)) return "status: integer expected";
4181
+ }
4182
+ if (m.currentPeriodStart != null && m.hasOwnProperty("currentPeriodStart")) {
4183
+ {
4184
+ var e = $root.google.protobuf.Timestamp.verify(m.currentPeriodStart);
4185
+ if (e) return "currentPeriodStart." + e;
4186
+ }
4187
+ }
4188
+ if (m.currentPeriodEnd != null && m.hasOwnProperty("currentPeriodEnd")) {
4189
+ {
4190
+ var e = $root.google.protobuf.Timestamp.verify(m.currentPeriodEnd);
4191
+ if (e) return "currentPeriodEnd." + e;
4192
+ }
4193
+ }
4194
+ if (m.trialEnd != null && m.hasOwnProperty("trialEnd")) {
4195
+ p._trialEnd = 1;
4196
+ {
4197
+ var e = $root.google.protobuf.Timestamp.verify(m.trialEnd);
4198
+ if (e) return "trialEnd." + e;
4199
+ }
4200
+ }
4201
+ if (m.cancelAtPeriodEnd != null && m.hasOwnProperty("cancelAtPeriodEnd")) {
4202
+ if (typeof m.cancelAtPeriodEnd !== "boolean") return "cancelAtPeriodEnd: boolean expected";
4203
+ }
4204
+ if (m.items != null && m.hasOwnProperty("items")) {
4205
+ if (!Array.isArray(m.items)) return "items: array expected";
4206
+ for (var i = 0; i < m.items.length; ++i) {
4207
+ {
4208
+ var e = $root.user.SubscriptionItem.verify(m.items[i]);
4209
+ if (e) return "items." + e;
4210
+ }
4211
+ }
4212
+ }
4213
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4214
+ if (!$util.isString(m.interval)) return "interval: string expected";
4215
+ }
4216
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4217
+ if (!$util.isInteger(m.intervalCount) && !(m.intervalCount && $util.isInteger(m.intervalCount.low) && $util.isInteger(m.intervalCount.high))) return "intervalCount: integer|Long expected";
4218
+ }
4219
+ return null;
4220
+ };
4221
+ Subscription.fromObject = function fromObject(d) {
4222
+ if (d instanceof $root.user.Subscription) return d;
4223
+ var m = new $root.user.Subscription();
4224
+ if (d.stripeCustomerId != null) {
4225
+ m.stripeCustomerId = String(d.stripeCustomerId);
4226
+ }
4227
+ if (d.stripeSubscriptionId != null) {
4228
+ m.stripeSubscriptionId = String(d.stripeSubscriptionId);
4229
+ }
4230
+ if (d.planName != null) {
4231
+ m.planName = String(d.planName);
4232
+ }
4233
+ if (d.status != null) {
4234
+ m.status = d.status | 0;
4235
+ }
4236
+ if (d.currentPeriodStart != null) {
4237
+ if (typeof d.currentPeriodStart !== "object") throw TypeError(".user.Subscription.currentPeriodStart: object expected");
4238
+ m.currentPeriodStart = $root.google.protobuf.Timestamp.fromObject(d.currentPeriodStart);
4239
+ }
4240
+ if (d.currentPeriodEnd != null) {
4241
+ if (typeof d.currentPeriodEnd !== "object") throw TypeError(".user.Subscription.currentPeriodEnd: object expected");
4242
+ m.currentPeriodEnd = $root.google.protobuf.Timestamp.fromObject(d.currentPeriodEnd);
4243
+ }
4244
+ if (d.trialEnd != null) {
4245
+ if (typeof d.trialEnd !== "object") throw TypeError(".user.Subscription.trialEnd: object expected");
4246
+ m.trialEnd = $root.google.protobuf.Timestamp.fromObject(d.trialEnd);
4247
+ }
4248
+ if (d.cancelAtPeriodEnd != null) {
4249
+ m.cancelAtPeriodEnd = Boolean(d.cancelAtPeriodEnd);
4250
+ }
4251
+ if (d.items) {
4252
+ if (!Array.isArray(d.items)) throw TypeError(".user.Subscription.items: array expected");
4253
+ m.items = [];
4254
+ for (var i = 0; i < d.items.length; ++i) {
4255
+ if (typeof d.items[i] !== "object") throw TypeError(".user.Subscription.items: object expected");
4256
+ m.items[i] = $root.user.SubscriptionItem.fromObject(d.items[i]);
4257
+ }
4258
+ }
4259
+ if (d.interval != null) {
4260
+ m.interval = String(d.interval);
4261
+ }
4262
+ if (d.intervalCount != null) {
4263
+ if ($util.Long) (m.intervalCount = $util.Long.fromValue(d.intervalCount)).unsigned = false;else if (typeof d.intervalCount === "string") m.intervalCount = parseInt(d.intervalCount, 10);else if (typeof d.intervalCount === "number") m.intervalCount = d.intervalCount;else if (typeof d.intervalCount === "object") m.intervalCount = new $util.LongBits(d.intervalCount.low >>> 0, d.intervalCount.high >>> 0).toNumber();
4264
+ }
4265
+ return m;
4266
+ };
4267
+ Subscription.toObject = function toObject(m, o) {
4268
+ if (!o) o = {};
4269
+ var d = {};
4270
+ if (o.arrays || o.defaults) {
4271
+ d.items = [];
4272
+ }
4273
+ if (o.defaults) {
4274
+ d.stripeCustomerId = "";
4275
+ d.stripeSubscriptionId = "";
4276
+ d.planName = "";
4277
+ d.status = 0;
4278
+ d.currentPeriodStart = null;
4279
+ d.currentPeriodEnd = null;
4280
+ d.cancelAtPeriodEnd = false;
4281
+ d.interval = "";
4282
+ if ($util.Long) {
4283
+ var n = new $util.Long(0, 0, false);
4284
+ d.intervalCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4285
+ } else d.intervalCount = o.longs === String ? "0" : 0;
4286
+ }
4287
+ if (m.stripeCustomerId != null && m.hasOwnProperty("stripeCustomerId")) {
4288
+ d.stripeCustomerId = m.stripeCustomerId;
4289
+ }
4290
+ if (m.stripeSubscriptionId != null && m.hasOwnProperty("stripeSubscriptionId")) {
4291
+ d.stripeSubscriptionId = m.stripeSubscriptionId;
4292
+ }
4293
+ if (m.planName != null && m.hasOwnProperty("planName")) {
4294
+ d.planName = m.planName;
4295
+ }
4296
+ if (m.status != null && m.hasOwnProperty("status")) {
4297
+ d.status = m.status;
4298
+ }
4299
+ if (m.currentPeriodStart != null && m.hasOwnProperty("currentPeriodStart")) {
4300
+ d.currentPeriodStart = $root.google.protobuf.Timestamp.toObject(m.currentPeriodStart, o);
4301
+ }
4302
+ if (m.currentPeriodEnd != null && m.hasOwnProperty("currentPeriodEnd")) {
4303
+ d.currentPeriodEnd = $root.google.protobuf.Timestamp.toObject(m.currentPeriodEnd, o);
4304
+ }
4305
+ if (m.trialEnd != null && m.hasOwnProperty("trialEnd")) {
4306
+ d.trialEnd = $root.google.protobuf.Timestamp.toObject(m.trialEnd, o);
4307
+ if (o.oneofs) d._trialEnd = "trialEnd";
4308
+ }
4309
+ if (m.cancelAtPeriodEnd != null && m.hasOwnProperty("cancelAtPeriodEnd")) {
4310
+ d.cancelAtPeriodEnd = m.cancelAtPeriodEnd;
4311
+ }
4312
+ if (m.items && m.items.length) {
4313
+ d.items = [];
4314
+ for (var j = 0; j < m.items.length; ++j) {
4315
+ d.items[j] = $root.user.SubscriptionItem.toObject(m.items[j], o);
4316
+ }
4317
+ }
4318
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4319
+ d.interval = m.interval;
4320
+ }
4321
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4322
+ if (typeof m.intervalCount === "number") d.intervalCount = o.longs === String ? String(m.intervalCount) : m.intervalCount;else d.intervalCount = o.longs === String ? $util.Long.prototype.toString.call(m.intervalCount) : o.longs === Number ? new $util.LongBits(m.intervalCount.low >>> 0, m.intervalCount.high >>> 0).toNumber() : m.intervalCount;
4323
+ }
4324
+ return d;
4325
+ };
4326
+ Subscription.prototype.toJSON = function toJSON() {
4327
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4328
+ };
4329
+ return Subscription;
4330
+ }();
4331
+ user.SubscriptionItem = function () {
4332
+ function SubscriptionItem(p) {
4333
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
4334
+ }
4335
+ SubscriptionItem.prototype.stripeItemId = "";
4336
+ SubscriptionItem.prototype.priceId = "";
4337
+ SubscriptionItem.prototype.quantity = 0;
4338
+ SubscriptionItem.prototype.createdAt = null;
4339
+ SubscriptionItem.prototype.updatedAt = null;
4340
+ SubscriptionItem.create = function create(properties) {
4341
+ return new SubscriptionItem(properties);
4342
+ };
4343
+ SubscriptionItem.encode = function encode(m, w) {
4344
+ if (!w) w = $Writer.create();
4345
+ if (m.stripeItemId != null && Object.hasOwnProperty.call(m, "stripeItemId")) w.uint32(10).string(m.stripeItemId);
4346
+ if (m.priceId != null && Object.hasOwnProperty.call(m, "priceId")) w.uint32(18).string(m.priceId);
4347
+ if (m.quantity != null && Object.hasOwnProperty.call(m, "quantity")) w.uint32(24).int32(m.quantity);
4348
+ if (m.createdAt != null && Object.hasOwnProperty.call(m, "createdAt")) $root.google.protobuf.Timestamp.encode(m.createdAt, w.uint32(34).fork()).ldelim();
4349
+ if (m.updatedAt != null && Object.hasOwnProperty.call(m, "updatedAt")) $root.google.protobuf.Timestamp.encode(m.updatedAt, w.uint32(42).fork()).ldelim();
4350
+ return w;
4351
+ };
4352
+ SubscriptionItem.encodeDelimited = function encodeDelimited(message, writer) {
4353
+ return this.encode(message, writer).ldelim();
4354
+ };
4355
+ SubscriptionItem.decode = function decode(r, l) {
4356
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
4357
+ var c = l === undefined ? r.len : r.pos + l,
4358
+ m = new $root.user.SubscriptionItem();
4359
+ while (r.pos < c) {
4360
+ var t = r.uint32();
4361
+ switch (t >>> 3) {
4362
+ case 1:
4363
+ m.stripeItemId = r.string();
4364
+ break;
4365
+ case 2:
4366
+ m.priceId = r.string();
4367
+ break;
4368
+ case 3:
4369
+ m.quantity = r.int32();
4370
+ break;
4371
+ case 4:
4372
+ m.createdAt = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4373
+ break;
4374
+ case 5:
4375
+ m.updatedAt = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4376
+ break;
4377
+ default:
4378
+ r.skipType(t & 7);
4379
+ break;
4380
+ }
4381
+ }
4382
+ return m;
4383
+ };
4384
+ SubscriptionItem.decodeDelimited = function decodeDelimited(reader) {
4385
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
4386
+ return this.decode(reader, reader.uint32());
4387
+ };
4388
+ SubscriptionItem.verify = function verify(m) {
4389
+ if (typeof m !== "object" || m === null) return "object expected";
4390
+ if (m.stripeItemId != null && m.hasOwnProperty("stripeItemId")) {
4391
+ if (!$util.isString(m.stripeItemId)) return "stripeItemId: string expected";
4392
+ }
4393
+ if (m.priceId != null && m.hasOwnProperty("priceId")) {
4394
+ if (!$util.isString(m.priceId)) return "priceId: string expected";
4395
+ }
4396
+ if (m.quantity != null && m.hasOwnProperty("quantity")) {
4397
+ if (!$util.isInteger(m.quantity)) return "quantity: integer expected";
4398
+ }
4399
+ if (m.createdAt != null && m.hasOwnProperty("createdAt")) {
4400
+ {
4401
+ var e = $root.google.protobuf.Timestamp.verify(m.createdAt);
4402
+ if (e) return "createdAt." + e;
4403
+ }
4404
+ }
4405
+ if (m.updatedAt != null && m.hasOwnProperty("updatedAt")) {
4406
+ {
4407
+ var e = $root.google.protobuf.Timestamp.verify(m.updatedAt);
4408
+ if (e) return "updatedAt." + e;
4409
+ }
4410
+ }
4411
+ return null;
4412
+ };
4413
+ SubscriptionItem.fromObject = function fromObject(d) {
4414
+ if (d instanceof $root.user.SubscriptionItem) return d;
4415
+ var m = new $root.user.SubscriptionItem();
4416
+ if (d.stripeItemId != null) {
4417
+ m.stripeItemId = String(d.stripeItemId);
4418
+ }
4419
+ if (d.priceId != null) {
4420
+ m.priceId = String(d.priceId);
4421
+ }
4422
+ if (d.quantity != null) {
4423
+ m.quantity = d.quantity | 0;
4424
+ }
4425
+ if (d.createdAt != null) {
4426
+ if (typeof d.createdAt !== "object") throw TypeError(".user.SubscriptionItem.createdAt: object expected");
4427
+ m.createdAt = $root.google.protobuf.Timestamp.fromObject(d.createdAt);
4428
+ }
4429
+ if (d.updatedAt != null) {
4430
+ if (typeof d.updatedAt !== "object") throw TypeError(".user.SubscriptionItem.updatedAt: object expected");
4431
+ m.updatedAt = $root.google.protobuf.Timestamp.fromObject(d.updatedAt);
4432
+ }
4433
+ return m;
4434
+ };
4435
+ SubscriptionItem.toObject = function toObject(m, o) {
4436
+ if (!o) o = {};
4437
+ var d = {};
4438
+ if (o.defaults) {
4439
+ d.stripeItemId = "";
4440
+ d.priceId = "";
4441
+ d.quantity = 0;
4442
+ d.createdAt = null;
4443
+ d.updatedAt = null;
4444
+ }
4445
+ if (m.stripeItemId != null && m.hasOwnProperty("stripeItemId")) {
4446
+ d.stripeItemId = m.stripeItemId;
4447
+ }
4448
+ if (m.priceId != null && m.hasOwnProperty("priceId")) {
4449
+ d.priceId = m.priceId;
4450
+ }
4451
+ if (m.quantity != null && m.hasOwnProperty("quantity")) {
4452
+ d.quantity = m.quantity;
4453
+ }
4454
+ if (m.createdAt != null && m.hasOwnProperty("createdAt")) {
4455
+ d.createdAt = $root.google.protobuf.Timestamp.toObject(m.createdAt, o);
4456
+ }
4457
+ if (m.updatedAt != null && m.hasOwnProperty("updatedAt")) {
4458
+ d.updatedAt = $root.google.protobuf.Timestamp.toObject(m.updatedAt, o);
4459
+ }
4460
+ return d;
4461
+ };
4462
+ SubscriptionItem.prototype.toJSON = function toJSON() {
4463
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4464
+ };
4465
+ return SubscriptionItem;
4466
+ }();
3772
4467
  return user;
3773
4468
  })();
3774
4469
  export const google = $root.google = (() => {
package/types/proto.js CHANGED
@@ -2,4 +2,5 @@ import root from "./jibb.pb.js";
2
2
  export const ipsa = root.jibb.ipsa.v1;
3
3
  export const types = root.types;
4
4
  export const cilix = root.cilix;
5
- export const meeting = root.meeting;
5
+ export const meeting = root.meeting;
6
+ export const user = root.user;