@wix/metro-common-builders 1.0.1477 → 1.0.1479

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.
@@ -10,7 +10,7 @@ $root.__options = {
10
10
  'stringLongs': true,
11
11
  'stdCase': false,
12
12
  'generatorVersion': '2.0.1156',
13
- 'contentHash': 'fd91900877159409657b302210f16ab60e7de564'
13
+ 'contentHash': 'c20686ea0bca33c402700fd39d33e3b9f8dc80cd'
14
14
  };
15
15
  $root.__lookup = function (pbjs) {
16
16
  const root = pbjs.Root.fromJSON({
@@ -1149,6 +1149,16 @@ $root.__lookup = function (pbjs) {
1149
1149
  'comment': null
1150
1150
  },
1151
1151
  'Error': {
1152
+ 'oneofs': {
1153
+ 'errorData': {
1154
+ 'oneof': [
1155
+ 'applicationCodeData',
1156
+ 'validationErrorData',
1157
+ 'spiErrorData'
1158
+ ],
1159
+ 'comment': null
1160
+ }
1161
+ },
1152
1162
  'fields': {
1153
1163
  'httpCode': {
1154
1164
  'type': 'int32',
@@ -1165,14 +1175,56 @@ $root.__lookup = function (pbjs) {
1165
1175
  'applicationCode': {
1166
1176
  'type': 'string',
1167
1177
  'id': 3,
1178
+ 'options': {
1179
+ '(.wix.api.field_deprecated).replaced_by': 'application_code_data.application_code',
1180
+ '(.wix.api.field_deprecated).target_removal_date': '2025-03-31',
1181
+ '(.wix.api.field_deprecated)': {
1182
+ 'replaced_by': 'application_code_data.application_code',
1183
+ 'target_removal_date': '2025-03-31'
1184
+ },
1185
+ 'deprecated': true
1186
+ },
1168
1187
  'comment': null,
1169
- 'parsedOptions': null
1188
+ 'parsedOptions': [
1189
+ {
1190
+ '(.wix.api.field_deprecated)': {
1191
+ 'replaced_by': 'application_code_data.application_code',
1192
+ 'target_removal_date': '2025-03-31'
1193
+ },
1194
+ '__comment': null
1195
+ },
1196
+ {
1197
+ 'deprecated': true,
1198
+ '__comment': null
1199
+ }
1200
+ ]
1170
1201
  },
1171
1202
  'name': {
1172
1203
  'type': 'google.protobuf.StringValue',
1173
1204
  'id': 4,
1205
+ 'options': {
1206
+ '(.wix.api.field_deprecated).replaced_by': 'spi_error_data.name',
1207
+ '(.wix.api.field_deprecated).target_removal_date': '2025-03-31',
1208
+ '(.wix.api.field_deprecated)': {
1209
+ 'replaced_by': 'spi_error_data.name',
1210
+ 'target_removal_date': '2025-03-31'
1211
+ },
1212
+ 'deprecated': true
1213
+ },
1174
1214
  'comment': null,
1175
- 'parsedOptions': null
1215
+ 'parsedOptions': [
1216
+ {
1217
+ '(.wix.api.field_deprecated)': {
1218
+ 'replaced_by': 'spi_error_data.name',
1219
+ 'target_removal_date': '2025-03-31'
1220
+ },
1221
+ '__comment': null
1222
+ },
1223
+ {
1224
+ 'deprecated': true,
1225
+ '__comment': null
1226
+ }
1227
+ ]
1176
1228
  },
1177
1229
  'errorSchemaName': {
1178
1230
  'type': 'google.protobuf.StringValue',
@@ -1189,6 +1241,30 @@ $root.__lookup = function (pbjs) {
1189
1241
  '(wix.api.maxLength)': 256,
1190
1242
  '__comment': null
1191
1243
  }]
1244
+ },
1245
+ 'errorType': {
1246
+ 'type': 'ErrorType',
1247
+ 'id': 7,
1248
+ 'comment': null,
1249
+ 'parsedOptions': null
1250
+ },
1251
+ 'applicationCodeData': {
1252
+ 'type': 'ApplicationErrorData',
1253
+ 'id': 8,
1254
+ 'comment': null,
1255
+ 'parsedOptions': null
1256
+ },
1257
+ 'validationErrorData': {
1258
+ 'type': 'ValidationErrorData',
1259
+ 'id': 9,
1260
+ 'comment': null,
1261
+ 'parsedOptions': null
1262
+ },
1263
+ 'spiErrorData': {
1264
+ 'type': 'SPIErrorData',
1265
+ 'id': 10,
1266
+ 'comment': null,
1267
+ 'parsedOptions': null
1192
1268
  }
1193
1269
  },
1194
1270
  'nested': {
@@ -1220,6 +1296,74 @@ $root.__lookup = function (pbjs) {
1220
1296
  'ALREADY_EXISTS': null,
1221
1297
  'FAILED_PRECONDITION': null
1222
1298
  }
1299
+ },
1300
+ 'ErrorType': {
1301
+ 'values': {
1302
+ 'APPLICATION': 0,
1303
+ 'VALIDATION': 1,
1304
+ 'SPI': 2
1305
+ },
1306
+ 'comment': null,
1307
+ 'comments': {
1308
+ 'APPLICATION': null,
1309
+ 'VALIDATION': null,
1310
+ 'SPI': null
1311
+ }
1312
+ },
1313
+ 'ApplicationErrorData': {
1314
+ 'fields': {
1315
+ 'applicationCode': {
1316
+ 'type': 'string',
1317
+ 'id': 1,
1318
+ 'options': { '(wix.api.maxLength)': 100 },
1319
+ 'comment': null,
1320
+ 'parsedOptions': [{
1321
+ '(wix.api.maxLength)': 100,
1322
+ '__comment': null
1323
+ }]
1324
+ }
1325
+ },
1326
+ 'comment': null
1327
+ },
1328
+ 'ValidationErrorData': {
1329
+ 'fields': {
1330
+ 'ruleName': {
1331
+ 'type': 'string',
1332
+ 'id': 1,
1333
+ 'options': { '(wix.api.maxLength)': 100 },
1334
+ 'comment': null,
1335
+ 'parsedOptions': [{
1336
+ '(wix.api.maxLength)': 100,
1337
+ '__comment': null
1338
+ }]
1339
+ }
1340
+ },
1341
+ 'comment': null
1342
+ },
1343
+ 'SPIErrorData': {
1344
+ 'fields': {
1345
+ 'name': {
1346
+ 'type': 'google.protobuf.StringValue',
1347
+ 'id': 1,
1348
+ 'options': { '(wix.api.maxLength)': 100 },
1349
+ 'comment': null,
1350
+ 'parsedOptions': [{
1351
+ '(wix.api.maxLength)': 100,
1352
+ '__comment': null
1353
+ }]
1354
+ },
1355
+ 'applicationCode': {
1356
+ 'type': 'string',
1357
+ 'id': 2,
1358
+ 'options': { '(wix.api.maxLength)': 100 },
1359
+ 'comment': null,
1360
+ 'parsedOptions': [{
1361
+ '(wix.api.maxLength)': 100,
1362
+ '__comment': null
1363
+ }]
1364
+ }
1365
+ },
1366
+ 'comment': null
1223
1367
  }
1224
1368
  },
1225
1369
  'comment': null
@@ -14405,6 +14549,10 @@ $root.wix = (function () {
14405
14549
  this.name = props && props.name;
14406
14550
  this.errorSchemaName = props && props.errorSchemaName;
14407
14551
  this.description = props && props.description;
14552
+ this.errorType = props && props.errorType;
14553
+ this.applicationCodeData = props && props.applicationCodeData;
14554
+ this.validationErrorData = props && props.validationErrorData;
14555
+ this.spiErrorData = props && props.spiErrorData;
14408
14556
  }
14409
14557
  static toJSON(obj, helper, withDefaults) {
14410
14558
  if (obj == null) {
@@ -14441,6 +14589,26 @@ $root.wix = (function () {
14441
14589
  } else if (withDefaults) {
14442
14590
  delete json['description'];
14443
14591
  }
14592
+ if (obj['errorType'] != null) {
14593
+ json['errorType'] = $root.wix.coreservices.businessschema.v1.Error.ErrorType[obj['errorType']];
14594
+ } else if (withDefaults) {
14595
+ json['errorType'] = 'APPLICATION';
14596
+ }
14597
+ if (obj['applicationCodeData'] != null) {
14598
+ json['applicationCodeData'] = $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData.toJSON(obj['applicationCodeData'], helper, withDefaults);
14599
+ } else if (withDefaults) {
14600
+ delete json['applicationCodeData'];
14601
+ }
14602
+ if (obj['validationErrorData'] != null) {
14603
+ json['validationErrorData'] = $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData.toJSON(obj['validationErrorData'], helper, withDefaults);
14604
+ } else if (withDefaults) {
14605
+ delete json['validationErrorData'];
14606
+ }
14607
+ if (obj['spiErrorData'] != null) {
14608
+ json['spiErrorData'] = $root.wix.coreservices.businessschema.v1.Error.SPIErrorData.toJSON(obj['spiErrorData'], helper, withDefaults);
14609
+ } else if (withDefaults) {
14610
+ delete json['spiErrorData'];
14611
+ }
14444
14612
  return json;
14445
14613
  }
14446
14614
  }
@@ -14489,6 +14657,34 @@ $root.wix = (function () {
14489
14657
  } else {
14490
14658
  delete result['description'];
14491
14659
  }
14660
+ if (json['errorType'] != null) {
14661
+ result['errorType'] = typeof json['errorType'] === 'string' ? json['errorType'] : $root.wix.coreservices.businessschema.v1.Error.ErrorType[json['errorType']];
14662
+ } else if (withDefaults !== false) {
14663
+ result['errorType'] = 'APPLICATION';
14664
+ } else {
14665
+ delete result['errorType'];
14666
+ }
14667
+ if (json['applicationCodeData'] != null) {
14668
+ result['applicationCodeData'] = $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData.fromJSON(json['applicationCodeData'], helper);
14669
+ } else if (withDefaults !== false) {
14670
+ delete result['applicationCodeData'];
14671
+ } else {
14672
+ delete result['applicationCodeData'];
14673
+ }
14674
+ if (json['validationErrorData'] != null) {
14675
+ result['validationErrorData'] = $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData.fromJSON(json['validationErrorData'], helper);
14676
+ } else if (withDefaults !== false) {
14677
+ delete result['validationErrorData'];
14678
+ } else {
14679
+ delete result['validationErrorData'];
14680
+ }
14681
+ if (json['spiErrorData'] != null) {
14682
+ result['spiErrorData'] = $root.wix.coreservices.businessschema.v1.Error.SPIErrorData.fromJSON(json['spiErrorData'], helper);
14683
+ } else if (withDefaults !== false) {
14684
+ delete result['spiErrorData'];
14685
+ } else {
14686
+ delete result['spiErrorData'];
14687
+ }
14492
14688
  return result;
14493
14689
  } else
14494
14690
  return json;
@@ -14516,6 +14712,18 @@ $root.wix = (function () {
14516
14712
  if (obj['description'] != null) {
14517
14713
  grpc['description'] = $root.google.protobuf.StringValue.toGRPC(obj['description'], helper);
14518
14714
  }
14715
+ if (obj['errorType'] != null) {
14716
+ grpc['errorType'] = obj['errorType'];
14717
+ }
14718
+ if (obj['applicationCodeData'] != null) {
14719
+ grpc['applicationCodeData'] = $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData.toGRPC(obj['applicationCodeData'], helper);
14720
+ }
14721
+ if (obj['validationErrorData'] != null) {
14722
+ grpc['validationErrorData'] = $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData.toGRPC(obj['validationErrorData'], helper);
14723
+ }
14724
+ if (obj['spiErrorData'] != null) {
14725
+ grpc['spiErrorData'] = $root.wix.coreservices.businessschema.v1.Error.SPIErrorData.toGRPC(obj['spiErrorData'], helper);
14726
+ }
14519
14727
  return grpc;
14520
14728
  }
14521
14729
  }
@@ -14554,6 +14762,26 @@ $root.wix = (function () {
14554
14762
  } else {
14555
14763
  delete result['description'];
14556
14764
  }
14765
+ if (grpc['errorType'] != null) {
14766
+ result['errorType'] = grpc['errorType'];
14767
+ } else {
14768
+ result['errorType'] = 'APPLICATION';
14769
+ }
14770
+ if (grpc['applicationCodeData'] != null) {
14771
+ result['applicationCodeData'] = $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData.fromGRPC(grpc['applicationCodeData'], helper);
14772
+ } else {
14773
+ delete result['applicationCodeData'];
14774
+ }
14775
+ if (grpc['validationErrorData'] != null) {
14776
+ result['validationErrorData'] = $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData.fromGRPC(grpc['validationErrorData'], helper);
14777
+ } else {
14778
+ delete result['validationErrorData'];
14779
+ }
14780
+ if (grpc['spiErrorData'] != null) {
14781
+ result['spiErrorData'] = $root.wix.coreservices.businessschema.v1.Error.SPIErrorData.fromGRPC(grpc['spiErrorData'], helper);
14782
+ } else {
14783
+ delete result['spiErrorData'];
14784
+ }
14557
14785
  return result;
14558
14786
  }
14559
14787
  }
@@ -14582,30 +14810,574 @@ $root.wix = (function () {
14582
14810
  'FAILED_PRECONDITION': 'FAILED_PRECONDITION',
14583
14811
  10: 'FAILED_PRECONDITION'
14584
14812
  };
14585
- Error.StatusCode = {
14586
- 'OK': 'OK',
14587
- 0: 'OK',
14588
- 'UNAUTHENTICATED': 'UNAUTHENTICATED',
14589
- 1: 'UNAUTHENTICATED',
14590
- 'PERMISSION_DENIED': 'PERMISSION_DENIED',
14591
- 2: 'PERMISSION_DENIED',
14592
- 'INVALID_ARGUMENT': 'INVALID_ARGUMENT',
14593
- 3: 'INVALID_ARGUMENT',
14594
- 'NOT_FOUND': 'NOT_FOUND',
14595
- 4: 'NOT_FOUND',
14596
- 'INTERNAL': 'INTERNAL',
14597
- 5: 'INTERNAL',
14598
- 'UNAVAILABLE': 'UNAVAILABLE',
14599
- 6: 'UNAVAILABLE',
14600
- 'RESOURCE_EXHAUSTED': 'RESOURCE_EXHAUSTED',
14601
- 7: 'RESOURCE_EXHAUSTED',
14602
- 'CANCELED': 'CANCELED',
14603
- 8: 'CANCELED',
14604
- 'ALREADY_EXISTS': 'ALREADY_EXISTS',
14605
- 9: 'ALREADY_EXISTS',
14606
- 'FAILED_PRECONDITION': 'FAILED_PRECONDITION',
14607
- 10: 'FAILED_PRECONDITION'
14813
+ Error.ErrorType = {
14814
+ 'APPLICATION': 'APPLICATION',
14815
+ 0: 'APPLICATION',
14816
+ 'VALIDATION': 'VALIDATION',
14817
+ 1: 'VALIDATION',
14818
+ 'SPI': 'SPI',
14819
+ 2: 'SPI'
14608
14820
  };
14821
+ Error.ApplicationErrorData = (function () {
14822
+ class ApplicationErrorData {
14823
+ constructor(props) {
14824
+ this.applicationCode = props && props.applicationCode;
14825
+ }
14826
+ static toJSON(obj, helper, withDefaults) {
14827
+ if (obj == null) {
14828
+ return null;
14829
+ } else {
14830
+ const json = {};
14831
+ if (obj['applicationCode'] != null) {
14832
+ json['applicationCode'] = obj['applicationCode'];
14833
+ } else if (withDefaults) {
14834
+ json['applicationCode'] = '';
14835
+ }
14836
+ return json;
14837
+ }
14838
+ }
14839
+ static fromJSON(json, helper, withDefaults) {
14840
+ if (typeof json === 'object' && !Array.isArray(json)) {
14841
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData();
14842
+ if (json['applicationCode'] != null) {
14843
+ result['applicationCode'] = json['applicationCode'];
14844
+ } else if (withDefaults !== false) {
14845
+ result['applicationCode'] = '';
14846
+ } else {
14847
+ delete result['applicationCode'];
14848
+ }
14849
+ return result;
14850
+ } else
14851
+ return json;
14852
+ }
14853
+ static toGRPC(obj, helper) {
14854
+ if (obj == null) {
14855
+ return null;
14856
+ } else {
14857
+ const grpc = {};
14858
+ if (obj['applicationCode'] != null) {
14859
+ grpc['applicationCode'] = obj['applicationCode'];
14860
+ }
14861
+ return grpc;
14862
+ }
14863
+ }
14864
+ static fromGRPC(grpc, helper) {
14865
+ if (grpc == null) {
14866
+ return null;
14867
+ } else {
14868
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData();
14869
+ if (grpc['applicationCode'] != null) {
14870
+ result['applicationCode'] = grpc['applicationCode'];
14871
+ } else {
14872
+ result['applicationCode'] = '';
14873
+ }
14874
+ return result;
14875
+ }
14876
+ }
14877
+ }
14878
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__proto', {
14879
+ value: pbjs => {
14880
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.ApplicationErrorData');
14881
+ },
14882
+ enumerable: false,
14883
+ configurable: false
14884
+ });
14885
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__fqn__', {
14886
+ value: 'wix.coreservices.businessschema.v1.Error.ApplicationErrorData',
14887
+ enumerable: false,
14888
+ configurable: false
14889
+ });
14890
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__options__', {
14891
+ value: $root.__options,
14892
+ enumerable: false,
14893
+ configurable: false
14894
+ });
14895
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__root__', {
14896
+ value: $root,
14897
+ enumerable: false,
14898
+ configurable: false
14899
+ });
14900
+ return ApplicationErrorData;
14901
+ }());;
14902
+ Error.ValidationErrorData = (function () {
14903
+ class ValidationErrorData {
14904
+ constructor(props) {
14905
+ this.ruleName = props && props.ruleName;
14906
+ }
14907
+ static toJSON(obj, helper, withDefaults) {
14908
+ if (obj == null) {
14909
+ return null;
14910
+ } else {
14911
+ const json = {};
14912
+ if (obj['ruleName'] != null) {
14913
+ json['ruleName'] = obj['ruleName'];
14914
+ } else if (withDefaults) {
14915
+ json['ruleName'] = '';
14916
+ }
14917
+ return json;
14918
+ }
14919
+ }
14920
+ static fromJSON(json, helper, withDefaults) {
14921
+ if (typeof json === 'object' && !Array.isArray(json)) {
14922
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData();
14923
+ if (json['ruleName'] != null) {
14924
+ result['ruleName'] = json['ruleName'];
14925
+ } else if (withDefaults !== false) {
14926
+ result['ruleName'] = '';
14927
+ } else {
14928
+ delete result['ruleName'];
14929
+ }
14930
+ return result;
14931
+ } else
14932
+ return json;
14933
+ }
14934
+ static toGRPC(obj, helper) {
14935
+ if (obj == null) {
14936
+ return null;
14937
+ } else {
14938
+ const grpc = {};
14939
+ if (obj['ruleName'] != null) {
14940
+ grpc['ruleName'] = obj['ruleName'];
14941
+ }
14942
+ return grpc;
14943
+ }
14944
+ }
14945
+ static fromGRPC(grpc, helper) {
14946
+ if (grpc == null) {
14947
+ return null;
14948
+ } else {
14949
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData();
14950
+ if (grpc['ruleName'] != null) {
14951
+ result['ruleName'] = grpc['ruleName'];
14952
+ } else {
14953
+ result['ruleName'] = '';
14954
+ }
14955
+ return result;
14956
+ }
14957
+ }
14958
+ }
14959
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__proto', {
14960
+ value: pbjs => {
14961
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.ValidationErrorData');
14962
+ },
14963
+ enumerable: false,
14964
+ configurable: false
14965
+ });
14966
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__fqn__', {
14967
+ value: 'wix.coreservices.businessschema.v1.Error.ValidationErrorData',
14968
+ enumerable: false,
14969
+ configurable: false
14970
+ });
14971
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__options__', {
14972
+ value: $root.__options,
14973
+ enumerable: false,
14974
+ configurable: false
14975
+ });
14976
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__root__', {
14977
+ value: $root,
14978
+ enumerable: false,
14979
+ configurable: false
14980
+ });
14981
+ return ValidationErrorData;
14982
+ }());;
14983
+ Error.SPIErrorData = (function () {
14984
+ class SPIErrorData {
14985
+ constructor(props) {
14986
+ this.name = props && props.name;
14987
+ this.applicationCode = props && props.applicationCode;
14988
+ }
14989
+ static toJSON(obj, helper, withDefaults) {
14990
+ if (obj == null) {
14991
+ return null;
14992
+ } else {
14993
+ const json = {};
14994
+ if (obj['name'] != null) {
14995
+ json['name'] = $root.google.protobuf.StringValue.toJSON(obj['name'], helper, withDefaults);
14996
+ } else if (withDefaults) {
14997
+ delete json['name'];
14998
+ }
14999
+ if (obj['applicationCode'] != null) {
15000
+ json['applicationCode'] = obj['applicationCode'];
15001
+ } else if (withDefaults) {
15002
+ json['applicationCode'] = '';
15003
+ }
15004
+ return json;
15005
+ }
15006
+ }
15007
+ static fromJSON(json, helper, withDefaults) {
15008
+ if (typeof json === 'object' && !Array.isArray(json)) {
15009
+ const result = new $root.wix.coreservices.businessschema.v1.Error.SPIErrorData();
15010
+ if (json['name'] != null) {
15011
+ result['name'] = $root.google.protobuf.StringValue.fromJSON(json['name'], helper);
15012
+ } else if (withDefaults !== false) {
15013
+ delete result['name'];
15014
+ } else {
15015
+ delete result['name'];
15016
+ }
15017
+ if (json['applicationCode'] != null) {
15018
+ result['applicationCode'] = json['applicationCode'];
15019
+ } else if (withDefaults !== false) {
15020
+ result['applicationCode'] = '';
15021
+ } else {
15022
+ delete result['applicationCode'];
15023
+ }
15024
+ return result;
15025
+ } else
15026
+ return json;
15027
+ }
15028
+ static toGRPC(obj, helper) {
15029
+ if (obj == null) {
15030
+ return null;
15031
+ } else {
15032
+ const grpc = {};
15033
+ if (obj['name'] != null) {
15034
+ grpc['name'] = $root.google.protobuf.StringValue.toGRPC(obj['name'], helper);
15035
+ }
15036
+ if (obj['applicationCode'] != null) {
15037
+ grpc['applicationCode'] = obj['applicationCode'];
15038
+ }
15039
+ return grpc;
15040
+ }
15041
+ }
15042
+ static fromGRPC(grpc, helper) {
15043
+ if (grpc == null) {
15044
+ return null;
15045
+ } else {
15046
+ const result = new $root.wix.coreservices.businessschema.v1.Error.SPIErrorData();
15047
+ if (grpc['name'] != null) {
15048
+ result['name'] = $root.google.protobuf.StringValue.fromGRPC(grpc['name'], helper);
15049
+ } else {
15050
+ delete result['name'];
15051
+ }
15052
+ if (grpc['applicationCode'] != null) {
15053
+ result['applicationCode'] = grpc['applicationCode'];
15054
+ } else {
15055
+ result['applicationCode'] = '';
15056
+ }
15057
+ return result;
15058
+ }
15059
+ }
15060
+ }
15061
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__proto', {
15062
+ value: pbjs => {
15063
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.SPIErrorData');
15064
+ },
15065
+ enumerable: false,
15066
+ configurable: false
15067
+ });
15068
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__fqn__', {
15069
+ value: 'wix.coreservices.businessschema.v1.Error.SPIErrorData',
15070
+ enumerable: false,
15071
+ configurable: false
15072
+ });
15073
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__options__', {
15074
+ value: $root.__options,
15075
+ enumerable: false,
15076
+ configurable: false
15077
+ });
15078
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__root__', {
15079
+ value: $root,
15080
+ enumerable: false,
15081
+ configurable: false
15082
+ });
15083
+ return SPIErrorData;
15084
+ }());;
15085
+ Error.StatusCode = {
15086
+ 'OK': 'OK',
15087
+ 0: 'OK',
15088
+ 'UNAUTHENTICATED': 'UNAUTHENTICATED',
15089
+ 1: 'UNAUTHENTICATED',
15090
+ 'PERMISSION_DENIED': 'PERMISSION_DENIED',
15091
+ 2: 'PERMISSION_DENIED',
15092
+ 'INVALID_ARGUMENT': 'INVALID_ARGUMENT',
15093
+ 3: 'INVALID_ARGUMENT',
15094
+ 'NOT_FOUND': 'NOT_FOUND',
15095
+ 4: 'NOT_FOUND',
15096
+ 'INTERNAL': 'INTERNAL',
15097
+ 5: 'INTERNAL',
15098
+ 'UNAVAILABLE': 'UNAVAILABLE',
15099
+ 6: 'UNAVAILABLE',
15100
+ 'RESOURCE_EXHAUSTED': 'RESOURCE_EXHAUSTED',
15101
+ 7: 'RESOURCE_EXHAUSTED',
15102
+ 'CANCELED': 'CANCELED',
15103
+ 8: 'CANCELED',
15104
+ 'ALREADY_EXISTS': 'ALREADY_EXISTS',
15105
+ 9: 'ALREADY_EXISTS',
15106
+ 'FAILED_PRECONDITION': 'FAILED_PRECONDITION',
15107
+ 10: 'FAILED_PRECONDITION'
15108
+ };
15109
+ Error.ErrorType = {
15110
+ 'APPLICATION': 'APPLICATION',
15111
+ 0: 'APPLICATION',
15112
+ 'VALIDATION': 'VALIDATION',
15113
+ 1: 'VALIDATION',
15114
+ 'SPI': 'SPI',
15115
+ 2: 'SPI'
15116
+ };
15117
+ Error.ApplicationErrorData = (function () {
15118
+ class ApplicationErrorData {
15119
+ constructor(props) {
15120
+ this.applicationCode = props && props.applicationCode;
15121
+ }
15122
+ static toJSON(obj, helper, withDefaults) {
15123
+ if (obj == null) {
15124
+ return null;
15125
+ } else {
15126
+ const json = {};
15127
+ if (obj['applicationCode'] != null) {
15128
+ json['applicationCode'] = obj['applicationCode'];
15129
+ } else if (withDefaults) {
15130
+ json['applicationCode'] = '';
15131
+ }
15132
+ return json;
15133
+ }
15134
+ }
15135
+ static fromJSON(json, helper, withDefaults) {
15136
+ if (typeof json === 'object' && !Array.isArray(json)) {
15137
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData();
15138
+ if (json['applicationCode'] != null) {
15139
+ result['applicationCode'] = json['applicationCode'];
15140
+ } else if (withDefaults !== false) {
15141
+ result['applicationCode'] = '';
15142
+ } else {
15143
+ delete result['applicationCode'];
15144
+ }
15145
+ return result;
15146
+ } else
15147
+ return json;
15148
+ }
15149
+ static toGRPC(obj, helper) {
15150
+ if (obj == null) {
15151
+ return null;
15152
+ } else {
15153
+ const grpc = {};
15154
+ if (obj['applicationCode'] != null) {
15155
+ grpc['applicationCode'] = obj['applicationCode'];
15156
+ }
15157
+ return grpc;
15158
+ }
15159
+ }
15160
+ static fromGRPC(grpc, helper) {
15161
+ if (grpc == null) {
15162
+ return null;
15163
+ } else {
15164
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ApplicationErrorData();
15165
+ if (grpc['applicationCode'] != null) {
15166
+ result['applicationCode'] = grpc['applicationCode'];
15167
+ } else {
15168
+ result['applicationCode'] = '';
15169
+ }
15170
+ return result;
15171
+ }
15172
+ }
15173
+ }
15174
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__proto', {
15175
+ value: pbjs => {
15176
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.ApplicationErrorData');
15177
+ },
15178
+ enumerable: false,
15179
+ configurable: false
15180
+ });
15181
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__fqn__', {
15182
+ value: 'wix.coreservices.businessschema.v1.Error.ApplicationErrorData',
15183
+ enumerable: false,
15184
+ configurable: false
15185
+ });
15186
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__options__', {
15187
+ value: $root.__options,
15188
+ enumerable: false,
15189
+ configurable: false
15190
+ });
15191
+ __builtIn.Object.defineProperty(ApplicationErrorData.prototype, '__root__', {
15192
+ value: $root,
15193
+ enumerable: false,
15194
+ configurable: false
15195
+ });
15196
+ return ApplicationErrorData;
15197
+ }());;
15198
+ Error.ValidationErrorData = (function () {
15199
+ class ValidationErrorData {
15200
+ constructor(props) {
15201
+ this.ruleName = props && props.ruleName;
15202
+ }
15203
+ static toJSON(obj, helper, withDefaults) {
15204
+ if (obj == null) {
15205
+ return null;
15206
+ } else {
15207
+ const json = {};
15208
+ if (obj['ruleName'] != null) {
15209
+ json['ruleName'] = obj['ruleName'];
15210
+ } else if (withDefaults) {
15211
+ json['ruleName'] = '';
15212
+ }
15213
+ return json;
15214
+ }
15215
+ }
15216
+ static fromJSON(json, helper, withDefaults) {
15217
+ if (typeof json === 'object' && !Array.isArray(json)) {
15218
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData();
15219
+ if (json['ruleName'] != null) {
15220
+ result['ruleName'] = json['ruleName'];
15221
+ } else if (withDefaults !== false) {
15222
+ result['ruleName'] = '';
15223
+ } else {
15224
+ delete result['ruleName'];
15225
+ }
15226
+ return result;
15227
+ } else
15228
+ return json;
15229
+ }
15230
+ static toGRPC(obj, helper) {
15231
+ if (obj == null) {
15232
+ return null;
15233
+ } else {
15234
+ const grpc = {};
15235
+ if (obj['ruleName'] != null) {
15236
+ grpc['ruleName'] = obj['ruleName'];
15237
+ }
15238
+ return grpc;
15239
+ }
15240
+ }
15241
+ static fromGRPC(grpc, helper) {
15242
+ if (grpc == null) {
15243
+ return null;
15244
+ } else {
15245
+ const result = new $root.wix.coreservices.businessschema.v1.Error.ValidationErrorData();
15246
+ if (grpc['ruleName'] != null) {
15247
+ result['ruleName'] = grpc['ruleName'];
15248
+ } else {
15249
+ result['ruleName'] = '';
15250
+ }
15251
+ return result;
15252
+ }
15253
+ }
15254
+ }
15255
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__proto', {
15256
+ value: pbjs => {
15257
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.ValidationErrorData');
15258
+ },
15259
+ enumerable: false,
15260
+ configurable: false
15261
+ });
15262
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__fqn__', {
15263
+ value: 'wix.coreservices.businessschema.v1.Error.ValidationErrorData',
15264
+ enumerable: false,
15265
+ configurable: false
15266
+ });
15267
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__options__', {
15268
+ value: $root.__options,
15269
+ enumerable: false,
15270
+ configurable: false
15271
+ });
15272
+ __builtIn.Object.defineProperty(ValidationErrorData.prototype, '__root__', {
15273
+ value: $root,
15274
+ enumerable: false,
15275
+ configurable: false
15276
+ });
15277
+ return ValidationErrorData;
15278
+ }());;
15279
+ Error.SPIErrorData = (function () {
15280
+ class SPIErrorData {
15281
+ constructor(props) {
15282
+ this.name = props && props.name;
15283
+ this.applicationCode = props && props.applicationCode;
15284
+ }
15285
+ static toJSON(obj, helper, withDefaults) {
15286
+ if (obj == null) {
15287
+ return null;
15288
+ } else {
15289
+ const json = {};
15290
+ if (obj['name'] != null) {
15291
+ json['name'] = $root.google.protobuf.StringValue.toJSON(obj['name'], helper, withDefaults);
15292
+ } else if (withDefaults) {
15293
+ delete json['name'];
15294
+ }
15295
+ if (obj['applicationCode'] != null) {
15296
+ json['applicationCode'] = obj['applicationCode'];
15297
+ } else if (withDefaults) {
15298
+ json['applicationCode'] = '';
15299
+ }
15300
+ return json;
15301
+ }
15302
+ }
15303
+ static fromJSON(json, helper, withDefaults) {
15304
+ if (typeof json === 'object' && !Array.isArray(json)) {
15305
+ const result = new $root.wix.coreservices.businessschema.v1.Error.SPIErrorData();
15306
+ if (json['name'] != null) {
15307
+ result['name'] = $root.google.protobuf.StringValue.fromJSON(json['name'], helper);
15308
+ } else if (withDefaults !== false) {
15309
+ delete result['name'];
15310
+ } else {
15311
+ delete result['name'];
15312
+ }
15313
+ if (json['applicationCode'] != null) {
15314
+ result['applicationCode'] = json['applicationCode'];
15315
+ } else if (withDefaults !== false) {
15316
+ result['applicationCode'] = '';
15317
+ } else {
15318
+ delete result['applicationCode'];
15319
+ }
15320
+ return result;
15321
+ } else
15322
+ return json;
15323
+ }
15324
+ static toGRPC(obj, helper) {
15325
+ if (obj == null) {
15326
+ return null;
15327
+ } else {
15328
+ const grpc = {};
15329
+ if (obj['name'] != null) {
15330
+ grpc['name'] = $root.google.protobuf.StringValue.toGRPC(obj['name'], helper);
15331
+ }
15332
+ if (obj['applicationCode'] != null) {
15333
+ grpc['applicationCode'] = obj['applicationCode'];
15334
+ }
15335
+ return grpc;
15336
+ }
15337
+ }
15338
+ static fromGRPC(grpc, helper) {
15339
+ if (grpc == null) {
15340
+ return null;
15341
+ } else {
15342
+ const result = new $root.wix.coreservices.businessschema.v1.Error.SPIErrorData();
15343
+ if (grpc['name'] != null) {
15344
+ result['name'] = $root.google.protobuf.StringValue.fromGRPC(grpc['name'], helper);
15345
+ } else {
15346
+ delete result['name'];
15347
+ }
15348
+ if (grpc['applicationCode'] != null) {
15349
+ result['applicationCode'] = grpc['applicationCode'];
15350
+ } else {
15351
+ result['applicationCode'] = '';
15352
+ }
15353
+ return result;
15354
+ }
15355
+ }
15356
+ }
15357
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__proto', {
15358
+ value: pbjs => {
15359
+ return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error.SPIErrorData');
15360
+ },
15361
+ enumerable: false,
15362
+ configurable: false
15363
+ });
15364
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__fqn__', {
15365
+ value: 'wix.coreservices.businessschema.v1.Error.SPIErrorData',
15366
+ enumerable: false,
15367
+ configurable: false
15368
+ });
15369
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__options__', {
15370
+ value: $root.__options,
15371
+ enumerable: false,
15372
+ configurable: false
15373
+ });
15374
+ __builtIn.Object.defineProperty(SPIErrorData.prototype, '__root__', {
15375
+ value: $root,
15376
+ enumerable: false,
15377
+ configurable: false
15378
+ });
15379
+ return SPIErrorData;
15380
+ }());;
14609
15381
  __builtIn.Object.defineProperty(Error.prototype, '__proto', {
14610
15382
  value: pbjs => {
14611
15383
  return $root.__lookup(pbjs)('wix.coreservices.businessschema.v1.Error');