@story-protocol/core-sdk 0.1.0-alpha-rc.2 → 0.1.0-alpha-rc.4
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/declarations/src/client.d.ts +11 -0
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/constants/addresses.d.ts +2 -0
- package/dist/declarations/src/constants/addresses.d.ts.map +1 -0
- 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 +8 -0
- package/dist/declarations/src/enums/HookType.d.ts.map +1 -0
- package/dist/declarations/src/enums/Relatables.d.ts +9 -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 +19 -2
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationship.d.ts +1 -8
- package/dist/declarations/src/resources/relationship.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationshipType.d.ts +19 -0
- package/dist/declarations/src/resources/relationshipType.d.ts.map +1 -0
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts +26 -0
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts.map +1 -0
- package/dist/declarations/src/types/client.d.ts +4 -0
- package/dist/declarations/src/types/client.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/resources/IPOrg.d.ts +1 -1
- 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 +4 -115
- package/dist/declarations/src/types/resources/relationship.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/relationshipType.d.ts +49 -0
- package/dist/declarations/src/types/resources/relationshipType.d.ts.map +1 -0
- package/dist/declarations/src/utils/platform.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +5031 -531
- package/dist/story-protocol-core-sdk.cjs.prod.js +5031 -531
- package/dist/story-protocol-core-sdk.esm.js +5018 -532
- 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
@@ -15,6 +15,8 @@ import { HookReadOnlyClient } from "./resources/hookReadOnly.js";
|
|
15
15
|
import { PlatformClient } from "./utils/platform.js";
|
16
16
|
import { LicenseClient } from "./resources/license.js";
|
17
17
|
import { RelationshipClient } from "./resources/relationship.js";
|
18
|
+
import { RelationshipTypeClient } from "./resources/relationshipType.js";
|
19
|
+
import { RelationshipTypeReadOnlyClient } from "./resources/relationshipTypeReadOnly.js";
|
18
20
|
/**
|
19
21
|
* The StoryClient is the main entry point for the SDK.
|
20
22
|
*/
|
@@ -29,6 +31,7 @@ export declare class StoryClient {
|
|
29
31
|
private _transaction;
|
30
32
|
private _ipAsset;
|
31
33
|
private _relationship;
|
34
|
+
private _relationshipType;
|
32
35
|
private _module;
|
33
36
|
private _hook;
|
34
37
|
private _platform;
|
@@ -51,6 +54,7 @@ export declare class StoryClient {
|
|
51
54
|
static newClient(config: StoryConfig): Client;
|
52
55
|
private initIPOrg;
|
53
56
|
private initRelationship;
|
57
|
+
private initRelationshipType;
|
54
58
|
private initIpAsset;
|
55
59
|
private initLicense;
|
56
60
|
private initTransaction;
|
@@ -71,6 +75,13 @@ export declare class StoryClient {
|
|
71
75
|
* @returns the RelationshipClient instance
|
72
76
|
*/
|
73
77
|
get relationship(): RelationshipClient | RelationshipReadOnlyClient;
|
78
|
+
/**
|
79
|
+
* Getter for the relationship type client. The client is lazily created when
|
80
|
+
* this method is called.
|
81
|
+
*
|
82
|
+
* @returns the RelationshipTypeClient instance
|
83
|
+
*/
|
84
|
+
get relationshipType(): RelationshipTypeClient | RelationshipTypeReadOnlyClient;
|
74
85
|
/**
|
75
86
|
* Getter for the IP Asset client. The client is lazily created when
|
76
87
|
* this method is called.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,0BAAuB;AAClE,OAAO,EAAE,WAAW,EAAE,6BAA0B;AAChD,OAAO,EAAE,mBAAmB,EAAE,qCAAkC;AAChE,OAAO,EAAE,0BAA0B,EAAE,4CAAyC;AAC9E,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,iBAAiB,EAAE,mCAAgC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,2CAAwC;AAE5E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,0BAAuB;AACxD,OAAO,EAAE,YAAY,EAAE,8BAA2B;AAClD,OAAO,EAAE,oBAAoB,EAAE,sCAAmC;AAClE,OAAO,EAAE,UAAU,EAAE,4BAAyB;AAC9C,OAAO,EAAE,kBAAkB,EAAE,oCAAiC;AAC9D,OAAO,EAAE,cAAc,EAAE,4BAAyB;AAClD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,kBAAkB,EAAE,oCAAiC;
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,0BAAuB;AAClE,OAAO,EAAE,WAAW,EAAE,6BAA0B;AA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AC,SAAS,CAA+B;IAEhD;;;OAGG;IACH,OAAO;IAgCP;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,cAAc;IAIrE;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAI7C,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,YAAY;IAIpB;;;;;OAKG;IACH,IAAW,KAAK,IAAI,WAAW,GAAG,mBAAmB,CAMpD;IAED;;;;;OAKG;IACH,IAAW,YAAY,IAAI,kBAAkB,GAAG,0BAA0B,CAMzE;IAED;;;;;OAKG;IACH,IAAW,gBAAgB,IAAI,sBAAsB,GAAG,8BAA8B,CAMrF;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,GAAG,qBAAqB,CAK1D;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,GAAG,qBAAqB,CAM1D;IAED;;;;;OAKG;IACH,IAAW,WAAW,IAAI,iBAAiB,GAAG,yBAAyB,CAMtE;IAED;;;;;OAKG;IACH,IAAW,MAAM,IAAI,YAAY,GAAG,oBAAoB,CAMvD;IAED;;;;;OAKG;IACH,IAAW,IAAI,IAAI,UAAU,GAAG,kBAAkB,CAMjD;IAED,IAAW,QAAQ,IAAI,cAAc,CAMpC;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"../../../../src/constants","sources":["addresses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,+CAA+C,CAAC"}
|
@@ -2,10 +2,10 @@
|
|
2
2
|
* @public
|
3
3
|
*/
|
4
4
|
export declare enum ActionType {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
Unspecified = "Unspecified",
|
6
|
+
Register = "Register",
|
7
|
+
Unregister = "Unregister",
|
8
|
+
Configure = "Configure",
|
9
|
+
Create = "Create"
|
10
10
|
}
|
11
11
|
//# sourceMappingURL=ActionType.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ActionType.d.ts","sourceRoot":"../../../../src/enums","sources":["ActionType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB,WAAW,
|
1
|
+
{"version":3,"file":"ActionType.d.ts","sourceRoot":"../../../../src/enums","sources":["ActionType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"HookType.d.ts","sourceRoot":"../../../../src/enums","sources":["HookType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,QAAQ;IAClB,SAAS,IAAI;IACb,UAAU,IAAI;CACf"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Relatables.d.ts","sourceRoot":"../../../../src/enums","sources":["Relatables.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,SAAS,IAAI;IACb,GAAG,IAAI;IACP,UAAU,IAAI;IACd,OAAO,IAAI;IACX,OAAO,IAAI;IACX,WAAW,IAAI;CAChB"}
|
@@ -2,14 +2,14 @@
|
|
2
2
|
* @public
|
3
3
|
*/
|
4
4
|
export declare enum ResourceType {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
Unspecified = "Unspecified",
|
6
|
+
IPOrg = "IPOrg",
|
7
|
+
IPAsset = "IPAsset",
|
8
|
+
License = "License",
|
9
|
+
Relationship = "Relationship",
|
10
|
+
RelationshipType = "RelationshipType",
|
11
|
+
Module = "Module",
|
12
|
+
Hook = "Hook",
|
13
|
+
Dispute = "Dispute"
|
14
14
|
}
|
15
15
|
//# sourceMappingURL=ResourceType.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ResourceType.d.ts","sourceRoot":"../../../../src/enums","sources":["ResourceType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,WAAW,
|
1
|
+
{"version":3,"file":"ResourceType.d.ts","sourceRoot":"../../../../src/enums","sources":["ResourceType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB"}
|
@@ -1,11 +1,28 @@
|
|
1
1
|
export { StoryClient } from "./client.js";
|
2
|
-
export { IPAssetType } from "./enums/IPAssetType.js";
|
3
2
|
export { ResourceType } from "./enums/ResourceType.js";
|
3
|
+
export { HookType } from "./enums/HookType.js";
|
4
|
+
export { ActionType } from "./enums/ActionType.js";
|
5
|
+
export { Relatables } from "./enums/Relatables.js";
|
6
|
+
export { HookReadOnlyClient } from "./resources/hookReadOnly.js";
|
7
|
+
export { IPAssetClient } from "./resources/ipAsset.js";
|
8
|
+
export { IPAssetReadOnlyClient } from "./resources/ipAssetReadOnly.js";
|
9
|
+
export { IPOrgClient } from "./resources/ipOrg.js";
|
10
|
+
export { IPOrgReadOnlyClient } from "./resources/ipOrgReadOnly.js";
|
11
|
+
export { LicenseClient } from "./resources/license.js";
|
12
|
+
export { LicenseReadOnlyClient } from "./resources/licenseReadOnly.js";
|
13
|
+
export { ModuleReadOnlyClient } from "./resources/moduleReadOnly.js";
|
14
|
+
export { RelationshipClient } from "./resources/relationship.js";
|
15
|
+
export { TransactionClient } from "./resources/transaction.js";
|
16
|
+
export { PlatformClient } from "./utils/platform.js";
|
17
|
+
export { AddressZero } from "./constants/addresses.js";
|
4
18
|
export type { StoryConfig, StoryReadOnlyConfig } from "./types/config.js";
|
19
|
+
export type { Client, ReadOnlyClient } from "./types/client.js";
|
20
|
+
export type { Hex, TypedData } from "./types/common.js";
|
5
21
|
export type { IPOrg, GetIPOrgRequest, GetIPOrgResponse, CreateIPOrgRequest, CreateIPOrgResponse, ListIPOrgRequest, ListIPOrgResponse, } from "./types/resources/IPOrg.js";
|
6
22
|
export type { IPAsset, GetIpAssetRequest, GetIpAssetResponse, CreateIpAssetRequest, CreateIpAssetResponse, ListIpAssetRequest, ListIpAssetResponse, } from "./types/resources/ipAsset.js";
|
7
23
|
export type { License, GetLicenseRequest, GetLicenseResponse, CreateLicenseNftRequest, CreateIpaBoundLicenseRequest, CreateLicenseResponse, ListLicenseRequest, ListLicenseResponse, } from "./types/resources/license.js";
|
8
|
-
export type { Relationship, RegisterRelationshipRequest, RegisterRelationshipResponse, ListRelationshipRequest, ListRelationshipResponse, GetRelationshipRequest, GetRelationshipResponse,
|
24
|
+
export type { Relationship, RegisterRelationshipRequest, RegisterRelationshipResponse, ListRelationshipRequest, ListRelationshipResponse, GetRelationshipRequest, GetRelationshipResponse, } from "./types/resources/relationship.js";
|
25
|
+
export type { RelationshipType, GetRelationshipTypeRequest, GetRelationshipTypeResponse, ListRelationshipTypesRequest, ListRelationshipTypesResponse, RegisterRelationshipTypeRequest, RegisterRelationshipTypeResponse, } from "./types/resources/relationshipType.js";
|
9
26
|
export type { Transaction, GetTransactionRequest, GetTransactionResponse, ListTransactionRequest, ListTransactionResponse, } from "./types/resources/transaction.js";
|
10
27
|
export type { Module, GetModuleRequest, GetModuleResponse, ListModuleRequest, ListModuleResponse, } from "./types/resources/module.js";
|
11
28
|
export type { Hook, GetHookRequest, GetHookResponse, ListHookRequest, ListHookResponse, } from "./types/resources/hook.js";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,kBAAkB,EAAE,oCAAiC;AAC9D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,WAAW,EAAE,6BAA0B;AAChD,OAAO,EAAE,mBAAmB,EAAE,qCAAkC;AAChE,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,oBAAoB,EAAE,sCAAmC;AAClE,OAAO,EAAE,kBAAkB,EAAE,oCAAiC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,mCAAgC;AAC5D,OAAO,EAAE,cAAc,EAAE,4BAAyB;AAClD,OAAO,EAAE,WAAW,EAAE,iCAA8B;AAEpD,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,0BAAuB;AACvE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,0BAAuB;AAC7D,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,0BAAuB;AAErD,YAAY,EACV,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,mCAAgC;AAEjC,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,qCAAkC;AAEnC,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,qCAAkC;AAEnC,YAAY,EACV,YAAY,EACZ,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,0CAAuC;AAExC,YAAY,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,GACjC,8CAA2C;AAE5C,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GACxB,yCAAsC;AAEvC,YAAY,EACV,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,oCAAiC;AAElC,YAAY,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,kCAA+B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PublicClient, WalletClient } from "viem";
|
2
2
|
import { AxiosInstance } from "axios";
|
3
|
-
import {
|
3
|
+
import { RegisterRelationshipRequest, RegisterRelationshipResponse } from "../types/resources/relationship.js";
|
4
4
|
import { RelationshipReadOnlyClient } from "./relationshipReadOnly.js";
|
5
5
|
/**
|
6
6
|
* Client for managing relationships.
|
@@ -15,12 +15,5 @@ export declare class RelationshipClient extends RelationshipReadOnlyClient {
|
|
15
15
|
* @returns the response object that contains results from the register relationship action
|
16
16
|
*/
|
17
17
|
register(request: RegisterRelationshipRequest): Promise<RegisterRelationshipResponse>;
|
18
|
-
/**
|
19
|
-
* Register a relationship type on Story Protocol based on the specified input data.
|
20
|
-
*
|
21
|
-
* @param request - the request object that contains all data needed to register a relationship type
|
22
|
-
* @returns the response object that contains results from the register relationship type action
|
23
|
-
*/
|
24
|
-
registerRelationshipType(request: RegisterRelationshipTypeRequest): Promise<RegisterRelationshipTypeResponse>;
|
25
18
|
}
|
26
19
|
//# sourceMappingURL=relationship.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"relationship.d.ts","sourceRoot":"../../../../src/resources","sources":["relationship.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EACL
|
1
|
+
{"version":3,"file":"relationship.d.ts","sourceRoot":"../../../../src/resources","sources":["relationship.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC7B,2CAAwC;AAEzC,OAAO,EAAE,0BAA0B,EAAE,kCAA+B;AAKpE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,0BAA0B;IAChE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKpF;;;;;OAKG;IACU,QAAQ,CACnB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;CAmCzC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"relationshipReadOnly.d.ts","sourceRoot":"../../../../src/resources","sources":["relationshipReadOnly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACzB,2CAAwC;AAIzC;;GAEG;AACH,qBAAa,0BAA0B;IACrC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;gBAE/B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY;IAK9D;;;;;OAKG;IACU,GAAG,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAkBnF;;;;OAIG;IACU,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;
|
1
|
+
{"version":3,"file":"relationshipReadOnly.d.ts","sourceRoot":"../../../../src/resources","sources":["relationshipReadOnly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACzB,2CAAwC;AAIzC;;GAEG;AACH,qBAAa,0BAA0B;IACrC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;gBAE/B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY;IAK9D;;;;;OAKG;IACU,GAAG,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAkBnF;;;;OAIG;IACU,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAkBvF"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { PublicClient, WalletClient } from "viem";
|
2
|
+
import { AxiosInstance } from "axios";
|
3
|
+
import { RegisterRelationshipTypeRequest, RegisterRelationshipTypeResponse } from "../types/resources/relationshipType.js";
|
4
|
+
import { RelationshipTypeReadOnlyClient } from "./relationshipTypeReadOnly.js";
|
5
|
+
/**
|
6
|
+
* Client for managing relationships.
|
7
|
+
*/
|
8
|
+
export declare class RelationshipTypeClient extends RelationshipTypeReadOnlyClient {
|
9
|
+
private readonly wallet;
|
10
|
+
constructor(httpClient: AxiosInstance, rpcClient: PublicClient, wallet: WalletClient);
|
11
|
+
/**
|
12
|
+
* Register a relationship type on Story Protocol based on the specified input data.
|
13
|
+
*
|
14
|
+
* @param request - the request object that contains all data needed to register a relationship type
|
15
|
+
* @returns the response object that contains results from the register relationship type action
|
16
|
+
*/
|
17
|
+
register(request: RegisterRelationshipTypeRequest): Promise<RegisterRelationshipTypeResponse>;
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=relationshipType.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"relationshipType.d.ts","sourceRoot":"../../../../src/resources","sources":["relationshipType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,EACjC,+CAA4C;AAE7C,OAAO,EAAE,8BAA8B,EAAE,sCAAmC;AAK5E;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,8BAA8B;IACxE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAIpF;;;;;OAKG;IACU,QAAQ,CACnB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,gCAAgC,CAAC;CAmC7C"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { AxiosInstance } from "axios";
|
2
|
+
import { PublicClient } from "viem";
|
3
|
+
import { GetRelationshipTypeRequest, GetRelationshipTypeResponse, ListRelationshipTypesRequest, ListRelationshipTypesResponse } from "../types/resources/relationshipType.js";
|
4
|
+
/**
|
5
|
+
* Client for managing RelationshipTypes.
|
6
|
+
*/
|
7
|
+
export declare class RelationshipTypeReadOnlyClient {
|
8
|
+
protected readonly httpClient: AxiosInstance;
|
9
|
+
protected readonly rpcClient: PublicClient;
|
10
|
+
constructor(httpClient: AxiosInstance, rpcClient: PublicClient);
|
11
|
+
/**
|
12
|
+
* Get a RelationshipType by ipOrgId or relType.
|
13
|
+
*
|
14
|
+
* @param ipOrgId - The ID of the IP Org.
|
15
|
+
* @param relType - Relationship Type.
|
16
|
+
* @returns A Promise that resolves to the GetRelationshipTypeResponse.
|
17
|
+
*/
|
18
|
+
get(request: GetRelationshipTypeRequest): Promise<GetRelationshipTypeResponse>;
|
19
|
+
/**
|
20
|
+
* List all RelationshipTypes.
|
21
|
+
*
|
22
|
+
* @returns A Promise that resolves to the ListRelationshipTypesResponse.
|
23
|
+
*/
|
24
|
+
list(request: ListRelationshipTypesRequest): Promise<ListRelationshipTypesResponse>;
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=relationshipTypeReadOnly.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"relationshipTypeReadOnly.d.ts","sourceRoot":"../../../../src/resources","sources":["relationshipTypeReadOnly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC9B,+CAA4C;AAG7C;;GAEG;AACH,qBAAa,8BAA8B;IACzC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;gBAE/B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY;IAK9D;;;;;;OAMG;IACU,GAAG,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAa3F;;;;OAIG;IACU,IAAI,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,CAAC;CAkBjG"}
|
@@ -13,6 +13,8 @@ import { HookClient } from "../resources/hook.js";
|
|
13
13
|
import { PlatformClient } from "../utils/platform.js";
|
14
14
|
import { LicenseClient } from "../resources/license.js";
|
15
15
|
import { RelationshipClient } from "../resources/relationship.js";
|
16
|
+
import { RelationshipTypeClient } from "../resources/relationshipType.js";
|
17
|
+
import { RelationshipTypeReadOnlyClient } from "../resources/relationshipTypeReadOnly.js";
|
16
18
|
export interface ReadOnlyClient {
|
17
19
|
hook: HookReadOnlyClient;
|
18
20
|
module: ModuleReadOnlyClient;
|
@@ -21,6 +23,7 @@ export interface ReadOnlyClient {
|
|
21
23
|
transaction: TransactionReadOnlyClient;
|
22
24
|
ipAsset: IPAssetReadOnlyClient;
|
23
25
|
relationship: RelationshipReadOnlyClient;
|
26
|
+
relationshipType: RelationshipTypeReadOnlyClient;
|
24
27
|
}
|
25
28
|
export interface Client {
|
26
29
|
hook: HookClient;
|
@@ -30,6 +33,7 @@ export interface Client {
|
|
30
33
|
transaction: TransactionClient;
|
31
34
|
ipAsset: IPAssetClient;
|
32
35
|
relationship: RelationshipClient;
|
36
|
+
relationshipType: RelationshipTypeClient;
|
33
37
|
platform: PlatformClient;
|
34
38
|
}
|
35
39
|
//# sourceMappingURL=client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"../../../../src/types","sources":["client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,wCAAqC;AACrE,OAAO,EAAE,iBAAiB,EAAE,oCAAiC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,4CAAyC;AAC7E,OAAO,EAAE,aAAa,EAAE,gCAA6B;AACrD,O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AAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,qBAAqB,CAAC;IAC/B,WAAW,EAAE,yBAAyB,CAAC;IACvC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,YAAY,EAAE,0BAA0B,CAAC;IACzC,gBAAgB,EAAE,8BAA8B,CAAC;CAClD;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,kBAAkB,CAAC;IACjC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,QAAQ,EAAE,cAAc,CAAC;CAC1B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/types","sources":["common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAEhC,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IPOrg.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["IPOrg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;AAErD;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAA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E,CAAC;CACjB,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { QueryOptions } from "../options.js";
|
2
|
+
import { HookType } from "../../enums/HookType.js";
|
2
3
|
/**
|
3
4
|
* Core data model for Hook.
|
4
5
|
*
|
@@ -8,7 +9,7 @@ export type Hook = {
|
|
8
9
|
id: string;
|
9
10
|
moduleId: string;
|
10
11
|
interface?: string;
|
11
|
-
hookType:
|
12
|
+
hookType: HookType;
|
12
13
|
registryKey: string;
|
13
14
|
registeredAt: string;
|
14
15
|
txHash: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAmB;
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAmB;AAC1C,OAAO,EAAE,QAAQ,EAAE,gCAA6B;AAEhD;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { QueryOptions, TxOptions } from "../options.js";
|
2
|
+
import { TypedData } from "../common.js";
|
2
3
|
/**
|
3
4
|
* Core data model for IP Asset.
|
4
5
|
*
|
@@ -7,7 +8,7 @@ import { QueryOptions, TxOptions } from "../options.js";
|
|
7
8
|
export type IPAsset = {
|
8
9
|
id: string;
|
9
10
|
name: string;
|
10
|
-
type:
|
11
|
+
type: IPAssetType;
|
11
12
|
ipOrgId: string;
|
12
13
|
owner: string;
|
13
14
|
mediaUrl: string;
|
@@ -15,6 +16,10 @@ export type IPAsset = {
|
|
15
16
|
createdAt: string;
|
16
17
|
txHash: string;
|
17
18
|
};
|
19
|
+
export type IPAssetType = {
|
20
|
+
index: number;
|
21
|
+
value: string;
|
22
|
+
};
|
18
23
|
/**
|
19
24
|
* Request type for ipAsset.get method.
|
20
25
|
*
|
@@ -38,13 +43,13 @@ export type GetIpAssetResponse = {
|
|
38
43
|
*/
|
39
44
|
export type CreateIpAssetRequest = {
|
40
45
|
name: string;
|
41
|
-
|
46
|
+
typeIndex: number;
|
42
47
|
ipOrgId: string;
|
43
48
|
owner?: string;
|
44
49
|
mediaUrl?: string;
|
45
50
|
contentHash?: string;
|
46
|
-
preHookData?: Array<
|
47
|
-
postHookData?: Array<
|
51
|
+
preHookData?: Array<TypedData>;
|
52
|
+
postHookData?: Array<TypedData>;
|
48
53
|
txOptions?: TxOptions;
|
49
54
|
};
|
50
55
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;
|
1
|
+
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts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ACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
|
@@ -1,108 +1,13 @@
|
|
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
|
};
|
@@ -113,8 +18,8 @@ export type RegisterRelationshipRequest = {
|
|
113
18
|
srcTokenId: string;
|
114
19
|
dstContract: string;
|
115
20
|
dstTokenId: string;
|
116
|
-
preHookData
|
117
|
-
postHookData
|
21
|
+
preHookData?: Array<TypedData>;
|
22
|
+
postHookData?: Array<TypedData>;
|
118
23
|
txOptions?: TxOptions;
|
119
24
|
};
|
120
25
|
export type RegisterRelationshipResponse = {
|
@@ -131,26 +36,10 @@ export type GetRelationshipResponse = {
|
|
131
36
|
};
|
132
37
|
export type ListRelationshipRequest = {
|
133
38
|
tokenId: string;
|
134
|
-
contract
|
39
|
+
contract: string;
|
135
40
|
options?: QueryOptions;
|
136
41
|
};
|
137
42
|
export type ListRelationshipResponse = {
|
138
43
|
relationships: Relationship[];
|
139
44
|
};
|
140
|
-
export type RegisterRelationshipTypeRequest = {
|
141
|
-
ipOrgId: string;
|
142
|
-
relType: string;
|
143
|
-
relatedElements: RelatedElements;
|
144
|
-
allowedSrcs: string[];
|
145
|
-
allowedDsts: string[];
|
146
|
-
preHooksConfig: Record<string, unknown>[];
|
147
|
-
postHooksConfig: Record<string, unknown>[];
|
148
|
-
txOptions?: TxOptions;
|
149
|
-
};
|
150
|
-
export type RegisterRelationshipTypeResponse = {
|
151
|
-
txHash: string;
|
152
|
-
success?: boolean;
|
153
|
-
relationshipId?: string;
|
154
|
-
};
|
155
|
-
export {};
|
156
45
|
//# 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,E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
+
import { TypedData } from "../common.js";
|
3
|
+
import { Relatables } from "../../enums/Relatables.js";
|
4
|
+
export type RelationshipType = {
|
5
|
+
type: string;
|
6
|
+
ipOrgId: string;
|
7
|
+
srcContract: string;
|
8
|
+
srcRelatable: number;
|
9
|
+
srcSubtypesMask: number;
|
10
|
+
dstContract: string;
|
11
|
+
dstRelatable: number;
|
12
|
+
dstSubtypesMask: number;
|
13
|
+
registeredAt: string;
|
14
|
+
txHash: string;
|
15
|
+
};
|
16
|
+
export type GetRelationshipTypeRequest = {
|
17
|
+
ipOrgId: string;
|
18
|
+
relType: string;
|
19
|
+
};
|
20
|
+
export type GetRelationshipTypeResponse = {
|
21
|
+
relationshipType: RelationshipType;
|
22
|
+
};
|
23
|
+
export type ListRelationshipTypesRequest = {
|
24
|
+
ipOrgId?: string;
|
25
|
+
options?: QueryOptions;
|
26
|
+
};
|
27
|
+
export type ListRelationshipTypesResponse = {
|
28
|
+
relationshipTypes: RelationshipType[];
|
29
|
+
};
|
30
|
+
export type RelatedElements = {
|
31
|
+
src: Relatables;
|
32
|
+
dst: Relatables;
|
33
|
+
};
|
34
|
+
export type RegisterRelationshipTypeRequest = {
|
35
|
+
ipOrgId: string;
|
36
|
+
relType: string;
|
37
|
+
relatedElements: RelatedElements;
|
38
|
+
allowedSrcIpAssetTypes: number[];
|
39
|
+
allowedDstIpAssetTypes: number[];
|
40
|
+
preHooksConfig?: Array<TypedData>;
|
41
|
+
postHooksConfig?: Array<TypedData>;
|
42
|
+
txOptions?: TxOptions;
|
43
|
+
};
|
44
|
+
export type RegisterRelationshipTypeResponse = {
|
45
|
+
txHash: string;
|
46
|
+
success?: boolean;
|
47
|
+
relationshipId?: string;
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=relationshipType.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"relationshipType.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["relationshipType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,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