Skip to content

Commit 5bffc3f

Browse files
authored
Merge pull request #43 from ctrl-hub/appointment-fixes
remove appointment type
2 parents 69dae63 + 2b141d8 commit 5bffc3f

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

dist/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,13 +1170,12 @@ class Street extends BaseModel {
11701170
// src/models/Appointment.ts
11711171
class Appointment extends BaseModel {
11721172
type = "appointments";
1173-
appointment_type = "";
11741173
start_time = "";
11751174
end_time = "";
11761175
notes = "";
11771176
jsonApiMapping() {
11781177
return {
1179-
attributes: ["appointment_type", "start_time", "end_time", "notes"],
1178+
attributes: ["start_time", "end_time", "notes"],
11801179
relationships: {
11811180
customer_interaction: "customer-interactions",
11821181
operation: "operations"
@@ -1197,7 +1196,6 @@ class Appointment extends BaseModel {
11971196
];
11981197
constructor(data) {
11991198
super(data);
1200-
this.appointment_type = data?.attributes?.appointment_type ?? data?.appointment_type ?? "";
12011199
this.start_time = data?.attributes?.start_time ?? data?.start_time ?? "";
12021200
this.end_time = data?.attributes?.end_time ?? data?.end_time ?? "";
12031201
this.notes = data?.attributes?.notes ?? data?.notes ?? "";

dist/models/Appointment.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BaseModel } from './BaseModel';
33
import type { JsonApiMapping } from '../types/JsonApiMapping';
44
export declare class Appointment extends BaseModel implements Partial<JsonApiMapping> {
55
type: string;
6-
appointment_type: string;
76
start_time: string;
87
end_time: string;
98
notes: string;

dist/models/Appointment.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { BaseModel } from './BaseModel';
22
export class Appointment extends BaseModel {
33
type = 'appointments';
4-
appointment_type = '';
54
start_time = '';
65
end_time = '';
76
notes = '';
87
jsonApiMapping() {
98
return {
10-
attributes: ['appointment_type', 'start_time', 'end_time', 'notes'],
9+
attributes: ['start_time', 'end_time', 'notes'],
1110
relationships: {
1211
customer_interaction: 'customer-interactions',
1312
operation: 'operations',
@@ -28,7 +27,6 @@ export class Appointment extends BaseModel {
2827
];
2928
constructor(data) {
3029
super(data);
31-
this.appointment_type = data?.attributes?.appointment_type ?? data?.appointment_type ?? '';
3230
this.start_time = data?.attributes?.start_time ?? data?.start_time ?? '';
3331
this.end_time = data?.attributes?.end_time ?? data?.end_time ?? '';
3432
this.notes = data?.attributes?.notes ?? data?.notes ?? '';

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.121",
7+
"version": "0.1.122",
88
"main": "dist/index.js",
99
"types": "dist/index.d.ts",
1010
"type": "module",

src/models/Appointment.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import type { JsonApiMapping } from '../types/JsonApiMapping';
55
export class Appointment extends BaseModel implements Partial<JsonApiMapping> {
66
public type: string = 'appointments';
77

8-
public appointment_type: string = '';
98
public start_time: string = '';
109
public end_time: string = '';
1110
public notes: string = '';
1211

1312
jsonApiMapping() {
1413
return {
15-
attributes: ['appointment_type', 'start_time', 'end_time', 'notes'],
14+
attributes: ['start_time', 'end_time', 'notes'],
1615
relationships: {
1716
customer_interaction: 'customer-interactions',
1817
operation: 'operations',
@@ -36,7 +35,6 @@ export class Appointment extends BaseModel implements Partial<JsonApiMapping> {
3635
constructor(data?: any) {
3736
super(data);
3837

39-
this.appointment_type = data?.attributes?.appointment_type ?? data?.appointment_type ?? '';
4038
this.start_time = data?.attributes?.start_time ?? data?.start_time ?? '';
4139
this.end_time = data?.attributes?.end_time ?? data?.end_time ?? '';
4240
this.notes = data?.attributes?.notes ?? data?.notes ?? '';

0 commit comments

Comments
 (0)