@serviceai/api-spec 1.2.432 → 1.2.434

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.
Files changed (4) hide show
  1. package/openapi.json +537 -127
  2. package/openapi.yaml +517 -120
  3. package/package.json +1 -1
  4. package/types.d.ts +281 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceai/api-spec",
3
- "version": "1.2.432",
3
+ "version": "1.2.434",
4
4
  "description": "ServiceAi OpenAPI 3.1 contract + generated TS types. Auto-published from the desktop repo.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/types.d.ts CHANGED
@@ -746,6 +746,7 @@ export interface paths {
746
746
  customFields?: string | number | boolean | null | {
747
747
  [key: string]: unknown;
748
748
  } | unknown[];
749
+ /** Format: date-time */
749
750
  lastContactDate?: string | null;
750
751
  parentContactId?: number | null;
751
752
  relationship?: string | null;
@@ -771,9 +772,11 @@ export interface paths {
771
772
  cachedLng?: number | null;
772
773
  qboId?: string | null;
773
774
  qboSyncToken?: string | null;
775
+ /** Format: date-time */
774
776
  qboLastPushedAt?: string | null;
775
777
  qboLastPushedHash?: string | null;
776
778
  qboLastError?: string | null;
779
+ /** Format: date-time */
777
780
  deletedAt?: string | null;
778
781
  deletedBy?: string | null;
779
782
  } & {
@@ -819,6 +822,7 @@ export interface paths {
819
822
  customFields?: string | number | boolean | null | {
820
823
  [key: string]: unknown;
821
824
  } | unknown[];
825
+ /** Format: date-time */
822
826
  lastContactDate?: string | null;
823
827
  parentContactId?: number | null;
824
828
  relationship?: string | null;
@@ -844,9 +848,11 @@ export interface paths {
844
848
  cachedLng?: number | null;
845
849
  qboId?: string | null;
846
850
  qboSyncToken?: string | null;
851
+ /** Format: date-time */
847
852
  qboLastPushedAt?: string | null;
848
853
  qboLastPushedHash?: string | null;
849
854
  qboLastError?: string | null;
855
+ /** Format: date-time */
850
856
  deletedAt?: string | null;
851
857
  deletedBy?: string | null;
852
858
  };
@@ -872,6 +878,7 @@ export interface paths {
872
878
  customFields?: string | number | boolean | null | {
873
879
  [key: string]: unknown;
874
880
  } | unknown[];
881
+ /** Format: date-time */
875
882
  lastContactDate?: string | null;
876
883
  parentContactId?: number | null;
877
884
  relationship?: string | null;
@@ -897,9 +904,11 @@ export interface paths {
897
904
  cachedLng?: number | null;
898
905
  qboId?: string | null;
899
906
  qboSyncToken?: string | null;
907
+ /** Format: date-time */
900
908
  qboLastPushedAt?: string | null;
901
909
  qboLastPushedHash?: string | null;
902
910
  qboLastError?: string | null;
911
+ /** Format: date-time */
903
912
  deletedAt?: string | null;
904
913
  deletedBy?: string | null;
905
914
  } & {
@@ -1073,6 +1082,7 @@ export interface paths {
1073
1082
  };
1074
1083
  width: number;
1075
1084
  height: number;
1085
+ sillHeightM?: number;
1076
1086
  hostWallIndex?: number | null;
1077
1087
  wallIndex?: number;
1078
1088
  /** @enum {string} */
@@ -1095,6 +1105,7 @@ export interface paths {
1095
1105
  };
1096
1106
  width: number;
1097
1107
  height: number;
1108
+ sillHeightM?: number;
1098
1109
  hostWallIndex?: number | null;
1099
1110
  wallIndex?: number;
1100
1111
  /** @enum {string} */
@@ -1110,6 +1121,7 @@ export interface paths {
1110
1121
  };
1111
1122
  width: number;
1112
1123
  height: number;
1124
+ sillHeightM?: number;
1113
1125
  hostWallIndex?: number | null;
1114
1126
  wallIndex?: number;
1115
1127
  /** @enum {string} */
@@ -1211,6 +1223,7 @@ export interface paths {
1211
1223
  };
1212
1224
  width: number;
1213
1225
  height: number;
1226
+ sillHeightM?: number;
1214
1227
  hostWallIndex?: number | null;
1215
1228
  wallIndex?: number;
1216
1229
  /** @enum {string} */
@@ -1233,6 +1246,7 @@ export interface paths {
1233
1246
  };
1234
1247
  width: number;
1235
1248
  height: number;
1249
+ sillHeightM?: number;
1236
1250
  hostWallIndex?: number | null;
1237
1251
  wallIndex?: number;
1238
1252
  /** @enum {string} */
@@ -1248,6 +1262,7 @@ export interface paths {
1248
1262
  };
1249
1263
  width: number;
1250
1264
  height: number;
1265
+ sillHeightM?: number;
1251
1266
  hostWallIndex?: number | null;
1252
1267
  wallIndex?: number;
1253
1268
  /** @enum {string} */
@@ -3649,6 +3664,174 @@ export interface paths {
3649
3664
  patch?: never;
3650
3665
  trace?: never;
3651
3666
  };
3667
+ "/api/sketches/{sketchId}/doorway-edits": {
3668
+ parameters: {
3669
+ query?: never;
3670
+ header?: never;
3671
+ path?: never;
3672
+ cookie?: never;
3673
+ };
3674
+ get?: never;
3675
+ put?: never;
3676
+ /**
3677
+ * Save a confirmed shared-doorway edit atomically, or undo it.
3678
+ * @description Requires authenticated organization and job access. Delete removes both linked openings and only their doorway connection. Undo receipts are user/scope-bound, expire after eight hours, and reject intervening geometry or connection changes. Connect is supported for sketches only. Room reads provide openingId and openingRevision; existing records are not backfilled.
3679
+ */
3680
+ post: {
3681
+ parameters: {
3682
+ query?: never;
3683
+ header?: never;
3684
+ path: {
3685
+ sketchId: number;
3686
+ };
3687
+ cookie?: never;
3688
+ };
3689
+ requestBody: {
3690
+ content: {
3691
+ "application/json": components["schemas"]["DoorwayEditCommand"];
3692
+ };
3693
+ };
3694
+ responses: {
3695
+ /** @description Committed both rooms and their connection changes; token reverses this action. */
3696
+ 200: {
3697
+ headers: {
3698
+ [name: string]: unknown;
3699
+ };
3700
+ content: {
3701
+ "application/json": components["schemas"]["DoorwayEditResult"];
3702
+ };
3703
+ };
3704
+ /** @description Invalid command or missing explicit confirmation. */
3705
+ 400: {
3706
+ headers: {
3707
+ [name: string]: unknown;
3708
+ };
3709
+ content: {
3710
+ "application/json": components["schemas"]["ErrorEnvelope"];
3711
+ };
3712
+ };
3713
+ /** @description Authentication required. */
3714
+ 401: {
3715
+ headers: {
3716
+ [name: string]: unknown;
3717
+ };
3718
+ content?: never;
3719
+ };
3720
+ /** @description Job access denied. */
3721
+ 403: {
3722
+ headers: {
3723
+ [name: string]: unknown;
3724
+ };
3725
+ content?: never;
3726
+ };
3727
+ /** @description Scope not found in the organization. */
3728
+ 404: {
3729
+ headers: {
3730
+ [name: string]: unknown;
3731
+ };
3732
+ content?: never;
3733
+ };
3734
+ /** @description Stale or ambiguous opening identity, or undo would overwrite newer work. */
3735
+ 409: {
3736
+ headers: {
3737
+ [name: string]: unknown;
3738
+ };
3739
+ content: {
3740
+ "application/json": components["schemas"]["ErrorEnvelope"];
3741
+ };
3742
+ };
3743
+ };
3744
+ };
3745
+ delete?: never;
3746
+ options?: never;
3747
+ head?: never;
3748
+ patch?: never;
3749
+ trace?: never;
3750
+ };
3751
+ "/api/floors/{floorId}/doorway-edits": {
3752
+ parameters: {
3753
+ query?: never;
3754
+ header?: never;
3755
+ path?: never;
3756
+ cookie?: never;
3757
+ };
3758
+ get?: never;
3759
+ put?: never;
3760
+ /**
3761
+ * Save a confirmed shared-doorway edit atomically, or undo it.
3762
+ * @description Requires authenticated organization and job access. Delete removes both linked openings and only their doorway connection. Undo receipts are user/scope-bound, expire after eight hours, and reject intervening geometry or connection changes. Connect is supported for sketches only. Room reads provide openingId and openingRevision; existing records are not backfilled.
3763
+ */
3764
+ post: {
3765
+ parameters: {
3766
+ query?: never;
3767
+ header?: never;
3768
+ path: {
3769
+ floorId: number;
3770
+ };
3771
+ cookie?: never;
3772
+ };
3773
+ requestBody: {
3774
+ content: {
3775
+ "application/json": components["schemas"]["DoorwayEditCommand"];
3776
+ };
3777
+ };
3778
+ responses: {
3779
+ /** @description Committed both rooms and their connection changes; token reverses this action. */
3780
+ 200: {
3781
+ headers: {
3782
+ [name: string]: unknown;
3783
+ };
3784
+ content: {
3785
+ "application/json": components["schemas"]["DoorwayEditResult"];
3786
+ };
3787
+ };
3788
+ /** @description Invalid command or missing explicit confirmation. */
3789
+ 400: {
3790
+ headers: {
3791
+ [name: string]: unknown;
3792
+ };
3793
+ content: {
3794
+ "application/json": components["schemas"]["ErrorEnvelope"];
3795
+ };
3796
+ };
3797
+ /** @description Authentication required. */
3798
+ 401: {
3799
+ headers: {
3800
+ [name: string]: unknown;
3801
+ };
3802
+ content?: never;
3803
+ };
3804
+ /** @description Job access denied. */
3805
+ 403: {
3806
+ headers: {
3807
+ [name: string]: unknown;
3808
+ };
3809
+ content?: never;
3810
+ };
3811
+ /** @description Scope not found in the organization. */
3812
+ 404: {
3813
+ headers: {
3814
+ [name: string]: unknown;
3815
+ };
3816
+ content?: never;
3817
+ };
3818
+ /** @description Stale or ambiguous opening identity, or undo would overwrite newer work. */
3819
+ 409: {
3820
+ headers: {
3821
+ [name: string]: unknown;
3822
+ };
3823
+ content: {
3824
+ "application/json": components["schemas"]["ErrorEnvelope"];
3825
+ };
3826
+ };
3827
+ };
3828
+ };
3829
+ delete?: never;
3830
+ options?: never;
3831
+ head?: never;
3832
+ patch?: never;
3833
+ trace?: never;
3834
+ };
3652
3835
  }
3653
3836
  export type webhooks = Record<string, never>;
3654
3837
  export interface components {
@@ -3673,7 +3856,7 @@ export interface components {
3673
3856
  };
3674
3857
  /** @description Cross-platform version handshake manifest. See docs/api-versioning.md. */
3675
3858
  VersionManifest: {
3676
- /** @example 1.2.432 */
3859
+ /** @example 1.2.434 */
3677
3860
  apiVersion: string;
3678
3861
  /** @example 1.0.0 */
3679
3862
  minClientVersion: string;
@@ -3698,6 +3881,7 @@ export interface components {
3698
3881
  customFields?: string | number | boolean | null | {
3699
3882
  [key: string]: unknown;
3700
3883
  } | unknown[];
3884
+ /** Format: date-time */
3701
3885
  lastContactDate?: string | null;
3702
3886
  parentContactId?: number | null;
3703
3887
  relationship?: string | null;
@@ -3723,9 +3907,11 @@ export interface components {
3723
3907
  cachedLng?: number | null;
3724
3908
  qboId?: string | null;
3725
3909
  qboSyncToken?: string | null;
3910
+ /** Format: date-time */
3726
3911
  qboLastPushedAt?: string | null;
3727
3912
  qboLastPushedHash?: string | null;
3728
3913
  qboLastError?: string | null;
3914
+ /** Format: date-time */
3729
3915
  deletedAt?: string | null;
3730
3916
  deletedBy?: string | null;
3731
3917
  };
@@ -3790,25 +3976,35 @@ export interface components {
3790
3976
  deviceTrack?: string | number | boolean | null | {
3791
3977
  [key: string]: unknown;
3792
3978
  } | unknown[];
3793
- referencePhotoKeys?: (string | null)[] | null;
3979
+ referencePhotoKeys?: string[] | null;
3794
3980
  metricCorrection?: number | null;
3795
3981
  squareUpAngleRad?: number | null;
3796
3982
  clientMirrorApplied?: boolean | null;
3797
3983
  deviceModel?: string | null;
3798
3984
  appVersion?: string | null;
3985
+ /** Format: date-time */
3799
3986
  captureTimestamp?: string | null;
3800
3987
  captureMode?: string | null;
3801
3988
  sessionId?: string | null;
3989
+ /** Format: date-time */
3802
3990
  sessionCapturedAt?: string | null;
3991
+ clientScanId?: string | null;
3803
3992
  floorPlanAssetId?: string | null;
3804
3993
  floorPlanPixelsPerMeter?: number | null;
3805
3994
  floorPlanOffsetX?: number | null;
3806
3995
  floorPlanOffsetY?: number | null;
3807
3996
  floorPlanWidthPx?: number | null;
3808
3997
  floorPlanHeightPx?: number | null;
3998
+ sourceSketchId?: number | null;
3999
+ takeoffPagePixelsPerMeter?: number | null;
4000
+ takeoffPageOffsetX?: number | null;
4001
+ takeoffPageOffsetY?: number | null;
4002
+ takeoffPageWidthPx?: number | null;
4003
+ takeoffPageHeightPx?: number | null;
3809
4004
  floorId?: number | null;
3810
4005
  shareToVendor?: boolean | null;
3811
4006
  createdBy?: string | null;
4007
+ /** Format: date-time */
3812
4008
  deletedAt?: string | null;
3813
4009
  deletedBy?: string | null;
3814
4010
  };
@@ -3822,7 +4018,9 @@ export interface components {
3822
4018
  description?: string | null;
3823
4019
  taskType?: string | null;
3824
4020
  location?: string | null;
4021
+ /** Format: date-time */
3825
4022
  startDate?: string | null;
4023
+ /** Format: date-time */
3826
4024
  dueDate?: string | null;
3827
4025
  allDay?: boolean | null;
3828
4026
  status?: string | null;
@@ -3847,14 +4045,17 @@ export interface components {
3847
4045
  isRecurring?: boolean | null;
3848
4046
  recurrencePattern?: string | null;
3849
4047
  recurrenceInterval?: number | null;
4048
+ /** Format: date-time */
3850
4049
  recurrenceEndDate?: string | null;
3851
4050
  parentTaskId?: number | null;
4051
+ /** Format: date-time */
3852
4052
  recurrenceDate?: string | null;
3853
4053
  isRecurrenceException?: boolean | null;
3854
4054
  excludedDates?: string | number | boolean | null | {
3855
4055
  [key: string]: unknown;
3856
4056
  } | unknown[];
3857
4057
  displayIndex?: number | null;
4058
+ /** Format: date-time */
3858
4059
  deletedAt?: string | null;
3859
4060
  deletedBy?: string | null;
3860
4061
  };
@@ -3865,6 +4066,7 @@ export interface components {
3865
4066
  content: string;
3866
4067
  userName?: string | null;
3867
4068
  userEmail?: string | null;
4069
+ /** Format: date-time */
3868
4070
  deletedAt?: string | null;
3869
4071
  deletedBy?: string | null;
3870
4072
  };
@@ -3881,8 +4083,9 @@ export interface components {
3881
4083
  metadata?: string | number | boolean | null | {
3882
4084
  [key: string]: unknown;
3883
4085
  } | unknown[];
3884
- tags?: (string | null)[] | null;
4086
+ tags?: string[] | null;
3885
4087
  uploadedBy?: string | null;
4088
+ /** Format: date-time */
3886
4089
  deletedAt?: string | null;
3887
4090
  deletedBy?: string | null;
3888
4091
  };
@@ -3893,6 +4096,7 @@ export interface components {
3893
4096
  isSystemFolder?: boolean | null;
3894
4097
  folderType?: string | null;
3895
4098
  createdBy?: string | null;
4099
+ /** Format: date-time */
3896
4100
  deletedAt?: string | null;
3897
4101
  deletedBy?: string | null;
3898
4102
  };
@@ -3920,12 +4124,17 @@ export interface components {
3920
4124
  terms?: string | null;
3921
4125
  notes?: string | null;
3922
4126
  internalNotes?: string | null;
4127
+ /** Format: date-time */
3923
4128
  validUntil?: string | null;
4129
+ /** Format: date-time */
3924
4130
  sentAt?: string | null;
4131
+ /** Format: date-time */
3925
4132
  approvedAt?: string | null;
3926
4133
  approvedBy?: string | null;
4134
+ /** Format: date-time */
3927
4135
  rejectedAt?: string | null;
3928
4136
  rejectionReason?: string | null;
4137
+ /** Format: date-time */
3929
4138
  signedAt?: string | null;
3930
4139
  signatureMeta?: string | number | boolean | null | {
3931
4140
  [key: string]: unknown;
@@ -3935,10 +4144,13 @@ export interface components {
3935
4144
  signerName?: string | null;
3936
4145
  signerEmail?: string | null;
3937
4146
  signerIp?: string | null;
4147
+ /** Format: date-time */
3938
4148
  revisionRequestedAt?: string | null;
3939
4149
  revisionNotes?: string | null;
4150
+ /** Format: date-time */
3940
4151
  customerResponseAt?: string | null;
3941
4152
  convertedToInvoiceId?: number | null;
4153
+ /** Format: date-time */
3942
4154
  voidedAt?: string | null;
3943
4155
  voidedBy?: string | null;
3944
4156
  voidedReason?: string | null;
@@ -3947,16 +4159,22 @@ export interface components {
3947
4159
  signNowRoleId?: string | null;
3948
4160
  signNowRoleName?: string | null;
3949
4161
  portalVisible?: boolean | null;
4162
+ /** Format: date-time */
3950
4163
  signedCompletionEmailSentAt?: string | null;
3951
4164
  qboId?: string | null;
3952
4165
  qboSyncToken?: string | null;
4166
+ /** Format: date-time */
3953
4167
  qboLastPushedAt?: string | null;
3954
4168
  qboLastPushedHash?: string | null;
3955
4169
  qboLastError?: string | null;
3956
4170
  qboTotalTax?: string | null;
3957
4171
  qboTotalAmount?: string | null;
4172
+ /** Format: date-time */
3958
4173
  qboTotalsAt?: string | null;
4174
+ sourceKind?: string | null;
4175
+ takeoffScanId?: number | null;
3959
4176
  createdBy?: string | null;
4177
+ /** Format: date-time */
3960
4178
  deletedAt?: string | null;
3961
4179
  deletedBy?: string | null;
3962
4180
  };
@@ -3981,12 +4199,12 @@ export interface components {
3981
4199
  MobileUploadRequest: {
3982
4200
  /** @description RoomPlan JSON envelope. `rooms[]` carries the per-room geometry (walls/doors/windows/openings/pins/objects/boundaryPolygon). iOS continues to upload positions in the RoomPlan-native frame; the server applies the view-alignment intake transform once at `/scans/mobile-upload` (see docs/lidar-contract-v4.md). */
3983
4201
  roomPlanJSON: {
3984
- rooms: {
4202
+ rooms: ({
3985
4203
  label?: string;
3986
4204
  name?: string;
3987
4205
  category?: string;
3988
4206
  roomLocalId?: string;
3989
- walls?: {
4207
+ walls?: ({
3990
4208
  start?: {
3991
4209
  x: number;
3992
4210
  y: number;
@@ -4001,9 +4219,13 @@ export interface components {
4001
4219
  identifier?: string;
4002
4220
  isDoor?: boolean;
4003
4221
  isOpening?: boolean;
4222
+ } & {
4223
+ [key: string]: unknown;
4004
4224
  };
4005
4225
  captureMethod?: string;
4006
- }[];
4226
+ } & {
4227
+ [key: string]: unknown;
4228
+ })[];
4007
4229
  doors?: {
4008
4230
  position: {
4009
4231
  x: number;
@@ -4011,6 +4233,7 @@ export interface components {
4011
4233
  };
4012
4234
  width: number;
4013
4235
  height: number;
4236
+ sillHeightM?: number;
4014
4237
  hostWallIndex?: number | null;
4015
4238
  wallIndex?: number;
4016
4239
  /** @enum {string} */
@@ -4025,6 +4248,7 @@ export interface components {
4025
4248
  };
4026
4249
  width: number;
4027
4250
  height: number;
4251
+ sillHeightM?: number;
4028
4252
  hostWallIndex?: number | null;
4029
4253
  wallIndex?: number;
4030
4254
  /** @enum {string} */
@@ -4039,6 +4263,7 @@ export interface components {
4039
4263
  };
4040
4264
  width: number;
4041
4265
  height: number;
4266
+ sillHeightM?: number;
4042
4267
  hostWallIndex?: number | null;
4043
4268
  wallIndex?: number;
4044
4269
  /** @enum {string} */
@@ -4046,7 +4271,7 @@ export interface components {
4046
4271
  /** @enum {string} */
4047
4272
  placementSource?: "auto" | "manual";
4048
4273
  }[];
4049
- pins?: {
4274
+ pins?: ({
4050
4275
  id: string;
4051
4276
  position: {
4052
4277
  x: number;
@@ -4056,8 +4281,10 @@ export interface components {
4056
4281
  roomLocalId?: string;
4057
4282
  kind?: string;
4058
4283
  note?: string;
4059
- }[];
4060
- objects?: {
4284
+ } & {
4285
+ [key: string]: unknown;
4286
+ })[];
4287
+ objects?: ({
4061
4288
  category?: string;
4062
4289
  position?: {
4063
4290
  x: number;
@@ -4069,14 +4296,20 @@ export interface components {
4069
4296
  depth?: number;
4070
4297
  };
4071
4298
  rotation?: number;
4072
- }[];
4299
+ } & {
4300
+ [key: string]: unknown;
4301
+ })[];
4073
4302
  boundaryPolygon?: {
4074
4303
  x: number;
4075
4304
  y: number;
4076
4305
  }[];
4077
4306
  roomNote?: string;
4078
4307
  entryDoorwayId?: string;
4079
- }[];
4308
+ } & {
4309
+ [key: string]: unknown;
4310
+ })[];
4311
+ } & {
4312
+ [key: string]: unknown;
4080
4313
  };
4081
4314
  name: string;
4082
4315
  description?: string;
@@ -4123,6 +4356,8 @@ export interface components {
4123
4356
  x: number;
4124
4357
  y: number;
4125
4358
  };
4359
+ } & {
4360
+ [key: string]: unknown;
4126
4361
  };
4127
4362
  MobileUploadResponse: {
4128
4363
  scanId: number;
@@ -4759,6 +4994,41 @@ export interface components {
4759
4994
  /** Format: date-time */
4760
4995
  requestedAt: string;
4761
4996
  };
4997
+ DoorwayEditCommand: {
4998
+ /** @enum {string} */
4999
+ action: "delete";
5000
+ roomId: number;
5001
+ openingId: string;
5002
+ revision: string;
5003
+ /** @enum {boolean} */
5004
+ confirmed: true;
5005
+ } | {
5006
+ /** @enum {string} */
5007
+ action: "undo";
5008
+ token: string;
5009
+ } | {
5010
+ /** @enum {string} */
5011
+ action: "connect";
5012
+ rooms: {
5013
+ id: number;
5014
+ revision: string;
5015
+ geometry: {
5016
+ [key: string]: unknown;
5017
+ };
5018
+ }[];
5019
+ links: {
5020
+ roomAId: number;
5021
+ roomBId: number;
5022
+ doorAIndex: number;
5023
+ doorBIndex: number;
5024
+ }[];
5025
+ };
5026
+ DoorwayEditResult: {
5027
+ /** @enum {boolean} */
5028
+ ok: true;
5029
+ token: string;
5030
+ roomIds: number[];
5031
+ };
4762
5032
  };
4763
5033
  responses: never;
4764
5034
  parameters: never;