@sellout/models 0.0.230 → 0.0.233
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/.dist/sellout-proto.js +335 -0
- package/package.json +3 -3
- package/src/proto/stripe.proto +6 -0
package/.dist/sellout-proto.js
CHANGED
|
@@ -111479,6 +111479,308 @@ $root.CreateStripeTerminalConnectionTokenResponse = (function() {
|
|
|
111479
111479
|
return CreateStripeTerminalConnectionTokenResponse;
|
|
111480
111480
|
})();
|
|
111481
111481
|
|
|
111482
|
+
$root.CreateStripeLocationIdResponse = (function() {
|
|
111483
|
+
|
|
111484
|
+
/**
|
|
111485
|
+
* Properties of a CreateStripeLocationIdResponse.
|
|
111486
|
+
* @exports ICreateStripeLocationIdResponse
|
|
111487
|
+
* @interface ICreateStripeLocationIdResponse
|
|
111488
|
+
* @property {StatusCode|null} [status] CreateStripeLocationIdResponse status
|
|
111489
|
+
* @property {Array.<IError>|null} [errors] CreateStripeLocationIdResponse errors
|
|
111490
|
+
* @property {string|null} [locationId] CreateStripeLocationIdResponse locationId
|
|
111491
|
+
*/
|
|
111492
|
+
|
|
111493
|
+
/**
|
|
111494
|
+
* Constructs a new CreateStripeLocationIdResponse.
|
|
111495
|
+
* @exports CreateStripeLocationIdResponse
|
|
111496
|
+
* @classdesc Represents a CreateStripeLocationIdResponse.
|
|
111497
|
+
* @implements ICreateStripeLocationIdResponse
|
|
111498
|
+
* @constructor
|
|
111499
|
+
* @param {ICreateStripeLocationIdResponse=} [properties] Properties to set
|
|
111500
|
+
*/
|
|
111501
|
+
function CreateStripeLocationIdResponse(properties) {
|
|
111502
|
+
this.errors = [];
|
|
111503
|
+
if (properties)
|
|
111504
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
111505
|
+
if (properties[keys[i]] != null)
|
|
111506
|
+
this[keys[i]] = properties[keys[i]];
|
|
111507
|
+
}
|
|
111508
|
+
|
|
111509
|
+
/**
|
|
111510
|
+
* CreateStripeLocationIdResponse status.
|
|
111511
|
+
* @member {StatusCode} status
|
|
111512
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111513
|
+
* @instance
|
|
111514
|
+
*/
|
|
111515
|
+
CreateStripeLocationIdResponse.prototype.status = 0;
|
|
111516
|
+
|
|
111517
|
+
/**
|
|
111518
|
+
* CreateStripeLocationIdResponse errors.
|
|
111519
|
+
* @member {Array.<IError>} errors
|
|
111520
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111521
|
+
* @instance
|
|
111522
|
+
*/
|
|
111523
|
+
CreateStripeLocationIdResponse.prototype.errors = $util.emptyArray;
|
|
111524
|
+
|
|
111525
|
+
/**
|
|
111526
|
+
* CreateStripeLocationIdResponse locationId.
|
|
111527
|
+
* @member {string} locationId
|
|
111528
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111529
|
+
* @instance
|
|
111530
|
+
*/
|
|
111531
|
+
CreateStripeLocationIdResponse.prototype.locationId = "";
|
|
111532
|
+
|
|
111533
|
+
/**
|
|
111534
|
+
* Creates a new CreateStripeLocationIdResponse instance using the specified properties.
|
|
111535
|
+
* @function create
|
|
111536
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111537
|
+
* @static
|
|
111538
|
+
* @param {ICreateStripeLocationIdResponse=} [properties] Properties to set
|
|
111539
|
+
* @returns {CreateStripeLocationIdResponse} CreateStripeLocationIdResponse instance
|
|
111540
|
+
*/
|
|
111541
|
+
CreateStripeLocationIdResponse.create = function create(properties) {
|
|
111542
|
+
return new CreateStripeLocationIdResponse(properties);
|
|
111543
|
+
};
|
|
111544
|
+
|
|
111545
|
+
/**
|
|
111546
|
+
* Encodes the specified CreateStripeLocationIdResponse message. Does not implicitly {@link CreateStripeLocationIdResponse.verify|verify} messages.
|
|
111547
|
+
* @function encode
|
|
111548
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111549
|
+
* @static
|
|
111550
|
+
* @param {ICreateStripeLocationIdResponse} message CreateStripeLocationIdResponse message or plain object to encode
|
|
111551
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
111552
|
+
* @returns {$protobuf.Writer} Writer
|
|
111553
|
+
*/
|
|
111554
|
+
CreateStripeLocationIdResponse.encode = function encode(message, writer) {
|
|
111555
|
+
if (!writer)
|
|
111556
|
+
writer = $Writer.create();
|
|
111557
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
111558
|
+
writer.uint32(/* id 0, wireType 0 =*/0).int32(message.status);
|
|
111559
|
+
if (message.errors != null && message.errors.length)
|
|
111560
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
111561
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
111562
|
+
if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId"))
|
|
111563
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.locationId);
|
|
111564
|
+
return writer;
|
|
111565
|
+
};
|
|
111566
|
+
|
|
111567
|
+
/**
|
|
111568
|
+
* Encodes the specified CreateStripeLocationIdResponse message, length delimited. Does not implicitly {@link CreateStripeLocationIdResponse.verify|verify} messages.
|
|
111569
|
+
* @function encodeDelimited
|
|
111570
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111571
|
+
* @static
|
|
111572
|
+
* @param {ICreateStripeLocationIdResponse} message CreateStripeLocationIdResponse message or plain object to encode
|
|
111573
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
111574
|
+
* @returns {$protobuf.Writer} Writer
|
|
111575
|
+
*/
|
|
111576
|
+
CreateStripeLocationIdResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
111577
|
+
return this.encode(message, writer).ldelim();
|
|
111578
|
+
};
|
|
111579
|
+
|
|
111580
|
+
/**
|
|
111581
|
+
* Decodes a CreateStripeLocationIdResponse message from the specified reader or buffer.
|
|
111582
|
+
* @function decode
|
|
111583
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111584
|
+
* @static
|
|
111585
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
111586
|
+
* @param {number} [length] Message length if known beforehand
|
|
111587
|
+
* @returns {CreateStripeLocationIdResponse} CreateStripeLocationIdResponse
|
|
111588
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
111589
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
111590
|
+
*/
|
|
111591
|
+
CreateStripeLocationIdResponse.decode = function decode(reader, length) {
|
|
111592
|
+
if (!(reader instanceof $Reader))
|
|
111593
|
+
reader = $Reader.create(reader);
|
|
111594
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CreateStripeLocationIdResponse();
|
|
111595
|
+
while (reader.pos < end) {
|
|
111596
|
+
var tag = reader.uint32();
|
|
111597
|
+
switch (tag >>> 3) {
|
|
111598
|
+
case 0:
|
|
111599
|
+
message.status = reader.int32();
|
|
111600
|
+
break;
|
|
111601
|
+
case 1:
|
|
111602
|
+
if (!(message.errors && message.errors.length))
|
|
111603
|
+
message.errors = [];
|
|
111604
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
111605
|
+
break;
|
|
111606
|
+
case 2:
|
|
111607
|
+
message.locationId = reader.string();
|
|
111608
|
+
break;
|
|
111609
|
+
default:
|
|
111610
|
+
reader.skipType(tag & 7);
|
|
111611
|
+
break;
|
|
111612
|
+
}
|
|
111613
|
+
}
|
|
111614
|
+
return message;
|
|
111615
|
+
};
|
|
111616
|
+
|
|
111617
|
+
/**
|
|
111618
|
+
* Decodes a CreateStripeLocationIdResponse message from the specified reader or buffer, length delimited.
|
|
111619
|
+
* @function decodeDelimited
|
|
111620
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111621
|
+
* @static
|
|
111622
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
111623
|
+
* @returns {CreateStripeLocationIdResponse} CreateStripeLocationIdResponse
|
|
111624
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
111625
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
111626
|
+
*/
|
|
111627
|
+
CreateStripeLocationIdResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
111628
|
+
if (!(reader instanceof $Reader))
|
|
111629
|
+
reader = new $Reader(reader);
|
|
111630
|
+
return this.decode(reader, reader.uint32());
|
|
111631
|
+
};
|
|
111632
|
+
|
|
111633
|
+
/**
|
|
111634
|
+
* Verifies a CreateStripeLocationIdResponse message.
|
|
111635
|
+
* @function verify
|
|
111636
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111637
|
+
* @static
|
|
111638
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
111639
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
111640
|
+
*/
|
|
111641
|
+
CreateStripeLocationIdResponse.verify = function verify(message) {
|
|
111642
|
+
if (typeof message !== "object" || message === null)
|
|
111643
|
+
return "object expected";
|
|
111644
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
111645
|
+
switch (message.status) {
|
|
111646
|
+
default:
|
|
111647
|
+
return "status: enum value expected";
|
|
111648
|
+
case 0:
|
|
111649
|
+
case 200:
|
|
111650
|
+
case 400:
|
|
111651
|
+
case 401:
|
|
111652
|
+
case 403:
|
|
111653
|
+
case 422:
|
|
111654
|
+
case 404:
|
|
111655
|
+
case 500:
|
|
111656
|
+
case 504:
|
|
111657
|
+
break;
|
|
111658
|
+
}
|
|
111659
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
111660
|
+
if (!Array.isArray(message.errors))
|
|
111661
|
+
return "errors: array expected";
|
|
111662
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
111663
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
111664
|
+
if (error)
|
|
111665
|
+
return "errors." + error;
|
|
111666
|
+
}
|
|
111667
|
+
}
|
|
111668
|
+
if (message.locationId != null && message.hasOwnProperty("locationId"))
|
|
111669
|
+
if (!$util.isString(message.locationId))
|
|
111670
|
+
return "locationId: string expected";
|
|
111671
|
+
return null;
|
|
111672
|
+
};
|
|
111673
|
+
|
|
111674
|
+
/**
|
|
111675
|
+
* Creates a CreateStripeLocationIdResponse message from a plain object. Also converts values to their respective internal types.
|
|
111676
|
+
* @function fromObject
|
|
111677
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111678
|
+
* @static
|
|
111679
|
+
* @param {Object.<string,*>} object Plain object
|
|
111680
|
+
* @returns {CreateStripeLocationIdResponse} CreateStripeLocationIdResponse
|
|
111681
|
+
*/
|
|
111682
|
+
CreateStripeLocationIdResponse.fromObject = function fromObject(object) {
|
|
111683
|
+
if (object instanceof $root.CreateStripeLocationIdResponse)
|
|
111684
|
+
return object;
|
|
111685
|
+
var message = new $root.CreateStripeLocationIdResponse();
|
|
111686
|
+
switch (object.status) {
|
|
111687
|
+
case "UNKNOWN_CODE":
|
|
111688
|
+
case 0:
|
|
111689
|
+
message.status = 0;
|
|
111690
|
+
break;
|
|
111691
|
+
case "OK":
|
|
111692
|
+
case 200:
|
|
111693
|
+
message.status = 200;
|
|
111694
|
+
break;
|
|
111695
|
+
case "BAD_REQUEST":
|
|
111696
|
+
case 400:
|
|
111697
|
+
message.status = 400;
|
|
111698
|
+
break;
|
|
111699
|
+
case "UNAUTHORIZED":
|
|
111700
|
+
case 401:
|
|
111701
|
+
message.status = 401;
|
|
111702
|
+
break;
|
|
111703
|
+
case "FORBIDDEN":
|
|
111704
|
+
case 403:
|
|
111705
|
+
message.status = 403;
|
|
111706
|
+
break;
|
|
111707
|
+
case "UNPROCESSABLE_ENTITY":
|
|
111708
|
+
case 422:
|
|
111709
|
+
message.status = 422;
|
|
111710
|
+
break;
|
|
111711
|
+
case "NOT_FOUND":
|
|
111712
|
+
case 404:
|
|
111713
|
+
message.status = 404;
|
|
111714
|
+
break;
|
|
111715
|
+
case "INTERNAL_SERVER_ERROR":
|
|
111716
|
+
case 500:
|
|
111717
|
+
message.status = 500;
|
|
111718
|
+
break;
|
|
111719
|
+
case "GATEWAY_TIMEOUT":
|
|
111720
|
+
case 504:
|
|
111721
|
+
message.status = 504;
|
|
111722
|
+
break;
|
|
111723
|
+
}
|
|
111724
|
+
if (object.errors) {
|
|
111725
|
+
if (!Array.isArray(object.errors))
|
|
111726
|
+
throw TypeError(".CreateStripeLocationIdResponse.errors: array expected");
|
|
111727
|
+
message.errors = [];
|
|
111728
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
111729
|
+
if (typeof object.errors[i] !== "object")
|
|
111730
|
+
throw TypeError(".CreateStripeLocationIdResponse.errors: object expected");
|
|
111731
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
111732
|
+
}
|
|
111733
|
+
}
|
|
111734
|
+
if (object.locationId != null)
|
|
111735
|
+
message.locationId = String(object.locationId);
|
|
111736
|
+
return message;
|
|
111737
|
+
};
|
|
111738
|
+
|
|
111739
|
+
/**
|
|
111740
|
+
* Creates a plain object from a CreateStripeLocationIdResponse message. Also converts values to other types if specified.
|
|
111741
|
+
* @function toObject
|
|
111742
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111743
|
+
* @static
|
|
111744
|
+
* @param {CreateStripeLocationIdResponse} message CreateStripeLocationIdResponse
|
|
111745
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
111746
|
+
* @returns {Object.<string,*>} Plain object
|
|
111747
|
+
*/
|
|
111748
|
+
CreateStripeLocationIdResponse.toObject = function toObject(message, options) {
|
|
111749
|
+
if (!options)
|
|
111750
|
+
options = {};
|
|
111751
|
+
var object = {};
|
|
111752
|
+
if (options.arrays || options.defaults)
|
|
111753
|
+
object.errors = [];
|
|
111754
|
+
if (options.defaults) {
|
|
111755
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
111756
|
+
object.locationId = "";
|
|
111757
|
+
}
|
|
111758
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
111759
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
111760
|
+
if (message.errors && message.errors.length) {
|
|
111761
|
+
object.errors = [];
|
|
111762
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
111763
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
111764
|
+
}
|
|
111765
|
+
if (message.locationId != null && message.hasOwnProperty("locationId"))
|
|
111766
|
+
object.locationId = message.locationId;
|
|
111767
|
+
return object;
|
|
111768
|
+
};
|
|
111769
|
+
|
|
111770
|
+
/**
|
|
111771
|
+
* Converts this CreateStripeLocationIdResponse to JSON.
|
|
111772
|
+
* @function toJSON
|
|
111773
|
+
* @memberof CreateStripeLocationIdResponse
|
|
111774
|
+
* @instance
|
|
111775
|
+
* @returns {Object.<string,*>} JSON object
|
|
111776
|
+
*/
|
|
111777
|
+
CreateStripeLocationIdResponse.prototype.toJSON = function toJSON() {
|
|
111778
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
111779
|
+
};
|
|
111780
|
+
|
|
111781
|
+
return CreateStripeLocationIdResponse;
|
|
111782
|
+
})();
|
|
111783
|
+
|
|
111482
111784
|
$root.StripeService = (function() {
|
|
111483
111785
|
|
|
111484
111786
|
/**
|
|
@@ -112204,6 +112506,39 @@ $root.StripeService = (function() {
|
|
|
112204
112506
|
* @variation 2
|
|
112205
112507
|
*/
|
|
112206
112508
|
|
|
112509
|
+
/**
|
|
112510
|
+
* Callback as used by {@link StripeService#createStripeLocationId}.
|
|
112511
|
+
* @memberof StripeService
|
|
112512
|
+
* @typedef createStripeLocationIdCallback
|
|
112513
|
+
* @type {function}
|
|
112514
|
+
* @param {Error|null} error Error, if any
|
|
112515
|
+
* @param {CreateStripeLocationIdResponse} [response] CreateStripeLocationIdResponse
|
|
112516
|
+
*/
|
|
112517
|
+
|
|
112518
|
+
/**
|
|
112519
|
+
* Calls createStripeLocationId.
|
|
112520
|
+
* @function createStripeLocationId
|
|
112521
|
+
* @memberof StripeService
|
|
112522
|
+
* @instance
|
|
112523
|
+
* @param {ICreateStripeTerminalConnectionTokenRequest} request CreateStripeTerminalConnectionTokenRequest message or plain object
|
|
112524
|
+
* @param {StripeService.createStripeLocationIdCallback} callback Node-style callback called with the error, if any, and CreateStripeLocationIdResponse
|
|
112525
|
+
* @returns {undefined}
|
|
112526
|
+
* @variation 1
|
|
112527
|
+
*/
|
|
112528
|
+
Object.defineProperty(StripeService.prototype.createStripeLocationId = function createStripeLocationId(request, callback) {
|
|
112529
|
+
return this.rpcCall(createStripeLocationId, $root.CreateStripeTerminalConnectionTokenRequest, $root.CreateStripeLocationIdResponse, request, callback);
|
|
112530
|
+
}, "name", { value: "createStripeLocationId" });
|
|
112531
|
+
|
|
112532
|
+
/**
|
|
112533
|
+
* Calls createStripeLocationId.
|
|
112534
|
+
* @function createStripeLocationId
|
|
112535
|
+
* @memberof StripeService
|
|
112536
|
+
* @instance
|
|
112537
|
+
* @param {ICreateStripeTerminalConnectionTokenRequest} request CreateStripeTerminalConnectionTokenRequest message or plain object
|
|
112538
|
+
* @returns {Promise<CreateStripeLocationIdResponse>} Promise
|
|
112539
|
+
* @variation 2
|
|
112540
|
+
*/
|
|
112541
|
+
|
|
112207
112542
|
/**
|
|
112208
112543
|
* Callback as used by {@link StripeService#stripePublishKey}.
|
|
112209
112544
|
* @memberof StripeService
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.233",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@hapi/joi": "^16.1.7",
|
|
20
|
-
"@sellout/utils": "^0.0.
|
|
20
|
+
"@sellout/utils": "^0.0.233",
|
|
21
21
|
"@types/hapi__joi": "^16.0.1",
|
|
22
22
|
"@types/shortid": "^0.0.29",
|
|
23
23
|
"apollo-link-debounce": "^2.1.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"protobufjs": "^6.11.2",
|
|
32
32
|
"typescript": "^4.4.2"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "22f0498c33b5c8680e9ae50d6635933c1a2f754c"
|
|
35
35
|
}
|
package/src/proto/stripe.proto
CHANGED
|
@@ -367,6 +367,11 @@ message CreateStripeTerminalConnectionTokenResponse{
|
|
|
367
367
|
string connectionToken = 2;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
+
message CreateStripeLocationIdResponse{
|
|
371
|
+
StatusCode status = 0;
|
|
372
|
+
repeated Error errors = 1;
|
|
373
|
+
string locationId = 2;
|
|
374
|
+
}
|
|
370
375
|
|
|
371
376
|
/***************************************************************************************
|
|
372
377
|
RPC
|
|
@@ -400,6 +405,7 @@ service StripeService {
|
|
|
400
405
|
rpc listStripeTerminalReaders(ListStripeTerminalReadersRequest) returns (ListStripeTerminalReadersResponse) {}
|
|
401
406
|
rpc deleteStripeTerminalReader(DeleteStripeTerminalReaderRequest) returns (DeleteStripeTerminalReaderResponse) {}
|
|
402
407
|
rpc createStripeTerminalConnectionToken(CreateStripeTerminalConnectionTokenRequest) returns (CreateStripeTerminalConnectionTokenResponse) {}
|
|
408
|
+
rpc createStripeLocationId(CreateStripeTerminalConnectionTokenRequest) returns (CreateStripeLocationIdResponse) {}
|
|
403
409
|
rpc stripePublishKey(RetrieveStripeChargeRequest) returns (StripePublishKeyByResponse) {}
|
|
404
410
|
|
|
405
411
|
}
|