@kulkan/kulterra-api-client 1.3.0 → 1.3.2

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.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RegisterRequest, IApiResponse, AuthSessionResponse, LoginRequest, OAuthGoogleStartResponse, OAuthGoogleCallbackRequest, RefreshRequest, LogoutRequest, AuthUserResponse, GetUsersQueryByTokenRequest, IPaginatedByTokenResponse, ToAdminUsersResponse, ToSAdminUsersResponse, UpdateUserByUserRequest, UpdateUserRoleByAdminRequest, UpdateUserBySAdminRequest, HealthCheck, GetCompaniesQueryRequest, IPaginatedResponse, PublicCompanyResponse, SAdminCompanyResponse, AdminCompanyResponse, CreateCompanyRequest, UpdateCompanyByAdminRequest, UpdateCompanyBySAdminRequest, GetProjectsQueryByTokenRequest, ProjectResponse, PublicProjectResponse, OwnerProjectResponse, CreateProjectRequest, UpdateProjectRequest, GetPropertiesQueryByTokenRequest, PropertyResponse, PublicPropertyResponse, BuyerPropertyResponse, CreatePropertyRequest, UpdatePropertyRequest } from '@kulkan/kulterra-contracts';
1
+ import { IApiResponse, HealthCheck, RegisterRequest, AuthSessionResponse, LoginRequest, OAuthGoogleStartResponse, OAuthGoogleCallbackRequest, RefreshRequest, LogoutRequest, AuthUserResponse, GetUsersQueryByTokenRequest, IPaginatedByTokenResponse, ToAdminUsersResponse, ToSAdminUsersResponse, UpdateUserByUserRequest, UpdateUserRoleByAdminRequest, UpdateUserBySAdminRequest, GetCompaniesQueryRequest, IPaginatedResponse, PublicCompanyResponse, SAdminCompanyResponse, AdminCompanyResponse, CreateCompanyRequest, UpdateCompanyByAdminRequest, UpdateCompanyBySAdminRequest, GetProjectsQueryByTokenRequest, ProjectResponse, PublicProjectResponse, OwnerProjectResponse, CreateProjectRequest, UpdateProjectRequest, GetPropertiesQueryByTokenRequest, PropertyResponse, PublicPropertyResponse, BuyerPropertyResponse, CreatePropertyRequest, UpdatePropertyRequest } from '@kulkan/kulterra-contracts';
2
2
 
3
3
  type HttpGet = <TResponse>(url: string, config?: unknown) => Promise<{
4
4
  data: TResponse;
@@ -15,6 +15,8 @@ interface HttpClient {
15
15
  readonly patch: HttpPatch;
16
16
  }
17
17
 
18
+ declare function fetchHealthCheck(http: HttpClient): Promise<IApiResponse<HealthCheck>>;
19
+
18
20
  declare function postRegister(http: HttpClient, body: RegisterRequest): Promise<IApiResponse<AuthSessionResponse>>;
19
21
  declare function postLogin(http: HttpClient, body: LoginRequest): Promise<IApiResponse<AuthSessionResponse>>;
20
22
  declare function getGoogleOAuthStart(http: HttpClient, redirectUri: string): Promise<IApiResponse<OAuthGoogleStartResponse>>;
@@ -28,20 +30,18 @@ declare function getUserById(http: HttpClient, accessToken: string, { userId }:
28
30
  userId: string;
29
31
  }): Promise<IApiResponse<ToSAdminUsersResponse>>;
30
32
  declare function patchUpdateMe(http: HttpClient, accessToken: string, patch: UpdateUserByUserRequest): Promise<void>;
31
- declare function patchUpdateRoleUserByAdmin(http: HttpClient, accessToken: string, { userId }: {
33
+ declare function patchUpdateUserRoleByAdmin(http: HttpClient, accessToken: string, { userId }: {
32
34
  userId: string;
33
35
  }, body: UpdateUserRoleByAdminRequest): Promise<void>;
34
36
  declare function patchUpdateUserBySAdmin(http: HttpClient, accessToken: string, { userId }: {
35
37
  userId: string;
36
38
  }, patch: UpdateUserBySAdminRequest): Promise<void>;
37
39
 
38
- declare function fetchHealthCheck(http: HttpClient): Promise<IApiResponse<HealthCheck>>;
39
-
40
40
  declare function getCompanies(http: HttpClient, accessToken: string, companyQuery: GetCompaniesQueryRequest): Promise<IApiResponse<IPaginatedResponse<PublicCompanyResponse | SAdminCompanyResponse>>>;
41
41
  declare function getMyCompany(http: HttpClient, accessToken: string): Promise<IApiResponse<AdminCompanyResponse>>;
42
- declare function getCompanyById(http: HttpClient, accessToken: string, { companyId }: {
43
- companyId: string;
44
- }): Promise<IApiResponse<SAdminCompanyResponse>>;
42
+ declare function getCompanyBySlug(http: HttpClient, accessToken: string, { companySlug }: {
43
+ companySlug: string;
44
+ }): Promise<IApiResponse<PublicCompanyResponse | SAdminCompanyResponse>>;
45
45
  declare function postCreateCompany(http: HttpClient, accessToken: string, newCompanyRequest: CreateCompanyRequest): Promise<IApiResponse<SAdminCompanyResponse>>;
46
46
  declare function patchUpdateMyCompany(http: HttpClient, accessToken: string, patch: UpdateCompanyByAdminRequest): Promise<void>;
47
47
  declare function patchUpdateCompanyBySAdmin(http: HttpClient, accessToken: string, { companyId }: {
@@ -49,10 +49,10 @@ declare function patchUpdateCompanyBySAdmin(http: HttpClient, accessToken: strin
49
49
  }, patch: UpdateCompanyBySAdminRequest): Promise<void>;
50
50
 
51
51
  declare function getProjects(http: HttpClient, accessToken: string, projectQuery: GetProjectsQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<ProjectResponse | PublicProjectResponse>>>;
52
- declare function getMyProjects(http: HttpClient, accessToken: string, projectQuery: GetProjectsQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<ProjectResponse | OwnerProjectResponse>>>;
53
- declare function getMyProjectBySlug(http: HttpClient, accessToken: string, { projectSlug }: {
54
- projectSlug: string;
55
- }): Promise<IApiResponse<ProjectResponse | OwnerProjectResponse>>;
52
+ declare function getMyProjects(http: HttpClient, accessToken: string, projectQuery: GetProjectsQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<OwnerProjectResponse>>>;
53
+ declare function getMyProjectById(http: HttpClient, accessToken: string, { projectId }: {
54
+ projectId: string;
55
+ }): Promise<IApiResponse<OwnerProjectResponse>>;
56
56
  declare function getProjectByCompanyAndSlug(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
57
57
  companySlug: string;
58
58
  projectSlug: string;
@@ -60,52 +60,33 @@ declare function getProjectByCompanyAndSlug(http: HttpClient, accessToken: strin
60
60
  declare function getProjectsByCompany(http: HttpClient, accessToken: string, { companySlug }: {
61
61
  companySlug: string;
62
62
  }, projectQuery: GetProjectsQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<ProjectResponse | PublicProjectResponse>>>;
63
- declare function postCreateProjectByAdmin(http: HttpClient, accessToken: string, newProjectRequest: CreateProjectRequest): Promise<IApiResponse<ProjectResponse>>;
64
- declare function postCreateProjectBySAdmin(http: HttpClient, accessToken: string, { companySlug }: {
63
+ declare function postCreateProject(http: HttpClient, accessToken: string, { companySlug }: {
65
64
  companySlug: string;
66
65
  }, newProjectRequest: CreateProjectRequest): Promise<IApiResponse<ProjectResponse>>;
67
- declare function patchUpdateProjectByAdmin(http: HttpClient, accessToken: string, { projectSlug }: {
68
- projectSlug: string;
69
- }, patch: UpdateProjectRequest): Promise<void>;
70
- declare function patchUpdateProjectBySAdmin(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
66
+ declare function patchUpdateProject(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
71
67
  companySlug: string;
72
68
  projectSlug: string;
73
69
  }, patch: UpdateProjectRequest): Promise<void>;
74
70
 
75
- declare function getProperties(http: HttpClient, accessToken: string, propertyQuery: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse | PublicPropertyResponse>>>;
76
- declare function getMyProperties(http: HttpClient, accessToken: string, propertyQuery: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<BuyerPropertyResponse>>>;
71
+ declare function getProperties(http: HttpClient, accessToken: string, query: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse | PublicPropertyResponse>>>;
72
+ declare function getMyProperties(http: HttpClient, accessToken: string, query: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<BuyerPropertyResponse>>>;
77
73
  declare function getMyPropertyById(http: HttpClient, accessToken: string, { propertyId }: {
78
74
  propertyId: string;
79
75
  }): Promise<IApiResponse<BuyerPropertyResponse>>;
80
- declare function getPropertiesByAdmin(http: HttpClient, accessToken: string, propertyQuery: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse>>>;
81
- declare function getPropertiesByProjectByAdmin(http: HttpClient, accessToken: string, { projectSlug }: {
82
- projectSlug: string;
83
- }, propertyQuery: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse>>>;
84
- declare function getPropertyByProjectAndCodeByAdmin(http: HttpClient, accessToken: string, { projectSlug, propertyCode }: {
85
- projectSlug: string;
86
- propertyCode: string;
87
- }): Promise<IApiResponse<PropertyResponse>>;
88
76
  declare function getPropertiesByProject(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
89
77
  companySlug: string;
90
78
  projectSlug: string;
91
- }, propertyQuery: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse | PublicPropertyResponse>>>;
79
+ }, query: GetPropertiesQueryByTokenRequest): Promise<IApiResponse<IPaginatedByTokenResponse<PropertyResponse | PublicPropertyResponse>>>;
92
80
  declare function getPropertyByProjectAndCode(http: HttpClient, accessToken: string, { companySlug, projectSlug, propertyCode, }: {
93
81
  companySlug: string;
94
82
  projectSlug: string;
95
83
  propertyCode: string;
96
84
  }): Promise<IApiResponse<PropertyResponse | PublicPropertyResponse>>;
97
- declare function postCreatePropertyByAdmin(http: HttpClient, accessToken: string, { projectSlug }: {
98
- projectSlug: string;
99
- }, newPropertyRequest: CreatePropertyRequest): Promise<IApiResponse<PropertyResponse>>;
100
- declare function postCreatePropertyBySAdmin(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
85
+ declare function postCreateProperty(http: HttpClient, accessToken: string, { companySlug, projectSlug }: {
101
86
  companySlug: string;
102
87
  projectSlug: string;
103
88
  }, newPropertyRequest: CreatePropertyRequest): Promise<IApiResponse<PropertyResponse>>;
104
- declare function patchUpdatePropertyByAdmin(http: HttpClient, accessToken: string, { projectSlug, propertyCode }: {
105
- projectSlug: string;
106
- propertyCode: string;
107
- }, patch: UpdatePropertyRequest): Promise<void>;
108
- declare function patchUpdatePropertyBySAdmin(http: HttpClient, accessToken: string, { companySlug, projectSlug, propertyCode, }: {
89
+ declare function patchUpdateProperty(http: HttpClient, accessToken: string, { companySlug, projectSlug, propertyCode, }: {
109
90
  companySlug: string;
110
91
  projectSlug: string;
111
92
  propertyCode: string;
@@ -129,13 +110,13 @@ interface ApiClient {
129
110
  readonly users: (accessToken: string, userQuery: Parameters<typeof getUsers>[2]) => ReturnType<typeof getUsers>;
130
111
  readonly userById: (accessToken: Parameters<typeof getUserById>[1], { userId }: Parameters<typeof getUserById>[2]) => ReturnType<typeof getUserById>;
131
112
  readonly updateMe: (accessToken: Parameters<typeof patchUpdateMe>[1], patch: Parameters<typeof patchUpdateMe>[2]) => ReturnType<typeof patchUpdateMe>;
132
- readonly updateRoleUserByAdmin: (accessToken: Parameters<typeof patchUpdateRoleUserByAdmin>[1], { userId }: Parameters<typeof patchUpdateRoleUserByAdmin>[2], body: Parameters<typeof patchUpdateRoleUserByAdmin>[3]) => ReturnType<typeof patchUpdateRoleUserByAdmin>;
113
+ readonly updateUserRoleByAdmin: (accessToken: Parameters<typeof patchUpdateUserRoleByAdmin>[1], { userId }: Parameters<typeof patchUpdateUserRoleByAdmin>[2], body: Parameters<typeof patchUpdateUserRoleByAdmin>[3]) => ReturnType<typeof patchUpdateUserRoleByAdmin>;
133
114
  readonly updateUserBySAdmin: (accessToken: Parameters<typeof patchUpdateUserBySAdmin>[1], { userId }: Parameters<typeof patchUpdateUserBySAdmin>[2], patch: Parameters<typeof patchUpdateUserBySAdmin>[3]) => ReturnType<typeof patchUpdateUserBySAdmin>;
134
115
  };
135
116
  readonly company: {
136
117
  readonly companies: (accessToken: Parameters<typeof getCompanies>[1], companyQuery: Parameters<typeof getCompanies>[2]) => ReturnType<typeof getCompanies>;
137
118
  readonly myCompany: (accessToken: Parameters<typeof getMyCompany>[1]) => ReturnType<typeof getMyCompany>;
138
- readonly companyById: (accessToken: Parameters<typeof getCompanyById>[1], { companyId }: Parameters<typeof getCompanyById>[2]) => ReturnType<typeof getCompanyById>;
119
+ readonly companyBySlug: (accessToken: Parameters<typeof getCompanyBySlug>[1], { companySlug }: Parameters<typeof getCompanyBySlug>[2]) => ReturnType<typeof getCompanyBySlug>;
139
120
  readonly createCompany: (accessToken: Parameters<typeof postCreateCompany>[1], newCompanyRequest: Parameters<typeof postCreateCompany>[2]) => ReturnType<typeof postCreateCompany>;
140
121
  readonly updateMyCompany: (accessToken: Parameters<typeof patchUpdateMyCompany>[1], patch: Parameters<typeof patchUpdateMyCompany>[2]) => ReturnType<typeof patchUpdateMyCompany>;
141
122
  readonly updateCompanyBySAdmin: (accessToken: Parameters<typeof patchUpdateCompanyBySAdmin>[1], { companyId }: Parameters<typeof patchUpdateCompanyBySAdmin>[2], patch: Parameters<typeof patchUpdateCompanyBySAdmin>[3]) => ReturnType<typeof patchUpdateCompanyBySAdmin>;
@@ -143,29 +124,22 @@ interface ApiClient {
143
124
  readonly project: {
144
125
  readonly projects: (accessToken: Parameters<typeof getProjects>[1], projectQuery: Parameters<typeof getProjects>[2]) => ReturnType<typeof getProjects>;
145
126
  readonly myProjects: (accessToken: Parameters<typeof getMyProjects>[1], projectQuery: Parameters<typeof getMyProjects>[2]) => ReturnType<typeof getMyProjects>;
146
- readonly myProjectBySlug: (accessToken: Parameters<typeof getMyProjectBySlug>[1], { projectSlug }: Parameters<typeof getMyProjectBySlug>[2]) => ReturnType<typeof getMyProjectBySlug>;
127
+ readonly myProjectById: (accessToken: Parameters<typeof getMyProjectById>[1], { projectId }: Parameters<typeof getMyProjectById>[2]) => ReturnType<typeof getMyProjectById>;
147
128
  readonly projectByCompanyAndSlug: (accessToken: Parameters<typeof getProjectByCompanyAndSlug>[1], { companySlug, projectSlug }: Parameters<typeof getProjectByCompanyAndSlug>[2]) => ReturnType<typeof getProjectByCompanyAndSlug>;
148
129
  readonly projectsByCompany: (accessToken: Parameters<typeof getProjectsByCompany>[1], { companySlug }: Parameters<typeof getProjectsByCompany>[2], projectQuery: Parameters<typeof getProjectsByCompany>[3]) => ReturnType<typeof getProjectsByCompany>;
149
- readonly createProjectByAdmin: (accessToken: Parameters<typeof postCreateProjectByAdmin>[1], newProjectRequest: Parameters<typeof postCreateProjectByAdmin>[2]) => ReturnType<typeof postCreateProjectByAdmin>;
150
- readonly createProjectBySAdmin: (accessToken: Parameters<typeof postCreateProjectBySAdmin>[1], { companySlug }: Parameters<typeof postCreateProjectBySAdmin>[2], newProjectRequest: Parameters<typeof postCreateProjectBySAdmin>[3]) => ReturnType<typeof postCreateProjectBySAdmin>;
151
- readonly updateProjectByAdmin: (accessToken: Parameters<typeof patchUpdateProjectByAdmin>[1], { projectSlug }: Parameters<typeof patchUpdateProjectByAdmin>[2], patch: Parameters<typeof patchUpdateProjectByAdmin>[3]) => ReturnType<typeof patchUpdateProjectByAdmin>;
152
- readonly updateProjectBySAdmin: (accessToken: Parameters<typeof patchUpdateProjectBySAdmin>[1], { companySlug, projectSlug }: Parameters<typeof patchUpdateProjectBySAdmin>[2], patch: Parameters<typeof patchUpdateProjectBySAdmin>[3]) => ReturnType<typeof patchUpdateProjectBySAdmin>;
130
+ readonly createProject: (accessToken: Parameters<typeof postCreateProject>[1], { companySlug }: Parameters<typeof postCreateProject>[2], newProjectRequest: Parameters<typeof postCreateProject>[3]) => ReturnType<typeof postCreateProject>;
131
+ readonly updateProject: (accessToken: Parameters<typeof patchUpdateProject>[1], { companySlug, projectSlug }: Parameters<typeof patchUpdateProject>[2], patch: Parameters<typeof patchUpdateProject>[3]) => ReturnType<typeof patchUpdateProject>;
153
132
  };
154
133
  readonly property: {
155
134
  readonly properties: (accessToken: Parameters<typeof getProperties>[1], propertyQuery: Parameters<typeof getProperties>[2]) => ReturnType<typeof getProperties>;
156
135
  readonly myProperties: (accessToken: Parameters<typeof getMyProperties>[1], propertyQuery: Parameters<typeof getMyProperties>[2]) => ReturnType<typeof getMyProperties>;
157
136
  readonly myPropertyById: (accessToken: Parameters<typeof getMyPropertyById>[1], { propertyId }: Parameters<typeof getMyPropertyById>[2]) => ReturnType<typeof getMyPropertyById>;
158
- readonly propertiesByAdmin: (accessToken: Parameters<typeof getPropertiesByAdmin>[1], propertyQuery: Parameters<typeof getPropertiesByAdmin>[2]) => ReturnType<typeof getPropertiesByAdmin>;
159
- readonly propertiesByProjectByAdmin: (accessToken: Parameters<typeof getPropertiesByProjectByAdmin>[1], { projectSlug }: Parameters<typeof getPropertiesByProjectByAdmin>[2], propertyQuery: Parameters<typeof getPropertiesByProjectByAdmin>[3]) => ReturnType<typeof getPropertiesByProjectByAdmin>;
160
- readonly propertyByProjectAndCodeByAdmin: (accessToken: Parameters<typeof getPropertyByProjectAndCodeByAdmin>[1], { projectSlug, propertyCode }: Parameters<typeof getPropertyByProjectAndCodeByAdmin>[2]) => ReturnType<typeof getPropertyByProjectAndCodeByAdmin>;
161
137
  readonly propertiesByProject: (accessToken: Parameters<typeof getPropertiesByProject>[1], { companySlug, projectSlug }: Parameters<typeof getPropertiesByProject>[2], propertyQuery: Parameters<typeof getPropertiesByProject>[3]) => ReturnType<typeof getPropertiesByProject>;
162
138
  readonly propertyByProjectAndCode: (accessToken: Parameters<typeof getPropertyByProjectAndCode>[1], { companySlug, projectSlug, propertyCode }: Parameters<typeof getPropertyByProjectAndCode>[2]) => ReturnType<typeof getPropertyByProjectAndCode>;
163
- readonly createPropertyByAdmin: (accessToken: Parameters<typeof postCreatePropertyByAdmin>[1], { projectSlug }: Parameters<typeof postCreatePropertyByAdmin>[2], newPropertyRequest: Parameters<typeof postCreatePropertyByAdmin>[3]) => ReturnType<typeof postCreatePropertyByAdmin>;
164
- readonly createPropertyBySAdmin: (accessToken: Parameters<typeof postCreatePropertyBySAdmin>[1], { companySlug, projectSlug }: Parameters<typeof postCreatePropertyBySAdmin>[2], newPropertyRequest: Parameters<typeof postCreatePropertyBySAdmin>[3]) => ReturnType<typeof postCreatePropertyBySAdmin>;
165
- readonly updatePropertyByAdmin: (accessToken: Parameters<typeof patchUpdatePropertyByAdmin>[1], { projectSlug, propertyCode }: Parameters<typeof patchUpdatePropertyByAdmin>[2], patch: Parameters<typeof patchUpdatePropertyByAdmin>[3]) => ReturnType<typeof patchUpdatePropertyByAdmin>;
166
- readonly updatePropertyBySAdmin: (accessToken: Parameters<typeof patchUpdatePropertyBySAdmin>[1], { companySlug, projectSlug, propertyCode }: Parameters<typeof patchUpdatePropertyBySAdmin>[2], patch: Parameters<typeof patchUpdatePropertyBySAdmin>[3]) => ReturnType<typeof patchUpdatePropertyBySAdmin>;
139
+ readonly createProperty: (accessToken: Parameters<typeof postCreateProperty>[1], { companySlug, projectSlug }: Parameters<typeof postCreateProperty>[2], newPropertyRequest: Parameters<typeof postCreateProperty>[3]) => ReturnType<typeof postCreateProperty>;
140
+ readonly updateProperty: (accessToken: Parameters<typeof patchUpdateProperty>[1], { companySlug, projectSlug, propertyCode }: Parameters<typeof patchUpdateProperty>[2], patch: Parameters<typeof patchUpdateProperty>[3]) => ReturnType<typeof patchUpdateProperty>;
167
141
  };
168
142
  }
169
143
  declare function createApiClient(options: CreateApiClientOptions): ApiClient;
170
144
 
171
- export { type ApiClient, type CreateApiClientOptions, type HttpClient, type HttpGet, type HttpPost, createApiClient, getCompanies, getCompanyById, getGoogleOAuthStart, getMe, getMyCompany, getMyProjectBySlug, getMyProjects, getMyProperties, getMyPropertyById, getProjectByCompanyAndSlug, getProjects, getProjectsByCompany, getProperties, getPropertiesByAdmin, getPropertiesByProject, getPropertiesByProjectByAdmin, getPropertyByProjectAndCode, getPropertyByProjectAndCodeByAdmin, getUserById, getUsers, patchUpdateCompanyBySAdmin, patchUpdateMe, patchUpdateMyCompany, patchUpdateProjectByAdmin, patchUpdateProjectBySAdmin, patchUpdatePropertyByAdmin, patchUpdatePropertyBySAdmin, patchUpdateRoleUserByAdmin, patchUpdateUserBySAdmin, postCreateCompany, postCreateProjectByAdmin, postCreateProjectBySAdmin, postCreatePropertyByAdmin, postCreatePropertyBySAdmin, postGoogleOAuthCallback, postLogin, postLogout, postRefresh, postRegister };
145
+ export { type ApiClient, type CreateApiClientOptions, type HttpClient, type HttpGet, type HttpPatch, type HttpPost, createApiClient, getCompanies, getCompanyBySlug, getGoogleOAuthStart, getMe, getMyCompany, getMyProjectById, getMyProjects, getMyProperties, getMyPropertyById, getProjectByCompanyAndSlug, getProjects, getProjectsByCompany, getProperties, getPropertiesByProject, getPropertyByProjectAndCode, getUserById, getUsers, patchUpdateCompanyBySAdmin, patchUpdateMe, patchUpdateMyCompany, patchUpdateProject, patchUpdateProperty, patchUpdateUserBySAdmin, patchUpdateUserRoleByAdmin, postCreateCompany, postCreateProject, postCreateProperty, postGoogleOAuthCallback, postLogin, postLogout, postRefresh, postRegister };
package/dist/index.js CHANGED
@@ -1,5 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ // src/endpoints/health-check.ts
4
+ var HEALTH_CHECK_PATH = "/api/v1/health-check";
5
+ async function fetchHealthCheck(http) {
6
+ const { data: body } = await http.get(HEALTH_CHECK_PATH);
7
+ return body;
8
+ }
9
+
3
10
  // src/endpoints/auth.ts
4
11
  var AUTH_BASE = "/api/v1/auth";
5
12
  async function postRegister(http, body) {
@@ -48,9 +55,10 @@ async function getMe(http, accessToken) {
48
55
  }
49
56
 
50
57
  // src/endpoints/user.ts
51
- var USER_BASE = "/api/v1/users";
58
+ var API_BASE = "/api/v1";
59
+ var USER_BASE = `${API_BASE}/users`;
52
60
  async function getUsers(http, accessToken, userQuery) {
53
- const { data } = await http.get(`${USER_BASE}`, {
61
+ const { data } = await http.get(USER_BASE, {
54
62
  params: userQuery,
55
63
  headers: { Authorization: `Bearer ${accessToken}` }
56
64
  });
@@ -63,11 +71,11 @@ async function getUserById(http, accessToken, { userId }) {
63
71
  return data;
64
72
  }
65
73
  async function patchUpdateMe(http, accessToken, patch) {
66
- await http.patch(`${USER_BASE}/me`, patch, {
74
+ await http.patch(`${API_BASE}/me`, patch, {
67
75
  headers: { Authorization: `Bearer ${accessToken}` }
68
76
  });
69
77
  }
70
- async function patchUpdateRoleUserByAdmin(http, accessToken, { userId }, body) {
78
+ async function patchUpdateUserRoleByAdmin(http, accessToken, { userId }, body) {
71
79
  await http.patch(`${USER_BASE}/${userId}/role`, body, {
72
80
  headers: { Authorization: `Bearer ${accessToken}` }
73
81
  });
@@ -78,31 +86,25 @@ async function patchUpdateUserBySAdmin(http, accessToken, { userId }, patch) {
78
86
  });
79
87
  }
80
88
 
81
- // src/endpoints/health-check.ts
82
- var HEALTH_CHECK_PATH = "/api/v1/health-check";
83
- async function fetchHealthCheck(http) {
84
- const { data: body } = await http.get(HEALTH_CHECK_PATH);
85
- return body;
86
- }
87
-
88
89
  // src/endpoints/company.ts
89
- var COMPANY_BASE = "/api/v1/companies";
90
+ var API_BASE2 = "/api/v1";
91
+ var COMPANY_BASE = `${API_BASE2}/companies`;
90
92
  async function getCompanies(http, accessToken, companyQuery) {
91
- const { data } = await http.get(`${COMPANY_BASE}`, {
93
+ const { data } = await http.get(COMPANY_BASE, {
92
94
  params: companyQuery,
93
95
  headers: { Authorization: `Bearer ${accessToken}` }
94
96
  });
95
97
  return data;
96
98
  }
97
99
  async function getMyCompany(http, accessToken) {
98
- const { data } = await http.get(`${COMPANY_BASE}/my`, {
100
+ const { data } = await http.get(`${API_BASE2}/me/company`, {
99
101
  headers: { Authorization: `Bearer ${accessToken}` }
100
102
  });
101
103
  return data;
102
104
  }
103
- async function getCompanyById(http, accessToken, { companyId }) {
105
+ async function getCompanyBySlug(http, accessToken, { companySlug }) {
104
106
  const { data } = await http.get(
105
- `${COMPANY_BASE}/${companyId}`,
107
+ `${COMPANY_BASE}/${companySlug}`,
106
108
  {
107
109
  headers: { Authorization: `Bearer ${accessToken}` }
108
110
  }
@@ -111,7 +113,7 @@ async function getCompanyById(http, accessToken, { companyId }) {
111
113
  }
112
114
  async function postCreateCompany(http, accessToken, newCompanyRequest) {
113
115
  const { data } = await http.post(
114
- `${COMPANY_BASE}`,
116
+ COMPANY_BASE,
115
117
  newCompanyRequest,
116
118
  {
117
119
  headers: { Authorization: `Bearer ${accessToken}` }
@@ -120,7 +122,7 @@ async function postCreateCompany(http, accessToken, newCompanyRequest) {
120
122
  return data;
121
123
  }
122
124
  async function patchUpdateMyCompany(http, accessToken, patch) {
123
- await http.patch(`${COMPANY_BASE}/my`, patch, {
125
+ await http.patch(`${API_BASE2}/me/company`, patch, {
124
126
  headers: { Authorization: `Bearer ${accessToken}` }
125
127
  });
126
128
  }
@@ -131,24 +133,28 @@ async function patchUpdateCompanyBySAdmin(http, accessToken, { companyId }, patc
131
133
  }
132
134
 
133
135
  // src/endpoints/project.ts
134
- var PROJECT_BASE = "/api/v1/companies";
136
+ var API_BASE3 = "/api/v1";
137
+ var COMPANY_BASE2 = `${API_BASE3}/companies`;
135
138
  async function getProjects(http, accessToken, projectQuery) {
136
- const { data } = await http.get(`${PROJECT_BASE}/projects`, {
139
+ const { data } = await http.get(`${API_BASE3}/projects`, {
137
140
  params: projectQuery,
138
141
  headers: { Authorization: `Bearer ${accessToken}` }
139
142
  });
140
143
  return data;
141
144
  }
142
145
  async function getMyProjects(http, accessToken, projectQuery) {
143
- const { data } = await http.get(`${PROJECT_BASE}/my/projects`, {
144
- params: projectQuery,
145
- headers: { Authorization: `Bearer ${accessToken}` }
146
- });
146
+ const { data } = await http.get(
147
+ `${API_BASE3}/me/projects`,
148
+ {
149
+ params: projectQuery,
150
+ headers: { Authorization: `Bearer ${accessToken}` }
151
+ }
152
+ );
147
153
  return data;
148
154
  }
149
- async function getMyProjectBySlug(http, accessToken, { projectSlug }) {
155
+ async function getMyProjectById(http, accessToken, { projectId }) {
150
156
  const { data } = await http.get(
151
- `${PROJECT_BASE}/my/projects/${projectSlug}`,
157
+ `${API_BASE3}/me/projects/${projectId}`,
152
158
  {
153
159
  headers: { Authorization: `Bearer ${accessToken}` }
154
160
  }
@@ -157,7 +163,7 @@ async function getMyProjectBySlug(http, accessToken, { projectSlug }) {
157
163
  }
158
164
  async function getProjectByCompanyAndSlug(http, accessToken, { companySlug, projectSlug }) {
159
165
  const { data } = await http.get(
160
- `${PROJECT_BASE}/${companySlug}/projects/${projectSlug}`,
166
+ `${COMPANY_BASE2}/${companySlug}/projects/${projectSlug}`,
161
167
  {
162
168
  headers: { Authorization: `Bearer ${accessToken}` }
163
169
  }
@@ -165,25 +171,15 @@ async function getProjectByCompanyAndSlug(http, accessToken, { companySlug, proj
165
171
  return data;
166
172
  }
167
173
  async function getProjectsByCompany(http, accessToken, { companySlug }, projectQuery) {
168
- const { data } = await http.get(`${PROJECT_BASE}/${companySlug}/projects`, {
174
+ const { data } = await http.get(`${COMPANY_BASE2}/${companySlug}/projects`, {
169
175
  params: projectQuery,
170
176
  headers: { Authorization: `Bearer ${accessToken}` }
171
177
  });
172
178
  return data;
173
179
  }
174
- async function postCreateProjectByAdmin(http, accessToken, newProjectRequest) {
175
- const { data } = await http.post(
176
- `${PROJECT_BASE}/my/projects`,
177
- newProjectRequest,
178
- {
179
- headers: { Authorization: `Bearer ${accessToken}` }
180
- }
181
- );
182
- return data;
183
- }
184
- async function postCreateProjectBySAdmin(http, accessToken, { companySlug }, newProjectRequest) {
180
+ async function postCreateProject(http, accessToken, { companySlug }, newProjectRequest) {
185
181
  const { data } = await http.post(
186
- `${PROJECT_BASE}/${companySlug}/projects`,
182
+ `${COMPANY_BASE2}/${companySlug}/projects`,
187
183
  newProjectRequest,
188
184
  {
189
185
  headers: { Authorization: `Bearer ${accessToken}` }
@@ -191,18 +187,9 @@ async function postCreateProjectBySAdmin(http, accessToken, { companySlug }, new
191
187
  );
192
188
  return data;
193
189
  }
194
- async function patchUpdateProjectByAdmin(http, accessToken, { projectSlug }, patch) {
195
- await http.patch(
196
- `${PROJECT_BASE}/my/projects/${projectSlug}`,
197
- patch,
198
- {
199
- headers: { Authorization: `Bearer ${accessToken}` }
200
- }
201
- );
202
- }
203
- async function patchUpdateProjectBySAdmin(http, accessToken, { companySlug, projectSlug }, patch) {
190
+ async function patchUpdateProject(http, accessToken, { companySlug, projectSlug }, patch) {
204
191
  await http.patch(
205
- `${PROJECT_BASE}/${companySlug}/projects/${projectSlug}`,
192
+ `${COMPANY_BASE2}/${companySlug}/projects/${projectSlug}`,
206
193
  patch,
207
194
  {
208
195
  headers: { Authorization: `Bearer ${accessToken}` }
@@ -211,19 +198,20 @@ async function patchUpdateProjectBySAdmin(http, accessToken, { companySlug, proj
211
198
  }
212
199
 
213
200
  // src/endpoints/property.ts
214
- var PROPERTY_BASE = "/api/v1";
215
- async function getProperties(http, accessToken, propertyQuery) {
216
- const { data } = await http.get(`${PROPERTY_BASE}/properties`, {
217
- params: propertyQuery,
201
+ var API_BASE4 = "/api/v1";
202
+ var COMPANY_BASE3 = `${API_BASE4}/companies`;
203
+ async function getProperties(http, accessToken, query) {
204
+ const { data } = await http.get(`${API_BASE4}/properties`, {
205
+ params: query,
218
206
  headers: { Authorization: `Bearer ${accessToken}` }
219
207
  });
220
208
  return data;
221
209
  }
222
- async function getMyProperties(http, accessToken, propertyQuery) {
210
+ async function getMyProperties(http, accessToken, query) {
223
211
  const { data } = await http.get(
224
- `${PROPERTY_BASE}/properties/my`,
212
+ `${API_BASE4}/me/properties`,
225
213
  {
226
- params: propertyQuery,
214
+ params: query,
227
215
  headers: { Authorization: `Bearer ${accessToken}` }
228
216
  }
229
217
  );
@@ -231,45 +219,16 @@ async function getMyProperties(http, accessToken, propertyQuery) {
231
219
  }
232
220
  async function getMyPropertyById(http, accessToken, { propertyId }) {
233
221
  const { data } = await http.get(
234
- `${PROPERTY_BASE}/properties/my/${propertyId}`,
222
+ `${API_BASE4}/me/properties/${propertyId}`,
235
223
  {
236
224
  headers: { Authorization: `Bearer ${accessToken}` }
237
225
  }
238
226
  );
239
227
  return data;
240
228
  }
241
- async function getPropertiesByAdmin(http, accessToken, propertyQuery) {
242
- const { data } = await http.get(
243
- `${PROPERTY_BASE}/companies/my/projects/properties`,
244
- {
245
- params: propertyQuery,
246
- headers: { Authorization: `Bearer ${accessToken}` }
247
- }
248
- );
249
- return data;
250
- }
251
- async function getPropertiesByProjectByAdmin(http, accessToken, { projectSlug }, propertyQuery) {
252
- const { data } = await http.get(
253
- `${PROPERTY_BASE}/companies/my/projects/${projectSlug}/properties`,
254
- {
255
- params: propertyQuery,
256
- headers: { Authorization: `Bearer ${accessToken}` }
257
- }
258
- );
259
- return data;
260
- }
261
- async function getPropertyByProjectAndCodeByAdmin(http, accessToken, { projectSlug, propertyCode }) {
262
- const { data } = await http.get(
263
- `${PROPERTY_BASE}/companies/my/projects/${projectSlug}/properties/${propertyCode}`,
264
- {
265
- headers: { Authorization: `Bearer ${accessToken}` }
266
- }
267
- );
268
- return data;
269
- }
270
- async function getPropertiesByProject(http, accessToken, { companySlug, projectSlug }, propertyQuery) {
271
- const { data } = await http.get(`${PROPERTY_BASE}/companies/${companySlug}/projects/${projectSlug}/properties`, {
272
- params: propertyQuery,
229
+ async function getPropertiesByProject(http, accessToken, { companySlug, projectSlug }, query) {
230
+ const { data } = await http.get(`${COMPANY_BASE3}/${companySlug}/projects/${projectSlug}/properties`, {
231
+ params: query,
273
232
  headers: { Authorization: `Bearer ${accessToken}` }
274
233
  });
275
234
  return data;
@@ -280,26 +239,16 @@ async function getPropertyByProjectAndCode(http, accessToken, {
280
239
  propertyCode
281
240
  }) {
282
241
  const { data } = await http.get(
283
- `${PROPERTY_BASE}/companies/${companySlug}/projects/${projectSlug}/properties/${propertyCode}`,
284
- {
285
- headers: { Authorization: `Bearer ${accessToken}` }
286
- }
287
- );
288
- return data;
289
- }
290
- async function postCreatePropertyByAdmin(http, accessToken, { projectSlug }, newPropertyRequest) {
291
- const { data } = await http.post(
292
- `${PROPERTY_BASE}/companies/my/projects/${projectSlug}/properties`,
293
- newPropertyRequest,
242
+ `${COMPANY_BASE3}/${companySlug}/projects/${projectSlug}/properties/${propertyCode}`,
294
243
  {
295
244
  headers: { Authorization: `Bearer ${accessToken}` }
296
245
  }
297
246
  );
298
247
  return data;
299
248
  }
300
- async function postCreatePropertyBySAdmin(http, accessToken, { companySlug, projectSlug }, newPropertyRequest) {
249
+ async function postCreateProperty(http, accessToken, { companySlug, projectSlug }, newPropertyRequest) {
301
250
  const { data } = await http.post(
302
- `${PROPERTY_BASE}/companies/${companySlug}/projects/${projectSlug}/properties`,
251
+ `${COMPANY_BASE3}/${companySlug}/projects/${projectSlug}/properties`,
303
252
  newPropertyRequest,
304
253
  {
305
254
  headers: { Authorization: `Bearer ${accessToken}` }
@@ -307,22 +256,13 @@ async function postCreatePropertyBySAdmin(http, accessToken, { companySlug, proj
307
256
  );
308
257
  return data;
309
258
  }
310
- async function patchUpdatePropertyByAdmin(http, accessToken, { projectSlug, propertyCode }, patch) {
311
- await http.patch(
312
- `${PROPERTY_BASE}/companies/my/projects/${projectSlug}/properties/${propertyCode}`,
313
- patch,
314
- {
315
- headers: { Authorization: `Bearer ${accessToken}` }
316
- }
317
- );
318
- }
319
- async function patchUpdatePropertyBySAdmin(http, accessToken, {
259
+ async function patchUpdateProperty(http, accessToken, {
320
260
  companySlug,
321
261
  projectSlug,
322
262
  propertyCode
323
263
  }, patch) {
324
264
  await http.patch(
325
- `${PROPERTY_BASE}/companies/${companySlug}/projects/${projectSlug}/properties/${propertyCode}`,
265
+ `${COMPANY_BASE3}/${companySlug}/projects/${projectSlug}/properties/${propertyCode}`,
326
266
  patch,
327
267
  {
328
268
  headers: { Authorization: `Bearer ${accessToken}` }
@@ -348,13 +288,13 @@ function createApiClient(options) {
348
288
  users: (accessToken, userQuery) => getUsers(http, accessToken, userQuery),
349
289
  userById: (accessToken, { userId }) => getUserById(http, accessToken, { userId }),
350
290
  updateMe: (accessToken, patch) => patchUpdateMe(http, accessToken, patch),
351
- updateRoleUserByAdmin: (accessToken, { userId }, body) => patchUpdateRoleUserByAdmin(http, accessToken, { userId }, body),
291
+ updateUserRoleByAdmin: (accessToken, { userId }, body) => patchUpdateUserRoleByAdmin(http, accessToken, { userId }, body),
352
292
  updateUserBySAdmin: (accessToken, { userId }, patch) => patchUpdateUserBySAdmin(http, accessToken, { userId }, patch)
353
293
  },
354
294
  company: {
355
295
  companies: (accessToken, companyQuery) => getCompanies(http, accessToken, companyQuery),
356
296
  myCompany: (accessToken) => getMyCompany(http, accessToken),
357
- companyById: (accessToken, { companyId }) => getCompanyById(http, accessToken, { companyId }),
297
+ companyBySlug: (accessToken, { companySlug }) => getCompanyBySlug(http, accessToken, { companySlug }),
358
298
  createCompany: (accessToken, newCompanyRequest) => postCreateCompany(http, accessToken, newCompanyRequest),
359
299
  updateMyCompany: (accessToken, patch) => patchUpdateMyCompany(http, accessToken, patch),
360
300
  updateCompanyBySAdmin: (accessToken, { companyId }, patch) => patchUpdateCompanyBySAdmin(http, accessToken, { companyId }, patch)
@@ -362,48 +302,31 @@ function createApiClient(options) {
362
302
  project: {
363
303
  projects: (accessToken, projectQuery) => getProjects(http, accessToken, projectQuery),
364
304
  myProjects: (accessToken, projectQuery) => getMyProjects(http, accessToken, projectQuery),
365
- myProjectBySlug: (accessToken, { projectSlug }) => getMyProjectBySlug(http, accessToken, { projectSlug }),
305
+ myProjectById: (accessToken, { projectId }) => getMyProjectById(http, accessToken, { projectId }),
366
306
  projectByCompanyAndSlug: (accessToken, { companySlug, projectSlug }) => getProjectByCompanyAndSlug(http, accessToken, { companySlug, projectSlug }),
367
307
  projectsByCompany: (accessToken, { companySlug }, projectQuery) => getProjectsByCompany(http, accessToken, { companySlug }, projectQuery),
368
- createProjectByAdmin: (accessToken, newProjectRequest) => postCreateProjectByAdmin(http, accessToken, newProjectRequest),
369
- createProjectBySAdmin: (accessToken, { companySlug }, newProjectRequest) => postCreateProjectBySAdmin(http, accessToken, { companySlug }, newProjectRequest),
370
- updateProjectByAdmin: (accessToken, { projectSlug }, patch) => patchUpdateProjectByAdmin(http, accessToken, { projectSlug }, patch),
371
- updateProjectBySAdmin: (accessToken, { companySlug, projectSlug }, patch) => patchUpdateProjectBySAdmin(http, accessToken, { companySlug, projectSlug }, patch)
308
+ createProject: (accessToken, { companySlug }, newProjectRequest) => postCreateProject(http, accessToken, { companySlug }, newProjectRequest),
309
+ updateProject: (accessToken, { companySlug, projectSlug }, patch) => patchUpdateProject(http, accessToken, { companySlug, projectSlug }, patch)
372
310
  },
373
311
  property: {
374
312
  properties: (accessToken, propertyQuery) => getProperties(http, accessToken, propertyQuery),
375
313
  myProperties: (accessToken, propertyQuery) => getMyProperties(http, accessToken, propertyQuery),
376
314
  myPropertyById: (accessToken, { propertyId }) => getMyPropertyById(http, accessToken, { propertyId }),
377
- propertiesByAdmin: (accessToken, propertyQuery) => getPropertiesByAdmin(http, accessToken, propertyQuery),
378
- propertiesByProjectByAdmin: (accessToken, { projectSlug }, propertyQuery) => getPropertiesByProjectByAdmin(http, accessToken, { projectSlug }, propertyQuery),
379
- propertyByProjectAndCodeByAdmin: (accessToken, { projectSlug, propertyCode }) => getPropertyByProjectAndCodeByAdmin(http, accessToken, { projectSlug, propertyCode }),
380
315
  propertiesByProject: (accessToken, { companySlug, projectSlug }, propertyQuery) => getPropertiesByProject(http, accessToken, { companySlug, projectSlug }, propertyQuery),
381
316
  propertyByProjectAndCode: (accessToken, { companySlug, projectSlug, propertyCode }) => getPropertyByProjectAndCode(http, accessToken, { companySlug, projectSlug, propertyCode }),
382
- createPropertyByAdmin: (accessToken, { projectSlug }, newPropertyRequest) => postCreatePropertyByAdmin(http, accessToken, { projectSlug }, newPropertyRequest),
383
- createPropertyBySAdmin: (accessToken, { companySlug, projectSlug }, newPropertyRequest) => postCreatePropertyBySAdmin(
384
- http,
385
- accessToken,
386
- { companySlug, projectSlug },
387
- newPropertyRequest
388
- ),
389
- updatePropertyByAdmin: (accessToken, { projectSlug, propertyCode }, patch) => patchUpdatePropertyByAdmin(http, accessToken, { projectSlug, propertyCode }, patch),
390
- updatePropertyBySAdmin: (accessToken, { companySlug, projectSlug, propertyCode }, patch) => patchUpdatePropertyBySAdmin(
391
- http,
392
- accessToken,
393
- { companySlug, projectSlug, propertyCode },
394
- patch
395
- )
317
+ createProperty: (accessToken, { companySlug, projectSlug }, newPropertyRequest) => postCreateProperty(http, accessToken, { companySlug, projectSlug }, newPropertyRequest),
318
+ updateProperty: (accessToken, { companySlug, projectSlug, propertyCode }, patch) => patchUpdateProperty(http, accessToken, { companySlug, projectSlug, propertyCode }, patch)
396
319
  }
397
320
  };
398
321
  }
399
322
 
400
323
  exports.createApiClient = createApiClient;
401
324
  exports.getCompanies = getCompanies;
402
- exports.getCompanyById = getCompanyById;
325
+ exports.getCompanyBySlug = getCompanyBySlug;
403
326
  exports.getGoogleOAuthStart = getGoogleOAuthStart;
404
327
  exports.getMe = getMe;
405
328
  exports.getMyCompany = getMyCompany;
406
- exports.getMyProjectBySlug = getMyProjectBySlug;
329
+ exports.getMyProjectById = getMyProjectById;
407
330
  exports.getMyProjects = getMyProjects;
408
331
  exports.getMyProperties = getMyProperties;
409
332
  exports.getMyPropertyById = getMyPropertyById;
@@ -411,27 +334,20 @@ exports.getProjectByCompanyAndSlug = getProjectByCompanyAndSlug;
411
334
  exports.getProjects = getProjects;
412
335
  exports.getProjectsByCompany = getProjectsByCompany;
413
336
  exports.getProperties = getProperties;
414
- exports.getPropertiesByAdmin = getPropertiesByAdmin;
415
337
  exports.getPropertiesByProject = getPropertiesByProject;
416
- exports.getPropertiesByProjectByAdmin = getPropertiesByProjectByAdmin;
417
338
  exports.getPropertyByProjectAndCode = getPropertyByProjectAndCode;
418
- exports.getPropertyByProjectAndCodeByAdmin = getPropertyByProjectAndCodeByAdmin;
419
339
  exports.getUserById = getUserById;
420
340
  exports.getUsers = getUsers;
421
341
  exports.patchUpdateCompanyBySAdmin = patchUpdateCompanyBySAdmin;
422
342
  exports.patchUpdateMe = patchUpdateMe;
423
343
  exports.patchUpdateMyCompany = patchUpdateMyCompany;
424
- exports.patchUpdateProjectByAdmin = patchUpdateProjectByAdmin;
425
- exports.patchUpdateProjectBySAdmin = patchUpdateProjectBySAdmin;
426
- exports.patchUpdatePropertyByAdmin = patchUpdatePropertyByAdmin;
427
- exports.patchUpdatePropertyBySAdmin = patchUpdatePropertyBySAdmin;
428
- exports.patchUpdateRoleUserByAdmin = patchUpdateRoleUserByAdmin;
344
+ exports.patchUpdateProject = patchUpdateProject;
345
+ exports.patchUpdateProperty = patchUpdateProperty;
429
346
  exports.patchUpdateUserBySAdmin = patchUpdateUserBySAdmin;
347
+ exports.patchUpdateUserRoleByAdmin = patchUpdateUserRoleByAdmin;
430
348
  exports.postCreateCompany = postCreateCompany;
431
- exports.postCreateProjectByAdmin = postCreateProjectByAdmin;
432
- exports.postCreateProjectBySAdmin = postCreateProjectBySAdmin;
433
- exports.postCreatePropertyByAdmin = postCreatePropertyByAdmin;
434
- exports.postCreatePropertyBySAdmin = postCreatePropertyBySAdmin;
349
+ exports.postCreateProject = postCreateProject;
350
+ exports.postCreateProperty = postCreateProperty;
435
351
  exports.postGoogleOAuthCallback = postGoogleOAuthCallback;
436
352
  exports.postLogin = postLogin;
437
353
  exports.postLogout = postLogout;