@story-protocol/core-sdk 0.1.0-alpha-rc.3 → 0.1.0-alpha-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/enums/ActionType.d.ts +5 -5
- package/dist/declarations/src/enums/ActionType.d.ts.map +1 -1
- package/dist/declarations/src/enums/HookType.d.ts +2 -2
- package/dist/declarations/src/enums/HookType.d.ts.map +1 -1
- package/dist/declarations/src/enums/Relatables.d.ts +12 -0
- package/dist/declarations/src/enums/Relatables.d.ts.map +1 -0
- package/dist/declarations/src/enums/ResourceType.d.ts +9 -9
- package/dist/declarations/src/enums/ResourceType.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +4 -3
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/hook.d.ts +1 -2
- package/dist/declarations/src/resources/hook.d.ts.map +1 -1
- package/dist/declarations/src/resources/hookReadOnly.d.ts +1 -2
- package/dist/declarations/src/resources/hookReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +1 -1
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +2 -2
- package/dist/declarations/src/resources/ipOrg.d.ts +1 -2
- package/dist/declarations/src/resources/ipOrg.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipOrgReadOnly.d.ts +2 -3
- package/dist/declarations/src/resources/ipOrgReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/module.d.ts +1 -2
- package/dist/declarations/src/resources/module.d.ts.map +1 -1
- package/dist/declarations/src/resources/moduleReadOnly.d.ts +3 -5
- package/dist/declarations/src/resources/moduleReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationship.d.ts +1 -1
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts +5 -5
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationshipType.d.ts +1 -1
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts +5 -6
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/transaction.d.ts +1 -2
- package/dist/declarations/src/resources/transaction.d.ts.map +1 -1
- package/dist/declarations/src/resources/transactionReadOnly.d.ts +3 -5
- package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/types/common.d.ts +6 -0
- package/dist/declarations/src/types/common.d.ts.map +1 -0
- package/dist/declarations/src/types/config.d.ts +5 -0
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/IPOrg.d.ts +8 -8
- package/dist/declarations/src/types/resources/IPOrg.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/hook.d.ts +2 -1
- package/dist/declarations/src/types/resources/hook.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +9 -4
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/relationship.d.ts +34 -100
- package/dist/declarations/src/types/resources/relationship.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/relationshipType.d.ts +50 -5
- package/dist/declarations/src/types/resources/relationshipType.d.ts.map +1 -1
- package/dist/declarations/src/utils/platform.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +979 -125
- package/dist/story-protocol-core-sdk.cjs.prod.js +979 -125
- package/dist/story-protocol-core-sdk.esm.js +980 -126
- package/package.json +1 -1
- package/dist/declarations/src/enums/IPAssetType.d.ts +0 -11
- package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
@@ -1,111 +1,21 @@
|
|
1
1
|
import { QueryOptions, TxOptions } from "../options.js";
|
2
|
-
|
3
|
-
* Core type for relationship IPAsset.
|
4
|
-
*
|
5
|
-
* @public
|
6
|
-
*/
|
7
|
-
export type IPAssetId = {
|
8
|
-
franchiseId: string;
|
9
|
-
ipAssetId: string;
|
10
|
-
};
|
11
|
-
/**
|
12
|
-
* Request type for relationship.relate method.
|
13
|
-
*
|
14
|
-
* @public
|
15
|
-
*/
|
16
|
-
export type RelationshipRelateRequest = {
|
17
|
-
sourceIPAsset: IPAssetId;
|
18
|
-
destIPAsset: IPAssetId;
|
19
|
-
ttl?: string;
|
20
|
-
};
|
21
|
-
/**
|
22
|
-
* Response type for relationship.relate method.
|
23
|
-
*
|
24
|
-
* @public
|
25
|
-
*/
|
26
|
-
export type RelationshipRelateResponse = {
|
27
|
-
txHash: string;
|
28
|
-
};
|
29
|
-
/**
|
30
|
-
* Request type for relationship.unrelate method.
|
31
|
-
*
|
32
|
-
* @public
|
33
|
-
*/
|
34
|
-
export type RelationshipUnrelateRequest = {
|
35
|
-
sourceIPAsset: IPAssetId;
|
36
|
-
destIPAsset: IPAssetId;
|
37
|
-
ttl?: string;
|
38
|
-
};
|
39
|
-
/**
|
40
|
-
* Response type for relationship.unrelate method.
|
41
|
-
*
|
42
|
-
* @public
|
43
|
-
*/
|
44
|
-
export type RelationshipUnrelateResponse = {
|
45
|
-
txHash: string;
|
46
|
-
};
|
47
|
-
/**
|
48
|
-
* Request type for relationship.isRelationshipExpired method.
|
49
|
-
*
|
50
|
-
* @public
|
51
|
-
*/
|
52
|
-
export type RelationshipIsRelationshipExpiredRequest = {
|
53
|
-
sourceIPAsset: IPAssetId;
|
54
|
-
destIPAsset: IPAssetId;
|
55
|
-
ttl?: string;
|
56
|
-
};
|
57
|
-
/**
|
58
|
-
* Response type for relationship.isRelationshipExpired method.
|
59
|
-
*
|
60
|
-
* @public
|
61
|
-
*/
|
62
|
-
export type RelationshipIsRelationshipExpiredResponse = {
|
63
|
-
result: boolean;
|
64
|
-
};
|
65
|
-
/**
|
66
|
-
* Request type for relationship.isRelated method.
|
67
|
-
*
|
68
|
-
* @public
|
69
|
-
*/
|
70
|
-
export type RelationshipIsRelatedRequest = {
|
71
|
-
sourceIPAsset: IPAssetId;
|
72
|
-
destIPAsset: IPAssetId;
|
73
|
-
ttl?: string;
|
74
|
-
};
|
75
|
-
/**
|
76
|
-
* Response type for relationship.isRelated method.
|
77
|
-
*
|
78
|
-
* @public
|
79
|
-
*/
|
80
|
-
export type RelationshipIsRelatedResponse = {
|
81
|
-
result: boolean;
|
82
|
-
};
|
83
|
-
declare enum Relatables {
|
84
|
-
UNDEFINED = 0,
|
85
|
-
IPA = 1,
|
86
|
-
IPORG_ENTRY = 2,
|
87
|
-
LICENSE = 3,
|
88
|
-
ADDRESS = 4,
|
89
|
-
EXTERNAL_NFT = 5
|
90
|
-
}
|
91
|
-
export interface RelatedElements {
|
92
|
-
src: Relatables;
|
93
|
-
dst: Relatables;
|
94
|
-
}
|
2
|
+
import { TypedData } from "../common.js";
|
95
3
|
export type Relationship = {
|
96
4
|
id: string;
|
97
5
|
type: string;
|
98
6
|
typeId: string;
|
99
7
|
srcContract: string;
|
100
8
|
srcTokenId: string;
|
101
|
-
srcName?: string;
|
102
9
|
dstContract: string;
|
103
10
|
dstTokenId: string;
|
104
|
-
dstName?: string;
|
105
|
-
ttl?: number;
|
106
11
|
registeredAt: string;
|
107
12
|
txHash: string;
|
108
13
|
};
|
14
|
+
/**
|
15
|
+
* Request type for relationship.register method.
|
16
|
+
*
|
17
|
+
* @public
|
18
|
+
*/
|
109
19
|
export type RegisterRelationshipRequest = {
|
110
20
|
ipOrgId: string;
|
111
21
|
relType: string;
|
@@ -113,29 +23,53 @@ export type RegisterRelationshipRequest = {
|
|
113
23
|
srcTokenId: string;
|
114
24
|
dstContract: string;
|
115
25
|
dstTokenId: string;
|
116
|
-
preHookData
|
117
|
-
postHookData
|
26
|
+
preHookData?: Array<TypedData>;
|
27
|
+
postHookData?: Array<TypedData>;
|
118
28
|
txOptions?: TxOptions;
|
119
29
|
};
|
30
|
+
/**
|
31
|
+
* Response type for relationship.register method.
|
32
|
+
*
|
33
|
+
* @public
|
34
|
+
*/
|
120
35
|
export type RegisterRelationshipResponse = {
|
121
36
|
txHash: string;
|
122
37
|
relationshipId?: string;
|
123
38
|
success?: boolean;
|
124
39
|
};
|
40
|
+
/**
|
41
|
+
* Request type for relationship.get method.
|
42
|
+
*
|
43
|
+
* @public
|
44
|
+
*/
|
125
45
|
export type GetRelationshipRequest = {
|
126
46
|
relationshipId: string;
|
127
47
|
options?: QueryOptions;
|
128
48
|
};
|
49
|
+
/**
|
50
|
+
* Response type for relationship.get method.
|
51
|
+
*
|
52
|
+
* @public
|
53
|
+
*/
|
129
54
|
export type GetRelationshipResponse = {
|
130
55
|
relationship: Relationship;
|
131
56
|
};
|
57
|
+
/**
|
58
|
+
* Request type for relationship.list method.
|
59
|
+
*
|
60
|
+
* @public
|
61
|
+
*/
|
132
62
|
export type ListRelationshipRequest = {
|
133
63
|
tokenId: string;
|
134
|
-
contract
|
64
|
+
contract: string;
|
135
65
|
options?: QueryOptions;
|
136
66
|
};
|
67
|
+
/**
|
68
|
+
* Response type for relationship.list method.
|
69
|
+
*
|
70
|
+
* @public
|
71
|
+
*/
|
137
72
|
export type ListRelationshipResponse = {
|
138
73
|
relationships: Relationship[];
|
139
74
|
};
|
140
|
-
export {};
|
141
75
|
//# sourceMappingURL=relationship.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"relationship.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["relationship.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;
|
1
|
+
{"version":3,"file":"relationship.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["relationship.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;AACrD,OAAO,EAAE,SAAS,EAAE,qBAAkB;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC"}
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import { QueryOptions, TxOptions } from "../options.js";
|
2
|
-
import {
|
2
|
+
import { TypedData } from "../common.js";
|
3
|
+
import { Relatables } from "../../enums/Relatables.js";
|
4
|
+
/**
|
5
|
+
* Core data model for Relationship Type.
|
6
|
+
*
|
7
|
+
* @public
|
8
|
+
*/
|
3
9
|
export type RelationshipType = {
|
4
10
|
type: string;
|
5
11
|
ipOrgId: string;
|
@@ -12,30 +18,69 @@ export type RelationshipType = {
|
|
12
18
|
registeredAt: string;
|
13
19
|
txHash: string;
|
14
20
|
};
|
21
|
+
/**
|
22
|
+
* Request type for relationshipType.get method.
|
23
|
+
*
|
24
|
+
* @public
|
25
|
+
*/
|
15
26
|
export type GetRelationshipTypeRequest = {
|
16
27
|
ipOrgId: string;
|
17
28
|
relType: string;
|
18
29
|
};
|
30
|
+
/**
|
31
|
+
* Response type for relationshipType.get method.
|
32
|
+
*
|
33
|
+
* @public
|
34
|
+
*/
|
19
35
|
export type GetRelationshipTypeResponse = {
|
20
36
|
relationshipType: RelationshipType;
|
21
37
|
};
|
38
|
+
/**
|
39
|
+
* Request type for relationshipType.list method.
|
40
|
+
*
|
41
|
+
* @public
|
42
|
+
*/
|
22
43
|
export type ListRelationshipTypesRequest = {
|
23
44
|
ipOrgId?: string;
|
24
45
|
options?: QueryOptions;
|
25
46
|
};
|
47
|
+
/**
|
48
|
+
* Response type for relationshipType.list method.
|
49
|
+
*
|
50
|
+
* @public
|
51
|
+
*/
|
26
52
|
export type ListRelationshipTypesResponse = {
|
27
53
|
relationshipTypes: RelationshipType[];
|
28
54
|
};
|
55
|
+
/**
|
56
|
+
* RelatedElements contains relatables from the source and the destination entity.
|
57
|
+
*
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
export type RelatedElements = {
|
61
|
+
src: Relatables;
|
62
|
+
dst: Relatables;
|
63
|
+
};
|
64
|
+
/**
|
65
|
+
* Request type for relationshipType.register method.
|
66
|
+
*
|
67
|
+
* @public
|
68
|
+
*/
|
29
69
|
export type RegisterRelationshipTypeRequest = {
|
30
70
|
ipOrgId: string;
|
31
71
|
relType: string;
|
32
72
|
relatedElements: RelatedElements;
|
33
|
-
|
34
|
-
|
35
|
-
preHooksConfig
|
36
|
-
postHooksConfig
|
73
|
+
allowedSrcIpAssetTypes: number[];
|
74
|
+
allowedDstIpAssetTypes: number[];
|
75
|
+
preHooksConfig?: Array<TypedData>;
|
76
|
+
postHooksConfig?: Array<TypedData>;
|
37
77
|
txOptions?: TxOptions;
|
38
78
|
};
|
79
|
+
/**
|
80
|
+
* Response type for relationshipType.register method.
|
81
|
+
*
|
82
|
+
* @public
|
83
|
+
*/
|
39
84
|
export type RegisterRelationshipTypeResponse = {
|
40
85
|
txHash: string;
|
41
86
|
success?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"relationshipType.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["relationshipType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;AACrD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"relationshipType.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["relationshipType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;AACrD,OAAO,EAAE,SAAS,EAAE,qBAAkB;AACtC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,UAAU,CAAC;IAChB,GAAG,EAAE,UAAU,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,eAAe,CAAC;IACjC,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"../../../../src/utils","sources":["platform.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"../../../../src/utils","sources":["platform.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,qBAAa,cAAc;IACzB,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;gBAEjC,UAAU,EAAE,aAAa;IAIrC;;;;;;OAMG;IACU,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAyBzF"}
|