@unified-api/typescript-sdk 2.82.20 → 2.82.22
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 +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- 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/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/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/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/apicall.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/apicall.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/apicall.js +4 -0
- package/dist/commonjs/sdk/models/shared/apicall.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/connection.d.ts +6 -0
- package/dist/commonjs/sdk/models/shared/connection.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/connection.js +12 -0
- package/dist/commonjs/sdk/models/shared/connection.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 +2 -2
- package/dist/esm/lib/config.js +2 -2
- 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/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/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/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/apicall.d.ts +2 -0
- package/dist/esm/sdk/models/shared/apicall.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/apicall.js +4 -0
- package/dist/esm/sdk/models/shared/apicall.js.map +1 -1
- package/dist/esm/sdk/models/shared/connection.d.ts +6 -0
- package/dist/esm/sdk/models/shared/connection.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/connection.js +12 -0
- package/dist/esm/sdk/models/shared/connection.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 +2 -2
- package/src/sdk/label.ts +30 -0
- package/src/sdk/models/operations/index.ts +2 -3
- package/src/sdk/models/operations/patchshippinglabel.ts +88 -0
- package/src/sdk/models/operations/updateshippinglabel.ts +90 -0
- package/src/sdk/models/shared/apicall.ts +6 -0
- package/src/sdk/models/shared/connection.ts +18 -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
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { UnifiedToCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -26,15 +26,15 @@ import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
|
26
26
|
import { Result } from "../sdk/types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Update a label
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function shippingPatchShippingLabel(
|
|
32
32
|
client: UnifiedToCore,
|
|
33
|
-
request: operations.
|
|
33
|
+
request: operations.PatchShippingLabelRequest,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): APIPromise<
|
|
36
36
|
Result<
|
|
37
|
-
shared.
|
|
37
|
+
shared.ShippingLabel,
|
|
38
38
|
| UnifiedToError
|
|
39
39
|
| ResponseValidationError
|
|
40
40
|
| ConnectionError
|
|
@@ -54,12 +54,12 @@ export function shippingGetShippingRate(
|
|
|
54
54
|
|
|
55
55
|
async function $do(
|
|
56
56
|
client: UnifiedToCore,
|
|
57
|
-
request: operations.
|
|
57
|
+
request: operations.PatchShippingLabelRequest,
|
|
58
58
|
options?: RequestOptions,
|
|
59
59
|
): Promise<
|
|
60
60
|
[
|
|
61
61
|
Result<
|
|
62
|
-
shared.
|
|
62
|
+
shared.ShippingLabel,
|
|
63
63
|
| UnifiedToError
|
|
64
64
|
| ResponseValidationError
|
|
65
65
|
| ConnectionError
|
|
@@ -74,14 +74,14 @@ async function $do(
|
|
|
74
74
|
> {
|
|
75
75
|
const parsed = safeParse(
|
|
76
76
|
request,
|
|
77
|
-
(value) => operations.
|
|
77
|
+
(value) => operations.PatchShippingLabelRequest$outboundSchema.parse(value),
|
|
78
78
|
"Input validation failed",
|
|
79
79
|
);
|
|
80
80
|
if (!parsed.ok) {
|
|
81
81
|
return [parsed, { status: "invalid" }];
|
|
82
82
|
}
|
|
83
83
|
const payload = parsed.value;
|
|
84
|
-
const body =
|
|
84
|
+
const body = encodeJSON("body", payload.ShippingLabel, { explode: true });
|
|
85
85
|
|
|
86
86
|
const pathParams = {
|
|
87
87
|
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
@@ -94,7 +94,7 @@ async function $do(
|
|
|
94
94
|
}),
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
const path = pathToFunc("/shipping/{connection_id}/
|
|
97
|
+
const path = pathToFunc("/shipping/{connection_id}/label/{id}")(pathParams);
|
|
98
98
|
|
|
99
99
|
const query = encodeFormQuery({
|
|
100
100
|
"fields": payload.fields,
|
|
@@ -102,6 +102,7 @@ async function $do(
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
const headers = new Headers(compactMap({
|
|
105
|
+
"Content-Type": "application/json",
|
|
105
106
|
Accept: "application/json",
|
|
106
107
|
}));
|
|
107
108
|
|
|
@@ -111,7 +112,7 @@ async function $do(
|
|
|
111
112
|
const context = {
|
|
112
113
|
options: client._options,
|
|
113
114
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
-
operationID: "
|
|
115
|
+
operationID: "patchShippingLabel",
|
|
115
116
|
oAuth2Scopes: null,
|
|
116
117
|
|
|
117
118
|
resolvedSecurity: requestSecurity,
|
|
@@ -125,7 +126,7 @@ async function $do(
|
|
|
125
126
|
|
|
126
127
|
const requestRes = client._createRequest(context, {
|
|
127
128
|
security: requestSecurity,
|
|
128
|
-
method: "
|
|
129
|
+
method: "PATCH",
|
|
129
130
|
baseURL: options?.serverURL,
|
|
130
131
|
path: path,
|
|
131
132
|
headers: headers,
|
|
@@ -151,7 +152,7 @@ async function $do(
|
|
|
151
152
|
const response = doResult.value;
|
|
152
153
|
|
|
153
154
|
const [result] = await M.match<
|
|
154
|
-
shared.
|
|
155
|
+
shared.ShippingLabel,
|
|
155
156
|
| UnifiedToError
|
|
156
157
|
| ResponseValidationError
|
|
157
158
|
| ConnectionError
|
|
@@ -161,7 +162,7 @@ async function $do(
|
|
|
161
162
|
| UnexpectedClientError
|
|
162
163
|
| SDKValidationError
|
|
163
164
|
>(
|
|
164
|
-
M.json(200, shared.
|
|
165
|
+
M.json(200, shared.ShippingLabel$inboundSchema),
|
|
165
166
|
M.fail("4XX"),
|
|
166
167
|
M.fail("5XX"),
|
|
167
168
|
)(response, req);
|
|
@@ -26,15 +26,15 @@ import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
|
26
26
|
import { Result } from "../sdk/types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Update a label
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function shippingUpdateShippingLabel(
|
|
32
32
|
client: UnifiedToCore,
|
|
33
|
-
request: operations.
|
|
33
|
+
request: operations.UpdateShippingLabelRequest,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): APIPromise<
|
|
36
36
|
Result<
|
|
37
|
-
shared.
|
|
37
|
+
shared.ShippingLabel,
|
|
38
38
|
| UnifiedToError
|
|
39
39
|
| ResponseValidationError
|
|
40
40
|
| ConnectionError
|
|
@@ -54,12 +54,12 @@ export function shippingCreateShippingTracking(
|
|
|
54
54
|
|
|
55
55
|
async function $do(
|
|
56
56
|
client: UnifiedToCore,
|
|
57
|
-
request: operations.
|
|
57
|
+
request: operations.UpdateShippingLabelRequest,
|
|
58
58
|
options?: RequestOptions,
|
|
59
59
|
): Promise<
|
|
60
60
|
[
|
|
61
61
|
Result<
|
|
62
|
-
shared.
|
|
62
|
+
shared.ShippingLabel,
|
|
63
63
|
| UnifiedToError
|
|
64
64
|
| ResponseValidationError
|
|
65
65
|
| ConnectionError
|
|
@@ -75,23 +75,27 @@ async function $do(
|
|
|
75
75
|
const parsed = safeParse(
|
|
76
76
|
request,
|
|
77
77
|
(value) =>
|
|
78
|
-
operations.
|
|
78
|
+
operations.UpdateShippingLabelRequest$outboundSchema.parse(value),
|
|
79
79
|
"Input validation failed",
|
|
80
80
|
);
|
|
81
81
|
if (!parsed.ok) {
|
|
82
82
|
return [parsed, { status: "invalid" }];
|
|
83
83
|
}
|
|
84
84
|
const payload = parsed.value;
|
|
85
|
-
const body = encodeJSON("body", payload.
|
|
85
|
+
const body = encodeJSON("body", payload.ShippingLabel, { explode: true });
|
|
86
86
|
|
|
87
87
|
const pathParams = {
|
|
88
88
|
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
89
89
|
explode: false,
|
|
90
90
|
charEncoding: "percent",
|
|
91
91
|
}),
|
|
92
|
+
id: encodeSimple("id", payload.id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
92
96
|
};
|
|
93
97
|
|
|
94
|
-
const path = pathToFunc("/shipping/{connection_id}/
|
|
98
|
+
const path = pathToFunc("/shipping/{connection_id}/label/{id}")(pathParams);
|
|
95
99
|
|
|
96
100
|
const query = encodeFormQuery({
|
|
97
101
|
"fields": payload.fields,
|
|
@@ -109,7 +113,7 @@ async function $do(
|
|
|
109
113
|
const context = {
|
|
110
114
|
options: client._options,
|
|
111
115
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
112
|
-
operationID: "
|
|
116
|
+
operationID: "updateShippingLabel",
|
|
113
117
|
oAuth2Scopes: null,
|
|
114
118
|
|
|
115
119
|
resolvedSecurity: requestSecurity,
|
|
@@ -123,7 +127,7 @@ async function $do(
|
|
|
123
127
|
|
|
124
128
|
const requestRes = client._createRequest(context, {
|
|
125
129
|
security: requestSecurity,
|
|
126
|
-
method: "
|
|
130
|
+
method: "PUT",
|
|
127
131
|
baseURL: options?.serverURL,
|
|
128
132
|
path: path,
|
|
129
133
|
headers: headers,
|
|
@@ -149,7 +153,7 @@ async function $do(
|
|
|
149
153
|
const response = doResult.value;
|
|
150
154
|
|
|
151
155
|
const [result] = await M.match<
|
|
152
|
-
shared.
|
|
156
|
+
shared.ShippingLabel,
|
|
153
157
|
| UnifiedToError
|
|
154
158
|
| ResponseValidationError
|
|
155
159
|
| ConnectionError
|
|
@@ -159,7 +163,7 @@ async function $do(
|
|
|
159
163
|
| UnexpectedClientError
|
|
160
164
|
| SDKValidationError
|
|
161
165
|
>(
|
|
162
|
-
M.json(200, shared.
|
|
166
|
+
M.json(200, shared.ShippingLabel$inboundSchema),
|
|
163
167
|
M.fail("4XX"),
|
|
164
168
|
M.fail("5XX"),
|
|
165
169
|
)(response, req);
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.0",
|
|
76
|
-
sdkVersion: "2.82.
|
|
76
|
+
sdkVersion: "2.82.22",
|
|
77
77
|
genVersion: "2.799.0",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.82.
|
|
79
|
+
"speakeasy-sdk/typescript 2.82.22 2.799.0 1.0 @unified-api/typescript-sdk",
|
|
80
80
|
} as const;
|
package/src/sdk/label.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import { shippingCreateShippingLabel } from "../funcs/shippingCreateShippingLabel.js";
|
|
6
6
|
import { shippingGetShippingLabel } from "../funcs/shippingGetShippingLabel.js";
|
|
7
7
|
import { shippingListShippingLabels } from "../funcs/shippingListShippingLabels.js";
|
|
8
|
+
import { shippingPatchShippingLabel } from "../funcs/shippingPatchShippingLabel.js";
|
|
8
9
|
import { shippingRemoveShippingLabel } from "../funcs/shippingRemoveShippingLabel.js";
|
|
10
|
+
import { shippingUpdateShippingLabel } from "../funcs/shippingUpdateShippingLabel.js";
|
|
9
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
12
|
import * as operations from "./models/operations/index.js";
|
|
11
13
|
import * as shared from "./models/shared/index.js";
|
|
@@ -54,6 +56,20 @@ export class Label extends ClientSDK {
|
|
|
54
56
|
));
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Update a label
|
|
61
|
+
*/
|
|
62
|
+
async patchShippingLabel(
|
|
63
|
+
request: operations.PatchShippingLabelRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<shared.ShippingLabel> {
|
|
66
|
+
return unwrapAsync(shippingPatchShippingLabel(
|
|
67
|
+
this,
|
|
68
|
+
request,
|
|
69
|
+
options,
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
/**
|
|
58
74
|
* Remove a label
|
|
59
75
|
*/
|
|
@@ -67,4 +83,18 @@ export class Label extends ClientSDK {
|
|
|
67
83
|
options,
|
|
68
84
|
));
|
|
69
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update a label
|
|
89
|
+
*/
|
|
90
|
+
async updateShippingLabel(
|
|
91
|
+
request: operations.UpdateShippingLabelRequest,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<shared.ShippingLabel> {
|
|
94
|
+
return unwrapAsync(shippingUpdateShippingLabel(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
70
100
|
}
|
|
@@ -82,7 +82,6 @@ export * from "./createscimusers.js";
|
|
|
82
82
|
export * from "./createshippinglabel.js";
|
|
83
83
|
export * from "./createshippingrate.js";
|
|
84
84
|
export * from "./createshippingshipment.js";
|
|
85
|
-
export * from "./createshippingtracking.js";
|
|
86
85
|
export * from "./createstoragefile.js";
|
|
87
86
|
export * from "./createtaskcomment.js";
|
|
88
87
|
export * from "./createtaskproject.js";
|
|
@@ -185,7 +184,6 @@ export * from "./getscimgroups.js";
|
|
|
185
184
|
export * from "./getscimusers.js";
|
|
186
185
|
export * from "./getshippingcarrier.js";
|
|
187
186
|
export * from "./getshippinglabel.js";
|
|
188
|
-
export * from "./getshippingrate.js";
|
|
189
187
|
export * from "./getshippingshipment.js";
|
|
190
188
|
export * from "./getshippingtracking.js";
|
|
191
189
|
export * from "./getstoragefile.js";
|
|
@@ -305,7 +303,6 @@ export * from "./listscimusers.js";
|
|
|
305
303
|
export * from "./listshippingcarriers.js";
|
|
306
304
|
export * from "./listshippinglabels.js";
|
|
307
305
|
export * from "./listshippingshipments.js";
|
|
308
|
-
export * from "./listshippingtrackings.js";
|
|
309
306
|
export * from "./liststoragefiles.js";
|
|
310
307
|
export * from "./listtaskchanges.js";
|
|
311
308
|
export * from "./listtaskcomments.js";
|
|
@@ -403,6 +400,7 @@ export * from "./patchrepopullrequest.js";
|
|
|
403
400
|
export * from "./patchreporepository.js";
|
|
404
401
|
export * from "./patchscimgroups.js";
|
|
405
402
|
export * from "./patchscimusers.js";
|
|
403
|
+
export * from "./patchshippinglabel.js";
|
|
406
404
|
export * from "./patchshippingshipment.js";
|
|
407
405
|
export * from "./patchstoragefile.js";
|
|
408
406
|
export * from "./patchtaskcomment.js";
|
|
@@ -586,6 +584,7 @@ export * from "./updaterepopullrequest.js";
|
|
|
586
584
|
export * from "./updatereporepository.js";
|
|
587
585
|
export * from "./updatescimgroups.js";
|
|
588
586
|
export * from "./updatescimusers.js";
|
|
587
|
+
export * from "./updateshippinglabel.js";
|
|
589
588
|
export * from "./updateshippingshipment.js";
|
|
590
589
|
export * from "./updatestoragefile.js";
|
|
591
590
|
export * from "./updatetaskcomment.js";
|
|
@@ -0,0 +1,88 @@
|
|
|
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 PatchShippingLabelQueryParamFields = {
|
|
11
|
+
Id: "id",
|
|
12
|
+
CreatedAt: "created_at",
|
|
13
|
+
UpdatedAt: "updated_at",
|
|
14
|
+
ShipmentId: "shipment_id",
|
|
15
|
+
TrackingNumber: "tracking_number",
|
|
16
|
+
LabelUrl: "label_url",
|
|
17
|
+
LabelFormat: "label_format",
|
|
18
|
+
Status: "status",
|
|
19
|
+
IsVoided: "is_voided",
|
|
20
|
+
LabelCost: "label_cost",
|
|
21
|
+
LabelCostCurrency: "label_cost_currency",
|
|
22
|
+
RateId: "rate_id",
|
|
23
|
+
ServiceCode: "service_code",
|
|
24
|
+
Raw: "raw",
|
|
25
|
+
} as const;
|
|
26
|
+
export type PatchShippingLabelQueryParamFields = ClosedEnum<
|
|
27
|
+
typeof PatchShippingLabelQueryParamFields
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type PatchShippingLabelRequest = {
|
|
31
|
+
shippingLabel: shared.ShippingLabel;
|
|
32
|
+
/**
|
|
33
|
+
* ID of the connection
|
|
34
|
+
*/
|
|
35
|
+
connectionId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Fields to return
|
|
38
|
+
*/
|
|
39
|
+
fields?: Array<PatchShippingLabelQueryParamFields> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* ID of the Label
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* 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
|
|
46
|
+
*/
|
|
47
|
+
raw?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const PatchShippingLabelQueryParamFields$outboundSchema: z.ZodNativeEnum<
|
|
52
|
+
typeof PatchShippingLabelQueryParamFields
|
|
53
|
+
> = z.nativeEnum(PatchShippingLabelQueryParamFields);
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type PatchShippingLabelRequest$Outbound = {
|
|
57
|
+
ShippingLabel: shared.ShippingLabel$Outbound;
|
|
58
|
+
connection_id: string;
|
|
59
|
+
fields?: Array<string> | undefined;
|
|
60
|
+
id: string;
|
|
61
|
+
raw?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const PatchShippingLabelRequest$outboundSchema: z.ZodType<
|
|
66
|
+
PatchShippingLabelRequest$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
PatchShippingLabelRequest
|
|
69
|
+
> = z.object({
|
|
70
|
+
shippingLabel: shared.ShippingLabel$outboundSchema,
|
|
71
|
+
connectionId: z.string(),
|
|
72
|
+
fields: z.array(PatchShippingLabelQueryParamFields$outboundSchema).optional(),
|
|
73
|
+
id: z.string(),
|
|
74
|
+
raw: z.string().optional(),
|
|
75
|
+
}).transform((v) => {
|
|
76
|
+
return remap$(v, {
|
|
77
|
+
shippingLabel: "ShippingLabel",
|
|
78
|
+
connectionId: "connection_id",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function patchShippingLabelRequestToJSON(
|
|
83
|
+
patchShippingLabelRequest: PatchShippingLabelRequest,
|
|
84
|
+
): string {
|
|
85
|
+
return JSON.stringify(
|
|
86
|
+
PatchShippingLabelRequest$outboundSchema.parse(patchShippingLabelRequest),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 UpdateShippingLabelQueryParamFields = {
|
|
11
|
+
Id: "id",
|
|
12
|
+
CreatedAt: "created_at",
|
|
13
|
+
UpdatedAt: "updated_at",
|
|
14
|
+
ShipmentId: "shipment_id",
|
|
15
|
+
TrackingNumber: "tracking_number",
|
|
16
|
+
LabelUrl: "label_url",
|
|
17
|
+
LabelFormat: "label_format",
|
|
18
|
+
Status: "status",
|
|
19
|
+
IsVoided: "is_voided",
|
|
20
|
+
LabelCost: "label_cost",
|
|
21
|
+
LabelCostCurrency: "label_cost_currency",
|
|
22
|
+
RateId: "rate_id",
|
|
23
|
+
ServiceCode: "service_code",
|
|
24
|
+
Raw: "raw",
|
|
25
|
+
} as const;
|
|
26
|
+
export type UpdateShippingLabelQueryParamFields = ClosedEnum<
|
|
27
|
+
typeof UpdateShippingLabelQueryParamFields
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type UpdateShippingLabelRequest = {
|
|
31
|
+
shippingLabel: shared.ShippingLabel;
|
|
32
|
+
/**
|
|
33
|
+
* ID of the connection
|
|
34
|
+
*/
|
|
35
|
+
connectionId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Fields to return
|
|
38
|
+
*/
|
|
39
|
+
fields?: Array<UpdateShippingLabelQueryParamFields> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* ID of the Label
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* 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
|
|
46
|
+
*/
|
|
47
|
+
raw?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const UpdateShippingLabelQueryParamFields$outboundSchema:
|
|
52
|
+
z.ZodNativeEnum<typeof UpdateShippingLabelQueryParamFields> = z.nativeEnum(
|
|
53
|
+
UpdateShippingLabelQueryParamFields,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type UpdateShippingLabelRequest$Outbound = {
|
|
58
|
+
ShippingLabel: shared.ShippingLabel$Outbound;
|
|
59
|
+
connection_id: string;
|
|
60
|
+
fields?: Array<string> | undefined;
|
|
61
|
+
id: string;
|
|
62
|
+
raw?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const UpdateShippingLabelRequest$outboundSchema: z.ZodType<
|
|
67
|
+
UpdateShippingLabelRequest$Outbound,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
UpdateShippingLabelRequest
|
|
70
|
+
> = z.object({
|
|
71
|
+
shippingLabel: shared.ShippingLabel$outboundSchema,
|
|
72
|
+
connectionId: z.string(),
|
|
73
|
+
fields: z.array(UpdateShippingLabelQueryParamFields$outboundSchema)
|
|
74
|
+
.optional(),
|
|
75
|
+
id: z.string(),
|
|
76
|
+
raw: z.string().optional(),
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
shippingLabel: "ShippingLabel",
|
|
80
|
+
connectionId: "connection_id",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export function updateShippingLabelRequestToJSON(
|
|
85
|
+
updateShippingLabelRequest: UpdateShippingLabelRequest,
|
|
86
|
+
): string {
|
|
87
|
+
return JSON.stringify(
|
|
88
|
+
UpdateShippingLabelRequest$outboundSchema.parse(updateShippingLabelRequest),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -21,6 +21,7 @@ export type ApiCallType = OpenEnum<typeof ApiCallType>;
|
|
|
21
21
|
export type ApiCall = {
|
|
22
22
|
connectionId?: string | undefined;
|
|
23
23
|
createdAt?: Date | undefined;
|
|
24
|
+
endapiResponseTime?: number | undefined;
|
|
24
25
|
environment: string;
|
|
25
26
|
error?: string | undefined;
|
|
26
27
|
externalXref?: string | undefined;
|
|
@@ -34,6 +35,7 @@ export type ApiCall = {
|
|
|
34
35
|
size?: number | undefined;
|
|
35
36
|
status: string;
|
|
36
37
|
type: ApiCallType;
|
|
38
|
+
unifiedResponseTime?: number | undefined;
|
|
37
39
|
userAgent?: string | undefined;
|
|
38
40
|
webhookId?: string | undefined;
|
|
39
41
|
workspaceId?: string | undefined;
|
|
@@ -53,6 +55,7 @@ export const ApiCall$inboundSchema: z.ZodType<ApiCall, z.ZodTypeDef, unknown> =
|
|
|
53
55
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
54
56
|
new Date(v)
|
|
55
57
|
).optional(),
|
|
58
|
+
endapi_response_time: z.number().optional(),
|
|
56
59
|
environment: z.string().default("Production"),
|
|
57
60
|
error: z.string().optional(),
|
|
58
61
|
external_xref: z.string().optional(),
|
|
@@ -66,6 +69,7 @@ export const ApiCall$inboundSchema: z.ZodType<ApiCall, z.ZodTypeDef, unknown> =
|
|
|
66
69
|
size: z.number().optional(),
|
|
67
70
|
status: z.string(),
|
|
68
71
|
type: ApiCallType$inboundSchema,
|
|
72
|
+
unified_response_time: z.number().optional(),
|
|
69
73
|
user_agent: z.string().optional(),
|
|
70
74
|
webhook_id: z.string().optional(),
|
|
71
75
|
workspace_id: z.string().optional(),
|
|
@@ -73,10 +77,12 @@ export const ApiCall$inboundSchema: z.ZodType<ApiCall, z.ZodTypeDef, unknown> =
|
|
|
73
77
|
return remap$(v, {
|
|
74
78
|
"connection_id": "connectionId",
|
|
75
79
|
"created_at": "createdAt",
|
|
80
|
+
"endapi_response_time": "endapiResponseTime",
|
|
76
81
|
"external_xref": "externalXref",
|
|
77
82
|
"integration_type": "integrationType",
|
|
78
83
|
"ip_address": "ipAddress",
|
|
79
84
|
"is_billable": "isBillable",
|
|
85
|
+
"unified_response_time": "unifiedResponseTime",
|
|
80
86
|
"user_agent": "userAgent",
|
|
81
87
|
"webhook_id": "webhookId",
|
|
82
88
|
"workspace_id": "workspaceId",
|
|
@@ -33,6 +33,9 @@ export type Connection = {
|
|
|
33
33
|
*/
|
|
34
34
|
auth?: PropertyConnectionAuth | undefined;
|
|
35
35
|
authAwsArn?: string | undefined;
|
|
36
|
+
authAzureKeyvaultId?: string | undefined;
|
|
37
|
+
authGcpSecretName?: string | undefined;
|
|
38
|
+
authHashiVaultPath?: string | undefined;
|
|
36
39
|
/**
|
|
37
40
|
* The Integration categories that this connection supports
|
|
38
41
|
*/
|
|
@@ -59,6 +62,9 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
59
62
|
> = z.object({
|
|
60
63
|
auth: PropertyConnectionAuth$inboundSchema.optional(),
|
|
61
64
|
auth_aws_arn: z.string().optional(),
|
|
65
|
+
auth_azure_keyvault_id: z.string().optional(),
|
|
66
|
+
auth_gcp_secret_name: z.string().optional(),
|
|
67
|
+
auth_hashi_vault_path: z.string().optional(),
|
|
62
68
|
categories: z.array(PropertyConnectionCategories$inboundSchema),
|
|
63
69
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
64
70
|
.optional(),
|
|
@@ -81,6 +87,9 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
81
87
|
}).transform((v) => {
|
|
82
88
|
return remap$(v, {
|
|
83
89
|
"auth_aws_arn": "authAwsArn",
|
|
90
|
+
"auth_azure_keyvault_id": "authAzureKeyvaultId",
|
|
91
|
+
"auth_gcp_secret_name": "authGcpSecretName",
|
|
92
|
+
"auth_hashi_vault_path": "authHashiVaultPath",
|
|
84
93
|
"created_at": "createdAt",
|
|
85
94
|
"external_xref": "externalXref",
|
|
86
95
|
"integration_name": "integrationName",
|
|
@@ -96,6 +105,9 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
96
105
|
export type Connection$Outbound = {
|
|
97
106
|
auth?: PropertyConnectionAuth$Outbound | undefined;
|
|
98
107
|
auth_aws_arn?: string | undefined;
|
|
108
|
+
auth_azure_keyvault_id?: string | undefined;
|
|
109
|
+
auth_gcp_secret_name?: string | undefined;
|
|
110
|
+
auth_hashi_vault_path?: string | undefined;
|
|
99
111
|
categories: Array<string>;
|
|
100
112
|
created_at?: string | undefined;
|
|
101
113
|
environment: string;
|
|
@@ -119,6 +131,9 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
119
131
|
> = z.object({
|
|
120
132
|
auth: PropertyConnectionAuth$outboundSchema.optional(),
|
|
121
133
|
authAwsArn: z.string().optional(),
|
|
134
|
+
authAzureKeyvaultId: z.string().optional(),
|
|
135
|
+
authGcpSecretName: z.string().optional(),
|
|
136
|
+
authHashiVaultPath: z.string().optional(),
|
|
122
137
|
categories: z.array(PropertyConnectionCategories$outboundSchema),
|
|
123
138
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
124
139
|
environment: z.string().default("Production"),
|
|
@@ -135,6 +150,9 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
135
150
|
}).transform((v) => {
|
|
136
151
|
return remap$(v, {
|
|
137
152
|
authAwsArn: "auth_aws_arn",
|
|
153
|
+
authAzureKeyvaultId: "auth_azure_keyvault_id",
|
|
154
|
+
authGcpSecretName: "auth_gcp_secret_name",
|
|
155
|
+
authHashiVaultPath: "auth_hashi_vault_path",
|
|
138
156
|
createdAt: "created_at",
|
|
139
157
|
externalXref: "external_xref",
|
|
140
158
|
integrationName: "integration_name",
|