@yuants/data-interest-rate 0.1.48 → 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/dist/data-interest-rate.d.ts +13 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +23 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/temp/data-interest-rate.api.json +45 -1
- package/temp/data-interest-rate.api.md +8 -0
- package/temp/package-deps.json +7 -7
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export declare const decodeInterestRateSeriesId: (series_id: string) => {
|
|
5
|
+
product_id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare const encodeInterestRateSeriesId: (product_id: string) => string;
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* Interest Rate when holding a product
|
|
3
15
|
*
|
|
@@ -5,7 +17,7 @@
|
|
|
5
17
|
*/
|
|
6
18
|
export declare interface IInterestRate {
|
|
7
19
|
/**
|
|
8
|
-
* Series ID (Encoded as `
|
|
20
|
+
* Series ID (Encoded as `product_id`)
|
|
9
21
|
*/
|
|
10
22
|
series_id: string;
|
|
11
23
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export const encodeInterestRateSeriesId = (product_id) => {
|
|
5
|
+
return product_id;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const decodeInterestRateSeriesId = (series_id) => {
|
|
11
|
+
const product_id = (() => {
|
|
12
|
+
try {
|
|
13
|
+
return decodeURIComponent(series_id);
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
return series_id;
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
19
|
+
return { product_id };
|
|
20
|
+
};
|
|
2
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interest Rate when holding a product\n *\n * @public\n */\nexport interface IInterestRate {\n /**\n * Series ID (Encoded as `
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,UAAkB,EAAU,EAAE;IACvE,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,SAAiB,EAA0B,EAAE;IACtF,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE;QACvB,IAAI;YACF,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;SACtC;QAAC,WAAM;YACN,OAAO,SAAS,CAAC;SAClB;IACH,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,EAAE,UAAU,EAAE,CAAC;AACxB,CAAC,CAAC","sourcesContent":["/**\n * Interest Rate when holding a product\n *\n * @public\n */\nexport interface IInterestRate {\n /**\n * Series ID (Encoded as `product_id`)\n */\n series_id: string;\n /**\n * Settlement TimestampTz\n */\n created_at: string;\n /**\n * Data source ID\n * 数据源 ID\n */\n datasource_id: string;\n /**\n * Product ID\n * 品种 ID\n */\n product_id: string;\n\n /**\n * 持有多头时,在结算时刻的收益率\n */\n long_rate: string;\n /**\n * 持有空头时,在结算时刻的收益率\n */\n short_rate: string;\n\n /** 结算价格 */\n settlement_price: string;\n}\n\n/**\n * @public\n */\nexport const encodeInterestRateSeriesId = (product_id: string): string => {\n return product_id;\n};\n\n/**\n * @public\n */\nexport const decodeInterestRateSeriesId = (series_id: string): { product_id: string } => {\n const product_id = (() => {\n try {\n return decodeURIComponent(series_id);\n } catch {\n return series_id;\n }\n })();\n return { product_id };\n};\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export interface IInterestRate {
|
|
7
7
|
/**
|
|
8
|
-
* Series ID (Encoded as `
|
|
8
|
+
* Series ID (Encoded as `product_id`)
|
|
9
9
|
*/
|
|
10
10
|
series_id: string;
|
|
11
11
|
/**
|
|
@@ -33,4 +33,14 @@ export interface IInterestRate {
|
|
|
33
33
|
/** 结算价格 */
|
|
34
34
|
settlement_price: string;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const encodeInterestRateSeriesId: (product_id: string) => string;
|
|
40
|
+
/**
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare const decodeInterestRateSeriesId: (series_id: string) => {
|
|
44
|
+
product_id: string;
|
|
45
|
+
};
|
|
36
46
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW;IACX,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW;IACX,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,eAAgB,MAAM,KAAG,MAE/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,cAAe,MAAM;gBAAiB,MAAM;CASlF,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeInterestRateSeriesId = exports.encodeInterestRateSeriesId = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
const encodeInterestRateSeriesId = (product_id) => {
|
|
8
|
+
return product_id;
|
|
9
|
+
};
|
|
10
|
+
exports.encodeInterestRateSeriesId = encodeInterestRateSeriesId;
|
|
11
|
+
/**
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
const decodeInterestRateSeriesId = (series_id) => {
|
|
15
|
+
const product_id = (() => {
|
|
16
|
+
try {
|
|
17
|
+
return decodeURIComponent(series_id);
|
|
18
|
+
}
|
|
19
|
+
catch (_a) {
|
|
20
|
+
return series_id;
|
|
21
|
+
}
|
|
22
|
+
})();
|
|
23
|
+
return { product_id };
|
|
24
|
+
};
|
|
25
|
+
exports.decodeInterestRateSeriesId = decodeInterestRateSeriesId;
|
|
3
26
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interest Rate when holding a product\n *\n * @public\n */\nexport interface IInterestRate {\n /**\n * Series ID (Encoded as `
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAsCA;;GAEG;AACI,MAAM,0BAA0B,GAAG,CAAC,UAAkB,EAAU,EAAE;IACvE,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAFW,QAAA,0BAA0B,8BAErC;AAEF;;GAEG;AACI,MAAM,0BAA0B,GAAG,CAAC,SAAiB,EAA0B,EAAE;IACtF,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE;QACvB,IAAI;YACF,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;SACtC;QAAC,WAAM;YACN,OAAO,SAAS,CAAC;SAClB;IACH,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,EAAE,UAAU,EAAE,CAAC;AACxB,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC","sourcesContent":["/**\n * Interest Rate when holding a product\n *\n * @public\n */\nexport interface IInterestRate {\n /**\n * Series ID (Encoded as `product_id`)\n */\n series_id: string;\n /**\n * Settlement TimestampTz\n */\n created_at: string;\n /**\n * Data source ID\n * 数据源 ID\n */\n datasource_id: string;\n /**\n * Product ID\n * 品种 ID\n */\n product_id: string;\n\n /**\n * 持有多头时,在结算时刻的收益率\n */\n long_rate: string;\n /**\n * 持有空头时,在结算时刻的收益率\n */\n short_rate: string;\n\n /** 结算价格 */\n settlement_price: string;\n}\n\n/**\n * @public\n */\nexport const encodeInterestRateSeriesId = (product_id: string): string => {\n return product_id;\n};\n\n/**\n * @public\n */\nexport const decodeInterestRateSeriesId = (series_id: string): { product_id: string } => {\n const product_id = (() => {\n try {\n return decodeURIComponent(series_id);\n } catch {\n return series_id;\n }\n })();\n return { product_id };\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuants/data-interest-rate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typescript": "~4.7.4"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@yuants/protocol": "0.53.
|
|
29
|
-
"@yuants/sql": "0.9.
|
|
28
|
+
"@yuants/protocol": "0.53.4",
|
|
29
|
+
"@yuants/sql": "0.9.32",
|
|
30
30
|
"date-fns": "~2.30.0",
|
|
31
31
|
"date-fns-tz": "~2.0.0",
|
|
32
32
|
"rxjs": "~7.5.6",
|
|
@@ -172,6 +172,50 @@
|
|
|
172
172
|
"name": "",
|
|
173
173
|
"preserveMemberOrder": false,
|
|
174
174
|
"members": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "Variable",
|
|
177
|
+
"canonicalReference": "@yuants/data-interest-rate!decodeInterestRateSeriesId:var",
|
|
178
|
+
"docComment": "/**\n * @public\n */\n",
|
|
179
|
+
"excerptTokens": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "Content",
|
|
182
|
+
"text": "decodeInterestRateSeriesId: "
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "Content",
|
|
186
|
+
"text": "(series_id: string) => {\n product_id: string;\n}"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"isReadonly": true,
|
|
190
|
+
"releaseTag": "Public",
|
|
191
|
+
"name": "decodeInterestRateSeriesId",
|
|
192
|
+
"variableTypeTokenRange": {
|
|
193
|
+
"startIndex": 1,
|
|
194
|
+
"endIndex": 2
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"kind": "Variable",
|
|
199
|
+
"canonicalReference": "@yuants/data-interest-rate!encodeInterestRateSeriesId:var",
|
|
200
|
+
"docComment": "/**\n * @public\n */\n",
|
|
201
|
+
"excerptTokens": [
|
|
202
|
+
{
|
|
203
|
+
"kind": "Content",
|
|
204
|
+
"text": "encodeInterestRateSeriesId: "
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "Content",
|
|
208
|
+
"text": "(product_id: string) => string"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"isReadonly": true,
|
|
212
|
+
"releaseTag": "Public",
|
|
213
|
+
"name": "encodeInterestRateSeriesId",
|
|
214
|
+
"variableTypeTokenRange": {
|
|
215
|
+
"startIndex": 1,
|
|
216
|
+
"endIndex": 2
|
|
217
|
+
}
|
|
218
|
+
},
|
|
175
219
|
{
|
|
176
220
|
"kind": "Interface",
|
|
177
221
|
"canonicalReference": "@yuants/data-interest-rate!IInterestRate:interface",
|
|
@@ -297,7 +341,7 @@
|
|
|
297
341
|
{
|
|
298
342
|
"kind": "PropertySignature",
|
|
299
343
|
"canonicalReference": "@yuants/data-interest-rate!IInterestRate#series_id:member",
|
|
300
|
-
"docComment": "/**\n * Series ID (Encoded as `
|
|
344
|
+
"docComment": "/**\n * Series ID (Encoded as `product_id`)\n */\n",
|
|
301
345
|
"excerptTokens": [
|
|
302
346
|
{
|
|
303
347
|
"kind": "Content",
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
+
// @public (undocumented)
|
|
8
|
+
export const decodeInterestRateSeriesId: (series_id: string) => {
|
|
9
|
+
product_id: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// @public (undocumented)
|
|
13
|
+
export const encodeInterestRateSeriesId: (product_id: string) => string;
|
|
14
|
+
|
|
7
15
|
// @public
|
|
8
16
|
export interface IInterestRate {
|
|
9
17
|
created_at: string;
|
package/temp/package-deps.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"libraries/data-interest-rate/CHANGELOG.json": "
|
|
3
|
-
"libraries/data-interest-rate/CHANGELOG.md": "
|
|
2
|
+
"libraries/data-interest-rate/CHANGELOG.json": "582dadd778f0846eb41ffd2ee0e6fa51c300c0ce",
|
|
3
|
+
"libraries/data-interest-rate/CHANGELOG.md": "a6e3031b9e6dccbc35a52b2e153f74aee8ccb733",
|
|
4
4
|
"libraries/data-interest-rate/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
5
5
|
"libraries/data-interest-rate/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
6
6
|
"libraries/data-interest-rate/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
7
7
|
"libraries/data-interest-rate/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
8
|
-
"libraries/data-interest-rate/etc/data-interest-rate.api.md": "
|
|
9
|
-
"libraries/data-interest-rate/package.json": "
|
|
10
|
-
"libraries/data-interest-rate/src/index.ts": "
|
|
8
|
+
"libraries/data-interest-rate/etc/data-interest-rate.api.md": "dcb7aed8830cce5d38e6ccf9f4d9580df1a2edeb",
|
|
9
|
+
"libraries/data-interest-rate/package.json": "57b27d6c02ddf65b9774578ee5ddf3efb5bb666a",
|
|
10
|
+
"libraries/data-interest-rate/src/index.ts": "eccdbbeb9440ded87d7964bd0255599311069c11",
|
|
11
11
|
"libraries/data-interest-rate/tsconfig.json": "22f94ca28b507f8ddcc21b9053158eefd3f726a9",
|
|
12
12
|
"libraries/data-interest-rate/.rush/temp/shrinkwrap-deps.json": "14d204eb5804e8b263a53fcc1425c1dc56c952e8",
|
|
13
|
-
"libraries/protocol/temp/package-deps.json": "
|
|
14
|
-
"libraries/sql/temp/package-deps.json": "
|
|
13
|
+
"libraries/protocol/temp/package-deps.json": "a30b39ceb4cd530ed6bc4e97433f995b026b26d9",
|
|
14
|
+
"libraries/sql/temp/package-deps.json": "252d819797cb0a4bbc579075867624b05b19dabb",
|
|
15
15
|
"tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
|
|
16
16
|
}
|