@remnawave/backend-contract 2.0.0-alpha.9 → 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/build/backend/api/controllers/auth.d.ts +2 -0
- package/build/backend/api/controllers/auth.d.ts.map +1 -1
- package/build/backend/api/controllers/auth.js +2 -0
- package/build/backend/api/controllers/infra-billing.d.ts +1 -1
- package/build/backend/api/controllers/infra-billing.d.ts.map +1 -1
- package/build/backend/api/controllers/infra-billing.js +1 -5
- package/build/backend/api/controllers/internal-squads.d.ts +4 -0
- package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
- package/build/backend/api/controllers/internal-squads.js +5 -0
- package/build/backend/api/controllers/subscription.d.ts +1 -0
- package/build/backend/api/controllers/subscription.d.ts.map +1 -1
- package/build/backend/api/controllers/subscription.js +1 -0
- package/build/backend/api/controllers/system.d.ts +1 -0
- package/build/backend/api/controllers/system.d.ts.map +1 -1
- package/build/backend/api/controllers/system.js +1 -0
- package/build/backend/api/routes.d.ts +9 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +9 -1
- package/build/backend/commands/api-tokens/create.command.d.ts +0 -3
- package/build/backend/commands/api-tokens/create.command.d.ts.map +1 -1
- package/build/backend/commands/api-tokens/create.command.js +0 -1
- package/build/backend/commands/api-tokens/find.command.d.ts +0 -7
- package/build/backend/commands/api-tokens/find.command.d.ts.map +1 -1
- package/build/backend/commands/auth/get-status.command.d.ts +23 -0
- package/build/backend/commands/auth/get-status.command.d.ts.map +1 -1
- package/build/backend/commands/auth/get-status.command.js +3 -0
- package/build/backend/commands/auth/oauth2/authorize.command.d.ts +36 -0
- package/build/backend/commands/auth/oauth2/authorize.command.d.ts.map +1 -0
- package/build/backend/commands/auth/oauth2/authorize.command.js +20 -0
- package/build/backend/commands/auth/oauth2/callback.command.d.ts +43 -0
- package/build/backend/commands/auth/oauth2/callback.command.d.ts.map +1 -0
- package/build/backend/commands/auth/oauth2/callback.command.js +22 -0
- package/build/backend/commands/auth/oauth2/index.d.ts +2 -0
- package/build/backend/commands/auth/oauth2/index.d.ts.map +1 -1
- package/build/backend/commands/auth/oauth2/index.js +2 -0
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.d.ts +52 -19
- package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.js +13 -13
- package/build/backend/commands/hosts/get-all.command.d.ts +31 -10
- package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/get-one.command.d.ts +31 -10
- package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/reorder.command.d.ts +11 -2
- package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.d.ts +63 -21
- package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.js +10 -11
- package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
- package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +467 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
- package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +59 -0
- package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/create-infra-provider.command.js +1 -1
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +461 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +453 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.js +26 -0
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +59 -0
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +77 -0
- package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/index.d.ts +7 -0
- package/build/backend/commands/infra-billing/index.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/index.js +7 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +464 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
- package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +59 -0
- package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/update-infra-provider.command.js +1 -1
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts +33 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts +33 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +3 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.js +18 -0
- package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..d.ts → get-internal-squad-by-uuid.d.ts} +1 -1
- package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/index.d.ts +2 -1
- package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
- package/build/backend/commands/internal-squads/index.js +2 -1
- package/build/backend/commands/nodes/actions/disable.command.d.ts +140 -101
- package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/enable.command.d.ts +140 -101
- package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +194 -128
- package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.d.ts +158 -107
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.js +6 -4
- package/build/backend/commands/nodes/get-all.command.d.ts +140 -101
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-one.command.d.ts +140 -101
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
- package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
- package/build/backend/commands/nodes/update.command.d.ts +212 -134
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.js +8 -4
- package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts +354 -0
- package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +67 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +4 -4
- package/build/backend/commands/subscription/index.d.ts +1 -0
- package/build/backend/commands/subscription/index.d.ts.map +1 -1
- package/build/backend/commands/subscription/index.js +1 -0
- package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +6 -6
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +4 -4
- package/build/backend/commands/system/get-nodes-metrics.command.d.ts +153 -0
- package/build/backend/commands/system/get-nodes-metrics.command.d.ts.map +1 -0
- package/build/backend/commands/system/get-nodes-metrics.command.js +33 -0
- package/build/backend/commands/system/index.d.ts +1 -0
- package/build/backend/commands/system/index.d.ts.map +1 -1
- package/build/backend/commands/system/index.js +1 -0
- package/build/backend/commands/users/create-user.command.d.ts +6 -6
- package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/create-user.command.js +2 -4
- package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
- package/build/backend/constants/errors/errors.d.ts +85 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +85 -0
- package/build/backend/constants/events/events.d.ts +11 -0
- package/build/backend/constants/events/events.d.ts.map +1 -1
- package/build/backend/constants/events/events.js +10 -0
- package/build/backend/constants/headers/headers.constants.d.ts +3 -0
- package/build/backend/constants/headers/headers.constants.d.ts.map +1 -0
- package/build/backend/constants/headers/headers.constants.js +5 -0
- package/build/backend/constants/headers/index.d.ts +2 -0
- package/build/backend/constants/headers/index.d.ts.map +1 -0
- package/build/backend/constants/headers/index.js +17 -0
- package/build/backend/constants/index.d.ts +3 -0
- package/build/backend/constants/index.d.ts.map +1 -1
- package/build/backend/constants/index.js +3 -0
- package/build/backend/constants/messaging/index.d.ts +2 -0
- package/build/backend/constants/messaging/index.d.ts.map +1 -0
- package/build/backend/constants/messaging/index.js +17 -0
- package/build/backend/constants/messaging/messaging.constants.d.ts +13 -0
- package/build/backend/constants/messaging/messaging.constants.d.ts.map +1 -0
- package/build/backend/constants/messaging/messaging.constants.js +19 -0
- package/build/backend/constants/metrics/metric-names.constant.d.ts +17 -0
- package/build/backend/constants/metrics/metric-names.constant.d.ts.map +1 -1
- package/build/backend/constants/metrics/metric-names.constant.js +17 -0
- package/build/backend/constants/oauth2/index.d.ts +2 -0
- package/build/backend/constants/oauth2/index.d.ts.map +1 -0
- package/build/backend/constants/oauth2/index.js +17 -0
- package/build/backend/constants/oauth2/providers.contants.d.ts +9 -0
- package/build/backend/constants/oauth2/providers.contants.d.ts.map +1 -0
- package/build/backend/constants/oauth2/providers.contants.js +9 -0
- package/build/backend/constants/templates/template-keys.d.ts +1 -1
- package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
- package/build/backend/constants/templates/template-keys.js +1 -0
- package/build/backend/models/api-tokens.schema.d.ts +0 -3
- package/build/backend/models/api-tokens.schema.d.ts.map +1 -1
- package/build/backend/models/api-tokens.schema.js +0 -1
- package/build/backend/models/{extented-users.schema.d.ts → extended-users.schema.d.ts} +1 -1
- package/build/backend/models/{extented-users.schema.d.ts.map → extended-users.schema.d.ts.map} +1 -1
- package/build/backend/models/hosts.schema.d.ts +21 -6
- package/build/backend/models/hosts.schema.d.ts.map +1 -1
- package/build/backend/models/hosts.schema.js +5 -2
- package/build/backend/models/index.d.ts +4 -1
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +4 -1
- package/build/backend/models/infra-billing-available-node.schema.d.ts +117 -0
- package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-available-node.schema.js +9 -0
- package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
- package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-history-record.schema.js +19 -0
- package/build/backend/models/infra-billing-node.schema.d.ts +180 -0
- package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-node.schema.js +34 -0
- package/build/backend/models/infra-provider.schema.d.ts +63 -0
- package/build/backend/models/infra-provider.schema.d.ts.map +1 -1
- package/build/backend/models/infra-provider.schema.js +24 -1
- package/build/backend/models/nodes.schema.d.ts +96 -63
- package/build/backend/models/nodes.schema.d.ts.map +1 -1
- package/build/backend/models/nodes.schema.js +6 -3
- package/build/frontend/api/controllers/auth.js +2 -0
- package/build/frontend/api/controllers/infra-billing.js +1 -5
- package/build/frontend/api/controllers/internal-squads.js +5 -0
- package/build/frontend/api/controllers/subscription.js +1 -0
- package/build/frontend/api/controllers/system.js +1 -0
- package/build/frontend/api/routes.js +9 -1
- package/build/frontend/commands/api-tokens/create.command.js +0 -1
- package/build/frontend/commands/auth/get-status.command.js +3 -0
- package/build/frontend/commands/auth/oauth2/authorize.command.js +20 -0
- package/build/frontend/commands/auth/oauth2/callback.command.js +22 -0
- package/build/frontend/commands/auth/oauth2/index.js +2 -0
- package/build/frontend/commands/hosts/create.command.js +13 -13
- package/build/frontend/commands/hosts/update.command.js +10 -11
- package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
- package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
- package/build/frontend/commands/infra-billing/create-infra-provider.command.js +1 -1
- package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
- package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
- package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
- package/build/frontend/commands/infra-billing/get-billing-nodes.command.js +26 -0
- package/build/frontend/commands/infra-billing/index.js +7 -0
- package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
- package/build/frontend/commands/infra-billing/update-infra-provider.command.js +1 -1
- package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
- package/build/frontend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
- package/build/frontend/commands/internal-squads/bulk-actions/index.js +18 -0
- package/build/frontend/commands/internal-squads/index.js +2 -1
- package/build/frontend/commands/nodes/create.command.js +6 -4
- package/build/frontend/commands/nodes/update.command.js +8 -4
- package/build/frontend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +67 -0
- package/build/frontend/commands/subscription/index.js +1 -0
- package/build/frontend/commands/system/get-nodes-metrics.command.js +33 -0
- package/build/frontend/commands/system/index.js +1 -0
- package/build/frontend/commands/users/create-user.command.js +2 -4
- package/build/frontend/constants/errors/errors.js +85 -0
- package/build/frontend/constants/events/events.js +10 -0
- package/build/frontend/constants/headers/headers.constants.js +5 -0
- package/build/frontend/constants/headers/index.js +17 -0
- package/build/frontend/constants/index.js +3 -0
- package/build/frontend/constants/messaging/index.js +17 -0
- package/build/frontend/constants/messaging/messaging.constants.js +19 -0
- package/build/frontend/constants/metrics/metric-names.constant.js +17 -0
- package/build/frontend/constants/oauth2/index.js +17 -0
- package/build/frontend/constants/oauth2/providers.contants.js +9 -0
- package/build/frontend/constants/templates/template-keys.js +1 -0
- package/build/frontend/models/api-tokens.schema.js +0 -1
- package/build/frontend/models/hosts.schema.js +5 -2
- package/build/frontend/models/index.js +4 -1
- package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
- package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
- package/build/frontend/models/infra-billing-node.schema.js +34 -0
- package/build/frontend/models/infra-provider.schema.js +24 -1
- package/build/frontend/models/nodes.schema.js +6 -3
- package/package.json +2 -2
- package/build/backend/commands/internal-squads/get-internal-squad-by-uuid..d.ts.map +0 -1
- /package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
- /package/build/backend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
- /package/build/frontend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
- /package/build/frontend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
@@ -45,6 +45,8 @@ exports.REST_API = {
|
|
45
45
|
GET_STATUS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.GET_STATUS}`,
|
46
46
|
OAUTH2: {
|
47
47
|
TELEGRAM_CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.TELEGRAM_CALLBACK}`,
|
48
|
+
AUTHORIZE: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.AUTHORIZE}`,
|
49
|
+
CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.CALLBACK}`,
|
48
50
|
},
|
49
51
|
},
|
50
52
|
API_TOKENS: {
|
@@ -118,6 +120,7 @@ exports.REST_API = {
|
|
118
120
|
GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
|
119
121
|
GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
|
120
122
|
GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
|
123
|
+
GET_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_RAW(shortUuid)}`,
|
121
124
|
},
|
122
125
|
HOSTS: {
|
123
126
|
CREATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.CREATE}`,
|
@@ -142,6 +145,7 @@ exports.REST_API = {
|
|
142
145
|
SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.SYSTEM_STATS}`,
|
143
146
|
BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
|
144
147
|
NODES_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_STATS}`,
|
148
|
+
NODES_METRICS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_METRICS}`,
|
145
149
|
},
|
146
150
|
},
|
147
151
|
SUBSCRIPTION_TEMPLATE: {
|
@@ -178,6 +182,10 @@ exports.REST_API = {
|
|
178
182
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.UPDATE}`,
|
179
183
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
|
180
184
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
|
185
|
+
BULK_ACTIONS: {
|
186
|
+
ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
|
187
|
+
REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
|
188
|
+
},
|
181
189
|
},
|
182
190
|
INFRA_BILLING: {
|
183
191
|
GET_PROVIDERS: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDERS}`,
|
@@ -187,7 +195,7 @@ exports.REST_API = {
|
|
187
195
|
GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
|
188
196
|
GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
|
189
197
|
CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
|
190
|
-
UPDATE_BILLING_NODE:
|
198
|
+
UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
|
191
199
|
DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
|
192
200
|
GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
|
193
201
|
CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
|
@@ -11,7 +11,6 @@ var CreateApiTokenCommand;
|
|
11
11
|
CreateApiTokenCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.CREATE, 'post', 'Create a new API token', 'This endpoint is forbidden to use via "API-key". It can only be used with an admin JWT-token.');
|
12
12
|
CreateApiTokenCommand.RequestSchema = zod_1.z.object({
|
13
13
|
tokenName: zod_1.z.string(),
|
14
|
-
tokenDescription: zod_1.z.string().nullable(),
|
15
14
|
});
|
16
15
|
CreateApiTokenCommand.ResponseSchema = zod_1.z.object({
|
17
16
|
response: zod_1.z.object({
|
@@ -18,6 +18,9 @@ var GetStatusCommand;
|
|
18
18
|
botId: zod_1.z.number(),
|
19
19
|
})
|
20
20
|
.nullable(),
|
21
|
+
oauth2: zod_1.z.object({
|
22
|
+
providers: zod_1.z.record(zod_1.z.nativeEnum(constants_1.OAUTH2_PROVIDERS), zod_1.z.boolean()),
|
23
|
+
}),
|
21
24
|
}),
|
22
25
|
});
|
23
26
|
})(GetStatusCommand || (exports.GetStatusCommand = GetStatusCommand = {}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OAuth2AuthorizeCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var OAuth2AuthorizeCommand;
|
8
|
+
(function (OAuth2AuthorizeCommand) {
|
9
|
+
OAuth2AuthorizeCommand.url = api_1.REST_API.AUTH.OAUTH2.AUTHORIZE;
|
10
|
+
OAuth2AuthorizeCommand.TSQ_url = OAuth2AuthorizeCommand.url;
|
11
|
+
OAuth2AuthorizeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.OAUTH2.AUTHORIZE, 'post', 'Initiate OAuth2 authorization');
|
12
|
+
OAuth2AuthorizeCommand.RequestSchema = zod_1.z.object({
|
13
|
+
provider: zod_1.z.nativeEnum(constants_1.OAUTH2_PROVIDERS),
|
14
|
+
});
|
15
|
+
OAuth2AuthorizeCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
authorizationUrl: zod_1.z.nullable(zod_1.z.string().url()),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(OAuth2AuthorizeCommand || (exports.OAuth2AuthorizeCommand = OAuth2AuthorizeCommand = {}));
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OAuth2CallbackCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var OAuth2CallbackCommand;
|
8
|
+
(function (OAuth2CallbackCommand) {
|
9
|
+
OAuth2CallbackCommand.url = api_1.REST_API.AUTH.OAUTH2.CALLBACK;
|
10
|
+
OAuth2CallbackCommand.TSQ_url = OAuth2CallbackCommand.url;
|
11
|
+
OAuth2CallbackCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.OAUTH2.CALLBACK, 'post', 'Callback from OAuth2');
|
12
|
+
OAuth2CallbackCommand.RequestSchema = zod_1.z.object({
|
13
|
+
provider: zod_1.z.nativeEnum(constants_1.OAUTH2_PROVIDERS),
|
14
|
+
code: zod_1.z.string(),
|
15
|
+
state: zod_1.z.string(),
|
16
|
+
});
|
17
|
+
OAuth2CallbackCommand.ResponseSchema = zod_1.z.object({
|
18
|
+
response: zod_1.z.object({
|
19
|
+
accessToken: zod_1.z.string(),
|
20
|
+
}),
|
21
|
+
});
|
22
|
+
})(OAuth2CallbackCommand || (exports.OAuth2CallbackCommand = OAuth2CallbackCommand = {}));
|
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./authorize.command"), exports);
|
18
|
+
__exportStar(require("./callback.command"), exports);
|
17
19
|
__exportStar(require("./telegram-callback.command"), exports);
|
@@ -11,21 +11,16 @@ var CreateHostCommand;
|
|
11
11
|
CreateHostCommand.TSQ_url = CreateHostCommand.url;
|
12
12
|
CreateHostCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.CREATE, 'post', 'Create a new host');
|
13
13
|
CreateHostCommand.RequestSchema = zod_1.z.object({
|
14
|
-
|
15
|
-
.string(
|
16
|
-
|
17
|
-
})
|
18
|
-
.uuid('Config Profile UUID must be a valid UUID')
|
19
|
-
.optional(),
|
20
|
-
configProfileInboundUuid: zod_1.z
|
21
|
-
.string({
|
22
|
-
invalid_type_error: 'Inbound UUID must be a string',
|
23
|
-
})
|
24
|
-
.uuid('Inbound UUID must be a valid UUID')
|
25
|
-
.optional(),
|
14
|
+
inbound: zod_1.z.object({
|
15
|
+
configProfileUuid: zod_1.z.string().uuid(),
|
16
|
+
configProfileInboundUuid: zod_1.z.string().uuid(),
|
17
|
+
}),
|
26
18
|
remark: zod_1.z
|
27
19
|
.string({
|
28
20
|
invalid_type_error: 'Remark must be a string',
|
21
|
+
})
|
22
|
+
.min(1, {
|
23
|
+
message: 'Remark must be at least 1 character',
|
29
24
|
})
|
30
25
|
.max(40, {
|
31
26
|
message: 'Remark must be less than 40 characters',
|
@@ -43,10 +38,15 @@ var CreateHostCommand;
|
|
43
38
|
host: zod_1.z.string().optional(),
|
44
39
|
alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
|
45
40
|
fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
|
46
|
-
allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
|
47
41
|
isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
|
48
42
|
securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS).default(constants_1.SECURITY_LAYERS.DEFAULT)),
|
49
43
|
xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
|
44
|
+
serverDescription: zod_1.z.optional(zod_1.z
|
45
|
+
.string()
|
46
|
+
.max(30, {
|
47
|
+
message: 'Server description must be less than 30 characters',
|
48
|
+
})
|
49
|
+
.nullable()),
|
50
50
|
});
|
51
51
|
CreateHostCommand.ResponseSchema = zod_1.z.object({
|
52
52
|
response: models_1.HostsSchema,
|
@@ -13,17 +13,11 @@ var UpdateHostCommand;
|
|
13
13
|
UpdateHostCommand.RequestSchema = models_1.HostsSchema.pick({
|
14
14
|
uuid: true,
|
15
15
|
}).extend({
|
16
|
-
|
17
|
-
.
|
18
|
-
|
16
|
+
inbound: zod_1.z
|
17
|
+
.object({
|
18
|
+
configProfileUuid: zod_1.z.string().uuid(),
|
19
|
+
configProfileInboundUuid: zod_1.z.string().uuid(),
|
19
20
|
})
|
20
|
-
.uuid('Config Profile UUID must be a valid UUID')
|
21
|
-
.optional(),
|
22
|
-
configProfileInboundUuid: zod_1.z
|
23
|
-
.string({
|
24
|
-
invalid_type_error: 'Inbound UUID must be a string',
|
25
|
-
})
|
26
|
-
.uuid('Inbound UUID must be a valid UUID')
|
27
21
|
.optional(),
|
28
22
|
remark: zod_1.z
|
29
23
|
.string({
|
@@ -49,10 +43,15 @@ var UpdateHostCommand;
|
|
49
43
|
host: zod_1.z.optional(zod_1.z.string()),
|
50
44
|
alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
|
51
45
|
fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
|
52
|
-
allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
|
53
46
|
isDisabled: zod_1.z.optional(zod_1.z.boolean()),
|
54
47
|
securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
|
55
48
|
xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
|
49
|
+
serverDescription: zod_1.z.optional(zod_1.z
|
50
|
+
.string()
|
51
|
+
.max(30, {
|
52
|
+
message: 'Server description must be less than 30 characters',
|
53
|
+
})
|
54
|
+
.nullable()),
|
56
55
|
});
|
57
56
|
UpdateHostCommand.ResponseSchema = zod_1.z.object({
|
58
57
|
response: models_1.HostsSchema,
|
@@ -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 = {}));
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateInfraBillingNodeCommand = 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 CreateInfraBillingNodeCommand;
|
9
|
+
(function (CreateInfraBillingNodeCommand) {
|
10
|
+
CreateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_NODE;
|
11
|
+
CreateInfraBillingNodeCommand.TSQ_url = CreateInfraBillingNodeCommand.url;
|
12
|
+
CreateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE, 'post', 'Create infra billing node');
|
13
|
+
CreateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
|
14
|
+
providerUuid: zod_1.z.string().uuid(),
|
15
|
+
nodeUuid: zod_1.z.string().uuid(),
|
16
|
+
nextBillingAt: 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
|
+
.optional()
|
23
|
+
.describe('Next billing date. Format: 2025-01-17T15:38:45.065Z'),
|
24
|
+
});
|
25
|
+
CreateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
|
26
|
+
response: zod_1.z.object({
|
27
|
+
totalBillingNodes: zod_1.z.number(),
|
28
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
29
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
30
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
31
|
+
stats: zod_1.z.object({
|
32
|
+
upcomingNodesCount: zod_1.z.number(),
|
33
|
+
currentMonthPayments: zod_1.z.number(),
|
34
|
+
totalSpent: zod_1.z.number(),
|
35
|
+
}),
|
36
|
+
}),
|
37
|
+
});
|
38
|
+
})(CreateInfraBillingNodeCommand || (exports.CreateInfraBillingNodeCommand = CreateInfraBillingNodeCommand = {}));
|
@@ -14,7 +14,7 @@ var CreateInfraProviderCommand;
|
|
14
14
|
name: zod_1.z
|
15
15
|
.string()
|
16
16
|
.min(2, 'Name must be at least 2 characters')
|
17
|
-
.max(30, 'Name must be less than
|
17
|
+
.max(30, 'Name must be less than 30 characters'),
|
18
18
|
faviconLink: zod_1.z.string().url().optional(),
|
19
19
|
loginUrl: zod_1.z.string().url().optional(),
|
20
20
|
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteInfraBillingHistoryRecordCommand = 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 DeleteInfraBillingHistoryRecordCommand;
|
9
|
+
(function (DeleteInfraBillingHistoryRecordCommand) {
|
10
|
+
DeleteInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_HISTORY(':uuid');
|
11
|
+
DeleteInfraBillingHistoryRecordCommand.TSQ_url = DeleteInfraBillingHistoryRecordCommand.url;
|
12
|
+
DeleteInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(':uuid'), 'delete', 'Delete infra billing history');
|
13
|
+
DeleteInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
});
|
16
|
+
DeleteInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: zod_1.z.object({
|
18
|
+
records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
|
19
|
+
total: zod_1.z.number(),
|
20
|
+
}),
|
21
|
+
});
|
22
|
+
})(DeleteInfraBillingHistoryRecordCommand || (exports.DeleteInfraBillingHistoryRecordCommand = DeleteInfraBillingHistoryRecordCommand = {}));
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteInfraBillingNodeByUuidCommand = 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 DeleteInfraBillingNodeByUuidCommand;
|
9
|
+
(function (DeleteInfraBillingNodeByUuidCommand) {
|
10
|
+
DeleteInfraBillingNodeByUuidCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_NODE(':uuid');
|
11
|
+
DeleteInfraBillingNodeByUuidCommand.TSQ_url = DeleteInfraBillingNodeByUuidCommand.url;
|
12
|
+
DeleteInfraBillingNodeByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(':uuid'), 'delete', 'Delete infra billing node');
|
13
|
+
DeleteInfraBillingNodeByUuidCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
});
|
16
|
+
DeleteInfraBillingNodeByUuidCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: zod_1.z.object({
|
18
|
+
totalBillingNodes: zod_1.z.number(),
|
19
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
20
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
21
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
22
|
+
stats: zod_1.z.object({
|
23
|
+
upcomingNodesCount: zod_1.z.number(),
|
24
|
+
currentMonthPayments: zod_1.z.number(),
|
25
|
+
totalSpent: zod_1.z.number(),
|
26
|
+
}),
|
27
|
+
}),
|
28
|
+
});
|
29
|
+
})(DeleteInfraBillingNodeByUuidCommand || (exports.DeleteInfraBillingNodeByUuidCommand = DeleteInfraBillingNodeByUuidCommand = {}));
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraBillingHistoryRecordsCommand = 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 GetInfraBillingHistoryRecordsCommand;
|
9
|
+
(function (GetInfraBillingHistoryRecordsCommand) {
|
10
|
+
GetInfraBillingHistoryRecordsCommand.url = api_1.REST_API.INFRA_BILLING.GET_BILLING_HISTORY;
|
11
|
+
GetInfraBillingHistoryRecordsCommand.TSQ_url = GetInfraBillingHistoryRecordsCommand.url;
|
12
|
+
GetInfraBillingHistoryRecordsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY, 'get', 'Get infra billing history');
|
13
|
+
GetInfraBillingHistoryRecordsCommand.RequestQuerySchema = zod_1.z.object({
|
14
|
+
start: zod_1.z.coerce
|
15
|
+
.number()
|
16
|
+
.default(0)
|
17
|
+
.describe('Start index (offset) of the billing history records to return, default is 0'),
|
18
|
+
size: zod_1.z.coerce
|
19
|
+
.number()
|
20
|
+
.min(1, 'Size (limit) must be greater than 0')
|
21
|
+
.max(500, 'Size (limit) must be less than 500')
|
22
|
+
.describe('Number of billing records to return, no more than 500')
|
23
|
+
.default(50),
|
24
|
+
});
|
25
|
+
GetInfraBillingHistoryRecordsCommand.ResponseSchema = zod_1.z.object({
|
26
|
+
response: zod_1.z.object({
|
27
|
+
records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
|
28
|
+
total: zod_1.z.number(),
|
29
|
+
}),
|
30
|
+
});
|
31
|
+
})(GetInfraBillingHistoryRecordsCommand || (exports.GetInfraBillingHistoryRecordsCommand = GetInfraBillingHistoryRecordsCommand = {}));
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraBillingNodesCommand = 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 GetInfraBillingNodesCommand;
|
9
|
+
(function (GetInfraBillingNodesCommand) {
|
10
|
+
GetInfraBillingNodesCommand.url = api_1.REST_API.INFRA_BILLING.GET_BILLING_NODES;
|
11
|
+
GetInfraBillingNodesCommand.TSQ_url = GetInfraBillingNodesCommand.url;
|
12
|
+
GetInfraBillingNodesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_BILLING_NODES, 'get', 'Get infra billing nodes');
|
13
|
+
GetInfraBillingNodesCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
totalBillingNodes: zod_1.z.number(),
|
16
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
17
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
18
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
19
|
+
stats: zod_1.z.object({
|
20
|
+
upcomingNodesCount: zod_1.z.number(),
|
21
|
+
currentMonthPayments: zod_1.z.number(),
|
22
|
+
totalSpent: zod_1.z.number(),
|
23
|
+
}),
|
24
|
+
}),
|
25
|
+
});
|
26
|
+
})(GetInfraBillingNodesCommand || (exports.GetInfraBillingNodesCommand = GetInfraBillingNodesCommand = {}));
|
@@ -14,8 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./create-bill-record.command"), exports);
|
18
|
+
__exportStar(require("./create-billing-node.command"), exports);
|
17
19
|
__exportStar(require("./create-infra-provider.command"), exports);
|
20
|
+
__exportStar(require("./delete-bill-record-by-uuid.command"), exports);
|
21
|
+
__exportStar(require("./delete-billing-node-by-uuid.command"), exports);
|
18
22
|
__exportStar(require("./delete-infra-provider-by-uuid.command"), exports);
|
23
|
+
__exportStar(require("./get-bill-records.command"), exports);
|
24
|
+
__exportStar(require("./get-billing-nodes.command"), exports);
|
19
25
|
__exportStar(require("./get-infra-provider-by-uuid.command"), exports);
|
20
26
|
__exportStar(require("./get-infra-providers.command"), exports);
|
27
|
+
__exportStar(require("./update-billing-node.command"), exports);
|
21
28
|
__exportStar(require("./update-infra-provider.command"), exports);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateInfraBillingNodeCommand = 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 UpdateInfraBillingNodeCommand;
|
9
|
+
(function (UpdateInfraBillingNodeCommand) {
|
10
|
+
UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
|
11
|
+
UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
|
12
|
+
UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
|
13
|
+
UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
nextBillingAt: zod_1.z
|
16
|
+
.string({
|
17
|
+
invalid_type_error: 'Invalid date format',
|
18
|
+
})
|
19
|
+
.datetime({ message: 'Invalid date format', offset: true, local: true })
|
20
|
+
.transform((str) => new Date(str)),
|
21
|
+
});
|
22
|
+
UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
|
23
|
+
response: zod_1.z.object({
|
24
|
+
totalBillingNodes: zod_1.z.number(),
|
25
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
26
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
27
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
28
|
+
stats: zod_1.z.object({
|
29
|
+
upcomingNodesCount: zod_1.z.number(),
|
30
|
+
currentMonthPayments: zod_1.z.number(),
|
31
|
+
totalSpent: zod_1.z.number(),
|
32
|
+
}),
|
33
|
+
}),
|
34
|
+
});
|
35
|
+
})(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));
|
@@ -15,7 +15,7 @@ var UpdateInfraProviderCommand;
|
|
15
15
|
name: zod_1.z
|
16
16
|
.string()
|
17
17
|
.min(2, 'Name must be at least 2 characters')
|
18
|
-
.max(30, 'Name must be less than
|
18
|
+
.max(30, 'Name must be less than 30 characters')
|
19
19
|
.optional(),
|
20
20
|
faviconLink: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
|
21
21
|
loginUrl: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
|
package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AddUsersToInternalSquadCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const constants_1 = require("../../../constants");
|
7
|
+
var AddUsersToInternalSquadCommand;
|
8
|
+
(function (AddUsersToInternalSquadCommand) {
|
9
|
+
AddUsersToInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.ADD_USERS;
|
10
|
+
AddUsersToInternalSquadCommand.TSQ_url = AddUsersToInternalSquadCommand.url(':uuid');
|
11
|
+
AddUsersToInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(':uuid'), 'post', 'Add all users to internal squad');
|
12
|
+
AddUsersToInternalSquadCommand.RequestSchema = zod_1.z.object({
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
14
|
+
});
|
15
|
+
AddUsersToInternalSquadCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
eventSent: zod_1.z.boolean(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(AddUsersToInternalSquadCommand || (exports.AddUsersToInternalSquadCommand = AddUsersToInternalSquadCommand = {}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteUsersFromInternalSquadCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const constants_1 = require("../../../constants");
|
7
|
+
var DeleteUsersFromInternalSquadCommand;
|
8
|
+
(function (DeleteUsersFromInternalSquadCommand) {
|
9
|
+
DeleteUsersFromInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.REMOVE_USERS;
|
10
|
+
DeleteUsersFromInternalSquadCommand.TSQ_url = DeleteUsersFromInternalSquadCommand.url(':uuid');
|
11
|
+
DeleteUsersFromInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(':uuid'), 'delete', 'Delete users from internal squad');
|
12
|
+
DeleteUsersFromInternalSquadCommand.RequestSchema = zod_1.z.object({
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
14
|
+
});
|
15
|
+
DeleteUsersFromInternalSquadCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
eventSent: zod_1.z.boolean(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(DeleteUsersFromInternalSquadCommand || (exports.DeleteUsersFromInternalSquadCommand = DeleteUsersFromInternalSquadCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./add-users-to-internal-squad.command"), exports);
|
18
|
+
__exportStar(require("./delete-users-from-internal-squad.command"), exports);
|
@@ -14,8 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./bulk-actions"), exports);
|
17
18
|
__exportStar(require("./create-internal-squad.command"), exports);
|
18
19
|
__exportStar(require("./delete-internal-squad.command"), exports);
|
19
|
-
__exportStar(require("./get-internal-squad-by-uuid
|
20
|
+
__exportStar(require("./get-internal-squad-by-uuid"), exports);
|
20
21
|
__exportStar(require("./get-internal-squads.command"), exports);
|
21
22
|
__exportStar(require("./update-internal-squad.command"), exports);
|
@@ -35,10 +35,12 @@ var CreateNodeCommand;
|
|
35
35
|
.number()
|
36
36
|
.min(0.1, 'Consumption multiplier must be greater than 0')
|
37
37
|
.transform((n) => Number(n.toFixed(1)))),
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
configProfile: zod_1.z.object({
|
39
|
+
activeConfigProfileUuid: zod_1.z.string().uuid(),
|
40
|
+
activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
41
|
+
invalid_type_error: 'Config profile inbound UUID must be an array of UUIDs',
|
42
|
+
}),
|
43
|
+
}),
|
42
44
|
providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
|
43
45
|
});
|
44
46
|
CreateNodeCommand.ResponseSchema = zod_1.z.object({
|
@@ -31,10 +31,14 @@ var UpdateNodeCommand;
|
|
31
31
|
.number()
|
32
32
|
.min(0.1, 'Consumption multiplier must be greater than 0')
|
33
33
|
.transform((n) => Number(n.toFixed(1)))),
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
configProfile: zod_1.z
|
35
|
+
.object({
|
36
|
+
activeConfigProfileUuid: zod_1.z.string().uuid(),
|
37
|
+
activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
38
|
+
invalid_type_error: 'Must be an array of UUIDs',
|
39
|
+
}),
|
40
|
+
})
|
41
|
+
.optional(),
|
38
42
|
providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
|
39
43
|
});
|
40
44
|
UpdateNodeCommand.ResponseSchema = zod_1.z.object({
|