@headspace/protos-events 1.490.0 → 1.492.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +222 -1
- package/lib/index.js +608 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -182,7 +182,6 @@ export namespace auth0 {
|
|
|
182
182
|
SMSASSIST_OKTA_SSO = 22,
|
|
183
183
|
BOOKINGHOLDINGS_OKTA_SSO = 23,
|
|
184
184
|
MSFT_TEST_AZURE_SSO = 24,
|
|
185
|
-
CITADEL_OKTA_SSO = 25,
|
|
186
185
|
HEADSPACE_E2E_OKTA_SSO = 26,
|
|
187
186
|
MICROSOFT_AZURE_SSO = 27,
|
|
188
187
|
HOOTSUITE_OKTA_SSO = 28,
|
|
@@ -31239,6 +31238,228 @@ export class HeadspaceContentSharePreviewCreated implements IHeadspaceContentSha
|
|
|
31239
31238
|
public toJSON(): { [k: string]: any };
|
|
31240
31239
|
}
|
|
31241
31240
|
|
|
31241
|
+
/** Properties of an AmazonPurchasePeriod. */
|
|
31242
|
+
export interface IAmazonPurchasePeriod {
|
|
31243
|
+
|
|
31244
|
+
/** AmazonPurchasePeriod startsOn */
|
|
31245
|
+
startsOn?: (number|Long|null);
|
|
31246
|
+
|
|
31247
|
+
/** AmazonPurchasePeriod endsOn */
|
|
31248
|
+
endsOn?: (number|Long|null);
|
|
31249
|
+
}
|
|
31250
|
+
|
|
31251
|
+
/** Represents an AmazonPurchasePeriod. */
|
|
31252
|
+
export class AmazonPurchasePeriod implements IAmazonPurchasePeriod {
|
|
31253
|
+
|
|
31254
|
+
/**
|
|
31255
|
+
* Constructs a new AmazonPurchasePeriod.
|
|
31256
|
+
* @param [properties] Properties to set
|
|
31257
|
+
*/
|
|
31258
|
+
constructor(properties?: IAmazonPurchasePeriod);
|
|
31259
|
+
|
|
31260
|
+
/** AmazonPurchasePeriod startsOn. */
|
|
31261
|
+
public startsOn: (number|Long);
|
|
31262
|
+
|
|
31263
|
+
/** AmazonPurchasePeriod endsOn. */
|
|
31264
|
+
public endsOn: (number|Long);
|
|
31265
|
+
|
|
31266
|
+
/**
|
|
31267
|
+
* Creates a new AmazonPurchasePeriod instance using the specified properties.
|
|
31268
|
+
* @param [properties] Properties to set
|
|
31269
|
+
* @returns AmazonPurchasePeriod instance
|
|
31270
|
+
*/
|
|
31271
|
+
public static create(properties?: IAmazonPurchasePeriod): AmazonPurchasePeriod;
|
|
31272
|
+
|
|
31273
|
+
/**
|
|
31274
|
+
* Encodes the specified AmazonPurchasePeriod message. Does not implicitly {@link AmazonPurchasePeriod.verify|verify} messages.
|
|
31275
|
+
* @param message AmazonPurchasePeriod message or plain object to encode
|
|
31276
|
+
* @param [writer] Writer to encode to
|
|
31277
|
+
* @returns Writer
|
|
31278
|
+
*/
|
|
31279
|
+
public static encode(message: IAmazonPurchasePeriod, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
31280
|
+
|
|
31281
|
+
/**
|
|
31282
|
+
* Encodes the specified AmazonPurchasePeriod message, length delimited. Does not implicitly {@link AmazonPurchasePeriod.verify|verify} messages.
|
|
31283
|
+
* @param message AmazonPurchasePeriod message or plain object to encode
|
|
31284
|
+
* @param [writer] Writer to encode to
|
|
31285
|
+
* @returns Writer
|
|
31286
|
+
*/
|
|
31287
|
+
public static encodeDelimited(message: IAmazonPurchasePeriod, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
31288
|
+
|
|
31289
|
+
/**
|
|
31290
|
+
* Decodes an AmazonPurchasePeriod message from the specified reader or buffer.
|
|
31291
|
+
* @param reader Reader or buffer to decode from
|
|
31292
|
+
* @param [length] Message length if known beforehand
|
|
31293
|
+
* @returns AmazonPurchasePeriod
|
|
31294
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31295
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31296
|
+
*/
|
|
31297
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): AmazonPurchasePeriod;
|
|
31298
|
+
|
|
31299
|
+
/**
|
|
31300
|
+
* Decodes an AmazonPurchasePeriod message from the specified reader or buffer, length delimited.
|
|
31301
|
+
* @param reader Reader or buffer to decode from
|
|
31302
|
+
* @returns AmazonPurchasePeriod
|
|
31303
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31304
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31305
|
+
*/
|
|
31306
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): AmazonPurchasePeriod;
|
|
31307
|
+
|
|
31308
|
+
/**
|
|
31309
|
+
* Verifies an AmazonPurchasePeriod message.
|
|
31310
|
+
* @param message Plain object to verify
|
|
31311
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
31312
|
+
*/
|
|
31313
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
31314
|
+
|
|
31315
|
+
/**
|
|
31316
|
+
* Creates an AmazonPurchasePeriod message from a plain object. Also converts values to their respective internal types.
|
|
31317
|
+
* @param object Plain object
|
|
31318
|
+
* @returns AmazonPurchasePeriod
|
|
31319
|
+
*/
|
|
31320
|
+
public static fromObject(object: { [k: string]: any }): AmazonPurchasePeriod;
|
|
31321
|
+
|
|
31322
|
+
/**
|
|
31323
|
+
* Creates a plain object from an AmazonPurchasePeriod message. Also converts values to other types if specified.
|
|
31324
|
+
* @param message AmazonPurchasePeriod
|
|
31325
|
+
* @param [options] Conversion options
|
|
31326
|
+
* @returns Plain object
|
|
31327
|
+
*/
|
|
31328
|
+
public static toObject(message: AmazonPurchasePeriod, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
31329
|
+
|
|
31330
|
+
/**
|
|
31331
|
+
* Converts this AmazonPurchasePeriod to JSON.
|
|
31332
|
+
* @returns JSON object
|
|
31333
|
+
*/
|
|
31334
|
+
public toJSON(): { [k: string]: any };
|
|
31335
|
+
}
|
|
31336
|
+
|
|
31337
|
+
/** Properties of an AmazonPurchaseAmended. */
|
|
31338
|
+
export interface IAmazonPurchaseAmended {
|
|
31339
|
+
|
|
31340
|
+
/** primary id of the subscription */
|
|
31341
|
+
id?: (string|null);
|
|
31342
|
+
|
|
31343
|
+
/** when the purchase starts in epoch millis */
|
|
31344
|
+
startsOn?: (number|Long|null);
|
|
31345
|
+
|
|
31346
|
+
/** when the purchase ends in epoch millis */
|
|
31347
|
+
endsOn?: (number|Long|null);
|
|
31348
|
+
|
|
31349
|
+
/** whether or not the purchase autorenews */
|
|
31350
|
+
autorenew?: (boolean|null);
|
|
31351
|
+
|
|
31352
|
+
/** purchase sku */
|
|
31353
|
+
sku?: (string|null);
|
|
31354
|
+
|
|
31355
|
+
/** free-trial periods */
|
|
31356
|
+
freeTrialPeriods?: (IAmazonPurchasePeriod[]|null);
|
|
31357
|
+
|
|
31358
|
+
/** HSUSER identifier */
|
|
31359
|
+
userId?: (string|null);
|
|
31360
|
+
}
|
|
31361
|
+
|
|
31362
|
+
/** Represents an AmazonPurchaseAmended. */
|
|
31363
|
+
export class AmazonPurchaseAmended implements IAmazonPurchaseAmended {
|
|
31364
|
+
|
|
31365
|
+
/**
|
|
31366
|
+
* Constructs a new AmazonPurchaseAmended.
|
|
31367
|
+
* @param [properties] Properties to set
|
|
31368
|
+
*/
|
|
31369
|
+
constructor(properties?: IAmazonPurchaseAmended);
|
|
31370
|
+
|
|
31371
|
+
/** primary id of the subscription */
|
|
31372
|
+
public id: string;
|
|
31373
|
+
|
|
31374
|
+
/** when the purchase starts in epoch millis */
|
|
31375
|
+
public startsOn: (number|Long);
|
|
31376
|
+
|
|
31377
|
+
/** when the purchase ends in epoch millis */
|
|
31378
|
+
public endsOn: (number|Long);
|
|
31379
|
+
|
|
31380
|
+
/** whether or not the purchase autorenews */
|
|
31381
|
+
public autorenew: boolean;
|
|
31382
|
+
|
|
31383
|
+
/** purchase sku */
|
|
31384
|
+
public sku: string;
|
|
31385
|
+
|
|
31386
|
+
/** free-trial periods */
|
|
31387
|
+
public freeTrialPeriods: IAmazonPurchasePeriod[];
|
|
31388
|
+
|
|
31389
|
+
/** HSUSER identifier */
|
|
31390
|
+
public userId: string;
|
|
31391
|
+
|
|
31392
|
+
/**
|
|
31393
|
+
* Creates a new AmazonPurchaseAmended instance using the specified properties.
|
|
31394
|
+
* @param [properties] Properties to set
|
|
31395
|
+
* @returns AmazonPurchaseAmended instance
|
|
31396
|
+
*/
|
|
31397
|
+
public static create(properties?: IAmazonPurchaseAmended): AmazonPurchaseAmended;
|
|
31398
|
+
|
|
31399
|
+
/**
|
|
31400
|
+
* Encodes the specified AmazonPurchaseAmended message. Does not implicitly {@link AmazonPurchaseAmended.verify|verify} messages.
|
|
31401
|
+
* @param message AmazonPurchaseAmended message or plain object to encode
|
|
31402
|
+
* @param [writer] Writer to encode to
|
|
31403
|
+
* @returns Writer
|
|
31404
|
+
*/
|
|
31405
|
+
public static encode(message: IAmazonPurchaseAmended, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
31406
|
+
|
|
31407
|
+
/**
|
|
31408
|
+
* Encodes the specified AmazonPurchaseAmended message, length delimited. Does not implicitly {@link AmazonPurchaseAmended.verify|verify} messages.
|
|
31409
|
+
* @param message AmazonPurchaseAmended message or plain object to encode
|
|
31410
|
+
* @param [writer] Writer to encode to
|
|
31411
|
+
* @returns Writer
|
|
31412
|
+
*/
|
|
31413
|
+
public static encodeDelimited(message: IAmazonPurchaseAmended, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
31414
|
+
|
|
31415
|
+
/**
|
|
31416
|
+
* Decodes an AmazonPurchaseAmended message from the specified reader or buffer.
|
|
31417
|
+
* @param reader Reader or buffer to decode from
|
|
31418
|
+
* @param [length] Message length if known beforehand
|
|
31419
|
+
* @returns AmazonPurchaseAmended
|
|
31420
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31421
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31422
|
+
*/
|
|
31423
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): AmazonPurchaseAmended;
|
|
31424
|
+
|
|
31425
|
+
/**
|
|
31426
|
+
* Decodes an AmazonPurchaseAmended message from the specified reader or buffer, length delimited.
|
|
31427
|
+
* @param reader Reader or buffer to decode from
|
|
31428
|
+
* @returns AmazonPurchaseAmended
|
|
31429
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31430
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31431
|
+
*/
|
|
31432
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): AmazonPurchaseAmended;
|
|
31433
|
+
|
|
31434
|
+
/**
|
|
31435
|
+
* Verifies an AmazonPurchaseAmended message.
|
|
31436
|
+
* @param message Plain object to verify
|
|
31437
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
31438
|
+
*/
|
|
31439
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
31440
|
+
|
|
31441
|
+
/**
|
|
31442
|
+
* Creates an AmazonPurchaseAmended message from a plain object. Also converts values to their respective internal types.
|
|
31443
|
+
* @param object Plain object
|
|
31444
|
+
* @returns AmazonPurchaseAmended
|
|
31445
|
+
*/
|
|
31446
|
+
public static fromObject(object: { [k: string]: any }): AmazonPurchaseAmended;
|
|
31447
|
+
|
|
31448
|
+
/**
|
|
31449
|
+
* Creates a plain object from an AmazonPurchaseAmended message. Also converts values to other types if specified.
|
|
31450
|
+
* @param message AmazonPurchaseAmended
|
|
31451
|
+
* @param [options] Conversion options
|
|
31452
|
+
* @returns Plain object
|
|
31453
|
+
*/
|
|
31454
|
+
public static toObject(message: AmazonPurchaseAmended, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
31455
|
+
|
|
31456
|
+
/**
|
|
31457
|
+
* Converts this AmazonPurchaseAmended to JSON.
|
|
31458
|
+
* @returns JSON object
|
|
31459
|
+
*/
|
|
31460
|
+
public toJSON(): { [k: string]: any };
|
|
31461
|
+
}
|
|
31462
|
+
|
|
31242
31463
|
/** Properties of an IosSubscriptionCreated. */
|
|
31243
31464
|
export interface IIosSubscriptionCreated {
|
|
31244
31465
|
|
package/lib/index.js
CHANGED
|
@@ -400,7 +400,6 @@ $root.auth0 = (function() {
|
|
|
400
400
|
* @property {number} SMSASSIST_OKTA_SSO=22 SMSASSIST_OKTA_SSO value
|
|
401
401
|
* @property {number} BOOKINGHOLDINGS_OKTA_SSO=23 BOOKINGHOLDINGS_OKTA_SSO value
|
|
402
402
|
* @property {number} MSFT_TEST_AZURE_SSO=24 MSFT_TEST_AZURE_SSO value
|
|
403
|
-
* @property {number} CITADEL_OKTA_SSO=25 CITADEL_OKTA_SSO value
|
|
404
403
|
* @property {number} HEADSPACE_E2E_OKTA_SSO=26 HEADSPACE_E2E_OKTA_SSO value
|
|
405
404
|
* @property {number} MICROSOFT_AZURE_SSO=27 MICROSOFT_AZURE_SSO value
|
|
406
405
|
* @property {number} HOOTSUITE_OKTA_SSO=28 HOOTSUITE_OKTA_SSO value
|
|
@@ -441,7 +440,6 @@ $root.auth0 = (function() {
|
|
|
441
440
|
values[valuesById[22] = "SMSASSIST_OKTA_SSO"] = 22;
|
|
442
441
|
values[valuesById[23] = "BOOKINGHOLDINGS_OKTA_SSO"] = 23;
|
|
443
442
|
values[valuesById[24] = "MSFT_TEST_AZURE_SSO"] = 24;
|
|
444
|
-
values[valuesById[25] = "CITADEL_OKTA_SSO"] = 25;
|
|
445
443
|
values[valuesById[26] = "HEADSPACE_E2E_OKTA_SSO"] = 26;
|
|
446
444
|
values[valuesById[27] = "MICROSOFT_AZURE_SSO"] = 27;
|
|
447
445
|
values[valuesById[28] = "HOOTSUITE_OKTA_SSO"] = 28;
|
|
@@ -86841,6 +86839,614 @@ $root.HeadspaceContentSharePreviewCreated = (function() {
|
|
|
86841
86839
|
return HeadspaceContentSharePreviewCreated;
|
|
86842
86840
|
})();
|
|
86843
86841
|
|
|
86842
|
+
$root.AmazonPurchasePeriod = (function() {
|
|
86843
|
+
|
|
86844
|
+
/**
|
|
86845
|
+
* Properties of an AmazonPurchasePeriod.
|
|
86846
|
+
* @name IAmazonPurchasePeriod
|
|
86847
|
+
* @interface IAmazonPurchasePeriod
|
|
86848
|
+
* @property {number|Long|null} [startsOn] AmazonPurchasePeriod startsOn
|
|
86849
|
+
* @property {number|Long|null} [endsOn] AmazonPurchasePeriod endsOn
|
|
86850
|
+
*/
|
|
86851
|
+
|
|
86852
|
+
/**
|
|
86853
|
+
* Constructs a new AmazonPurchasePeriod.
|
|
86854
|
+
* @name AmazonPurchasePeriod
|
|
86855
|
+
* @classdesc Represents an AmazonPurchasePeriod.
|
|
86856
|
+
* @implements IAmazonPurchasePeriod
|
|
86857
|
+
* @constructor
|
|
86858
|
+
* @param {IAmazonPurchasePeriod=} [properties] Properties to set
|
|
86859
|
+
*/
|
|
86860
|
+
function AmazonPurchasePeriod(properties) {
|
|
86861
|
+
if (properties)
|
|
86862
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
86863
|
+
if (properties[keys[i]] != null)
|
|
86864
|
+
this[keys[i]] = properties[keys[i]];
|
|
86865
|
+
}
|
|
86866
|
+
|
|
86867
|
+
/**
|
|
86868
|
+
* AmazonPurchasePeriod startsOn.
|
|
86869
|
+
* @member {number|Long} startsOn
|
|
86870
|
+
* @memberof AmazonPurchasePeriod
|
|
86871
|
+
* @instance
|
|
86872
|
+
*/
|
|
86873
|
+
AmazonPurchasePeriod.prototype.startsOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
86874
|
+
|
|
86875
|
+
/**
|
|
86876
|
+
* AmazonPurchasePeriod endsOn.
|
|
86877
|
+
* @member {number|Long} endsOn
|
|
86878
|
+
* @memberof AmazonPurchasePeriod
|
|
86879
|
+
* @instance
|
|
86880
|
+
*/
|
|
86881
|
+
AmazonPurchasePeriod.prototype.endsOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
86882
|
+
|
|
86883
|
+
/**
|
|
86884
|
+
* Creates a new AmazonPurchasePeriod instance using the specified properties.
|
|
86885
|
+
* @function create
|
|
86886
|
+
* @memberof AmazonPurchasePeriod
|
|
86887
|
+
* @static
|
|
86888
|
+
* @param {IAmazonPurchasePeriod=} [properties] Properties to set
|
|
86889
|
+
* @returns {AmazonPurchasePeriod} AmazonPurchasePeriod instance
|
|
86890
|
+
*/
|
|
86891
|
+
AmazonPurchasePeriod.create = function create(properties) {
|
|
86892
|
+
return new AmazonPurchasePeriod(properties);
|
|
86893
|
+
};
|
|
86894
|
+
|
|
86895
|
+
/**
|
|
86896
|
+
* Encodes the specified AmazonPurchasePeriod message. Does not implicitly {@link AmazonPurchasePeriod.verify|verify} messages.
|
|
86897
|
+
* @function encode
|
|
86898
|
+
* @memberof AmazonPurchasePeriod
|
|
86899
|
+
* @static
|
|
86900
|
+
* @param {IAmazonPurchasePeriod} message AmazonPurchasePeriod message or plain object to encode
|
|
86901
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
86902
|
+
* @returns {$protobuf.Writer} Writer
|
|
86903
|
+
*/
|
|
86904
|
+
AmazonPurchasePeriod.encode = function encode(message, writer) {
|
|
86905
|
+
if (!writer)
|
|
86906
|
+
writer = $Writer.create();
|
|
86907
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
86908
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startsOn);
|
|
86909
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
86910
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.endsOn);
|
|
86911
|
+
return writer;
|
|
86912
|
+
};
|
|
86913
|
+
|
|
86914
|
+
/**
|
|
86915
|
+
* Encodes the specified AmazonPurchasePeriod message, length delimited. Does not implicitly {@link AmazonPurchasePeriod.verify|verify} messages.
|
|
86916
|
+
* @function encodeDelimited
|
|
86917
|
+
* @memberof AmazonPurchasePeriod
|
|
86918
|
+
* @static
|
|
86919
|
+
* @param {IAmazonPurchasePeriod} message AmazonPurchasePeriod message or plain object to encode
|
|
86920
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
86921
|
+
* @returns {$protobuf.Writer} Writer
|
|
86922
|
+
*/
|
|
86923
|
+
AmazonPurchasePeriod.encodeDelimited = function encodeDelimited(message, writer) {
|
|
86924
|
+
return this.encode(message, writer).ldelim();
|
|
86925
|
+
};
|
|
86926
|
+
|
|
86927
|
+
/**
|
|
86928
|
+
* Decodes an AmazonPurchasePeriod message from the specified reader or buffer.
|
|
86929
|
+
* @function decode
|
|
86930
|
+
* @memberof AmazonPurchasePeriod
|
|
86931
|
+
* @static
|
|
86932
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
86933
|
+
* @param {number} [length] Message length if known beforehand
|
|
86934
|
+
* @returns {AmazonPurchasePeriod} AmazonPurchasePeriod
|
|
86935
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
86936
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
86937
|
+
*/
|
|
86938
|
+
AmazonPurchasePeriod.decode = function decode(reader, length) {
|
|
86939
|
+
if (!(reader instanceof $Reader))
|
|
86940
|
+
reader = $Reader.create(reader);
|
|
86941
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AmazonPurchasePeriod();
|
|
86942
|
+
while (reader.pos < end) {
|
|
86943
|
+
var tag = reader.uint32();
|
|
86944
|
+
switch (tag >>> 3) {
|
|
86945
|
+
case 1:
|
|
86946
|
+
message.startsOn = reader.uint64();
|
|
86947
|
+
break;
|
|
86948
|
+
case 2:
|
|
86949
|
+
message.endsOn = reader.uint64();
|
|
86950
|
+
break;
|
|
86951
|
+
default:
|
|
86952
|
+
reader.skipType(tag & 7);
|
|
86953
|
+
break;
|
|
86954
|
+
}
|
|
86955
|
+
}
|
|
86956
|
+
return message;
|
|
86957
|
+
};
|
|
86958
|
+
|
|
86959
|
+
/**
|
|
86960
|
+
* Decodes an AmazonPurchasePeriod message from the specified reader or buffer, length delimited.
|
|
86961
|
+
* @function decodeDelimited
|
|
86962
|
+
* @memberof AmazonPurchasePeriod
|
|
86963
|
+
* @static
|
|
86964
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
86965
|
+
* @returns {AmazonPurchasePeriod} AmazonPurchasePeriod
|
|
86966
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
86967
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
86968
|
+
*/
|
|
86969
|
+
AmazonPurchasePeriod.decodeDelimited = function decodeDelimited(reader) {
|
|
86970
|
+
if (!(reader instanceof $Reader))
|
|
86971
|
+
reader = new $Reader(reader);
|
|
86972
|
+
return this.decode(reader, reader.uint32());
|
|
86973
|
+
};
|
|
86974
|
+
|
|
86975
|
+
/**
|
|
86976
|
+
* Verifies an AmazonPurchasePeriod message.
|
|
86977
|
+
* @function verify
|
|
86978
|
+
* @memberof AmazonPurchasePeriod
|
|
86979
|
+
* @static
|
|
86980
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
86981
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
86982
|
+
*/
|
|
86983
|
+
AmazonPurchasePeriod.verify = function verify(message) {
|
|
86984
|
+
if (typeof message !== "object" || message === null)
|
|
86985
|
+
return "object expected";
|
|
86986
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
86987
|
+
if (!$util.isInteger(message.startsOn) && !(message.startsOn && $util.isInteger(message.startsOn.low) && $util.isInteger(message.startsOn.high)))
|
|
86988
|
+
return "startsOn: integer|Long expected";
|
|
86989
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
86990
|
+
if (!$util.isInteger(message.endsOn) && !(message.endsOn && $util.isInteger(message.endsOn.low) && $util.isInteger(message.endsOn.high)))
|
|
86991
|
+
return "endsOn: integer|Long expected";
|
|
86992
|
+
return null;
|
|
86993
|
+
};
|
|
86994
|
+
|
|
86995
|
+
/**
|
|
86996
|
+
* Creates an AmazonPurchasePeriod message from a plain object. Also converts values to their respective internal types.
|
|
86997
|
+
* @function fromObject
|
|
86998
|
+
* @memberof AmazonPurchasePeriod
|
|
86999
|
+
* @static
|
|
87000
|
+
* @param {Object.<string,*>} object Plain object
|
|
87001
|
+
* @returns {AmazonPurchasePeriod} AmazonPurchasePeriod
|
|
87002
|
+
*/
|
|
87003
|
+
AmazonPurchasePeriod.fromObject = function fromObject(object) {
|
|
87004
|
+
if (object instanceof $root.AmazonPurchasePeriod)
|
|
87005
|
+
return object;
|
|
87006
|
+
var message = new $root.AmazonPurchasePeriod();
|
|
87007
|
+
if (object.startsOn != null)
|
|
87008
|
+
if ($util.Long)
|
|
87009
|
+
(message.startsOn = $util.Long.fromValue(object.startsOn)).unsigned = true;
|
|
87010
|
+
else if (typeof object.startsOn === "string")
|
|
87011
|
+
message.startsOn = parseInt(object.startsOn, 10);
|
|
87012
|
+
else if (typeof object.startsOn === "number")
|
|
87013
|
+
message.startsOn = object.startsOn;
|
|
87014
|
+
else if (typeof object.startsOn === "object")
|
|
87015
|
+
message.startsOn = new $util.LongBits(object.startsOn.low >>> 0, object.startsOn.high >>> 0).toNumber(true);
|
|
87016
|
+
if (object.endsOn != null)
|
|
87017
|
+
if ($util.Long)
|
|
87018
|
+
(message.endsOn = $util.Long.fromValue(object.endsOn)).unsigned = true;
|
|
87019
|
+
else if (typeof object.endsOn === "string")
|
|
87020
|
+
message.endsOn = parseInt(object.endsOn, 10);
|
|
87021
|
+
else if (typeof object.endsOn === "number")
|
|
87022
|
+
message.endsOn = object.endsOn;
|
|
87023
|
+
else if (typeof object.endsOn === "object")
|
|
87024
|
+
message.endsOn = new $util.LongBits(object.endsOn.low >>> 0, object.endsOn.high >>> 0).toNumber(true);
|
|
87025
|
+
return message;
|
|
87026
|
+
};
|
|
87027
|
+
|
|
87028
|
+
/**
|
|
87029
|
+
* Creates a plain object from an AmazonPurchasePeriod message. Also converts values to other types if specified.
|
|
87030
|
+
* @function toObject
|
|
87031
|
+
* @memberof AmazonPurchasePeriod
|
|
87032
|
+
* @static
|
|
87033
|
+
* @param {AmazonPurchasePeriod} message AmazonPurchasePeriod
|
|
87034
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
87035
|
+
* @returns {Object.<string,*>} Plain object
|
|
87036
|
+
*/
|
|
87037
|
+
AmazonPurchasePeriod.toObject = function toObject(message, options) {
|
|
87038
|
+
if (!options)
|
|
87039
|
+
options = {};
|
|
87040
|
+
var object = {};
|
|
87041
|
+
if (options.defaults) {
|
|
87042
|
+
if ($util.Long) {
|
|
87043
|
+
var long = new $util.Long(0, 0, true);
|
|
87044
|
+
object.startsOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
87045
|
+
} else
|
|
87046
|
+
object.startsOn = options.longs === String ? "0" : 0;
|
|
87047
|
+
if ($util.Long) {
|
|
87048
|
+
var long = new $util.Long(0, 0, true);
|
|
87049
|
+
object.endsOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
87050
|
+
} else
|
|
87051
|
+
object.endsOn = options.longs === String ? "0" : 0;
|
|
87052
|
+
}
|
|
87053
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
87054
|
+
if (typeof message.startsOn === "number")
|
|
87055
|
+
object.startsOn = options.longs === String ? String(message.startsOn) : message.startsOn;
|
|
87056
|
+
else
|
|
87057
|
+
object.startsOn = options.longs === String ? $util.Long.prototype.toString.call(message.startsOn) : options.longs === Number ? new $util.LongBits(message.startsOn.low >>> 0, message.startsOn.high >>> 0).toNumber(true) : message.startsOn;
|
|
87058
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
87059
|
+
if (typeof message.endsOn === "number")
|
|
87060
|
+
object.endsOn = options.longs === String ? String(message.endsOn) : message.endsOn;
|
|
87061
|
+
else
|
|
87062
|
+
object.endsOn = options.longs === String ? $util.Long.prototype.toString.call(message.endsOn) : options.longs === Number ? new $util.LongBits(message.endsOn.low >>> 0, message.endsOn.high >>> 0).toNumber(true) : message.endsOn;
|
|
87063
|
+
return object;
|
|
87064
|
+
};
|
|
87065
|
+
|
|
87066
|
+
/**
|
|
87067
|
+
* Converts this AmazonPurchasePeriod to JSON.
|
|
87068
|
+
* @function toJSON
|
|
87069
|
+
* @memberof AmazonPurchasePeriod
|
|
87070
|
+
* @instance
|
|
87071
|
+
* @returns {Object.<string,*>} JSON object
|
|
87072
|
+
*/
|
|
87073
|
+
AmazonPurchasePeriod.prototype.toJSON = function toJSON() {
|
|
87074
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
87075
|
+
};
|
|
87076
|
+
|
|
87077
|
+
return AmazonPurchasePeriod;
|
|
87078
|
+
})();
|
|
87079
|
+
|
|
87080
|
+
$root.AmazonPurchaseAmended = (function() {
|
|
87081
|
+
|
|
87082
|
+
/**
|
|
87083
|
+
* Properties of an AmazonPurchaseAmended.
|
|
87084
|
+
* @name IAmazonPurchaseAmended
|
|
87085
|
+
* @interface IAmazonPurchaseAmended
|
|
87086
|
+
* @property {string|null} [id] primary id of the subscription
|
|
87087
|
+
* @property {number|Long|null} [startsOn] when the purchase starts in epoch millis
|
|
87088
|
+
* @property {number|Long|null} [endsOn] when the purchase ends in epoch millis
|
|
87089
|
+
* @property {boolean|null} [autorenew] whether or not the purchase autorenews
|
|
87090
|
+
* @property {string|null} [sku] purchase sku
|
|
87091
|
+
* @property {Array.<IAmazonPurchasePeriod>|null} [freeTrialPeriods] free-trial periods
|
|
87092
|
+
* @property {string|null} [userId] HSUSER identifier
|
|
87093
|
+
*/
|
|
87094
|
+
|
|
87095
|
+
/**
|
|
87096
|
+
* Constructs a new AmazonPurchaseAmended.
|
|
87097
|
+
* @name AmazonPurchaseAmended
|
|
87098
|
+
* @classdesc Represents an AmazonPurchaseAmended.
|
|
87099
|
+
* @implements IAmazonPurchaseAmended
|
|
87100
|
+
* @constructor
|
|
87101
|
+
* @param {IAmazonPurchaseAmended=} [properties] Properties to set
|
|
87102
|
+
*/
|
|
87103
|
+
function AmazonPurchaseAmended(properties) {
|
|
87104
|
+
this.freeTrialPeriods = [];
|
|
87105
|
+
if (properties)
|
|
87106
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
87107
|
+
if (properties[keys[i]] != null)
|
|
87108
|
+
this[keys[i]] = properties[keys[i]];
|
|
87109
|
+
}
|
|
87110
|
+
|
|
87111
|
+
/**
|
|
87112
|
+
* primary id of the subscription
|
|
87113
|
+
* @member {string} id
|
|
87114
|
+
* @memberof AmazonPurchaseAmended
|
|
87115
|
+
* @instance
|
|
87116
|
+
*/
|
|
87117
|
+
AmazonPurchaseAmended.prototype.id = "";
|
|
87118
|
+
|
|
87119
|
+
/**
|
|
87120
|
+
* when the purchase starts in epoch millis
|
|
87121
|
+
* @member {number|Long} startsOn
|
|
87122
|
+
* @memberof AmazonPurchaseAmended
|
|
87123
|
+
* @instance
|
|
87124
|
+
*/
|
|
87125
|
+
AmazonPurchaseAmended.prototype.startsOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
87126
|
+
|
|
87127
|
+
/**
|
|
87128
|
+
* when the purchase ends in epoch millis
|
|
87129
|
+
* @member {number|Long} endsOn
|
|
87130
|
+
* @memberof AmazonPurchaseAmended
|
|
87131
|
+
* @instance
|
|
87132
|
+
*/
|
|
87133
|
+
AmazonPurchaseAmended.prototype.endsOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
87134
|
+
|
|
87135
|
+
/**
|
|
87136
|
+
* whether or not the purchase autorenews
|
|
87137
|
+
* @member {boolean} autorenew
|
|
87138
|
+
* @memberof AmazonPurchaseAmended
|
|
87139
|
+
* @instance
|
|
87140
|
+
*/
|
|
87141
|
+
AmazonPurchaseAmended.prototype.autorenew = false;
|
|
87142
|
+
|
|
87143
|
+
/**
|
|
87144
|
+
* purchase sku
|
|
87145
|
+
* @member {string} sku
|
|
87146
|
+
* @memberof AmazonPurchaseAmended
|
|
87147
|
+
* @instance
|
|
87148
|
+
*/
|
|
87149
|
+
AmazonPurchaseAmended.prototype.sku = "";
|
|
87150
|
+
|
|
87151
|
+
/**
|
|
87152
|
+
* free-trial periods
|
|
87153
|
+
* @member {Array.<IAmazonPurchasePeriod>} freeTrialPeriods
|
|
87154
|
+
* @memberof AmazonPurchaseAmended
|
|
87155
|
+
* @instance
|
|
87156
|
+
*/
|
|
87157
|
+
AmazonPurchaseAmended.prototype.freeTrialPeriods = $util.emptyArray;
|
|
87158
|
+
|
|
87159
|
+
/**
|
|
87160
|
+
* HSUSER identifier
|
|
87161
|
+
* @member {string} userId
|
|
87162
|
+
* @memberof AmazonPurchaseAmended
|
|
87163
|
+
* @instance
|
|
87164
|
+
*/
|
|
87165
|
+
AmazonPurchaseAmended.prototype.userId = "";
|
|
87166
|
+
|
|
87167
|
+
/**
|
|
87168
|
+
* Creates a new AmazonPurchaseAmended instance using the specified properties.
|
|
87169
|
+
* @function create
|
|
87170
|
+
* @memberof AmazonPurchaseAmended
|
|
87171
|
+
* @static
|
|
87172
|
+
* @param {IAmazonPurchaseAmended=} [properties] Properties to set
|
|
87173
|
+
* @returns {AmazonPurchaseAmended} AmazonPurchaseAmended instance
|
|
87174
|
+
*/
|
|
87175
|
+
AmazonPurchaseAmended.create = function create(properties) {
|
|
87176
|
+
return new AmazonPurchaseAmended(properties);
|
|
87177
|
+
};
|
|
87178
|
+
|
|
87179
|
+
/**
|
|
87180
|
+
* Encodes the specified AmazonPurchaseAmended message. Does not implicitly {@link AmazonPurchaseAmended.verify|verify} messages.
|
|
87181
|
+
* @function encode
|
|
87182
|
+
* @memberof AmazonPurchaseAmended
|
|
87183
|
+
* @static
|
|
87184
|
+
* @param {IAmazonPurchaseAmended} message AmazonPurchaseAmended message or plain object to encode
|
|
87185
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
87186
|
+
* @returns {$protobuf.Writer} Writer
|
|
87187
|
+
*/
|
|
87188
|
+
AmazonPurchaseAmended.encode = function encode(message, writer) {
|
|
87189
|
+
if (!writer)
|
|
87190
|
+
writer = $Writer.create();
|
|
87191
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
87192
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
|
|
87193
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
87194
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.startsOn);
|
|
87195
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
87196
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.endsOn);
|
|
87197
|
+
if (message.autorenew != null && message.hasOwnProperty("autorenew"))
|
|
87198
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autorenew);
|
|
87199
|
+
if (message.sku != null && message.hasOwnProperty("sku"))
|
|
87200
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.sku);
|
|
87201
|
+
if (message.freeTrialPeriods != null && message.freeTrialPeriods.length)
|
|
87202
|
+
for (var i = 0; i < message.freeTrialPeriods.length; ++i)
|
|
87203
|
+
$root.AmazonPurchasePeriod.encode(message.freeTrialPeriods[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
87204
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
87205
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.userId);
|
|
87206
|
+
return writer;
|
|
87207
|
+
};
|
|
87208
|
+
|
|
87209
|
+
/**
|
|
87210
|
+
* Encodes the specified AmazonPurchaseAmended message, length delimited. Does not implicitly {@link AmazonPurchaseAmended.verify|verify} messages.
|
|
87211
|
+
* @function encodeDelimited
|
|
87212
|
+
* @memberof AmazonPurchaseAmended
|
|
87213
|
+
* @static
|
|
87214
|
+
* @param {IAmazonPurchaseAmended} message AmazonPurchaseAmended message or plain object to encode
|
|
87215
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
87216
|
+
* @returns {$protobuf.Writer} Writer
|
|
87217
|
+
*/
|
|
87218
|
+
AmazonPurchaseAmended.encodeDelimited = function encodeDelimited(message, writer) {
|
|
87219
|
+
return this.encode(message, writer).ldelim();
|
|
87220
|
+
};
|
|
87221
|
+
|
|
87222
|
+
/**
|
|
87223
|
+
* Decodes an AmazonPurchaseAmended message from the specified reader or buffer.
|
|
87224
|
+
* @function decode
|
|
87225
|
+
* @memberof AmazonPurchaseAmended
|
|
87226
|
+
* @static
|
|
87227
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
87228
|
+
* @param {number} [length] Message length if known beforehand
|
|
87229
|
+
* @returns {AmazonPurchaseAmended} AmazonPurchaseAmended
|
|
87230
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
87231
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
87232
|
+
*/
|
|
87233
|
+
AmazonPurchaseAmended.decode = function decode(reader, length) {
|
|
87234
|
+
if (!(reader instanceof $Reader))
|
|
87235
|
+
reader = $Reader.create(reader);
|
|
87236
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AmazonPurchaseAmended();
|
|
87237
|
+
while (reader.pos < end) {
|
|
87238
|
+
var tag = reader.uint32();
|
|
87239
|
+
switch (tag >>> 3) {
|
|
87240
|
+
case 1:
|
|
87241
|
+
message.id = reader.string();
|
|
87242
|
+
break;
|
|
87243
|
+
case 2:
|
|
87244
|
+
message.startsOn = reader.uint64();
|
|
87245
|
+
break;
|
|
87246
|
+
case 3:
|
|
87247
|
+
message.endsOn = reader.uint64();
|
|
87248
|
+
break;
|
|
87249
|
+
case 4:
|
|
87250
|
+
message.autorenew = reader.bool();
|
|
87251
|
+
break;
|
|
87252
|
+
case 5:
|
|
87253
|
+
message.sku = reader.string();
|
|
87254
|
+
break;
|
|
87255
|
+
case 6:
|
|
87256
|
+
if (!(message.freeTrialPeriods && message.freeTrialPeriods.length))
|
|
87257
|
+
message.freeTrialPeriods = [];
|
|
87258
|
+
message.freeTrialPeriods.push($root.AmazonPurchasePeriod.decode(reader, reader.uint32()));
|
|
87259
|
+
break;
|
|
87260
|
+
case 7:
|
|
87261
|
+
message.userId = reader.string();
|
|
87262
|
+
break;
|
|
87263
|
+
default:
|
|
87264
|
+
reader.skipType(tag & 7);
|
|
87265
|
+
break;
|
|
87266
|
+
}
|
|
87267
|
+
}
|
|
87268
|
+
return message;
|
|
87269
|
+
};
|
|
87270
|
+
|
|
87271
|
+
/**
|
|
87272
|
+
* Decodes an AmazonPurchaseAmended message from the specified reader or buffer, length delimited.
|
|
87273
|
+
* @function decodeDelimited
|
|
87274
|
+
* @memberof AmazonPurchaseAmended
|
|
87275
|
+
* @static
|
|
87276
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
87277
|
+
* @returns {AmazonPurchaseAmended} AmazonPurchaseAmended
|
|
87278
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
87279
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
87280
|
+
*/
|
|
87281
|
+
AmazonPurchaseAmended.decodeDelimited = function decodeDelimited(reader) {
|
|
87282
|
+
if (!(reader instanceof $Reader))
|
|
87283
|
+
reader = new $Reader(reader);
|
|
87284
|
+
return this.decode(reader, reader.uint32());
|
|
87285
|
+
};
|
|
87286
|
+
|
|
87287
|
+
/**
|
|
87288
|
+
* Verifies an AmazonPurchaseAmended message.
|
|
87289
|
+
* @function verify
|
|
87290
|
+
* @memberof AmazonPurchaseAmended
|
|
87291
|
+
* @static
|
|
87292
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
87293
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
87294
|
+
*/
|
|
87295
|
+
AmazonPurchaseAmended.verify = function verify(message) {
|
|
87296
|
+
if (typeof message !== "object" || message === null)
|
|
87297
|
+
return "object expected";
|
|
87298
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
87299
|
+
if (!$util.isString(message.id))
|
|
87300
|
+
return "id: string expected";
|
|
87301
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
87302
|
+
if (!$util.isInteger(message.startsOn) && !(message.startsOn && $util.isInteger(message.startsOn.low) && $util.isInteger(message.startsOn.high)))
|
|
87303
|
+
return "startsOn: integer|Long expected";
|
|
87304
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
87305
|
+
if (!$util.isInteger(message.endsOn) && !(message.endsOn && $util.isInteger(message.endsOn.low) && $util.isInteger(message.endsOn.high)))
|
|
87306
|
+
return "endsOn: integer|Long expected";
|
|
87307
|
+
if (message.autorenew != null && message.hasOwnProperty("autorenew"))
|
|
87308
|
+
if (typeof message.autorenew !== "boolean")
|
|
87309
|
+
return "autorenew: boolean expected";
|
|
87310
|
+
if (message.sku != null && message.hasOwnProperty("sku"))
|
|
87311
|
+
if (!$util.isString(message.sku))
|
|
87312
|
+
return "sku: string expected";
|
|
87313
|
+
if (message.freeTrialPeriods != null && message.hasOwnProperty("freeTrialPeriods")) {
|
|
87314
|
+
if (!Array.isArray(message.freeTrialPeriods))
|
|
87315
|
+
return "freeTrialPeriods: array expected";
|
|
87316
|
+
for (var i = 0; i < message.freeTrialPeriods.length; ++i) {
|
|
87317
|
+
var error = $root.AmazonPurchasePeriod.verify(message.freeTrialPeriods[i]);
|
|
87318
|
+
if (error)
|
|
87319
|
+
return "freeTrialPeriods." + error;
|
|
87320
|
+
}
|
|
87321
|
+
}
|
|
87322
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
87323
|
+
if (!$util.isString(message.userId))
|
|
87324
|
+
return "userId: string expected";
|
|
87325
|
+
return null;
|
|
87326
|
+
};
|
|
87327
|
+
|
|
87328
|
+
/**
|
|
87329
|
+
* Creates an AmazonPurchaseAmended message from a plain object. Also converts values to their respective internal types.
|
|
87330
|
+
* @function fromObject
|
|
87331
|
+
* @memberof AmazonPurchaseAmended
|
|
87332
|
+
* @static
|
|
87333
|
+
* @param {Object.<string,*>} object Plain object
|
|
87334
|
+
* @returns {AmazonPurchaseAmended} AmazonPurchaseAmended
|
|
87335
|
+
*/
|
|
87336
|
+
AmazonPurchaseAmended.fromObject = function fromObject(object) {
|
|
87337
|
+
if (object instanceof $root.AmazonPurchaseAmended)
|
|
87338
|
+
return object;
|
|
87339
|
+
var message = new $root.AmazonPurchaseAmended();
|
|
87340
|
+
if (object.id != null)
|
|
87341
|
+
message.id = String(object.id);
|
|
87342
|
+
if (object.startsOn != null)
|
|
87343
|
+
if ($util.Long)
|
|
87344
|
+
(message.startsOn = $util.Long.fromValue(object.startsOn)).unsigned = true;
|
|
87345
|
+
else if (typeof object.startsOn === "string")
|
|
87346
|
+
message.startsOn = parseInt(object.startsOn, 10);
|
|
87347
|
+
else if (typeof object.startsOn === "number")
|
|
87348
|
+
message.startsOn = object.startsOn;
|
|
87349
|
+
else if (typeof object.startsOn === "object")
|
|
87350
|
+
message.startsOn = new $util.LongBits(object.startsOn.low >>> 0, object.startsOn.high >>> 0).toNumber(true);
|
|
87351
|
+
if (object.endsOn != null)
|
|
87352
|
+
if ($util.Long)
|
|
87353
|
+
(message.endsOn = $util.Long.fromValue(object.endsOn)).unsigned = true;
|
|
87354
|
+
else if (typeof object.endsOn === "string")
|
|
87355
|
+
message.endsOn = parseInt(object.endsOn, 10);
|
|
87356
|
+
else if (typeof object.endsOn === "number")
|
|
87357
|
+
message.endsOn = object.endsOn;
|
|
87358
|
+
else if (typeof object.endsOn === "object")
|
|
87359
|
+
message.endsOn = new $util.LongBits(object.endsOn.low >>> 0, object.endsOn.high >>> 0).toNumber(true);
|
|
87360
|
+
if (object.autorenew != null)
|
|
87361
|
+
message.autorenew = Boolean(object.autorenew);
|
|
87362
|
+
if (object.sku != null)
|
|
87363
|
+
message.sku = String(object.sku);
|
|
87364
|
+
if (object.freeTrialPeriods) {
|
|
87365
|
+
if (!Array.isArray(object.freeTrialPeriods))
|
|
87366
|
+
throw TypeError(".AmazonPurchaseAmended.freeTrialPeriods: array expected");
|
|
87367
|
+
message.freeTrialPeriods = [];
|
|
87368
|
+
for (var i = 0; i < object.freeTrialPeriods.length; ++i) {
|
|
87369
|
+
if (typeof object.freeTrialPeriods[i] !== "object")
|
|
87370
|
+
throw TypeError(".AmazonPurchaseAmended.freeTrialPeriods: object expected");
|
|
87371
|
+
message.freeTrialPeriods[i] = $root.AmazonPurchasePeriod.fromObject(object.freeTrialPeriods[i]);
|
|
87372
|
+
}
|
|
87373
|
+
}
|
|
87374
|
+
if (object.userId != null)
|
|
87375
|
+
message.userId = String(object.userId);
|
|
87376
|
+
return message;
|
|
87377
|
+
};
|
|
87378
|
+
|
|
87379
|
+
/**
|
|
87380
|
+
* Creates a plain object from an AmazonPurchaseAmended message. Also converts values to other types if specified.
|
|
87381
|
+
* @function toObject
|
|
87382
|
+
* @memberof AmazonPurchaseAmended
|
|
87383
|
+
* @static
|
|
87384
|
+
* @param {AmazonPurchaseAmended} message AmazonPurchaseAmended
|
|
87385
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
87386
|
+
* @returns {Object.<string,*>} Plain object
|
|
87387
|
+
*/
|
|
87388
|
+
AmazonPurchaseAmended.toObject = function toObject(message, options) {
|
|
87389
|
+
if (!options)
|
|
87390
|
+
options = {};
|
|
87391
|
+
var object = {};
|
|
87392
|
+
if (options.arrays || options.defaults)
|
|
87393
|
+
object.freeTrialPeriods = [];
|
|
87394
|
+
if (options.defaults) {
|
|
87395
|
+
object.id = "";
|
|
87396
|
+
if ($util.Long) {
|
|
87397
|
+
var long = new $util.Long(0, 0, true);
|
|
87398
|
+
object.startsOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
87399
|
+
} else
|
|
87400
|
+
object.startsOn = options.longs === String ? "0" : 0;
|
|
87401
|
+
if ($util.Long) {
|
|
87402
|
+
var long = new $util.Long(0, 0, true);
|
|
87403
|
+
object.endsOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
87404
|
+
} else
|
|
87405
|
+
object.endsOn = options.longs === String ? "0" : 0;
|
|
87406
|
+
object.autorenew = false;
|
|
87407
|
+
object.sku = "";
|
|
87408
|
+
object.userId = "";
|
|
87409
|
+
}
|
|
87410
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
87411
|
+
object.id = message.id;
|
|
87412
|
+
if (message.startsOn != null && message.hasOwnProperty("startsOn"))
|
|
87413
|
+
if (typeof message.startsOn === "number")
|
|
87414
|
+
object.startsOn = options.longs === String ? String(message.startsOn) : message.startsOn;
|
|
87415
|
+
else
|
|
87416
|
+
object.startsOn = options.longs === String ? $util.Long.prototype.toString.call(message.startsOn) : options.longs === Number ? new $util.LongBits(message.startsOn.low >>> 0, message.startsOn.high >>> 0).toNumber(true) : message.startsOn;
|
|
87417
|
+
if (message.endsOn != null && message.hasOwnProperty("endsOn"))
|
|
87418
|
+
if (typeof message.endsOn === "number")
|
|
87419
|
+
object.endsOn = options.longs === String ? String(message.endsOn) : message.endsOn;
|
|
87420
|
+
else
|
|
87421
|
+
object.endsOn = options.longs === String ? $util.Long.prototype.toString.call(message.endsOn) : options.longs === Number ? new $util.LongBits(message.endsOn.low >>> 0, message.endsOn.high >>> 0).toNumber(true) : message.endsOn;
|
|
87422
|
+
if (message.autorenew != null && message.hasOwnProperty("autorenew"))
|
|
87423
|
+
object.autorenew = message.autorenew;
|
|
87424
|
+
if (message.sku != null && message.hasOwnProperty("sku"))
|
|
87425
|
+
object.sku = message.sku;
|
|
87426
|
+
if (message.freeTrialPeriods && message.freeTrialPeriods.length) {
|
|
87427
|
+
object.freeTrialPeriods = [];
|
|
87428
|
+
for (var j = 0; j < message.freeTrialPeriods.length; ++j)
|
|
87429
|
+
object.freeTrialPeriods[j] = $root.AmazonPurchasePeriod.toObject(message.freeTrialPeriods[j], options);
|
|
87430
|
+
}
|
|
87431
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
87432
|
+
object.userId = message.userId;
|
|
87433
|
+
return object;
|
|
87434
|
+
};
|
|
87435
|
+
|
|
87436
|
+
/**
|
|
87437
|
+
* Converts this AmazonPurchaseAmended to JSON.
|
|
87438
|
+
* @function toJSON
|
|
87439
|
+
* @memberof AmazonPurchaseAmended
|
|
87440
|
+
* @instance
|
|
87441
|
+
* @returns {Object.<string,*>} JSON object
|
|
87442
|
+
*/
|
|
87443
|
+
AmazonPurchaseAmended.prototype.toJSON = function toJSON() {
|
|
87444
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
87445
|
+
};
|
|
87446
|
+
|
|
87447
|
+
return AmazonPurchaseAmended;
|
|
87448
|
+
})();
|
|
87449
|
+
|
|
86844
87450
|
$root.IosSubscriptionCreated = (function() {
|
|
86845
87451
|
|
|
86846
87452
|
/**
|
package/package.json
CHANGED