@remnawave/backend-contract 0.0.12 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,12 +3,12 @@ export const USERS_CONTROLLER = 'users' as const;
3
3
  export const USERS_ROUTES = {
4
4
  CREATE: '',
5
5
  GET_BY_UUID: '',
6
- GET_BY_SHORT_UUID: 'short-uuid/:shortUuid',
7
- GET_BY_SUBSCRIPTION_UUID: 'sub-uuid/:subscriptionUuid',
6
+ GET_BY_SHORT_UUID: 'short-uuid',
7
+ GET_BY_SUBSCRIPTION_UUID: 'sub-uuid',
8
8
  GET_ALL: '',
9
- REVOKE_SUBSCRIPTION: 'revoke/:uuid',
10
- DISABLE_USER: 'disable/:uuid',
11
- ENABLE_USER: 'enable/:uuid',
12
- DELETE_USER: 'delete/:uuid',
9
+ REVOKE_SUBSCRIPTION: 'revoke',
10
+ DISABLE_USER: 'disable',
11
+ ENABLE_USER: 'enable',
12
+ DELETE_USER: 'delete',
13
13
  UPDATE: 'update',
14
14
  } as const;
package/api/routes.ts CHANGED
@@ -43,18 +43,18 @@ export const REST_API = {
43
43
  GET_BY_UUID: (uuid: string) =>
44
44
  `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID}${uuid}`,
45
45
  GET_BY_SHORT_UUID: (shortUuid: string) =>
46
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SHORT_UUID}/${shortUuid}`,
46
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SHORT_UUID}${shortUuid}`,
47
47
  GET_BY_SUBSCRIPTION_UUID: (subscriptionUuid: string) =>
48
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SUBSCRIPTION_UUID}/${subscriptionUuid}`,
48
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SUBSCRIPTION_UUID}${subscriptionUuid}`,
49
49
  GET_ALL: `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL}`,
50
50
  REVOKE_SUBSCRIPTION: (uuid: string) =>
51
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.REVOKE_SUBSCRIPTION}/${uuid}`,
51
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.REVOKE_SUBSCRIPTION}${uuid}`,
52
52
  DISABLE_USER: (uuid: string) =>
53
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DISABLE_USER}/${uuid}`,
53
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DISABLE_USER}${uuid}`,
54
54
  ENABLE_USER: (uuid: string) =>
55
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}/${uuid}`,
55
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}${uuid}`,
56
56
  DELETE_USER: (uuid: string) =>
57
- `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}/${uuid}`,
57
+ `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}${uuid}`,
58
58
  UPDATE: `${ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
59
59
  },
60
60
  SUBSCRIPTION: {
@@ -5,12 +5,12 @@ exports.USERS_CONTROLLER = 'users';
5
5
  exports.USERS_ROUTES = {
6
6
  CREATE: '',
7
7
  GET_BY_UUID: '',
8
- GET_BY_SHORT_UUID: 'short-uuid/:shortUuid',
9
- GET_BY_SUBSCRIPTION_UUID: 'sub-uuid/:subscriptionUuid',
8
+ GET_BY_SHORT_UUID: 'short-uuid',
9
+ GET_BY_SUBSCRIPTION_UUID: 'sub-uuid',
10
10
  GET_ALL: '',
11
- REVOKE_SUBSCRIPTION: 'revoke/:uuid',
12
- DISABLE_USER: 'disable/:uuid',
13
- ENABLE_USER: 'enable/:uuid',
14
- DELETE_USER: 'delete/:uuid',
11
+ REVOKE_SUBSCRIPTION: 'revoke',
12
+ DISABLE_USER: 'disable',
13
+ ENABLE_USER: 'enable',
14
+ DELETE_USER: 'delete',
15
15
  UPDATE: 'update',
16
16
  };
@@ -69,13 +69,13 @@ exports.REST_API = {
69
69
  USERS: {
70
70
  CREATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.CREATE}`,
71
71
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID}${uuid}`,
72
- GET_BY_SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SHORT_UUID}/${shortUuid}`,
73
- GET_BY_SUBSCRIPTION_UUID: (subscriptionUuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SUBSCRIPTION_UUID}/${subscriptionUuid}`,
72
+ GET_BY_SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SHORT_UUID}${shortUuid}`,
73
+ GET_BY_SUBSCRIPTION_UUID: (subscriptionUuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_SUBSCRIPTION_UUID}${subscriptionUuid}`,
74
74
  GET_ALL: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL}`,
75
- REVOKE_SUBSCRIPTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.REVOKE_SUBSCRIPTION}/${uuid}`,
76
- DISABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DISABLE_USER}/${uuid}`,
77
- ENABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}/${uuid}`,
78
- DELETE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}/${uuid}`,
75
+ REVOKE_SUBSCRIPTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.REVOKE_SUBSCRIPTION}${uuid}`,
76
+ DISABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DISABLE_USER}${uuid}`,
77
+ ENABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}${uuid}`,
78
+ DELETE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}${uuid}`,
79
79
  UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
80
80
  },
81
81
  SUBSCRIPTION: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {