@manycore/custom-sdk 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +48 -6
  2. package/index.js +11 -11
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -167,6 +167,11 @@ export declare class Application {
167
167
  };
168
168
  }
169
169
 
170
+ /**
171
+ * @vm-type UnknownType
172
+ */
173
+ declare type AugmentedOptional<T extends object, K extends keyof T = keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
174
+
170
175
  /**
171
176
  * @vm-type UnknownType
172
177
  */
@@ -224,6 +229,7 @@ export declare class CustomModelService extends BaseService {
224
229
  getAllCustomModels(): Promise<IParamModelLite[]>;
225
230
  /**
226
231
  * 根据id获取指定模型
232
+ * @warning 数据来源于当前拆单环境的模型数据,和设计工具模型数据不一定同步,请谨慎使用
227
233
  * @param id 模型id
228
234
  * @returns Promise<IParamModelLite | undefined>
229
235
  */
@@ -237,6 +243,7 @@ export declare class CustomModelService extends BaseService {
237
243
  * // 保存模型改动
238
244
  * ModelService.save({ models: [model] }});
239
245
  * ```
246
+ * @warning 保存的模型改动仅生效于拆单环境的模型,请谨慎使用
240
247
  * @param option
241
248
  * @returns Promise<void>
242
249
  */
@@ -1622,7 +1629,7 @@ export declare class FittingDesignService extends BaseService {
1622
1629
  * 孔槽数据
1623
1630
  * @vm-type UnknownType
1624
1631
  */
1625
- export declare interface IFittingDataV2<WithId extends boolean = false> {
1632
+ export declare interface IFittingDataV2<WithRequiredId extends boolean = false> {
1626
1633
  /**
1627
1634
  * 孔槽关联的商品id
1628
1635
  */
@@ -1630,11 +1637,11 @@ export declare class FittingDesignService extends BaseService {
1630
1637
  /**
1631
1638
  * 孔的集合
1632
1639
  */
1633
- holes?: Array<WithId extends true ? IHoleDataV2WithId : IHoleDataV2>;
1640
+ holes?: Array<WithRequiredId extends true ? IHoleDataV2WithId : IHoleDataV2WithOptionalId_2>;
1634
1641
  /**
1635
1642
  * 槽的集合
1636
1643
  */
1637
- grooves?: Array<WithId extends true ? IGrooveDataV2WithId : IGrooveDataV2>;
1644
+ grooves?: Array<WithRequiredId extends true ? IGrooveDataV2WithId : IGrooveDataV2WithOptionalId_2>;
1638
1645
  }
1639
1646
 
1640
1647
  /**
@@ -1667,7 +1674,7 @@ export declare class FittingDesignService extends BaseService {
1667
1674
  * 孔槽方案数据
1668
1675
  * @vm-type UnknownType
1669
1676
  */
1670
- export declare interface IFittingDesignDataV2<WithId extends boolean = false> {
1677
+ export declare interface IFittingDesignDataV2<WithRequiredId extends boolean = false> {
1671
1678
  /**
1672
1679
  * 方案关联的顶层模型id
1673
1680
  */
@@ -1675,7 +1682,7 @@ export declare class FittingDesignService extends BaseService {
1675
1682
  /**
1676
1683
  * 孔槽方案
1677
1684
  */
1678
- fittingDesign: Array<IFittingDataV2<WithId>>;
1685
+ fittingDesign: Array<IFittingDataV2<WithRequiredId>>;
1679
1686
  }
1680
1687
 
1681
1688
  export declare interface IFittingDesignValidateResult {
@@ -1799,6 +1806,16 @@ export declare class FittingDesignService extends BaseService {
1799
1806
  setHidden(isHidden: boolean): void;
1800
1807
  }
1801
1808
 
1809
+ /**
1810
+ * 孔/槽加工工艺
1811
+ */
1812
+ declare interface IFittingProcessingTechnology {
1813
+ /**
1814
+ * 刀具编号
1815
+ */
1816
+ toolNo?: string;
1817
+ }
1818
+
1802
1819
  /**
1803
1820
  * 影响孔槽渲染的属性
1804
1821
  */
@@ -2025,6 +2042,10 @@ export declare class FittingDesignService extends BaseService {
2025
2042
  * 名称
2026
2043
  */
2027
2044
  name: string;
2045
+ /**
2046
+ * 孔/槽的加工工艺
2047
+ */
2048
+ processingTechnology?: IFittingProcessingTechnology;
2028
2049
  }
2029
2050
 
2030
2051
  export declare type IGrooveDataV2WithId = IGrooveDataV2 & IGrooveId;
@@ -2033,6 +2054,11 @@ export declare class FittingDesignService extends BaseService {
2033
2054
  grooveId?: string;
2034
2055
  }
2035
2056
 
2057
+ /**
2058
+ * @vm-type UnknownType
2059
+ */
2060
+ declare type IGrooveDataV2WithOptionalId_2 = AugmentedOptional<IGrooveDataV2WithId, 'grooveId'>;
2061
+
2036
2062
  declare interface IGrooveId {
2037
2063
  /**
2038
2064
  * 槽ID
@@ -2224,6 +2250,10 @@ export declare class FittingDesignService extends BaseService {
2224
2250
  * 名称
2225
2251
  */
2226
2252
  name: string;
2253
+ /**
2254
+ * 孔/槽的加工工艺
2255
+ */
2256
+ processingTechnology?: IFittingProcessingTechnology;
2227
2257
  }
2228
2258
 
2229
2259
  export declare interface IHoleDataV2WithId extends IHoleDataV2 {
@@ -2237,6 +2267,11 @@ export declare class FittingDesignService extends BaseService {
2237
2267
  holeId?: string;
2238
2268
  }
2239
2269
 
2270
+ /**
2271
+ * @vm-type UnknownType
2272
+ */
2273
+ declare type IHoleDataV2WithOptionalId_2 = AugmentedOptional<IHoleDataV2WithId, 'holeId'>;
2274
+
2240
2275
  /**
2241
2276
  * 交接信息
2242
2277
  */
@@ -2611,6 +2646,13 @@ export declare class FittingDesignService extends BaseService {
2611
2646
  * @typedef Number3
2612
2647
  */
2613
2648
  readonly size: Number3;
2649
+ /**
2650
+ * 模型版本信息
2651
+ * @readonly
2652
+ * @public
2653
+ * @typedef number
2654
+ */
2655
+ readonly version: number;
2614
2656
  /**
2615
2657
  * 获取当前模型的产品编码
2616
2658
  * 此字段相当于json输出中『modelBrandGoodCode』字段
@@ -2978,7 +3020,7 @@ export declare class FittingDesignService extends BaseService {
2978
3020
  * 设置槽
2979
3021
  * 全量替换原有的槽
2980
3022
  */
2981
- setSlots(holes: ISlotData[]): void;
3023
+ setSlots(slots: ISlotData[]): void;
2982
3024
  }
2983
3025
 
2984
3026
  /**