@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
|
@@ -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.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "2.82.23",
|
|
77
|
+
genVersion: "2.801.2",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.82.
|
|
79
|
+
"speakeasy-sdk/typescript 2.82.23 2.801.2 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
|
+
}
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
export type AccountingExpense = {
|
|
18
18
|
approvedAt?: Date | undefined;
|
|
19
19
|
approverUserId?: string | undefined;
|
|
20
|
+
contactId?: string | undefined;
|
|
20
21
|
createdAt?: Date | undefined;
|
|
21
22
|
currency?: string | undefined;
|
|
22
23
|
id?: string | undefined;
|
|
@@ -40,6 +41,7 @@ export const AccountingExpense$inboundSchema: z.ZodType<
|
|
|
40
41
|
approved_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
41
42
|
.optional(),
|
|
42
43
|
approver_user_id: z.string().optional(),
|
|
44
|
+
contact_id: z.string().optional(),
|
|
43
45
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
44
46
|
.optional(),
|
|
45
47
|
currency: z.string().optional(),
|
|
@@ -60,6 +62,7 @@ export const AccountingExpense$inboundSchema: z.ZodType<
|
|
|
60
62
|
return remap$(v, {
|
|
61
63
|
"approved_at": "approvedAt",
|
|
62
64
|
"approver_user_id": "approverUserId",
|
|
65
|
+
"contact_id": "contactId",
|
|
63
66
|
"created_at": "createdAt",
|
|
64
67
|
"reimbursed_amount": "reimbursedAmount",
|
|
65
68
|
"reimbursed_at": "reimbursedAt",
|
|
@@ -73,6 +76,7 @@ export const AccountingExpense$inboundSchema: z.ZodType<
|
|
|
73
76
|
export type AccountingExpense$Outbound = {
|
|
74
77
|
approved_at?: string | undefined;
|
|
75
78
|
approver_user_id?: string | undefined;
|
|
79
|
+
contact_id?: string | undefined;
|
|
76
80
|
created_at?: string | undefined;
|
|
77
81
|
currency?: string | undefined;
|
|
78
82
|
id?: string | undefined;
|
|
@@ -95,6 +99,7 @@ export const AccountingExpense$outboundSchema: z.ZodType<
|
|
|
95
99
|
> = z.object({
|
|
96
100
|
approvedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
97
101
|
approverUserId: z.string().optional(),
|
|
102
|
+
contactId: z.string().optional(),
|
|
98
103
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
99
104
|
currency: z.string().optional(),
|
|
100
105
|
id: z.string().optional(),
|
|
@@ -111,6 +116,7 @@ export const AccountingExpense$outboundSchema: z.ZodType<
|
|
|
111
116
|
return remap$(v, {
|
|
112
117
|
approvedAt: "approved_at",
|
|
113
118
|
approverUserId: "approver_user_id",
|
|
119
|
+
contactId: "contact_id",
|
|
114
120
|
createdAt: "created_at",
|
|
115
121
|
reimbursedAmount: "reimbursed_amount",
|
|
116
122
|
reimbursedAt: "reimbursed_at",
|
|
@@ -12,6 +12,8 @@ export type AccountingJournalLineitem = {
|
|
|
12
12
|
accountId?: string | undefined;
|
|
13
13
|
categoryIds?: Array<string> | undefined;
|
|
14
14
|
contactId?: string | undefined;
|
|
15
|
+
creditAmount?: number | undefined;
|
|
16
|
+
debitAmount?: number | undefined;
|
|
15
17
|
description?: string | undefined;
|
|
16
18
|
groupId?: string | undefined;
|
|
17
19
|
id?: string | undefined;
|
|
@@ -31,6 +33,8 @@ export const AccountingJournalLineitem$inboundSchema: z.ZodType<
|
|
|
31
33
|
account_id: z.string().optional(),
|
|
32
34
|
category_ids: z.array(z.string()).optional(),
|
|
33
35
|
contact_id: z.string().optional(),
|
|
36
|
+
credit_amount: z.number().optional(),
|
|
37
|
+
debit_amount: z.number().optional(),
|
|
34
38
|
description: z.string().optional(),
|
|
35
39
|
group_id: z.string().optional(),
|
|
36
40
|
id: z.string().optional(),
|
|
@@ -44,6 +48,8 @@ export const AccountingJournalLineitem$inboundSchema: z.ZodType<
|
|
|
44
48
|
"account_id": "accountId",
|
|
45
49
|
"category_ids": "categoryIds",
|
|
46
50
|
"contact_id": "contactId",
|
|
51
|
+
"credit_amount": "creditAmount",
|
|
52
|
+
"debit_amount": "debitAmount",
|
|
47
53
|
"group_id": "groupId",
|
|
48
54
|
"invoice_id": "invoiceId",
|
|
49
55
|
"payment_id": "paymentId",
|
|
@@ -57,6 +63,8 @@ export type AccountingJournalLineitem$Outbound = {
|
|
|
57
63
|
account_id?: string | undefined;
|
|
58
64
|
category_ids?: Array<string> | undefined;
|
|
59
65
|
contact_id?: string | undefined;
|
|
66
|
+
credit_amount?: number | undefined;
|
|
67
|
+
debit_amount?: number | undefined;
|
|
60
68
|
description?: string | undefined;
|
|
61
69
|
group_id?: string | undefined;
|
|
62
70
|
id?: string | undefined;
|
|
@@ -76,6 +84,8 @@ export const AccountingJournalLineitem$outboundSchema: z.ZodType<
|
|
|
76
84
|
accountId: z.string().optional(),
|
|
77
85
|
categoryIds: z.array(z.string()).optional(),
|
|
78
86
|
contactId: z.string().optional(),
|
|
87
|
+
creditAmount: z.number().optional(),
|
|
88
|
+
debitAmount: z.number().optional(),
|
|
79
89
|
description: z.string().optional(),
|
|
80
90
|
groupId: z.string().optional(),
|
|
81
91
|
id: z.string().optional(),
|
|
@@ -89,6 +99,8 @@ export const AccountingJournalLineitem$outboundSchema: z.ZodType<
|
|
|
89
99
|
accountId: "account_id",
|
|
90
100
|
categoryIds: "category_ids",
|
|
91
101
|
contactId: "contact_id",
|
|
102
|
+
creditAmount: "credit_amount",
|
|
103
|
+
debitAmount: "debit_amount",
|
|
92
104
|
groupId: "group_id",
|
|
93
105
|
invoiceId: "invoice_id",
|
|
94
106
|
paymentId: "payment_id",
|
|
@@ -59,69 +59,7 @@ export const PropertyShippingTrackingEventLocationAddress$inboundSchema:
|
|
|
59
59
|
"region_code": "regionCode",
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
|
-
/** @internal */
|
|
63
|
-
export type PropertyShippingTrackingEventLocationAddress$Outbound = {
|
|
64
|
-
address1?: string | undefined;
|
|
65
|
-
address2?: string | undefined;
|
|
66
|
-
city?: string | undefined;
|
|
67
|
-
company_name?: string | undefined;
|
|
68
|
-
country?: string | undefined;
|
|
69
|
-
country_code?: string | undefined;
|
|
70
|
-
delivery_instructions?: string | undefined;
|
|
71
|
-
email?: string | undefined;
|
|
72
|
-
is_residential?: boolean | undefined;
|
|
73
|
-
is_validated?: boolean | undefined;
|
|
74
|
-
name?: string | undefined;
|
|
75
|
-
postal_code?: string | undefined;
|
|
76
|
-
region?: string | undefined;
|
|
77
|
-
region_code?: string | undefined;
|
|
78
|
-
telephone?: string | undefined;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/** @internal */
|
|
82
|
-
export const PropertyShippingTrackingEventLocationAddress$outboundSchema:
|
|
83
|
-
z.ZodType<
|
|
84
|
-
PropertyShippingTrackingEventLocationAddress$Outbound,
|
|
85
|
-
z.ZodTypeDef,
|
|
86
|
-
PropertyShippingTrackingEventLocationAddress
|
|
87
|
-
> = z.object({
|
|
88
|
-
address1: z.string().optional(),
|
|
89
|
-
address2: z.string().optional(),
|
|
90
|
-
city: z.string().optional(),
|
|
91
|
-
companyName: z.string().optional(),
|
|
92
|
-
country: z.string().optional(),
|
|
93
|
-
countryCode: z.string().optional(),
|
|
94
|
-
deliveryInstructions: z.string().optional(),
|
|
95
|
-
email: z.string().optional(),
|
|
96
|
-
isResidential: z.boolean().optional(),
|
|
97
|
-
isValidated: z.boolean().optional(),
|
|
98
|
-
name: z.string().optional(),
|
|
99
|
-
postalCode: z.string().optional(),
|
|
100
|
-
region: z.string().optional(),
|
|
101
|
-
regionCode: z.string().optional(),
|
|
102
|
-
telephone: z.string().optional(),
|
|
103
|
-
}).transform((v) => {
|
|
104
|
-
return remap$(v, {
|
|
105
|
-
companyName: "company_name",
|
|
106
|
-
countryCode: "country_code",
|
|
107
|
-
deliveryInstructions: "delivery_instructions",
|
|
108
|
-
isResidential: "is_residential",
|
|
109
|
-
isValidated: "is_validated",
|
|
110
|
-
postalCode: "postal_code",
|
|
111
|
-
regionCode: "region_code",
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
62
|
|
|
115
|
-
export function propertyShippingTrackingEventLocationAddressToJSON(
|
|
116
|
-
propertyShippingTrackingEventLocationAddress:
|
|
117
|
-
PropertyShippingTrackingEventLocationAddress,
|
|
118
|
-
): string {
|
|
119
|
-
return JSON.stringify(
|
|
120
|
-
PropertyShippingTrackingEventLocationAddress$outboundSchema.parse(
|
|
121
|
-
propertyShippingTrackingEventLocationAddress,
|
|
122
|
-
),
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
63
|
export function propertyShippingTrackingEventLocationAddressFromJSON(
|
|
126
64
|
jsonString: string,
|
|
127
65
|
): SafeParseResult<
|
|
@@ -12,8 +12,6 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
import {
|
|
13
13
|
ShippingTrackingEvent,
|
|
14
14
|
ShippingTrackingEvent$inboundSchema,
|
|
15
|
-
ShippingTrackingEvent$Outbound,
|
|
16
|
-
ShippingTrackingEvent$outboundSchema,
|
|
17
15
|
} from "./shippingtrackingevent.js";
|
|
18
16
|
|
|
19
17
|
export const ShippingTrackingStatus = {
|
|
@@ -60,12 +58,6 @@ export const ShippingTrackingStatus$inboundSchema: z.ZodType<
|
|
|
60
58
|
z.ZodTypeDef,
|
|
61
59
|
unknown
|
|
62
60
|
> = openEnums.inboundSchema(ShippingTrackingStatus);
|
|
63
|
-
/** @internal */
|
|
64
|
-
export const ShippingTrackingStatus$outboundSchema: z.ZodType<
|
|
65
|
-
string,
|
|
66
|
-
z.ZodTypeDef,
|
|
67
|
-
ShippingTrackingStatus
|
|
68
|
-
> = openEnums.outboundSchema(ShippingTrackingStatus);
|
|
69
61
|
|
|
70
62
|
/** @internal */
|
|
71
63
|
export const ShippingTracking$inboundSchema: z.ZodType<
|
|
@@ -107,66 +99,7 @@ export const ShippingTracking$inboundSchema: z.ZodType<
|
|
|
107
99
|
"updated_at": "updatedAt",
|
|
108
100
|
});
|
|
109
101
|
});
|
|
110
|
-
/** @internal */
|
|
111
|
-
export type ShippingTracking$Outbound = {
|
|
112
|
-
actual_delivery_at?: string | undefined;
|
|
113
|
-
carrier_id?: string | undefined;
|
|
114
|
-
carrier_status_code?: string | undefined;
|
|
115
|
-
carrier_status_description?: string | undefined;
|
|
116
|
-
created_at?: string | undefined;
|
|
117
|
-
estimated_delivery?: string | undefined;
|
|
118
|
-
events?: Array<ShippingTrackingEvent$Outbound> | undefined;
|
|
119
|
-
id?: string | undefined;
|
|
120
|
-
raw?: { [k: string]: any } | undefined;
|
|
121
|
-
shipment_id?: string | undefined;
|
|
122
|
-
status?: string | undefined;
|
|
123
|
-
status_description?: string | undefined;
|
|
124
|
-
tracking_number?: string | undefined;
|
|
125
|
-
updated_at?: string | undefined;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/** @internal */
|
|
129
|
-
export const ShippingTracking$outboundSchema: z.ZodType<
|
|
130
|
-
ShippingTracking$Outbound,
|
|
131
|
-
z.ZodTypeDef,
|
|
132
|
-
ShippingTracking
|
|
133
|
-
> = z.object({
|
|
134
|
-
actualDeliveryAt: z.date().transform(v => v.toISOString()).optional(),
|
|
135
|
-
carrierId: z.string().optional(),
|
|
136
|
-
carrierStatusCode: z.string().optional(),
|
|
137
|
-
carrierStatusDescription: z.string().optional(),
|
|
138
|
-
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
139
|
-
estimatedDelivery: z.date().transform(v => v.toISOString()).optional(),
|
|
140
|
-
events: z.array(ShippingTrackingEvent$outboundSchema).optional(),
|
|
141
|
-
id: z.string().optional(),
|
|
142
|
-
raw: z.record(z.any()).optional(),
|
|
143
|
-
shipmentId: z.string().optional(),
|
|
144
|
-
status: ShippingTrackingStatus$outboundSchema.optional(),
|
|
145
|
-
statusDescription: z.string().optional(),
|
|
146
|
-
trackingNumber: z.string().optional(),
|
|
147
|
-
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
148
|
-
}).transform((v) => {
|
|
149
|
-
return remap$(v, {
|
|
150
|
-
actualDeliveryAt: "actual_delivery_at",
|
|
151
|
-
carrierId: "carrier_id",
|
|
152
|
-
carrierStatusCode: "carrier_status_code",
|
|
153
|
-
carrierStatusDescription: "carrier_status_description",
|
|
154
|
-
createdAt: "created_at",
|
|
155
|
-
estimatedDelivery: "estimated_delivery",
|
|
156
|
-
shipmentId: "shipment_id",
|
|
157
|
-
statusDescription: "status_description",
|
|
158
|
-
trackingNumber: "tracking_number",
|
|
159
|
-
updatedAt: "updated_at",
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
102
|
|
|
163
|
-
export function shippingTrackingToJSON(
|
|
164
|
-
shippingTracking: ShippingTracking,
|
|
165
|
-
): string {
|
|
166
|
-
return JSON.stringify(
|
|
167
|
-
ShippingTracking$outboundSchema.parse(shippingTracking),
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
103
|
export function shippingTrackingFromJSON(
|
|
171
104
|
jsonString: string,
|
|
172
105
|
): SafeParseResult<ShippingTracking, SDKValidationError> {
|