@purveyors/sdk 0.7.1 → 0.9.0
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/dist/index.d.ts +1262 -442
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ interface paths {
|
|
|
201
201
|
content: {
|
|
202
202
|
"application/json": {
|
|
203
203
|
name: string;
|
|
204
|
-
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write")[];
|
|
204
|
+
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write" | "sales:write" | "tasting:write")[];
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
@@ -2942,13 +2942,274 @@ interface paths {
|
|
|
2942
2942
|
};
|
|
2943
2943
|
};
|
|
2944
2944
|
put?: never;
|
|
2945
|
-
|
|
2945
|
+
/**
|
|
2946
|
+
* Record an owner sale
|
|
2947
|
+
* @description Record a sale against one of the caller's own green-coffee inventory lots. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
|
|
2948
|
+
*/
|
|
2949
|
+
post: {
|
|
2950
|
+
parameters: {
|
|
2951
|
+
query?: never;
|
|
2952
|
+
header?: {
|
|
2953
|
+
"idempotency-key"?: string;
|
|
2954
|
+
};
|
|
2955
|
+
path?: never;
|
|
2956
|
+
cookie?: never;
|
|
2957
|
+
};
|
|
2958
|
+
requestBody?: {
|
|
2959
|
+
content: {
|
|
2960
|
+
"application/json": components["schemas"]["SalesCreateRequest"];
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
responses: {
|
|
2964
|
+
/** @description The created sale */
|
|
2965
|
+
201: {
|
|
2966
|
+
headers: {
|
|
2967
|
+
[name: string]: unknown;
|
|
2968
|
+
};
|
|
2969
|
+
content: {
|
|
2970
|
+
"application/json": components["schemas"]["SaleItemResponse"];
|
|
2971
|
+
};
|
|
2972
|
+
};
|
|
2973
|
+
/** @description Invalid query parameter */
|
|
2974
|
+
400: {
|
|
2975
|
+
headers: {
|
|
2976
|
+
[name: string]: unknown;
|
|
2977
|
+
};
|
|
2978
|
+
content: {
|
|
2979
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2980
|
+
};
|
|
2981
|
+
};
|
|
2982
|
+
/** @description Authentication required */
|
|
2983
|
+
401: {
|
|
2984
|
+
headers: {
|
|
2985
|
+
[name: string]: unknown;
|
|
2986
|
+
};
|
|
2987
|
+
content: {
|
|
2988
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2989
|
+
};
|
|
2990
|
+
};
|
|
2991
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
2992
|
+
403: {
|
|
2993
|
+
headers: {
|
|
2994
|
+
[name: string]: unknown;
|
|
2995
|
+
};
|
|
2996
|
+
content: {
|
|
2997
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2998
|
+
};
|
|
2999
|
+
};
|
|
3000
|
+
/** @description Write conflict: a request with this Idempotency-Key is already in flight */
|
|
3001
|
+
409: {
|
|
3002
|
+
headers: {
|
|
3003
|
+
[name: string]: unknown;
|
|
3004
|
+
};
|
|
3005
|
+
content: {
|
|
3006
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3007
|
+
};
|
|
3008
|
+
};
|
|
3009
|
+
/** @description Per-user mutation throttle exceeded; retry after a short wait */
|
|
3010
|
+
429: {
|
|
3011
|
+
headers: {
|
|
3012
|
+
[name: string]: unknown;
|
|
3013
|
+
};
|
|
3014
|
+
content: {
|
|
3015
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3016
|
+
};
|
|
3017
|
+
};
|
|
3018
|
+
/** @description Sales writes are not enabled in this environment */
|
|
3019
|
+
503: {
|
|
3020
|
+
headers: {
|
|
3021
|
+
[name: string]: unknown;
|
|
3022
|
+
};
|
|
3023
|
+
content: {
|
|
3024
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3025
|
+
};
|
|
3026
|
+
};
|
|
3027
|
+
};
|
|
3028
|
+
};
|
|
2946
3029
|
delete?: never;
|
|
2947
3030
|
options?: never;
|
|
2948
3031
|
head?: never;
|
|
2949
3032
|
patch?: never;
|
|
2950
3033
|
trace?: never;
|
|
2951
3034
|
};
|
|
3035
|
+
"/v1/sales/{id}": {
|
|
3036
|
+
parameters: {
|
|
3037
|
+
query?: never;
|
|
3038
|
+
header?: never;
|
|
3039
|
+
path?: never;
|
|
3040
|
+
cookie?: never;
|
|
3041
|
+
};
|
|
3042
|
+
get?: never;
|
|
3043
|
+
put?: never;
|
|
3044
|
+
post?: never;
|
|
3045
|
+
/**
|
|
3046
|
+
* Delete an owner sale
|
|
3047
|
+
* @description Delete one of the caller's own sales. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
|
|
3048
|
+
*/
|
|
3049
|
+
delete: {
|
|
3050
|
+
parameters: {
|
|
3051
|
+
query?: never;
|
|
3052
|
+
header?: never;
|
|
3053
|
+
path: {
|
|
3054
|
+
id: number;
|
|
3055
|
+
};
|
|
3056
|
+
cookie?: never;
|
|
3057
|
+
};
|
|
3058
|
+
requestBody?: never;
|
|
3059
|
+
responses: {
|
|
3060
|
+
/** @description The sale was deleted */
|
|
3061
|
+
200: {
|
|
3062
|
+
headers: {
|
|
3063
|
+
[name: string]: unknown;
|
|
3064
|
+
};
|
|
3065
|
+
content: {
|
|
3066
|
+
"application/json": components["schemas"]["SaleDeleteResponse"];
|
|
3067
|
+
};
|
|
3068
|
+
};
|
|
3069
|
+
/** @description Invalid query parameter */
|
|
3070
|
+
400: {
|
|
3071
|
+
headers: {
|
|
3072
|
+
[name: string]: unknown;
|
|
3073
|
+
};
|
|
3074
|
+
content: {
|
|
3075
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
/** @description Authentication required */
|
|
3079
|
+
401: {
|
|
3080
|
+
headers: {
|
|
3081
|
+
[name: string]: unknown;
|
|
3082
|
+
};
|
|
3083
|
+
content: {
|
|
3084
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3085
|
+
};
|
|
3086
|
+
};
|
|
3087
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
3088
|
+
403: {
|
|
3089
|
+
headers: {
|
|
3090
|
+
[name: string]: unknown;
|
|
3091
|
+
};
|
|
3092
|
+
content: {
|
|
3093
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3094
|
+
};
|
|
3095
|
+
};
|
|
3096
|
+
/** @description No such sale owned by the caller */
|
|
3097
|
+
404: {
|
|
3098
|
+
headers: {
|
|
3099
|
+
[name: string]: unknown;
|
|
3100
|
+
};
|
|
3101
|
+
content: {
|
|
3102
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3103
|
+
};
|
|
3104
|
+
};
|
|
3105
|
+
/** @description Per-user mutation throttle exceeded; retry after a short wait */
|
|
3106
|
+
429: {
|
|
3107
|
+
headers: {
|
|
3108
|
+
[name: string]: unknown;
|
|
3109
|
+
};
|
|
3110
|
+
content: {
|
|
3111
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3112
|
+
};
|
|
3113
|
+
};
|
|
3114
|
+
/** @description Sales writes are not enabled in this environment */
|
|
3115
|
+
503: {
|
|
3116
|
+
headers: {
|
|
3117
|
+
[name: string]: unknown;
|
|
3118
|
+
};
|
|
3119
|
+
content: {
|
|
3120
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3121
|
+
};
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
options?: never;
|
|
3126
|
+
head?: never;
|
|
3127
|
+
/**
|
|
3128
|
+
* Update an owner sale
|
|
3129
|
+
* @description Update fields on one of the caller's own sales. The sales table carries no last_updated column, so no If-Match optimistic concurrency is offered. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
|
|
3130
|
+
*/
|
|
3131
|
+
patch: {
|
|
3132
|
+
parameters: {
|
|
3133
|
+
query?: never;
|
|
3134
|
+
header?: never;
|
|
3135
|
+
path: {
|
|
3136
|
+
id: number;
|
|
3137
|
+
};
|
|
3138
|
+
cookie?: never;
|
|
3139
|
+
};
|
|
3140
|
+
requestBody?: {
|
|
3141
|
+
content: {
|
|
3142
|
+
"application/json": components["schemas"]["SalesUpdateRequest"];
|
|
3143
|
+
};
|
|
3144
|
+
};
|
|
3145
|
+
responses: {
|
|
3146
|
+
/** @description The updated sale */
|
|
3147
|
+
200: {
|
|
3148
|
+
headers: {
|
|
3149
|
+
[name: string]: unknown;
|
|
3150
|
+
};
|
|
3151
|
+
content: {
|
|
3152
|
+
"application/json": components["schemas"]["SaleItemResponse"];
|
|
3153
|
+
};
|
|
3154
|
+
};
|
|
3155
|
+
/** @description Invalid query parameter */
|
|
3156
|
+
400: {
|
|
3157
|
+
headers: {
|
|
3158
|
+
[name: string]: unknown;
|
|
3159
|
+
};
|
|
3160
|
+
content: {
|
|
3161
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3162
|
+
};
|
|
3163
|
+
};
|
|
3164
|
+
/** @description Authentication required */
|
|
3165
|
+
401: {
|
|
3166
|
+
headers: {
|
|
3167
|
+
[name: string]: unknown;
|
|
3168
|
+
};
|
|
3169
|
+
content: {
|
|
3170
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3171
|
+
};
|
|
3172
|
+
};
|
|
3173
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
3174
|
+
403: {
|
|
3175
|
+
headers: {
|
|
3176
|
+
[name: string]: unknown;
|
|
3177
|
+
};
|
|
3178
|
+
content: {
|
|
3179
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3180
|
+
};
|
|
3181
|
+
};
|
|
3182
|
+
/** @description No such sale owned by the caller */
|
|
3183
|
+
404: {
|
|
3184
|
+
headers: {
|
|
3185
|
+
[name: string]: unknown;
|
|
3186
|
+
};
|
|
3187
|
+
content: {
|
|
3188
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3189
|
+
};
|
|
3190
|
+
};
|
|
3191
|
+
/** @description Per-user mutation throttle exceeded; retry after a short wait */
|
|
3192
|
+
429: {
|
|
3193
|
+
headers: {
|
|
3194
|
+
[name: string]: unknown;
|
|
3195
|
+
};
|
|
3196
|
+
content: {
|
|
3197
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3198
|
+
};
|
|
3199
|
+
};
|
|
3200
|
+
/** @description Sales writes are not enabled in this environment */
|
|
3201
|
+
503: {
|
|
3202
|
+
headers: {
|
|
3203
|
+
[name: string]: unknown;
|
|
3204
|
+
};
|
|
3205
|
+
content: {
|
|
3206
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3207
|
+
};
|
|
3208
|
+
};
|
|
3209
|
+
};
|
|
3210
|
+
};
|
|
3211
|
+
trace?: never;
|
|
3212
|
+
};
|
|
2952
3213
|
"/v1/tasting/{catalogId}": {
|
|
2953
3214
|
parameters: {
|
|
2954
3215
|
query?: never;
|
|
@@ -3028,20 +3289,119 @@ interface paths {
|
|
|
3028
3289
|
patch?: never;
|
|
3029
3290
|
trace?: never;
|
|
3030
3291
|
};
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3292
|
+
"/v1/tasting/inventory/{inventoryId}": {
|
|
3293
|
+
parameters: {
|
|
3294
|
+
query?: never;
|
|
3295
|
+
header?: never;
|
|
3296
|
+
path?: never;
|
|
3297
|
+
cookie?: never;
|
|
3298
|
+
};
|
|
3299
|
+
get?: never;
|
|
3300
|
+
/**
|
|
3301
|
+
* Rate an owned inventory lot
|
|
3302
|
+
* @description Atomically replace the caller's cupping notes for one owned green-coffee inventory lot. Session members write through RLS; owner-bound API keys require the exact tasting:write scope.
|
|
3303
|
+
*/
|
|
3304
|
+
put: {
|
|
3305
|
+
parameters: {
|
|
3306
|
+
query?: never;
|
|
3307
|
+
header?: never;
|
|
3308
|
+
path: {
|
|
3309
|
+
inventoryId: number;
|
|
3310
|
+
};
|
|
3311
|
+
cookie?: never;
|
|
3312
|
+
};
|
|
3313
|
+
requestBody: {
|
|
3314
|
+
content: {
|
|
3315
|
+
"application/json": components["schemas"]["TastingRateRequest"];
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
responses: {
|
|
3319
|
+
/** @description Canonical inventory tasting */
|
|
3320
|
+
200: {
|
|
3321
|
+
headers: {
|
|
3322
|
+
[name: string]: unknown;
|
|
3323
|
+
};
|
|
3324
|
+
content: {
|
|
3325
|
+
"application/json": components["schemas"]["TastingRateResponse"];
|
|
3326
|
+
};
|
|
3327
|
+
};
|
|
3328
|
+
/** @description Invalid rating */
|
|
3329
|
+
400: {
|
|
3330
|
+
headers: {
|
|
3331
|
+
[name: string]: unknown;
|
|
3332
|
+
};
|
|
3333
|
+
content: {
|
|
3334
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3337
|
+
/** @description Authentication required */
|
|
3338
|
+
401: {
|
|
3339
|
+
headers: {
|
|
3340
|
+
[name: string]: unknown;
|
|
3341
|
+
};
|
|
3342
|
+
content: {
|
|
3343
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3344
|
+
};
|
|
3345
|
+
};
|
|
3346
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
3347
|
+
403: {
|
|
3348
|
+
headers: {
|
|
3349
|
+
[name: string]: unknown;
|
|
3350
|
+
};
|
|
3351
|
+
content: {
|
|
3352
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3353
|
+
};
|
|
3354
|
+
};
|
|
3355
|
+
/** @description Inventory tasting not found */
|
|
3356
|
+
404: {
|
|
3357
|
+
headers: {
|
|
3358
|
+
[name: string]: unknown;
|
|
3359
|
+
};
|
|
3360
|
+
content: {
|
|
3361
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3362
|
+
};
|
|
3363
|
+
};
|
|
3364
|
+
/** @description Per-user mutation throttle exceeded */
|
|
3365
|
+
429: {
|
|
3366
|
+
headers: {
|
|
3367
|
+
[name: string]: unknown;
|
|
3368
|
+
};
|
|
3369
|
+
content: {
|
|
3370
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3371
|
+
};
|
|
3372
|
+
};
|
|
3373
|
+
/** @description Tasting writes are disabled */
|
|
3374
|
+
503: {
|
|
3375
|
+
headers: {
|
|
3376
|
+
[name: string]: unknown;
|
|
3377
|
+
};
|
|
3378
|
+
content: {
|
|
3379
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3380
|
+
};
|
|
3381
|
+
};
|
|
3382
|
+
};
|
|
3383
|
+
};
|
|
3384
|
+
post?: never;
|
|
3385
|
+
delete?: never;
|
|
3386
|
+
options?: never;
|
|
3387
|
+
head?: never;
|
|
3388
|
+
patch?: never;
|
|
3389
|
+
trace?: never;
|
|
3390
|
+
};
|
|
3391
|
+
}
|
|
3392
|
+
interface components {
|
|
3393
|
+
schemas: {
|
|
3394
|
+
HealthResponse: {
|
|
3395
|
+
/** @enum {string} */
|
|
3396
|
+
status: "ok";
|
|
3397
|
+
/** @enum {string} */
|
|
3398
|
+
service: "parchment-api";
|
|
3399
|
+
version: string;
|
|
3400
|
+
/** Format: date-time */
|
|
3401
|
+
timestamp: string;
|
|
3402
|
+
};
|
|
3403
|
+
DiscoveryResponse: {
|
|
3404
|
+
/** @enum {string} */
|
|
3045
3405
|
product: "Parchment";
|
|
3046
3406
|
namespace: string;
|
|
3047
3407
|
health: string;
|
|
@@ -4886,6 +5246,69 @@ interface components {
|
|
|
4886
5246
|
};
|
|
4887
5247
|
};
|
|
4888
5248
|
};
|
|
5249
|
+
SaleItemResponse: {
|
|
5250
|
+
data: components["schemas"]["SaleResource"];
|
|
5251
|
+
meta: {
|
|
5252
|
+
/** @enum {string} */
|
|
5253
|
+
resource: "sales";
|
|
5254
|
+
/** @enum {string} */
|
|
5255
|
+
namespace: "/v1/sales";
|
|
5256
|
+
/** @enum {string} */
|
|
5257
|
+
version: "v1";
|
|
5258
|
+
auth: {
|
|
5259
|
+
/** @enum {string} */
|
|
5260
|
+
kind: "session" | "api-key";
|
|
5261
|
+
/** @enum {string|null} */
|
|
5262
|
+
role: "admin" | "member" | "viewer" | null;
|
|
5263
|
+
/** @enum {string|null} */
|
|
5264
|
+
apiPlan: "viewer" | "member" | "enterprise" | null;
|
|
5265
|
+
};
|
|
5266
|
+
};
|
|
5267
|
+
};
|
|
5268
|
+
SalesCreateRequest: {
|
|
5269
|
+
/** @description green_coffee_inv.id of the caller's own inventory lot this sale draws from. */
|
|
5270
|
+
greenCoffeeInvId: number;
|
|
5271
|
+
/** @description Ounces sold (positive). */
|
|
5272
|
+
ozSold: number;
|
|
5273
|
+
/** @description Sale price (non-negative). */
|
|
5274
|
+
price: number;
|
|
5275
|
+
/** @description Buyer name (optional). */
|
|
5276
|
+
buyer?: string;
|
|
5277
|
+
/** @description Batch label for the sale (optional). */
|
|
5278
|
+
batchName?: string;
|
|
5279
|
+
/** @description Sale date (YYYY-MM-DD); defaults to today (UTC). */
|
|
5280
|
+
sellDate?: string;
|
|
5281
|
+
};
|
|
5282
|
+
SalesUpdateRequest: {
|
|
5283
|
+
ozSold?: number;
|
|
5284
|
+
price?: number;
|
|
5285
|
+
buyer?: string;
|
|
5286
|
+
batchName?: string;
|
|
5287
|
+
sellDate?: string;
|
|
5288
|
+
};
|
|
5289
|
+
SaleDeleteResponse: {
|
|
5290
|
+
data: {
|
|
5291
|
+
id: number;
|
|
5292
|
+
/** @enum {boolean} */
|
|
5293
|
+
deleted: true;
|
|
5294
|
+
};
|
|
5295
|
+
meta: {
|
|
5296
|
+
/** @enum {string} */
|
|
5297
|
+
resource: "sales";
|
|
5298
|
+
/** @enum {string} */
|
|
5299
|
+
namespace: "/v1/sales";
|
|
5300
|
+
/** @enum {string} */
|
|
5301
|
+
version: "v1";
|
|
5302
|
+
auth: {
|
|
5303
|
+
/** @enum {string} */
|
|
5304
|
+
kind: "session" | "api-key";
|
|
5305
|
+
/** @enum {string|null} */
|
|
5306
|
+
role: "admin" | "member" | "viewer" | null;
|
|
5307
|
+
/** @enum {string|null} */
|
|
5308
|
+
apiPlan: "viewer" | "member" | "enterprise" | null;
|
|
5309
|
+
};
|
|
5310
|
+
};
|
|
5311
|
+
};
|
|
4889
5312
|
SupplierTastingNotes: {
|
|
4890
5313
|
/** @enum {string} */
|
|
4891
5314
|
source: "supplier";
|
|
@@ -4932,6 +5355,47 @@ interface components {
|
|
|
4932
5355
|
};
|
|
4933
5356
|
};
|
|
4934
5357
|
};
|
|
5358
|
+
InventoryTasting: {
|
|
5359
|
+
inventoryId: number;
|
|
5360
|
+
catalogId: number | null;
|
|
5361
|
+
aroma: number;
|
|
5362
|
+
body: number;
|
|
5363
|
+
acidity: number;
|
|
5364
|
+
sweetness: number;
|
|
5365
|
+
aftertaste: number;
|
|
5366
|
+
brewMethod: string | null;
|
|
5367
|
+
notes: string | null;
|
|
5368
|
+
/** Format: date-time */
|
|
5369
|
+
ratedAt: string;
|
|
5370
|
+
};
|
|
5371
|
+
TastingRateResponse: {
|
|
5372
|
+
data: components["schemas"]["InventoryTasting"];
|
|
5373
|
+
meta: {
|
|
5374
|
+
/** @enum {string} */
|
|
5375
|
+
resource: "tasting";
|
|
5376
|
+
/** @enum {string} */
|
|
5377
|
+
namespace: "/v1/tasting/inventory";
|
|
5378
|
+
/** @enum {string} */
|
|
5379
|
+
version: "v1";
|
|
5380
|
+
auth: {
|
|
5381
|
+
/** @enum {string} */
|
|
5382
|
+
kind: "session" | "api-key";
|
|
5383
|
+
/** @enum {string|null} */
|
|
5384
|
+
role: "admin" | "member" | "viewer" | null;
|
|
5385
|
+
/** @enum {string|null} */
|
|
5386
|
+
apiPlan: "viewer" | "member" | "enterprise" | null;
|
|
5387
|
+
};
|
|
5388
|
+
};
|
|
5389
|
+
};
|
|
5390
|
+
TastingRateRequest: {
|
|
5391
|
+
aroma: number;
|
|
5392
|
+
body: number;
|
|
5393
|
+
acidity: number;
|
|
5394
|
+
sweetness: number;
|
|
5395
|
+
aftertaste: number;
|
|
5396
|
+
brewMethod?: string;
|
|
5397
|
+
notes?: string;
|
|
5398
|
+
};
|
|
4935
5399
|
};
|
|
4936
5400
|
responses: never;
|
|
4937
5401
|
parameters: never;
|
|
@@ -5019,8 +5483,14 @@ type RoastImportRequest = NonNullable<paths["/v1/roasts/imports"]["post"]["reque
|
|
|
5019
5483
|
type RoastArtisanImportReplaceRequest = NonNullable<paths["/v1/roasts/{id}/artisan-import"]["put"]["requestBody"]>["content"]["application/json"];
|
|
5020
5484
|
/** Query parameters for {@link ParchmentClient.sales.list}. */
|
|
5021
5485
|
type SalesListQuery = NonNullable<paths["/v1/sales"]["get"]["parameters"]["query"]>;
|
|
5486
|
+
/** Request body for {@link ParchmentClient.sales.create}. */
|
|
5487
|
+
type SalesCreateRequest = NonNullable<paths["/v1/sales"]["post"]["requestBody"]>["content"]["application/json"];
|
|
5488
|
+
/** Request body for {@link ParchmentClient.sales.update}. */
|
|
5489
|
+
type SalesUpdateRequest = NonNullable<paths["/v1/sales/{id}"]["patch"]["requestBody"]>["content"]["application/json"];
|
|
5022
5490
|
/** Query parameters for {@link ParchmentClient.tasting.get}. */
|
|
5023
5491
|
type TastingGetQuery = NonNullable<paths["/v1/tasting/{catalogId}"]["get"]["parameters"]["query"]>;
|
|
5492
|
+
/** Request body for {@link ParchmentClient.tasting.rate}. */
|
|
5493
|
+
type TastingRateRequest = NonNullable<paths["/v1/tasting/inventory/{inventoryId}"]["put"]["requestBody"]>["content"]["application/json"];
|
|
5024
5494
|
/** Request body for {@link ParchmentClient.apiKeys.create}. */
|
|
5025
5495
|
type ApiKeyCreateRequest = NonNullable<paths["/v1/api-keys"]["post"]["requestBody"]>["content"]["application/json"];
|
|
5026
5496
|
/**
|
|
@@ -5241,7 +5711,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
5241
5711
|
content: {
|
|
5242
5712
|
"application/json": {
|
|
5243
5713
|
name: string;
|
|
5244
|
-
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write")[];
|
|
5714
|
+
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write" | "sales:write" | "tasting:write")[];
|
|
5245
5715
|
};
|
|
5246
5716
|
};
|
|
5247
5717
|
};
|
|
@@ -5291,14 +5761,14 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
5291
5761
|
[name: string]: unknown;
|
|
5292
5762
|
};
|
|
5293
5763
|
content: {
|
|
5294
|
-
"application/json": components["schemas"]
|
|
5764
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5295
5765
|
};
|
|
5296
5766
|
};
|
|
5297
5767
|
};
|
|
5298
5768
|
}, {
|
|
5299
5769
|
body: {
|
|
5300
5770
|
name: string;
|
|
5301
|
-
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write")[];
|
|
5771
|
+
scopes?: ("catalog:read" | "inventory:read" | "roast:read" | "sales:read" | "tasting:read" | "inventory:write" | "roast:write" | "sales:write" | "tasting:write")[];
|
|
5302
5772
|
};
|
|
5303
5773
|
}, `${string}/${string}`>>;
|
|
5304
5774
|
/** Revoke an API key owned by the authenticated session user. */
|
|
@@ -5547,9 +6017,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
5547
6017
|
pricePerLbMax?: number | null;
|
|
5548
6018
|
processing_base_method?: string;
|
|
5549
6019
|
fermentation_type?: string;
|
|
5550
|
-
process_additive
|
|
5551
|
-
/** Fetch supplier notes plus the caller's own latest tasting notes. */
|
|
5552
|
-
? /** Fetch supplier notes plus the caller's own latest tasting notes. */: string;
|
|
6020
|
+
process_additive?: string;
|
|
5553
6021
|
has_additives?: "true" | "false";
|
|
5554
6022
|
processing_disclosure_level?: string;
|
|
5555
6023
|
processing_confidence_min?: number | null;
|
|
@@ -6743,78 +7211,434 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6743
7211
|
page?: number;
|
|
6744
7212
|
limit?: number;
|
|
6745
7213
|
};
|
|
6746
|
-
header?: never;
|
|
6747
|
-
path: {
|
|
6748
|
-
id: string;
|
|
7214
|
+
header?: never;
|
|
7215
|
+
path: {
|
|
7216
|
+
id: string;
|
|
7217
|
+
};
|
|
7218
|
+
cookie?: never;
|
|
7219
|
+
};
|
|
7220
|
+
requestBody?: never;
|
|
7221
|
+
responses: {
|
|
7222
|
+
200: {
|
|
7223
|
+
headers: {
|
|
7224
|
+
[name: string]: unknown;
|
|
7225
|
+
};
|
|
7226
|
+
content: {
|
|
7227
|
+
"application/json": components["schemas"]["SourcingBriefMatchesResponse"];
|
|
7228
|
+
};
|
|
7229
|
+
};
|
|
7230
|
+
400: {
|
|
7231
|
+
headers: {
|
|
7232
|
+
[name: string]: unknown;
|
|
7233
|
+
};
|
|
7234
|
+
content: {
|
|
7235
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7236
|
+
};
|
|
7237
|
+
};
|
|
7238
|
+
401: {
|
|
7239
|
+
headers: {
|
|
7240
|
+
[name: string]: unknown;
|
|
7241
|
+
};
|
|
7242
|
+
content: {
|
|
7243
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7244
|
+
};
|
|
7245
|
+
};
|
|
7246
|
+
403: {
|
|
7247
|
+
headers: {
|
|
7248
|
+
[name: string]: unknown;
|
|
7249
|
+
};
|
|
7250
|
+
content: {
|
|
7251
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7252
|
+
};
|
|
7253
|
+
};
|
|
7254
|
+
404: {
|
|
7255
|
+
headers: {
|
|
7256
|
+
[name: string]: unknown;
|
|
7257
|
+
};
|
|
7258
|
+
content: {
|
|
7259
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7260
|
+
};
|
|
7261
|
+
};
|
|
7262
|
+
};
|
|
7263
|
+
}, {
|
|
7264
|
+
params: {
|
|
7265
|
+
path: {
|
|
7266
|
+
id: string;
|
|
7267
|
+
};
|
|
7268
|
+
query: {
|
|
7269
|
+
page?: number;
|
|
7270
|
+
limit?: number;
|
|
7271
|
+
} | undefined;
|
|
7272
|
+
};
|
|
7273
|
+
}, `${string}/${string}`>>;
|
|
7274
|
+
};
|
|
7275
|
+
};
|
|
7276
|
+
inventory: {
|
|
7277
|
+
/** List the caller's own green-coffee inventory (owner-scoped). */
|
|
7278
|
+
list: (query?: InventoryListQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
7279
|
+
parameters: {
|
|
7280
|
+
query?: {
|
|
7281
|
+
stocked_only?: boolean | null;
|
|
7282
|
+
catalogId?: number;
|
|
7283
|
+
purchaseDateStart?: string;
|
|
7284
|
+
purchaseDateEnd?: string;
|
|
7285
|
+
origin?: string;
|
|
7286
|
+
limit?: number;
|
|
7287
|
+
offset?: number | null;
|
|
7288
|
+
};
|
|
7289
|
+
header?: never;
|
|
7290
|
+
path?: never;
|
|
7291
|
+
cookie?: never;
|
|
7292
|
+
};
|
|
7293
|
+
requestBody?: never;
|
|
7294
|
+
responses: {
|
|
7295
|
+
200: {
|
|
7296
|
+
headers: {
|
|
7297
|
+
[name: string]: unknown;
|
|
7298
|
+
};
|
|
7299
|
+
content: {
|
|
7300
|
+
"application/json": components["schemas"]["InventoryListResponse"];
|
|
7301
|
+
};
|
|
7302
|
+
};
|
|
7303
|
+
400: {
|
|
7304
|
+
headers: {
|
|
7305
|
+
[name: string]: unknown;
|
|
7306
|
+
};
|
|
7307
|
+
content: {
|
|
7308
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7309
|
+
};
|
|
7310
|
+
};
|
|
7311
|
+
401: {
|
|
7312
|
+
headers: {
|
|
7313
|
+
[name: string]: unknown;
|
|
7314
|
+
};
|
|
7315
|
+
content: {
|
|
7316
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7317
|
+
};
|
|
7318
|
+
};
|
|
7319
|
+
403: {
|
|
7320
|
+
headers: {
|
|
7321
|
+
[name: string]: unknown;
|
|
7322
|
+
};
|
|
7323
|
+
content: {
|
|
7324
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7325
|
+
};
|
|
7326
|
+
};
|
|
7327
|
+
};
|
|
7328
|
+
}, {
|
|
7329
|
+
params: {
|
|
7330
|
+
query: {
|
|
7331
|
+
stocked_only?: boolean | null;
|
|
7332
|
+
catalogId?: number;
|
|
7333
|
+
purchaseDateStart?: string;
|
|
7334
|
+
purchaseDateEnd?: string;
|
|
7335
|
+
origin?: string;
|
|
7336
|
+
limit?: number;
|
|
7337
|
+
offset?: number | null;
|
|
7338
|
+
} | undefined;
|
|
7339
|
+
};
|
|
7340
|
+
}, `${string}/${string}`>>;
|
|
7341
|
+
/**
|
|
7342
|
+
* Create an owner inventory lot. Requires a session or an owner-bound API
|
|
7343
|
+
* key carrying the exact `inventory:write` scope. Pass `idempotencyKey`
|
|
7344
|
+
* to make retries safe: the same key replays the original result, and a
|
|
7345
|
+
* concurrent duplicate gets 409 while the first is in flight.
|
|
7346
|
+
*/
|
|
7347
|
+
create: (body: InventoryCreateRequest, options?: {
|
|
7348
|
+
idempotencyKey?: string;
|
|
7349
|
+
}) => Promise<openapi_fetch.FetchResponse<{
|
|
7350
|
+
parameters: {
|
|
7351
|
+
query?: never;
|
|
7352
|
+
header?: {
|
|
7353
|
+
"idempotency-key"?: string;
|
|
7354
|
+
};
|
|
7355
|
+
path?: never;
|
|
7356
|
+
cookie?: never;
|
|
7357
|
+
};
|
|
7358
|
+
requestBody?: {
|
|
7359
|
+
content: {
|
|
7360
|
+
"application/json": components["schemas"]["InventoryCreateRequest"];
|
|
7361
|
+
};
|
|
7362
|
+
};
|
|
7363
|
+
responses: {
|
|
7364
|
+
201: {
|
|
7365
|
+
headers: {
|
|
7366
|
+
[name: string]: unknown;
|
|
7367
|
+
};
|
|
7368
|
+
content: {
|
|
7369
|
+
"application/json": components["schemas"]["InventoryItemResponse"];
|
|
7370
|
+
};
|
|
7371
|
+
};
|
|
7372
|
+
400: {
|
|
7373
|
+
headers: {
|
|
7374
|
+
[name: string]: unknown;
|
|
7375
|
+
};
|
|
7376
|
+
content: {
|
|
7377
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7378
|
+
};
|
|
7379
|
+
};
|
|
7380
|
+
401: {
|
|
7381
|
+
headers: {
|
|
7382
|
+
[name: string]: unknown;
|
|
7383
|
+
};
|
|
7384
|
+
content: {
|
|
7385
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7386
|
+
};
|
|
7387
|
+
};
|
|
7388
|
+
403: {
|
|
7389
|
+
headers: {
|
|
7390
|
+
[name: string]: unknown;
|
|
7391
|
+
};
|
|
7392
|
+
content: {
|
|
7393
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7394
|
+
};
|
|
7395
|
+
};
|
|
7396
|
+
409: {
|
|
7397
|
+
headers: {
|
|
7398
|
+
[name: string]: unknown;
|
|
7399
|
+
};
|
|
7400
|
+
content: {
|
|
7401
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7402
|
+
};
|
|
7403
|
+
};
|
|
7404
|
+
429: {
|
|
7405
|
+
headers: {
|
|
7406
|
+
[name: string]: unknown;
|
|
7407
|
+
};
|
|
7408
|
+
content: {
|
|
7409
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7410
|
+
};
|
|
7411
|
+
};
|
|
7412
|
+
503: {
|
|
7413
|
+
headers: {
|
|
7414
|
+
[name: string]: unknown;
|
|
7415
|
+
};
|
|
7416
|
+
content: {
|
|
7417
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7418
|
+
};
|
|
7419
|
+
};
|
|
7420
|
+
};
|
|
7421
|
+
}, {
|
|
7422
|
+
body: {
|
|
7423
|
+
catalogId: number;
|
|
7424
|
+
qty: number;
|
|
7425
|
+
purchaseDate?: string;
|
|
7426
|
+
cost?: number;
|
|
7427
|
+
taxShip?: number;
|
|
7428
|
+
notes?: string;
|
|
7429
|
+
};
|
|
7430
|
+
params: {
|
|
7431
|
+
header: {
|
|
7432
|
+
"idempotency-key": string;
|
|
7433
|
+
};
|
|
7434
|
+
} | undefined;
|
|
7435
|
+
}, `${string}/${string}`>>;
|
|
7436
|
+
/**
|
|
7437
|
+
* Update one of the caller's own inventory rows. Pass `ifMatch` (the
|
|
7438
|
+
* row's `last_updated`) to enable optimistic concurrency (409 on mismatch).
|
|
7439
|
+
*/
|
|
7440
|
+
update: (id: number, body: InventoryUpdateRequest, options?: {
|
|
7441
|
+
ifMatch?: string;
|
|
7442
|
+
}) => Promise<openapi_fetch.FetchResponse<{
|
|
7443
|
+
parameters: {
|
|
7444
|
+
query?: never;
|
|
7445
|
+
header?: {
|
|
7446
|
+
"if-match"?: string;
|
|
7447
|
+
};
|
|
7448
|
+
path: {
|
|
7449
|
+
id: number;
|
|
7450
|
+
};
|
|
7451
|
+
cookie?: never;
|
|
7452
|
+
};
|
|
7453
|
+
requestBody?: {
|
|
7454
|
+
content: {
|
|
7455
|
+
"application/json": components["schemas"]["InventoryUpdateRequest"];
|
|
7456
|
+
};
|
|
7457
|
+
};
|
|
7458
|
+
responses: {
|
|
7459
|
+
200: {
|
|
7460
|
+
headers: {
|
|
7461
|
+
[name: string]: unknown;
|
|
7462
|
+
};
|
|
7463
|
+
content: {
|
|
7464
|
+
"application/json": components["schemas"]["InventoryItemResponse"];
|
|
7465
|
+
};
|
|
7466
|
+
};
|
|
7467
|
+
400: {
|
|
7468
|
+
headers: {
|
|
7469
|
+
[name: string]: unknown;
|
|
7470
|
+
};
|
|
7471
|
+
content: {
|
|
7472
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7473
|
+
};
|
|
7474
|
+
};
|
|
7475
|
+
401: {
|
|
7476
|
+
headers: {
|
|
7477
|
+
[name: string]: unknown;
|
|
7478
|
+
};
|
|
7479
|
+
content: {
|
|
7480
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7481
|
+
};
|
|
7482
|
+
};
|
|
7483
|
+
403: {
|
|
7484
|
+
headers: {
|
|
7485
|
+
[name: string]: unknown;
|
|
7486
|
+
};
|
|
7487
|
+
content: {
|
|
7488
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7489
|
+
};
|
|
7490
|
+
};
|
|
7491
|
+
404: {
|
|
7492
|
+
headers: {
|
|
7493
|
+
[name: string]: unknown;
|
|
7494
|
+
};
|
|
7495
|
+
content: {
|
|
7496
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7497
|
+
};
|
|
7498
|
+
};
|
|
7499
|
+
409: {
|
|
7500
|
+
headers: {
|
|
7501
|
+
[name: string]: unknown;
|
|
7502
|
+
};
|
|
7503
|
+
content: {
|
|
7504
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7505
|
+
};
|
|
7506
|
+
};
|
|
7507
|
+
429: {
|
|
7508
|
+
headers: {
|
|
7509
|
+
[name: string]: unknown;
|
|
7510
|
+
};
|
|
7511
|
+
content: {
|
|
7512
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7513
|
+
};
|
|
7514
|
+
};
|
|
7515
|
+
503: {
|
|
7516
|
+
headers: {
|
|
7517
|
+
[name: string]: unknown;
|
|
7518
|
+
};
|
|
7519
|
+
content: {
|
|
7520
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7521
|
+
};
|
|
7522
|
+
};
|
|
7523
|
+
};
|
|
7524
|
+
}, {
|
|
7525
|
+
params: {
|
|
7526
|
+
path: {
|
|
7527
|
+
id: number;
|
|
7528
|
+
};
|
|
7529
|
+
header: {
|
|
7530
|
+
"if-match": string;
|
|
7531
|
+
} | undefined;
|
|
7532
|
+
};
|
|
7533
|
+
body: {
|
|
7534
|
+
qty?: number;
|
|
7535
|
+
cost?: number;
|
|
7536
|
+
taxShip?: number;
|
|
7537
|
+
notes?: string;
|
|
7538
|
+
stocked?: boolean;
|
|
7539
|
+
};
|
|
7540
|
+
}, `${string}/${string}`>>;
|
|
7541
|
+
/**
|
|
7542
|
+
* Delete one of the caller's own inventory rows. Returns 409 if dependent
|
|
7543
|
+
* roast profiles or sales exist (no force-cascade).
|
|
7544
|
+
*/
|
|
7545
|
+
delete: (id: number) => Promise<openapi_fetch.FetchResponse<{
|
|
7546
|
+
parameters: {
|
|
7547
|
+
query?: never;
|
|
7548
|
+
header?: never;
|
|
7549
|
+
path: {
|
|
7550
|
+
id: number;
|
|
7551
|
+
};
|
|
7552
|
+
cookie?: never;
|
|
7553
|
+
};
|
|
7554
|
+
requestBody?: never;
|
|
7555
|
+
responses: {
|
|
7556
|
+
200: {
|
|
7557
|
+
headers: {
|
|
7558
|
+
[name: string]: unknown;
|
|
7559
|
+
};
|
|
7560
|
+
content: {
|
|
7561
|
+
"application/json": components["schemas"]["InventoryDeleteResponse"];
|
|
7562
|
+
};
|
|
7563
|
+
};
|
|
7564
|
+
400: {
|
|
7565
|
+
headers: {
|
|
7566
|
+
[name: string]: unknown;
|
|
7567
|
+
};
|
|
7568
|
+
content: {
|
|
7569
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7570
|
+
};
|
|
7571
|
+
};
|
|
7572
|
+
401: {
|
|
7573
|
+
headers: {
|
|
7574
|
+
[name: string]: unknown;
|
|
7575
|
+
};
|
|
7576
|
+
content: {
|
|
7577
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7578
|
+
};
|
|
7579
|
+
};
|
|
7580
|
+
403: {
|
|
7581
|
+
headers: {
|
|
7582
|
+
[name: string]: unknown;
|
|
7583
|
+
};
|
|
7584
|
+
content: {
|
|
7585
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7586
|
+
};
|
|
7587
|
+
};
|
|
7588
|
+
404: {
|
|
7589
|
+
headers: {
|
|
7590
|
+
[name: string]: unknown;
|
|
7591
|
+
};
|
|
7592
|
+
content: {
|
|
7593
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7594
|
+
};
|
|
7595
|
+
};
|
|
7596
|
+
409: {
|
|
7597
|
+
headers: {
|
|
7598
|
+
[name: string]: unknown;
|
|
7599
|
+
};
|
|
7600
|
+
content: {
|
|
7601
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6749
7602
|
};
|
|
6750
|
-
cookie?: never;
|
|
6751
7603
|
};
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
headers: {
|
|
6756
|
-
[name: string]: unknown;
|
|
6757
|
-
};
|
|
6758
|
-
content: {
|
|
6759
|
-
"application/json": components["schemas"]["SourcingBriefMatchesResponse"];
|
|
6760
|
-
};
|
|
6761
|
-
};
|
|
6762
|
-
400: {
|
|
6763
|
-
headers: {
|
|
6764
|
-
[name: string]: unknown;
|
|
6765
|
-
};
|
|
6766
|
-
content: {
|
|
6767
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
6768
|
-
};
|
|
7604
|
+
429: {
|
|
7605
|
+
headers: {
|
|
7606
|
+
[name: string]: unknown;
|
|
6769
7607
|
};
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
[name: string]: unknown;
|
|
6773
|
-
};
|
|
6774
|
-
content: {
|
|
6775
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
6776
|
-
};
|
|
7608
|
+
content: {
|
|
7609
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6777
7610
|
};
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
content: {
|
|
6783
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
6784
|
-
};
|
|
7611
|
+
};
|
|
7612
|
+
503: {
|
|
7613
|
+
headers: {
|
|
7614
|
+
[name: string]: unknown;
|
|
6785
7615
|
};
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
[name: string]: unknown;
|
|
6789
|
-
};
|
|
6790
|
-
content: {
|
|
6791
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
6792
|
-
};
|
|
7616
|
+
content: {
|
|
7617
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6793
7618
|
};
|
|
6794
7619
|
};
|
|
6795
|
-
}
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
query: {
|
|
6801
|
-
page?: number;
|
|
6802
|
-
limit?: number;
|
|
6803
|
-
} | undefined;
|
|
7620
|
+
};
|
|
7621
|
+
}, {
|
|
7622
|
+
params: {
|
|
7623
|
+
path: {
|
|
7624
|
+
id: number;
|
|
6804
7625
|
};
|
|
6805
|
-
}
|
|
6806
|
-
}
|
|
7626
|
+
};
|
|
7627
|
+
}, `${string}/${string}`>>;
|
|
6807
7628
|
};
|
|
6808
|
-
|
|
6809
|
-
/** List the caller's own
|
|
6810
|
-
list: (query?:
|
|
7629
|
+
roasts: {
|
|
7630
|
+
/** List the caller's own roast profiles (owner-scoped). */
|
|
7631
|
+
list: (query?: RoastListQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
6811
7632
|
parameters: {
|
|
6812
7633
|
query?: {
|
|
7634
|
+
coffee_id?: number;
|
|
7635
|
+
roast_id?: number;
|
|
7636
|
+
batch_name?: string;
|
|
7637
|
+
coffee_name?: string;
|
|
7638
|
+
date_start?: string;
|
|
7639
|
+
date_end?: string;
|
|
6813
7640
|
stocked_only?: boolean | null;
|
|
6814
|
-
|
|
6815
|
-
purchaseDateStart?: string;
|
|
6816
|
-
purchaseDateEnd?: string;
|
|
6817
|
-
origin?: string;
|
|
7641
|
+
catalog_id?: number;
|
|
6818
7642
|
limit?: number;
|
|
6819
7643
|
offset?: number | null;
|
|
6820
7644
|
};
|
|
@@ -6829,7 +7653,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6829
7653
|
[name: string]: unknown;
|
|
6830
7654
|
};
|
|
6831
7655
|
content: {
|
|
6832
|
-
"application/json": components["schemas"]["
|
|
7656
|
+
"application/json": components["schemas"]["RoastListResponse"];
|
|
6833
7657
|
};
|
|
6834
7658
|
};
|
|
6835
7659
|
400: {
|
|
@@ -6860,23 +7684,95 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6860
7684
|
}, {
|
|
6861
7685
|
params: {
|
|
6862
7686
|
query: {
|
|
7687
|
+
coffee_id?: number;
|
|
7688
|
+
roast_id?: number;
|
|
7689
|
+
batch_name?: string;
|
|
7690
|
+
coffee_name?: string;
|
|
7691
|
+
date_start?: string;
|
|
7692
|
+
date_end?: string;
|
|
6863
7693
|
stocked_only?: boolean | null;
|
|
6864
|
-
|
|
6865
|
-
purchaseDateStart?: string;
|
|
6866
|
-
purchaseDateEnd?: string;
|
|
6867
|
-
origin?: string;
|
|
7694
|
+
catalog_id?: number;
|
|
6868
7695
|
limit?: number;
|
|
6869
7696
|
offset?: number | null;
|
|
6870
7697
|
} | undefined;
|
|
6871
7698
|
};
|
|
6872
7699
|
}, `${string}/${string}`>>;
|
|
6873
7700
|
/**
|
|
6874
|
-
*
|
|
6875
|
-
*
|
|
6876
|
-
* to make retries safe: the same key replays the original result, and a
|
|
6877
|
-
* concurrent duplicate gets 409 while the first is in flight.
|
|
7701
|
+
* Fetch one of the caller's roast profiles by id, optionally with its
|
|
7702
|
+
* temperature curve (`includeTemps`) and event markers (`includeEvents`).
|
|
6878
7703
|
*/
|
|
6879
|
-
|
|
7704
|
+
get: (id: string, query?: RoastGetQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
7705
|
+
parameters: {
|
|
7706
|
+
query?: {
|
|
7707
|
+
includeTemps?: boolean | null;
|
|
7708
|
+
includeEvents?: boolean | null;
|
|
7709
|
+
};
|
|
7710
|
+
header?: never;
|
|
7711
|
+
path: {
|
|
7712
|
+
id: string;
|
|
7713
|
+
};
|
|
7714
|
+
cookie?: never;
|
|
7715
|
+
};
|
|
7716
|
+
requestBody?: never;
|
|
7717
|
+
responses: {
|
|
7718
|
+
200: {
|
|
7719
|
+
headers: {
|
|
7720
|
+
[name: string]: unknown;
|
|
7721
|
+
};
|
|
7722
|
+
content: {
|
|
7723
|
+
"application/json": components["schemas"]["RoastDetailResponse"];
|
|
7724
|
+
};
|
|
7725
|
+
};
|
|
7726
|
+
400: {
|
|
7727
|
+
headers: {
|
|
7728
|
+
[name: string]: unknown;
|
|
7729
|
+
};
|
|
7730
|
+
content: {
|
|
7731
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7732
|
+
};
|
|
7733
|
+
};
|
|
7734
|
+
401: {
|
|
7735
|
+
headers: {
|
|
7736
|
+
[name: string]: unknown;
|
|
7737
|
+
};
|
|
7738
|
+
content: {
|
|
7739
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7740
|
+
};
|
|
7741
|
+
};
|
|
7742
|
+
403: {
|
|
7743
|
+
headers: {
|
|
7744
|
+
[name: string]: unknown;
|
|
7745
|
+
};
|
|
7746
|
+
content: {
|
|
7747
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7748
|
+
};
|
|
7749
|
+
};
|
|
7750
|
+
404: {
|
|
7751
|
+
headers: {
|
|
7752
|
+
[name: string]: unknown;
|
|
7753
|
+
};
|
|
7754
|
+
content: {
|
|
7755
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7756
|
+
};
|
|
7757
|
+
};
|
|
7758
|
+
};
|
|
7759
|
+
}, {
|
|
7760
|
+
params: {
|
|
7761
|
+
path: {
|
|
7762
|
+
id: string;
|
|
7763
|
+
};
|
|
7764
|
+
query: {
|
|
7765
|
+
includeTemps?: boolean | null;
|
|
7766
|
+
includeEvents?: boolean | null;
|
|
7767
|
+
} | undefined;
|
|
7768
|
+
};
|
|
7769
|
+
}, `${string}/${string}`>>;
|
|
7770
|
+
/**
|
|
7771
|
+
* Create an owner roast profile, optionally with nested temperature/event
|
|
7772
|
+
* rows. Requires a session or an owner-bound API key carrying the exact
|
|
7773
|
+
* `roast:write` scope. Pass `idempotencyKey` to make retries safe.
|
|
7774
|
+
*/
|
|
7775
|
+
create: (body: RoastCreateRequest, options?: {
|
|
6880
7776
|
idempotencyKey?: string;
|
|
6881
7777
|
}) => Promise<openapi_fetch.FetchResponse<{
|
|
6882
7778
|
parameters: {
|
|
@@ -6887,9 +7783,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6887
7783
|
path?: never;
|
|
6888
7784
|
cookie?: never;
|
|
6889
7785
|
};
|
|
6890
|
-
requestBody
|
|
7786
|
+
requestBody: {
|
|
6891
7787
|
content: {
|
|
6892
|
-
"application/json": components["schemas"]["
|
|
7788
|
+
"application/json": components["schemas"]["RoastCreateRequest"];
|
|
6893
7789
|
};
|
|
6894
7790
|
};
|
|
6895
7791
|
responses: {
|
|
@@ -6898,7 +7794,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6898
7794
|
[name: string]: unknown;
|
|
6899
7795
|
};
|
|
6900
7796
|
content: {
|
|
6901
|
-
"application/json": components["schemas"]["
|
|
7797
|
+
"application/json": components["schemas"]["RoastDetailResponse"];
|
|
6902
7798
|
};
|
|
6903
7799
|
};
|
|
6904
7800
|
400: {
|
|
@@ -6925,6 +7821,14 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6925
7821
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
6926
7822
|
};
|
|
6927
7823
|
};
|
|
7824
|
+
404: {
|
|
7825
|
+
headers: {
|
|
7826
|
+
[name: string]: unknown;
|
|
7827
|
+
};
|
|
7828
|
+
content: {
|
|
7829
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7830
|
+
};
|
|
7831
|
+
};
|
|
6928
7832
|
409: {
|
|
6929
7833
|
headers: {
|
|
6930
7834
|
[name: string]: unknown;
|
|
@@ -6952,12 +7856,42 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6952
7856
|
};
|
|
6953
7857
|
}, {
|
|
6954
7858
|
body: {
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
7859
|
+
coffeeId: number;
|
|
7860
|
+
coffeeName?: string;
|
|
7861
|
+
batchName?: string;
|
|
7862
|
+
roastDate?: string;
|
|
7863
|
+
ozIn?: number;
|
|
7864
|
+
ozOut?: number;
|
|
7865
|
+
weightLossPercent?: number;
|
|
6960
7866
|
notes?: string;
|
|
7867
|
+
targets?: string;
|
|
7868
|
+
roasterType?: string;
|
|
7869
|
+
roasterSize?: string;
|
|
7870
|
+
temperatureUnit?: "F" | "C";
|
|
7871
|
+
totalRoastTime?: number;
|
|
7872
|
+
developmentPercent?: number;
|
|
7873
|
+
dataSource?: string;
|
|
7874
|
+
roastUuid?: string;
|
|
7875
|
+
fcStartTime?: number;
|
|
7876
|
+
fcStartTemp?: number;
|
|
7877
|
+
fcEndTime?: number;
|
|
7878
|
+
fcEndTemp?: number;
|
|
7879
|
+
dropTime?: number;
|
|
7880
|
+
dropTemp?: number;
|
|
7881
|
+
chargeTemp?: number;
|
|
7882
|
+
chargeTime?: number;
|
|
7883
|
+
tpTime?: number;
|
|
7884
|
+
tpTemp?: number;
|
|
7885
|
+
totalRor?: number;
|
|
7886
|
+
dryPercent?: number;
|
|
7887
|
+
maillardPercent?: number;
|
|
7888
|
+
auc?: number;
|
|
7889
|
+
dryPhaseRor?: number;
|
|
7890
|
+
midPhaseRor?: number;
|
|
7891
|
+
finishPhaseRor?: number;
|
|
7892
|
+
dryPhaseDeltaTemp?: number;
|
|
7893
|
+
temperatures?: components["schemas"]["RoastTemperatureInput"][];
|
|
7894
|
+
events?: components["schemas"]["RoastEventInput"][];
|
|
6961
7895
|
};
|
|
6962
7896
|
params: {
|
|
6963
7897
|
header: {
|
|
@@ -6966,10 +7900,10 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6966
7900
|
} | undefined;
|
|
6967
7901
|
}, `${string}/${string}`>>;
|
|
6968
7902
|
/**
|
|
6969
|
-
* Update one of the caller's own
|
|
7903
|
+
* Update one of the caller's own roast profiles. Pass `ifMatch` (the
|
|
6970
7904
|
* row's `last_updated`) to enable optimistic concurrency (409 on mismatch).
|
|
6971
7905
|
*/
|
|
6972
|
-
update: (id: number, body:
|
|
7906
|
+
update: (id: number, body: RoastUpdateRequest, options?: {
|
|
6973
7907
|
ifMatch?: string;
|
|
6974
7908
|
}) => Promise<openapi_fetch.FetchResponse<{
|
|
6975
7909
|
parameters: {
|
|
@@ -6982,9 +7916,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6982
7916
|
};
|
|
6983
7917
|
cookie?: never;
|
|
6984
7918
|
};
|
|
6985
|
-
requestBody
|
|
7919
|
+
requestBody: {
|
|
6986
7920
|
content: {
|
|
6987
|
-
"application/json": components["schemas"]["
|
|
7921
|
+
"application/json": components["schemas"]["RoastUpdateRequest"];
|
|
6988
7922
|
};
|
|
6989
7923
|
};
|
|
6990
7924
|
responses: {
|
|
@@ -6993,7 +7927,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
6993
7927
|
[name: string]: unknown;
|
|
6994
7928
|
};
|
|
6995
7929
|
content: {
|
|
6996
|
-
"application/json": components["schemas"]["
|
|
7930
|
+
"application/json": components["schemas"]["RoastDetailResponse"];
|
|
6997
7931
|
};
|
|
6998
7932
|
};
|
|
6999
7933
|
400: {
|
|
@@ -7063,17 +7997,44 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7063
7997
|
} | undefined;
|
|
7064
7998
|
};
|
|
7065
7999
|
body: {
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
8000
|
+
coffeeName?: string;
|
|
8001
|
+
batchName?: string;
|
|
8002
|
+
roastDate?: string;
|
|
8003
|
+
ozIn?: number;
|
|
8004
|
+
ozOut?: number;
|
|
8005
|
+
weightLossPercent?: number;
|
|
7069
8006
|
notes?: string;
|
|
7070
|
-
|
|
8007
|
+
targets?: string;
|
|
8008
|
+
roasterType?: string;
|
|
8009
|
+
roasterSize?: string;
|
|
8010
|
+
temperatureUnit?: "F" | "C";
|
|
8011
|
+
totalRoastTime?: number;
|
|
8012
|
+
developmentPercent?: number;
|
|
8013
|
+
dataSource?: string;
|
|
8014
|
+
roastUuid?: string;
|
|
8015
|
+
fcStartTime?: number;
|
|
8016
|
+
fcStartTemp?: number;
|
|
8017
|
+
fcEndTime?: number;
|
|
8018
|
+
fcEndTemp?: number;
|
|
8019
|
+
dropTime?: number;
|
|
8020
|
+
dropTemp?: number;
|
|
8021
|
+
chargeTemp?: number;
|
|
8022
|
+
chargeTime?: number;
|
|
8023
|
+
tpTime?: number;
|
|
8024
|
+
tpTemp?: number;
|
|
8025
|
+
totalRor?: number;
|
|
8026
|
+
dryPercent?: number;
|
|
8027
|
+
maillardPercent?: number;
|
|
8028
|
+
auc?: number;
|
|
8029
|
+
dryPhaseRor?: number;
|
|
8030
|
+
midPhaseRor?: number;
|
|
8031
|
+
finishPhaseRor?: number;
|
|
8032
|
+
dryPhaseDeltaTemp?: number;
|
|
8033
|
+
temperatures?: components["schemas"]["RoastTemperatureInput"][];
|
|
8034
|
+
events?: components["schemas"]["RoastEventInput"][];
|
|
7071
8035
|
};
|
|
7072
8036
|
}, `${string}/${string}`>>;
|
|
7073
|
-
/**
|
|
7074
|
-
* Delete one of the caller's own inventory rows. Returns 409 if dependent
|
|
7075
|
-
* roast profiles or sales exist (no force-cascade).
|
|
7076
|
-
*/
|
|
8037
|
+
/** Delete one of the caller's own roast profiles. */
|
|
7077
8038
|
delete: (id: number) => Promise<openapi_fetch.FetchResponse<{
|
|
7078
8039
|
parameters: {
|
|
7079
8040
|
query?: never;
|
|
@@ -7090,7 +8051,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7090
8051
|
[name: string]: unknown;
|
|
7091
8052
|
};
|
|
7092
8053
|
content: {
|
|
7093
|
-
"application/json": components["schemas"]["
|
|
8054
|
+
"application/json": components["schemas"]["RoastDeleteResponse"];
|
|
7094
8055
|
};
|
|
7095
8056
|
};
|
|
7096
8057
|
400: {
|
|
@@ -7125,14 +8086,6 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7125
8086
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7126
8087
|
};
|
|
7127
8088
|
};
|
|
7128
|
-
409: {
|
|
7129
|
-
headers: {
|
|
7130
|
-
[name: string]: unknown;
|
|
7131
|
-
};
|
|
7132
|
-
content: {
|
|
7133
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7134
|
-
};
|
|
7135
|
-
};
|
|
7136
8089
|
429: {
|
|
7137
8090
|
headers: {
|
|
7138
8091
|
[name: string]: unknown;
|
|
@@ -7157,35 +8110,36 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7157
8110
|
};
|
|
7158
8111
|
};
|
|
7159
8112
|
}, `${string}/${string}`>>;
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
8113
|
+
/**
|
|
8114
|
+
* Create a roast profile from an Artisan `.alog` file against one of the
|
|
8115
|
+
* caller's green-coffee lots, persisting the imported curve, events, and
|
|
8116
|
+
* an artisan_import_log entry atomically. Requires a session or an
|
|
8117
|
+
* owner-bound API key carrying the exact `roast:write` scope. Pass
|
|
8118
|
+
* `idempotencyKey` to make retries safe.
|
|
8119
|
+
*/
|
|
8120
|
+
import: (body: RoastImportRequest, options?: {
|
|
8121
|
+
idempotencyKey?: string;
|
|
8122
|
+
}) => Promise<openapi_fetch.FetchResponse<{
|
|
7164
8123
|
parameters: {
|
|
7165
|
-
query?:
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
batch_name?: string;
|
|
7169
|
-
coffee_name?: string;
|
|
7170
|
-
date_start?: string;
|
|
7171
|
-
date_end?: string;
|
|
7172
|
-
stocked_only?: boolean | null;
|
|
7173
|
-
catalog_id?: number;
|
|
7174
|
-
limit?: number;
|
|
7175
|
-
offset?: number | null;
|
|
8124
|
+
query?: never;
|
|
8125
|
+
header?: {
|
|
8126
|
+
"idempotency-key"?: string;
|
|
7176
8127
|
};
|
|
7177
|
-
header?: never;
|
|
7178
8128
|
path?: never;
|
|
7179
8129
|
cookie?: never;
|
|
7180
8130
|
};
|
|
7181
|
-
requestBody
|
|
8131
|
+
requestBody: {
|
|
8132
|
+
content: {
|
|
8133
|
+
"application/json": components["schemas"]["RoastImportCreateRequest"];
|
|
8134
|
+
};
|
|
8135
|
+
};
|
|
7182
8136
|
responses: {
|
|
7183
|
-
|
|
8137
|
+
201: {
|
|
7184
8138
|
headers: {
|
|
7185
8139
|
[name: string]: unknown;
|
|
7186
8140
|
};
|
|
7187
8141
|
content: {
|
|
7188
|
-
"application/json": components["schemas"]["
|
|
8142
|
+
"application/json": components["schemas"]["RoastImportResponse"];
|
|
7189
8143
|
};
|
|
7190
8144
|
};
|
|
7191
8145
|
400: {
|
|
@@ -7212,50 +8166,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7212
8166
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7213
8167
|
};
|
|
7214
8168
|
};
|
|
7215
|
-
|
|
7216
|
-
}, {
|
|
7217
|
-
params: {
|
|
7218
|
-
query: {
|
|
7219
|
-
coffee_id?: number;
|
|
7220
|
-
roast_id?: number;
|
|
7221
|
-
batch_name?: string;
|
|
7222
|
-
coffee_name?: string;
|
|
7223
|
-
date_start?: string;
|
|
7224
|
-
date_end?: string;
|
|
7225
|
-
stocked_only?: boolean | null;
|
|
7226
|
-
catalog_id?: number;
|
|
7227
|
-
limit?: number;
|
|
7228
|
-
offset?: number | null;
|
|
7229
|
-
} | undefined;
|
|
7230
|
-
};
|
|
7231
|
-
}, `${string}/${string}`>>;
|
|
7232
|
-
/**
|
|
7233
|
-
* Fetch one of the caller's roast profiles by id, optionally with its
|
|
7234
|
-
* temperature curve (`includeTemps`) and event markers (`includeEvents`).
|
|
7235
|
-
*/
|
|
7236
|
-
get: (id: string, query?: RoastGetQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
7237
|
-
parameters: {
|
|
7238
|
-
query?: {
|
|
7239
|
-
includeTemps?: boolean | null;
|
|
7240
|
-
includeEvents?: boolean | null;
|
|
7241
|
-
};
|
|
7242
|
-
header?: never;
|
|
7243
|
-
path: {
|
|
7244
|
-
id: string;
|
|
7245
|
-
};
|
|
7246
|
-
cookie?: never;
|
|
7247
|
-
};
|
|
7248
|
-
requestBody?: never;
|
|
7249
|
-
responses: {
|
|
7250
|
-
200: {
|
|
7251
|
-
headers: {
|
|
7252
|
-
[name: string]: unknown;
|
|
7253
|
-
};
|
|
7254
|
-
content: {
|
|
7255
|
-
"application/json": components["schemas"]["RoastDetailResponse"];
|
|
7256
|
-
};
|
|
7257
|
-
};
|
|
7258
|
-
400: {
|
|
8169
|
+
404: {
|
|
7259
8170
|
headers: {
|
|
7260
8171
|
[name: string]: unknown;
|
|
7261
8172
|
};
|
|
@@ -7263,7 +8174,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7263
8174
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7264
8175
|
};
|
|
7265
8176
|
};
|
|
7266
|
-
|
|
8177
|
+
409: {
|
|
7267
8178
|
headers: {
|
|
7268
8179
|
[name: string]: unknown;
|
|
7269
8180
|
};
|
|
@@ -7271,7 +8182,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7271
8182
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7272
8183
|
};
|
|
7273
8184
|
};
|
|
7274
|
-
|
|
8185
|
+
429: {
|
|
7275
8186
|
headers: {
|
|
7276
8187
|
[name: string]: unknown;
|
|
7277
8188
|
};
|
|
@@ -7279,7 +8190,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7279
8190
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7280
8191
|
};
|
|
7281
8192
|
};
|
|
7282
|
-
|
|
8193
|
+
503: {
|
|
7283
8194
|
headers: {
|
|
7284
8195
|
[name: string]: unknown;
|
|
7285
8196
|
};
|
|
@@ -7289,44 +8200,53 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7289
8200
|
};
|
|
7290
8201
|
};
|
|
7291
8202
|
}, {
|
|
8203
|
+
body: {
|
|
8204
|
+
fileName: string;
|
|
8205
|
+
fileContent: string;
|
|
8206
|
+
coffeeId: number;
|
|
8207
|
+
batchName?: string;
|
|
8208
|
+
ozIn?: number;
|
|
8209
|
+
roastNotes?: string;
|
|
8210
|
+
roastTargets?: string;
|
|
8211
|
+
fileSize?: number;
|
|
8212
|
+
};
|
|
7292
8213
|
params: {
|
|
7293
|
-
|
|
7294
|
-
|
|
8214
|
+
header: {
|
|
8215
|
+
"idempotency-key": string;
|
|
7295
8216
|
};
|
|
7296
|
-
|
|
7297
|
-
includeTemps?: boolean | null;
|
|
7298
|
-
includeEvents?: boolean | null;
|
|
7299
|
-
} | undefined;
|
|
7300
|
-
};
|
|
8217
|
+
} | undefined;
|
|
7301
8218
|
}, `${string}/${string}`>>;
|
|
7302
8219
|
/**
|
|
7303
|
-
*
|
|
7304
|
-
*
|
|
7305
|
-
*
|
|
8220
|
+
* Replace the Artisan import data on one of the caller's existing roasts,
|
|
8221
|
+
* re-deriving its curve, events, and computed metrics while preserving the
|
|
8222
|
+
* roast's identity. Pass `ifMatch` (the roast's `last_updated`) to enable
|
|
8223
|
+
* optimistic concurrency (409 on mismatch).
|
|
7306
8224
|
*/
|
|
7307
|
-
|
|
7308
|
-
|
|
8225
|
+
replaceArtisanImport: (id: number, body: RoastArtisanImportReplaceRequest, options?: {
|
|
8226
|
+
ifMatch?: string;
|
|
7309
8227
|
}) => Promise<openapi_fetch.FetchResponse<{
|
|
7310
8228
|
parameters: {
|
|
7311
8229
|
query?: never;
|
|
7312
8230
|
header?: {
|
|
7313
|
-
"
|
|
8231
|
+
"if-match"?: string;
|
|
8232
|
+
};
|
|
8233
|
+
path: {
|
|
8234
|
+
id: number;
|
|
7314
8235
|
};
|
|
7315
|
-
path?: never;
|
|
7316
8236
|
cookie?: never;
|
|
7317
8237
|
};
|
|
7318
8238
|
requestBody: {
|
|
7319
8239
|
content: {
|
|
7320
|
-
"application/json": components["schemas"]["
|
|
8240
|
+
"application/json": components["schemas"]["RoastArtisanImportReplaceRequest"];
|
|
7321
8241
|
};
|
|
7322
8242
|
};
|
|
7323
8243
|
responses: {
|
|
7324
|
-
|
|
8244
|
+
200: {
|
|
7325
8245
|
headers: {
|
|
7326
8246
|
[name: string]: unknown;
|
|
7327
8247
|
};
|
|
7328
8248
|
content: {
|
|
7329
|
-
"application/json": components["schemas"]["
|
|
8249
|
+
"application/json": components["schemas"]["RoastImportResponse"];
|
|
7330
8250
|
};
|
|
7331
8251
|
};
|
|
7332
8252
|
400: {
|
|
@@ -7387,87 +8307,41 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7387
8307
|
};
|
|
7388
8308
|
};
|
|
7389
8309
|
}, {
|
|
7390
|
-
body: {
|
|
7391
|
-
coffeeId: number;
|
|
7392
|
-
coffeeName?: string;
|
|
7393
|
-
batchName?: string;
|
|
7394
|
-
roastDate?: string;
|
|
7395
|
-
ozIn?: number;
|
|
7396
|
-
ozOut?: number;
|
|
7397
|
-
weightLossPercent?: number;
|
|
7398
|
-
notes?: string;
|
|
7399
|
-
targets?: string;
|
|
7400
|
-
roasterType?: string;
|
|
7401
|
-
roasterSize?: string;
|
|
7402
|
-
temperatureUnit?: "F" | "C";
|
|
7403
|
-
totalRoastTime?: number;
|
|
7404
|
-
developmentPercent?: number;
|
|
7405
|
-
dataSource?: string;
|
|
7406
|
-
roastUuid?: string;
|
|
7407
|
-
fcStartTime?: number;
|
|
7408
|
-
fcStartTemp?: number;
|
|
7409
|
-
fcEndTime?: number;
|
|
7410
|
-
fcEndTemp?: number;
|
|
7411
|
-
dropTime?: number;
|
|
7412
|
-
dropTemp?: number;
|
|
7413
|
-
chargeTemp?: number;
|
|
7414
|
-
chargeTime?: number;
|
|
7415
|
-
tpTime?: number;
|
|
7416
|
-
tpTemp?: number;
|
|
7417
|
-
totalRor?: number;
|
|
7418
|
-
dryPercent?: number;
|
|
7419
|
-
maillardPercent?: number;
|
|
7420
|
-
auc?: number;
|
|
7421
|
-
dryPhaseRor?: number;
|
|
7422
|
-
midPhaseRor?: number;
|
|
7423
|
-
finishPhaseRor?: number;
|
|
7424
|
-
dryPhaseDeltaTemp?: number;
|
|
7425
|
-
temperatures?: components["schemas"]["RoastTemperatureInput"][];
|
|
7426
|
-
events?: components["schemas"]["RoastEventInput"][];
|
|
7427
|
-
};
|
|
7428
8310
|
params: {
|
|
7429
|
-
|
|
7430
|
-
|
|
8311
|
+
path: {
|
|
8312
|
+
id: number;
|
|
7431
8313
|
};
|
|
7432
|
-
|
|
8314
|
+
header: {
|
|
8315
|
+
"if-match": string;
|
|
8316
|
+
} | undefined;
|
|
8317
|
+
};
|
|
8318
|
+
body: {
|
|
8319
|
+
fileName: string;
|
|
8320
|
+
fileContent: string;
|
|
8321
|
+
fileSize?: number;
|
|
8322
|
+
};
|
|
7433
8323
|
}, `${string}/${string}`>>;
|
|
7434
8324
|
/**
|
|
7435
|
-
*
|
|
7436
|
-
*
|
|
8325
|
+
* Clear import-derived curve, events, metrics, and provenance data from
|
|
8326
|
+
* one of the caller's existing roasts without deleting the roast profile.
|
|
7437
8327
|
*/
|
|
7438
|
-
|
|
7439
|
-
ifMatch?: string;
|
|
7440
|
-
}) => Promise<openapi_fetch.FetchResponse<{
|
|
8328
|
+
clearArtisanImport: (id: number) => Promise<openapi_fetch.FetchResponse<{
|
|
7441
8329
|
parameters: {
|
|
7442
8330
|
query?: never;
|
|
7443
|
-
header?:
|
|
7444
|
-
"if-match"?: string;
|
|
7445
|
-
};
|
|
8331
|
+
header?: never;
|
|
7446
8332
|
path: {
|
|
7447
8333
|
id: number;
|
|
7448
8334
|
};
|
|
7449
8335
|
cookie?: never;
|
|
7450
|
-
};
|
|
7451
|
-
requestBody
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
};
|
|
7455
|
-
};
|
|
7456
|
-
responses: {
|
|
7457
|
-
200: {
|
|
7458
|
-
headers: {
|
|
7459
|
-
[name: string]: unknown;
|
|
7460
|
-
};
|
|
7461
|
-
content: {
|
|
7462
|
-
"application/json": components["schemas"]["RoastDetailResponse"];
|
|
7463
|
-
};
|
|
7464
|
-
};
|
|
7465
|
-
400: {
|
|
8336
|
+
};
|
|
8337
|
+
requestBody?: never;
|
|
8338
|
+
responses: {
|
|
8339
|
+
200: {
|
|
7466
8340
|
headers: {
|
|
7467
8341
|
[name: string]: unknown;
|
|
7468
8342
|
};
|
|
7469
8343
|
content: {
|
|
7470
|
-
"application/json": components["schemas"]["
|
|
8344
|
+
"application/json": components["schemas"]["RoastArtisanImportClearResponse"];
|
|
7471
8345
|
};
|
|
7472
8346
|
};
|
|
7473
8347
|
401: {
|
|
@@ -7494,14 +8368,6 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7494
8368
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7495
8369
|
};
|
|
7496
8370
|
};
|
|
7497
|
-
409: {
|
|
7498
|
-
headers: {
|
|
7499
|
-
[name: string]: unknown;
|
|
7500
|
-
};
|
|
7501
|
-
content: {
|
|
7502
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7503
|
-
};
|
|
7504
|
-
};
|
|
7505
8371
|
429: {
|
|
7506
8372
|
headers: {
|
|
7507
8373
|
[name: string]: unknown;
|
|
@@ -7524,56 +8390,23 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7524
8390
|
path: {
|
|
7525
8391
|
id: number;
|
|
7526
8392
|
};
|
|
7527
|
-
header: {
|
|
7528
|
-
"if-match": string;
|
|
7529
|
-
} | undefined;
|
|
7530
|
-
};
|
|
7531
|
-
body: {
|
|
7532
|
-
coffeeName?: string;
|
|
7533
|
-
batchName?: string;
|
|
7534
|
-
roastDate?: string;
|
|
7535
|
-
ozIn?: number;
|
|
7536
|
-
ozOut?: number;
|
|
7537
|
-
weightLossPercent?: number;
|
|
7538
|
-
notes?: string;
|
|
7539
|
-
targets?: string;
|
|
7540
|
-
roasterType?: string;
|
|
7541
|
-
roasterSize?: string;
|
|
7542
|
-
temperatureUnit?: "F" | "C";
|
|
7543
|
-
totalRoastTime?: number;
|
|
7544
|
-
developmentPercent?: number;
|
|
7545
|
-
dataSource?: string;
|
|
7546
|
-
roastUuid?: string;
|
|
7547
|
-
fcStartTime?: number;
|
|
7548
|
-
fcStartTemp?: number;
|
|
7549
|
-
fcEndTime?: number;
|
|
7550
|
-
fcEndTemp?: number;
|
|
7551
|
-
dropTime?: number;
|
|
7552
|
-
dropTemp?: number;
|
|
7553
|
-
chargeTemp?: number;
|
|
7554
|
-
chargeTime?: number;
|
|
7555
|
-
tpTime?: number;
|
|
7556
|
-
tpTemp?: number;
|
|
7557
|
-
totalRor?: number;
|
|
7558
|
-
dryPercent?: number;
|
|
7559
|
-
maillardPercent?: number;
|
|
7560
|
-
auc?: number;
|
|
7561
|
-
dryPhaseRor?: number;
|
|
7562
|
-
midPhaseRor?: number;
|
|
7563
|
-
finishPhaseRor?: number;
|
|
7564
|
-
dryPhaseDeltaTemp?: number;
|
|
7565
|
-
temperatures?: components["schemas"]["RoastTemperatureInput"][];
|
|
7566
|
-
events?: components["schemas"]["RoastEventInput"][];
|
|
7567
8393
|
};
|
|
7568
8394
|
}, `${string}/${string}`>>;
|
|
7569
|
-
|
|
7570
|
-
|
|
8395
|
+
};
|
|
8396
|
+
sales: {
|
|
8397
|
+
/** List the caller's own sales (owner-scoped). */
|
|
8398
|
+
list: (query?: SalesListQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
7571
8399
|
parameters: {
|
|
7572
|
-
query?:
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
8400
|
+
query?: {
|
|
8401
|
+
green_coffee_inv_id?: number;
|
|
8402
|
+
date_start?: string;
|
|
8403
|
+
date_end?: string;
|
|
8404
|
+
buyer?: string;
|
|
8405
|
+
limit?: number;
|
|
8406
|
+
offset?: number | null;
|
|
7576
8407
|
};
|
|
8408
|
+
header?: never;
|
|
8409
|
+
path?: never;
|
|
7577
8410
|
cookie?: never;
|
|
7578
8411
|
};
|
|
7579
8412
|
requestBody?: never;
|
|
@@ -7583,7 +8416,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7583
8416
|
[name: string]: unknown;
|
|
7584
8417
|
};
|
|
7585
8418
|
content: {
|
|
7586
|
-
"application/json": components["schemas"]["
|
|
8419
|
+
"application/json": components["schemas"]["SalesListResponse"];
|
|
7587
8420
|
};
|
|
7588
8421
|
};
|
|
7589
8422
|
400: {
|
|
@@ -7610,46 +8443,27 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7610
8443
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7611
8444
|
};
|
|
7612
8445
|
};
|
|
7613
|
-
404: {
|
|
7614
|
-
headers: {
|
|
7615
|
-
[name: string]: unknown;
|
|
7616
|
-
};
|
|
7617
|
-
content: {
|
|
7618
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7619
|
-
};
|
|
7620
|
-
};
|
|
7621
|
-
429: {
|
|
7622
|
-
headers: {
|
|
7623
|
-
[name: string]: unknown;
|
|
7624
|
-
};
|
|
7625
|
-
content: {
|
|
7626
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7627
|
-
};
|
|
7628
|
-
};
|
|
7629
|
-
503: {
|
|
7630
|
-
headers: {
|
|
7631
|
-
[name: string]: unknown;
|
|
7632
|
-
};
|
|
7633
|
-
content: {
|
|
7634
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7635
|
-
};
|
|
7636
|
-
};
|
|
7637
8446
|
};
|
|
7638
8447
|
}, {
|
|
7639
8448
|
params: {
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
8449
|
+
query: {
|
|
8450
|
+
green_coffee_inv_id?: number;
|
|
8451
|
+
date_start?: string;
|
|
8452
|
+
date_end?: string;
|
|
8453
|
+
buyer?: string;
|
|
8454
|
+
limit?: number;
|
|
8455
|
+
offset?: number | null;
|
|
8456
|
+
} | undefined;
|
|
7643
8457
|
};
|
|
7644
8458
|
}, `${string}/${string}`>>;
|
|
7645
8459
|
/**
|
|
7646
|
-
*
|
|
7647
|
-
*
|
|
7648
|
-
*
|
|
7649
|
-
*
|
|
7650
|
-
*
|
|
8460
|
+
* Record a sale against one of the caller's own green-coffee inventory
|
|
8461
|
+
* lots. Requires a session or an owner-bound API key carrying the exact
|
|
8462
|
+
* `sales:write` scope. Pass `idempotencyKey` to make retries safe: the
|
|
8463
|
+
* same key replays the original result, and a concurrent duplicate gets
|
|
8464
|
+
* 409 while the first is in flight.
|
|
7651
8465
|
*/
|
|
7652
|
-
|
|
8466
|
+
create: (body: SalesCreateRequest, options?: {
|
|
7653
8467
|
idempotencyKey?: string;
|
|
7654
8468
|
}) => Promise<openapi_fetch.FetchResponse<{
|
|
7655
8469
|
parameters: {
|
|
@@ -7660,9 +8474,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7660
8474
|
path?: never;
|
|
7661
8475
|
cookie?: never;
|
|
7662
8476
|
};
|
|
7663
|
-
requestBody
|
|
8477
|
+
requestBody?: {
|
|
7664
8478
|
content: {
|
|
7665
|
-
"application/json": components["schemas"]["
|
|
8479
|
+
"application/json": components["schemas"]["SalesCreateRequest"];
|
|
7666
8480
|
};
|
|
7667
8481
|
};
|
|
7668
8482
|
responses: {
|
|
@@ -7671,7 +8485,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7671
8485
|
[name: string]: unknown;
|
|
7672
8486
|
};
|
|
7673
8487
|
content: {
|
|
7674
|
-
"application/json": components["schemas"]["
|
|
8488
|
+
"application/json": components["schemas"]["SaleItemResponse"];
|
|
7675
8489
|
};
|
|
7676
8490
|
};
|
|
7677
8491
|
400: {
|
|
@@ -7698,14 +8512,6 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7698
8512
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7699
8513
|
};
|
|
7700
8514
|
};
|
|
7701
|
-
404: {
|
|
7702
|
-
headers: {
|
|
7703
|
-
[name: string]: unknown;
|
|
7704
|
-
};
|
|
7705
|
-
content: {
|
|
7706
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7707
|
-
};
|
|
7708
|
-
};
|
|
7709
8515
|
409: {
|
|
7710
8516
|
headers: {
|
|
7711
8517
|
[name: string]: unknown;
|
|
@@ -7733,14 +8539,12 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7733
8539
|
};
|
|
7734
8540
|
}, {
|
|
7735
8541
|
body: {
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
8542
|
+
greenCoffeeInvId: number;
|
|
8543
|
+
ozSold: number;
|
|
8544
|
+
price: number;
|
|
8545
|
+
buyer?: string;
|
|
7739
8546
|
batchName?: string;
|
|
7740
|
-
|
|
7741
|
-
roastNotes?: string;
|
|
7742
|
-
roastTargets?: string;
|
|
7743
|
-
fileSize?: number;
|
|
8547
|
+
sellDate?: string;
|
|
7744
8548
|
};
|
|
7745
8549
|
params: {
|
|
7746
8550
|
header: {
|
|
@@ -7749,27 +8553,22 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7749
8553
|
} | undefined;
|
|
7750
8554
|
}, `${string}/${string}`>>;
|
|
7751
8555
|
/**
|
|
7752
|
-
*
|
|
7753
|
-
*
|
|
7754
|
-
*
|
|
7755
|
-
* optimistic concurrency (409 on mismatch).
|
|
8556
|
+
* Update one of the caller's own sales. The sales table carries no
|
|
8557
|
+
* `last_updated` column, so no If-Match optimistic concurrency is
|
|
8558
|
+
* offered.
|
|
7756
8559
|
*/
|
|
7757
|
-
|
|
7758
|
-
ifMatch?: string;
|
|
7759
|
-
}) => Promise<openapi_fetch.FetchResponse<{
|
|
8560
|
+
update: (id: number, body: SalesUpdateRequest) => Promise<openapi_fetch.FetchResponse<{
|
|
7760
8561
|
parameters: {
|
|
7761
8562
|
query?: never;
|
|
7762
|
-
header?:
|
|
7763
|
-
"if-match"?: string;
|
|
7764
|
-
};
|
|
8563
|
+
header?: never;
|
|
7765
8564
|
path: {
|
|
7766
8565
|
id: number;
|
|
7767
8566
|
};
|
|
7768
8567
|
cookie?: never;
|
|
7769
8568
|
};
|
|
7770
|
-
requestBody
|
|
8569
|
+
requestBody?: {
|
|
7771
8570
|
content: {
|
|
7772
|
-
"application/json": components["schemas"]["
|
|
8571
|
+
"application/json": components["schemas"]["SalesUpdateRequest"];
|
|
7773
8572
|
};
|
|
7774
8573
|
};
|
|
7775
8574
|
responses: {
|
|
@@ -7778,7 +8577,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7778
8577
|
[name: string]: unknown;
|
|
7779
8578
|
};
|
|
7780
8579
|
content: {
|
|
7781
|
-
"application/json": components["schemas"]["
|
|
8580
|
+
"application/json": components["schemas"]["SaleItemResponse"];
|
|
7782
8581
|
};
|
|
7783
8582
|
};
|
|
7784
8583
|
400: {
|
|
@@ -7813,14 +8612,6 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7813
8612
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7814
8613
|
};
|
|
7815
8614
|
};
|
|
7816
|
-
409: {
|
|
7817
|
-
headers: {
|
|
7818
|
-
[name: string]: unknown;
|
|
7819
|
-
};
|
|
7820
|
-
content: {
|
|
7821
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
7822
|
-
};
|
|
7823
|
-
};
|
|
7824
8615
|
429: {
|
|
7825
8616
|
headers: {
|
|
7826
8617
|
[name: string]: unknown;
|
|
@@ -7843,21 +8634,17 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7843
8634
|
path: {
|
|
7844
8635
|
id: number;
|
|
7845
8636
|
};
|
|
7846
|
-
header: {
|
|
7847
|
-
"if-match": string;
|
|
7848
|
-
} | undefined;
|
|
7849
8637
|
};
|
|
7850
8638
|
body: {
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
8639
|
+
ozSold?: number;
|
|
8640
|
+
price?: number;
|
|
8641
|
+
buyer?: string;
|
|
8642
|
+
batchName?: string;
|
|
8643
|
+
sellDate?: string;
|
|
7854
8644
|
};
|
|
7855
8645
|
}, `${string}/${string}`>>;
|
|
7856
|
-
/**
|
|
7857
|
-
|
|
7858
|
-
* one of the caller's existing roasts without deleting the roast profile.
|
|
7859
|
-
*/
|
|
7860
|
-
clearArtisanImport: (id: number) => Promise<openapi_fetch.FetchResponse<{
|
|
8646
|
+
/** Delete one of the caller's own sales. */
|
|
8647
|
+
delete: (id: number) => Promise<openapi_fetch.FetchResponse<{
|
|
7861
8648
|
parameters: {
|
|
7862
8649
|
query?: never;
|
|
7863
8650
|
header?: never;
|
|
@@ -7873,7 +8660,15 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7873
8660
|
[name: string]: unknown;
|
|
7874
8661
|
};
|
|
7875
8662
|
content: {
|
|
7876
|
-
"application/json": components["schemas"]["
|
|
8663
|
+
"application/json": components["schemas"]["SaleDeleteResponse"];
|
|
8664
|
+
};
|
|
8665
|
+
};
|
|
8666
|
+
400: {
|
|
8667
|
+
headers: {
|
|
8668
|
+
[name: string]: unknown;
|
|
8669
|
+
};
|
|
8670
|
+
content: {
|
|
8671
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7877
8672
|
};
|
|
7878
8673
|
};
|
|
7879
8674
|
401: {
|
|
@@ -7925,20 +8720,17 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7925
8720
|
};
|
|
7926
8721
|
}, `${string}/${string}`>>;
|
|
7927
8722
|
};
|
|
7928
|
-
|
|
7929
|
-
/**
|
|
7930
|
-
|
|
8723
|
+
tasting: {
|
|
8724
|
+
/** Fetch supplier notes plus the caller's own latest tasting notes. */
|
|
8725
|
+
get: (catalogId: string, query?: TastingGetQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
7931
8726
|
parameters: {
|
|
7932
8727
|
query?: {
|
|
7933
|
-
|
|
7934
|
-
date_start?: string;
|
|
7935
|
-
date_end?: string;
|
|
7936
|
-
buyer?: string;
|
|
7937
|
-
limit?: number;
|
|
7938
|
-
offset?: number | null;
|
|
8728
|
+
filter?: "user" | "supplier" | "both";
|
|
7939
8729
|
};
|
|
7940
8730
|
header?: never;
|
|
7941
|
-
path
|
|
8731
|
+
path: {
|
|
8732
|
+
catalogId: string;
|
|
8733
|
+
};
|
|
7942
8734
|
cookie?: never;
|
|
7943
8735
|
};
|
|
7944
8736
|
requestBody?: never;
|
|
@@ -7948,7 +8740,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7948
8740
|
[name: string]: unknown;
|
|
7949
8741
|
};
|
|
7950
8742
|
content: {
|
|
7951
|
-
"application/json": components["schemas"]["
|
|
8743
|
+
"application/json": components["schemas"]["TastingResponse"];
|
|
7952
8744
|
};
|
|
7953
8745
|
};
|
|
7954
8746
|
400: {
|
|
@@ -7975,41 +8767,47 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
7975
8767
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7976
8768
|
};
|
|
7977
8769
|
};
|
|
8770
|
+
404: {
|
|
8771
|
+
headers: {
|
|
8772
|
+
[name: string]: unknown;
|
|
8773
|
+
};
|
|
8774
|
+
content: {
|
|
8775
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
8776
|
+
};
|
|
8777
|
+
};
|
|
7978
8778
|
};
|
|
7979
8779
|
}, {
|
|
7980
8780
|
params: {
|
|
8781
|
+
path: {
|
|
8782
|
+
catalogId: string;
|
|
8783
|
+
};
|
|
7981
8784
|
query: {
|
|
7982
|
-
|
|
7983
|
-
date_start?: string;
|
|
7984
|
-
date_end?: string;
|
|
7985
|
-
buyer?: string;
|
|
7986
|
-
limit?: number;
|
|
7987
|
-
offset?: number | null;
|
|
8785
|
+
filter?: "user" | "supplier" | "both";
|
|
7988
8786
|
} | undefined;
|
|
7989
8787
|
};
|
|
7990
8788
|
}, `${string}/${string}`>>;
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
/** Fetch supplier notes plus the caller's own latest tasting notes. */
|
|
7994
|
-
get: (catalogId: string, query?: TastingGetQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
8789
|
+
/** Replace the caller's rating for one owned inventory lot. */
|
|
8790
|
+
rate: (inventoryId: number, body: TastingRateRequest) => Promise<openapi_fetch.FetchResponse<{
|
|
7995
8791
|
parameters: {
|
|
7996
|
-
query?:
|
|
7997
|
-
filter?: "user" | "supplier" | "both";
|
|
7998
|
-
};
|
|
8792
|
+
query?: never;
|
|
7999
8793
|
header?: never;
|
|
8000
8794
|
path: {
|
|
8001
|
-
|
|
8795
|
+
inventoryId: number;
|
|
8002
8796
|
};
|
|
8003
8797
|
cookie?: never;
|
|
8004
8798
|
};
|
|
8005
|
-
requestBody
|
|
8799
|
+
requestBody: {
|
|
8800
|
+
content: {
|
|
8801
|
+
"application/json": components["schemas"]["TastingRateRequest"];
|
|
8802
|
+
};
|
|
8803
|
+
};
|
|
8006
8804
|
responses: {
|
|
8007
8805
|
200: {
|
|
8008
8806
|
headers: {
|
|
8009
8807
|
[name: string]: unknown;
|
|
8010
8808
|
};
|
|
8011
8809
|
content: {
|
|
8012
|
-
"application/json": components["schemas"]["
|
|
8810
|
+
"application/json": components["schemas"]["TastingRateResponse"];
|
|
8013
8811
|
};
|
|
8014
8812
|
};
|
|
8015
8813
|
400: {
|
|
@@ -8044,19 +8842,41 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
8044
8842
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
8045
8843
|
};
|
|
8046
8844
|
};
|
|
8845
|
+
429: {
|
|
8846
|
+
headers: {
|
|
8847
|
+
[name: string]: unknown;
|
|
8848
|
+
};
|
|
8849
|
+
content: {
|
|
8850
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
8851
|
+
};
|
|
8852
|
+
};
|
|
8853
|
+
503: {
|
|
8854
|
+
headers: {
|
|
8855
|
+
[name: string]: unknown;
|
|
8856
|
+
};
|
|
8857
|
+
content: {
|
|
8858
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
8859
|
+
};
|
|
8860
|
+
};
|
|
8047
8861
|
};
|
|
8048
8862
|
}, {
|
|
8049
8863
|
params: {
|
|
8050
8864
|
path: {
|
|
8051
|
-
|
|
8865
|
+
inventoryId: number;
|
|
8052
8866
|
};
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8867
|
+
};
|
|
8868
|
+
body: {
|
|
8869
|
+
aroma: number;
|
|
8870
|
+
body: number;
|
|
8871
|
+
acidity: number;
|
|
8872
|
+
sweetness: number;
|
|
8873
|
+
aftertaste: number;
|
|
8874
|
+
brewMethod?: string;
|
|
8875
|
+
notes?: string;
|
|
8056
8876
|
};
|
|
8057
8877
|
}, `${string}/${string}`>>;
|
|
8058
8878
|
};
|
|
8059
8879
|
};
|
|
8060
8880
|
type ParchmentClient = ReturnType<typeof createParchmentClient>;
|
|
8061
8881
|
|
|
8062
|
-
export { type BriefMatchesQuery, type CatalogListQuery, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type SourcingBriefCreateRequest, type components, createParchmentClient, type paths };
|
|
8882
|
+
export { type BriefMatchesQuery, type CatalogListQuery, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type components, createParchmentClient, type paths };
|