@svta/cml-request 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -12
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ import { XmlNode } from "@svta/cml-xml";
|
|
|
7
7
|
/**
|
|
8
8
|
* Common Media Request.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* @beta
|
|
10
|
+
* @public
|
|
12
11
|
*/
|
|
13
12
|
type CommonMediaRequest = Request<{
|
|
14
13
|
cmcd: Cmcd;
|
|
@@ -18,8 +17,7 @@ type CommonMediaRequest = Request<{
|
|
|
18
17
|
/**
|
|
19
18
|
* The a request's `responseType` to the corresponding data type.
|
|
20
19
|
*
|
|
21
|
-
*
|
|
22
|
-
* @beta
|
|
20
|
+
* @public
|
|
23
21
|
*/
|
|
24
22
|
type ResponseTypeMap<T extends string | undefined> = T extends "json" ? any : T extends "text" ? string : T extends "blob" ? Blob : T extends "arraybuffer" ? ArrayBuffer : T extends "document" ? XmlNode : unknown;
|
|
25
23
|
//#endregion
|
|
@@ -27,8 +25,7 @@ type ResponseTypeMap<T extends string | undefined> = T extends "json" ? any : T
|
|
|
27
25
|
/**
|
|
28
26
|
* Common response API.
|
|
29
27
|
*
|
|
30
|
-
*
|
|
31
|
-
* @beta
|
|
28
|
+
* @public
|
|
32
29
|
*/
|
|
33
30
|
type CommonMediaResponse<R extends CommonMediaRequest = CommonMediaRequest> = {
|
|
34
31
|
/**
|
|
@@ -74,8 +71,7 @@ type CommonMediaResponse<R extends CommonMediaRequest = CommonMediaRequest> = {
|
|
|
74
71
|
* A function that executes a request and returns a response that adhere to the
|
|
75
72
|
* common media request/response types.
|
|
76
73
|
*
|
|
77
|
-
*
|
|
78
|
-
* @beta
|
|
74
|
+
* @public
|
|
79
75
|
*/
|
|
80
76
|
type Requester = (request: CommonMediaRequest) => Promise<CommonMediaResponse>;
|
|
81
77
|
//#endregion
|
|
@@ -85,8 +81,7 @@ type Requester = (request: CommonMediaRequest) => Promise<CommonMediaResponse>;
|
|
|
85
81
|
* @param request - The request to be executed.
|
|
86
82
|
* @returns A promise with updated request that is resolved when the interceptor has completed the process of the request.
|
|
87
83
|
*
|
|
88
|
-
*
|
|
89
|
-
* @beta
|
|
84
|
+
* @public
|
|
90
85
|
*/
|
|
91
86
|
type RequestInterceptor = (request: CommonMediaRequest) => Promise<CommonMediaRequest>;
|
|
92
87
|
//#endregion
|
|
@@ -96,8 +91,7 @@ type RequestInterceptor = (request: CommonMediaRequest) => Promise<CommonMediaRe
|
|
|
96
91
|
* @param response - The received response.
|
|
97
92
|
* @returns A promise with updated response that is resolved when the interceptor has completed the process of the response.
|
|
98
93
|
*
|
|
99
|
-
*
|
|
100
|
-
* @beta
|
|
94
|
+
* @public
|
|
101
95
|
*/
|
|
102
96
|
type ResponseInterceptor = (response: CommonMediaResponse) => Promise<CommonMediaResponse>;
|
|
103
97
|
//#endregion
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/CommonMediaRequest.ts","../src/ResponseTypeMap.ts","../src/CommonMediaResponse.ts","../src/Requester.ts","../src/RequestInterceptor.ts","../src/ResponseInterceptor.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/CommonMediaRequest.ts","../src/ResponseTypeMap.ts","../src/CommonMediaResponse.ts","../src/Requester.ts","../src/RequestInterceptor.ts","../src/ResponseInterceptor.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAQA;;KAAY,kBAAA,GAAqB;QAAgB;ACDjD,CAAA,CAAA;;;;;;;ADCA;KCDY,gDACX,yBACA,4BACA,mBAAmB,OACnB,0BAA0B,cAC1B,uBAAuB;;;;;ADJxB;;;KEEY,8BAA8B,qBAAqB;EDH/D;;;EAGC,OAAA,ECIS,CDJT;EAAmB;;;EAEnB,GAAA,CAAA,EAAA,MAAA;EAAuB;;;;;ACFxB;;EAA+D,MAAA,CAAA,EAAA,MAAA;EAIrD;;;EAmCF,UAAA,CAAA,EAAA,MAAA;EAKU;;;;;AC7ClB;;EAAiE,OAAA,CAAA,EDmCtD,MCnCsD,CAAA,MAAA,EAAA,MAAA,CAAA;EAAR;;;SDwCjD,gBAAgB;;AExCxB;;EAA0E,cAAA,CAAA,EF6CxD,cE7CwD;CAAR;;;;;;AJDlE;;;KGCY,SAAA,aAAsB,uBAAuB,QAAQ;;;;;;;AHDjE;;;KICY,kBAAA,aAA+B,uBAAuB,QAAQ;;;;;;;AJD1E;;;KKCY,mBAAA,cAAiC,wBAAwB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svta/cml-request",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Common Media Request and Response types",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@svta/cml-xml": "
|
|
54
|
-
"@svta/cml-utils": "
|
|
53
|
+
"@svta/cml-xml": "1.0.2",
|
|
54
|
+
"@svta/cml-utils": "1.1.0"
|
|
55
55
|
}
|
|
56
56
|
}
|