repzo 1.0.72 → 1.0.74

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.
package/lib/index.d.ts CHANGED
@@ -499,6 +499,65 @@ export default class Repzo {
499
499
  id: Service.CustomStatus.Remove.ID
500
500
  ) => Promise<Service.CustomStatus.Remove.Result>;
501
501
  };
502
+ customList: {
503
+ _path: string;
504
+ find: (
505
+ params?: Service.CustomList.Find.Params
506
+ ) => Promise<Service.CustomList.Find.Result>;
507
+ get: (
508
+ id: Service.CustomList.Get.ID,
509
+ params?: Service.CustomList.Get.Params
510
+ ) => Promise<Service.CustomList.Get.Result>;
511
+ create: (
512
+ body: Service.CustomList.Create.Body
513
+ ) => Promise<Service.CustomList.Create.Result>;
514
+ update: (
515
+ id: Service.CustomList.Update.ID,
516
+ body: Service.CustomList.Update.Body
517
+ ) => Promise<Service.CustomList.Update.Result>;
518
+ remove: (
519
+ id: Service.CustomList.Remove.ID
520
+ ) => Promise<Service.CustomList.Remove.Result>;
521
+ };
522
+ customListItem: {
523
+ _path: string;
524
+ find: (
525
+ params?: Service.CustomListItem.Find.Params
526
+ ) => Promise<Service.CustomListItem.Find.Result>;
527
+ get: (
528
+ id: Service.CustomListItem.Get.ID,
529
+ params?: Service.CustomListItem.Get.Params
530
+ ) => Promise<Service.CustomListItem.Get.Result>;
531
+ create: (
532
+ body: Service.CustomListItem.Create.Body
533
+ ) => Promise<Service.CustomListItem.Create.Result>;
534
+ update: (
535
+ id: Service.CustomListItem.Update.ID,
536
+ body: Service.CustomListItem.Update.Body
537
+ ) => Promise<Service.CustomListItem.Update.Result>;
538
+ remove: (
539
+ id: Service.CustomListItem.Remove.ID
540
+ ) => Promise<Service.CustomListItem.Remove.Result>;
541
+ };
542
+ inventoryAdjustmentReason: {
543
+ _path: string;
544
+ find: (
545
+ params?: Service.InventoryAdjustmentReason.Find.Params
546
+ ) => Promise<Service.InventoryAdjustmentReason.Find.Result>;
547
+ get: (
548
+ id: Service.InventoryAdjustmentReason.Get.ID
549
+ ) => Promise<Service.InventoryAdjustmentReason.Get.Result>;
550
+ create: (
551
+ body: Service.InventoryAdjustmentReason.Create.Body
552
+ ) => Promise<Service.InventoryAdjustmentReason.Create.Result>;
553
+ update: (
554
+ id: Service.InventoryAdjustmentReason.Update.ID,
555
+ body: Service.InventoryAdjustmentReason.Update.Body
556
+ ) => Promise<Service.InventoryAdjustmentReason.Update.Result>;
557
+ remove: (
558
+ id: Service.InventoryAdjustmentReason.Remove.ID
559
+ ) => Promise<Service.InventoryAdjustmentReason.Remove.Result>;
560
+ };
502
561
  workorder: {
503
562
  _path: string;
504
563
  find: (
package/lib/index.js CHANGED
@@ -1035,6 +1035,128 @@ export default class Repzo {
1035
1035
  return res;
1036
1036
  },
1037
1037
  };
1038
+ this.customList = {
1039
+ _path: "/custom-list",
1040
+ find: async (params) => {
1041
+ let res = await this._fetch(
1042
+ this.svAPIEndpoint,
1043
+ this.customList._path,
1044
+ params
1045
+ );
1046
+ return res;
1047
+ },
1048
+ get: async (id, params) => {
1049
+ return await this._fetch(
1050
+ this.svAPIEndpoint,
1051
+ this.customList._path + `/${id}`,
1052
+ params
1053
+ );
1054
+ },
1055
+ create: async (body) => {
1056
+ let res = await this._create(
1057
+ this.svAPIEndpoint,
1058
+ this.customList._path,
1059
+ body
1060
+ );
1061
+ return res;
1062
+ },
1063
+ update: async (id, body) => {
1064
+ let res = await this._update(
1065
+ this.svAPIEndpoint,
1066
+ this.customList._path + `/${id}`,
1067
+ body
1068
+ );
1069
+ return res;
1070
+ },
1071
+ remove: async (id) => {
1072
+ let res = await this._delete(
1073
+ this.svAPIEndpoint,
1074
+ this.customList._path + `/${id}`
1075
+ );
1076
+ return res;
1077
+ },
1078
+ };
1079
+ this.customListItem = {
1080
+ _path: "/custom-list-item",
1081
+ find: async (params) => {
1082
+ let res = await this._fetch(
1083
+ this.svAPIEndpoint,
1084
+ this.customListItem._path,
1085
+ params
1086
+ );
1087
+ return res;
1088
+ },
1089
+ get: async (id, params) => {
1090
+ return await this._fetch(
1091
+ this.svAPIEndpoint,
1092
+ this.customListItem._path + `/${id}`,
1093
+ params
1094
+ );
1095
+ },
1096
+ create: async (body) => {
1097
+ let res = await this._create(
1098
+ this.svAPIEndpoint,
1099
+ this.customListItem._path,
1100
+ body
1101
+ );
1102
+ return res;
1103
+ },
1104
+ update: async (id, body) => {
1105
+ let res = await this._update(
1106
+ this.svAPIEndpoint,
1107
+ this.customListItem._path + `/${id}`,
1108
+ body
1109
+ );
1110
+ return res;
1111
+ },
1112
+ remove: async (id) => {
1113
+ let res = await this._delete(
1114
+ this.svAPIEndpoint,
1115
+ this.customListItem._path + `/${id}`
1116
+ );
1117
+ return res;
1118
+ },
1119
+ };
1120
+ this.inventoryAdjustmentReason = {
1121
+ _path: "/inventory-adjustment-reason",
1122
+ find: async (params) => {
1123
+ let res = await this._fetch(
1124
+ this.svAPIEndpoint,
1125
+ this.inventoryAdjustmentReason._path,
1126
+ params
1127
+ );
1128
+ return res;
1129
+ },
1130
+ get: async (id) => {
1131
+ return await this._fetch(
1132
+ this.svAPIEndpoint,
1133
+ this.inventoryAdjustmentReason._path + `/${id}`
1134
+ );
1135
+ },
1136
+ create: async (body) => {
1137
+ let res = await this._create(
1138
+ this.svAPIEndpoint,
1139
+ this.inventoryAdjustmentReason._path,
1140
+ body
1141
+ );
1142
+ return res;
1143
+ },
1144
+ update: async (id, body) => {
1145
+ let res = await this._update(
1146
+ this.svAPIEndpoint,
1147
+ this.customListItem._path + `/${id}`,
1148
+ body
1149
+ );
1150
+ return res;
1151
+ },
1152
+ remove: async (id) => {
1153
+ let res = await this._delete(
1154
+ this.svAPIEndpoint,
1155
+ this.inventoryAdjustmentReason._path + `/${id}`
1156
+ );
1157
+ return res;
1158
+ },
1159
+ };
1038
1160
  this.workorder = {
1039
1161
  _path: "/workorder",
1040
1162
  find: async (params) => {
@@ -3556,6 +3556,255 @@ export declare namespace Service {
3556
3556
  }
3557
3557
  export {};
3558
3558
  }
3559
+ namespace CustomList {
3560
+ interface EndPoint {
3561
+ _id?: string;
3562
+ is_read?: boolean;
3563
+ input_type?: "List";
3564
+ render_key?: string;
3565
+ filter_key?: "_id";
3566
+ type?: "String" | "Array" | "Number" | "Boolean";
3567
+ path?: string;
3568
+ method?: "get" | "post" | "put" | "patch" | "delete";
3569
+ body?: {
3570
+ [key: string]: any;
3571
+ };
3572
+ search?: boolean;
3573
+ multi_select?: boolean;
3574
+ }
3575
+ interface Source {
3576
+ source_id: string;
3577
+ company_namespace: string[];
3578
+ photo?: string;
3579
+ source_name: string;
3580
+ source_local_name?: string;
3581
+ }
3582
+ interface Filter {
3583
+ key: string;
3584
+ value: any[];
3585
+ operator:
3586
+ | "lte"
3587
+ | "lt"
3588
+ | "gte"
3589
+ | "gt"
3590
+ | "eq"
3591
+ | "ne"
3592
+ | "in"
3593
+ | "nin"
3594
+ | "search";
3595
+ id?: string;
3596
+ }
3597
+ interface Element {
3598
+ _id: string;
3599
+ name: string;
3600
+ type: "Number" | "String";
3601
+ key?: string;
3602
+ is_required?: boolean;
3603
+ isArray?: boolean;
3604
+ disabled: boolean;
3605
+ manipulator_function?: string;
3606
+ }
3607
+ export interface CustomListSchema {
3608
+ _id: string;
3609
+ code: string;
3610
+ name: string;
3611
+ local_name?: string;
3612
+ disabled: boolean;
3613
+ type: "reference" | "template";
3614
+ filters: Filter[];
3615
+ list_type: "String" | "Number";
3616
+ source:
3617
+ | "product"
3618
+ | "variant"
3619
+ | "product-category"
3620
+ | "product-sub-category"
3621
+ | "client"
3622
+ | "measureunits"
3623
+ | "tag"
3624
+ | "paymentterms"
3625
+ | "client-channel"
3626
+ | "speciality"
3627
+ | "rep";
3628
+ template_elements: Element[];
3629
+ company_namespace: string[];
3630
+ sources?: Source[];
3631
+ can_edit_types?: boolean;
3632
+ end_point: EndPoint;
3633
+ createdAt: string;
3634
+ updatedAt: string;
3635
+ }
3636
+ export interface CreateBody {
3637
+ code: string;
3638
+ name: string;
3639
+ local_name?: string;
3640
+ disabled: boolean;
3641
+ type: "reference" | "template";
3642
+ filters: Filter[];
3643
+ list_type: "String" | "Number";
3644
+ source:
3645
+ | "product"
3646
+ | "variant"
3647
+ | "product-category"
3648
+ | "product-sub-category"
3649
+ | "client"
3650
+ | "measureunits"
3651
+ | "tag"
3652
+ | "paymentterms"
3653
+ | "client-channel"
3654
+ | "speciality"
3655
+ | "rep";
3656
+ template_elements: Element[];
3657
+ company_namespace: string[];
3658
+ sources?: Source[];
3659
+ can_edit_types?: boolean;
3660
+ end_point: EndPoint;
3661
+ }
3662
+ export interface UpdateBody {
3663
+ _id?: string;
3664
+ code?: string;
3665
+ name?: string;
3666
+ local_name?: string;
3667
+ disabled?: boolean;
3668
+ type?: "reference" | "template";
3669
+ filters?: Filter[];
3670
+ list_type?: "String" | "Number";
3671
+ source?:
3672
+ | "product"
3673
+ | "variant"
3674
+ | "product-category"
3675
+ | "product-sub-category"
3676
+ | "client"
3677
+ | "measureunits"
3678
+ | "tag"
3679
+ | "paymentterms"
3680
+ | "client-channel"
3681
+ | "speciality"
3682
+ | "rep";
3683
+ template_elements?: Element[];
3684
+ company_namespace?: string[];
3685
+ sources?: Source[];
3686
+ can_edit_types?: boolean;
3687
+ end_point: EndPoint;
3688
+ }
3689
+ export namespace Find {
3690
+ type Params = DefaultPaginationQueryParams & {
3691
+ _id?: string[] | string;
3692
+ name?: string[] | string;
3693
+ type?: string;
3694
+ code?: string;
3695
+ from_updatedAt?: number;
3696
+ [key: string]: any;
3697
+ };
3698
+ interface Result extends DefaultPaginationResult {
3699
+ data: CustomListSchema[];
3700
+ }
3701
+ }
3702
+ export namespace Get {
3703
+ type ID = string;
3704
+ interface Params {}
3705
+ type Result = CustomListSchema;
3706
+ }
3707
+ export namespace Create {
3708
+ type Body = CreateBody;
3709
+ type Result = CustomListSchema;
3710
+ }
3711
+ export namespace Update {
3712
+ type ID = string;
3713
+ type Body = UpdateBody;
3714
+ type Result = CustomListSchema;
3715
+ }
3716
+ export namespace Remove {
3717
+ type ID = string;
3718
+ type Result = CustomListSchema;
3719
+ }
3720
+ export {};
3721
+ }
3722
+ namespace CustomListItem {
3723
+ type CustomItemType = "String" | "Number";
3724
+ interface CustomListItemElementModel {
3725
+ _id: string;
3726
+ template_element: string;
3727
+ value: string | number;
3728
+ name: string;
3729
+ type: CustomItemType;
3730
+ }
3731
+ export interface CustomListItemSchema {
3732
+ _id: string;
3733
+ disabled: boolean;
3734
+ custom_list: string;
3735
+ type: CustomItemType;
3736
+ value: string | number;
3737
+ photo?: string;
3738
+ media?: string[];
3739
+ position?: number;
3740
+ elements: CustomListItemElementModel[];
3741
+ score?: number;
3742
+ company_namespace: string[];
3743
+ createdAt: string;
3744
+ updatedAt: string;
3745
+ }
3746
+ export interface CreateBody {
3747
+ disabled: boolean;
3748
+ custom_list: string;
3749
+ type: CustomItemType;
3750
+ value: string | number;
3751
+ photo?: string;
3752
+ media?: string[];
3753
+ position?: number;
3754
+ elements: CustomListItemElementModel[];
3755
+ score?: number;
3756
+ company_namespace: string[];
3757
+ }
3758
+ export interface UpdateBody {
3759
+ _id?: string;
3760
+ disabled?: boolean;
3761
+ custom_list?: string;
3762
+ type?: CustomItemType;
3763
+ value?: string | number;
3764
+ photo?: string;
3765
+ media?: string[];
3766
+ position?: number;
3767
+ elements?: CustomListItemElementModel[];
3768
+ score?: number;
3769
+ company_namespace?: string[];
3770
+ }
3771
+ type CustomListItemSchemaWithPopulatedKeys = CustomListItemSchema & {
3772
+ custom_list?: string | CustomList.CustomListSchema;
3773
+ cover_photo?: string | MediaStorage.MediaStorageSchema;
3774
+ };
3775
+ type PopulatedKeys = "custom_list" | "cover_photo";
3776
+ export namespace Find {
3777
+ type Params = DefaultPaginationQueryParams & {
3778
+ _id?: string[] | string;
3779
+ custom_list?: string;
3780
+ from_updatedAt?: number;
3781
+ [key: string]: any;
3782
+ populatedKeys?: PopulatedKeys[];
3783
+ };
3784
+ interface Result extends DefaultPaginationResult {
3785
+ data: CustomListItemSchemaWithPopulatedKeys[];
3786
+ }
3787
+ }
3788
+ export namespace Get {
3789
+ type ID = string;
3790
+ interface Params {}
3791
+ type Result = CustomListItemSchema;
3792
+ }
3793
+ export namespace Create {
3794
+ type Body = CreateBody;
3795
+ type Result = CustomListItemSchema;
3796
+ }
3797
+ export namespace Update {
3798
+ type ID = string;
3799
+ type Body = UpdateBody;
3800
+ type Result = CustomListItemSchema;
3801
+ }
3802
+ export namespace Remove {
3803
+ type ID = string;
3804
+ type Result = CustomListItemSchema;
3805
+ }
3806
+ export {};
3807
+ }
3559
3808
  namespace ReturnReason {
3560
3809
  interface Schema {
3561
3810
  _id: string;
@@ -6913,6 +7162,7 @@ export declare namespace Service {
6913
7162
  variants: VariantOfAdjustInventory[];
6914
7163
  teams?: string[];
6915
7164
  sync_id: string;
7165
+ reason?: string;
6916
7166
  company_namespace: string[];
6917
7167
  createdAt: string;
6918
7168
  updatedAt: string;
@@ -6931,6 +7181,10 @@ export declare namespace Service {
6931
7181
  type FindResult = Schema & {
6932
7182
  from: string | Warehouse.WarehouseSchema;
6933
7183
  to: string | Warehouse.WarehouseSchema;
7184
+ teams: string[] | Team.TeamSchema[];
7185
+ reason:
7186
+ | string
7187
+ | InventoryAdjustmentReason.InventoryAdjustmentReasonSchema;
6934
7188
  variants: (VariantOfAdjustInventory & {
6935
7189
  variant:
6936
7190
  | string
@@ -6958,7 +7212,7 @@ export declare namespace Service {
6958
7212
  };
6959
7213
  })[];
6960
7214
  };
6961
- type PopulatedKeys = "warehouse" | "variant";
7215
+ type PopulatedKeys = "warehouse" | "variant" | "teams" | "reason";
6962
7216
  export namespace Find {
6963
7217
  type Params = DefaultPaginationQueryParams & {
6964
7218
  _id?: string[] | string;
@@ -6969,6 +7223,7 @@ export declare namespace Service {
6969
7223
  from?: string[] | string;
6970
7224
  from_createdAt?: number;
6971
7225
  to_createdAt?: number;
7226
+ from_updatedAt?: number;
6972
7227
  creator?: string[] | string;
6973
7228
  populatedKeys?: PopulatedKeys[];
6974
7229
  };
@@ -6997,6 +7252,68 @@ export declare namespace Service {
6997
7252
  }
6998
7253
  export {};
6999
7254
  }
7255
+ namespace InventoryAdjustmentReason {
7256
+ interface InventoryAdjustmentReasonSchema {
7257
+ _id: string;
7258
+ name: string;
7259
+ local_name?: string;
7260
+ disabled: boolean;
7261
+ integration_meta?: {
7262
+ [key: string]: any;
7263
+ };
7264
+ company_namespace: string[];
7265
+ createdAt: string;
7266
+ updatedAt: string;
7267
+ }
7268
+ interface CreateBody {
7269
+ name: string;
7270
+ local_name?: string;
7271
+ disabled: boolean;
7272
+ integration_meta?: {
7273
+ [key: string]: any;
7274
+ };
7275
+ company_namespace: string[];
7276
+ }
7277
+ interface UpdateBody {
7278
+ _id?: string;
7279
+ name?: string;
7280
+ local_name?: string;
7281
+ disabled?: boolean;
7282
+ integration_meta?: {
7283
+ [key: string]: any;
7284
+ };
7285
+ company_namespace?: string[];
7286
+ }
7287
+ namespace Find {
7288
+ type Params = DefaultPaginationQueryParams & {
7289
+ _id?: string[] | string;
7290
+ name?: string;
7291
+ from_updatedAt?: number;
7292
+ [key: string]: any;
7293
+ };
7294
+ interface Result extends DefaultPaginationResult {
7295
+ data: InventoryAdjustmentReasonSchema[];
7296
+ }
7297
+ }
7298
+ namespace Get {
7299
+ type ID = string;
7300
+ interface Params {}
7301
+ type Result = InventoryAdjustmentReasonSchema;
7302
+ }
7303
+ namespace Create {
7304
+ type Body = CreateBody;
7305
+ type Result = InventoryAdjustmentReasonSchema;
7306
+ }
7307
+ namespace Update {
7308
+ type ID = string;
7309
+ type Body = UpdateBody;
7310
+ type Result = InventoryAdjustmentReasonSchema;
7311
+ }
7312
+ namespace Remove {
7313
+ type ID = string;
7314
+ type Result = InventoryAdjustmentReasonSchema;
7315
+ }
7316
+ }
7000
7317
  namespace Inventory {
7001
7318
  interface InventorySchema {
7002
7319
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -1497,6 +1497,175 @@ export default class Repzo {
1497
1497
  return res;
1498
1498
  },
1499
1499
  };
1500
+
1501
+ customList = {
1502
+ _path: "/custom-list",
1503
+ find: async (
1504
+ params?: Service.CustomList.Find.Params
1505
+ ): Promise<Service.CustomList.Find.Result> => {
1506
+ let res: Service.CustomList.Find.Result = await this._fetch(
1507
+ this.svAPIEndpoint,
1508
+ this.customList._path,
1509
+ params
1510
+ );
1511
+ return res;
1512
+ },
1513
+
1514
+ get: async (
1515
+ id: Service.CustomList.Get.ID,
1516
+ params?: Service.CustomList.Get.Params
1517
+ ): Promise<Service.CustomList.Get.Result> => {
1518
+ return await this._fetch(
1519
+ this.svAPIEndpoint,
1520
+ this.customList._path + `/${id}`,
1521
+ params
1522
+ );
1523
+ },
1524
+
1525
+ create: async (
1526
+ body: Service.CustomList.Create.Body
1527
+ ): Promise<Service.CustomList.Create.Result> => {
1528
+ let res = await this._create(
1529
+ this.svAPIEndpoint,
1530
+ this.customList._path,
1531
+ body
1532
+ );
1533
+ return res;
1534
+ },
1535
+
1536
+ update: async (
1537
+ id: Service.CustomList.Update.ID,
1538
+ body: Service.CustomList.Update.Body
1539
+ ): Promise<Service.CustomList.Update.Result> => {
1540
+ let res: Service.CustomList.Update.Result = await this._update(
1541
+ this.svAPIEndpoint,
1542
+ this.customList._path + `/${id}`,
1543
+ body
1544
+ );
1545
+ return res;
1546
+ },
1547
+ remove: async (
1548
+ id: Service.CustomList.Remove.ID
1549
+ ): Promise<Service.CustomList.Remove.Result> => {
1550
+ let res: Service.CustomList.Remove.Result = await this._delete(
1551
+ this.svAPIEndpoint,
1552
+ this.customList._path + `/${id}`
1553
+ );
1554
+ return res;
1555
+ },
1556
+ };
1557
+
1558
+ customListItem = {
1559
+ _path: "/custom-list-item",
1560
+ find: async (
1561
+ params?: Service.CustomListItem.Find.Params
1562
+ ): Promise<Service.CustomListItem.Find.Result> => {
1563
+ let res: Service.CustomListItem.Find.Result = await this._fetch(
1564
+ this.svAPIEndpoint,
1565
+ this.customListItem._path,
1566
+ params
1567
+ );
1568
+ return res;
1569
+ },
1570
+
1571
+ get: async (
1572
+ id: Service.CustomListItem.Get.ID,
1573
+ params?: Service.CustomListItem.Get.Params
1574
+ ): Promise<Service.CustomListItem.Get.Result> => {
1575
+ return await this._fetch(
1576
+ this.svAPIEndpoint,
1577
+ this.customListItem._path + `/${id}`,
1578
+ params
1579
+ );
1580
+ },
1581
+
1582
+ create: async (
1583
+ body: Service.CustomListItem.Create.Body
1584
+ ): Promise<Service.CustomListItem.Create.Result> => {
1585
+ let res = await this._create(
1586
+ this.svAPIEndpoint,
1587
+ this.customListItem._path,
1588
+ body
1589
+ );
1590
+ return res;
1591
+ },
1592
+
1593
+ update: async (
1594
+ id: Service.CustomListItem.Update.ID,
1595
+ body: Service.CustomListItem.Update.Body
1596
+ ): Promise<Service.CustomListItem.Update.Result> => {
1597
+ let res: Service.CustomListItem.Update.Result = await this._update(
1598
+ this.svAPIEndpoint,
1599
+ this.customListItem._path + `/${id}`,
1600
+ body
1601
+ );
1602
+ return res;
1603
+ },
1604
+ remove: async (
1605
+ id: Service.CustomListItem.Remove.ID
1606
+ ): Promise<Service.CustomListItem.Remove.Result> => {
1607
+ let res: Service.CustomListItem.Remove.Result = await this._delete(
1608
+ this.svAPIEndpoint,
1609
+ this.customListItem._path + `/${id}`
1610
+ );
1611
+ return res;
1612
+ },
1613
+ };
1614
+
1615
+ inventoryAdjustmentReason = {
1616
+ _path: "/inventory-adjustment-reason",
1617
+ find: async (
1618
+ params?: Service.InventoryAdjustmentReason.Find.Params
1619
+ ): Promise<Service.InventoryAdjustmentReason.Find.Result> => {
1620
+ let res: Service.InventoryAdjustmentReason.Find.Result = await this._fetch(
1621
+ this.svAPIEndpoint,
1622
+ this.inventoryAdjustmentReason._path,
1623
+ params
1624
+ );
1625
+ return res;
1626
+ },
1627
+
1628
+ get: async (
1629
+ id: Service.InventoryAdjustmentReason.Get.ID
1630
+ ): Promise<Service.InventoryAdjustmentReason.Get.Result> => {
1631
+ return await this._fetch(
1632
+ this.svAPIEndpoint,
1633
+ this.inventoryAdjustmentReason._path + `/${id}`
1634
+ );
1635
+ },
1636
+
1637
+ create: async (
1638
+ body: Service.InventoryAdjustmentReason.Create.Body
1639
+ ): Promise<Service.InventoryAdjustmentReason.Create.Result> => {
1640
+ let res = await this._create(
1641
+ this.svAPIEndpoint,
1642
+ this.inventoryAdjustmentReason._path,
1643
+ body
1644
+ );
1645
+ return res;
1646
+ },
1647
+ update: async (
1648
+ id: Service.InventoryAdjustmentReason.Update.ID,
1649
+ body: Service.InventoryAdjustmentReason.Update.Body
1650
+ ): Promise<Service.InventoryAdjustmentReason.Update.Result> => {
1651
+ let res: Service.InventoryAdjustmentReason.Update.Result = await this._update(
1652
+ this.svAPIEndpoint,
1653
+ this.customListItem._path + `/${id}`,
1654
+ body
1655
+ );
1656
+ return res;
1657
+ },
1658
+ remove: async (
1659
+ id: Service.InventoryAdjustmentReason.Remove.ID
1660
+ ): Promise<Service.InventoryAdjustmentReason.Remove.Result> => {
1661
+ let res: Service.InventoryAdjustmentReason.Remove.Result = await this._delete(
1662
+ this.svAPIEndpoint,
1663
+ this.inventoryAdjustmentReason._path + `/${id}`
1664
+ );
1665
+ return res;
1666
+ },
1667
+ };
1668
+
1500
1669
  workorder = {
1501
1670
  _path: "/workorder",
1502
1671
  find: async (
@@ -3617,6 +3617,255 @@ export namespace Service {
3617
3617
  }
3618
3618
  }
3619
3619
 
3620
+ export namespace CustomList {
3621
+ interface EndPoint {
3622
+ _id?: string;
3623
+ is_read?: boolean;
3624
+ input_type?: "List";
3625
+ render_key?: string;
3626
+ filter_key?: "_id";
3627
+ type?: "String" | "Array" | "Number" | "Boolean";
3628
+ path?: string;
3629
+ method?: "get" | "post" | "put" | "patch" | "delete";
3630
+ body?: { [key: string]: any };
3631
+ search?: boolean;
3632
+ multi_select?: boolean;
3633
+ }
3634
+ interface Source {
3635
+ source_id: string;
3636
+ company_namespace: string[];
3637
+ photo?: string;
3638
+ source_name: string;
3639
+ source_local_name?: string;
3640
+ }
3641
+ interface Filter {
3642
+ key: string;
3643
+ value: any[];
3644
+ operator:
3645
+ | "lte"
3646
+ | "lt"
3647
+ | "gte"
3648
+ | "gt"
3649
+ | "eq"
3650
+ | "ne"
3651
+ | "in"
3652
+ | "nin"
3653
+ | "search";
3654
+ id?: string;
3655
+ }
3656
+ interface Element {
3657
+ _id: string;
3658
+ name: string;
3659
+ type: "Number" | "String";
3660
+ key?: string;
3661
+ is_required?: boolean;
3662
+ isArray?: boolean;
3663
+ disabled: boolean;
3664
+ manipulator_function?: string;
3665
+ }
3666
+ export interface CustomListSchema {
3667
+ _id: string;
3668
+ code: string;
3669
+ name: string;
3670
+ local_name?: string;
3671
+ disabled: boolean;
3672
+ type: "reference" | "template"; //| "items_list"
3673
+ filters: Filter[];
3674
+ list_type: "String" | "Number";
3675
+ source:
3676
+ | "product"
3677
+ | "variant"
3678
+ | "product-category"
3679
+ | "product-sub-category"
3680
+ | "client"
3681
+ | "measureunits"
3682
+ | "tag"
3683
+ | "paymentterms"
3684
+ | "client-channel"
3685
+ | "speciality"
3686
+ | "rep";
3687
+ template_elements: Element[];
3688
+ company_namespace: string[];
3689
+ sources?: Source[];
3690
+ can_edit_types?: boolean;
3691
+ end_point: EndPoint;
3692
+ createdAt: string;
3693
+ updatedAt: string;
3694
+ }
3695
+ export interface CreateBody {
3696
+ code: string;
3697
+ name: string;
3698
+ local_name?: string;
3699
+ disabled: boolean;
3700
+ type: "reference" | "template"; //| "items_list"
3701
+ filters: Filter[];
3702
+ list_type: "String" | "Number";
3703
+ source:
3704
+ | "product"
3705
+ | "variant"
3706
+ | "product-category"
3707
+ | "product-sub-category"
3708
+ | "client"
3709
+ | "measureunits"
3710
+ | "tag"
3711
+ | "paymentterms"
3712
+ | "client-channel"
3713
+ | "speciality"
3714
+ | "rep";
3715
+ template_elements: Element[];
3716
+ company_namespace: string[];
3717
+ sources?: Source[];
3718
+ can_edit_types?: boolean;
3719
+ end_point: EndPoint;
3720
+ }
3721
+ export interface UpdateBody {
3722
+ _id?: string;
3723
+ code?: string;
3724
+ name?: string;
3725
+ local_name?: string;
3726
+ disabled?: boolean;
3727
+ type?: "reference" | "template"; //| "items_list"
3728
+ filters?: Filter[];
3729
+ list_type?: "String" | "Number";
3730
+ source?:
3731
+ | "product"
3732
+ | "variant"
3733
+ | "product-category"
3734
+ | "product-sub-category"
3735
+ | "client"
3736
+ | "measureunits"
3737
+ | "tag"
3738
+ | "paymentterms"
3739
+ | "client-channel"
3740
+ | "speciality"
3741
+ | "rep";
3742
+ template_elements?: Element[];
3743
+ company_namespace?: string[];
3744
+ sources?: Source[];
3745
+ can_edit_types?: boolean;
3746
+ end_point: EndPoint;
3747
+ }
3748
+ export namespace Find {
3749
+ export type Params = DefaultPaginationQueryParams & {
3750
+ _id?: string[] | string;
3751
+ name?: string[] | string;
3752
+ type?: string;
3753
+ code?: string;
3754
+ from_updatedAt?: number;
3755
+ [key: string]: any; // integration_meta.
3756
+ };
3757
+ export interface Result extends DefaultPaginationResult {
3758
+ data: CustomListSchema[];
3759
+ }
3760
+ }
3761
+
3762
+ export namespace Get {
3763
+ export type ID = string;
3764
+ export interface Params {}
3765
+ export type Result = CustomListSchema;
3766
+ }
3767
+ export namespace Create {
3768
+ export type Body = CreateBody;
3769
+ export type Result = CustomListSchema;
3770
+ }
3771
+ export namespace Update {
3772
+ export type ID = string;
3773
+ export type Body = UpdateBody;
3774
+ export type Result = CustomListSchema;
3775
+ }
3776
+ export namespace Remove {
3777
+ export type ID = string;
3778
+ export type Result = CustomListSchema;
3779
+ }
3780
+ }
3781
+
3782
+ export namespace CustomListItem {
3783
+ type CustomItemType = "String" | "Number";
3784
+
3785
+ interface CustomListItemElementModel {
3786
+ _id: string;
3787
+ template_element: string;
3788
+ value: string | number;
3789
+ name: string;
3790
+ type: CustomItemType;
3791
+ }
3792
+ export interface CustomListItemSchema {
3793
+ _id: string;
3794
+ disabled: boolean;
3795
+ custom_list: string;
3796
+ type: CustomItemType;
3797
+ value: string | number;
3798
+ photo?: string;
3799
+ media?: string[];
3800
+ position?: number;
3801
+ elements: CustomListItemElementModel[];
3802
+ score?: number;
3803
+ company_namespace: string[];
3804
+ createdAt: string;
3805
+ updatedAt: string;
3806
+ }
3807
+ export interface CreateBody {
3808
+ disabled: boolean;
3809
+ custom_list: string;
3810
+ type: CustomItemType;
3811
+ value: string | number;
3812
+ photo?: string;
3813
+ media?: string[];
3814
+ position?: number;
3815
+ elements: CustomListItemElementModel[];
3816
+ score?: number;
3817
+ company_namespace: string[];
3818
+ }
3819
+ export interface UpdateBody {
3820
+ _id?: string;
3821
+ disabled?: boolean;
3822
+ custom_list?: string;
3823
+ type?: CustomItemType;
3824
+ value?: string | number;
3825
+ photo?: string;
3826
+ media?: string[];
3827
+ position?: number;
3828
+ elements?: CustomListItemElementModel[];
3829
+ score?: number;
3830
+ company_namespace?: string[];
3831
+ }
3832
+ type CustomListItemSchemaWithPopulatedKeys = CustomListItemSchema & {
3833
+ custom_list?: string | CustomList.CustomListSchema;
3834
+ cover_photo?: string | MediaStorage.MediaStorageSchema;
3835
+ };
3836
+ type PopulatedKeys = "custom_list" | "cover_photo";
3837
+ export namespace Find {
3838
+ export type Params = DefaultPaginationQueryParams & {
3839
+ _id?: string[] | string;
3840
+ custom_list?: string;
3841
+ from_updatedAt?: number;
3842
+ [key: string]: any; // integration_meta.
3843
+ populatedKeys?: PopulatedKeys[];
3844
+ };
3845
+ export interface Result extends DefaultPaginationResult {
3846
+ data: CustomListItemSchemaWithPopulatedKeys[];
3847
+ }
3848
+ }
3849
+ export namespace Get {
3850
+ export type ID = string;
3851
+ export interface Params {}
3852
+ export type Result = CustomListItemSchema;
3853
+ }
3854
+ export namespace Create {
3855
+ export type Body = CreateBody;
3856
+ export type Result = CustomListItemSchema;
3857
+ }
3858
+ export namespace Update {
3859
+ export type ID = string;
3860
+ export type Body = UpdateBody;
3861
+ export type Result = CustomListItemSchema;
3862
+ }
3863
+ export namespace Remove {
3864
+ export type ID = string;
3865
+ export type Result = CustomListItemSchema;
3866
+ }
3867
+ }
3868
+
3620
3869
  export namespace ReturnReason {
3621
3870
  export interface Schema {
3622
3871
  _id: string;
@@ -6913,6 +7162,7 @@ export namespace Service {
6913
7162
  variants: VariantOfAdjustInventory[];
6914
7163
  teams?: string[];
6915
7164
  sync_id: string;
7165
+ reason?: string;
6916
7166
  company_namespace: string[];
6917
7167
  createdAt: string;
6918
7168
  updatedAt: string;
@@ -6932,6 +7182,10 @@ export namespace Service {
6932
7182
  type FindResult = Schema & {
6933
7183
  from: string | Warehouse.WarehouseSchema;
6934
7184
  to: string | Warehouse.WarehouseSchema;
7185
+ teams: string[] | Team.TeamSchema[];
7186
+ reason:
7187
+ | string
7188
+ | InventoryAdjustmentReason.InventoryAdjustmentReasonSchema;
6935
7189
  variants: (VariantOfAdjustInventory & {
6936
7190
  variant:
6937
7191
  | string
@@ -6960,7 +7214,7 @@ export namespace Service {
6960
7214
  })[];
6961
7215
  };
6962
7216
 
6963
- type PopulatedKeys = "warehouse" | "variant";
7217
+ type PopulatedKeys = "warehouse" | "variant" | "teams" | "reason";
6964
7218
  export namespace Find {
6965
7219
  export type Params = DefaultPaginationQueryParams & {
6966
7220
  _id?: string[] | string;
@@ -6971,6 +7225,7 @@ export namespace Service {
6971
7225
  from?: string[] | string;
6972
7226
  from_createdAt?: number;
6973
7227
  to_createdAt?: number;
7228
+ from_updatedAt?: number;
6974
7229
  creator?: string[] | string;
6975
7230
  populatedKeys?: PopulatedKeys[];
6976
7231
  };
@@ -7001,6 +7256,63 @@ export namespace Service {
7001
7256
  }
7002
7257
  }
7003
7258
 
7259
+ export namespace InventoryAdjustmentReason {
7260
+ export interface InventoryAdjustmentReasonSchema {
7261
+ _id: string;
7262
+ name: string;
7263
+ local_name?: string;
7264
+ disabled: boolean;
7265
+ integration_meta?: { [key: string]: any };
7266
+ company_namespace: string[];
7267
+ createdAt: string;
7268
+ updatedAt: string;
7269
+ }
7270
+ export interface CreateBody {
7271
+ name: string;
7272
+ local_name?: string;
7273
+ disabled: boolean;
7274
+ integration_meta?: { [key: string]: any };
7275
+ company_namespace: string[];
7276
+ }
7277
+ export interface UpdateBody {
7278
+ _id?: string;
7279
+ name?: string;
7280
+ local_name?: string;
7281
+ disabled?: boolean;
7282
+ integration_meta?: { [key: string]: any };
7283
+ company_namespace?: string[];
7284
+ }
7285
+ export namespace Find {
7286
+ export type Params = DefaultPaginationQueryParams & {
7287
+ _id?: string[] | string;
7288
+ name?: string;
7289
+ from_updatedAt?: number;
7290
+ [key: string]: any; // integration_meta.
7291
+ };
7292
+ export interface Result extends DefaultPaginationResult {
7293
+ data: InventoryAdjustmentReasonSchema[];
7294
+ }
7295
+ }
7296
+
7297
+ export namespace Get {
7298
+ export type ID = string;
7299
+ export interface Params {}
7300
+ export type Result = InventoryAdjustmentReasonSchema;
7301
+ }
7302
+ export namespace Create {
7303
+ export type Body = CreateBody;
7304
+ export type Result = InventoryAdjustmentReasonSchema;
7305
+ }
7306
+ export namespace Update {
7307
+ export type ID = string;
7308
+ export type Body = UpdateBody;
7309
+ export type Result = InventoryAdjustmentReasonSchema;
7310
+ }
7311
+ export namespace Remove {
7312
+ export type ID = string;
7313
+ export type Result = InventoryAdjustmentReasonSchema;
7314
+ }
7315
+ }
7004
7316
  export namespace Inventory {
7005
7317
  export interface InventorySchema {
7006
7318
  _id: string;