@luna-park/plugin 2.1.0 → 2.2.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.d.mts CHANGED
@@ -1207,6 +1207,10 @@ type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
1207
1207
  };
1208
1208
  type THost = {
1209
1209
  readonly available: boolean;
1210
+ authorize: (buildUrl: (callback: string) => string, options?: {
1211
+ signal?: AbortSignal;
1212
+ timeout?: number;
1213
+ }) => Promise<URLSearchParams>;
1210
1214
  fetch: typeof fetch;
1211
1215
  readFile: (path: string) => Promise<Uint8Array | undefined>;
1212
1216
  removeFile: (path: string) => Promise<void>;
package/dist/index.mjs CHANGED
@@ -26,7 +26,43 @@ var __exportAll = (all, no_symbols) => {
26
26
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
27
27
  return target;
28
28
  };
29
- // ../shared/dist/types-CvOhRij4.mjs
29
+ // ../shared/dist/servers.mjs
30
+ function defineServerTier(line, size, priceMonthly, serverTypes, specs) {
31
+ return {
32
+ ...specs,
33
+ id: `${line}-${size}`,
34
+ line,
35
+ priceMonthly,
36
+ serverTypes,
37
+ size
38
+ };
39
+ }
40
+ defineServerTier("economy", "small", 20, ["cx23"], {
41
+ cores: 2,
42
+ diskGb: 40,
43
+ memoryGb: 4
44
+ }), defineServerTier("economy", "medium", 30, ["cx33"], {
45
+ cores: 4,
46
+ diskGb: 80,
47
+ memoryGb: 8
48
+ }), defineServerTier("economy", "large", 50, ["cx43"], {
49
+ cores: 8,
50
+ diskGb: 160,
51
+ memoryGb: 16
52
+ }), defineServerTier("performance", "small", 40, ["cpx22"], {
53
+ cores: 2,
54
+ diskGb: 80,
55
+ memoryGb: 4
56
+ }), defineServerTier("performance", "medium", 70, ["cpx32"], {
57
+ cores: 4,
58
+ diskGb: 160,
59
+ memoryGb: 8
60
+ }), defineServerTier("performance", "large", 120, ["cpx42"], {
61
+ cores: 8,
62
+ diskGb: 320,
63
+ memoryGb: 16
64
+ });
65
+ // ../shared/dist/types-DX6OvWhQ.mjs
30
66
  const TypeDate = Type.String({ format: "date-time" });
31
67
  var app_exports$1 = /* @__PURE__ */ __exportAll({
32
68
  app: () => app,
@@ -398,6 +434,8 @@ const download = {
398
434
  var deploy_exports = /* @__PURE__ */ __exportAll({
399
435
  addDomain: () => addDomain,
400
436
  addServerMember: () => addServerMember,
437
+ archiveDownload: () => archiveDownload,
438
+ archiveReady: () => archiveReady,
401
439
  checkManagedDomain: () => checkManagedDomain,
402
440
  claimManagedDomain: () => claimManagedDomain,
403
441
  create: () => create$2,
@@ -408,8 +446,10 @@ var deploy_exports = /* @__PURE__ */ __exportAll({
408
446
  environments: () => environments,
409
447
  events: () => events,
410
448
  getVariables: () => getVariables,
449
+ listArchives: () => listArchives,
411
450
  listDomains: () => listDomains,
412
451
  listServerMembers: () => listServerMembers,
452
+ listServerTiers: () => listServerTiers,
413
453
  listServers: () => listServers,
414
454
  managedDomainZone: () => managedDomainZone,
415
455
  monitoringLink: () => monitoringLink,
@@ -418,6 +458,7 @@ var deploy_exports = /* @__PURE__ */ __exportAll({
418
458
  registerDesktop: () => registerDesktop,
419
459
  removeDomain: () => removeDomain,
420
460
  removeServerMember: () => removeServerMember,
461
+ renameServer: () => renameServer,
421
462
  revokeEnvironmentLinks: () => revokeEnvironmentLinks,
422
463
  rollback: () => rollback,
423
464
  runtime: () => runtime,
@@ -493,6 +534,7 @@ const listServers = {
493
534
  response: { 200: Type.Array(Type.Object({
494
535
  id: Type.String({ format: "uuid" }),
495
536
  name: Type.String(),
537
+ displayName: Type.Union([Type.String(), Type.Null()]),
496
538
  ipv6: Type.Union([Type.String(), Type.Null()]),
497
539
  maintenanceHour: Type.Integer(),
498
540
  ownerMail: Type.Union([Type.String(), Type.Null()]),
@@ -733,6 +775,49 @@ const serverBackups = {
733
775
  })) }) },
734
776
  url: "/deploy/servers/:serverId/backups"
735
777
  };
778
+ const renameServer = {
779
+ type: "put",
780
+ body: Type.Object({ name: Type.String({
781
+ maxLength: 60,
782
+ minLength: 1
783
+ }) }),
784
+ params: serverParams,
785
+ response: { 200: Type.Object({ message: Type.String() }) },
786
+ url: "/deploy/servers/:serverId/name"
787
+ };
788
+ const listArchives = {
789
+ type: "get",
790
+ response: { 200: Type.Array(Type.Object({
791
+ createdAt: Type.String(),
792
+ expiresAt: Type.Union([Type.String(), Type.Null()]),
793
+ id: Type.String({ format: "uuid" }),
794
+ serverName: Type.String(),
795
+ size: Type.Union([Type.Number(), Type.Null()]),
796
+ status: Type.String()
797
+ })) },
798
+ url: "/deploy/archives"
799
+ };
800
+ const archiveDownload = {
801
+ type: "post",
802
+ params: Type.Object({ archiveId: Type.String({ format: "uuid" }) }),
803
+ response: { 200: Type.Object({ url: Type.String() }) },
804
+ url: "/deploy/archives/:archiveId/download"
805
+ };
806
+ const archiveReady = {
807
+ type: "post",
808
+ params: Type.Object({ archiveId: Type.String({ format: "uuid" }) }),
809
+ response: { 200: Type.Object({ message: Type.String() }) },
810
+ url: "/deploy/archives/:archiveId/ready"
811
+ };
812
+ const listServerTiers = {
813
+ type: "get",
814
+ response: { 200: Type.Array(Type.Object({
815
+ id: Type.String(),
816
+ locations: Type.Array(Type.String()),
817
+ serverType: Type.Union([Type.String(), Type.Null()])
818
+ })) },
819
+ url: "/deploy/server-tiers"
820
+ };
736
821
  const runtime = {
737
822
  type: "get",
738
823
  response: { 200: Type.Object({ hash: Type.String() }) },
@@ -968,7 +1053,9 @@ const signup = {
968
1053
  };
969
1054
  var payment_exports = /* @__PURE__ */ __exportAll({
970
1055
  checkout: () => checkout,
971
- portal: () => portal
1056
+ listServerSubscriptions: () => listServerSubscriptions,
1057
+ portal: () => portal,
1058
+ serverCheckout: () => serverCheckout
972
1059
  });
973
1060
  const checkout = {
974
1061
  type: "post",
@@ -987,6 +1074,33 @@ const portal = {
987
1074
  }) },
988
1075
  url: "/payment/portal"
989
1076
  };
1077
+ const serverCheckout = {
1078
+ type: "post",
1079
+ body: Type.Object({
1080
+ ipv4: Type.Boolean(),
1081
+ tier: Type.String()
1082
+ }),
1083
+ response: { 200: Type.Object({
1084
+ message: Type.String(),
1085
+ redirection: Type.String()
1086
+ }) },
1087
+ url: "/payment/server/checkout"
1088
+ };
1089
+ const serverSubscription = Type.Object({
1090
+ cancelAt: Type.Union([Type.String(), Type.Null()]),
1091
+ currentPeriodEnd: Type.Union([Type.String(), Type.Null()]),
1092
+ id: Type.String({ format: "uuid" }),
1093
+ ipv4: Type.Boolean(),
1094
+ provisioningError: Type.Union([Type.String(), Type.Null()]),
1095
+ serverId: Type.Union([Type.String({ format: "uuid" }), Type.Null()]),
1096
+ status: Type.String(),
1097
+ tier: Type.String()
1098
+ });
1099
+ const listServerSubscriptions = {
1100
+ type: "get",
1101
+ response: { 200: Type.Array(serverSubscription) },
1102
+ url: "/payment/server/subscriptions"
1103
+ };
990
1104
  var project_exports = /* @__PURE__ */ __exportAll({
991
1105
  create: () => create,
992
1106
  edit: () => edit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-park/plugin",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "private": false,
5
5
  "description": "Plugin helper for Luna Park.",
6
6
  "homepage": "https://luna-park.app",