@dockflow/sdk 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +89 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +157 -2
- package/dist/apis/V3DocumentApi.d.ts +111 -0
- package/dist/apis/V3DocumentApi.js +269 -0
- package/dist/apis/V3DownstreamApi.d.ts +63 -0
- package/dist/apis/V3DownstreamApi.js +138 -0
- package/dist/apis/V3UpstreamApi.d.ts +92 -0
- package/dist/apis/V3UpstreamApi.js +122 -0
- package/dist/apis/WidgetApi.d.ts +38 -0
- package/dist/apis/WidgetApi.js +83 -0
- package/dist/apis/index.d.ts +4 -0
- package/dist/apis/index.js +22 -0
- package/dist/esm/apis/V3DocumentApi.d.ts +111 -0
- package/dist/esm/apis/V3DocumentApi.js +265 -0
- package/dist/esm/apis/V3DownstreamApi.d.ts +63 -0
- package/dist/esm/apis/V3DownstreamApi.js +134 -0
- package/dist/esm/apis/V3UpstreamApi.d.ts +92 -0
- package/dist/esm/apis/V3UpstreamApi.js +118 -0
- package/dist/esm/apis/WidgetApi.d.ts +38 -0
- package/dist/esm/apis/WidgetApi.js +79 -0
- package/dist/esm/apis/index.d.ts +4 -0
- package/dist/esm/apis/index.js +6 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ContainerReference.d.ts +34 -0
- package/dist/esm/models/ContainerReference.js +45 -0
- package/dist/esm/models/DocumentUpdate.d.ts +38 -0
- package/dist/esm/models/DocumentUpdate.js +45 -0
- package/dist/esm/models/DocumentUpload.d.ts +70 -0
- package/dist/esm/models/DocumentUpload.js +76 -0
- package/dist/esm/models/DownstreamTradeflow.d.ts +150 -0
- package/dist/esm/models/DownstreamTradeflow.js +108 -0
- package/dist/esm/models/DownstreamTradeflowBillOfLadingReference.d.ts +26 -0
- package/dist/esm/models/DownstreamTradeflowBillOfLadingReference.js +31 -0
- package/dist/esm/models/DownstreamTradeflowBookingReference.d.ts +26 -0
- package/dist/esm/models/DownstreamTradeflowBookingReference.js +31 -0
- package/dist/esm/models/DownstreamTradeflowEventsInner.d.ts +46 -0
- package/dist/esm/models/DownstreamTradeflowEventsInner.js +54 -0
- package/dist/esm/models/DownstreamTradeflowFreeTimeOverridesInner.d.ts +53 -0
- package/dist/esm/models/DownstreamTradeflowFreeTimeOverridesInner.js +59 -0
- package/dist/esm/models/DownstreamTradeflowMockTracking.d.ts +30 -0
- package/dist/esm/models/DownstreamTradeflowMockTracking.js +41 -0
- package/dist/esm/models/DownstreamTradeflowPartnersInner.d.ts +42 -0
- package/dist/esm/models/DownstreamTradeflowPartnersInner.js +49 -0
- package/dist/esm/models/DownstreamTradeflowReferences.d.ts +38 -0
- package/dist/esm/models/DownstreamTradeflowReferences.js +45 -0
- package/dist/esm/models/InlineObject.d.ts +36 -0
- package/dist/esm/models/InlineObject.js +47 -0
- package/dist/esm/models/ListDocumentTypes200ResponseInner.d.ts +34 -0
- package/dist/esm/models/ListDocumentTypes200ResponseInner.js +47 -0
- package/dist/esm/models/UpstreamRecord.d.ts +77 -0
- package/dist/esm/models/UpstreamRecord.js +80 -0
- package/dist/esm/models/UpstreamRecordAdditionalReferences.d.ts +34 -0
- package/dist/esm/models/UpstreamRecordAdditionalReferences.js +43 -0
- package/dist/esm/models/UpstreamRecordDataQuality.d.ts +46 -0
- package/dist/esm/models/UpstreamRecordDataQuality.js +49 -0
- package/dist/esm/models/UpstreamRecordMetadata.d.ts +42 -0
- package/dist/esm/models/UpstreamRecordMetadata.js +48 -0
- package/dist/esm/models/V3DocumentGet200Response.d.ts +39 -0
- package/dist/esm/models/V3DocumentGet200Response.js +52 -0
- package/dist/esm/models/V3DocumentGet200ResponseDataInner.d.ts +63 -0
- package/dist/esm/models/V3DocumentGet200ResponseDataInner.js +76 -0
- package/dist/esm/models/V3DocumentGet200ResponseDataInnerDocumentType.d.ts +34 -0
- package/dist/esm/models/V3DocumentGet200ResponseDataInnerDocumentType.js +47 -0
- package/dist/esm/models/V3DocumentPost202Response.d.ts +54 -0
- package/dist/esm/models/V3DocumentPost202Response.js +67 -0
- package/dist/esm/models/V3DocumentPost400Response.d.ts +26 -0
- package/dist/esm/models/V3DocumentPost400Response.js +31 -0
- package/dist/esm/models/V3DownstreamPost202Response.d.ts +42 -0
- package/dist/esm/models/V3DownstreamPost202Response.js +56 -0
- package/dist/esm/models/V3DownstreamPost202ResponseTradeflowsInner.d.ts +34 -0
- package/dist/esm/models/V3DownstreamPost202ResponseTradeflowsInner.js +47 -0
- package/dist/esm/models/V3UpstreamGet200Response.d.ts +35 -0
- package/dist/esm/models/V3UpstreamGet200Response.js +48 -0
- package/dist/esm/models/V3UpstreamGet400Response.d.ts +26 -0
- package/dist/esm/models/V3UpstreamGet400Response.js +31 -0
- package/dist/esm/models/WidgetContainer.d.ts +47 -0
- package/dist/esm/models/WidgetContainer.js +60 -0
- package/dist/esm/models/WidgetCountry.d.ts +34 -0
- package/dist/esm/models/WidgetCountry.js +47 -0
- package/dist/esm/models/WidgetLeg.d.ts +43 -0
- package/dist/esm/models/WidgetLeg.js +56 -0
- package/dist/esm/models/WidgetLocation.d.ts +48 -0
- package/dist/esm/models/WidgetLocation.js +61 -0
- package/dist/esm/models/WidgetMilestone.d.ts +43 -0
- package/dist/esm/models/WidgetMilestone.js +56 -0
- package/dist/esm/models/WidgetPoint.d.ts +34 -0
- package/dist/esm/models/WidgetPoint.js +47 -0
- package/dist/esm/models/WidgetSearchResult.d.ts +65 -0
- package/dist/esm/models/WidgetSearchResult.js +78 -0
- package/dist/esm/models/WidgetTrack.d.ts +35 -0
- package/dist/esm/models/WidgetTrack.js +48 -0
- package/dist/esm/models/WidgetTrackReading.d.ts +38 -0
- package/dist/esm/models/WidgetTrackReading.js +51 -0
- package/dist/esm/models/index.d.ts +35 -0
- package/dist/esm/models/index.js +37 -0
- package/dist/esm/runtime.d.ts +217 -0
- package/dist/esm/runtime.js +460 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/ContainerReference.d.ts +34 -0
- package/dist/models/ContainerReference.js +52 -0
- package/dist/models/DocumentUpdate.d.ts +38 -0
- package/dist/models/DocumentUpdate.js +52 -0
- package/dist/models/DocumentUpload.d.ts +70 -0
- package/dist/models/DocumentUpload.js +84 -0
- package/dist/models/DownstreamTradeflow.d.ts +150 -0
- package/dist/models/DownstreamTradeflow.js +115 -0
- package/dist/models/DownstreamTradeflowBillOfLadingReference.d.ts +26 -0
- package/dist/models/DownstreamTradeflowBillOfLadingReference.js +38 -0
- package/dist/models/DownstreamTradeflowBookingReference.d.ts +26 -0
- package/dist/models/DownstreamTradeflowBookingReference.js +38 -0
- package/dist/models/DownstreamTradeflowEventsInner.d.ts +46 -0
- package/dist/models/DownstreamTradeflowEventsInner.js +61 -0
- package/dist/models/DownstreamTradeflowFreeTimeOverridesInner.d.ts +53 -0
- package/dist/models/DownstreamTradeflowFreeTimeOverridesInner.js +67 -0
- package/dist/models/DownstreamTradeflowMockTracking.d.ts +30 -0
- package/dist/models/DownstreamTradeflowMockTracking.js +48 -0
- package/dist/models/DownstreamTradeflowPartnersInner.d.ts +42 -0
- package/dist/models/DownstreamTradeflowPartnersInner.js +56 -0
- package/dist/models/DownstreamTradeflowReferences.d.ts +38 -0
- package/dist/models/DownstreamTradeflowReferences.js +52 -0
- package/dist/models/InlineObject.d.ts +36 -0
- package/dist/models/InlineObject.js +54 -0
- package/dist/models/ListDocumentTypes200ResponseInner.d.ts +34 -0
- package/dist/models/ListDocumentTypes200ResponseInner.js +54 -0
- package/dist/models/UpstreamRecord.d.ts +77 -0
- package/dist/models/UpstreamRecord.js +87 -0
- package/dist/models/UpstreamRecordAdditionalReferences.d.ts +34 -0
- package/dist/models/UpstreamRecordAdditionalReferences.js +50 -0
- package/dist/models/UpstreamRecordDataQuality.d.ts +46 -0
- package/dist/models/UpstreamRecordDataQuality.js +56 -0
- package/dist/models/UpstreamRecordMetadata.d.ts +42 -0
- package/dist/models/UpstreamRecordMetadata.js +55 -0
- package/dist/models/V3DocumentGet200Response.d.ts +39 -0
- package/dist/models/V3DocumentGet200Response.js +59 -0
- package/dist/models/V3DocumentGet200ResponseDataInner.d.ts +63 -0
- package/dist/models/V3DocumentGet200ResponseDataInner.js +83 -0
- package/dist/models/V3DocumentGet200ResponseDataInnerDocumentType.d.ts +34 -0
- package/dist/models/V3DocumentGet200ResponseDataInnerDocumentType.js +54 -0
- package/dist/models/V3DocumentPost202Response.d.ts +54 -0
- package/dist/models/V3DocumentPost202Response.js +74 -0
- package/dist/models/V3DocumentPost400Response.d.ts +26 -0
- package/dist/models/V3DocumentPost400Response.js +38 -0
- package/dist/models/V3DownstreamPost202Response.d.ts +42 -0
- package/dist/models/V3DownstreamPost202Response.js +64 -0
- package/dist/models/V3DownstreamPost202ResponseTradeflowsInner.d.ts +34 -0
- package/dist/models/V3DownstreamPost202ResponseTradeflowsInner.js +54 -0
- package/dist/models/V3UpstreamGet200Response.d.ts +35 -0
- package/dist/models/V3UpstreamGet200Response.js +55 -0
- package/dist/models/V3UpstreamGet400Response.d.ts +26 -0
- package/dist/models/V3UpstreamGet400Response.js +38 -0
- package/dist/models/WidgetContainer.d.ts +47 -0
- package/dist/models/WidgetContainer.js +67 -0
- package/dist/models/WidgetCountry.d.ts +34 -0
- package/dist/models/WidgetCountry.js +54 -0
- package/dist/models/WidgetLeg.d.ts +43 -0
- package/dist/models/WidgetLeg.js +63 -0
- package/dist/models/WidgetLocation.d.ts +48 -0
- package/dist/models/WidgetLocation.js +68 -0
- package/dist/models/WidgetMilestone.d.ts +43 -0
- package/dist/models/WidgetMilestone.js +63 -0
- package/dist/models/WidgetPoint.d.ts +34 -0
- package/dist/models/WidgetPoint.js +54 -0
- package/dist/models/WidgetSearchResult.d.ts +65 -0
- package/dist/models/WidgetSearchResult.js +85 -0
- package/dist/models/WidgetTrack.d.ts +35 -0
- package/dist/models/WidgetTrack.js +55 -0
- package/dist/models/WidgetTrackReading.d.ts +38 -0
- package/dist/models/WidgetTrackReading.js +58 -0
- package/dist/models/index.d.ts +35 -0
- package/dist/models/index.js +53 -0
- package/dist/runtime.d.ts +217 -0
- package/dist/runtime.js +482 -0
- package/docs/ContainerReference.md +36 -0
- package/docs/DocumentUpdate.md +39 -0
- package/docs/DocumentUpload.md +44 -0
- package/docs/DownstreamTradeflow.md +91 -0
- package/docs/DownstreamTradeflowBillOfLadingReference.md +33 -0
- package/docs/DownstreamTradeflowBookingReference.md +33 -0
- package/docs/DownstreamTradeflowEventsInner.md +42 -0
- package/docs/DownstreamTradeflowFreeTimeOverridesInner.md +40 -0
- package/docs/DownstreamTradeflowMockTracking.md +35 -0
- package/docs/DownstreamTradeflowPartnersInner.md +40 -0
- package/docs/DownstreamTradeflowReferences.md +38 -0
- package/docs/InlineObject.md +36 -0
- package/docs/ListDocumentTypes200ResponseInner.md +36 -0
- package/docs/UpstreamRecord.md +57 -0
- package/docs/UpstreamRecordAdditionalReferences.md +36 -0
- package/docs/UpstreamRecordDataQuality.md +42 -0
- package/docs/UpstreamRecordMetadata.md +40 -0
- package/docs/V3DocumentApi.md +361 -0
- package/docs/V3DocumentGet200Response.md +38 -0
- package/docs/V3DocumentGet200ResponseDataInner.md +50 -0
- package/docs/V3DocumentGet200ResponseDataInnerDocumentType.md +36 -0
- package/docs/V3DocumentPost202Response.md +46 -0
- package/docs/V3DocumentPost400Response.md +32 -0
- package/docs/V3DownstreamApi.md +158 -0
- package/docs/V3DownstreamPost202Response.md +36 -0
- package/docs/V3DownstreamPost202ResponseTradeflowsInner.md +36 -0
- package/docs/V3UpstreamApi.md +109 -0
- package/docs/V3UpstreamGet200Response.md +36 -0
- package/docs/V3UpstreamGet400Response.md +32 -0
- package/docs/WidgetApi.md +81 -0
- package/docs/WidgetContainer.md +42 -0
- package/docs/WidgetCountry.md +36 -0
- package/docs/WidgetLeg.md +40 -0
- package/docs/WidgetLocation.md +42 -0
- package/docs/WidgetMilestone.md +40 -0
- package/docs/WidgetPoint.md +36 -0
- package/docs/WidgetSearchResult.md +50 -0
- package/docs/WidgetTrack.md +36 -0
- package/docs/WidgetTrackReading.md +38 -0
- package/package.json +20 -4
- package/src/apis/V3DocumentApi.ts +357 -0
- package/src/apis/V3DownstreamApi.ts +174 -0
- package/src/apis/V3UpstreamApi.ts +185 -0
- package/src/apis/WidgetApi.ts +97 -0
- package/src/apis/index.ts +6 -0
- package/src/index.ts +5 -0
- package/src/models/ContainerReference.ts +70 -0
- package/src/models/DocumentUpdate.ts +75 -0
- package/src/models/DocumentUpload.ts +119 -0
- package/src/models/DownstreamTradeflow.ts +289 -0
- package/src/models/DownstreamTradeflowBillOfLadingReference.ts +46 -0
- package/src/models/DownstreamTradeflowBookingReference.ts +46 -0
- package/src/models/DownstreamTradeflowEventsInner.ts +89 -0
- package/src/models/DownstreamTradeflowFreeTimeOverridesInner.ts +96 -0
- package/src/models/DownstreamTradeflowMockTracking.ts +63 -0
- package/src/models/DownstreamTradeflowPartnersInner.ts +82 -0
- package/src/models/DownstreamTradeflowReferences.ts +75 -0
- package/src/models/InlineObject.ts +71 -0
- package/src/models/ListDocumentTypes200ResponseInner.ts +71 -0
- package/src/models/UpstreamRecord.ts +158 -0
- package/src/models/UpstreamRecordAdditionalReferences.ts +69 -0
- package/src/models/UpstreamRecordDataQuality.ts +87 -0
- package/src/models/UpstreamRecordMetadata.ts +81 -0
- package/src/models/V3DocumentGet200Response.ts +86 -0
- package/src/models/V3DocumentGet200ResponseDataInner.ts +128 -0
- package/src/models/V3DocumentGet200ResponseDataInnerDocumentType.ts +71 -0
- package/src/models/V3DocumentPost202Response.ts +106 -0
- package/src/models/V3DocumentPost400Response.ts +46 -0
- package/src/models/V3DownstreamPost202Response.ts +91 -0
- package/src/models/V3DownstreamPost202ResponseTradeflowsInner.ts +71 -0
- package/src/models/V3UpstreamGet200Response.ts +79 -0
- package/src/models/V3UpstreamGet400Response.ts +46 -0
- package/src/models/WidgetContainer.ts +100 -0
- package/src/models/WidgetCountry.ts +71 -0
- package/src/models/WidgetLeg.ts +93 -0
- package/src/models/WidgetLocation.ts +107 -0
- package/src/models/WidgetMilestone.ts +93 -0
- package/src/models/WidgetPoint.ts +71 -0
- package/src/models/WidgetSearchResult.ts +142 -0
- package/src/models/WidgetTrack.ts +79 -0
- package/src/models/WidgetTrackReading.ts +78 -0
- package/src/models/index.ts +37 -0
- package/src/runtime.ts +572 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Dockflow v3 API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 3.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the WidgetPoint interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfWidgetPoint(value) {
|
|
18
|
+
if (!('lat' in value) || value['lat'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('lng' in value) || value['lng'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function WidgetPointFromJSON(json) {
|
|
25
|
+
return WidgetPointFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function WidgetPointFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'lat': json['lat'],
|
|
33
|
+
'lng': json['lng'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function WidgetPointToJSON(json) {
|
|
37
|
+
return WidgetPointToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function WidgetPointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'lat': value['lat'],
|
|
45
|
+
'lng': value['lng'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dockflow v3 API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { WidgetContainer } from './WidgetContainer';
|
|
13
|
+
import type { WidgetLeg } from './WidgetLeg';
|
|
14
|
+
import type { WidgetTrack } from './WidgetTrack';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface WidgetSearchResult
|
|
19
|
+
*/
|
|
20
|
+
export interface WidgetSearchResult {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
references: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
carrier: string | null;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
bookingReference: string | null;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
billOfLadingReference: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
departure: WidgetLeg | null;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
arrival: WidgetLeg | null;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
containers: Array<WidgetContainer>;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
tracks: Array<WidgetTrack>;
|
|
53
|
+
/**
|
|
54
|
+
* The shipment in the entity's portal, on its blueprint's domain.
|
|
55
|
+
*/
|
|
56
|
+
detailsUrl: string | null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the WidgetSearchResult interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfWidgetSearchResult(value: object): value is WidgetSearchResult;
|
|
62
|
+
export declare function WidgetSearchResultFromJSON(json: any): WidgetSearchResult;
|
|
63
|
+
export declare function WidgetSearchResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetSearchResult;
|
|
64
|
+
export declare function WidgetSearchResultToJSON(json: any): WidgetSearchResult;
|
|
65
|
+
export declare function WidgetSearchResultToJSONTyped(value?: WidgetSearchResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Dockflow v3 API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 3.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { WidgetContainerFromJSON, WidgetContainerToJSON, } from './WidgetContainer';
|
|
15
|
+
import { WidgetLegFromJSON, WidgetLegToJSON, } from './WidgetLeg';
|
|
16
|
+
import { WidgetTrackFromJSON, WidgetTrackToJSON, } from './WidgetTrack';
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the WidgetSearchResult interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfWidgetSearchResult(value) {
|
|
21
|
+
if (!('references' in value) || value['references'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('carrier' in value) || value['carrier'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if ((!('bookingReference' in value) && !('booking_reference' in value)) || (value['bookingReference'] === undefined && value['booking_reference'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('billOfLadingReference' in value) && !('bill_of_lading_reference' in value)) || (value['billOfLadingReference'] === undefined && value['bill_of_lading_reference'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if (!('departure' in value) || value['departure'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('arrival' in value) || value['arrival'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('containers' in value) || value['containers'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('tracks' in value) || value['tracks'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if ((!('detailsUrl' in value) && !('details_url' in value)) || (value['detailsUrl'] === undefined && value['details_url'] === undefined))
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
export function WidgetSearchResultFromJSON(json) {
|
|
42
|
+
return WidgetSearchResultFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function WidgetSearchResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'references': json['references'],
|
|
50
|
+
'carrier': json['carrier'],
|
|
51
|
+
'bookingReference': json['booking_reference'],
|
|
52
|
+
'billOfLadingReference': json['bill_of_lading_reference'],
|
|
53
|
+
'departure': WidgetLegFromJSON(json['departure']),
|
|
54
|
+
'arrival': WidgetLegFromJSON(json['arrival']),
|
|
55
|
+
'containers': (json['containers'].map(WidgetContainerFromJSON)),
|
|
56
|
+
'tracks': (json['tracks'].map(WidgetTrackFromJSON)),
|
|
57
|
+
'detailsUrl': json['details_url'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function WidgetSearchResultToJSON(json) {
|
|
61
|
+
return WidgetSearchResultToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
export function WidgetSearchResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
'references': value['references'],
|
|
69
|
+
'carrier': value['carrier'],
|
|
70
|
+
'booking_reference': value['bookingReference'],
|
|
71
|
+
'bill_of_lading_reference': value['billOfLadingReference'],
|
|
72
|
+
'departure': WidgetLegToJSON(value['departure']),
|
|
73
|
+
'arrival': WidgetLegToJSON(value['arrival']),
|
|
74
|
+
'containers': (value['containers'].map(WidgetContainerToJSON)),
|
|
75
|
+
'tracks': (value['tracks'].map(WidgetTrackToJSON)),
|
|
76
|
+
'details_url': value['detailsUrl'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dockflow v3 API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { WidgetTrackReading } from './WidgetTrackReading';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface WidgetTrack
|
|
17
|
+
*/
|
|
18
|
+
export interface WidgetTrack {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
deviceReference: string | null;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
readings: Array<WidgetTrackReading>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the WidgetTrack interface.
|
|
30
|
+
*/
|
|
31
|
+
export declare function instanceOfWidgetTrack(value: object): value is WidgetTrack;
|
|
32
|
+
export declare function WidgetTrackFromJSON(json: any): WidgetTrack;
|
|
33
|
+
export declare function WidgetTrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetTrack;
|
|
34
|
+
export declare function WidgetTrackToJSON(json: any): WidgetTrack;
|
|
35
|
+
export declare function WidgetTrackToJSONTyped(value?: WidgetTrack | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Dockflow v3 API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 3.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { WidgetTrackReadingFromJSON, WidgetTrackReadingToJSON, } from './WidgetTrackReading';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the WidgetTrack interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfWidgetTrack(value) {
|
|
19
|
+
if ((!('deviceReference' in value) && !('device_reference' in value)) || (value['deviceReference'] === undefined && value['device_reference'] === undefined))
|
|
20
|
+
return false;
|
|
21
|
+
if (!('readings' in value) || value['readings'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function WidgetTrackFromJSON(json) {
|
|
26
|
+
return WidgetTrackFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function WidgetTrackFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'deviceReference': json['device_reference'],
|
|
34
|
+
'readings': (json['readings'].map(WidgetTrackReadingFromJSON)),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function WidgetTrackToJSON(json) {
|
|
38
|
+
return WidgetTrackToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function WidgetTrackToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'device_reference': value['deviceReference'],
|
|
46
|
+
'readings': (value['readings'].map(WidgetTrackReadingToJSON)),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dockflow v3 API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface WidgetTrackReading
|
|
16
|
+
*/
|
|
17
|
+
export interface WidgetTrackReading {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
eventDate: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
lat: number;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
lng: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the WidgetTrackReading interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfWidgetTrackReading(value: object): value is WidgetTrackReading;
|
|
35
|
+
export declare function WidgetTrackReadingFromJSON(json: any): WidgetTrackReading;
|
|
36
|
+
export declare function WidgetTrackReadingFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetTrackReading;
|
|
37
|
+
export declare function WidgetTrackReadingToJSON(json: any): WidgetTrackReading;
|
|
38
|
+
export declare function WidgetTrackReadingToJSONTyped(value?: WidgetTrackReading | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Dockflow v3 API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 3.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the WidgetTrackReading interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfWidgetTrackReading(value) {
|
|
18
|
+
if ((!('eventDate' in value) && !('event_date' in value)) || (value['eventDate'] === undefined && value['event_date'] === undefined))
|
|
19
|
+
return false;
|
|
20
|
+
if (!('lat' in value) || value['lat'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('lng' in value) || value['lng'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function WidgetTrackReadingFromJSON(json) {
|
|
27
|
+
return WidgetTrackReadingFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function WidgetTrackReadingFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'eventDate': json['event_date'],
|
|
35
|
+
'lat': json['lat'],
|
|
36
|
+
'lng': json['lng'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function WidgetTrackReadingToJSON(json) {
|
|
40
|
+
return WidgetTrackReadingToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function WidgetTrackReadingToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'event_date': value['eventDate'],
|
|
48
|
+
'lat': value['lat'],
|
|
49
|
+
'lng': value['lng'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from './ContainerReference';
|
|
2
|
+
export * from './DocumentUpdate';
|
|
3
|
+
export * from './DocumentUpload';
|
|
4
|
+
export * from './DownstreamTradeflow';
|
|
5
|
+
export * from './DownstreamTradeflowBillOfLadingReference';
|
|
6
|
+
export * from './DownstreamTradeflowBookingReference';
|
|
7
|
+
export * from './DownstreamTradeflowEventsInner';
|
|
8
|
+
export * from './DownstreamTradeflowFreeTimeOverridesInner';
|
|
9
|
+
export * from './DownstreamTradeflowMockTracking';
|
|
10
|
+
export * from './DownstreamTradeflowPartnersInner';
|
|
11
|
+
export * from './DownstreamTradeflowReferences';
|
|
12
|
+
export * from './InlineObject';
|
|
13
|
+
export * from './ListDocumentTypes200ResponseInner';
|
|
14
|
+
export * from './UpstreamRecord';
|
|
15
|
+
export * from './UpstreamRecordAdditionalReferences';
|
|
16
|
+
export * from './UpstreamRecordDataQuality';
|
|
17
|
+
export * from './UpstreamRecordMetadata';
|
|
18
|
+
export * from './V3DocumentGet200Response';
|
|
19
|
+
export * from './V3DocumentGet200ResponseDataInner';
|
|
20
|
+
export * from './V3DocumentGet200ResponseDataInnerDocumentType';
|
|
21
|
+
export * from './V3DocumentPost202Response';
|
|
22
|
+
export * from './V3DocumentPost400Response';
|
|
23
|
+
export * from './V3DownstreamPost202Response';
|
|
24
|
+
export * from './V3DownstreamPost202ResponseTradeflowsInner';
|
|
25
|
+
export * from './V3UpstreamGet200Response';
|
|
26
|
+
export * from './V3UpstreamGet400Response';
|
|
27
|
+
export * from './WidgetContainer';
|
|
28
|
+
export * from './WidgetCountry';
|
|
29
|
+
export * from './WidgetLeg';
|
|
30
|
+
export * from './WidgetLocation';
|
|
31
|
+
export * from './WidgetMilestone';
|
|
32
|
+
export * from './WidgetPoint';
|
|
33
|
+
export * from './WidgetSearchResult';
|
|
34
|
+
export * from './WidgetTrack';
|
|
35
|
+
export * from './WidgetTrackReading';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './ContainerReference';
|
|
4
|
+
export * from './DocumentUpdate';
|
|
5
|
+
export * from './DocumentUpload';
|
|
6
|
+
export * from './DownstreamTradeflow';
|
|
7
|
+
export * from './DownstreamTradeflowBillOfLadingReference';
|
|
8
|
+
export * from './DownstreamTradeflowBookingReference';
|
|
9
|
+
export * from './DownstreamTradeflowEventsInner';
|
|
10
|
+
export * from './DownstreamTradeflowFreeTimeOverridesInner';
|
|
11
|
+
export * from './DownstreamTradeflowMockTracking';
|
|
12
|
+
export * from './DownstreamTradeflowPartnersInner';
|
|
13
|
+
export * from './DownstreamTradeflowReferences';
|
|
14
|
+
export * from './InlineObject';
|
|
15
|
+
export * from './ListDocumentTypes200ResponseInner';
|
|
16
|
+
export * from './UpstreamRecord';
|
|
17
|
+
export * from './UpstreamRecordAdditionalReferences';
|
|
18
|
+
export * from './UpstreamRecordDataQuality';
|
|
19
|
+
export * from './UpstreamRecordMetadata';
|
|
20
|
+
export * from './V3DocumentGet200Response';
|
|
21
|
+
export * from './V3DocumentGet200ResponseDataInner';
|
|
22
|
+
export * from './V3DocumentGet200ResponseDataInnerDocumentType';
|
|
23
|
+
export * from './V3DocumentPost202Response';
|
|
24
|
+
export * from './V3DocumentPost400Response';
|
|
25
|
+
export * from './V3DownstreamPost202Response';
|
|
26
|
+
export * from './V3DownstreamPost202ResponseTradeflowsInner';
|
|
27
|
+
export * from './V3UpstreamGet200Response';
|
|
28
|
+
export * from './V3UpstreamGet400Response';
|
|
29
|
+
export * from './WidgetContainer';
|
|
30
|
+
export * from './WidgetCountry';
|
|
31
|
+
export * from './WidgetLeg';
|
|
32
|
+
export * from './WidgetLocation';
|
|
33
|
+
export * from './WidgetMilestone';
|
|
34
|
+
export * from './WidgetPoint';
|
|
35
|
+
export * from './WidgetSearchResult';
|
|
36
|
+
export * from './WidgetTrack';
|
|
37
|
+
export * from './WidgetTrackReading';
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dockflow v3 API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 3.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BASE_PATH: string;
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
basePath?: string;
|
|
15
|
+
fetchApi?: FetchAPI;
|
|
16
|
+
middleware?: Middleware[];
|
|
17
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
|
|
21
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
+
headers?: HTTPHeaders;
|
|
23
|
+
credentials?: RequestCredentials;
|
|
24
|
+
}
|
|
25
|
+
export declare class Configuration {
|
|
26
|
+
private configuration;
|
|
27
|
+
constructor(configuration?: ConfigurationParameters);
|
|
28
|
+
set config(configuration: Configuration);
|
|
29
|
+
get basePath(): string;
|
|
30
|
+
get fetchApi(): FetchAPI | undefined;
|
|
31
|
+
get middleware(): Middleware[];
|
|
32
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
33
|
+
get username(): string | undefined;
|
|
34
|
+
get password(): string | undefined;
|
|
35
|
+
get apiKey(): ((name: string) => string | Promise<string>) | undefined;
|
|
36
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
37
|
+
get headers(): HTTPHeaders | undefined;
|
|
38
|
+
get credentials(): RequestCredentials | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare const DefaultConfig: Configuration;
|
|
41
|
+
/**
|
|
42
|
+
* This is the base class for all generated API classes.
|
|
43
|
+
*/
|
|
44
|
+
export declare class BaseAPI {
|
|
45
|
+
protected configuration: Configuration;
|
|
46
|
+
private static readonly jsonRegex;
|
|
47
|
+
private middleware;
|
|
48
|
+
constructor(configuration?: Configuration);
|
|
49
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
51
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
52
|
+
/**
|
|
53
|
+
* Check if the given MIME is a JSON MIME.
|
|
54
|
+
* JSON MIME examples:
|
|
55
|
+
* application/json
|
|
56
|
+
* application/json; charset=UTF8
|
|
57
|
+
* APPLICATION/JSON
|
|
58
|
+
* application/vnd.company+json
|
|
59
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
60
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
63
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
64
|
+
private createFetchParams;
|
|
65
|
+
private fetchApi;
|
|
66
|
+
/**
|
|
67
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
68
|
+
* and then shallow cloning data members.
|
|
69
|
+
*/
|
|
70
|
+
private clone;
|
|
71
|
+
}
|
|
72
|
+
export declare class ResponseError extends Error {
|
|
73
|
+
response: Response;
|
|
74
|
+
name: "ResponseError";
|
|
75
|
+
constructor(response: Response, msg?: string);
|
|
76
|
+
}
|
|
77
|
+
export declare class FetchError extends Error {
|
|
78
|
+
cause: Error;
|
|
79
|
+
name: "FetchError";
|
|
80
|
+
constructor(cause: Error, msg?: string);
|
|
81
|
+
}
|
|
82
|
+
export declare class RequiredError extends Error {
|
|
83
|
+
field: string;
|
|
84
|
+
name: "RequiredError";
|
|
85
|
+
constructor(field: string, msg?: string);
|
|
86
|
+
}
|
|
87
|
+
export declare const COLLECTION_FORMATS: {
|
|
88
|
+
csv: string;
|
|
89
|
+
ssv: string;
|
|
90
|
+
tsv: string;
|
|
91
|
+
pipes: string;
|
|
92
|
+
};
|
|
93
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
94
|
+
export type Json = any;
|
|
95
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
96
|
+
export type HTTPHeaders = {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
export type HTTPQuery = {
|
|
100
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
101
|
+
};
|
|
102
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
103
|
+
export type HTTPRequestInit = {
|
|
104
|
+
headers?: HTTPHeaders;
|
|
105
|
+
method: HTTPMethod;
|
|
106
|
+
credentials?: RequestCredentials;
|
|
107
|
+
body?: HTTPBody;
|
|
108
|
+
};
|
|
109
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
110
|
+
export type InitOverrideFunction = (requestContext: {
|
|
111
|
+
init: HTTPRequestInit;
|
|
112
|
+
context: RequestOpts;
|
|
113
|
+
}) => Promise<RequestInit>;
|
|
114
|
+
export interface FetchParams {
|
|
115
|
+
url: string;
|
|
116
|
+
init: RequestInit;
|
|
117
|
+
}
|
|
118
|
+
export interface RequestOpts {
|
|
119
|
+
path: string;
|
|
120
|
+
method: HTTPMethod;
|
|
121
|
+
headers: HTTPHeaders;
|
|
122
|
+
query?: HTTPQuery;
|
|
123
|
+
body?: HTTPBody;
|
|
124
|
+
}
|
|
125
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
126
|
+
export declare function exists(json: any, key: string): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Every generated date call site routes through these.
|
|
129
|
+
*
|
|
130
|
+
* `format: date` is a calendar date, with no time and no offset, so it is converted
|
|
131
|
+
* against the local calendar on both ends: they have to agree or the date shifts by
|
|
132
|
+
* a day. `format: date-time` is an instant and uses UTC.
|
|
133
|
+
*/
|
|
134
|
+
export declare function serializeDateTime(value: Date): string;
|
|
135
|
+
export declare function serializeDate(value: Date): string;
|
|
136
|
+
export declare function parseDate(value: Date | string): Date;
|
|
137
|
+
export declare function parseDateTime(value: any): Date;
|
|
138
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {
|
|
139
|
+
[key: string]: any;
|
|
140
|
+
};
|
|
141
|
+
export declare function anyToJSON(value: any): any;
|
|
142
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
143
|
+
export interface Consume {
|
|
144
|
+
contentType: string;
|
|
145
|
+
}
|
|
146
|
+
export interface RequestContext {
|
|
147
|
+
fetch: FetchAPI;
|
|
148
|
+
url: string;
|
|
149
|
+
init: RequestInit;
|
|
150
|
+
}
|
|
151
|
+
export interface ResponseContext {
|
|
152
|
+
fetch: FetchAPI;
|
|
153
|
+
url: string;
|
|
154
|
+
init: RequestInit;
|
|
155
|
+
response: Response;
|
|
156
|
+
}
|
|
157
|
+
export interface ErrorContext {
|
|
158
|
+
fetch: FetchAPI;
|
|
159
|
+
url: string;
|
|
160
|
+
init: RequestInit;
|
|
161
|
+
error: unknown;
|
|
162
|
+
response?: Response;
|
|
163
|
+
}
|
|
164
|
+
export interface Middleware {
|
|
165
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
166
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
167
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
168
|
+
}
|
|
169
|
+
export interface ApiResponse<T> {
|
|
170
|
+
raw: Response;
|
|
171
|
+
value(): Promise<T>;
|
|
172
|
+
}
|
|
173
|
+
export interface ResponseTransformer<T> {
|
|
174
|
+
(json: any): T;
|
|
175
|
+
}
|
|
176
|
+
export declare class JSONApiResponse<T> {
|
|
177
|
+
raw: Response;
|
|
178
|
+
private transformer;
|
|
179
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
180
|
+
value(): Promise<T>;
|
|
181
|
+
}
|
|
182
|
+
export declare class VoidApiResponse {
|
|
183
|
+
raw: Response;
|
|
184
|
+
constructor(raw: Response);
|
|
185
|
+
value(): Promise<void>;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
|
|
189
|
+
* wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
|
|
190
|
+
* `typescript` generator's browser HttpFile.
|
|
191
|
+
*/
|
|
192
|
+
export type HttpFile = Blob & {
|
|
193
|
+
readonly name: string;
|
|
194
|
+
};
|
|
195
|
+
export declare class BlobApiResponse {
|
|
196
|
+
raw: Response;
|
|
197
|
+
constructor(raw: Response);
|
|
198
|
+
/**
|
|
199
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
200
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
201
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
202
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
203
|
+
* would stringify instead of wrapping.
|
|
204
|
+
*/
|
|
205
|
+
value(): Promise<HttpFile>;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
209
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
210
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
211
|
+
*/
|
|
212
|
+
export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
|
|
213
|
+
export declare class TextApiResponse {
|
|
214
|
+
raw: Response;
|
|
215
|
+
constructor(raw: Response);
|
|
216
|
+
value(): Promise<string>;
|
|
217
|
+
}
|