repzo 1.0.81 → 1.0.83
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/changelog.md +12 -0
- package/lib/index.d.ts +199 -84
- package/lib/index.js +238 -0
- package/lib/types/index.d.ts +975 -12
- package/package.json +2 -2
- package/src/index.ts +316 -0
- package/src/types/index.ts +883 -1
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repzo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.83",
|
|
4
4
|
"description": "Repzo TypeScript SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "npm run test",
|
|
9
9
|
"lint": "npx prettier --write .",
|
|
10
|
-
"build": "tsc"
|
|
10
|
+
"build": "tsc && npm run lint"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
package/src/index.ts
CHANGED
|
@@ -65,6 +65,19 @@ export default class Repzo {
|
|
|
65
65
|
return res.data;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
private async _patch(
|
|
69
|
+
baseUrl: string,
|
|
70
|
+
path: string,
|
|
71
|
+
body: Data,
|
|
72
|
+
params?: Params
|
|
73
|
+
) {
|
|
74
|
+
let res = await axios.put(baseUrl + path, body, {
|
|
75
|
+
params,
|
|
76
|
+
headers: this.headers,
|
|
77
|
+
});
|
|
78
|
+
return res.data;
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
private async _delete(baseUrl: string, path: string, params?: Params) {
|
|
69
82
|
let res = await axios.delete(baseUrl + path, {
|
|
70
83
|
params,
|
|
@@ -1689,6 +1702,7 @@ export default class Repzo {
|
|
|
1689
1702
|
);
|
|
1690
1703
|
},
|
|
1691
1704
|
};
|
|
1705
|
+
|
|
1692
1706
|
supplier = {
|
|
1693
1707
|
_path: "/supplier",
|
|
1694
1708
|
find: async (
|
|
@@ -3032,4 +3046,306 @@ export default class Repzo {
|
|
|
3032
3046
|
return res;
|
|
3033
3047
|
},
|
|
3034
3048
|
};
|
|
3049
|
+
|
|
3050
|
+
assetPartType = {
|
|
3051
|
+
_path: "/asset-part-type",
|
|
3052
|
+
find: async (
|
|
3053
|
+
params?: Service.AssetPartType.Find.Params
|
|
3054
|
+
): Promise<Service.AssetPartType.Find.Result> => {
|
|
3055
|
+
let res: Service.AssetPartType.Find.Result = await this._fetch(
|
|
3056
|
+
this.svAPIEndpoint,
|
|
3057
|
+
this.assetPartType._path,
|
|
3058
|
+
params
|
|
3059
|
+
);
|
|
3060
|
+
return res;
|
|
3061
|
+
},
|
|
3062
|
+
get: async (
|
|
3063
|
+
id: Service.AssetPartType.Get.ID
|
|
3064
|
+
): Promise<Service.AssetPartType.Get.Result> => {
|
|
3065
|
+
return await this._fetch(
|
|
3066
|
+
this.svAPIEndpoint,
|
|
3067
|
+
this.assetPartType._path + `/${id}`
|
|
3068
|
+
);
|
|
3069
|
+
},
|
|
3070
|
+
create: async (
|
|
3071
|
+
body: Service.AssetPartType.Create.Body
|
|
3072
|
+
): Promise<Service.AssetPartType.Create.Result> => {
|
|
3073
|
+
let res = await this._create(
|
|
3074
|
+
this.svAPIEndpoint,
|
|
3075
|
+
this.assetPartType._path,
|
|
3076
|
+
body
|
|
3077
|
+
);
|
|
3078
|
+
return res;
|
|
3079
|
+
},
|
|
3080
|
+
update: async (
|
|
3081
|
+
id: Service.AssetPartType.Update.ID,
|
|
3082
|
+
body: Service.AssetPartType.Update.Body
|
|
3083
|
+
): Promise<Service.AssetPartType.Update.Result> => {
|
|
3084
|
+
let res: Service.AssetPartType.Update.Result = await this._update(
|
|
3085
|
+
this.svAPIEndpoint,
|
|
3086
|
+
this.assetPartType._path + `/${id}`,
|
|
3087
|
+
body
|
|
3088
|
+
);
|
|
3089
|
+
return res;
|
|
3090
|
+
},
|
|
3091
|
+
remove: async (
|
|
3092
|
+
id: Service.AssetPartType.Remove.ID
|
|
3093
|
+
): Promise<Service.AssetPartType.Remove.Result> => {
|
|
3094
|
+
let res: Service.AssetPartType.Remove.Result = await this._delete(
|
|
3095
|
+
this.svAPIEndpoint,
|
|
3096
|
+
this.assetPartType._path + `/${id}`
|
|
3097
|
+
);
|
|
3098
|
+
return res;
|
|
3099
|
+
},
|
|
3100
|
+
};
|
|
3101
|
+
|
|
3102
|
+
assetPart = {
|
|
3103
|
+
_path: "/asset-part",
|
|
3104
|
+
find: async (
|
|
3105
|
+
params?: Service.AssetPart.Find.Params
|
|
3106
|
+
): Promise<Service.AssetPart.Find.Result> => {
|
|
3107
|
+
let res: Service.AssetPart.Find.Result = await this._fetch(
|
|
3108
|
+
this.svAPIEndpoint,
|
|
3109
|
+
this.assetPart._path,
|
|
3110
|
+
params
|
|
3111
|
+
);
|
|
3112
|
+
return res;
|
|
3113
|
+
},
|
|
3114
|
+
get: async (
|
|
3115
|
+
id: Service.AssetPart.Get.ID
|
|
3116
|
+
): Promise<Service.AssetPart.Get.Result> => {
|
|
3117
|
+
return await this._fetch(
|
|
3118
|
+
this.svAPIEndpoint,
|
|
3119
|
+
this.assetPart._path + `/${id}`
|
|
3120
|
+
);
|
|
3121
|
+
},
|
|
3122
|
+
create: async (
|
|
3123
|
+
body: Service.AssetPart.Create.Body
|
|
3124
|
+
): Promise<Service.AssetPart.Create.Result> => {
|
|
3125
|
+
let res = await this._create(
|
|
3126
|
+
this.svAPIEndpoint,
|
|
3127
|
+
this.assetPart._path,
|
|
3128
|
+
body
|
|
3129
|
+
);
|
|
3130
|
+
return res;
|
|
3131
|
+
},
|
|
3132
|
+
update: async (
|
|
3133
|
+
id: Service.AssetPart.Update.ID,
|
|
3134
|
+
body: Service.AssetPart.Update.Body
|
|
3135
|
+
): Promise<Service.AssetPart.Update.Result> => {
|
|
3136
|
+
let res: Service.AssetPart.Update.Result = await this._update(
|
|
3137
|
+
this.svAPIEndpoint,
|
|
3138
|
+
this.assetPart._path + `/${id}`,
|
|
3139
|
+
body
|
|
3140
|
+
);
|
|
3141
|
+
return res;
|
|
3142
|
+
},
|
|
3143
|
+
remove: async (
|
|
3144
|
+
id: Service.AssetPart.Remove.ID
|
|
3145
|
+
): Promise<Service.AssetPart.Remove.Result> => {
|
|
3146
|
+
let res: Service.AssetPart.Remove.Result = await this._delete(
|
|
3147
|
+
this.svAPIEndpoint,
|
|
3148
|
+
this.assetPart._path + `/${id}`
|
|
3149
|
+
);
|
|
3150
|
+
return res;
|
|
3151
|
+
},
|
|
3152
|
+
};
|
|
3153
|
+
|
|
3154
|
+
assetPartUnit = {
|
|
3155
|
+
_path: "/asset-part-unit",
|
|
3156
|
+
find: async (
|
|
3157
|
+
params?: Service.AssetPartUnit.Find.Params
|
|
3158
|
+
): Promise<Service.AssetPartUnit.Find.Result> => {
|
|
3159
|
+
let res: Service.AssetPartUnit.Find.Result = await this._fetch(
|
|
3160
|
+
this.svAPIEndpoint,
|
|
3161
|
+
this.assetPartUnit._path,
|
|
3162
|
+
params
|
|
3163
|
+
);
|
|
3164
|
+
return res;
|
|
3165
|
+
},
|
|
3166
|
+
get: async (
|
|
3167
|
+
id: Service.AssetPartUnit.Get.ID
|
|
3168
|
+
): Promise<Service.AssetPartUnit.Get.Result> => {
|
|
3169
|
+
return await this._fetch(
|
|
3170
|
+
this.svAPIEndpoint,
|
|
3171
|
+
this.assetPartUnit._path + `/${id}`
|
|
3172
|
+
);
|
|
3173
|
+
},
|
|
3174
|
+
update: async (
|
|
3175
|
+
id: Service.AssetPartUnit.Update.ID,
|
|
3176
|
+
body: Service.AssetPartUnit.Update.Body
|
|
3177
|
+
): Promise<Service.AssetPartUnit.Update.Result> => {
|
|
3178
|
+
let res: Service.AssetPartUnit.Update.Result = await this._update(
|
|
3179
|
+
this.svAPIEndpoint,
|
|
3180
|
+
this.assetPartUnit._path + `/${id}`,
|
|
3181
|
+
body
|
|
3182
|
+
);
|
|
3183
|
+
return res;
|
|
3184
|
+
},
|
|
3185
|
+
};
|
|
3186
|
+
|
|
3187
|
+
assetPartReceival = {
|
|
3188
|
+
_path: "/asset-part-receival",
|
|
3189
|
+
find: async (
|
|
3190
|
+
params?: Service.AssetPartReceival.Find.Params
|
|
3191
|
+
): Promise<Service.AssetPartReceival.Find.Result> => {
|
|
3192
|
+
let res: Service.AssetPartReceival.Find.Result = await this._fetch(
|
|
3193
|
+
this.svAPIEndpoint,
|
|
3194
|
+
this.assetPartReceival._path,
|
|
3195
|
+
params
|
|
3196
|
+
);
|
|
3197
|
+
return res;
|
|
3198
|
+
},
|
|
3199
|
+
get: async (
|
|
3200
|
+
id: Service.AssetPartReceival.Get.ID
|
|
3201
|
+
): Promise<Service.AssetPartReceival.Get.Result> => {
|
|
3202
|
+
return await this._fetch(
|
|
3203
|
+
this.svAPIEndpoint,
|
|
3204
|
+
this.assetPartReceival._path + `/${id}`
|
|
3205
|
+
);
|
|
3206
|
+
},
|
|
3207
|
+
create: async (
|
|
3208
|
+
body: Service.AssetPartReceival.Create.Body
|
|
3209
|
+
): Promise<Service.AssetPartReceival.Create.Result> => {
|
|
3210
|
+
let res = await this._create(
|
|
3211
|
+
this.svAPIEndpoint,
|
|
3212
|
+
this.assetPartReceival._path,
|
|
3213
|
+
body
|
|
3214
|
+
);
|
|
3215
|
+
return res;
|
|
3216
|
+
},
|
|
3217
|
+
update: async (
|
|
3218
|
+
id: Service.AssetPartReceival.Update.ID,
|
|
3219
|
+
body: Service.AssetPartReceival.Update.Body
|
|
3220
|
+
): Promise<Service.AssetPartReceival.Update.Result> => {
|
|
3221
|
+
let res: Service.AssetPartReceival.Update.Result = await this._update(
|
|
3222
|
+
this.svAPIEndpoint,
|
|
3223
|
+
this.assetPartReceival._path + `/${id}`,
|
|
3224
|
+
body
|
|
3225
|
+
);
|
|
3226
|
+
return res;
|
|
3227
|
+
},
|
|
3228
|
+
patch: async (
|
|
3229
|
+
params: Service.AssetPartReceival.Patch.Params,
|
|
3230
|
+
body: Service.AssetPartReceival.Patch.Body
|
|
3231
|
+
): Promise<Service.AssetPartReceival.Patch.Result> => {
|
|
3232
|
+
let res: Service.AssetPartReceival.Patch.Result = await this._patch(
|
|
3233
|
+
this.svAPIEndpoint,
|
|
3234
|
+
this.assetPartReceival._path,
|
|
3235
|
+
body,
|
|
3236
|
+
params
|
|
3237
|
+
);
|
|
3238
|
+
return res;
|
|
3239
|
+
},
|
|
3240
|
+
};
|
|
3241
|
+
|
|
3242
|
+
assetPartTransfer = {
|
|
3243
|
+
_path: "/asset-part-transfer",
|
|
3244
|
+
find: async (
|
|
3245
|
+
params?: Service.AssetPartTransfer.Find.Params
|
|
3246
|
+
): Promise<Service.AssetPartTransfer.Find.Result> => {
|
|
3247
|
+
let res: Service.AssetPartTransfer.Find.Result = await this._fetch(
|
|
3248
|
+
this.svAPIEndpoint,
|
|
3249
|
+
this.assetPartTransfer._path,
|
|
3250
|
+
params
|
|
3251
|
+
);
|
|
3252
|
+
return res;
|
|
3253
|
+
},
|
|
3254
|
+
get: async (
|
|
3255
|
+
id: Service.AssetPartTransfer.Get.ID
|
|
3256
|
+
): Promise<Service.AssetPartTransfer.Get.Result> => {
|
|
3257
|
+
return await this._fetch(
|
|
3258
|
+
this.svAPIEndpoint,
|
|
3259
|
+
this.assetPartTransfer._path + `/${id}`
|
|
3260
|
+
);
|
|
3261
|
+
},
|
|
3262
|
+
create: async (
|
|
3263
|
+
body: Service.AssetPartTransfer.Create.Body
|
|
3264
|
+
): Promise<Service.AssetPartTransfer.Create.Result> => {
|
|
3265
|
+
let res = await this._create(
|
|
3266
|
+
this.svAPIEndpoint,
|
|
3267
|
+
this.assetPartTransfer._path,
|
|
3268
|
+
body
|
|
3269
|
+
);
|
|
3270
|
+
return res;
|
|
3271
|
+
},
|
|
3272
|
+
update: async (
|
|
3273
|
+
id: Service.AssetPartTransfer.Update.ID,
|
|
3274
|
+
body: Service.AssetPartTransfer.Update.Body
|
|
3275
|
+
): Promise<Service.AssetPartTransfer.Update.Result> => {
|
|
3276
|
+
let res: Service.AssetPartTransfer.Update.Result = await this._update(
|
|
3277
|
+
this.svAPIEndpoint,
|
|
3278
|
+
this.assetPartTransfer._path + `/${id}`,
|
|
3279
|
+
body
|
|
3280
|
+
);
|
|
3281
|
+
return res;
|
|
3282
|
+
},
|
|
3283
|
+
patch: async (
|
|
3284
|
+
params: Service.AssetPartTransfer.Patch.Params,
|
|
3285
|
+
body: Service.AssetPartTransfer.Patch.Body
|
|
3286
|
+
): Promise<Service.AssetPartTransfer.Patch.Result> => {
|
|
3287
|
+
let res: Service.AssetPartTransfer.Patch.Result = await this._patch(
|
|
3288
|
+
this.svAPIEndpoint,
|
|
3289
|
+
this.assetPartTransfer._path,
|
|
3290
|
+
body,
|
|
3291
|
+
params
|
|
3292
|
+
);
|
|
3293
|
+
return res;
|
|
3294
|
+
},
|
|
3295
|
+
};
|
|
3296
|
+
|
|
3297
|
+
returnStoreAssetPartUnit = {
|
|
3298
|
+
_path: "/return-store-asset-part-unit",
|
|
3299
|
+
find: async (
|
|
3300
|
+
params?: Service.ReturnStoreAssetPartUnit.Find.Params
|
|
3301
|
+
): Promise<Service.ReturnStoreAssetPartUnit.Find.Result> => {
|
|
3302
|
+
let res: Service.ReturnStoreAssetPartUnit.Find.Result = await this._fetch(
|
|
3303
|
+
this.svAPIEndpoint,
|
|
3304
|
+
this.returnStoreAssetPartUnit._path,
|
|
3305
|
+
params
|
|
3306
|
+
);
|
|
3307
|
+
return res;
|
|
3308
|
+
},
|
|
3309
|
+
get: async (
|
|
3310
|
+
id: Service.ReturnStoreAssetPartUnit.Get.ID
|
|
3311
|
+
): Promise<Service.ReturnStoreAssetPartUnit.Get.Result> => {
|
|
3312
|
+
return await this._fetch(
|
|
3313
|
+
this.svAPIEndpoint,
|
|
3314
|
+
this.returnStoreAssetPartUnit._path + `/${id}`
|
|
3315
|
+
);
|
|
3316
|
+
},
|
|
3317
|
+
create: async (
|
|
3318
|
+
body: Service.ReturnStoreAssetPartUnit.Create.Body
|
|
3319
|
+
): Promise<Service.ReturnStoreAssetPartUnit.Create.Result> => {
|
|
3320
|
+
let res = await this._create(
|
|
3321
|
+
this.svAPIEndpoint,
|
|
3322
|
+
this.returnStoreAssetPartUnit._path,
|
|
3323
|
+
body
|
|
3324
|
+
);
|
|
3325
|
+
return res;
|
|
3326
|
+
},
|
|
3327
|
+
update: async (
|
|
3328
|
+
id: Service.ReturnStoreAssetPartUnit.Update.ID,
|
|
3329
|
+
body: Service.ReturnStoreAssetPartUnit.Update.Body
|
|
3330
|
+
): Promise<Service.ReturnStoreAssetPartUnit.Update.Result> => {
|
|
3331
|
+
let res: Service.ReturnStoreAssetPartUnit.Update.Result = await this._update(
|
|
3332
|
+
this.svAPIEndpoint,
|
|
3333
|
+
this.returnStoreAssetPartUnit._path + `/${id}`,
|
|
3334
|
+
body
|
|
3335
|
+
);
|
|
3336
|
+
return res;
|
|
3337
|
+
},
|
|
3338
|
+
patch: async (
|
|
3339
|
+
params: Service.ReturnStoreAssetPartUnit.Patch.Params,
|
|
3340
|
+
body: Service.ReturnStoreAssetPartUnit.Patch.Body
|
|
3341
|
+
): Promise<Service.ReturnStoreAssetPartUnit.Patch.Result> => {
|
|
3342
|
+
let res: Service.ReturnStoreAssetPartUnit.Patch.Result = await this._patch(
|
|
3343
|
+
this.svAPIEndpoint,
|
|
3344
|
+
this.returnStoreAssetPartUnit._path,
|
|
3345
|
+
body,
|
|
3346
|
+
params
|
|
3347
|
+
);
|
|
3348
|
+
return res;
|
|
3349
|
+
},
|
|
3350
|
+
};
|
|
3035
3351
|
}
|