@unified-api/typescript-sdk 2.82.21 → 2.82.23
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/README.md +4 -6
- package/dist/commonjs/funcs/{shippingGetShippingRate.d.ts → shippingPatchShippingLabel.d.ts} +3 -3
- package/dist/commonjs/funcs/shippingPatchShippingLabel.d.ts.map +1 -0
- package/dist/commonjs/funcs/{shippingGetShippingRate.js → shippingPatchShippingLabel.js} +11 -10
- package/dist/commonjs/funcs/shippingPatchShippingLabel.js.map +1 -0
- package/dist/commonjs/funcs/{shippingCreateShippingTracking.d.ts → shippingUpdateShippingLabel.d.ts} +3 -3
- package/dist/commonjs/funcs/shippingUpdateShippingLabel.d.ts.map +1 -0
- package/dist/commonjs/funcs/{shippingCreateShippingTracking.js → shippingUpdateShippingLabel.js} +14 -10
- package/dist/commonjs/funcs/shippingUpdateShippingLabel.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/label.d.ts +8 -0
- package/dist/commonjs/sdk/label.d.ts.map +1 -1
- package/dist/commonjs/sdk/label.js +14 -0
- package/dist/commonjs/sdk/label.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingexpense.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingexpense.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingexpense.js +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingexpense.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingexpense.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingexpense.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingexpense.js +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingexpense.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.d.ts +2 -3
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +2 -3
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingexpenses.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingexpenses.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingexpenses.js +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingexpenses.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingexpense.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingexpense.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingexpense.js +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingexpense.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchshippinglabel.d.ts +53 -0
- package/dist/commonjs/sdk/models/operations/patchshippinglabel.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/{getshippingrate.js → patchshippinglabel.js} +24 -17
- package/dist/commonjs/sdk/models/operations/patchshippinglabel.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingexpense.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingexpense.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountingexpense.js +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingexpense.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateshippinglabel.d.ts +53 -0
- package/dist/commonjs/sdk/models/operations/updateshippinglabel.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/{createshippingtracking.js → updateshippinglabel.js} +19 -18
- package/dist/commonjs/sdk/models/operations/updateshippinglabel.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/accountingexpense.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/accountingexpense.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingexpense.js +4 -0
- package/dist/commonjs/sdk/models/shared/accountingexpense.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingjournallineitem.d.ts +4 -0
- package/dist/commonjs/sdk/models/shared/accountingjournallineitem.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingjournallineitem.js +8 -0
- package/dist/commonjs/sdk/models/shared/accountingjournallineitem.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyshippingtrackingeventlocationaddress.d.ts +0 -21
- package/dist/commonjs/sdk/models/shared/propertyshippingtrackingeventlocationaddress.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyshippingtrackingeventlocationaddress.js +1 -33
- package/dist/commonjs/sdk/models/shared/propertyshippingtrackingeventlocationaddress.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/shippingtracking.d.ts +1 -25
- package/dist/commonjs/sdk/models/shared/shippingtracking.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/shippingtracking.js +1 -37
- package/dist/commonjs/sdk/models/shared/shippingtracking.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/shippingtrackingevent.d.ts +1 -19
- package/dist/commonjs/sdk/models/shared/shippingtrackingevent.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/shippingtrackingevent.js +1 -31
- package/dist/commonjs/sdk/models/shared/shippingtrackingevent.js.map +1 -1
- package/dist/commonjs/sdk/rate.d.ts +0 -4
- package/dist/commonjs/sdk/rate.d.ts.map +1 -1
- package/dist/commonjs/sdk/rate.js +0 -7
- package/dist/commonjs/sdk/rate.js.map +1 -1
- package/dist/commonjs/sdk/shipping.d.ts +6 -10
- package/dist/commonjs/sdk/shipping.d.ts.map +1 -1
- package/dist/commonjs/sdk/shipping.js +11 -18
- package/dist/commonjs/sdk/shipping.js.map +1 -1
- package/dist/commonjs/sdk/tracking.d.ts +0 -8
- package/dist/commonjs/sdk/tracking.d.ts.map +1 -1
- package/dist/commonjs/sdk/tracking.js +0 -14
- package/dist/commonjs/sdk/tracking.js.map +1 -1
- package/dist/esm/funcs/{shippingGetShippingRate.d.ts → shippingPatchShippingLabel.d.ts} +3 -3
- package/dist/esm/funcs/shippingPatchShippingLabel.d.ts.map +1 -0
- package/dist/esm/funcs/{shippingCreateShippingTracking.js → shippingPatchShippingLabel.js} +13 -9
- package/dist/esm/funcs/shippingPatchShippingLabel.js.map +1 -0
- package/dist/esm/funcs/{shippingCreateShippingTracking.d.ts → shippingUpdateShippingLabel.d.ts} +3 -3
- package/dist/esm/funcs/shippingUpdateShippingLabel.d.ts.map +1 -0
- package/dist/esm/funcs/{shippingGetShippingRate.js → shippingUpdateShippingLabel.js} +11 -10
- package/dist/esm/funcs/shippingUpdateShippingLabel.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/label.d.ts +8 -0
- package/dist/esm/sdk/label.d.ts.map +1 -1
- package/dist/esm/sdk/label.js +14 -0
- package/dist/esm/sdk/label.js.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingexpense.d.ts +1 -0
- package/dist/esm/sdk/models/operations/createaccountingexpense.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingexpense.js +1 -0
- package/dist/esm/sdk/models/operations/createaccountingexpense.js.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingexpense.d.ts +1 -0
- package/dist/esm/sdk/models/operations/getaccountingexpense.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingexpense.js +1 -0
- package/dist/esm/sdk/models/operations/getaccountingexpense.js.map +1 -1
- package/dist/esm/sdk/models/operations/index.d.ts +2 -3
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +2 -3
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingexpenses.d.ts +1 -0
- package/dist/esm/sdk/models/operations/listaccountingexpenses.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingexpenses.js +1 -0
- package/dist/esm/sdk/models/operations/listaccountingexpenses.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingexpense.d.ts +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingexpense.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingexpense.js +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingexpense.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchshippinglabel.d.ts +53 -0
- package/dist/esm/sdk/models/operations/patchshippinglabel.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/patchshippinglabel.js +41 -0
- package/dist/esm/sdk/models/operations/patchshippinglabel.js.map +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingexpense.d.ts +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingexpense.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountingexpense.js +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingexpense.js.map +1 -1
- package/dist/esm/sdk/models/operations/updateshippinglabel.d.ts +53 -0
- package/dist/esm/sdk/models/operations/updateshippinglabel.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/updateshippinglabel.js +42 -0
- package/dist/esm/sdk/models/operations/updateshippinglabel.js.map +1 -0
- package/dist/esm/sdk/models/shared/accountingexpense.d.ts +2 -0
- package/dist/esm/sdk/models/shared/accountingexpense.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/accountingexpense.js +4 -0
- package/dist/esm/sdk/models/shared/accountingexpense.js.map +1 -1
- package/dist/esm/sdk/models/shared/accountingjournallineitem.d.ts +4 -0
- package/dist/esm/sdk/models/shared/accountingjournallineitem.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/accountingjournallineitem.js +8 -0
- package/dist/esm/sdk/models/shared/accountingjournallineitem.js.map +1 -1
- package/dist/esm/sdk/models/shared/propertyshippingtrackingeventlocationaddress.d.ts +0 -21
- package/dist/esm/sdk/models/shared/propertyshippingtrackingeventlocationaddress.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/propertyshippingtrackingeventlocationaddress.js +0 -31
- package/dist/esm/sdk/models/shared/propertyshippingtrackingeventlocationaddress.js.map +1 -1
- package/dist/esm/sdk/models/shared/shippingtracking.d.ts +1 -25
- package/dist/esm/sdk/models/shared/shippingtracking.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/shippingtracking.js +1 -36
- package/dist/esm/sdk/models/shared/shippingtracking.js.map +1 -1
- package/dist/esm/sdk/models/shared/shippingtrackingevent.d.ts +1 -19
- package/dist/esm/sdk/models/shared/shippingtrackingevent.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/shippingtrackingevent.js +1 -30
- package/dist/esm/sdk/models/shared/shippingtrackingevent.js.map +1 -1
- package/dist/esm/sdk/rate.d.ts +0 -4
- package/dist/esm/sdk/rate.d.ts.map +1 -1
- package/dist/esm/sdk/rate.js +0 -7
- package/dist/esm/sdk/rate.js.map +1 -1
- package/dist/esm/sdk/shipping.d.ts +6 -10
- package/dist/esm/sdk/shipping.d.ts.map +1 -1
- package/dist/esm/sdk/shipping.js +11 -18
- package/dist/esm/sdk/shipping.js.map +1 -1
- package/dist/esm/sdk/tracking.d.ts +0 -8
- package/dist/esm/sdk/tracking.d.ts.map +1 -1
- package/dist/esm/sdk/tracking.js +0 -14
- package/dist/esm/sdk/tracking.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{shippingGetShippingRate.ts → shippingPatchShippingLabel.ts} +15 -14
- package/src/funcs/{shippingCreateShippingTracking.ts → shippingUpdateShippingLabel.ts} +17 -13
- package/src/lib/config.ts +3 -3
- package/src/sdk/label.ts +30 -0
- package/src/sdk/models/operations/createaccountingexpense.ts +1 -0
- package/src/sdk/models/operations/getaccountingexpense.ts +1 -0
- package/src/sdk/models/operations/index.ts +2 -3
- package/src/sdk/models/operations/listaccountingexpenses.ts +1 -0
- package/src/sdk/models/operations/patchaccountingexpense.ts +1 -0
- package/src/sdk/models/operations/patchshippinglabel.ts +88 -0
- package/src/sdk/models/operations/updateaccountingexpense.ts +1 -0
- package/src/sdk/models/operations/updateshippinglabel.ts +90 -0
- package/src/sdk/models/shared/accountingexpense.ts +6 -0
- package/src/sdk/models/shared/accountingjournallineitem.ts +12 -0
- package/src/sdk/models/shared/propertyshippingtrackingeventlocationaddress.ts +0 -62
- package/src/sdk/models/shared/shippingtracking.ts +0 -67
- package/src/sdk/models/shared/shippingtrackingevent.ts +0 -59
- package/src/sdk/rate.ts +0 -15
- package/src/sdk/shipping.ts +21 -36
- package/src/sdk/tracking.ts +0 -30
- package/dist/commonjs/funcs/shippingCreateShippingTracking.d.ts.map +0 -1
- package/dist/commonjs/funcs/shippingCreateShippingTracking.js.map +0 -1
- package/dist/commonjs/funcs/shippingGetShippingRate.d.ts.map +0 -1
- package/dist/commonjs/funcs/shippingGetShippingRate.js.map +0 -1
- package/dist/commonjs/funcs/shippingListShippingTrackings.d.ts +0 -15
- package/dist/commonjs/funcs/shippingListShippingTrackings.d.ts.map +0 -1
- package/dist/commonjs/funcs/shippingListShippingTrackings.js +0 -129
- package/dist/commonjs/funcs/shippingListShippingTrackings.js.map +0 -1
- package/dist/commonjs/sdk/models/operations/createshippingtracking.d.ts +0 -48
- package/dist/commonjs/sdk/models/operations/createshippingtracking.d.ts.map +0 -1
- package/dist/commonjs/sdk/models/operations/createshippingtracking.js.map +0 -1
- package/dist/commonjs/sdk/models/operations/getshippingrate.d.ts +0 -46
- package/dist/commonjs/sdk/models/operations/getshippingrate.d.ts.map +0 -1
- package/dist/commonjs/sdk/models/operations/getshippingrate.js.map +0 -1
- package/dist/commonjs/sdk/models/operations/listshippingtrackings.d.ts +0 -68
- package/dist/commonjs/sdk/models/operations/listshippingtrackings.d.ts.map +0 -1
- package/dist/commonjs/sdk/models/operations/listshippingtrackings.js +0 -84
- package/dist/commonjs/sdk/models/operations/listshippingtrackings.js.map +0 -1
- package/dist/esm/funcs/shippingCreateShippingTracking.d.ts.map +0 -1
- package/dist/esm/funcs/shippingCreateShippingTracking.js.map +0 -1
- package/dist/esm/funcs/shippingGetShippingRate.d.ts.map +0 -1
- package/dist/esm/funcs/shippingGetShippingRate.js.map +0 -1
- package/dist/esm/funcs/shippingListShippingTrackings.d.ts +0 -15
- package/dist/esm/funcs/shippingListShippingTrackings.d.ts.map +0 -1
- package/dist/esm/funcs/shippingListShippingTrackings.js +0 -93
- package/dist/esm/funcs/shippingListShippingTrackings.js.map +0 -1
- package/dist/esm/sdk/models/operations/createshippingtracking.d.ts +0 -48
- package/dist/esm/sdk/models/operations/createshippingtracking.d.ts.map +0 -1
- package/dist/esm/sdk/models/operations/createshippingtracking.js +0 -41
- package/dist/esm/sdk/models/operations/createshippingtracking.js.map +0 -1
- package/dist/esm/sdk/models/operations/getshippingrate.d.ts +0 -46
- package/dist/esm/sdk/models/operations/getshippingrate.d.ts.map +0 -1
- package/dist/esm/sdk/models/operations/getshippingrate.js +0 -34
- package/dist/esm/sdk/models/operations/getshippingrate.js.map +0 -1
- package/dist/esm/sdk/models/operations/listshippingtrackings.d.ts +0 -68
- package/dist/esm/sdk/models/operations/listshippingtrackings.d.ts.map +0 -1
- package/dist/esm/sdk/models/operations/listshippingtrackings.js +0 -47
- package/dist/esm/sdk/models/operations/listshippingtrackings.js.map +0 -1
- package/src/funcs/shippingListShippingTrackings.ts +0 -178
- package/src/sdk/models/operations/createshippingtracking.ts +0 -86
- package/src/sdk/models/operations/getshippingrate.ts +0 -79
- package/src/sdk/models/operations/listshippingtrackings.ts +0 -113
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { UnifiedToCore } from "../core.js";
|
|
7
|
-
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import {
|
|
15
|
-
ConnectionError,
|
|
16
|
-
InvalidRequestError,
|
|
17
|
-
RequestAbortedError,
|
|
18
|
-
RequestTimeoutError,
|
|
19
|
-
UnexpectedClientError,
|
|
20
|
-
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
-
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
-
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
-
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
-
import * as shared from "../sdk/models/shared/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
27
|
-
import { Result } from "../sdk/types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* List all trackings
|
|
31
|
-
*/
|
|
32
|
-
export function shippingListShippingTrackings(
|
|
33
|
-
client: UnifiedToCore,
|
|
34
|
-
request: operations.ListShippingTrackingsRequest,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): APIPromise<
|
|
37
|
-
Result<
|
|
38
|
-
Array<shared.ShippingTracking>,
|
|
39
|
-
| UnifiedToError
|
|
40
|
-
| ResponseValidationError
|
|
41
|
-
| ConnectionError
|
|
42
|
-
| RequestAbortedError
|
|
43
|
-
| RequestTimeoutError
|
|
44
|
-
| InvalidRequestError
|
|
45
|
-
| UnexpectedClientError
|
|
46
|
-
| SDKValidationError
|
|
47
|
-
>
|
|
48
|
-
> {
|
|
49
|
-
return new APIPromise($do(
|
|
50
|
-
client,
|
|
51
|
-
request,
|
|
52
|
-
options,
|
|
53
|
-
));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async function $do(
|
|
57
|
-
client: UnifiedToCore,
|
|
58
|
-
request: operations.ListShippingTrackingsRequest,
|
|
59
|
-
options?: RequestOptions,
|
|
60
|
-
): Promise<
|
|
61
|
-
[
|
|
62
|
-
Result<
|
|
63
|
-
Array<shared.ShippingTracking>,
|
|
64
|
-
| UnifiedToError
|
|
65
|
-
| ResponseValidationError
|
|
66
|
-
| ConnectionError
|
|
67
|
-
| RequestAbortedError
|
|
68
|
-
| RequestTimeoutError
|
|
69
|
-
| InvalidRequestError
|
|
70
|
-
| UnexpectedClientError
|
|
71
|
-
| SDKValidationError
|
|
72
|
-
>,
|
|
73
|
-
APICall,
|
|
74
|
-
]
|
|
75
|
-
> {
|
|
76
|
-
const parsed = safeParse(
|
|
77
|
-
request,
|
|
78
|
-
(value) =>
|
|
79
|
-
operations.ListShippingTrackingsRequest$outboundSchema.parse(value),
|
|
80
|
-
"Input validation failed",
|
|
81
|
-
);
|
|
82
|
-
if (!parsed.ok) {
|
|
83
|
-
return [parsed, { status: "invalid" }];
|
|
84
|
-
}
|
|
85
|
-
const payload = parsed.value;
|
|
86
|
-
const body = null;
|
|
87
|
-
|
|
88
|
-
const pathParams = {
|
|
89
|
-
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
90
|
-
explode: false,
|
|
91
|
-
charEncoding: "percent",
|
|
92
|
-
}),
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const path = pathToFunc("/shipping/{connection_id}/tracking")(pathParams);
|
|
96
|
-
|
|
97
|
-
const query = encodeFormQuery({
|
|
98
|
-
"fields": payload.fields,
|
|
99
|
-
"limit": payload.limit,
|
|
100
|
-
"offset": payload.offset,
|
|
101
|
-
"order": payload.order,
|
|
102
|
-
"query": payload.query,
|
|
103
|
-
"raw": payload.raw,
|
|
104
|
-
"shipment_id": payload.shipment_id,
|
|
105
|
-
"sort": payload.sort,
|
|
106
|
-
"updated_gte": payload.updated_gte,
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const headers = new Headers(compactMap({
|
|
110
|
-
Accept: "application/json",
|
|
111
|
-
}));
|
|
112
|
-
|
|
113
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
114
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
115
|
-
|
|
116
|
-
const context = {
|
|
117
|
-
options: client._options,
|
|
118
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
119
|
-
operationID: "listShippingTrackings",
|
|
120
|
-
oAuth2Scopes: null,
|
|
121
|
-
|
|
122
|
-
resolvedSecurity: requestSecurity,
|
|
123
|
-
|
|
124
|
-
securitySource: client._options.security,
|
|
125
|
-
retryConfig: options?.retries
|
|
126
|
-
|| client._options.retryConfig
|
|
127
|
-
|| { strategy: "none" },
|
|
128
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const requestRes = client._createRequest(context, {
|
|
132
|
-
security: requestSecurity,
|
|
133
|
-
method: "GET",
|
|
134
|
-
baseURL: options?.serverURL,
|
|
135
|
-
path: path,
|
|
136
|
-
headers: headers,
|
|
137
|
-
query: query,
|
|
138
|
-
body: body,
|
|
139
|
-
userAgent: client._options.userAgent,
|
|
140
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
141
|
-
}, options);
|
|
142
|
-
if (!requestRes.ok) {
|
|
143
|
-
return [requestRes, { status: "invalid" }];
|
|
144
|
-
}
|
|
145
|
-
const req = requestRes.value;
|
|
146
|
-
|
|
147
|
-
const doResult = await client._do(req, {
|
|
148
|
-
context,
|
|
149
|
-
errorCodes: ["4XX", "5XX"],
|
|
150
|
-
retryConfig: context.retryConfig,
|
|
151
|
-
retryCodes: context.retryCodes,
|
|
152
|
-
});
|
|
153
|
-
if (!doResult.ok) {
|
|
154
|
-
return [doResult, { status: "request-error", request: req }];
|
|
155
|
-
}
|
|
156
|
-
const response = doResult.value;
|
|
157
|
-
|
|
158
|
-
const [result] = await M.match<
|
|
159
|
-
Array<shared.ShippingTracking>,
|
|
160
|
-
| UnifiedToError
|
|
161
|
-
| ResponseValidationError
|
|
162
|
-
| ConnectionError
|
|
163
|
-
| RequestAbortedError
|
|
164
|
-
| RequestTimeoutError
|
|
165
|
-
| InvalidRequestError
|
|
166
|
-
| UnexpectedClientError
|
|
167
|
-
| SDKValidationError
|
|
168
|
-
>(
|
|
169
|
-
M.json(200, z.array(shared.ShippingTracking$inboundSchema)),
|
|
170
|
-
M.fail("4XX"),
|
|
171
|
-
M.fail("5XX"),
|
|
172
|
-
)(response, req);
|
|
173
|
-
if (!result.ok) {
|
|
174
|
-
return [result, { status: "complete", request: req, response }];
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return [result, { status: "complete", request: req, response }];
|
|
178
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
-
import * as shared from "../shared/index.js";
|
|
9
|
-
|
|
10
|
-
export const CreateShippingTrackingQueryParamFields = {
|
|
11
|
-
Id: "id",
|
|
12
|
-
CreatedAt: "created_at",
|
|
13
|
-
UpdatedAt: "updated_at",
|
|
14
|
-
ShipmentId: "shipment_id",
|
|
15
|
-
TrackingNumber: "tracking_number",
|
|
16
|
-
Status: "status",
|
|
17
|
-
Events: "events",
|
|
18
|
-
EstimatedDelivery: "estimated_delivery",
|
|
19
|
-
ActualDeliveryAt: "actual_delivery_at",
|
|
20
|
-
StatusDescription: "status_description",
|
|
21
|
-
CarrierId: "carrier_id",
|
|
22
|
-
CarrierStatusCode: "carrier_status_code",
|
|
23
|
-
CarrierStatusDescription: "carrier_status_description",
|
|
24
|
-
Raw: "raw",
|
|
25
|
-
} as const;
|
|
26
|
-
export type CreateShippingTrackingQueryParamFields = ClosedEnum<
|
|
27
|
-
typeof CreateShippingTrackingQueryParamFields
|
|
28
|
-
>;
|
|
29
|
-
|
|
30
|
-
export type CreateShippingTrackingRequest = {
|
|
31
|
-
shippingTracking: shared.ShippingTracking;
|
|
32
|
-
/**
|
|
33
|
-
* ID of the connection
|
|
34
|
-
*/
|
|
35
|
-
connectionId: string;
|
|
36
|
-
/**
|
|
37
|
-
* Fields to return
|
|
38
|
-
*/
|
|
39
|
-
fields?: Array<CreateShippingTrackingQueryParamFields> | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
42
|
-
*/
|
|
43
|
-
raw?: string | undefined;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/** @internal */
|
|
47
|
-
export const CreateShippingTrackingQueryParamFields$outboundSchema:
|
|
48
|
-
z.ZodNativeEnum<typeof CreateShippingTrackingQueryParamFields> = z.nativeEnum(
|
|
49
|
-
CreateShippingTrackingQueryParamFields,
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
/** @internal */
|
|
53
|
-
export type CreateShippingTrackingRequest$Outbound = {
|
|
54
|
-
ShippingTracking: shared.ShippingTracking$Outbound;
|
|
55
|
-
connection_id: string;
|
|
56
|
-
fields?: Array<string> | undefined;
|
|
57
|
-
raw?: string | undefined;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** @internal */
|
|
61
|
-
export const CreateShippingTrackingRequest$outboundSchema: z.ZodType<
|
|
62
|
-
CreateShippingTrackingRequest$Outbound,
|
|
63
|
-
z.ZodTypeDef,
|
|
64
|
-
CreateShippingTrackingRequest
|
|
65
|
-
> = z.object({
|
|
66
|
-
shippingTracking: shared.ShippingTracking$outboundSchema,
|
|
67
|
-
connectionId: z.string(),
|
|
68
|
-
fields: z.array(CreateShippingTrackingQueryParamFields$outboundSchema)
|
|
69
|
-
.optional(),
|
|
70
|
-
raw: z.string().optional(),
|
|
71
|
-
}).transform((v) => {
|
|
72
|
-
return remap$(v, {
|
|
73
|
-
shippingTracking: "ShippingTracking",
|
|
74
|
-
connectionId: "connection_id",
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
export function createShippingTrackingRequestToJSON(
|
|
79
|
-
createShippingTrackingRequest: CreateShippingTrackingRequest,
|
|
80
|
-
): string {
|
|
81
|
-
return JSON.stringify(
|
|
82
|
-
CreateShippingTrackingRequest$outboundSchema.parse(
|
|
83
|
-
createShippingTrackingRequest,
|
|
84
|
-
),
|
|
85
|
-
);
|
|
86
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const GetShippingRateQueryParamFields = {
|
|
10
|
-
ShipmentId: "shipment_id",
|
|
11
|
-
Currency: "currency",
|
|
12
|
-
FromAddress: "from_address",
|
|
13
|
-
ToAddress: "to_address",
|
|
14
|
-
Packages: "packages",
|
|
15
|
-
ShipByAt: "ship_by_at",
|
|
16
|
-
CarrierId: "carrier_id",
|
|
17
|
-
Id: "id",
|
|
18
|
-
Rates: "rates",
|
|
19
|
-
Raw: "raw",
|
|
20
|
-
} as const;
|
|
21
|
-
export type GetShippingRateQueryParamFields = ClosedEnum<
|
|
22
|
-
typeof GetShippingRateQueryParamFields
|
|
23
|
-
>;
|
|
24
|
-
|
|
25
|
-
export type GetShippingRateRequest = {
|
|
26
|
-
/**
|
|
27
|
-
* ID of the connection
|
|
28
|
-
*/
|
|
29
|
-
connectionId: string;
|
|
30
|
-
/**
|
|
31
|
-
* Fields to return
|
|
32
|
-
*/
|
|
33
|
-
fields?: Array<GetShippingRateQueryParamFields> | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* ID of the Rate
|
|
36
|
-
*/
|
|
37
|
-
id: string;
|
|
38
|
-
/**
|
|
39
|
-
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
40
|
-
*/
|
|
41
|
-
raw?: string | undefined;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
export const GetShippingRateQueryParamFields$outboundSchema: z.ZodNativeEnum<
|
|
46
|
-
typeof GetShippingRateQueryParamFields
|
|
47
|
-
> = z.nativeEnum(GetShippingRateQueryParamFields);
|
|
48
|
-
|
|
49
|
-
/** @internal */
|
|
50
|
-
export type GetShippingRateRequest$Outbound = {
|
|
51
|
-
connection_id: string;
|
|
52
|
-
fields?: Array<string> | undefined;
|
|
53
|
-
id: string;
|
|
54
|
-
raw?: string | undefined;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/** @internal */
|
|
58
|
-
export const GetShippingRateRequest$outboundSchema: z.ZodType<
|
|
59
|
-
GetShippingRateRequest$Outbound,
|
|
60
|
-
z.ZodTypeDef,
|
|
61
|
-
GetShippingRateRequest
|
|
62
|
-
> = z.object({
|
|
63
|
-
connectionId: z.string(),
|
|
64
|
-
fields: z.array(GetShippingRateQueryParamFields$outboundSchema).optional(),
|
|
65
|
-
id: z.string(),
|
|
66
|
-
raw: z.string().optional(),
|
|
67
|
-
}).transform((v) => {
|
|
68
|
-
return remap$(v, {
|
|
69
|
-
connectionId: "connection_id",
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
export function getShippingRateRequestToJSON(
|
|
74
|
-
getShippingRateRequest: GetShippingRateRequest,
|
|
75
|
-
): string {
|
|
76
|
-
return JSON.stringify(
|
|
77
|
-
GetShippingRateRequest$outboundSchema.parse(getShippingRateRequest),
|
|
78
|
-
);
|
|
79
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const ListShippingTrackingsQueryParamFields = {
|
|
10
|
-
Id: "id",
|
|
11
|
-
CreatedAt: "created_at",
|
|
12
|
-
UpdatedAt: "updated_at",
|
|
13
|
-
ShipmentId: "shipment_id",
|
|
14
|
-
TrackingNumber: "tracking_number",
|
|
15
|
-
Status: "status",
|
|
16
|
-
Events: "events",
|
|
17
|
-
EstimatedDelivery: "estimated_delivery",
|
|
18
|
-
ActualDeliveryAt: "actual_delivery_at",
|
|
19
|
-
StatusDescription: "status_description",
|
|
20
|
-
CarrierId: "carrier_id",
|
|
21
|
-
CarrierStatusCode: "carrier_status_code",
|
|
22
|
-
CarrierStatusDescription: "carrier_status_description",
|
|
23
|
-
Raw: "raw",
|
|
24
|
-
} as const;
|
|
25
|
-
export type ListShippingTrackingsQueryParamFields = ClosedEnum<
|
|
26
|
-
typeof ListShippingTrackingsQueryParamFields
|
|
27
|
-
>;
|
|
28
|
-
|
|
29
|
-
export type ListShippingTrackingsRequest = {
|
|
30
|
-
/**
|
|
31
|
-
* ID of the connection
|
|
32
|
-
*/
|
|
33
|
-
connectionId: string;
|
|
34
|
-
/**
|
|
35
|
-
* Fields to return
|
|
36
|
-
*/
|
|
37
|
-
fields?: Array<ListShippingTrackingsQueryParamFields> | undefined;
|
|
38
|
-
limit?: number | undefined;
|
|
39
|
-
offset?: number | undefined;
|
|
40
|
-
order?: string | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Query string to search. eg. email address or name
|
|
43
|
-
*/
|
|
44
|
-
query?: string | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
47
|
-
*/
|
|
48
|
-
raw?: string | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* The ShippingShipment ID to filter by
|
|
51
|
-
*/
|
|
52
|
-
shipmentId?: string | undefined;
|
|
53
|
-
sort?: string | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
|
|
56
|
-
*/
|
|
57
|
-
updatedGte?: string | undefined;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** @internal */
|
|
61
|
-
export const ListShippingTrackingsQueryParamFields$outboundSchema:
|
|
62
|
-
z.ZodNativeEnum<typeof ListShippingTrackingsQueryParamFields> = z.nativeEnum(
|
|
63
|
-
ListShippingTrackingsQueryParamFields,
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
/** @internal */
|
|
67
|
-
export type ListShippingTrackingsRequest$Outbound = {
|
|
68
|
-
connection_id: string;
|
|
69
|
-
fields?: Array<string> | undefined;
|
|
70
|
-
limit?: number | undefined;
|
|
71
|
-
offset?: number | undefined;
|
|
72
|
-
order?: string | undefined;
|
|
73
|
-
query?: string | undefined;
|
|
74
|
-
raw?: string | undefined;
|
|
75
|
-
shipment_id?: string | undefined;
|
|
76
|
-
sort?: string | undefined;
|
|
77
|
-
updated_gte?: string | undefined;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/** @internal */
|
|
81
|
-
export const ListShippingTrackingsRequest$outboundSchema: z.ZodType<
|
|
82
|
-
ListShippingTrackingsRequest$Outbound,
|
|
83
|
-
z.ZodTypeDef,
|
|
84
|
-
ListShippingTrackingsRequest
|
|
85
|
-
> = z.object({
|
|
86
|
-
connectionId: z.string(),
|
|
87
|
-
fields: z.array(ListShippingTrackingsQueryParamFields$outboundSchema)
|
|
88
|
-
.optional(),
|
|
89
|
-
limit: z.number().optional(),
|
|
90
|
-
offset: z.number().optional(),
|
|
91
|
-
order: z.string().optional(),
|
|
92
|
-
query: z.string().optional(),
|
|
93
|
-
raw: z.string().optional(),
|
|
94
|
-
shipmentId: z.string().optional(),
|
|
95
|
-
sort: z.string().optional(),
|
|
96
|
-
updatedGte: z.string().optional(),
|
|
97
|
-
}).transform((v) => {
|
|
98
|
-
return remap$(v, {
|
|
99
|
-
connectionId: "connection_id",
|
|
100
|
-
shipmentId: "shipment_id",
|
|
101
|
-
updatedGte: "updated_gte",
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
export function listShippingTrackingsRequestToJSON(
|
|
106
|
-
listShippingTrackingsRequest: ListShippingTrackingsRequest,
|
|
107
|
-
): string {
|
|
108
|
-
return JSON.stringify(
|
|
109
|
-
ListShippingTrackingsRequest$outboundSchema.parse(
|
|
110
|
-
listShippingTrackingsRequest,
|
|
111
|
-
),
|
|
112
|
-
);
|
|
113
|
-
}
|