@moonbase.sh/api 0.2.144 → 0.3.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 CHANGED
@@ -508,9 +508,18 @@ var bundleLineItemFulfillmentSchema = import_zod8.z.object({
508
508
  licenseIds: import_zod8.z.string().array()
509
509
  }))
510
510
  });
511
+ var subscriptionLineItemFulfillmentSchema = import_zod8.z.object({
512
+ type: import_zod8.z.literal("Subscription"),
513
+ subscriptionId: import_zod8.z.string(),
514
+ inner: import_zod8.z.discriminatedUnion("type", [
515
+ licenseLineItemFulfillmentSchema,
516
+ bundleLineItemFulfillmentSchema
517
+ ])
518
+ });
511
519
  var lineItemFulfillmentSchema = import_zod8.z.discriminatedUnion("type", [
512
520
  licenseLineItemFulfillmentSchema,
513
- bundleLineItemFulfillmentSchema
521
+ bundleLineItemFulfillmentSchema,
522
+ subscriptionLineItemFulfillmentSchema
514
523
  ]);
515
524
  var lineItemTotalSchema = import_zod8.z.object({
516
525
  original: moneySchema,
package/dist/index.d.cts CHANGED
@@ -1801,6 +1801,62 @@ declare const orderSchema: z.ZodObject<{
1801
1801
  productLicenses: Record<string, {
1802
1802
  licenseIds: string[];
1803
1803
  }>;
1804
+ }>, z.ZodObject<{
1805
+ type: z.ZodLiteral<"Subscription">;
1806
+ subscriptionId: z.ZodString;
1807
+ inner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1808
+ type: z.ZodLiteral<"License">;
1809
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1810
+ }, "strip", z.ZodTypeAny, {
1811
+ type: "License";
1812
+ licenseIds: string[];
1813
+ }, {
1814
+ type: "License";
1815
+ licenseIds: string[];
1816
+ }>, z.ZodObject<{
1817
+ type: z.ZodLiteral<"Bundle">;
1818
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
1819
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1820
+ }, "strip", z.ZodTypeAny, {
1821
+ licenseIds: string[];
1822
+ }, {
1823
+ licenseIds: string[];
1824
+ }>>;
1825
+ }, "strip", z.ZodTypeAny, {
1826
+ type: "Bundle";
1827
+ productLicenses: Record<string, {
1828
+ licenseIds: string[];
1829
+ }>;
1830
+ }, {
1831
+ type: "Bundle";
1832
+ productLicenses: Record<string, {
1833
+ licenseIds: string[];
1834
+ }>;
1835
+ }>]>;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ type: "Subscription";
1838
+ subscriptionId: string;
1839
+ inner: {
1840
+ type: "License";
1841
+ licenseIds: string[];
1842
+ } | {
1843
+ type: "Bundle";
1844
+ productLicenses: Record<string, {
1845
+ licenseIds: string[];
1846
+ }>;
1847
+ };
1848
+ }, {
1849
+ type: "Subscription";
1850
+ subscriptionId: string;
1851
+ inner: {
1852
+ type: "License";
1853
+ licenseIds: string[];
1854
+ } | {
1855
+ type: "Bundle";
1856
+ productLicenses: Record<string, {
1857
+ licenseIds: string[];
1858
+ }>;
1859
+ };
1804
1860
  }>]>>;
1805
1861
  }, "strip", z.ZodTypeAny, {
1806
1862
  type: "Product";
@@ -1881,6 +1937,18 @@ declare const orderSchema: z.ZodObject<{
1881
1937
  productLicenses: Record<string, {
1882
1938
  licenseIds: string[];
1883
1939
  }>;
1940
+ } | {
1941
+ type: "Subscription";
1942
+ subscriptionId: string;
1943
+ inner: {
1944
+ type: "License";
1945
+ licenseIds: string[];
1946
+ } | {
1947
+ type: "Bundle";
1948
+ productLicenses: Record<string, {
1949
+ licenseIds: string[];
1950
+ }>;
1951
+ };
1884
1952
  } | undefined;
1885
1953
  }, {
1886
1954
  type: "Product";
@@ -1961,6 +2029,18 @@ declare const orderSchema: z.ZodObject<{
1961
2029
  productLicenses: Record<string, {
1962
2030
  licenseIds: string[];
1963
2031
  }>;
2032
+ } | {
2033
+ type: "Subscription";
2034
+ subscriptionId: string;
2035
+ inner: {
2036
+ type: "License";
2037
+ licenseIds: string[];
2038
+ } | {
2039
+ type: "Bundle";
2040
+ productLicenses: Record<string, {
2041
+ licenseIds: string[];
2042
+ }>;
2043
+ };
1964
2044
  } | undefined;
1965
2045
  }>, z.ZodObject<{
1966
2046
  type: z.ZodLiteral<"Bundle">;
@@ -2253,6 +2333,62 @@ declare const orderSchema: z.ZodObject<{
2253
2333
  productLicenses: Record<string, {
2254
2334
  licenseIds: string[];
2255
2335
  }>;
2336
+ }>, z.ZodObject<{
2337
+ type: z.ZodLiteral<"Subscription">;
2338
+ subscriptionId: z.ZodString;
2339
+ inner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2340
+ type: z.ZodLiteral<"License">;
2341
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2342
+ }, "strip", z.ZodTypeAny, {
2343
+ type: "License";
2344
+ licenseIds: string[];
2345
+ }, {
2346
+ type: "License";
2347
+ licenseIds: string[];
2348
+ }>, z.ZodObject<{
2349
+ type: z.ZodLiteral<"Bundle">;
2350
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
2351
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2352
+ }, "strip", z.ZodTypeAny, {
2353
+ licenseIds: string[];
2354
+ }, {
2355
+ licenseIds: string[];
2356
+ }>>;
2357
+ }, "strip", z.ZodTypeAny, {
2358
+ type: "Bundle";
2359
+ productLicenses: Record<string, {
2360
+ licenseIds: string[];
2361
+ }>;
2362
+ }, {
2363
+ type: "Bundle";
2364
+ productLicenses: Record<string, {
2365
+ licenseIds: string[];
2366
+ }>;
2367
+ }>]>;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ type: "Subscription";
2370
+ subscriptionId: string;
2371
+ inner: {
2372
+ type: "License";
2373
+ licenseIds: string[];
2374
+ } | {
2375
+ type: "Bundle";
2376
+ productLicenses: Record<string, {
2377
+ licenseIds: string[];
2378
+ }>;
2379
+ };
2380
+ }, {
2381
+ type: "Subscription";
2382
+ subscriptionId: string;
2383
+ inner: {
2384
+ type: "License";
2385
+ licenseIds: string[];
2386
+ } | {
2387
+ type: "Bundle";
2388
+ productLicenses: Record<string, {
2389
+ licenseIds: string[];
2390
+ }>;
2391
+ };
2256
2392
  }>]>>;
2257
2393
  }, "strip", z.ZodTypeAny, {
2258
2394
  type: "Bundle";
@@ -2333,6 +2469,18 @@ declare const orderSchema: z.ZodObject<{
2333
2469
  productLicenses: Record<string, {
2334
2470
  licenseIds: string[];
2335
2471
  }>;
2472
+ } | {
2473
+ type: "Subscription";
2474
+ subscriptionId: string;
2475
+ inner: {
2476
+ type: "License";
2477
+ licenseIds: string[];
2478
+ } | {
2479
+ type: "Bundle";
2480
+ productLicenses: Record<string, {
2481
+ licenseIds: string[];
2482
+ }>;
2483
+ };
2336
2484
  } | undefined;
2337
2485
  }, {
2338
2486
  type: "Bundle";
@@ -2413,6 +2561,18 @@ declare const orderSchema: z.ZodObject<{
2413
2561
  productLicenses: Record<string, {
2414
2562
  licenseIds: string[];
2415
2563
  }>;
2564
+ } | {
2565
+ type: "Subscription";
2566
+ subscriptionId: string;
2567
+ inner: {
2568
+ type: "License";
2569
+ licenseIds: string[];
2570
+ } | {
2571
+ type: "Bundle";
2572
+ productLicenses: Record<string, {
2573
+ licenseIds: string[];
2574
+ }>;
2575
+ };
2416
2576
  } | undefined;
2417
2577
  }>]>, "many">;
2418
2578
  lastUpdated: z.ZodObject<{
@@ -2558,6 +2718,18 @@ declare const orderSchema: z.ZodObject<{
2558
2718
  productLicenses: Record<string, {
2559
2719
  licenseIds: string[];
2560
2720
  }>;
2721
+ } | {
2722
+ type: "Subscription";
2723
+ subscriptionId: string;
2724
+ inner: {
2725
+ type: "License";
2726
+ licenseIds: string[];
2727
+ } | {
2728
+ type: "Bundle";
2729
+ productLicenses: Record<string, {
2730
+ licenseIds: string[];
2731
+ }>;
2732
+ };
2561
2733
  } | undefined;
2562
2734
  } | {
2563
2735
  type: "Bundle";
@@ -2638,6 +2810,18 @@ declare const orderSchema: z.ZodObject<{
2638
2810
  productLicenses: Record<string, {
2639
2811
  licenseIds: string[];
2640
2812
  }>;
2813
+ } | {
2814
+ type: "Subscription";
2815
+ subscriptionId: string;
2816
+ inner: {
2817
+ type: "License";
2818
+ licenseIds: string[];
2819
+ } | {
2820
+ type: "Bundle";
2821
+ productLicenses: Record<string, {
2822
+ licenseIds: string[];
2823
+ }>;
2824
+ };
2641
2825
  } | undefined;
2642
2826
  })[];
2643
2827
  isRefunded: boolean;
@@ -2831,6 +3015,18 @@ declare const orderSchema: z.ZodObject<{
2831
3015
  productLicenses: Record<string, {
2832
3016
  licenseIds: string[];
2833
3017
  }>;
3018
+ } | {
3019
+ type: "Subscription";
3020
+ subscriptionId: string;
3021
+ inner: {
3022
+ type: "License";
3023
+ licenseIds: string[];
3024
+ } | {
3025
+ type: "Bundle";
3026
+ productLicenses: Record<string, {
3027
+ licenseIds: string[];
3028
+ }>;
3029
+ };
2834
3030
  } | undefined;
2835
3031
  } | {
2836
3032
  type: "Bundle";
@@ -2911,6 +3107,18 @@ declare const orderSchema: z.ZodObject<{
2911
3107
  productLicenses: Record<string, {
2912
3108
  licenseIds: string[];
2913
3109
  }>;
3110
+ } | {
3111
+ type: "Subscription";
3112
+ subscriptionId: string;
3113
+ inner: {
3114
+ type: "License";
3115
+ licenseIds: string[];
3116
+ } | {
3117
+ type: "Bundle";
3118
+ productLicenses: Record<string, {
3119
+ licenseIds: string[];
3120
+ }>;
3121
+ };
2914
3122
  } | undefined;
2915
3123
  })[];
2916
3124
  isRefunded: boolean;
package/dist/index.d.ts CHANGED
@@ -1801,6 +1801,62 @@ declare const orderSchema: z.ZodObject<{
1801
1801
  productLicenses: Record<string, {
1802
1802
  licenseIds: string[];
1803
1803
  }>;
1804
+ }>, z.ZodObject<{
1805
+ type: z.ZodLiteral<"Subscription">;
1806
+ subscriptionId: z.ZodString;
1807
+ inner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1808
+ type: z.ZodLiteral<"License">;
1809
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1810
+ }, "strip", z.ZodTypeAny, {
1811
+ type: "License";
1812
+ licenseIds: string[];
1813
+ }, {
1814
+ type: "License";
1815
+ licenseIds: string[];
1816
+ }>, z.ZodObject<{
1817
+ type: z.ZodLiteral<"Bundle">;
1818
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
1819
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1820
+ }, "strip", z.ZodTypeAny, {
1821
+ licenseIds: string[];
1822
+ }, {
1823
+ licenseIds: string[];
1824
+ }>>;
1825
+ }, "strip", z.ZodTypeAny, {
1826
+ type: "Bundle";
1827
+ productLicenses: Record<string, {
1828
+ licenseIds: string[];
1829
+ }>;
1830
+ }, {
1831
+ type: "Bundle";
1832
+ productLicenses: Record<string, {
1833
+ licenseIds: string[];
1834
+ }>;
1835
+ }>]>;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ type: "Subscription";
1838
+ subscriptionId: string;
1839
+ inner: {
1840
+ type: "License";
1841
+ licenseIds: string[];
1842
+ } | {
1843
+ type: "Bundle";
1844
+ productLicenses: Record<string, {
1845
+ licenseIds: string[];
1846
+ }>;
1847
+ };
1848
+ }, {
1849
+ type: "Subscription";
1850
+ subscriptionId: string;
1851
+ inner: {
1852
+ type: "License";
1853
+ licenseIds: string[];
1854
+ } | {
1855
+ type: "Bundle";
1856
+ productLicenses: Record<string, {
1857
+ licenseIds: string[];
1858
+ }>;
1859
+ };
1804
1860
  }>]>>;
1805
1861
  }, "strip", z.ZodTypeAny, {
1806
1862
  type: "Product";
@@ -1881,6 +1937,18 @@ declare const orderSchema: z.ZodObject<{
1881
1937
  productLicenses: Record<string, {
1882
1938
  licenseIds: string[];
1883
1939
  }>;
1940
+ } | {
1941
+ type: "Subscription";
1942
+ subscriptionId: string;
1943
+ inner: {
1944
+ type: "License";
1945
+ licenseIds: string[];
1946
+ } | {
1947
+ type: "Bundle";
1948
+ productLicenses: Record<string, {
1949
+ licenseIds: string[];
1950
+ }>;
1951
+ };
1884
1952
  } | undefined;
1885
1953
  }, {
1886
1954
  type: "Product";
@@ -1961,6 +2029,18 @@ declare const orderSchema: z.ZodObject<{
1961
2029
  productLicenses: Record<string, {
1962
2030
  licenseIds: string[];
1963
2031
  }>;
2032
+ } | {
2033
+ type: "Subscription";
2034
+ subscriptionId: string;
2035
+ inner: {
2036
+ type: "License";
2037
+ licenseIds: string[];
2038
+ } | {
2039
+ type: "Bundle";
2040
+ productLicenses: Record<string, {
2041
+ licenseIds: string[];
2042
+ }>;
2043
+ };
1964
2044
  } | undefined;
1965
2045
  }>, z.ZodObject<{
1966
2046
  type: z.ZodLiteral<"Bundle">;
@@ -2253,6 +2333,62 @@ declare const orderSchema: z.ZodObject<{
2253
2333
  productLicenses: Record<string, {
2254
2334
  licenseIds: string[];
2255
2335
  }>;
2336
+ }>, z.ZodObject<{
2337
+ type: z.ZodLiteral<"Subscription">;
2338
+ subscriptionId: z.ZodString;
2339
+ inner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2340
+ type: z.ZodLiteral<"License">;
2341
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2342
+ }, "strip", z.ZodTypeAny, {
2343
+ type: "License";
2344
+ licenseIds: string[];
2345
+ }, {
2346
+ type: "License";
2347
+ licenseIds: string[];
2348
+ }>, z.ZodObject<{
2349
+ type: z.ZodLiteral<"Bundle">;
2350
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
2351
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2352
+ }, "strip", z.ZodTypeAny, {
2353
+ licenseIds: string[];
2354
+ }, {
2355
+ licenseIds: string[];
2356
+ }>>;
2357
+ }, "strip", z.ZodTypeAny, {
2358
+ type: "Bundle";
2359
+ productLicenses: Record<string, {
2360
+ licenseIds: string[];
2361
+ }>;
2362
+ }, {
2363
+ type: "Bundle";
2364
+ productLicenses: Record<string, {
2365
+ licenseIds: string[];
2366
+ }>;
2367
+ }>]>;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ type: "Subscription";
2370
+ subscriptionId: string;
2371
+ inner: {
2372
+ type: "License";
2373
+ licenseIds: string[];
2374
+ } | {
2375
+ type: "Bundle";
2376
+ productLicenses: Record<string, {
2377
+ licenseIds: string[];
2378
+ }>;
2379
+ };
2380
+ }, {
2381
+ type: "Subscription";
2382
+ subscriptionId: string;
2383
+ inner: {
2384
+ type: "License";
2385
+ licenseIds: string[];
2386
+ } | {
2387
+ type: "Bundle";
2388
+ productLicenses: Record<string, {
2389
+ licenseIds: string[];
2390
+ }>;
2391
+ };
2256
2392
  }>]>>;
2257
2393
  }, "strip", z.ZodTypeAny, {
2258
2394
  type: "Bundle";
@@ -2333,6 +2469,18 @@ declare const orderSchema: z.ZodObject<{
2333
2469
  productLicenses: Record<string, {
2334
2470
  licenseIds: string[];
2335
2471
  }>;
2472
+ } | {
2473
+ type: "Subscription";
2474
+ subscriptionId: string;
2475
+ inner: {
2476
+ type: "License";
2477
+ licenseIds: string[];
2478
+ } | {
2479
+ type: "Bundle";
2480
+ productLicenses: Record<string, {
2481
+ licenseIds: string[];
2482
+ }>;
2483
+ };
2336
2484
  } | undefined;
2337
2485
  }, {
2338
2486
  type: "Bundle";
@@ -2413,6 +2561,18 @@ declare const orderSchema: z.ZodObject<{
2413
2561
  productLicenses: Record<string, {
2414
2562
  licenseIds: string[];
2415
2563
  }>;
2564
+ } | {
2565
+ type: "Subscription";
2566
+ subscriptionId: string;
2567
+ inner: {
2568
+ type: "License";
2569
+ licenseIds: string[];
2570
+ } | {
2571
+ type: "Bundle";
2572
+ productLicenses: Record<string, {
2573
+ licenseIds: string[];
2574
+ }>;
2575
+ };
2416
2576
  } | undefined;
2417
2577
  }>]>, "many">;
2418
2578
  lastUpdated: z.ZodObject<{
@@ -2558,6 +2718,18 @@ declare const orderSchema: z.ZodObject<{
2558
2718
  productLicenses: Record<string, {
2559
2719
  licenseIds: string[];
2560
2720
  }>;
2721
+ } | {
2722
+ type: "Subscription";
2723
+ subscriptionId: string;
2724
+ inner: {
2725
+ type: "License";
2726
+ licenseIds: string[];
2727
+ } | {
2728
+ type: "Bundle";
2729
+ productLicenses: Record<string, {
2730
+ licenseIds: string[];
2731
+ }>;
2732
+ };
2561
2733
  } | undefined;
2562
2734
  } | {
2563
2735
  type: "Bundle";
@@ -2638,6 +2810,18 @@ declare const orderSchema: z.ZodObject<{
2638
2810
  productLicenses: Record<string, {
2639
2811
  licenseIds: string[];
2640
2812
  }>;
2813
+ } | {
2814
+ type: "Subscription";
2815
+ subscriptionId: string;
2816
+ inner: {
2817
+ type: "License";
2818
+ licenseIds: string[];
2819
+ } | {
2820
+ type: "Bundle";
2821
+ productLicenses: Record<string, {
2822
+ licenseIds: string[];
2823
+ }>;
2824
+ };
2641
2825
  } | undefined;
2642
2826
  })[];
2643
2827
  isRefunded: boolean;
@@ -2831,6 +3015,18 @@ declare const orderSchema: z.ZodObject<{
2831
3015
  productLicenses: Record<string, {
2832
3016
  licenseIds: string[];
2833
3017
  }>;
3018
+ } | {
3019
+ type: "Subscription";
3020
+ subscriptionId: string;
3021
+ inner: {
3022
+ type: "License";
3023
+ licenseIds: string[];
3024
+ } | {
3025
+ type: "Bundle";
3026
+ productLicenses: Record<string, {
3027
+ licenseIds: string[];
3028
+ }>;
3029
+ };
2834
3030
  } | undefined;
2835
3031
  } | {
2836
3032
  type: "Bundle";
@@ -2911,6 +3107,18 @@ declare const orderSchema: z.ZodObject<{
2911
3107
  productLicenses: Record<string, {
2912
3108
  licenseIds: string[];
2913
3109
  }>;
3110
+ } | {
3111
+ type: "Subscription";
3112
+ subscriptionId: string;
3113
+ inner: {
3114
+ type: "License";
3115
+ licenseIds: string[];
3116
+ } | {
3117
+ type: "Bundle";
3118
+ productLicenses: Record<string, {
3119
+ licenseIds: string[];
3120
+ }>;
3121
+ };
2914
3122
  } | undefined;
2915
3123
  })[];
2916
3124
  isRefunded: boolean;
package/dist/index.js CHANGED
@@ -460,9 +460,18 @@ var bundleLineItemFulfillmentSchema = z8.object({
460
460
  licenseIds: z8.string().array()
461
461
  }))
462
462
  });
463
+ var subscriptionLineItemFulfillmentSchema = z8.object({
464
+ type: z8.literal("Subscription"),
465
+ subscriptionId: z8.string(),
466
+ inner: z8.discriminatedUnion("type", [
467
+ licenseLineItemFulfillmentSchema,
468
+ bundleLineItemFulfillmentSchema
469
+ ])
470
+ });
463
471
  var lineItemFulfillmentSchema = z8.discriminatedUnion("type", [
464
472
  licenseLineItemFulfillmentSchema,
465
- bundleLineItemFulfillmentSchema
473
+ bundleLineItemFulfillmentSchema,
474
+ subscriptionLineItemFulfillmentSchema
466
475
  ]);
467
476
  var lineItemTotalSchema = z8.object({
468
477
  original: moneySchema,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/api",
3
3
  "type": "module",
4
- "version": "0.2.144",
4
+ "version": "0.3.0",
5
5
  "description": "Package to let you integrate backends with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",