anl 1.3.26 → 1.3.28
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.1",t={title:"Core API",version:"v1"},s=[{url:""}],n={"/api/activity/servicevisit/{serviceVisitId}":{get:{tags:["Activity"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"locale",in:"query",schema:{type:"string",default:"en_US"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}}}}}}},"/AppPackages/{fileName}":{get:{tags:["AppPackages"],parameters:[{name:"fileName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/AppPackages/upload":{post:{tags:["AppPackages"],requestBody:{content:{"multipart/form-data":{schema:{type:"object",properties:{File:{type:"string",format:"binary"}}},encoding:{File:{style:"form"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}}}}}}},"/api/AppVersion":{get:{tags:["AppVersion"],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/StringServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/StringServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/StringServiceResponse"}}}}}}},"/api/attachment/referenceId/{referenceId}/referenceType/{referenceType}":{get:{tags:["Attachment"],parameters:[{name:"referenceId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"referenceType",in:"path",required:!0,schema:{$ref:"#/components/schemas/SCReferenceTypeEnum"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}}}}}}},"/api/attachment/add":{post:{tags:["Attachment"],requestBody:{content:{"multipart/form-data":{schema:{type:"object",properties:{ReferenceID:{type:"integer",format:"int32"},ReferenceType:{$ref:"#/components/schemas/SCReferenceTypeEnum"},File:{type:"string",format:"binary"},FileName:{type:"string"}}},encoding:{ReferenceID:{style:"form"},ReferenceType:{style:"form"},File:{style:"form"},FileName:{style:"form"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}}}}}}},"/api/attachment/download/{filePath}":{get:{tags:["Attachment"],parameters:[{name:"filePath",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/api/attachment/remove/{attachmentId}":{post:{tags:["Attachment"],parameters:[{name:"attachmentId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"hardDelete",in:"query",schema:{type:"boolean"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/corrections/saveOwners":{post:{tags:["Corrections"],requestBody:{content:{"application/json-patch+json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"text/json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"application/*+json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/lookup/paytypes":{get:{tags:["Lookup"],parameters:[{name:"locale",in:"query",schema:{type:"string",default:"en_US"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}}}}}}},"/api/motionstatus/transitions":{get:{tags:["MotionStatus"],parameters:[{name:"status",in:"query",schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"}},{name:"locationType",in:"query",schema:{$ref:"#/components/schemas/ScaLocationTypeEnum"}},{name:"productType",in:"query",schema:{$ref:"#/components/schemas/PersonaProductTypeEnum"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}}}}}}},"/api/motionstatus/change":{post:{tags:["MotionStatus"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/parts/count/{serviceVisitId}":{get:{tags:["Parts"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/parts/servicevisit/{serviceVisitId}":{get:{tags:["Parts"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}}}}}}},"/api/parts/partpickrequest/{servicevisitId}":{get:{tags:["Parts"],parameters:[{name:"servicevisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}}}}}}},"/api/parts/requestpick":{post:{tags:["Parts"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"application/json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"text/json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"application/*+json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/STPCoreStaticFiles/{fileName}":{get:{tags:["Service.Touch.Point.Core.API"],parameters:[{name:"fileName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/api/servicevisit/my":{post:{tags:["ServiceVisit"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/search":{get:{tags:["ServiceVisit"],parameters:[{name:"term",in:"query",schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/detail":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}}}}}}},"/api/servicevisit/warranty":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}}}}}}},"/api/servicevisit/audittrail":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/tags":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/etc":{post:{tags:["ServiceVisit"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/timetracker/recordtime":{post:{tags:["TimeTracker"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/timetracker/summary/userId/{userId}":{get:{tags:["TimeTracker"],parameters:[{name:"userId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"scaLocationId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}}}}}}},"/api/timetracker/summary/serviceVisitId/{serviceVisitId}":{get:{tags:["TimeTracker"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"scaLocationId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}}}}}}},"/api/trt/all":{get:{tags:["TRT"],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}}}}}}},"/api/trt/scaLocationId/{scaLocationId}":{get:{tags:["TRT"],parameters:[{name:"scaLocationId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}}}}}}},"/api/trt/term":{get:{tags:["TRT"],parameters:[{name:"term",in:"query",schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}}}}}}},"/api/user/userId/{userId}":{get:{tags:["User"],parameters:[{name:"userId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}}}}}}},"/api/user/adUserName/{adUserName}":{get:{tags:["User"],parameters:[{name:"adUserName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}}}}}}}},a={schemas:{ActivityCorrectionPartStatusEnum:{enum:[0,1,2,3,4,5,6,7],type:"integer",format:"int32"},ActivityResponseDTO:{type:"object",properties:{activityId:{type:"integer",format:"int32"},narrative:{type:"string",nullable:!0},activityStatus:{$ref:"#/components/schemas/ActivityStatusEnum"},activityCorrections:{type:"array",items:{$ref:"#/components/schemas/CorrectionResponseDTO"},nullable:!0}},additionalProperties:!1},ActivityResponseDTOIListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ActivityResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ActivityStatusEnum:{enum:[1,2,3],type:"integer",format:"int32"},AdditionalAttributesDTO:{type:"object",properties:{translations:{type:"array",items:{$ref:"#/components/schemas/Translation"},nullable:!0}},additionalProperties:!1},AdditonalInformation:{type:"object",properties:{vatTaxNumber:{type:"string",nullable:!0},vatPercentage:{type:"number",format:"double"},barNumber:{type:"string",nullable:!0},epaid:{type:"string",nullable:!0},partWareHouseLocationAttributeID:{type:"integer",format:"int32",nullable:!0},fulfillmentLocationID:{type:"integer",format:"int32",nullable:!0},shipToAddressID:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},AttachmentAdditionalAttributes:{type:"object",properties:{sourceReference:{type:"string",nullable:!0},displayName:{type:"string",nullable:!0},attachmentTags:{type:"array",items:{type:"string"},nullable:!0},producer:{type:"string",nullable:!0},clientId:{type:"string",nullable:!0},correlationId:{type:"string",nullable:!0},isCustomer:{type:"boolean"},proofOfPaymentAmount:{type:"string",nullable:!0}},additionalProperties:!1},AttachmentDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},enabled:{type:"boolean"},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},attachmentID:{type:"integer",format:"int32"},filePath:{type:"string",nullable:!0},fileName:{type:"string",nullable:!0},referenceID:{type:"integer",format:"int32"},referenceType:{$ref:"#/components/schemas/SCReferenceTypeEnum"},isUploaded:{type:"boolean"},uploadFailureMessage:{type:"string",nullable:!0},thumbnailPath:{type:"string",nullable:!0},isActive:{type:"boolean"},storageType:{$ref:"#/components/schemas/AttachmentStorageTypeEnum"},additionalAttributes:{$ref:"#/components/schemas/AttachmentAdditionalAttributes"},uuid:{type:"string",nullable:!0},documentType:{$ref:"#/components/schemas/DocumentTypeEnum"},isVoid:{type:"boolean"}},additionalProperties:!1},AttachmentDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/AttachmentDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},AttachmentDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/AttachmentDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},AttachmentStorageTypeEnum:{enum:[1,2],type:"integer",format:"int32"},AuditTrailResponseDTO:{type:"object",properties:{description:{type:"string",nullable:!0},appName:{type:"string",nullable:!0},createByUserName:{type:"string",nullable:!0},createDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},AuditTrailResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/AuditTrailResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},BatchPartPickRequest:{type:"object",properties:{activityCorectionPartIdList:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},inventoryLocationId:{type:"integer",format:"int32"},serviceVisitId:{type:"integer",format:"int32"}},additionalProperties:!1},BooleanServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"boolean"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},CorrectionOwnerResponseDTO:{type:"object",properties:{ownerID:{type:"integer",format:"int32"},ownerName:{type:"string",nullable:!0}},additionalProperties:!1},CorrectionResponseDTO:{type:"object",properties:{activityCorrectionId:{type:"integer",format:"int32"},correctionCode:{type:"string",nullable:!0},correctionDescription:{type:"string",nullable:!0},paytype:{$ref:"#/components/schemas/ServiceVisitContactPayerTypeEnum"},chargedHours:{type:"number",format:"double",nullable:!0},nonReportable:{type:"boolean",nullable:!0},isDiagnostic:{type:"boolean",nullable:!0},activityCorrectionOwners:{type:"array",items:{$ref:"#/components/schemas/CorrectionOwnerResponseDTO"},nullable:!0}},additionalProperties:!1},DocumentDetailsDTO:{type:"object",properties:{uuid:{type:"string",nullable:!0},name:{type:"string",nullable:!0},version:{type:"string",nullable:!0},type:{type:"string",nullable:!0},uploaded_at:{type:"string",nullable:!0},files:{type:"array",items:{$ref:"#/components/schemas/DocumentDetailsDTO"},nullable:!0}},additionalProperties:!1},DocumentDetailsDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/DocumentDetailsDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},DocumentTypeEnum:{enum:[1,2,3,4,5,6,7,8,9],type:"integer",format:"int32"},EntityTagsResponseDTO:{type:"object",properties:{tagName:{type:"string",nullable:!0}},additionalProperties:!1},EntityTagsResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/EntityTagsResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ETCUpdateRequestDTO:{type:"object",properties:{serviceVisitId:{type:"integer",format:"int32"},etc:{type:"string",format:"date-time"}},additionalProperties:!1},FRT:{type:"object",properties:{frtRate:{type:"number",format:"double",nullable:!0},frtRoadsterRate:{type:"number",format:"double",nullable:!0}},additionalProperties:!1},FRTValue:{type:"object",properties:{frtRate:{type:"number",format:"double",nullable:!0},frtRoadsterRate:{type:"number",format:"double",nullable:!0}},additionalProperties:!1},Int32ServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"integer",format:"int32"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},LocaleDTO:{type:"object",properties:{localeID:{type:"integer",format:"int32"},countryID:{type:"integer",format:"int32"},isDefault:{type:"boolean"},locale:{type:"string",nullable:!0}},additionalProperties:!1},LocationAdditionalAttributes:{type:"object",properties:{frtValues:{$ref:"#/components/schemas/FRT"},locationAddress:{$ref:"#/components/schemas/LocationAddress"},additonalInformation:{$ref:"#/components/schemas/AdditonalInformation"}},additionalProperties:!1},LocationAddress:{type:"object",properties:{addressLine1:{type:"string",nullable:!0},addressLine2:{type:"string",nullable:!0},city:{type:"string",nullable:!0},countryID:{type:"integer",format:"int32",nullable:!0},provinceID:{type:"integer",format:"int32",nullable:!0},countryCode:{type:"string",nullable:!0},province:{type:"string",nullable:!0},postalCode:{type:"string",nullable:!0},region:{type:"string",nullable:!0},latitude:{type:"string",nullable:!0},longitude:{type:"string",nullable:!0}},additionalProperties:!1},LocationDTO:{type:"object",properties:{locationID:{type:"integer",format:"int32"},locationAttributeID:{type:"integer",format:"int32"},locationTypeID:{$ref:"#/components/schemas/LocationMasterLocationTypeEnum"},locationName:{type:"string",nullable:!0},locationDescription:{type:"string",nullable:!0},entityID:{type:"integer",format:"int32",nullable:!0},entityName:{type:"string",nullable:!0},warehouseID:{type:"integer",format:"int32",nullable:!0},warehouseTypeID:{$ref:"#/components/schemas/LocationMasterWarehouseTypeEnum"},warehouseName:{type:"string",nullable:!0},supplierCode:{type:"string",nullable:!0},shipFromLocationID:{type:"integer",format:"int32"},additionalAttributes:{$ref:"#/components/schemas/LocationAdditionalAttributes"},trtAdditionalAttributes:{$ref:"#/components/schemas/TRTAdditionalAttributes"},behaviorBitMask:{type:"integer",format:"int32",nullable:!0},isExternalSupplier:{type:"boolean"},eta:{type:"string",nullable:!0},etaStatus:{type:"string",nullable:!0},preOrderEtaReferenceID:{type:"string",nullable:!0},ranking:{type:"integer",format:"int32"},isDefault:{type:"boolean"},isFulfillmentLocation:{type:"boolean",readOnly:!0},locationTerritoryName:{type:"string",nullable:!0}},additionalProperties:!1},LocationMasterLocationTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},LocationMasterWarehouseTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},Marketing:{type:"object",properties:{displayName:{type:"string",nullable:!0}},additionalProperties:!1},MotionStatusChangeRequestDTO:{type:"object",properties:{serviceVisitId:{type:"integer",format:"int32"},motionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},serviceVisitDateTime:{type:"string",nullable:!0}},additionalProperties:!1},MyServiceVisitRequestDTO:{type:"object",properties:{scaLocationIDs:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},ownerIDs:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},customerIds:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},pageNumber:{type:"integer",format:"int32"},pageSize:{type:"integer",format:"int32"},searchCriteria:{type:"string",nullable:!0},sorts:{type:"array",items:{$ref:"#/components/schemas/VisitSortingDTO"},nullable:!0},fromDate:{type:"string",format:"date-time",nullable:!0},toDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},PartInfoResponseDTO:{type:"object",properties:{activityCorrectionPartID:{type:"integer",format:"int32",nullable:!0},partNumber:{type:"string",nullable:!0},partDescription:{type:"string",nullable:!0},binLocation:{type:"string",nullable:!0},partStatus:{$ref:"#/components/schemas/ActivityCorrectionPartStatusEnum"},quantity:{type:"number",format:"double",nullable:!0},isDraftPart:{type:"boolean",nullable:!0}},additionalProperties:!1},PartInfoResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PartInfoResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PartPickRequestResponseDTO:{type:"object",properties:{requestDate:{type:"string",format:"date-time",nullable:!0},displayName:{type:"string",nullable:!0},activityCorrectionPartID:{type:"integer",format:"int32"}},additionalProperties:!1},PartPickRequestResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PartPickRequestResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PayTypeResponseDTO:{type:"object",properties:{payTypeID:{type:"integer",format:"int32"},description:{type:"string",nullable:!0}},additionalProperties:!1},PayTypeResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PayTypeResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PersonaProductTypeEnum:{enum:[0,1,2,3,4,6,7],type:"integer",format:"int32"},RecordTimeRequestDTO:{type:"object",properties:{referenceId:{type:"integer",format:"int32"},userId:{type:"integer",format:"int32"},trackerAction:{$ref:"#/components/schemas/TimeTrackerActionEnum"}},additionalProperties:!1},SaveCorrectionOwnerRequestDTO:{type:"object",properties:{activityCorrectionID:{type:"integer",format:"int32"},ownerID:{type:"integer",format:"int32"},enabled:{type:"boolean"}},additionalProperties:!1},ScaLocationTypeEnum:{enum:[1,2,3,4,5,6,7,8,30,31,32,33],type:"integer",format:"int32"},SCReferenceTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},ServiceVisitContactPayerTypeEnum:{enum:[1,2],type:"integer",format:"int32"},ServiceVisitDetailResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},modelCode:{type:"string",nullable:!0},etc:{type:"string",nullable:!0},serviceVisitDateTime:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},scaLocationId:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},ServiceVisitDetailResponseDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitMotionStatusDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},enabled:{type:"boolean"},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},serviceVisitMotionStatusID:{type:"integer",format:"int32"},description:{type:"string",nullable:!0},descriptionLocalized:{type:"string",nullable:!0},parentId:{type:"integer",format:"int32"},disabled:{type:"boolean"},parentDescription:{type:"string",nullable:!0},parentDescriptionLocalized:{type:"string",nullable:!0},additionalAttributes:{$ref:"#/components/schemas/AdditionalAttributesDTO"},displayOrder:{type:"number",format:"double"},transitionAdditionalAttributes:{$ref:"#/components/schemas/TransitionAdditionalAttributesDTO"}},additionalProperties:!1},ServiceVisitMotionStatusDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitMotionStatusEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,75],type:"integer",format:"int32"},ServiceVisitResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},customerName:{type:"string",nullable:!0},modelCode:{type:"string",nullable:!0},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},etc:{type:"string",nullable:!0},serviceVisitDateTime:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"}},additionalProperties:!1},ServiceVisitResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ServiceVisitResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitStatusEnum:{enum:[1,2,3],type:"integer",format:"int32"},ServiceVisitWarrantyResponseDTO:{type:"object",properties:{newVehicleWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},usedVehicleWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},batteryWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},driveUnitWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},wearingPartsLevel1Warranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},wearingPartsLevel2Warranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},vehicleESA:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},maintenancePackageWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},tiresPackageWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},extendedWarrantyInsurance:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},srsWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},bodyRustWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"}},additionalProperties:!1},ServiceVisitWarrantyResponseDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},StringServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"string",nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},SVSearchResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},serviceVisitStatus:{$ref:"#/components/schemas/ServiceVisitStatusEnum"}},additionalProperties:!1},SVSearchResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/SVSearchResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TimeTrackerActionEnum:{enum:[1,2],type:"integer",format:"int32"},TimeTrackerDetailDTO:{type:"object",properties:{punchInDate:{type:"string",format:"date-time"},punchOutDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},TimeTrackerResponseDTO:{type:"object",properties:{userId:{type:"integer",format:"int32"},userName:{type:"string",nullable:!0},totalHours:{type:"number",format:"double"},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},punchingIn:{type:"boolean"},timeTrackerDetail:{type:"array",items:{$ref:"#/components/schemas/TimeTrackerDetailDTO"},nullable:!0}},additionalProperties:!1},TimeTrackerResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TimeTrackerResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TransitionAdditionalAttributesDTO:{type:"object",properties:{manangerLevelRequired:{type:"boolean"}},additionalProperties:!1},Translation:{type:"object",properties:{locale:{type:"string",nullable:!0},description:{type:"string",nullable:!0},searchTerms:{type:"string",nullable:!0}},additionalProperties:!1},TRTAdditionalAttributes:{type:"object",properties:{frtValues:{$ref:"#/components/schemas/FRTValue"},trtAddress:{$ref:"#/components/schemas/TRTAddress"},additonalInformation:{$ref:"#/components/schemas/TRTAdditonalInformation"},trtCommunication:{$ref:"#/components/schemas/TRTCommunication"},marketing:{$ref:"#/components/schemas/Marketing"},trtAttributes:{type:"array",items:{$ref:"#/components/schemas/TRTAttribute"},nullable:!0}},additionalProperties:!1},TRTAdditonalInformation:{type:"object",properties:{vatTaxNumber:{type:"string",nullable:!0},vatPercentage:{type:"number",format:"double"},barNumber:{type:"string",nullable:!0},epaid:{type:"string",nullable:!0},weekDayWorkHours:{type:"string",nullable:!0},weekEndWorkHours:{type:"string",nullable:!0},storeHours:{type:"string",nullable:!0},maintenanceManagerName:{type:"string",nullable:!0},companyRegistrationNumber:{type:"string",nullable:!0},facilityId:{type:"string",nullable:!0},serviceManagerUserId:{type:"string",nullable:!0},serviceManagerWarpUserID:{type:"string",nullable:!0},parentTRTId:{type:"integer",format:"int32",nullable:!0},companyRegistrationName:{type:"string",nullable:!0},towIn:{type:"boolean",nullable:!0},afterHoursDrop:{type:"boolean",nullable:!0},serviceCenterRoadsideRules:{type:"string",nullable:!0},tiresTowsOrLoanerWheels:{type:"boolean",nullable:!0},functionType:{type:"string",nullable:!0},carPassLocationId:{type:"string",nullable:!0}},additionalProperties:!1},TRTAddress:{type:"object",properties:{addressLine1:{type:"string",nullable:!0},addressLine2:{type:"string",nullable:!0},city:{type:"string",nullable:!0},countryID:{type:"integer",format:"int32",nullable:!0},provinceID:{type:"integer",format:"int32",nullable:!0},countryCode:{type:"string",nullable:!0},province:{type:"string",nullable:!0},postalCode:{type:"string",nullable:!0},region:{type:"string",nullable:!0},latitude:{type:"string",nullable:!0},longitude:{type:"string",nullable:!0},state:{type:"string",nullable:!0}},additionalProperties:!1},TRTAttribute:{type:"object",properties:{name:{type:"string",nullable:!0}},additionalProperties:!1},TRTCommunication:{type:"object",properties:{email:{type:"string",nullable:!0},phoneNumber1:{type:"string",nullable:!0},phoneNumber2:{type:"string",nullable:!0},fax:{type:"string",nullable:!0},preferredLanguage:{type:"string",nullable:!0}},additionalProperties:!1},TrtDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},scaLocationID:{type:"integer",format:"int32"},inventoryLocationID:{type:"integer",format:"int32",nullable:!0},trtid:{type:"integer",format:"int32",nullable:!0},scaLocationTypeID:{type:"integer",format:"int32",nullable:!0},name:{type:"string",nullable:!0},description:{type:"string",nullable:!0},timeZoneID:{type:"integer",format:"int32",nullable:!0},timeZoneName:{type:"string",nullable:!0},timeZoneNameDescription:{type:"string",nullable:!0},dotNetTimeZone:{type:"string",nullable:!0},ianaTimeZone:{type:"string",nullable:!0},utcOffsetMinutes:{type:"integer",format:"int32",nullable:!0},dlSavingUTCOffsetMinutes:{type:"integer",format:"int32",nullable:!0},isDayLightSaving:{type:"boolean",nullable:!0},inventoryLocation:{$ref:"#/components/schemas/LocationDTO"},isSCAEnabled:{type:"boolean"},currencyCode:{type:"string",nullable:!0},behaviorBitMask:{type:"integer",format:"int32",nullable:!0},locationTerritoryName:{type:"string",nullable:!0},additionalAttributes:{$ref:"#/components/schemas/TRTAdditionalAttributes"},locationAdditionalAttributes:{$ref:"#/components/schemas/LocationAdditionalAttributes"},locales:{type:"array",items:{$ref:"#/components/schemas/LocaleDTO"},nullable:!0},enabled:{type:"boolean"},referenceID:{type:"integer",format:"int32"},warehouseID:{type:"integer",format:"int32",nullable:!0},warehouseName:{type:"string",nullable:!0},territoryID:{type:"integer",format:"int32",nullable:!0},functionID:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},TrtDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TrtDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TrtDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/TrtDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TrtSummaryDTO:{type:"object",properties:{trtid:{type:"integer",format:"int32"},scaLocationID:{type:"integer",format:"int32"},functionID:{type:"integer",format:"int32",nullable:!0},inventoryLocationID:{type:"integer",format:"int32"},scaLocationTypeID:{type:"integer",format:"int32",nullable:!0},description:{type:"string",nullable:!0},utcOffsetMinutes:{type:"integer",format:"int32",nullable:!0},dlSavingUTCOffsetMinutes:{type:"integer",format:"int32",nullable:!0},isDayLightSaving:{type:"boolean",nullable:!0}},additionalProperties:!1},TrtSummaryDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TrtSummaryDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},UserDTO:{type:"object",properties:{userID:{type:"integer",format:"int32"},warpUserID:{type:"integer",format:"int32"},adUsername:{type:"string",nullable:!0},visualUsername:{type:"string",nullable:!0},enabled:{type:"boolean"},firstName:{type:"string",nullable:!0},lastName:{type:"string",nullable:!0},displayName:{type:"string",nullable:!0},title:{type:"string",nullable:!0},email:{type:"string",nullable:!0},manager:{type:"string",nullable:!0},managerUserID:{type:"integer",format:"int32",nullable:!0},managementLevel:{type:"string",nullable:!0},managementLevelRank:{type:"integer",format:"int32"},employeeId:{type:"string",nullable:!0},source:{type:"integer",format:"int32"},permissions:{type:"array",items:{type:"string"},nullable:!0},userPreferences:{$ref:"#/components/schemas/UserPreferenceDTO"}},additionalProperties:!1},UserDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/UserDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},UserPreferenceAttributes:{type:"object",properties:{hasCurrentReleaseVersion:{type:"boolean"},delegationEnabled:{type:"boolean"},delegatedUserId:{type:"integer",format:"int32"},printerSettings:{$ref:"#/components/schemas/UserPrinterSettings"},taskQueueAssignee:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},pickRequestSubscription:{type:"array",items:{type:"integer",format:"int32"},nullable:!0}},additionalProperties:!1},UserPreferenceDTO:{type:"object",properties:{userPreferenceID:{type:"integer",format:"int32"},userID:{type:"integer",format:"int32"},attributes:{$ref:"#/components/schemas/UserPreferenceAttributes"},createdByUserId:{type:"integer",format:"int32"},modifyDate:{type:"string",format:"date-time",nullable:!0},modifyByUserID:{type:"integer",format:"int32"}},additionalProperties:!1},UserPrinterSettings:{type:"object",properties:{ipAddress:{type:"string",nullable:!0}},additionalProperties:!1},ValidationMessage:{type:"object",properties:{attemptedValue:{nullable:!0},category:{$ref:"#/components/schemas/ValidationMessageCategoriesEnum"},message:{type:"string",nullable:!0},propertyName:{type:"string",nullable:!0}},additionalProperties:!1},ValidationMessageCategoriesEnum:{enum:[0,1,2,3],type:"integer",format:"int32"},VisitSortDirectionEnum:{enum:[1,2],type:"integer",format:"int32"},VisitSortingDTO:{type:"object",properties:{field:{$ref:"#/components/schemas/VisitSortTypeEnum"},direction:{$ref:"#/components/schemas/VisitSortDirectionEnum"}},additionalProperties:!1},VisitSortTypeEnum:{enum:[1,2,3,4,5,6],type:"integer",format:"int32"},WarrantyDetailItemDTO:{type:"object",properties:{warrantyType:{type:"string",nullable:!0},status:{type:"string",nullable:!0},startDate:{type:"string",format:"date-time",nullable:!0},endDate:{type:"string",format:"date-time",nullable:!0},startMileage:{type:"string",nullable:!0},endMileage:{type:"string",nullable:!0},warrantyMileageType:{type:"string",nullable:!0}},additionalProperties:!1}},securitySchemes:{Bearer:{type:"apiKey",description:"Authorization header using the Bearer scheme",name:"Authorization",in:"header"}}},r=[{Bearer:[]}],i={openapi:e,info:t,servers:s,paths:n,components:a,security:r};exports.components=a,exports.default=i,exports.info=t,exports.openapi=e,exports.paths=n,exports.security=r,exports.servers=s;
|
package/lib/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.28",i="FE command line tool",s="bin/an-cli.js",t={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch"},p={anl:"bin/an-cli.js"},l="Gleason <bianliuzhu@gmail.com>",r={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.3","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},o={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"^10.0.0",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",g={name:"anl",version:e,description:i,main:s,scripts:t,bin:p,author:l,license:"ISC",devDependencies:r,dependencies:o,keywords:n,files:c,repository:u,type:a};exports.author=l,exports.bin=p,exports.default=g,exports.dependencies=o,exports.description=i,exports.devDependencies=r,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=t,exports.type=a,exports.version=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";var n;!function(e){e.GET="get",e.PUT="put",e.POST="post",e.DELETE="delete",e.OPTIONS="options",e.HEAD="head",e.PATCH="patch",e.TRACE="trace"}(n||(n={}));const r={typeMapping:new Map([["integer","number"],["string","string"],["boolean","boolean"],["binary","File"]]),errorHandling:{throwOnError:!1,logErrors:!0},formatting:{indentation:"\t",lineEnding:"\n"}};class s{pathsObject={};nonArrayType=["boolean","object","number","string","integer"];pathKey="";contentBody={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:"",method:"",requestPath:"",summary:"",apiName:"",typeName:""};Map=new Map;config;errors=[];schemaCache=new Map;referenceCache=new Map;templates={exportConst:e=>`export const ${e}`,typeDefinition:(e,t)=>`type ${e} = ${t}`,interfaceDefinition:e=>`interface ${e}`};constructor(e,t){this.pathsObject=e,this.config={...r,...t,typeMapping:new Map([...r.typeMapping||[],...t.typeMapping||[]])}}handleError(t){if(this.errors.push(t),this.config.errorHandling?.logErrors&&e.log.error(`${t.type}: ${t.message}${t.path?` at ${t.path}`:""}`),this.config.errorHandling?.throwOnError)throw new Error(`${t.type}: ${t.message}`)}getIndentation(){return this.config.formatting?.indentation||t}formatCode(e){const t=this.getIndentation(),n=this.config.formatting?.lineEnding||"\n";return e.split("\n").map((e=>`${t}${e}`)).join(n)}typeNameToFileName(e){return e=(e=(e=e.replace(/_/g,"-")).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()).replace(/-+/g,"-")}handleComplexType(e){try{return e.oneOf?e.oneOf.map((e=>this.schemaParse(e))).join(" | "):e.allOf?e.allOf.map((e=>this.schemaParse(e))).join(" & "):e.anyOf?e.anyOf.map((e=>this.schemaParse(e))).join(" | "):e.enum?"number"===e.type||"integer"===e.type?e.enum.join(" | "):e.enum.map((e=>`'${e}'`)).join(" | "):"unknown"}catch(e){return this.handleError({type:"SCHEMA",message:"Failed to handle complex type",details:e}),"unknown"}}propertiesParse(e){const n=[];for(const r in e){const s=e[r],a=this.schemaParse(s);let o="";o=Array.isArray(a)?`${t}${t}${r}:{${a.join("\n")}};`:`${t}${t}${r}:${a};`,n.push(o)}return n}nonArraySchemaObjectParse(e){if(!e)return"unknown";switch(e.type){case"boolean":return"boolean";case"integer":case"number":return"number";case"object":return this.propertiesParse(e.properties);case"string":return"binary"===e.format?"File":"string";default:return"unknown"}}arraySchemaObjectParse(e){if("array"!==e.type)return"";const{items:t}=e,n="$ref"in t?t:null,r=t;if(n){return`Array<${this.referenceObjectParse(n)}>`}if(r){const e=this.schemaParse(t);return Array.isArray(e)?`Array<{${e.join("\n")}}>`:`Array<${e}>`}return""}referenceObjectParse(e){try{const t=e.$ref,n=this.referenceCache.get(t);if(n)return n;let r=t;t.startsWith("#/components/schemas/")?r=t.replace("#/components/schemas/",""):t.startsWith("#/definitions/")&&(r=t.replace("#/definitions/",""));const s=`import('../models/${this.typeNameToFileName(r)}').${r}`;return this.referenceCache.set(t,s),s}catch(e){return this.handleError({type:"REFERENCE",message:"Failed to parse reference object",details:e}),"unknown"}}schemaParse(e){try{if(!e)return"unknown";if("oneOf"in e||"allOf"in e||"anyOf"in e||"enum"in e)return this.handleComplexType(e);if("$ref"in e)return this.referenceObjectParse(e);const t=e,n=t.type,r=!0===t.nullable?" | null":"";if(n&&this.config.typeMapping?.has(n))return this.config.typeMapping.get(n)+r;if("array"===n&&t.items){return`Array<${this.schemaParse(t.items)}>`+r}if("object"===n){if(t.properties){const e=this.propertiesParse(t.properties);return e.length?e:["unknown"]}if(!0===t.additionalProperties)return"Record<string, unknown>"+r;if("object"==typeof t.additionalProperties){return`Record<string, ${this.schemaParse(t.additionalProperties)}>`+r}}return"unknown"}catch(e){return this.handleError({type:"SCHEMA",message:"Failed to parse schema",details:e}),"unknown"}}responseObjectParse(e){try{const t=e.content;if(!t)return"";const n=["application/json","text/json","text/plain","*/*"];let r;for(const e of n)if(t[e]?.schema){r=t[e].schema;break}return r?this.schemaParse(r):""}catch(e){return this.handleError({type:"RESPONSE",message:"Failed to parse response object",details:e}),""}}responseHandle(e){const t=e[200];if(!t)return;const n="content"in t?t:null,r="$ref"in t?t:null;if(null===n&&null===r&&(this.contentBody.response="type Response = unknown",this.contentBody._response="unknown"),r){const e=this.referenceObjectParse(r);this.contentBody.response=`type Response = ${e}`,this.contentBody._response=e}if(n){const e=this.responseObjectParse(n);Array.isArray(e)?(this.contentBody.response=`interface Response {${e.join("\n")}} `,this.contentBody._response=`${e.join("\n")}`):(this.contentBody.response=`type Response = ${e}`,this.contentBody._response=`${e}`)}}requestBodyObjectParse(e){const n=Object.values(e.content),{schema:r}=n[0]||{schema:null};if(r){const e=r?.type,n="$ref"in r?r:null,s="array"===e?r:null,a=e&&this.nonArrayType.includes(e)?r:null;if(n){const e=this.referenceObjectParse(n);return`${t}type Body = ${e}`}if(s){const e=this.arraySchemaObjectParse(s);return`${t}type Body = ${e}`}if(a){const e=this.nonArraySchemaObjectParse(a);return Array.isArray(e)?0===e.length?[`${t}type Body = unknown`]:[`${t}interface Body {`,...e,"}"]:[`${t}type Body = ${e}`]}}}requestBodyParse(e){if(!e)return"{}";const n="$ref"in e?e:null,r="content"in e?e:null;if(n){const e=this.referenceObjectParse(n);return`${t}type Body = ${e}`}return r&&"[object Object]"===String(e)&&0!==Reflect.ownKeys(e).length?this.requestBodyObjectParse(r):"{}"}requestParametersParse(n){const r=[],s=[];n?.map((n=>{const a="$ref"in n?n:null,o="name"in n?n:null;if(a){const t=this.referenceObjectParse(a);return e.log.warning(`${this.pathKey} ${t} item 是 ReferenceObject 类型 ----未处理---`),t}if(o){if("path"===o.in){const e=this.schemaParse(o.schema);r.push(`${t}${t}type ${o.name} = ${e};`),this.contentBody.payload._path?"string"==typeof e?this.contentBody.payload._path[o.name]=e:console.log("Unexpected v2value type:",e):"string"==typeof e?this.contentBody.payload._path={[o.name]:e}:console.log("Unexpected v2value type:",e)}if("query"===o.in){const e=this.schemaParse(o.schema);s.push(`${t}${t}${o.name}: ${e};`),this.contentBody.payload._query?"string"==typeof e?this.contentBody.payload._query[o.name]=e:console.log("Unexpected v2value type:",e):"string"==typeof e?this.contentBody.payload._query={[o.name]:e}:console.log("Unexpected v2value type:",e)}}})),0!==r.length&&(r.unshift(`${t}namespace Path {`),r.push(`${t}}`)),0!==s.length&&(s.unshift(`${t}interface Query {`),s.push(`${t}}`)),this.contentBody.payload.path=r,this.contentBody.payload.query=s}requestHandle(e){if(e.parameters&&this.requestParametersParse(e.parameters),e.requestBody){const t=this.requestBodyParse(e.requestBody);if(Array.isArray(t))this.contentBody.payload.body=t;else if(t){const e=t?.split("\n")||[];this.contentBody.payload.body=e}}}apiRequestItemHandle(e){const{payload:t,requestPath:n,_response:r,method:s,typeName:a,apiName:o}=e,{_path:i,_query:p,body:c}=t,h=c.some((e=>e.includes("File:")||e.includes(": File"))),l=e=>{const t=[];for(const n in e)t.push(`${n}: ${a}.Path.${n}`);return t.length>1?t.join(","):t.join("")},y=i?l(i):"",u=p?`params: ${a}.Query`:"",d=c.length>0?`params: ${a}.Body`:"",m={};y&&(m.apiParamsPath=y),u&&(m.apiParamsQuery=u),d&&(m.apiParamsBody=d);const f=Object.keys(m).length>=2,g=h?",'serve'":"",$=h?", { headers: { 'Content-Type': 'multipart/form-data' } }":"";return[`export const ${o} = `,"(",i?l(i):"",""+(f?",":""),p?`params: ${a}.Query`:"",c.length>0?`params: ${a}.Body`:"",")"," => ",`${s}${r?`<${a}.Response>`:""}`,"(`"+n+"`"+(u||d?", params":"")+g+$+");"].join("")}parsePathItemObject(e,t){if(e)for(const n in e){const r=e[n];if(r){const e=n.toUpperCase(),s=t+"|"+e,{apiName:a,typeName:o,fileName:i,path:p}=this.convertEndpointString(s);this.contentBody={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:i,method:e,typeName:o,requestPath:p,apiName:a,summary:r.summary},this.requestHandle(r),this.responseHandle(r.responses),this.Map.has(s)||this.Map.set(s,JSON.parse(JSON.stringify(this.contentBody)))}}}convertEndpointString(e){let t=e;e.startsWith("/")||(t="/"+e);const[n,r]=t.split("|"),s=`${n.replace("/api/","").split("/").map((e=>e.includes("{")?`$${e.slice(1,-1)}`:e.charAt(0).toUpperCase()+e.slice(1))).join("")}_${r}`;return{apiName:s.charAt(0).toLowerCase()+s.slice(1),fileName:(n.slice(1).replace(/\//g,"-").replace("api-","")+"-"+r).toLowerCase(),typeName:s.charAt(0).toUpperCase()+s.slice(1),path:n.replace(/(\/api)|(api)/g,"").replace(/\{\w+\}/g,(e=>`$${e}`))}}parseData(){return new Promise(((e,t)=>{try{for(const e in this.pathsObject){const t=this.pathsObject[e];t&&this.parsePathItemObject(t,e)}e(this.Map)}catch(e){this.handleError({type:"SCHEMA",message:"Failed to parse schema",details:e}),t(e)}}))}async writeFile(){const n=[],r=[],s=this.config.saveTypeFolderPath,a=[],o=(n,o)=>new Promise(((i,p)=>{try{const{payload:c,response:h,fileName:l,summary:y,typeName:u}=o,[,d]=n.split("|");!a.includes(d)&&a.push(d);const m=[`declare namespace ${u} {`,...c.path,...c.query,...c.body,`${t}${h}`,"}"];y&&r.push(["/**","\n",` * ${y}`,"\n"," */"].join(""));const f=this.apiRequestItemHandle(o);r.push(f,"\n"),e.writeFileRecursive(`${s}/api/${l}.d.ts`,m.join("\n")).then((()=>i(1))).catch((e=>{this.handleError({type:"FILE_WRITE",message:"Failed to write type definition file",path:l,details:e}),p(e)}))}catch(e){this.handleError({type:"PATH",message:"Failed to process path item",path:n,details:e}),p(e)}}));for(const[e,t]of this.Map)n.push(o(e,t));try{await Promise.all(n),r.unshift(`import { ${a.join(", ")} } from '${this.config.requestMethodsImportPath||"./api"}';`,"\n"),await e.clearDir(this.config.apiListFilePath+"/index.ts"),await e.writeFileRecursive(this.config.apiListFilePath+"/index.ts",r.join("\n")),this.Map=new Map,this.errors.length>0&&e.log.warning(`Completed with ${this.errors.length} errors`)}catch(e){throw this.handleError({type:"FILE_WRITE",message:"Failed to write API list file",details:e}),e}}async handle(){try{await this.parseData(),await this.writeFile(),e.log.success("Path parse & write done!")}catch(e){if(this.handleError({type:"SCHEMA",message:"Failed to handle schema",details:e}),this.config.errorHandling?.throwOnError)throw e}}}exports.PathParse=s,exports.default=s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";var r;!function(e){e.GET="get",e.PUT="put",e.POST="post",e.DELETE="delete",e.OPTIONS="options",e.HEAD="head",e.PATCH="patch",e.TRACE="trace"}(r||(r={}));const n={typeMapping:new Map([["integer","number"],["string","string"],["boolean","boolean"],["binary","File"]]),errorHandling:{throwOnError:!1,logErrors:!0}};class s{pathsObject={};nonArrayType=["boolean","object","number","string","integer"];pathKey="";contentBody={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:"",method:"",requestPath:"",summary:"",apiName:"",typeName:""};Map=new Map;config;errors=[];schemaCache=new Map;referenceCache=new Map;templates={exportConst:e=>`export const ${e}`,typeDefinition:(e,t)=>`type ${e} = ${t}`,interfaceDefinition:e=>`interface ${e}`};constructor(e,t){this.pathsObject=e,this.config={...n,...t,typeMapping:new Map([...n.typeMapping||[],...t.typeMapping||[]])}}handleError(t){if(this.errors.push(t),this.config.errorHandling?.logErrors&&e.log.error(`${t.type}: ${t.message}${t.path?` at ${t.path}`:""}`),this.config.errorHandling?.throwOnError)throw new Error(`${t.type}: ${t.message}`)}getIndentation(){return this.config.formatting?.indentation||t}formatCode(e){const t=this.getIndentation(),r=this.config.formatting?.lineEnding||"\n";return e.split("\n").map((e=>`${t}${e}`)).join(r)}typeNameToFileName(e){return e=(e=(e=e.replace(/_/g,"-")).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()).replace(/-+/g,"-")}handleComplexType(e){try{return e.oneOf?e.oneOf.map((e=>this.schemaParse(e))).join(" | "):e.allOf?e.allOf.map((e=>this.schemaParse(e))).join(" & "):e.anyOf?e.anyOf.map((e=>this.schemaParse(e))).join(" | "):e.enum?"number"===e.type||"integer"===e.type?e.enum.join(" | "):e.enum.map((e=>`'${e}'`)).join(" | "):"unknown"}catch(e){return this.handleError({type:"SCHEMA",message:"Failed to handle complex type",details:e}),"unknown"}}propertiesParse(e){const r=[];for(const n in e){const s=e[n],a=this.schemaParse(s);let i="";i=Array.isArray(a)?`${t}${t}${n}:{${a.join("\n")}};`:`${t}${t}${n}:${a};`,r.push(i)}return r}nonArraySchemaObjectParse(e){if(!e)return"unknown";if("binary"===e.format||"string"===e.type&&"binary"===e.format)return"File";switch(e.type){case"boolean":return"boolean";case"integer":case"number":return"number";case"object":return this.propertiesParse(e.properties);case"string":return"binary"===e.format?"File":"string";default:return"unknown"}}arraySchemaObjectParse(e){if("array"!==e.type)return"";const{items:t}=e,r="$ref"in t?t:null,n=t;if(r){return`Array<${this.referenceObjectParse(r)}>`}if(n){const e=this.schemaParse(t);return Array.isArray(e)?`Array<{${e.join("\n")}}>`:`Array<${e}>`}return""}referenceObjectParse(e){try{const t=e.$ref,r=this.referenceCache.get(t);if(r)return r;let n=t;t.startsWith("#/components/schemas/")?n=t.replace("#/components/schemas/",""):t.startsWith("#/definitions/")&&(n=t.replace("#/definitions/",""));const s=`import('../models/${this.typeNameToFileName(n)}').${n}`;return this.referenceCache.set(t,s),s}catch(e){return this.handleError({type:"REFERENCE",message:"Failed to parse reference object",details:e}),"unknown"}}schemaParse(e){try{if(!e)return"unknown";if("oneOf"in e||"allOf"in e||"anyOf"in e||"enum"in e)return this.handleComplexType(e);if("$ref"in e)return this.referenceObjectParse(e);const t=e,r=t.type,n=!0===t.nullable?" | null":"";if(e.format&&this.config.typeMapping?.has(e.format))return this.config.typeMapping.get(e.format)+n;if(r&&this.config.typeMapping?.has(r))return this.config.typeMapping.get(r)+n;if("array"===r&&t.items){return`Array<${this.schemaParse(t.items)}>`+n}if("object"===r){if(t.properties){const e=this.propertiesParse(t.properties);return e.length?e:["unknown"]}if(!0===t.additionalProperties)return"Record<string, unknown>"+n;if("object"==typeof t.additionalProperties){return`Record<string, ${this.schemaParse(t.additionalProperties)}>`+n}}return"unknown"}catch(e){return this.handleError({type:"SCHEMA",message:"Failed to parse schema",details:e}),"unknown"}}responseObjectParse(e){try{const t=e.content;if(!t)return"";const r=["application/json","text/json","text/plain","*/*"];let n;for(const e of r)if(t[e]?.schema){n=t[e].schema;break}return n?this.schemaParse(n):""}catch(e){return this.handleError({type:"RESPONSE",message:"Failed to parse response object",details:e}),""}}responseHandle(e){const t=e[200];if(!t)return;const r="content"in t?t:null,n="$ref"in t?t:null;if(null===r&&null===n&&(this.contentBody.response="type Response = unknown",this.contentBody._response="unknown"),n){const e=this.referenceObjectParse(n);this.contentBody.response=`type Response = ${e}`,this.contentBody._response=e}if(r){const e=this.responseObjectParse(r);Array.isArray(e)?(this.contentBody.response=`interface Response {${e.join("\n")}} `,this.contentBody._response=`${e.join("\n")}`):(this.contentBody.response=`type Response = ${e}`,this.contentBody._response=`${e}`)}}requestBodyObjectParse(e){const r=Object.values(e.content),{schema:n}=r[0]||{schema:null};if(n){const e=n?.type,r="$ref"in n?n:null,s="array"===e?n:null,a=e&&this.nonArrayType.includes(e)?n:null;if(r){const e=this.referenceObjectParse(r);return`${t}type Body = ${e}`}if(s){const e=this.arraySchemaObjectParse(s);return`${t}type Body = ${e}`}if(a){const e=this.nonArraySchemaObjectParse(a);return Array.isArray(e)?0===e.length?[`${t}type Body = unknown`]:[`${t}interface Body {`,...e.map((e=>e.replace(/: string;/,": File;"))),"}"]:[`${t}type Body = ${e}`]}}}requestBodyParse(e){if(!e)return"{}";const r="$ref"in e?e:null,n="content"in e?e:null;if(r){const e=this.referenceObjectParse(r);return`${t}type Body = ${e}`}return n&&"[object Object]"===String(e)&&0!==Reflect.ownKeys(e).length?this.requestBodyObjectParse(n):"{}"}requestParametersParse(r){const n=[],s=[];r?.map((r=>{const a="$ref"in r?r:null,i="name"in r?r:null;if(a){const t=this.referenceObjectParse(a);return e.log.warning(`${this.pathKey} ${t} item 是 ReferenceObject 类型 ----未处理---`),t}if(i){if("path"===i.in){const e=this.schemaParse(i.schema);n.push(`${t}${t}type ${i.name} = ${e};`),this.contentBody.payload._path?"string"==typeof e?this.contentBody.payload._path[i.name]=e:console.log("Unexpected v2value type:",e):"string"==typeof e?this.contentBody.payload._path={[i.name]:e}:console.log("Unexpected v2value type:",e)}if("query"===i.in){const e=this.schemaParse(i.schema);s.push(`${t}${t}${i.name}: ${e};`),this.contentBody.payload._query?"string"==typeof e?this.contentBody.payload._query[i.name]=e:console.log("Unexpected v2value type:",e):"string"==typeof e?this.contentBody.payload._query={[i.name]:e}:console.log("Unexpected v2value type:",e)}}})),0!==n.length&&(n.unshift(`${t}namespace Path {`),n.push(`${t}}`)),0!==s.length&&(s.unshift(`${t}interface Query {`),s.push(`${t}}`)),this.contentBody.payload.path=n,this.contentBody.payload.query=s}requestHandle(e){if(e.parameters&&this.requestParametersParse(e.parameters),e.requestBody){const t=this.requestBodyParse(e.requestBody);if(Array.isArray(t))this.contentBody.payload.body=t;else if(t){const e=t?.split("\n")||[];this.contentBody.payload.body=e}}}apiRequestItemHandle(e){const{payload:t,requestPath:r,_response:n,method:s,typeName:a,apiName:i}=e,{_path:o,_query:p,body:c}=t,h=c.some((e=>e.includes("File:")||e.includes(": File"))),l=e=>{const t=[];for(const r in e)t.push(`${r}: ${a}.Path.${r}`);return t.length>1?t.join(","):t.join("")},y=o?l(o):"",u=p?`params: ${a}.Query`:"",d=c.length>0?`params: ${a}.Body`:"",m={};y&&(m.apiParamsPath=y),u&&(m.apiParamsQuery=u),d&&(m.apiParamsBody=d);const f=Object.keys(m).length>=2,g=h?",'serve'":"",$=h?", { headers: { 'Content-Type': 'multipart/form-data' } }":"";return[`export const ${i} = `,"(",o?l(o):"",""+(f?",":""),p?`params: ${a}.Query`:"",c.length>0?`params: ${a}.Body`:"",")"," => ",`${s}${n?`<${a}.Response>`:""}`,"(`"+r+"`"+(u||d?", params":"")+g+$+");"].join("")}parsePathItemObject(e,t){if(e)for(const r in e){const n=e[r];if(n){const e=r.toUpperCase(),s=t+"|"+e,{apiName:a,typeName:i,fileName:o,path:p}=this.convertEndpointString(s);this.contentBody={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:o,method:e,typeName:i,requestPath:p,apiName:a,summary:n.summary},this.requestHandle(n),this.responseHandle(n.responses),this.Map.has(s)||this.Map.set(s,JSON.parse(JSON.stringify(this.contentBody)))}}}convertEndpointString(e){let t=e;e.startsWith("/")||(t="/"+e);const[r,n]=t.split("|"),s=`${r.replace("/api/","").split("/").map((e=>e.includes("{")?`$${e.slice(1,-1)}`:e.charAt(0).toUpperCase()+e.slice(1))).join("")}_${n}`;return{apiName:s.charAt(0).toLowerCase()+s.slice(1),fileName:(r.slice(1).replace(/\//g,"-").replace("api-","")+"-"+n).toLowerCase(),typeName:s.charAt(0).toUpperCase()+s.slice(1),path:r.replace(/(\/api)|(api)/g,"").replace(/\{\w+\}/g,(e=>`$${e}`))}}parseData(){return new Promise(((e,t)=>{try{for(const e in this.pathsObject){const t=this.pathsObject[e];t&&this.parsePathItemObject(t,e)}e(this.Map)}catch(e){this.handleError({type:"SCHEMA",message:"Failed to parse schema",details:e}),t(e)}}))}async writeFile(){const r=[],n=[],s=this.config.saveTypeFolderPath,a=[],i=(r,i)=>new Promise(((o,p)=>{try{const{payload:c,response:h,fileName:l,summary:y,typeName:u}=i,[,d]=r.split("|");!a.includes(d)&&a.push(d);const m=[`declare namespace ${u} {`,...c.path,...c.query,...c.body,`${t}${h}`,"}"];y&&n.push(["/**","\n",` * ${y}`,"\n"," */"].join(""));const f=this.apiRequestItemHandle(i);n.push(f,"\n"),e.writeFileRecursive(`${s}/api/${l}.d.ts`,m.join("\n")).then((()=>o(1))).catch((e=>{this.handleError({type:"FILE_WRITE",message:"Failed to write type definition file",path:l,details:e}),p(e)}))}catch(e){this.handleError({type:"PATH",message:"Failed to process path item",path:r,details:e}),p(e)}}));for(const[e,t]of this.Map)r.push(i(e,t));try{await Promise.all(r),n.unshift(`import { ${a.join(", ")} } from '${this.config.requestMethodsImportPath||"./api"}';`,"\n"),await e.clearDir(this.config.apiListFilePath+"/index.ts"),await e.writeFileRecursive(this.config.apiListFilePath+"/index.ts",n.join("\n")),this.Map=new Map,this.errors.length>0&&e.log.warning(`Completed with ${this.errors.length} errors`)}catch(e){throw this.handleError({type:"FILE_WRITE",message:"Failed to write API list file",details:e}),e}}async handle(){try{await this.parseData(),await this.writeFile(),e.log.success("Path parse & write done!")}catch(e){if(this.handleError({type:"SCHEMA",message:"Failed to handle schema",details:e}),this.config.errorHandling?.throwOnError)throw e}}}exports.PathParse=s,exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../../data/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../../data/sau.json.js"),s=require("../utils/index.js"),a=require("./core/components.js"),r=require("./core/get-data.js"),o=require("./core/path.js"),i=require("shelljs"),n=require("chalk"),c=require("path");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=l(e),d=l(n),p=l(c);const f={saveTypeFolderPath:"apps/types",apiListFilePath:"apps/services",swaggerJsonUrl:"",requestMethodsImportPath:"./fetch",headers:{},formatting:{indentation:"\t",lineEnding:"\n"},dataLevel:"serve"};class u{schemas={};paths={};async handle(e){try{const s="development"===process.env.NODE_ENV?t.default:await r.getSwaggerJson(e);if(!s)throw new Error("无法获取 Swagger 数据");this.schemas=s.components?.schemas||{},this.paths=s.paths||{};const i=new a.default(this.schemas,e),n=new o.PathParse(this.paths,e);return await Promise.all([i.handle(),n.handle()]),!0}catch(e){if(e instanceof Error)throw new Error(`处理 Swagger 数据失败: ${e.message}`);throw new Error("处理 Swagger 数据失败: 未知错误")}}async formatGeneratedFiles(e){const t=`npx prettier --write "${e.saveTypeFolderPath}/**/*.{ts,d.ts}"`;try{await h.default.promises.access(e.saveTypeFolderPath);const{stderr:a}=await new Promise(((e,s)=>{i.exec(t,((t,a,r)=>{t?s(t):e({stdout:a,stderr:r})}))}));if(a)throw new Error(a);s.log.success("文件格式化成功")}catch(e){console.log(""),s.log.error("格式化失败,请手动执行以下命令:"),console.log("$",d.default.yellow(t)),console.log("")}}async initialize(){const e=process.cwd()+"/an.config.json";try{const t=await this.getConfig(e);await s.clearDir(t.saveTypeFolderPath),await this.handle(t),await this.formatGeneratedFiles(t);const a=["config.ts","errror-message.ts","fetch.ts"],r=p.default.join(process.cwd(),"ajax-config"),o=t.apiListFilePath;for(const e of a){const t=p.default.join(r,e),a=p.default.join(o,e);try{await h.default.promises.access(a),s.log.info(`${e} 已存在,跳过生成.`)}catch{await h.default.promises.copyFile(t,a),console.log(`${e} 创建成功.`)}}}catch(e){const t=e instanceof Error?e.message:"未知错误";s.log.error(`初始化失败: ${t}`)}}async getConfig(e){try{const t=await h.default.promises.readFile(e,"utf8");return JSON.parse(t)}catch(t){return s.log.warning("配置文件不存在,将自动创建配置文件"),await s.clearDir(f.saveTypeFolderPath),await s.writeFileRecursive(e,JSON.stringify(f,null,2)),f}}}if("development"===process.env.NODE_ENV){(new u).initialize()}exports.Main=u;
|
package/package.json
CHANGED
package/lib/data/umf.json.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/manageGame/createGame":{post:{operationId:"ManageGameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDto"}}}},responses:{200:{description:"返回游戏列表",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGame"}}}}},tags:["Manage Game"]}},"/api/manageGame/gameList":{get:{operationId:"ManageGameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"返回游戏列表"}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/getGameConfig":{get:{operationId:"ManageGameController_getGameConfig",summary:"获取游戏的配置信息",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/Config"}}}}},tags:["Manage Game"]}},"/api/manageGame/rename":{post:{operationId:"ManageGameController_rename",summary:"游戏名称重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/delete":{post:{operationId:"ManageGameController_deleteFileOrDir",summary:"删除游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteGameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/relation":{get:{operationId:"ManageGameController_gameRelation",summary:"游戏与资源的关联",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully.",content:{"application/json":{schema:{$ref:"#/components/schemas/GameRelationVo"}}}}},tags:["Manage Game"]}},"/api/llm/{schema}/{type}/{id}/txt/v2":{get:{operationId:"LlmController_txtV2",summary:"Maas文生文",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/role/union":{get:{operationId:"LlmController_recommends",summary:"推荐角色信息",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/RecommendRoleDTO"}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{bgid}/category":{get:{operationId:"LlmController_recommendCategory",summary:"推荐背景分类",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"bgid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/timbre":{get:{operationId:"LlmController_recommendTimbre",summary:"推荐音色",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/image/upload":{post:{operationId:"LlmController_imageUpload",summary:"大模型图片上传接口",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ImageUploadDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/upload/text":{post:{operationId:"LlmController_uploadText",summary:"上传文本文件返回文本信息",parameters:[],responses:{201:{description:""}},tags:["LLM"]}},"/api/llm/extract/file":{post:{operationId:"LlmController_extractFile",summary:"提取文件内容",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ExtractFileDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/task":{get:{operationId:"LlmController_extractTask",summary:"获取AI提取任务",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/{id}/destroy":{delete:{operationId:"LlmController_extractDestroy",summary:"删除AI提取任务",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/add":{post:{operationId:"LlmController_extractAddRole",summary:"添加角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/update":{put:{operationId:"LlmController_extractUpdateRole",summary:"更新角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/{id}/del":{delete:{operationId:"LlmController_extractDelRole",summary:"删除角色",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/add":{post:{operationId:"LlmController_extractAddBg",summary:"添加背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/update":{put:{operationId:"LlmController_extractUpdateBg",summary:"更新背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/{id}/del":{delete:{operationId:"LlmController_extractDelBg",summary:"删除背景",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchUpdate":{put:{operationId:"LlmController_extractBatchUpdate",summary:"批量更新角色和背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchUpdateRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchConfirm":{post:{operationId:"LlmController_extractBatchConfirm",summary:"批量确认保存",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchConfirmRspDto"}}}}},tags:["LLM"]}},"/api/role/role":{post:{operationId:"RoleController_createRole",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Role"]}},"/api/role/list":{post:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],requestBody:{required:!0,description:"获取该用户下角色列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/update":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."}},tags:["Role"]}},"/api/role/batchUpdate":{put:{operationId:"RoleController_batchUpdateRole",summary:"批量更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/{rid}":{delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Bg"]}},"/api/bg/list":{post:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],requestBody:{required:!0,description:"获取背景信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/update":{put:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/batchUpdate":{put:{operationId:"BgController_batchUpdateBg",summary:"批量更新背景信息",parameters:[],requestBody:{required:!0,description:"批量更新背景信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}}},tags:["Bg"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Bg"]}},"/api/bgm/{category}/table":{get:{operationId:"BgmController_table",summary:"获取音乐库数据",parameters:[{name:"category",required:!0,in:"path",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BgmTableDto"}}}}},tags:["Bgm"]}},"/api/bgm/all":{get:{operationId:"BgmController_all",summary:"获取音乐搜索列表",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}}}}},tags:["Bgm"]}},"/api/bgm/link/scene":{post:{operationId:"BgmController_linkScene",summary:"音乐裁剪",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AudioCutDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bgm"]}},"/api/bgm/excelConvertDb":{post:{operationId:"BgmController_excelConvertDb",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/bgm/clearBgm":{post:{operationId:"BgmController_clearBgm",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/dict/{type}/{name}":{get:{operationId:"DictController_create",summary:"添加字典数据",parameters:[{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"name",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Dict"]}},"/api/dict/list":{get:{operationId:"DictController_findAll",summary:"字典列表",parameters:[],responses:{200:{description:""}},tags:["Dict"]}},"/api/editor/scene/add":{post:{operationId:"EditorController_addScenes",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Editor"]}},"/api/editor/scene":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/dialogue":{put:{operationId:"EditorController_editSceneDialogue",summary:"更新编辑器对话资源",parameters:[],requestBody:{required:!0,description:"更新编辑器对话资源",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/uiScene/resource":{put:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."}},tags:["Editor"]}},"/api/editor/scene/upload":{post:{operationId:"EditorController_uploadSceneDialogue",summary:"上传文本更新对话资源",parameters:[],requestBody:{required:!0,content:{"multipart/form-data":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/command/{id}":{post:{operationId:"EditorController_commandLine",summary:"根据行ID获取指令行",parameters:[{name:"id",required:!0,in:"path",description:"id",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/vocal/binding":{post:{operationId:"VocalController_binding",summary:"配音绑定",parameters:[],requestBody:{required:!0,description:"配音绑定",content:{"application/json":{schema:{$ref:"#/components/schemas/VocalBindingDto"}}}},responses:{201:{description:""}},tags:["Vocal"]}},"/api/vocal/record/{event}/{reqId}":{get:{operationId:"VocalController_record",summary:"获取配音结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Vocal"]}},"/api/vocal/ready/{gameName}/{sceneid}":{get:{operationId:"VocalController_getReadyVocalList",summary:"获取准备配音的列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}},{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}}},tags:["Vocal"]}},"/api/vocal/start/{sceneid}":{post:{operationId:"VocalController_startVocalList",summary:"开始批量配音任务",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要配音的数据",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}},responses:{201:{description:""}},tags:["Vocal"]}},"/api/vocal/batch/{sceneid}":{get:{operationId:"VocalController_getBatchVocal",summary:"获取正在配音列表",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchGenerateVocal"}}}}}},tags:["Vocal"]},post:{operationId:"VocalController_saveBatchVocal",summary:"保存配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["Vocal"]}},"/api/vocal/retry/{sceneid}":{put:{operationId:"VocalController_retryBatchVocal",summary:"重试单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要重试的配音",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}}}},responses:{200:{description:""}},tags:["Vocal"]}},"/api/vocal/batch/{sceneid}/{lineId}":{delete:{operationId:"VocalController_deleteLineVocalForBatchVocal",summary:"删除单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}},{name:"lineId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Vocal"]}},"/api/vocal/cancel/{sceneid}":{post:{operationId:"VocalController_cancelBatchVocal",summary:"取消配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["Vocal"]}},"/api/prop/add":{post:{operationId:"PropController_createProp",summary:"保存道具信息",parameters:[],requestBody:{required:!0,description:"保存道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Prop"]}},"/api/prop/list":{post:{operationId:"PropController_list",summary:"获取道具信息列表",parameters:[],requestBody:{required:!0,description:"获取道具信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindPropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/update":{put:{operationId:"PropController_updateProp",summary:"更新道具信息",parameters:[],requestBody:{required:!0,description:"更新道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/batchUpdate":{put:{operationId:"PropController_batchUpdateProp",summary:"批量更新道具信息",parameters:[],requestBody:{required:!0,description:"批量更新道具信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}}},tags:["Prop"]}},"/api/prop/remove/{id}":{delete:{operationId:"PropController_remove",summary:"删除道具信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Prop"]}},"/api/cg/add":{post:{operationId:"CgController_createCg",summary:"保存Cg信息",parameters:[],requestBody:{required:!0,description:"保存Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Cg"]}},"/api/cg/list":{post:{operationId:"CgController_list",summary:"获取Cg信息列表",parameters:[],requestBody:{required:!0,description:"获取Cg信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindCgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/update":{put:{operationId:"CgController_updateCg",summary:"更新Cg信息",parameters:[],requestBody:{required:!0,description:"更新Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Cg"]}},"/api/cg/batchUpdate":{put:{operationId:"CgController_batchUpdateCg",summary:"批量更新Cg信息",parameters:[],requestBody:{required:!0,description:"批量更新Cg信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/remove/{id}":{delete:{operationId:"CgController_remove",summary:"删除Cg信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cg"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasView"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/node/preview":{post:{operationId:"CanvasController_nodePreview",summary:"节点预览",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{200:{description:""}},tags:["Canvas"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameName}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/user/login":{post:{operationId:"UserController_login",summary:"用户登录",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{200:{description:"Successfully."}},tags:["User"]}},"/api/user":{post:{operationId:"UserController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{201:{description:""}},tags:["User"]}},"/api/auth/captcha":{get:{operationId:"AuthController_getCaptcha",summary:"获取图形验证码",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CaptchaRsp"}}}}},tags:["身份鉴权"]}}},r={title:"UMPAY.NETA Terre API",description:"API Refrence of UMPAY.NETA Terre Editor",version:"1.0",contact:{}},s=[],i=[],o={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},CreateGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},gameType:{type:"string",description:"游戏类型",enum:["solvePuzzles","otome"],default:"solvePuzzles"},renderMode:{type:"string",description:"编辑器模式"}},required:["gameName","sceneName","gameType","renderMode"]},Config:{type:"object",properties:{Game_name:{type:"string",description:"游戏名称"},Game_key:{type:"string",description:"游戏标识"},Package_name:{type:"string",description:"所属包名"},Description:{type:"string",description:"游戏描述"},Title_img:{type:"string",description:"标题背景"},Title_bgm:{type:"string",description:"标题背景音乐"},Game_Logo:{type:"string",description:"游戏LOGO"},Debug:{type:"string",description:""},GameNum:{type:"string",description:""},GameNum_Double:{type:"string",description:""},Render_mode:{type:"string",description:"编辑器模式"},Game_type:{type:"string",description:"游戏类型"},Start_node:{type:"string",description:"开始节点"}},required:["Game_name","Game_key","Package_name","Description","Title_img","Title_bgm","Game_Logo","Debug","GameNum","GameNum_Double","Render_mode","Game_type","Start_node"]},GameInfo:{type:"object",properties:{name:{type:"string",description:"游戏名称"},path:{type:"string",description:"游戏路径"},config:{description:"游戏配置",allOf:[{$ref:"#/components/schemas/Config"}]}},required:["name","path","config"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{type:"string",description:"进度状态",enum:["0","1","2","3"]},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},style:{type:"string",description:"背景风格",enum:["anime","romantic"]},original:{type:"string",description:"原文(背景描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"背景图片"},list:{description:"背景图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},word:{type:"string",description:"背景正向提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},category:{description:"背景分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},stage:{type:"string",description:"生成阶段",enum:["prompts","bg"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","word","tlmId","category","stage","progress"]},BatchBg:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},list:{description:"背景数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}},required:["progress","list"]},Frame:{type:"object",properties:{eyesHalfOpen:{type:"string",description:"半闭眼"},eyesClose:{type:"string",description:"闭眼"},mouthHalfOpen:{type:"string",description:"半张嘴"},mouthOpen:{type:"string",description:"张嘴"}},required:["eyesHalfOpen","eyesClose","mouthHalfOpen","mouthOpen"]},Category:{type:"object",properties:{categoryValue:{type:"string",description:"表情差分类别值(一级)"},categoryLabel:{type:"string",description:"表情差分类别标签(一级)"},value:{type:"string",description:"表情差分值(二级)"},label:{type:"string",description:"表情差分标签(二级)"}},required:["categoryValue","categoryLabel","value","label"]},Expression:{type:"object",properties:{url:{type:"string",description:"差分图片"},list:{description:"表情变体图",type:"array",items:{$ref:"#/components/schemas/Picture"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},category:{description:"差分类别",allOf:[{$ref:"#/components/schemas/Category"}]},applyGame:{description:"序列帧应用游戏列表",type:"array",items:{type:"string"}}},required:["url","list","frame","category","applyGame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},gender:{type:"string",description:"性别",enum:["male","female"]},style:{type:"string",description:"风格",enum:["anime","romantic"]},age:{type:"string",description:"年纪",enum:["child","adult","youth","elder"]},timbre:{type:"string",description:"音色"},original:{type:"string",description:"原文(角色描述)"},url:{type:"string",description:"主立绘图片"},list:{description:"备选角色变体",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"角色对应的大模型信息ID"},feature:{type:"string",description:"人格"},word:{type:"string",description:"角色正向提示词"},prompts:{type:"string",description:"提示词(修饰词)"},expressions:{description:"表情差分图",type:"array",items:{$ref:"#/components/schemas/Expression"}},stage:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["uid","id","name","gender","style","age","timbre","original","url","list","tlmId","feature","word","prompts","expressions","stage","progress"]},BatchRole:{type:"object",properties:{list:{description:"角色数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["list","progress"]},Title:{type:"object",properties:{column:{type:"string",description:"列标签"},name:{type:"string",description:"列名称"}},required:["column","name"]},BatchBgm:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},title:{description:"音乐表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{type:"object",description:"音乐数据"},more:{type:"object",description:"More"}},required:["progress","title","stock","more"]},BatchExtraction:{type:"object",properties:{bg:{description:"背景数据",allOf:[{$ref:"#/components/schemas/BatchBg"}]},role:{description:"角色数据",allOf:[{$ref:"#/components/schemas/BatchRole"}]},bgm:{description:"BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]},id:{type:"string",description:"批量提取ID"},uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名称"},type:{type:"string",description:"批处理类型",enum:["extract","picture"]}},required:["bg","role","bgm","progress","id","uid","gameName","type"]},CreateGame:{type:"object",properties:{gameList:{description:"游戏信息",type:"array",items:{$ref:"#/components/schemas/GameInfo"}},batch:{description:"批量提取任务",allOf:[{$ref:"#/components/schemas/BatchExtraction"}]}},required:["gameList","batch"]},RenameDto:{type:"object",properties:{source:{type:"string",description:"The source path of the file or directory to be renamed"},newName:{type:"string",description:"New name for renaming the file or directory"}},required:["source","newName"]},DeleteGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"}},required:["gameName"]},RoleRelation:{type:"object",properties:{id:{type:"string",description:"id"},name:{type:"string",description:"角色名字"},url:{type:"string",description:"地址"}},required:["id","name","url"]},GameRelationVo:{type:"object",properties:{role:{description:"角色关联信息",type:"array",items:{$ref:"#/components/schemas/RoleRelation"}}},required:["role"]},RecommendRoleDTO:{type:"object",properties:{features:{description:"推荐人格",type:"array",items:{type:"string"}},timbre:{type:"string",description:"推荐音色"}},required:["features","timbre"]},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},ExtractFileDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名"}},required:["gameName"]},IDRspDto:{type:"object",properties:{id:{type:"string",description:"ID"}},required:["id"]},BgmConfirm:{type:"object",properties:{column:{type:"string",description:"列名"},locationId:{description:"位置ID",type:"array",items:{type:"string"}}},required:["column","locationId"]},BatchBgRoleReqDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",type:"array",items:{$ref:"#/components/schemas/BgmConfirm"}}},required:["bg","role","bgm"]},BatchUpdateRspDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]}},required:["bg","role","bgm"]},IdNameDto:{type:"object",properties:{id:{type:"string",description:"ID"},name:{type:"string",description:"名称"}},required:["id","name"]},BatchConfirmRspDto:{type:"object",properties:{success:{description:"成功数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}},fail:{description:"失败数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}}},required:["success","fail"]},FindRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名称"}},required:["name"]},Remark:{type:"object",properties:{applyFrame:{description:"应用差分帧图",type:"array",items:{type:"string"}}},required:["applyFrame"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},list:{description:"备选图",type:"array",items:{type:"string"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},type:{type:"string",description:"资源类型",enum:["figure","background","bgm"]},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},category:{description:"分类",allOf:[{$ref:"#/components/schemas/Category"}]},remark:{description:"备注",allOf:[{$ref:"#/components/schemas/Remark"}]}},required:["name","path","list","frame","type","uid","pid","category","remark"]},UpdateResourceDto:{type:"object",properties:{}},FindBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"}},required:["name"]},StockColumnData:{type:"object",properties:{id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐相对地址"},locationId:{type:"string",description:"位置ID"},checked:{type:"boolean",description:"勾选"}},required:["id","name","url","locationId","checked"]},StockColumn:{type:"object",properties:{column:{type:"string",description:"列值"},data:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumnData"}}},required:["column","data"]},Stock:{type:"object",properties:{name:{type:"string",description:"行标签名称"},columns:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumn"}}},required:["name","columns"]},BgmTableDto:{type:"object",properties:{title:{description:"音乐库表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{description:"音乐库数据",type:"array",items:{$ref:"#/components/schemas/Stock"}}},required:["title","stock"]},BgmListDto:{type:"object",properties:{locationId:{type:"string",description:"位置ID"},id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐地址"},category:{type:"string",description:"音乐类型"}},required:["locationId","id","name","url","category"]},AudioCutDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名"},sceneName:{type:"string",description:"场景名称"},audio:{type:"string",description:"音乐名"},url:{type:"string",description:"音乐库地址"},loop:{type:"string",description:"是否循环"},volume:{type:"number",description:"音量0-100"},rate:{type:"number",description:"播放速度"}},required:["uid","gameName","sceneName","audio","url","loop","volume","rate"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},AddSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称"},sceneName:{description:"场景列表",type:"array",items:{type:"string"}}},required:["gameName","sectionName","sceneName"]},SceneDetailDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},sceneType:{type:"string",description:"场景类型"}},required:["gameName","sceneName","sceneType"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{type:"string",description:"角色性别",enum:["male","female"]},style:{type:"string",description:"角色风格",enum:["anime","romantic"]}},required:["id","emotion","name","gender","style"]},Vocal:{type:"object",properties:{hash:{type:"string",description:"hash"},timbre:{type:"string",description:"音色"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"}},required:["hash","timbre","vocal","url"]},Prop:{type:"object",properties:{id:{type:"string",description:"道具ID"},name:{type:"string",description:"道具名称"}},required:["id","name"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",description:"命令",items:{type:"string",enum:["narr","clp","bst","bgi","bgm","cg","cp"]}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]}},required:["id","content","command","role","vocal","prop"]},Figure:{type:"object",properties:{name:{type:"string",description:"立绘名称"},path:{type:"string",description:"图片路径"}},required:["name","path"]},BgmVO:{type:"object",properties:{audio:{type:"string",description:"音乐"},url:{type:"string",description:"URL"},loop:{type:"boolean",description:"是否循环",default:!0},volume:{type:"number",description:"音量0-100",default:100},rate:{type:"number",description:"播放速度",default:1}},required:["audio","url","loop","volume","rate"]},SceneDetailRsp:{type:"object",properties:{scene:{type:"string",description:"场景文件名"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}},figures:{description:"立绘信息(拥有资源的角色)",type:"array",items:{$ref:"#/components/schemas/Figure"}},bg:{type:"string",description:"背景"},cg:{type:"string",description:"CG"},bgm:{description:"音乐",allOf:[{$ref:"#/components/schemas/BgmVO"}]},isBatchVocal:{type:"boolean",description:"批量配音"},recommendBgm:{description:"推荐音乐",type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}},required:["scene","dialogues","figures","bg","cg","bgm","isBatchVocal","recommendBgm"]},SceneReq:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}}},required:["gameName","sceneName","dialogues"]},UpdateUiResourceDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},bg:{type:"string",description:"更新背景"},cg:{type:"string",description:"更新CG"},clearBg:{type:"boolean",description:"清除背景"},clearCg:{type:"boolean",description:"清除CG"}},required:["gameName","sceneName","bg","cg","clearBg","clearCg"]},SceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"}},required:["gameName","sceneName"]},VocalBindingDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},id:{type:"string",description:"行标识"},timbre:{type:"string",description:"音色"},url:{type:"string",description:"配音相对地址"}},required:["gameName","sceneName","id","timbre","url"]},VocalUntieDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},id:{type:"string",description:"行标识"},url:{type:"string",description:"解绑配音相对地址"}},required:["gameName","sceneName","id","url"]},VocalBaseLineDTO:{type:"object",properties:{lineId:{type:"string",description:"行标识"},content:{type:"string",description:"行内容"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},timbre:{type:"string",description:"音色"}},required:["lineId","content","category","categoryLabel","emotion","timbre"]},VocalReadyDTO:{type:"object",properties:{subject:{type:"string",description:"角色名/旁白"},subjectId:{type:"string",description:"角色名ID/narr"},timbre:{type:"string",description:"音色ID"},style:{type:"string",description:"风格"},vocals:{description:"剧本语句",type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}},required:["subject","subjectId","timbre","style","vocals"]},LineVocal:{type:"object",properties:{lineId:{type:"string",description:"行ID"},content:{type:"string",description:"行内容"},hash:{type:"string",description:"hash"},style:{type:"string",description:"角色风格"},timbre:{type:"string",description:"音色"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["lineId","content","hash","style","timbre","category","categoryLabel","emotion","vocal","url","progress"]},BatchVocal:{type:"object",properties:{vocals:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/LineVocal"}},subject:{type:"string",description:"主题"}},required:["vocals","subject"]},BatchGenerateVocal:{type:"object",properties:{batchs:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/BatchVocal"}},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["batchs","progress"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},style:{type:"string",description:"道具风格",enum:["anime","romantic"]},original:{type:"string",description:"原文(道具描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"道具图片"},list:{description:"道具图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"道具对应大模型输出ID"},category:{description:"道具分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},size:{type:"string",description:"道具大小",example:"middle"},stage:{type:"string",description:"生成阶段",enum:["prompts","prop"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},style:{type:"string",description:"Cg风格"},original:{type:"string",description:"原文(Cg描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"Cg对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"Cg图片"},list:{description:"Cg图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},stage:{type:"string",description:"生成阶段",enum:["prompts","cg"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","list","stage","progress"]},FindCgDto:{type:"object",properties:{name:{type:"string",description:"Cg名称"}},required:["name"]},Variable:{type:"object",properties:{id:{type:"string"},alias:{type:"string"},name:{type:"string"}},required:["id","alias","name"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{type:"string"}},required:["value","exp"]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量ID"},alias:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","alias","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{type:"string",description:"类型"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"},type:{type:"string"}},required:["id","msg","type"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",allOf:[{$ref:"#/components/schemas/Valid"}]},scene:{description:"场景报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},branch:{description:"节点报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},edge:{description:"边报错集",allOf:[{$ref:"#/components/schemas/Valid"}]}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["gameName","nodes","edges"]},CanvasView:{type:"object",properties:{canvas:{description:"节点信息",allOf:[{$ref:"#/components/schemas/CanvasBody"}]},valid:{description:"校验信息",allOf:[{$ref:"#/components/schemas/ValidateCanvas"}]}},required:["canvas","valid"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},CreateUserDto:{type:"object",properties:{_id:{type:"string",description:"ID"},username:{type:"string",description:"用户名"},password:{type:"string",description:"密码"},nickname:{type:"string",description:"昵称(可选填)"},caId:{type:"string",description:"验证码ID"},captcha:{type:"string",description:"用户输入验证码"},secret:{type:"string",description:""}},required:["_id","username","password","nickname","caId","captcha","secret"]},CaptchaRsp:{type:"object",properties:{id:{type:"string",description:"id"},data:{type:"string",description:"svg image"}},required:["id","data"]}}},a={openapi:e,paths:t,info:r,tags:s,servers:i,components:o};exports.components=o,exports.default=a,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=i,exports.tags=s;
|