Skip to content

Commit 814b7dd

Browse files
committed
update scheme and work order dates
1 parent 81e9032 commit 814b7dd

File tree

8 files changed

+42
-37
lines changed

8 files changed

+42
-37
lines changed

dist/index.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,8 @@ class Scheme extends BaseModel {
10451045
name = "";
10461046
code = "";
10471047
description = "";
1048-
start_date = "";
1049-
end_date = "";
1048+
anticipated_start_date = "";
1049+
anticipated_end_date = "";
10501050
labels = [];
10511051
static relationships = [
10521052
{
@@ -1060,13 +1060,13 @@ class Scheme extends BaseModel {
10601060
this.name = data?.attributes?.name ?? data?.name ?? "";
10611061
this.code = data?.attributes?.code ?? data?.code ?? "";
10621062
this.description = data?.attributes?.description ?? data?.description ?? "";
1063-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? "";
1064-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? "";
1063+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? "";
1064+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? "";
10651065
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
10661066
}
10671067
jsonApiMapping() {
10681068
return {
1069-
attributes: ["name", "code", "description", "start_date", "end_date", "labels"]
1069+
attributes: ["name", "code", "description", "anticipated_start_date", "anticipated_end_date", "labels"]
10701070
};
10711071
}
10721072
}
@@ -1077,8 +1077,8 @@ class WorkOrder extends BaseModel {
10771077
name = "";
10781078
code = "";
10791079
description = "";
1080-
start_date = "";
1081-
end_date = "";
1080+
anticipated_start_date = "";
1081+
anticipated_end_date = "";
10821082
labels = [];
10831083
static relationships = [
10841084
{
@@ -1092,13 +1092,13 @@ class WorkOrder extends BaseModel {
10921092
this.name = data?.attributes?.name ?? data?.name ?? "";
10931093
this.code = data?.attributes?.code ?? data?.code ?? "";
10941094
this.description = data?.attributes?.description ?? data?.description ?? "";
1095-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? "";
1096-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? "";
1095+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? "";
1096+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? "";
10971097
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
10981098
}
10991099
jsonApiMapping() {
11001100
return {
1101-
attributes: ["name", "code", "description", "start_date", "end_date", "labels"]
1101+
attributes: ["name", "code", "description", "anticipated_start_date", "anticipated_end_date", "labels"]
11021102
};
11031103
}
11041104
}
@@ -1501,13 +1501,15 @@ class BaseService extends RequestBuilder {
15011501
};
15021502
}
15031503
async create(model, params) {
1504-
if (params) {}
1504+
if (params) {
1505+
}
15051506
const jsonApiSerializer = new JsonApiSerializer(this.hydrator.getModelMap());
15061507
const payload = jsonApiSerializer.buildCreatePayload(model);
15071508
return await this.client.makePostRequest(this.endpoint, payload);
15081509
}
15091510
async update(id, model, params) {
1510-
if (params) {}
1511+
if (params) {
1512+
}
15111513
const jsonApiSerializer = new JsonApiSerializer(this.hydrator.getModelMap());
15121514
const payload = jsonApiSerializer.buildUpdatePayload(model);
15131515
return await this.client.makePatchRequest(`${this.endpoint}/${id}`, payload);
@@ -2160,6 +2162,9 @@ class ClientConfig {
21602162
}
21612163
// src/models/Organisation.ts
21622164
class Organisation extends BaseModel {
2165+
constructor() {
2166+
super(...arguments);
2167+
}
21632168
type = "organisations";
21642169
static relationships = [];
21652170
}

dist/models/Scheme.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export declare class Scheme extends BaseModel {
66
name: string;
77
code: string;
88
description: string;
9-
start_date: string;
10-
end_date: string;
9+
anticipated_start_date: string;
10+
anticipated_end_date: string;
1111
labels: Array<Label>;
1212
static relationships: RelationshipDefinition[];
1313
constructor(data?: any);

dist/models/Scheme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export class Scheme extends BaseModel {
44
name = '';
55
code = '';
66
description = '';
7-
start_date = '';
8-
end_date = '';
7+
anticipated_start_date = '';
8+
anticipated_end_date = '';
99
labels = [];
1010
static relationships = [
1111
{
@@ -19,13 +19,13 @@ export class Scheme extends BaseModel {
1919
this.name = data?.attributes?.name ?? data?.name ?? '';
2020
this.code = data?.attributes?.code ?? data?.code ?? '';
2121
this.description = data?.attributes?.description ?? data?.description ?? '';
22-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? '';
23-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? '';
22+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? '';
23+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? '';
2424
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
2525
}
2626
jsonApiMapping() {
2727
return {
28-
attributes: ['name', 'code', 'description', 'start_date', 'end_date', 'labels'],
28+
attributes: ['name', 'code', 'description', 'anticipated_start_date', 'anticipated_end_date', 'labels'],
2929
};
3030
}
3131
}

dist/models/WorkOrder.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export declare class WorkOrder extends BaseModel {
66
name: string;
77
code: string;
88
description: string;
9-
start_date: string;
10-
end_date: string;
9+
anticipated_start_date: string;
10+
anticipated_end_date: string;
1111
labels: Array<Label>;
1212
static relationships: RelationshipDefinition[];
1313
constructor(data?: any);

dist/models/WorkOrder.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export class WorkOrder extends BaseModel {
44
name = '';
55
code = '';
66
description = '';
7-
start_date = '';
8-
end_date = '';
7+
anticipated_start_date = '';
8+
anticipated_end_date = '';
99
labels = [];
1010
static relationships = [
1111
{
@@ -19,13 +19,13 @@ export class WorkOrder extends BaseModel {
1919
this.name = data?.attributes?.name ?? data?.name ?? '';
2020
this.code = data?.attributes?.code ?? data?.code ?? '';
2121
this.description = data?.attributes?.description ?? data?.description ?? '';
22-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? '';
23-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? '';
22+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? '';
23+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? '';
2424
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
2525
}
2626
jsonApiMapping() {
2727
return {
28-
attributes: ['name', 'code', 'description', 'start_date', 'end_date', 'labels'],
28+
attributes: ['name', 'code', 'description', 'anticipated_start_date', 'anticipated_end_date', 'labels'],
2929
};
3030
}
3131
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "https://github.com/ctrl-hub/sdk.ts"
66
},
7-
"version": "0.1.131",
7+
"version": "0.1.132",
88
"main": "dist/index.js",
99
"types": "dist/index.d.ts",
1010
"type": "module",

src/models/Scheme.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export class Scheme extends BaseModel {
88
public name: string = '';
99
public code: string = '';
1010
public description: string = '';
11-
public start_date: string = '';
12-
public end_date: string = '';
11+
public anticipated_start_date: string = '';
12+
public anticipated_end_date: string = '';
1313
public labels: Array<Label> = [];
1414

1515
static relationships: RelationshipDefinition[] = [
@@ -25,14 +25,14 @@ export class Scheme extends BaseModel {
2525
this.name = data?.attributes?.name ?? data?.name ?? '';
2626
this.code = data?.attributes?.code ?? data?.code ?? '';
2727
this.description = data?.attributes?.description ?? data?.description ?? '';
28-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? '';
29-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? '';
28+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? '';
29+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? '';
3030
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
3131
}
3232

3333
jsonApiMapping() {
3434
return {
35-
attributes: ['name', 'code', 'description', 'start_date', 'end_date', 'labels'],
35+
attributes: ['name', 'code', 'description', 'anticipated_start_date', 'anticipated_end_date', 'labels'],
3636
};
3737
}
3838
}

src/models/WorkOrder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export class WorkOrder extends BaseModel {
88
public name: string = '';
99
public code: string = '';
1010
public description: string = '';
11-
public start_date: string = '';
12-
public end_date: string = '';
11+
public anticipated_start_date: string = '';
12+
public anticipated_end_date: string = '';
1313
public labels: Array<Label> = [];
1414

1515
static relationships: RelationshipDefinition[] = [
@@ -25,14 +25,14 @@ export class WorkOrder extends BaseModel {
2525
this.name = data?.attributes?.name ?? data?.name ?? '';
2626
this.code = data?.attributes?.code ?? data?.code ?? '';
2727
this.description = data?.attributes?.description ?? data?.description ?? '';
28-
this.start_date = data?.attributes?.start_date ?? data?.start_date ?? '';
29-
this.end_date = data?.attributes?.end_date ?? data?.end_date ?? '';
28+
this.anticipated_start_date = data?.attributes?.anticipated_start_date ?? data?.anticipated_start_date ?? '';
29+
this.anticipated_end_date = data?.attributes?.anticipated_end_date ?? data?.anticipated_end_date ?? '';
3030
this.labels = data?.attributes?.labels ?? data?.labels ?? [];
3131
}
3232

3333
jsonApiMapping() {
3434
return {
35-
attributes: ['name', 'code', 'description', 'start_date', 'end_date', 'labels'],
35+
attributes: ['name', 'code', 'description', 'anticipated_start_date', 'anticipated_end_date', 'labels'],
3636
};
3737
}
3838
}

0 commit comments

Comments
 (0)