@moonbase.sh/storefront-api 1.0.37 → 2.0.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/dist/index.cjs +354 -235
- package/dist/index.d.cts +218 -12
- package/dist/index.d.ts +218 -12
- package/dist/index.js +354 -235
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
TokenStore: () => TokenStore,
|
|
48
48
|
objectToQuery: () => objectToQuery,
|
|
49
49
|
problemDetailsSchema: () => problemDetailsSchema,
|
|
50
|
-
schemas: () =>
|
|
50
|
+
schemas: () => schemas_exports12,
|
|
51
51
|
utmToObject: () => utmToObject
|
|
52
52
|
});
|
|
53
53
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -353,6 +353,81 @@ var ActivationRequestEndpoints = class {
|
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
+
// src/communications/schemas.ts
|
|
357
|
+
var schemas_exports4 = {};
|
|
358
|
+
__export(schemas_exports4, {
|
|
359
|
+
communicationPreferencesViewSchema: () => communicationPreferencesViewSchema,
|
|
360
|
+
subscribeResponseSchema: () => subscribeResponseSchema
|
|
361
|
+
});
|
|
362
|
+
var import_zod6 = require("zod");
|
|
363
|
+
var subscribeResponseSchema = import_zod6.z.object({
|
|
364
|
+
status: import_zod6.z.enum(["subscribed", "confirmation_sent"])
|
|
365
|
+
});
|
|
366
|
+
var communicationPreferencesViewSchema = import_zod6.z.object({
|
|
367
|
+
email: import_zod6.z.string(),
|
|
368
|
+
name: import_zod6.z.string().nullish(),
|
|
369
|
+
newsletter: import_zod6.z.boolean(),
|
|
370
|
+
productUpdates: import_zod6.z.boolean()
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// src/communications/endpoints.ts
|
|
374
|
+
function encodeToken(token) {
|
|
375
|
+
return encodeURIComponent(token.replaceAll(" ", "+"));
|
|
376
|
+
}
|
|
377
|
+
var CommunicationsEndpoints = class {
|
|
378
|
+
constructor(api) {
|
|
379
|
+
this.api = api;
|
|
380
|
+
}
|
|
381
|
+
async subscribe(input) {
|
|
382
|
+
var _a, _b, _c;
|
|
383
|
+
const response = await this.api.fetch("/api/customer/communications/subscribe", subscribeResponseSchema, {
|
|
384
|
+
method: "POST",
|
|
385
|
+
body: {
|
|
386
|
+
email: input.email,
|
|
387
|
+
name: ((_a = input.name) == null ? void 0 : _a.trim()) || null,
|
|
388
|
+
newsletter: (_b = input.newsletter) != null ? _b : true,
|
|
389
|
+
productUpdates: (_c = input.productUpdates) != null ? _c : true
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
return response.data;
|
|
393
|
+
}
|
|
394
|
+
async confirm(email, token) {
|
|
395
|
+
await this.api.fetch(
|
|
396
|
+
`/api/customer/communications/confirm?email=${encodeURIComponent(email)}&token=${encodeToken(token)}`,
|
|
397
|
+
null,
|
|
398
|
+
{ method: "POST" }
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
async getPreferences(email, token) {
|
|
402
|
+
const response = await this.api.fetch(
|
|
403
|
+
`/api/customer/communications/preferences?email=${encodeURIComponent(email)}&token=${encodeToken(token)}`,
|
|
404
|
+
communicationPreferencesViewSchema
|
|
405
|
+
);
|
|
406
|
+
return response.data;
|
|
407
|
+
}
|
|
408
|
+
async updatePreferences(email, token, preferences) {
|
|
409
|
+
const response = await this.api.fetch(
|
|
410
|
+
`/api/customer/communications/preferences?email=${encodeURIComponent(email)}&token=${encodeToken(token)}`,
|
|
411
|
+
communicationPreferencesViewSchema,
|
|
412
|
+
{
|
|
413
|
+
method: "POST",
|
|
414
|
+
body: {
|
|
415
|
+
newsletter: preferences.newsletter,
|
|
416
|
+
productUpdates: preferences.productUpdates
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
return response.data;
|
|
421
|
+
}
|
|
422
|
+
async unsubscribe(email, token) {
|
|
423
|
+
await this.api.fetch(
|
|
424
|
+
`/api/customer/communications/unsubscribe?email=${encodeURIComponent(email)}&token=${encodeToken(token)}`,
|
|
425
|
+
null,
|
|
426
|
+
{ method: "POST" }
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
|
|
356
431
|
// src/utils/errors.ts
|
|
357
432
|
var NotAuthorizedError = class extends Error {
|
|
358
433
|
constructor() {
|
|
@@ -392,14 +467,14 @@ var MoonbaseError = class extends Error {
|
|
|
392
467
|
};
|
|
393
468
|
|
|
394
469
|
// src/utils/problemDetails.ts
|
|
395
|
-
var
|
|
396
|
-
var problemDetailsSchema =
|
|
397
|
-
type:
|
|
398
|
-
title:
|
|
399
|
-
detail:
|
|
400
|
-
status:
|
|
401
|
-
instance:
|
|
402
|
-
errors:
|
|
470
|
+
var import_zod7 = require("zod");
|
|
471
|
+
var problemDetailsSchema = import_zod7.z.object({
|
|
472
|
+
type: import_zod7.z.string().optional(),
|
|
473
|
+
title: import_zod7.z.string(),
|
|
474
|
+
detail: import_zod7.z.string().optional(),
|
|
475
|
+
status: import_zod7.z.number().optional(),
|
|
476
|
+
instance: import_zod7.z.string().optional(),
|
|
477
|
+
errors: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.string().array()).optional()
|
|
403
478
|
});
|
|
404
479
|
|
|
405
480
|
// src/utils/problemHandler.ts
|
|
@@ -438,18 +513,20 @@ async function handleResponseProblem(response, logger) {
|
|
|
438
513
|
}
|
|
439
514
|
|
|
440
515
|
// src/identity/schemas.ts
|
|
441
|
-
var
|
|
442
|
-
__export(
|
|
516
|
+
var schemas_exports5 = {};
|
|
517
|
+
__export(schemas_exports5, {
|
|
443
518
|
addressSchema: () => addressSchema,
|
|
444
519
|
communicationPreferencesSchema: () => communicationPreferencesSchema,
|
|
445
520
|
connectedAccountSchema: () => connectedAccountSchema,
|
|
446
521
|
connectionUrlSchema: () => connectionUrlSchema,
|
|
447
522
|
identitySchema: () => identitySchema,
|
|
448
523
|
ilokConnectedAccountSchema: () => ilokConnectedAccountSchema,
|
|
524
|
+
pendingActivationSchema: () => pendingActivationSchema,
|
|
449
525
|
userAccountConfirmedSchema: () => userAccountConfirmedSchema,
|
|
526
|
+
userAccountConfirmedStatusSchema: () => userAccountConfirmedStatusSchema,
|
|
450
527
|
userSchema: () => userSchema
|
|
451
528
|
});
|
|
452
|
-
var
|
|
529
|
+
var import_zod8 = require("zod");
|
|
453
530
|
|
|
454
531
|
// src/identity/models.ts
|
|
455
532
|
var ConnectableAccountProvider = /* @__PURE__ */ ((ConnectableAccountProvider2) => {
|
|
@@ -458,54 +535,64 @@ var ConnectableAccountProvider = /* @__PURE__ */ ((ConnectableAccountProvider2)
|
|
|
458
535
|
})(ConnectableAccountProvider || {});
|
|
459
536
|
|
|
460
537
|
// src/identity/schemas.ts
|
|
461
|
-
var addressSchema =
|
|
462
|
-
countryCode:
|
|
463
|
-
streetAddress1:
|
|
464
|
-
streetAddress2:
|
|
465
|
-
locality:
|
|
466
|
-
region:
|
|
467
|
-
postCode:
|
|
538
|
+
var addressSchema = import_zod8.z.object({
|
|
539
|
+
countryCode: import_zod8.z.string(),
|
|
540
|
+
streetAddress1: import_zod8.z.string(),
|
|
541
|
+
streetAddress2: import_zod8.z.string().nullable(),
|
|
542
|
+
locality: import_zod8.z.string().nullable(),
|
|
543
|
+
region: import_zod8.z.string().nullable(),
|
|
544
|
+
postCode: import_zod8.z.string().nullable()
|
|
468
545
|
});
|
|
469
|
-
var communicationPreferencesSchema =
|
|
470
|
-
newsletterOptIn:
|
|
471
|
-
//
|
|
546
|
+
var communicationPreferencesSchema = import_zod8.z.object({
|
|
547
|
+
newsletterOptIn: import_zod8.z.boolean(),
|
|
548
|
+
// Default keeps older persisted identities (pre productUpdatesOptIn) parseable
|
|
549
|
+
// during boot. The server-side value is hydrated by updateUser() right after.
|
|
550
|
+
productUpdatesOptIn: import_zod8.z.boolean().default(false)
|
|
472
551
|
});
|
|
473
|
-
var ilokConnectedAccountSchema =
|
|
474
|
-
provider:
|
|
475
|
-
isConnected:
|
|
476
|
-
pendingLicenseFulfillments:
|
|
477
|
-
accountId:
|
|
552
|
+
var ilokConnectedAccountSchema = import_zod8.z.object({
|
|
553
|
+
provider: import_zod8.z.literal("iLok" /* iLok */),
|
|
554
|
+
isConnected: import_zod8.z.boolean(),
|
|
555
|
+
pendingLicenseFulfillments: import_zod8.z.boolean(),
|
|
556
|
+
accountId: import_zod8.z.string().nullish()
|
|
478
557
|
});
|
|
479
|
-
var connectedAccountSchema =
|
|
558
|
+
var connectedAccountSchema = import_zod8.z.discriminatedUnion("provider", [
|
|
480
559
|
ilokConnectedAccountSchema
|
|
481
560
|
]);
|
|
482
|
-
var connectionUrlSchema =
|
|
483
|
-
url:
|
|
561
|
+
var connectionUrlSchema = import_zod8.z.object({
|
|
562
|
+
url: import_zod8.z.string()
|
|
484
563
|
});
|
|
485
|
-
var userSchema =
|
|
486
|
-
id:
|
|
487
|
-
email:
|
|
488
|
-
name:
|
|
489
|
-
tenantId:
|
|
564
|
+
var userSchema = import_zod8.z.object({
|
|
565
|
+
id: import_zod8.z.string(),
|
|
566
|
+
email: import_zod8.z.string(),
|
|
567
|
+
name: import_zod8.z.string(),
|
|
568
|
+
tenantId: import_zod8.z.string(),
|
|
490
569
|
address: addressSchema.optional(),
|
|
491
|
-
phone:
|
|
570
|
+
phone: import_zod8.z.string().optional(),
|
|
492
571
|
communicationPreferences: communicationPreferencesSchema,
|
|
493
|
-
ownedProducts:
|
|
494
|
-
subscribedProducts:
|
|
495
|
-
confirmedAccount:
|
|
496
|
-
hasProducts:
|
|
497
|
-
hasSubscriptions:
|
|
498
|
-
connectedAccounts:
|
|
572
|
+
ownedProducts: import_zod8.z.string().array().optional(),
|
|
573
|
+
subscribedProducts: import_zod8.z.string().array().optional(),
|
|
574
|
+
confirmedAccount: import_zod8.z.boolean().optional(),
|
|
575
|
+
hasProducts: import_zod8.z.boolean().nullish(),
|
|
576
|
+
hasSubscriptions: import_zod8.z.boolean().nullish(),
|
|
577
|
+
connectedAccounts: import_zod8.z.array(connectedAccountSchema).default([])
|
|
499
578
|
});
|
|
500
|
-
var identitySchema = userSchema.and(
|
|
501
|
-
accessToken:
|
|
502
|
-
refreshToken:
|
|
579
|
+
var identitySchema = userSchema.and(import_zod8.z.object({
|
|
580
|
+
accessToken: import_zod8.z.string(),
|
|
581
|
+
refreshToken: import_zod8.z.string()
|
|
582
|
+
}));
|
|
583
|
+
var userAccountConfirmedStatusSchema = import_zod8.z.enum([
|
|
584
|
+
"PasswordSetupRequired",
|
|
585
|
+
"SignedIn"
|
|
586
|
+
]);
|
|
587
|
+
var userAccountConfirmedSchema = userSchema.and(import_zod8.z.object({
|
|
588
|
+
status: userAccountConfirmedStatusSchema,
|
|
589
|
+
resetPasswordToken: import_zod8.z.string().nullish(),
|
|
590
|
+
accessToken: import_zod8.z.string().nullish(),
|
|
591
|
+
refreshToken: import_zod8.z.string().nullish()
|
|
503
592
|
}));
|
|
504
|
-
var
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
email: import_zod7.z.string(),
|
|
508
|
-
resetPasswordToken: import_zod7.z.string().nullable()
|
|
593
|
+
var pendingActivationSchema = import_zod8.z.object({
|
|
594
|
+
status: import_zod8.z.literal("activation_pending"),
|
|
595
|
+
email: import_zod8.z.string()
|
|
509
596
|
});
|
|
510
597
|
|
|
511
598
|
// src/identity/endpoints.ts
|
|
@@ -544,19 +631,38 @@ var IdentityEndpoints = class {
|
|
|
544
631
|
}
|
|
545
632
|
}
|
|
546
633
|
async signUp(name, email, password, address, acceptedPrivacyPolicy, acceptedTermsAndConditions, communicationOptIn) {
|
|
547
|
-
const
|
|
634
|
+
const path = `/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${communicationOptIn ? "true" : "false"}`;
|
|
635
|
+
const response = await fetch(`${this.api.baseUrl}${path}`, {
|
|
548
636
|
method: "POST",
|
|
549
|
-
|
|
637
|
+
headers: {
|
|
638
|
+
"Accept": "application/json",
|
|
639
|
+
"Content-Type": "application/json",
|
|
640
|
+
"x-mb-cors": "1"
|
|
641
|
+
},
|
|
642
|
+
body: JSON.stringify({
|
|
550
643
|
name,
|
|
551
644
|
email,
|
|
552
645
|
password,
|
|
553
646
|
address,
|
|
554
647
|
acceptedPrivacyPolicy,
|
|
555
648
|
acceptedTermsAndConditions
|
|
556
|
-
}
|
|
649
|
+
})
|
|
557
650
|
});
|
|
558
|
-
|
|
559
|
-
|
|
651
|
+
if (response.status >= 400)
|
|
652
|
+
await handleResponseProblem(response, this.logger);
|
|
653
|
+
const data = await response.json();
|
|
654
|
+
if (response.status === 202) {
|
|
655
|
+
const parsed = pendingActivationSchema.parse(data);
|
|
656
|
+
return { status: "activation-pending", email: parsed.email };
|
|
657
|
+
}
|
|
658
|
+
try {
|
|
659
|
+
const identity = identitySchema.parse(data);
|
|
660
|
+
this.tokenStore.setUser(identity);
|
|
661
|
+
return { status: "signed-in", user: userSchema.parse(identity) };
|
|
662
|
+
} catch (err) {
|
|
663
|
+
this.logger.warn("Could not sign up user", { email, response, err });
|
|
664
|
+
throw new MoonbaseError("Bad response", "Could not sign up user", response.status);
|
|
665
|
+
}
|
|
560
666
|
}
|
|
561
667
|
async signOut() {
|
|
562
668
|
this.tokenStore.clear();
|
|
@@ -603,13 +709,24 @@ var IdentityEndpoints = class {
|
|
|
603
709
|
await handleResponseProblem(response, this.logger);
|
|
604
710
|
}
|
|
605
711
|
async confirmAccount(email, code) {
|
|
606
|
-
const response = await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, userAccountConfirmedSchema, { method: "POST" });
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
712
|
+
const response = await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}&scheme=JWT`, userAccountConfirmedSchema, { method: "POST" });
|
|
713
|
+
const result = response.data;
|
|
714
|
+
if (result.status === "SignedIn") {
|
|
715
|
+
if (!result.accessToken || !result.refreshToken) {
|
|
716
|
+
this.logger.warn("Confirm-account returned SignedIn without tokens", { email });
|
|
717
|
+
throw new MoonbaseError(
|
|
718
|
+
"Bad response",
|
|
719
|
+
"Confirm-account succeeded but the server did not return auth tokens",
|
|
720
|
+
response.status
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
this.tokenStore.setUser({
|
|
724
|
+
...result,
|
|
725
|
+
accessToken: result.accessToken,
|
|
726
|
+
refreshToken: result.refreshToken
|
|
727
|
+
});
|
|
612
728
|
}
|
|
729
|
+
return result;
|
|
613
730
|
}
|
|
614
731
|
async confirmEmail(email, code) {
|
|
615
732
|
await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, null, { method: "POST" });
|
|
@@ -633,16 +750,16 @@ var IdentityEndpoints = class {
|
|
|
633
750
|
};
|
|
634
751
|
|
|
635
752
|
// src/inventory/activation/endpoints.ts
|
|
636
|
-
var
|
|
753
|
+
var import_zod10 = require("zod");
|
|
637
754
|
|
|
638
755
|
// src/inventory/licenses/schemas.ts
|
|
639
|
-
var
|
|
640
|
-
__export(
|
|
756
|
+
var schemas_exports6 = {};
|
|
757
|
+
__export(schemas_exports6, {
|
|
641
758
|
activationSchema: () => activationSchema,
|
|
642
759
|
externalLicenseContent: () => externalLicenseContent,
|
|
643
760
|
licenseSchema: () => licenseSchema
|
|
644
761
|
});
|
|
645
|
-
var
|
|
762
|
+
var import_zod9 = require("zod");
|
|
646
763
|
|
|
647
764
|
// src/inventory/licenses/models.ts
|
|
648
765
|
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
@@ -663,43 +780,43 @@ var ActivationMethod = /* @__PURE__ */ ((ActivationMethod2) => {
|
|
|
663
780
|
})(ActivationMethod || {});
|
|
664
781
|
|
|
665
782
|
// src/inventory/licenses/schemas.ts
|
|
666
|
-
var externalLicenseFileContent =
|
|
667
|
-
type:
|
|
668
|
-
fileName:
|
|
669
|
-
contentType:
|
|
670
|
-
data:
|
|
783
|
+
var externalLicenseFileContent = import_zod9.z.object({
|
|
784
|
+
type: import_zod9.z.literal("file"),
|
|
785
|
+
fileName: import_zod9.z.string(),
|
|
786
|
+
contentType: import_zod9.z.string(),
|
|
787
|
+
data: import_zod9.z.string()
|
|
671
788
|
});
|
|
672
|
-
var externalLicenseILokContent =
|
|
673
|
-
type:
|
|
789
|
+
var externalLicenseILokContent = import_zod9.z.object({
|
|
790
|
+
type: import_zod9.z.literal("iLok")
|
|
674
791
|
});
|
|
675
|
-
var externalLicenseContent =
|
|
676
|
-
|
|
677
|
-
|
|
792
|
+
var externalLicenseContent = import_zod9.z.union([
|
|
793
|
+
import_zod9.z.string(),
|
|
794
|
+
import_zod9.z.discriminatedUnion("type", [
|
|
678
795
|
externalLicenseFileContent,
|
|
679
796
|
externalLicenseILokContent
|
|
680
797
|
])
|
|
681
798
|
]);
|
|
682
|
-
var licenseSchema =
|
|
683
|
-
id:
|
|
684
|
-
status:
|
|
799
|
+
var licenseSchema = import_zod9.z.object({
|
|
800
|
+
id: import_zod9.z.string(),
|
|
801
|
+
status: import_zod9.z.nativeEnum(LicenseStatus),
|
|
685
802
|
product: productSummarySchema,
|
|
686
|
-
activeNumberOfActivations:
|
|
687
|
-
maxNumberOfActivations:
|
|
803
|
+
activeNumberOfActivations: import_zod9.z.number(),
|
|
804
|
+
maxNumberOfActivations: import_zod9.z.number(),
|
|
688
805
|
externalFulfillment: externalLicenseContent.optional(),
|
|
689
|
-
requiredConnectedAccount:
|
|
690
|
-
fulfillmentMessage:
|
|
691
|
-
properties:
|
|
692
|
-
expiresAt:
|
|
693
|
-
createdAt:
|
|
806
|
+
requiredConnectedAccount: import_zod9.z.nativeEnum(ConnectableAccountProvider).nullish(),
|
|
807
|
+
fulfillmentMessage: import_zod9.z.string().optional(),
|
|
808
|
+
properties: import_zod9.z.record(rawPropertyValueSchema).nullish(),
|
|
809
|
+
expiresAt: import_zod9.z.coerce.date().optional(),
|
|
810
|
+
createdAt: import_zod9.z.coerce.date()
|
|
694
811
|
});
|
|
695
|
-
var activationSchema =
|
|
696
|
-
id:
|
|
697
|
-
licenseId:
|
|
698
|
-
name:
|
|
699
|
-
status:
|
|
700
|
-
activationMethod:
|
|
701
|
-
firstValidatedAt:
|
|
702
|
-
lastValidatedAt:
|
|
812
|
+
var activationSchema = import_zod9.z.object({
|
|
813
|
+
id: import_zod9.z.string(),
|
|
814
|
+
licenseId: import_zod9.z.string(),
|
|
815
|
+
name: import_zod9.z.string(),
|
|
816
|
+
status: import_zod9.z.nativeEnum(ActivationStatus),
|
|
817
|
+
activationMethod: import_zod9.z.nativeEnum(ActivationMethod),
|
|
818
|
+
firstValidatedAt: import_zod9.z.coerce.date(),
|
|
819
|
+
lastValidatedAt: import_zod9.z.coerce.date().nullable()
|
|
703
820
|
});
|
|
704
821
|
|
|
705
822
|
// src/inventory/activation/endpoints.ts
|
|
@@ -716,7 +833,7 @@ var ActivationEndpoints = class {
|
|
|
716
833
|
});
|
|
717
834
|
return {
|
|
718
835
|
license: response.data,
|
|
719
|
-
url:
|
|
836
|
+
url: import_zod10.z.string().parse(response.headers.location)
|
|
720
837
|
};
|
|
721
838
|
}
|
|
722
839
|
};
|
|
@@ -744,7 +861,7 @@ var LicenseEndpoints = class {
|
|
|
744
861
|
};
|
|
745
862
|
|
|
746
863
|
// src/inventory/products/endpoints.ts
|
|
747
|
-
var
|
|
864
|
+
var import_zod11 = require("zod");
|
|
748
865
|
var ProductEndpoints = class {
|
|
749
866
|
constructor(api, configuration) {
|
|
750
867
|
this.api = api;
|
|
@@ -769,8 +886,8 @@ var ProductEndpoints = class {
|
|
|
769
886
|
async getDownloadUrl(path) {
|
|
770
887
|
const url = new URL(path);
|
|
771
888
|
url.searchParams.append("redirect", "false");
|
|
772
|
-
const response = await this.api.fetch(url.pathname + url.search,
|
|
773
|
-
location:
|
|
889
|
+
const response = await this.api.fetch(url.pathname + url.search, import_zod11.z.object({
|
|
890
|
+
location: import_zod11.z.string()
|
|
774
891
|
}));
|
|
775
892
|
return response.data.location;
|
|
776
893
|
}
|
|
@@ -902,15 +1019,15 @@ var MoonbaseApi = class {
|
|
|
902
1019
|
};
|
|
903
1020
|
|
|
904
1021
|
// src/inventory/subscriptions/endpoints.ts
|
|
905
|
-
var
|
|
1022
|
+
var import_zod14 = require("zod");
|
|
906
1023
|
|
|
907
1024
|
// src/inventory/subscriptions/schemas.ts
|
|
908
|
-
var
|
|
909
|
-
__export(
|
|
1025
|
+
var schemas_exports8 = {};
|
|
1026
|
+
__export(schemas_exports8, {
|
|
910
1027
|
milestoneProgressSchema: () => milestoneProgressSchema,
|
|
911
1028
|
subscriptionSchema: () => subscriptionSchema
|
|
912
1029
|
});
|
|
913
|
-
var
|
|
1030
|
+
var import_zod13 = require("zod");
|
|
914
1031
|
|
|
915
1032
|
// src/inventory/subscriptions/models.ts
|
|
916
1033
|
var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
|
|
@@ -922,8 +1039,8 @@ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
|
|
|
922
1039
|
})(SubscriptionStatus || {});
|
|
923
1040
|
|
|
924
1041
|
// src/orders/schemas.ts
|
|
925
|
-
var
|
|
926
|
-
__export(
|
|
1042
|
+
var schemas_exports7 = {};
|
|
1043
|
+
__export(schemas_exports7, {
|
|
927
1044
|
completedOrderSchema: () => completedOrderSchema,
|
|
928
1045
|
openBundleLineItem: () => openBundleLineItem,
|
|
929
1046
|
openOrderLineItem: () => openOrderLineItem,
|
|
@@ -932,7 +1049,7 @@ __export(schemas_exports6, {
|
|
|
932
1049
|
orderSchema: () => orderSchema,
|
|
933
1050
|
orderTotalSchema: () => orderTotalSchema
|
|
934
1051
|
});
|
|
935
|
-
var
|
|
1052
|
+
var import_zod12 = require("zod");
|
|
936
1053
|
|
|
937
1054
|
// src/orders/models.ts
|
|
938
1055
|
var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
|
|
@@ -945,171 +1062,171 @@ var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
|
|
|
945
1062
|
})(OrderStatus || {});
|
|
946
1063
|
|
|
947
1064
|
// src/orders/schemas.ts
|
|
948
|
-
var couponSchema =
|
|
949
|
-
code:
|
|
950
|
-
name:
|
|
951
|
-
description:
|
|
1065
|
+
var couponSchema = import_zod12.z.object({
|
|
1066
|
+
code: import_zod12.z.string(),
|
|
1067
|
+
name: import_zod12.z.string(),
|
|
1068
|
+
description: import_zod12.z.string()
|
|
952
1069
|
});
|
|
953
|
-
var lineItemProductSchema =
|
|
954
|
-
id:
|
|
955
|
-
name:
|
|
956
|
-
tagline:
|
|
957
|
-
iconUrl:
|
|
1070
|
+
var lineItemProductSchema = import_zod12.z.object({
|
|
1071
|
+
id: import_zod12.z.string(),
|
|
1072
|
+
name: import_zod12.z.string(),
|
|
1073
|
+
tagline: import_zod12.z.string(),
|
|
1074
|
+
iconUrl: import_zod12.z.string().nullable()
|
|
958
1075
|
});
|
|
959
|
-
var lineItemTotalSchema =
|
|
1076
|
+
var lineItemTotalSchema = import_zod12.z.object({
|
|
960
1077
|
original: moneySchema,
|
|
961
1078
|
discount: moneySchema,
|
|
962
1079
|
subtotal: moneySchema,
|
|
963
1080
|
due: moneySchema
|
|
964
1081
|
});
|
|
965
|
-
var openProductLineItem =
|
|
966
|
-
id:
|
|
967
|
-
type:
|
|
968
|
-
productId:
|
|
969
|
-
quantity:
|
|
970
|
-
variationId:
|
|
971
|
-
offerId:
|
|
972
|
-
isDefaultVariation:
|
|
973
|
-
isSubcriptionPayment:
|
|
1082
|
+
var openProductLineItem = import_zod12.z.object({
|
|
1083
|
+
id: import_zod12.z.string(),
|
|
1084
|
+
type: import_zod12.z.literal("Product"),
|
|
1085
|
+
productId: import_zod12.z.string(),
|
|
1086
|
+
quantity: import_zod12.z.number(),
|
|
1087
|
+
variationId: import_zod12.z.string(),
|
|
1088
|
+
offerId: import_zod12.z.string().optional(),
|
|
1089
|
+
isDefaultVariation: import_zod12.z.boolean().nullish(),
|
|
1090
|
+
isSubcriptionPayment: import_zod12.z.boolean().nullish(),
|
|
974
1091
|
price: priceCollectionSchema.optional(),
|
|
975
1092
|
variation: pricingVariationSchema.optional(),
|
|
976
1093
|
total: lineItemTotalSchema.nullish(),
|
|
977
1094
|
product: lineItemProductSchema.optional(),
|
|
978
1095
|
appliedDiscount: discountSchema.optional()
|
|
979
1096
|
});
|
|
980
|
-
var lineItemBundleSchema =
|
|
981
|
-
id:
|
|
982
|
-
name:
|
|
983
|
-
tagline:
|
|
984
|
-
iconUrl:
|
|
985
|
-
products: lineItemProductSchema.and(
|
|
986
|
-
included:
|
|
1097
|
+
var lineItemBundleSchema = import_zod12.z.object({
|
|
1098
|
+
id: import_zod12.z.string(),
|
|
1099
|
+
name: import_zod12.z.string(),
|
|
1100
|
+
tagline: import_zod12.z.string(),
|
|
1101
|
+
iconUrl: import_zod12.z.string().nullable(),
|
|
1102
|
+
products: lineItemProductSchema.and(import_zod12.z.object({
|
|
1103
|
+
included: import_zod12.z.boolean().optional()
|
|
987
1104
|
})).array()
|
|
988
1105
|
});
|
|
989
|
-
var openBundleLineItem =
|
|
990
|
-
id:
|
|
991
|
-
type:
|
|
992
|
-
bundleId:
|
|
993
|
-
quantity:
|
|
994
|
-
variationId:
|
|
995
|
-
offerId:
|
|
996
|
-
partial:
|
|
997
|
-
replaced:
|
|
998
|
-
isDefaultVariation:
|
|
999
|
-
isSubcriptionPayment:
|
|
1106
|
+
var openBundleLineItem = import_zod12.z.object({
|
|
1107
|
+
id: import_zod12.z.string(),
|
|
1108
|
+
type: import_zod12.z.literal("Bundle"),
|
|
1109
|
+
bundleId: import_zod12.z.string(),
|
|
1110
|
+
quantity: import_zod12.z.number(),
|
|
1111
|
+
variationId: import_zod12.z.string(),
|
|
1112
|
+
offerId: import_zod12.z.string().optional(),
|
|
1113
|
+
partial: import_zod12.z.boolean().optional(),
|
|
1114
|
+
replaced: import_zod12.z.string().array().optional(),
|
|
1115
|
+
isDefaultVariation: import_zod12.z.boolean().nullish(),
|
|
1116
|
+
isSubcriptionPayment: import_zod12.z.boolean().nullish(),
|
|
1000
1117
|
price: priceCollectionSchema.optional(),
|
|
1001
1118
|
variation: pricingVariationSchema.optional(),
|
|
1002
1119
|
total: lineItemTotalSchema.nullish(),
|
|
1003
1120
|
bundle: lineItemBundleSchema.optional(),
|
|
1004
1121
|
appliedDiscount: discountSchema.optional()
|
|
1005
1122
|
});
|
|
1006
|
-
var openOrderLineItem =
|
|
1123
|
+
var openOrderLineItem = import_zod12.z.discriminatedUnion("type", [
|
|
1007
1124
|
openProductLineItem,
|
|
1008
1125
|
openBundleLineItem
|
|
1009
1126
|
]);
|
|
1010
|
-
var orderTotalSchema =
|
|
1127
|
+
var orderTotalSchema = import_zod12.z.object({
|
|
1011
1128
|
original: moneySchema,
|
|
1012
1129
|
discount: moneySchema,
|
|
1013
1130
|
subtotal: moneySchema,
|
|
1014
1131
|
taxes: moneySchema,
|
|
1015
1132
|
due: moneySchema
|
|
1016
1133
|
});
|
|
1017
|
-
var openOrderSchema =
|
|
1018
|
-
id:
|
|
1019
|
-
currency:
|
|
1134
|
+
var openOrderSchema = import_zod12.z.object({
|
|
1135
|
+
id: import_zod12.z.string(),
|
|
1136
|
+
currency: import_zod12.z.string(),
|
|
1020
1137
|
total: orderTotalSchema.nullish(),
|
|
1021
1138
|
items: openOrderLineItem.array(),
|
|
1022
1139
|
couponsApplied: couponSchema.array(),
|
|
1023
|
-
checkoutUrl:
|
|
1024
|
-
hostedCheckoutUrl:
|
|
1025
|
-
embeddedCheckoutUrl:
|
|
1140
|
+
checkoutUrl: import_zod12.z.string().optional(),
|
|
1141
|
+
hostedCheckoutUrl: import_zod12.z.string().optional(),
|
|
1142
|
+
embeddedCheckoutUrl: import_zod12.z.string().optional()
|
|
1026
1143
|
});
|
|
1027
|
-
var customerSnapshotSchema =
|
|
1028
|
-
name:
|
|
1029
|
-
businessName:
|
|
1030
|
-
taxId:
|
|
1031
|
-
email:
|
|
1032
|
-
phone:
|
|
1144
|
+
var customerSnapshotSchema = import_zod12.z.object({
|
|
1145
|
+
name: import_zod12.z.string().nullable(),
|
|
1146
|
+
businessName: import_zod12.z.string().nullable(),
|
|
1147
|
+
taxId: import_zod12.z.string().nullable(),
|
|
1148
|
+
email: import_zod12.z.string().nullable(),
|
|
1149
|
+
phone: import_zod12.z.string().nullable(),
|
|
1033
1150
|
address: addressSchema.nullable()
|
|
1034
1151
|
});
|
|
1035
|
-
var completedOrderSchema =
|
|
1036
|
-
id:
|
|
1037
|
-
status:
|
|
1038
|
-
currency:
|
|
1152
|
+
var completedOrderSchema = import_zod12.z.object({
|
|
1153
|
+
id: import_zod12.z.string(),
|
|
1154
|
+
status: import_zod12.z.literal("Completed" /* Completed */),
|
|
1155
|
+
currency: import_zod12.z.string(),
|
|
1039
1156
|
customer: customerSnapshotSchema,
|
|
1040
1157
|
total: orderTotalSchema,
|
|
1041
1158
|
items: openOrderLineItem.array(),
|
|
1042
1159
|
couponsApplied: couponSchema.array()
|
|
1043
1160
|
});
|
|
1044
|
-
var orderSchema =
|
|
1161
|
+
var orderSchema = import_zod12.z.discriminatedUnion("status", [
|
|
1045
1162
|
openOrderSchema.extend({
|
|
1046
|
-
status:
|
|
1163
|
+
status: import_zod12.z.literal("Open" /* Open */)
|
|
1047
1164
|
}),
|
|
1048
1165
|
openOrderSchema.extend({
|
|
1049
|
-
status:
|
|
1166
|
+
status: import_zod12.z.literal("PaymentProcessing" /* PaymentProcessing */)
|
|
1050
1167
|
}),
|
|
1051
1168
|
openOrderSchema.extend({
|
|
1052
|
-
status:
|
|
1169
|
+
status: import_zod12.z.literal("Paid" /* Paid */)
|
|
1053
1170
|
}),
|
|
1054
1171
|
openOrderSchema.extend({
|
|
1055
|
-
status:
|
|
1172
|
+
status: import_zod12.z.literal("Failed" /* Failed */)
|
|
1056
1173
|
}),
|
|
1057
1174
|
completedOrderSchema
|
|
1058
1175
|
]);
|
|
1059
1176
|
|
|
1060
1177
|
// src/inventory/subscriptions/schemas.ts
|
|
1061
|
-
var baseMilestoneProgressEventSchema =
|
|
1062
|
-
milestoneId:
|
|
1063
|
-
fulfilled:
|
|
1064
|
-
afterCycleNumber:
|
|
1065
|
-
afterNormalizedCycleNumber:
|
|
1066
|
-
message:
|
|
1178
|
+
var baseMilestoneProgressEventSchema = import_zod13.z.object({
|
|
1179
|
+
milestoneId: import_zod13.z.string(),
|
|
1180
|
+
fulfilled: import_zod13.z.boolean(),
|
|
1181
|
+
afterCycleNumber: import_zod13.z.number(),
|
|
1182
|
+
afterNormalizedCycleNumber: import_zod13.z.number(),
|
|
1183
|
+
message: import_zod13.z.string().optional()
|
|
1067
1184
|
});
|
|
1068
|
-
var milestoneProgressEventSchema =
|
|
1185
|
+
var milestoneProgressEventSchema = import_zod13.z.discriminatedUnion("type", [
|
|
1069
1186
|
baseMilestoneProgressEventSchema.extend({
|
|
1070
|
-
type:
|
|
1071
|
-
code:
|
|
1072
|
-
redeemed:
|
|
1187
|
+
type: import_zod13.z.literal("CouponCodeMilestone"),
|
|
1188
|
+
code: import_zod13.z.string().optional(),
|
|
1189
|
+
redeemed: import_zod13.z.boolean().optional()
|
|
1073
1190
|
}),
|
|
1074
1191
|
baseMilestoneProgressEventSchema.extend({
|
|
1075
|
-
type:
|
|
1192
|
+
type: import_zod13.z.literal("PerpetualLicenseConversionMilestone")
|
|
1076
1193
|
})
|
|
1077
1194
|
]);
|
|
1078
|
-
var milestoneProgressSchema =
|
|
1079
|
-
title:
|
|
1080
|
-
description:
|
|
1081
|
-
currentCycleNumber:
|
|
1082
|
-
currentNormalizedCycleNumber:
|
|
1083
|
-
currentCycleIsCompleted:
|
|
1084
|
-
fromCycleNumber:
|
|
1085
|
-
fromNormalizedCycleNumber:
|
|
1086
|
-
toCycleNumber:
|
|
1087
|
-
toNormalizedCycleNumber:
|
|
1088
|
-
events:
|
|
1195
|
+
var milestoneProgressSchema = import_zod13.z.object({
|
|
1196
|
+
title: import_zod13.z.string(),
|
|
1197
|
+
description: import_zod13.z.string().nullish(),
|
|
1198
|
+
currentCycleNumber: import_zod13.z.number(),
|
|
1199
|
+
currentNormalizedCycleNumber: import_zod13.z.number(),
|
|
1200
|
+
currentCycleIsCompleted: import_zod13.z.boolean(),
|
|
1201
|
+
fromCycleNumber: import_zod13.z.number(),
|
|
1202
|
+
fromNormalizedCycleNumber: import_zod13.z.number(),
|
|
1203
|
+
toCycleNumber: import_zod13.z.number(),
|
|
1204
|
+
toNormalizedCycleNumber: import_zod13.z.number(),
|
|
1205
|
+
events: import_zod13.z.record(import_zod13.z.coerce.number(), milestoneProgressEventSchema.array())
|
|
1089
1206
|
});
|
|
1090
|
-
var subscriptionSchema =
|
|
1091
|
-
id:
|
|
1092
|
-
status:
|
|
1093
|
-
hasPaymentMethod:
|
|
1094
|
-
cancellable:
|
|
1095
|
-
expiresAt:
|
|
1096
|
-
renewedAt:
|
|
1097
|
-
nextPaymentScheduledAt:
|
|
1098
|
-
startedAt:
|
|
1207
|
+
var subscriptionSchema = import_zod13.z.object({
|
|
1208
|
+
id: import_zod13.z.string(),
|
|
1209
|
+
status: import_zod13.z.nativeEnum(SubscriptionStatus),
|
|
1210
|
+
hasPaymentMethod: import_zod13.z.boolean(),
|
|
1211
|
+
cancellable: import_zod13.z.boolean(),
|
|
1212
|
+
expiresAt: import_zod13.z.coerce.date(),
|
|
1213
|
+
renewedAt: import_zod13.z.coerce.date().nullable(),
|
|
1214
|
+
nextPaymentScheduledAt: import_zod13.z.coerce.date().nullable(),
|
|
1215
|
+
startedAt: import_zod13.z.coerce.date(),
|
|
1099
1216
|
total: orderTotalSchema,
|
|
1100
|
-
cycleLength:
|
|
1101
|
-
paymentMethod:
|
|
1217
|
+
cycleLength: import_zod13.z.nativeEnum(CycleLength),
|
|
1218
|
+
paymentMethod: import_zod13.z.string().optional(),
|
|
1102
1219
|
milestoneProgress: milestoneProgressSchema.nullish(),
|
|
1103
|
-
embeddedUpdatePaymentUrl:
|
|
1104
|
-
content:
|
|
1105
|
-
|
|
1106
|
-
type:
|
|
1107
|
-
quantity:
|
|
1220
|
+
embeddedUpdatePaymentUrl: import_zod13.z.string().optional(),
|
|
1221
|
+
content: import_zod13.z.discriminatedUnion("type", [
|
|
1222
|
+
import_zod13.z.object({
|
|
1223
|
+
type: import_zod13.z.literal("Product"),
|
|
1224
|
+
quantity: import_zod13.z.number(),
|
|
1108
1225
|
product: storefrontProductSchema
|
|
1109
1226
|
}),
|
|
1110
|
-
|
|
1111
|
-
type:
|
|
1112
|
-
quantity:
|
|
1227
|
+
import_zod13.z.object({
|
|
1228
|
+
type: import_zod13.z.literal("Bundle"),
|
|
1229
|
+
quantity: import_zod13.z.number(),
|
|
1113
1230
|
bundle: storefrontBundleSchema
|
|
1114
1231
|
})
|
|
1115
1232
|
])
|
|
@@ -1134,8 +1251,8 @@ var SubscriptionEndpoints = class {
|
|
|
1134
1251
|
return response.data;
|
|
1135
1252
|
}
|
|
1136
1253
|
async renew(subscriptionId, returnUrl, embedded) {
|
|
1137
|
-
const response = await this.api.authenticatedFetch(`/api/customer/inventory/subscriptions/${subscriptionId}/renew?redirect=false&return=${returnUrl}&embedded=${embedded ? "true" : "false"}`,
|
|
1138
|
-
location:
|
|
1254
|
+
const response = await this.api.authenticatedFetch(`/api/customer/inventory/subscriptions/${subscriptionId}/renew?redirect=false&return=${returnUrl}&embedded=${embedded ? "true" : "false"}`, import_zod14.z.object({
|
|
1255
|
+
location: import_zod14.z.string()
|
|
1139
1256
|
}), { method: "POST" });
|
|
1140
1257
|
return response.data;
|
|
1141
1258
|
}
|
|
@@ -1393,15 +1510,15 @@ _TokenStore.storageKey = "moonbase_auth";
|
|
|
1393
1510
|
var TokenStore = _TokenStore;
|
|
1394
1511
|
|
|
1395
1512
|
// src/vendor/schemas.ts
|
|
1396
|
-
var
|
|
1397
|
-
__export(
|
|
1513
|
+
var schemas_exports9 = {};
|
|
1514
|
+
__export(schemas_exports9, {
|
|
1398
1515
|
vendorSchema: () => vendorSchema
|
|
1399
1516
|
});
|
|
1400
|
-
var
|
|
1401
|
-
var vendorSchema =
|
|
1402
|
-
id:
|
|
1403
|
-
name:
|
|
1404
|
-
logoUrl:
|
|
1517
|
+
var import_zod15 = require("zod");
|
|
1518
|
+
var vendorSchema = import_zod15.z.object({
|
|
1519
|
+
id: import_zod15.z.string(),
|
|
1520
|
+
name: import_zod15.z.string(),
|
|
1521
|
+
logoUrl: import_zod15.z.string().nullable()
|
|
1405
1522
|
});
|
|
1406
1523
|
|
|
1407
1524
|
// src/vendor/endpoints.ts
|
|
@@ -1416,20 +1533,20 @@ var VendorEndpoints = class {
|
|
|
1416
1533
|
};
|
|
1417
1534
|
|
|
1418
1535
|
// src/vouchers/schemas.ts
|
|
1419
|
-
var
|
|
1420
|
-
__export(
|
|
1536
|
+
var schemas_exports10 = {};
|
|
1537
|
+
__export(schemas_exports10, {
|
|
1421
1538
|
voucherSchema: () => voucherSchema
|
|
1422
1539
|
});
|
|
1423
|
-
var
|
|
1424
|
-
var voucherSchema =
|
|
1425
|
-
id:
|
|
1426
|
-
name:
|
|
1427
|
-
description:
|
|
1428
|
-
code:
|
|
1429
|
-
redeemed:
|
|
1540
|
+
var import_zod16 = require("zod");
|
|
1541
|
+
var voucherSchema = import_zod16.z.object({
|
|
1542
|
+
id: import_zod16.z.string(),
|
|
1543
|
+
name: import_zod16.z.string(),
|
|
1544
|
+
description: import_zod16.z.string(),
|
|
1545
|
+
code: import_zod16.z.string(),
|
|
1546
|
+
redeemed: import_zod16.z.boolean(),
|
|
1430
1547
|
redeemsProducts: quantifiable(storefrontProductSchema).array(),
|
|
1431
1548
|
redeemsBundles: quantifiable(storefrontBundleSchema).array(),
|
|
1432
|
-
properties:
|
|
1549
|
+
properties: import_zod16.z.record(rawPropertyValueSchema).nullish()
|
|
1433
1550
|
});
|
|
1434
1551
|
|
|
1435
1552
|
// src/vouchers/endpoints.ts
|
|
@@ -1480,23 +1597,24 @@ var ConsoleLogger = class {
|
|
|
1480
1597
|
};
|
|
1481
1598
|
|
|
1482
1599
|
// src/schemas.ts
|
|
1483
|
-
var
|
|
1484
|
-
__export(
|
|
1600
|
+
var schemas_exports12 = {};
|
|
1601
|
+
__export(schemas_exports12, {
|
|
1485
1602
|
activationRequests: () => schemas_exports3,
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1603
|
+
communications: () => schemas_exports4,
|
|
1604
|
+
identity: () => schemas_exports5,
|
|
1605
|
+
inventory: () => schemas_exports11,
|
|
1606
|
+
orders: () => schemas_exports7,
|
|
1489
1607
|
storefront: () => schemas_exports2,
|
|
1490
|
-
vendor: () =>
|
|
1491
|
-
vouchers: () =>
|
|
1608
|
+
vendor: () => schemas_exports9,
|
|
1609
|
+
vouchers: () => schemas_exports10
|
|
1492
1610
|
});
|
|
1493
1611
|
|
|
1494
1612
|
// src/inventory/schemas.ts
|
|
1495
|
-
var
|
|
1496
|
-
__export(
|
|
1497
|
-
licenses: () =>
|
|
1613
|
+
var schemas_exports11 = {};
|
|
1614
|
+
__export(schemas_exports11, {
|
|
1615
|
+
licenses: () => schemas_exports6,
|
|
1498
1616
|
products: () => schemas_exports,
|
|
1499
|
-
subscriptions: () =>
|
|
1617
|
+
subscriptions: () => schemas_exports8
|
|
1500
1618
|
});
|
|
1501
1619
|
|
|
1502
1620
|
// src/utils/discount.ts
|
|
@@ -1578,6 +1696,7 @@ var MoonbaseClient = class {
|
|
|
1578
1696
|
this.api = new MoonbaseApi(this.configuration.endpoint, this.tokenStore, this.logger);
|
|
1579
1697
|
this.storefront = new StorefrontEndpoints(this.api, this.configuration);
|
|
1580
1698
|
this.identity = new IdentityEndpoints(this.api, this.tokenStore, this.logger);
|
|
1699
|
+
this.communications = new CommunicationsEndpoints(this.api);
|
|
1581
1700
|
this.vouchers = new VoucherEndpoints(this.api);
|
|
1582
1701
|
this.orders = new OrderEndpoints(this.api);
|
|
1583
1702
|
this.inventory = new InventoryEndpoints(this.api, this.configuration);
|