@mapcreator/api 5.0.0-alpha.90 → 5.0.0-alpha.91

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.
@@ -70,7 +70,6 @@ export async function createJobRevision(
70
70
  layers: number[],
71
71
  output: FileFormat,
72
72
  jobObject: Record<string, unknown>,
73
- skipValidation?: boolean
74
73
  ): Promise<JobRevision> {
75
74
  const pathname = `/v1/jobs/${jobId}/revisions`;
76
75
  const path = `${pathname}?${deletedNoneParam}`;
@@ -80,7 +79,6 @@ export async function createJobRevision(
80
79
  object: JSON.stringify(jobObject),
81
80
  output,
82
81
  layers,
83
- skip_validation: skipValidation ?? false
84
82
  };
85
83
  const options = { revivers: jobRevisionRevivers };
86
84
 
@@ -272,9 +270,9 @@ export async function getJobRevisionOutput(jobId: number): Promise<JobRevisionOu
272
270
  }
273
271
  }
274
272
 
275
- async function createJobRevisionBuild(jobId: number, skipValidation?: boolean): Promise<string> {
273
+ async function createJobRevisionBuild(jobId: number): Promise<string> {
276
274
  const pathname = `/v1/jobs/${jobId}/revisions/${lastJobRevision}/build`;
277
275
  const path = `${pathname}?${deletedNoneParam}`;
278
276
 
279
- return request<ApiCommon, string>(path, { skip_validation: skipValidation ?? false }, null, { method: 'POST' });
277
+ return request<ApiCommon, string>(path, null, null, { method: 'POST' });
280
278
  }
@@ -63,8 +63,10 @@ export const organisationRevivers: Revivers<ApiOrganisation, Organisation> = {
63
63
  exportTemplates: (data: ApiOrganisationData) => data.template_settings ?? '{}',
64
64
  };
65
65
 
66
- export async function getOrganisation(): Promise<Organisation> {
67
- const path = `/v1/organisations/${myOrganisations}`;
66
+ export async function getOrganisation(
67
+ organisationId: number | typeof myOrganisations = myOrganisations,
68
+ ): Promise<Organisation> {
69
+ const path = `/v1/organisations/${organisationId}`;
68
70
  const options = { revivers: organisationRevivers };
69
71
 
70
72
  return request<ApiOrganisation, Organisation>(path, null, null, options);
package/src/api/user.ts CHANGED
@@ -40,6 +40,7 @@ type UnitType = 'metric' | 'imperial' | null;
40
40
 
41
41
  export type User = {
42
42
  id: number;
43
+ organisationId: number;
43
44
  languageCode: string;
44
45
  interfaceLanguage: string;
45
46
  videoNotifications: boolean;
@@ -121,7 +122,6 @@ export type ApiJobFolder = {
121
122
  export type ApiJobFolderData = Flatten<Exclude<ApiJobFolder, ApiError>['data']>;
122
123
 
123
124
  export const userRevivers: Revivers<ApiUser, User> = {
124
- organisation_id: undefined,
125
125
  hide_messages: undefined,
126
126
  phone: undefined,
127
127
  profession: undefined,
@@ -159,8 +159,8 @@ type UpdateUserParams = {
159
159
  email?: string;
160
160
  };
161
161
 
162
- export async function getUser(): Promise<User> {
163
- const path = `/v1/users/${myUser}`;
162
+ export async function getUser(userId: number | typeof myUser = myUser): Promise<User> {
163
+ const path = `/v1/users/${userId}`;
164
164
  const options = { revivers: userRevivers };
165
165
 
166
166
  return request<ApiUser, User>(path, null, null, options);