@remnawave/backend-contract 2.0.0-alpha.2 → 2.0.0-alpha.20

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.
Files changed (146) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/infra-billing.d.ts +16 -0
  5. package/build/backend/api/controllers/infra-billing.d.ts.map +1 -0
  6. package/build/backend/api/controllers/infra-billing.js +18 -0
  7. package/build/backend/api/controllers/users.d.ts +1 -0
  8. package/build/backend/api/controllers/users.d.ts.map +1 -1
  9. package/build/backend/api/controllers/users.js +1 -0
  10. package/build/backend/api/routes.d.ts +15 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +15 -0
  13. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  14. package/build/backend/commands/hosts/create.command.d.ts +6 -6
  15. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  16. package/build/backend/commands/hosts/create.command.js +4 -2
  17. package/build/backend/commands/index.d.ts +1 -0
  18. package/build/backend/commands/index.d.ts.map +1 -1
  19. package/build/backend/commands/index.js +1 -0
  20. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
  21. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
  22. package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
  23. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +413 -0
  24. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
  25. package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
  26. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
  27. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
  28. package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
  29. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
  30. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
  31. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  32. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +407 -0
  33. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
  34. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  35. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
  36. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
  37. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  38. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
  39. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
  40. package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
  41. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts +399 -0
  42. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts.map +1 -0
  43. package/build/backend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  44. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
  45. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
  46. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  47. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
  48. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
  49. package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
  50. package/build/backend/commands/infra-billing/index.d.ts +13 -0
  51. package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
  52. package/build/backend/commands/infra-billing/index.js +28 -0
  53. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +410 -0
  54. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
  55. package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
  56. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
  57. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
  58. package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
  59. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  60. package/build/backend/commands/nodes/actions/disable.command.d.ts +59 -0
  61. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  62. package/build/backend/commands/nodes/actions/enable.command.d.ts +59 -0
  63. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  64. package/build/backend/commands/nodes/actions/reorder.command.d.ts +82 -0
  65. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  66. package/build/backend/commands/nodes/create.command.d.ts +62 -0
  67. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  68. package/build/backend/commands/nodes/create.command.js +1 -0
  69. package/build/backend/commands/nodes/get-all.command.d.ts +59 -0
  70. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  71. package/build/backend/commands/nodes/get-one.command.d.ts +59 -0
  72. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  73. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  74. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  75. package/build/backend/commands/nodes/update.command.d.ts +85 -0
  76. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  77. package/build/backend/commands/nodes/update.command.js +1 -0
  78. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +114 -0
  79. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -0
  80. package/build/backend/commands/users/get-user-accessible-nodes.command.js +31 -0
  81. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  82. package/build/backend/commands/users/index.d.ts +1 -0
  83. package/build/backend/commands/users/index.d.ts.map +1 -1
  84. package/build/backend/commands/users/index.js +1 -0
  85. package/build/backend/constants/errors/errors.d.ts +75 -0
  86. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  87. package/build/backend/constants/errors/errors.js +75 -0
  88. package/build/backend/constants/events/events.d.ts +11 -0
  89. package/build/backend/constants/events/events.d.ts.map +1 -1
  90. package/build/backend/constants/events/events.js +10 -0
  91. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  92. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  93. package/build/backend/constants/templates/template-keys.js +1 -0
  94. package/build/backend/models/index.d.ts +4 -0
  95. package/build/backend/models/index.d.ts.map +1 -1
  96. package/build/backend/models/index.js +4 -0
  97. package/build/backend/models/infra-billing-available-node.schema.d.ts +90 -0
  98. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
  99. package/build/backend/models/infra-billing-available-node.schema.js +9 -0
  100. package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
  101. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
  102. package/build/backend/models/infra-billing-history-record.schema.js +19 -0
  103. package/build/backend/models/infra-billing-node.schema.d.ts +153 -0
  104. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
  105. package/build/backend/models/infra-billing-node.schema.js +34 -0
  106. package/build/backend/models/infra-provider.schema.d.ts +87 -0
  107. package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
  108. package/build/backend/models/infra-provider.schema.js +41 -0
  109. package/build/backend/models/nodes.schema.d.ts +41 -0
  110. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  111. package/build/backend/models/nodes.schema.js +3 -0
  112. package/build/frontend/api/controllers/index.js +1 -0
  113. package/build/frontend/api/controllers/infra-billing.js +18 -0
  114. package/build/frontend/api/controllers/users.js +1 -0
  115. package/build/frontend/api/routes.js +15 -0
  116. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  117. package/build/frontend/commands/hosts/create.command.js +4 -2
  118. package/build/frontend/commands/index.js +1 -0
  119. package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
  120. package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
  121. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
  122. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  123. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  124. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  125. package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
  126. package/build/frontend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  127. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  128. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
  129. package/build/frontend/commands/infra-billing/index.js +28 -0
  130. package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
  131. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
  132. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  133. package/build/frontend/commands/nodes/create.command.js +1 -0
  134. package/build/frontend/commands/nodes/update.command.js +1 -0
  135. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +31 -0
  136. package/build/frontend/commands/users/index.js +1 -0
  137. package/build/frontend/constants/errors/errors.js +75 -0
  138. package/build/frontend/constants/events/events.js +10 -0
  139. package/build/frontend/constants/templates/template-keys.js +1 -0
  140. package/build/frontend/models/index.js +4 -0
  141. package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
  142. package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
  143. package/build/frontend/models/infra-billing-node.schema.js +34 -0
  144. package/build/frontend/models/infra-provider.schema.js +41 -0
  145. package/build/frontend/models/nodes.schema.js +3 -0
  146. package/package.json +1 -1
@@ -3,6 +3,7 @@ export * from './auth';
3
3
  export * from './config-profiles';
4
4
  export * from './hosts';
5
5
  export * from './hwid';
6
+ export * from './infra-billing';
6
7
  export * from './internal-squads';
7
8
  export * from './keygen';
8
9
  export * from './nodes';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -0,0 +1,16 @@
1
+ export declare const INFRA_BILLING_CONTROLLER: "infra-billing";
2
+ export declare const INFRA_BILLING_ROUTES: {
3
+ readonly GET_PROVIDERS: "providers";
4
+ readonly CREATE_PROVIDER: "providers";
5
+ readonly UPDATE_PROVIDER: "providers";
6
+ readonly DELETE_PROVIDER: (uuid: string) => string;
7
+ readonly GET_PROVIDER_BY_UUID: (uuid: string) => string;
8
+ readonly GET_BILLING_NODES: "nodes";
9
+ readonly CREATE_BILLING_NODE: "nodes";
10
+ readonly UPDATE_BILLING_NODE: "nodes";
11
+ readonly DELETE_BILLING_NODE: (uuid: string) => string;
12
+ readonly GET_BILLING_HISTORY: "history";
13
+ readonly CREATE_BILLING_HISTORY: "history";
14
+ readonly DELETE_BILLING_HISTORY: (uuid: string) => string;
15
+ };
16
+ //# sourceMappingURL=infra-billing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infra-billing.d.ts","sourceRoot":"","sources":["../../../../api/controllers/infra-billing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;;qCAIL,MAAM;0CACD,MAAM;;;;yCAKP,MAAM;;;4CAIH,MAAM;CAC/B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INFRA_BILLING_ROUTES = exports.INFRA_BILLING_CONTROLLER = void 0;
4
+ exports.INFRA_BILLING_CONTROLLER = 'infra-billing';
5
+ exports.INFRA_BILLING_ROUTES = {
6
+ GET_PROVIDERS: 'providers', // Get list of all providers // get
7
+ CREATE_PROVIDER: 'providers', // Create new provider // post
8
+ UPDATE_PROVIDER: 'providers', // Update provider by uuid // patch
9
+ DELETE_PROVIDER: (uuid) => `providers/${uuid}`, // Delete provider by uuid // delete
10
+ GET_PROVIDER_BY_UUID: (uuid) => `providers/${uuid}`, // Get provider by uuid // get
11
+ GET_BILLING_NODES: 'nodes', // Get list of all nodes billing // get
12
+ CREATE_BILLING_NODE: 'nodes', // Create new node billing // post
13
+ UPDATE_BILLING_NODE: 'nodes', // Update node billing by uuid // patch
14
+ DELETE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Delete node billing by uuid // delete
15
+ GET_BILLING_HISTORY: 'history', // Get list of all nodes billing history // get
16
+ CREATE_BILLING_HISTORY: 'history', // Create new node billing history // post
17
+ DELETE_BILLING_HISTORY: (uuid) => `history/${uuid}`, // Delete node billing history by uuid // delete
18
+ };
@@ -6,6 +6,7 @@ export declare const USERS_ROUTES: {
6
6
  readonly GET: "";
7
7
  readonly DELETE: (uuid: string) => string;
8
8
  readonly GET_BY_UUID: (uuid: string) => string;
9
+ readonly ACCESSIBLE_NODES: (uuid: string) => string;
9
10
  readonly ACTIONS: {
10
11
  readonly ENABLE: (uuid: string) => string;
11
12
  readonly DISABLE: (uuid: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;;gCAEP,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;yCAGV,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;4CAiBU,MAAM;;;;;CAM/B,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;;gCAEZ,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;yCAGV,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;4CAiBU,MAAM;;;;;CAM/B,CAAC"}
@@ -9,6 +9,7 @@ exports.USERS_ROUTES = {
9
9
  GET: '',
10
10
  DELETE: (uuid) => `${uuid}`,
11
11
  GET_BY_UUID: (uuid) => `${uuid}`,
12
+ ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
12
13
  ACTIONS: {
13
14
  ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
14
15
  DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
@@ -43,6 +43,7 @@ export declare const REST_API: {
43
43
  readonly GET: "/api/users/";
44
44
  readonly DELETE: (uuid: string) => string;
45
45
  readonly GET_BY_UUID: (uuid: string) => string;
46
+ readonly ACCESSIBLE_NODES: (uuid: string) => string;
46
47
  readonly ACTIONS: {
47
48
  readonly DISABLE: (uuid: string) => string;
48
49
  readonly ENABLE: (uuid: string) => string;
@@ -141,5 +142,19 @@ export declare const REST_API: {
141
142
  readonly GET_BY_UUID: (uuid: string) => string;
142
143
  readonly DELETE: (uuid: string) => string;
143
144
  };
145
+ readonly INFRA_BILLING: {
146
+ readonly GET_PROVIDERS: "/api/infra-billing/providers";
147
+ readonly CREATE_PROVIDER: "/api/infra-billing/providers";
148
+ readonly UPDATE_PROVIDER: "/api/infra-billing/providers";
149
+ readonly DELETE_PROVIDER: (uuid: string) => string;
150
+ readonly GET_PROVIDER_BY_UUID: (uuid: string) => string;
151
+ readonly GET_BILLING_NODES: "/api/infra-billing/nodes";
152
+ readonly CREATE_BILLING_NODE: "/api/infra-billing/nodes";
153
+ readonly UPDATE_BILLING_NODE: "/api/infra-billing/nodes";
154
+ readonly DELETE_BILLING_NODE: (uuid: string) => string;
155
+ readonly GET_BILLING_HISTORY: "/api/infra-billing/history";
156
+ readonly CREATE_BILLING_HISTORY: "/api/infra-billing/history";
157
+ readonly DELETE_BILLING_HISTORY: (uuid: string) => string;
158
+ };
144
159
  };
145
160
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;;qCAIN,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;qCAuBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;CAKnB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;qCAuBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;;;;;yCAUG,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
@@ -80,6 +80,7 @@ exports.REST_API = {
80
80
  GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET}`,
81
81
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
82
82
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
83
+ ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
83
84
  ACTIONS: {
84
85
  DISABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(uuid)}`,
85
86
  ENABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(uuid)}`,
@@ -178,4 +179,18 @@ exports.REST_API = {
178
179
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
179
180
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
180
181
  },
182
+ INFRA_BILLING: {
183
+ GET_PROVIDERS: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDERS}`,
184
+ CREATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_PROVIDER}`,
185
+ UPDATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_PROVIDER}`,
186
+ DELETE_PROVIDER: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_PROVIDER(uuid)}`,
187
+ GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
188
+ GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
189
+ CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
190
+ UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
191
+ DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
192
+ GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
193
+ CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
194
+ DELETE_BILLING_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(uuid)}`,
195
+ },
181
196
  };
@@ -13,8 +13,8 @@ var CreateConfigProfileCommand;
13
13
  CreateConfigProfileCommand.RequestSchema = zod_1.z.object({
14
14
  name: zod_1.z
15
15
  .string()
16
- .min(6, 'Name must be at least 6 characters')
17
- .max(16, 'Name must be less than 16 characters')
16
+ .min(2, 'Name must be at least 2 characters')
17
+ .max(20, 'Name must be less than 20 characters')
18
18
  .regex(/^[A-Za-z0-9_-]+$/, 'Name can only contain letters, numbers, underscores and dashes'),
19
19
  config: zod_1.z.object({}).passthrough(),
20
20
  });
@@ -4,8 +4,8 @@ export declare namespace CreateHostCommand {
4
4
  const TSQ_url: "/api/hosts/";
5
5
  const endpointDetails: import("../../constants").EndpointDetails;
6
6
  const RequestSchema: z.ZodObject<{
7
- configProfileUuid: z.ZodString;
8
- configProfileInboundUuid: z.ZodString;
7
+ configProfileUuid: z.ZodOptional<z.ZodString>;
8
+ configProfileInboundUuid: z.ZodOptional<z.ZodString>;
9
9
  remark: z.ZodString;
10
10
  address: z.ZodString;
11
11
  port: z.ZodNumber;
@@ -43,8 +43,6 @@ export declare namespace CreateHostCommand {
43
43
  port: number;
44
44
  remark: string;
45
45
  address: string;
46
- configProfileUuid: string;
47
- configProfileInboundUuid: string;
48
46
  path?: string | undefined;
49
47
  sni?: string | undefined;
50
48
  host?: string | undefined;
@@ -53,13 +51,13 @@ export declare namespace CreateHostCommand {
53
51
  isDisabled?: boolean | undefined;
54
52
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
55
53
  xHttpExtraParams?: unknown;
54
+ configProfileUuid?: string | undefined;
55
+ configProfileInboundUuid?: string | undefined;
56
56
  allowInsecure?: boolean | undefined;
57
57
  }, {
58
58
  port: number;
59
59
  remark: string;
60
60
  address: string;
61
- configProfileUuid: string;
62
- configProfileInboundUuid: string;
63
61
  path?: string | undefined;
64
62
  sni?: string | undefined;
65
63
  host?: string | undefined;
@@ -68,6 +66,8 @@ export declare namespace CreateHostCommand {
68
66
  isDisabled?: boolean | undefined;
69
67
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
70
68
  xHttpExtraParams?: unknown;
69
+ configProfileUuid?: string | undefined;
70
+ configProfileInboundUuid?: string | undefined;
71
71
  allowInsecure?: boolean | undefined;
72
72
  }>;
73
73
  type Request = z.infer<typeof RequestSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoCxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsCxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -15,12 +15,14 @@ var CreateHostCommand;
15
15
  .string({
16
16
  invalid_type_error: 'Config Profile UUID must be a string',
17
17
  })
18
- .uuid('Config Profile UUID must be a valid UUID'),
18
+ .uuid('Config Profile UUID must be a valid UUID')
19
+ .optional(),
19
20
  configProfileInboundUuid: zod_1.z
20
21
  .string({
21
22
  invalid_type_error: 'Inbound UUID must be a string',
22
23
  })
23
- .uuid('Inbound UUID must be a valid UUID'),
24
+ .uuid('Inbound UUID must be a valid UUID')
25
+ .optional(),
24
26
  remark: zod_1.z
25
27
  .string({
26
28
  invalid_type_error: 'Remark must be a string',
@@ -3,6 +3,7 @@ export * from './auth';
3
3
  export * from './config-profiles';
4
4
  export * from './hosts';
5
5
  export * from './hwid';
6
+ export * from './infra-billing';
6
7
  export * from './internal-squads';
7
8
  export * from './keygen';
8
9
  export * from './nodes';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -0,0 +1,125 @@
1
+ import { z } from 'zod';
2
+ export declare namespace CreateInfraBillingHistoryRecordCommand {
3
+ const url: "/api/infra-billing/history";
4
+ const TSQ_url: "/api/infra-billing/history";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ providerUuid: z.ZodString;
8
+ amount: z.ZodNumber;
9
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ providerUuid: string;
12
+ amount: number;
13
+ billedAt: Date;
14
+ }, {
15
+ providerUuid: string;
16
+ amount: number;
17
+ billedAt: string;
18
+ }>;
19
+ type Request = z.infer<typeof RequestSchema>;
20
+ const ResponseSchema: z.ZodObject<{
21
+ response: z.ZodObject<{
22
+ records: z.ZodArray<z.ZodObject<{
23
+ uuid: z.ZodString;
24
+ providerUuid: z.ZodString;
25
+ amount: z.ZodNumber;
26
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
27
+ provider: z.ZodObject<Omit<{
28
+ uuid: z.ZodString;
29
+ name: z.ZodString;
30
+ faviconLink: z.ZodNullable<z.ZodString>;
31
+ loginUrl: z.ZodNullable<z.ZodString>;
32
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
33
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ }, "createdAt" | "updatedAt" | "loginUrl">, "strip", z.ZodTypeAny, {
35
+ uuid: string;
36
+ name: string;
37
+ faviconLink: string | null;
38
+ }, {
39
+ uuid: string;
40
+ name: string;
41
+ faviconLink: string | null;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ uuid: string;
45
+ providerUuid: string;
46
+ provider: {
47
+ uuid: string;
48
+ name: string;
49
+ faviconLink: string | null;
50
+ };
51
+ amount: number;
52
+ billedAt: Date;
53
+ }, {
54
+ uuid: string;
55
+ providerUuid: string;
56
+ provider: {
57
+ uuid: string;
58
+ name: string;
59
+ faviconLink: string | null;
60
+ };
61
+ amount: number;
62
+ billedAt: string;
63
+ }>, "many">;
64
+ total: z.ZodNumber;
65
+ }, "strip", z.ZodTypeAny, {
66
+ total: number;
67
+ records: {
68
+ uuid: string;
69
+ providerUuid: string;
70
+ provider: {
71
+ uuid: string;
72
+ name: string;
73
+ faviconLink: string | null;
74
+ };
75
+ amount: number;
76
+ billedAt: Date;
77
+ }[];
78
+ }, {
79
+ total: number;
80
+ records: {
81
+ uuid: string;
82
+ providerUuid: string;
83
+ provider: {
84
+ uuid: string;
85
+ name: string;
86
+ faviconLink: string | null;
87
+ };
88
+ amount: number;
89
+ billedAt: string;
90
+ }[];
91
+ }>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ response: {
94
+ total: number;
95
+ records: {
96
+ uuid: string;
97
+ providerUuid: string;
98
+ provider: {
99
+ uuid: string;
100
+ name: string;
101
+ faviconLink: string | null;
102
+ };
103
+ amount: number;
104
+ billedAt: Date;
105
+ }[];
106
+ };
107
+ }, {
108
+ response: {
109
+ total: number;
110
+ records: {
111
+ uuid: string;
112
+ providerUuid: string;
113
+ provider: {
114
+ uuid: string;
115
+ name: string;
116
+ faviconLink: string | null;
117
+ };
118
+ amount: number;
119
+ billedAt: string;
120
+ }[];
121
+ };
122
+ }>;
123
+ type Response = z.infer<typeof ResponseSchema>;
124
+ }
125
+ //# sourceMappingURL=create-bill-record.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-bill-record.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/create-bill-record.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,8BAAgD,CAAC;IAC1D,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAUxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInfraBillingHistoryRecordCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var CreateInfraBillingHistoryRecordCommand;
9
+ (function (CreateInfraBillingHistoryRecordCommand) {
10
+ CreateInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_HISTORY;
11
+ CreateInfraBillingHistoryRecordCommand.TSQ_url = CreateInfraBillingHistoryRecordCommand.url;
12
+ CreateInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY, 'post', 'Create infra billing history');
13
+ CreateInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
14
+ providerUuid: zod_1.z.string().uuid(),
15
+ amount: zod_1.z.number().min(0, 'Amount must be greater than 0'),
16
+ billedAt: zod_1.z
17
+ .string({
18
+ invalid_type_error: 'Invalid date format',
19
+ })
20
+ .datetime({ message: 'Invalid date format', offset: true, local: true })
21
+ .transform((str) => new Date(str))
22
+ .describe('Billing date. Format: 2025-01-17T15:38:45.065Z'),
23
+ });
24
+ CreateInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
25
+ response: zod_1.z.object({
26
+ records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
27
+ total: zod_1.z.number(),
28
+ }),
29
+ });
30
+ })(CreateInfraBillingHistoryRecordCommand || (exports.CreateInfraBillingHistoryRecordCommand = CreateInfraBillingHistoryRecordCommand = {}));