repzo 1.0.98 → 1.0.99
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 +12 -6
- package/lib/index.js +2692 -1674
- package/lib/types/index.d.ts +161 -108
- package/package.json +1 -1
- package/src/index.ts +24 -12
- package/src/types/index.ts +105 -56
package/src/index.ts
CHANGED
|
@@ -3172,11 +3172,13 @@ export default class Repzo {
|
|
|
3172
3172
|
return res;
|
|
3173
3173
|
},
|
|
3174
3174
|
get: async (
|
|
3175
|
-
id: Service.AssetPart.Get.ID
|
|
3175
|
+
id: Service.AssetPart.Get.ID,
|
|
3176
|
+
params?: Service.AssetPart.Get.Params
|
|
3176
3177
|
): Promise<Service.AssetPart.Get.Result> => {
|
|
3177
3178
|
return await this._fetch(
|
|
3178
3179
|
this.svAPIEndpoint,
|
|
3179
|
-
this.assetPart._path + `/${id}
|
|
3180
|
+
this.assetPart._path + `/${id}`,
|
|
3181
|
+
params
|
|
3180
3182
|
);
|
|
3181
3183
|
},
|
|
3182
3184
|
create: async (
|
|
@@ -3224,11 +3226,13 @@ export default class Repzo {
|
|
|
3224
3226
|
return res;
|
|
3225
3227
|
},
|
|
3226
3228
|
get: async (
|
|
3227
|
-
id: Service.AssetPartUnit.Get.ID
|
|
3229
|
+
id: Service.AssetPartUnit.Get.ID,
|
|
3230
|
+
params?: Service.AssetPartUnit.Get.Params
|
|
3228
3231
|
): Promise<Service.AssetPartUnit.Get.Result> => {
|
|
3229
3232
|
return await this._fetch(
|
|
3230
3233
|
this.svAPIEndpoint,
|
|
3231
|
-
this.assetPartUnit._path + `/${id}
|
|
3234
|
+
this.assetPartUnit._path + `/${id}`,
|
|
3235
|
+
params
|
|
3232
3236
|
);
|
|
3233
3237
|
},
|
|
3234
3238
|
update: async (
|
|
@@ -3257,11 +3261,13 @@ export default class Repzo {
|
|
|
3257
3261
|
return res;
|
|
3258
3262
|
},
|
|
3259
3263
|
get: async (
|
|
3260
|
-
id: Service.AssetPartReceival.Get.ID
|
|
3264
|
+
id: Service.AssetPartReceival.Get.ID,
|
|
3265
|
+
params?: Service.AssetPartReceival.Get.Params
|
|
3261
3266
|
): Promise<Service.AssetPartReceival.Get.Result> => {
|
|
3262
3267
|
return await this._fetch(
|
|
3263
3268
|
this.svAPIEndpoint,
|
|
3264
|
-
this.assetPartReceival._path + `/${id}
|
|
3269
|
+
this.assetPartReceival._path + `/${id}`,
|
|
3270
|
+
params
|
|
3265
3271
|
);
|
|
3266
3272
|
},
|
|
3267
3273
|
create: async (
|
|
@@ -3312,11 +3318,13 @@ export default class Repzo {
|
|
|
3312
3318
|
return res;
|
|
3313
3319
|
},
|
|
3314
3320
|
get: async (
|
|
3315
|
-
id: Service.AssetPartTransfer.Get.ID
|
|
3321
|
+
id: Service.AssetPartTransfer.Get.ID,
|
|
3322
|
+
params?: Service.AssetPartTransfer.Get.Params
|
|
3316
3323
|
): Promise<Service.AssetPartTransfer.Get.Result> => {
|
|
3317
3324
|
return await this._fetch(
|
|
3318
3325
|
this.svAPIEndpoint,
|
|
3319
|
-
this.assetPartTransfer._path + `/${id}
|
|
3326
|
+
this.assetPartTransfer._path + `/${id}`,
|
|
3327
|
+
params
|
|
3320
3328
|
);
|
|
3321
3329
|
},
|
|
3322
3330
|
create: async (
|
|
@@ -3367,11 +3375,13 @@ export default class Repzo {
|
|
|
3367
3375
|
return res;
|
|
3368
3376
|
},
|
|
3369
3377
|
get: async (
|
|
3370
|
-
id: Service.ReturnAssetPartUnit.Get.ID
|
|
3378
|
+
id: Service.ReturnAssetPartUnit.Get.ID,
|
|
3379
|
+
params?: Service.ReturnAssetPartUnit.Get.Params
|
|
3371
3380
|
): Promise<Service.ReturnAssetPartUnit.Get.Result> => {
|
|
3372
3381
|
return await this._fetch(
|
|
3373
3382
|
this.svAPIEndpoint,
|
|
3374
|
-
this.returnAssetPartUnit._path + `/${id}
|
|
3383
|
+
this.returnAssetPartUnit._path + `/${id}`,
|
|
3384
|
+
params
|
|
3375
3385
|
);
|
|
3376
3386
|
},
|
|
3377
3387
|
create: async (
|
|
@@ -3422,11 +3432,13 @@ export default class Repzo {
|
|
|
3422
3432
|
return res;
|
|
3423
3433
|
},
|
|
3424
3434
|
get: async (
|
|
3425
|
-
id: Service.StoreAssetPartUnit.Get.ID
|
|
3435
|
+
id: Service.StoreAssetPartUnit.Get.ID,
|
|
3436
|
+
params?: Service.StoreAssetPartUnit.Get.Params
|
|
3426
3437
|
): Promise<Service.StoreAssetPartUnit.Get.Result> => {
|
|
3427
3438
|
return await this._fetch(
|
|
3428
3439
|
this.svAPIEndpoint,
|
|
3429
|
-
this.storeAssetPartUnit._path + `/${id}
|
|
3440
|
+
this.storeAssetPartUnit._path + `/${id}`,
|
|
3441
|
+
params
|
|
3430
3442
|
);
|
|
3431
3443
|
},
|
|
3432
3444
|
create: async (
|
package/src/types/index.ts
CHANGED
|
@@ -8166,6 +8166,13 @@ export namespace Service {
|
|
|
8166
8166
|
updatedAt?: Date;
|
|
8167
8167
|
}
|
|
8168
8168
|
|
|
8169
|
+
type PopulatedKeys =
|
|
8170
|
+
| "asset_part_types"
|
|
8171
|
+
| "assets"
|
|
8172
|
+
| "asset_units"
|
|
8173
|
+
| "media"
|
|
8174
|
+
| "cover_photo";
|
|
8175
|
+
|
|
8169
8176
|
export namespace Find {
|
|
8170
8177
|
export type Params = DefaultPaginationQueryParams & {
|
|
8171
8178
|
_id?: StringId[] | StringId;
|
|
@@ -8179,13 +8186,7 @@ export namespace Service {
|
|
|
8179
8186
|
asset_part_types?: string[] | string;
|
|
8180
8187
|
assets?: string[] | string;
|
|
8181
8188
|
asset_units?: string[] | string;
|
|
8182
|
-
populatesKeys?:
|
|
8183
|
-
| "asset_part_types"
|
|
8184
|
-
| "assets"
|
|
8185
|
-
| "asset_units"
|
|
8186
|
-
| "media"
|
|
8187
|
-
| "cover_photo"
|
|
8188
|
-
)[];
|
|
8189
|
+
populatesKeys?: PopulatedKeys[];
|
|
8189
8190
|
sortBy?: {
|
|
8190
8191
|
field:
|
|
8191
8192
|
| "_id"
|
|
@@ -8204,6 +8205,10 @@ export namespace Service {
|
|
|
8204
8205
|
}
|
|
8205
8206
|
export namespace Get {
|
|
8206
8207
|
export type ID = string;
|
|
8208
|
+
export type Params = {
|
|
8209
|
+
populatesKeys?: PopulatedKeys[];
|
|
8210
|
+
[key: string]: any;
|
|
8211
|
+
};
|
|
8207
8212
|
export type Result = Data | PopulatedDoc;
|
|
8208
8213
|
}
|
|
8209
8214
|
export namespace Create {
|
|
@@ -8393,6 +8398,15 @@ export namespace Service {
|
|
|
8393
8398
|
| "rejected";
|
|
8394
8399
|
}
|
|
8395
8400
|
|
|
8401
|
+
type PopulatedKeys =
|
|
8402
|
+
| "asset_part_receival"
|
|
8403
|
+
| "asset_part"
|
|
8404
|
+
| "client"
|
|
8405
|
+
| "warehouse"
|
|
8406
|
+
| "teams"
|
|
8407
|
+
| "custom_status"
|
|
8408
|
+
| "media";
|
|
8409
|
+
|
|
8396
8410
|
export namespace Find {
|
|
8397
8411
|
export type Params = DefaultPaginationQueryParams & {
|
|
8398
8412
|
_id?: StringId[] | StringId;
|
|
@@ -8413,15 +8427,7 @@ export namespace Service {
|
|
|
8413
8427
|
to_updatedAt?: number;
|
|
8414
8428
|
from_createdAt?: number;
|
|
8415
8429
|
to_createdAt?: number;
|
|
8416
|
-
populatesKeys?:
|
|
8417
|
-
| "asset_part_receival"
|
|
8418
|
-
| "asset_part"
|
|
8419
|
-
| "client"
|
|
8420
|
-
| "warehouse"
|
|
8421
|
-
| "teams"
|
|
8422
|
-
| "custom_status"
|
|
8423
|
-
| "media"
|
|
8424
|
-
)[];
|
|
8430
|
+
populatesKeys?: PopulatedKeys[];
|
|
8425
8431
|
sortBy?: {
|
|
8426
8432
|
field: "_id" | "asset_part_index" | "createdAt" | "updatedAt";
|
|
8427
8433
|
type: "asc" | "desc";
|
|
@@ -8443,6 +8449,10 @@ export namespace Service {
|
|
|
8443
8449
|
}
|
|
8444
8450
|
export namespace Get {
|
|
8445
8451
|
export type ID = string;
|
|
8452
|
+
export type Params = {
|
|
8453
|
+
populatesKeys?: PopulatedKeys[];
|
|
8454
|
+
[key: string]: any;
|
|
8455
|
+
};
|
|
8446
8456
|
export type Result = Data | PopulatedDoc;
|
|
8447
8457
|
}
|
|
8448
8458
|
export namespace Update {
|
|
@@ -8568,6 +8578,16 @@ export namespace Service {
|
|
|
8568
8578
|
workorder?: StringId;
|
|
8569
8579
|
}
|
|
8570
8580
|
|
|
8581
|
+
type PopulatedKeys =
|
|
8582
|
+
| "asset_part"
|
|
8583
|
+
| "client"
|
|
8584
|
+
| "warehouse"
|
|
8585
|
+
| "teams"
|
|
8586
|
+
| "custom_status"
|
|
8587
|
+
| "media"
|
|
8588
|
+
| "signature"
|
|
8589
|
+
| "workorder";
|
|
8590
|
+
|
|
8571
8591
|
export namespace Find {
|
|
8572
8592
|
export type Params = DefaultPaginationQueryParams & {
|
|
8573
8593
|
_id?: StringId[] | StringId;
|
|
@@ -8595,16 +8615,7 @@ export namespace Service {
|
|
|
8595
8615
|
from_updatedAt?: number;
|
|
8596
8616
|
to_updatedAt?: number;
|
|
8597
8617
|
workorder?: StringId | StringId[];
|
|
8598
|
-
populatesKeys?:
|
|
8599
|
-
| "asset_part"
|
|
8600
|
-
| "client"
|
|
8601
|
-
| "warehouse"
|
|
8602
|
-
| "teams"
|
|
8603
|
-
| "custom_status"
|
|
8604
|
-
| "media"
|
|
8605
|
-
| "signature"
|
|
8606
|
-
| "workorder"
|
|
8607
|
-
)[];
|
|
8618
|
+
populatesKeys?: PopulatedKeys[];
|
|
8608
8619
|
sortBy?: {
|
|
8609
8620
|
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8610
8621
|
type: "asc" | "desc";
|
|
@@ -8617,6 +8628,10 @@ export namespace Service {
|
|
|
8617
8628
|
}
|
|
8618
8629
|
export namespace Get {
|
|
8619
8630
|
export type ID = string;
|
|
8631
|
+
export type Params = {
|
|
8632
|
+
populatesKeys?: PopulatedKeys[];
|
|
8633
|
+
[key: string]: any;
|
|
8634
|
+
};
|
|
8620
8635
|
export type Result = Data | PopulatedDoc;
|
|
8621
8636
|
}
|
|
8622
8637
|
export namespace Create {
|
|
@@ -8813,6 +8828,13 @@ export namespace Service {
|
|
|
8813
8828
|
stage?: number;
|
|
8814
8829
|
failed_reasons?: { code: string; message: string; [key: string]: any }[];
|
|
8815
8830
|
}
|
|
8831
|
+
type PopulatedKeys =
|
|
8832
|
+
| "asset_part_unit"
|
|
8833
|
+
| "warehouse"
|
|
8834
|
+
| "teams"
|
|
8835
|
+
| "custom_status"
|
|
8836
|
+
| "from"
|
|
8837
|
+
| "to";
|
|
8816
8838
|
|
|
8817
8839
|
export namespace Find {
|
|
8818
8840
|
export type Params = DefaultPaginationQueryParams & {
|
|
@@ -8844,14 +8866,7 @@ export namespace Service {
|
|
|
8844
8866
|
to_createdAt?: number;
|
|
8845
8867
|
from_updatedAt?: number;
|
|
8846
8868
|
to_updatedAt?: number;
|
|
8847
|
-
populatesKeys?:
|
|
8848
|
-
| "asset_part_unit"
|
|
8849
|
-
| "warehouse"
|
|
8850
|
-
| "teams"
|
|
8851
|
-
| "custom_status"
|
|
8852
|
-
| "from"
|
|
8853
|
-
| "to"
|
|
8854
|
-
)[];
|
|
8869
|
+
populatesKeys?: PopulatedKeys[];
|
|
8855
8870
|
sortBy?: {
|
|
8856
8871
|
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8857
8872
|
type: "asc" | "desc";
|
|
@@ -8864,7 +8879,17 @@ export namespace Service {
|
|
|
8864
8879
|
}
|
|
8865
8880
|
export namespace Get {
|
|
8866
8881
|
export type ID = StringId;
|
|
8867
|
-
export type
|
|
8882
|
+
export type Params = {
|
|
8883
|
+
withCycle?: boolean;
|
|
8884
|
+
validityCheck?: boolean;
|
|
8885
|
+
populatesKeys?: PopulatedKeys[];
|
|
8886
|
+
[key: string]: any; // integration_meta.
|
|
8887
|
+
};
|
|
8888
|
+
export type Result = (Data | PopulatedDoc) & {
|
|
8889
|
+
cycle?: Cycle.Schema;
|
|
8890
|
+
validityCheck?: ValidityCheck;
|
|
8891
|
+
you_can_approve?: boolean;
|
|
8892
|
+
};
|
|
8868
8893
|
}
|
|
8869
8894
|
export namespace Create {
|
|
8870
8895
|
export type Body = CreateBody;
|
|
@@ -9064,6 +9089,16 @@ export namespace Service {
|
|
|
9064
9089
|
updatedAt?: Date;
|
|
9065
9090
|
}
|
|
9066
9091
|
|
|
9092
|
+
type PopulatedKeys =
|
|
9093
|
+
| "client"
|
|
9094
|
+
| "asset_part_unit"
|
|
9095
|
+
| "warehouse"
|
|
9096
|
+
| "teams"
|
|
9097
|
+
| "custom_status"
|
|
9098
|
+
| "meadia"
|
|
9099
|
+
| "signature"
|
|
9100
|
+
| "workorder";
|
|
9101
|
+
|
|
9067
9102
|
export namespace Find {
|
|
9068
9103
|
export type Params = DefaultPaginationQueryParams & {
|
|
9069
9104
|
_id?: StringId[] | StringId;
|
|
@@ -9091,16 +9126,7 @@ export namespace Service {
|
|
|
9091
9126
|
from_updatedAt?: number;
|
|
9092
9127
|
to_updatedAt?: number;
|
|
9093
9128
|
workorder?: StringId | StringId[];
|
|
9094
|
-
populatesKeys?:
|
|
9095
|
-
| "client"
|
|
9096
|
-
| "asset_part_unit"
|
|
9097
|
-
| "warehouse"
|
|
9098
|
-
| "teams"
|
|
9099
|
-
| "custom_status"
|
|
9100
|
-
| "meadia"
|
|
9101
|
-
| "signature"
|
|
9102
|
-
| "workorder"
|
|
9103
|
-
)[];
|
|
9129
|
+
populatesKeys?: PopulatedKeys[];
|
|
9104
9130
|
sortBy?: {
|
|
9105
9131
|
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
9106
9132
|
type: "asc" | "desc";
|
|
@@ -9113,7 +9139,16 @@ export namespace Service {
|
|
|
9113
9139
|
}
|
|
9114
9140
|
export namespace Get {
|
|
9115
9141
|
export type ID = string;
|
|
9116
|
-
export type
|
|
9142
|
+
export type Params = {
|
|
9143
|
+
withCycle?: boolean;
|
|
9144
|
+
validityCheck?: boolean;
|
|
9145
|
+
populatesKeys?: PopulatedKeys[];
|
|
9146
|
+
[key: string]: any; // integration_meta.
|
|
9147
|
+
};
|
|
9148
|
+
export type Result = (Data | PopulatedDoc) & {
|
|
9149
|
+
cycle?: Cycle.Schema;
|
|
9150
|
+
validityCheck?: ValidityCheck;
|
|
9151
|
+
};
|
|
9117
9152
|
}
|
|
9118
9153
|
export namespace Create {
|
|
9119
9154
|
export type Body = CreateBody;
|
|
@@ -9299,6 +9334,14 @@ export namespace Service {
|
|
|
9299
9334
|
updatedAt?: Date;
|
|
9300
9335
|
}
|
|
9301
9336
|
|
|
9337
|
+
type PopulatedKeys =
|
|
9338
|
+
| "asset_part_unit"
|
|
9339
|
+
| "warehouse"
|
|
9340
|
+
| "teams"
|
|
9341
|
+
| "custom_status"
|
|
9342
|
+
| "meadia"
|
|
9343
|
+
| "signature";
|
|
9344
|
+
|
|
9302
9345
|
export namespace Find {
|
|
9303
9346
|
export type Params = DefaultPaginationQueryParams & {
|
|
9304
9347
|
_id?: StringId[] | StringId;
|
|
@@ -9324,14 +9367,7 @@ export namespace Service {
|
|
|
9324
9367
|
to_createdAt?: number;
|
|
9325
9368
|
from_updatedAt?: number;
|
|
9326
9369
|
to_updatedAt?: number;
|
|
9327
|
-
populatesKeys?:
|
|
9328
|
-
| "asset_part_unit"
|
|
9329
|
-
| "warehouse"
|
|
9330
|
-
| "teams"
|
|
9331
|
-
| "custom_status"
|
|
9332
|
-
| "meadia"
|
|
9333
|
-
| "signature"
|
|
9334
|
-
)[];
|
|
9370
|
+
populatesKeys?: PopulatedKeys[];
|
|
9335
9371
|
sortBy?: {
|
|
9336
9372
|
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
9337
9373
|
type: "asc" | "desc";
|
|
@@ -9343,8 +9379,17 @@ export namespace Service {
|
|
|
9343
9379
|
}
|
|
9344
9380
|
}
|
|
9345
9381
|
export namespace Get {
|
|
9346
|
-
export type ID =
|
|
9347
|
-
export type
|
|
9382
|
+
export type ID = StringId;
|
|
9383
|
+
export type Params = {
|
|
9384
|
+
withCycle?: boolean;
|
|
9385
|
+
validityCheck?: boolean;
|
|
9386
|
+
populatesKeys?: PopulatedKeys[];
|
|
9387
|
+
[key: string]: any; // integration_meta.
|
|
9388
|
+
};
|
|
9389
|
+
export type Result = (Data | PopulatedDoc) & {
|
|
9390
|
+
cycle?: Cycle.Schema;
|
|
9391
|
+
validityCheck?: ValidityCheck;
|
|
9392
|
+
};
|
|
9348
9393
|
}
|
|
9349
9394
|
export namespace Create {
|
|
9350
9395
|
export type Body = CreateBody;
|
|
@@ -10659,6 +10704,10 @@ export interface AdminOrRep {
|
|
|
10659
10704
|
admin?: StringId;
|
|
10660
10705
|
rep?: StringId;
|
|
10661
10706
|
}
|
|
10707
|
+
interface ValidityCheck {
|
|
10708
|
+
valid: boolean;
|
|
10709
|
+
reasons: { message: string; code: string }[];
|
|
10710
|
+
}
|
|
10662
10711
|
type PopulatedMediaStorage = Pick<
|
|
10663
10712
|
Service.MediaStorage.MediaStorageSchema,
|
|
10664
10713
|
| "_id"
|