@nevermined-io/core-kit 0.0.17-rc0 → 0.0.17

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.
Files changed (135) hide show
  1. package/dist/Instantiable.abstract.d.ts +1 -0
  2. package/dist/Instantiable.abstract.d.ts.map +1 -0
  3. package/dist/Instantiable.abstract.js +1 -0
  4. package/dist/artifacts/generated.d.ts +33 -166
  5. package/dist/artifacts/generated.d.ts.map +1 -0
  6. package/dist/artifacts/generated.js +16 -124
  7. package/dist/contracts/AccessManager.d.ts +1 -0
  8. package/dist/contracts/AccessManager.d.ts.map +1 -0
  9. package/dist/contracts/AssetRegistry.d.ts +2 -1
  10. package/dist/contracts/AssetRegistry.d.ts.map +1 -0
  11. package/dist/contracts/AssetRegistry.js +1 -1
  12. package/dist/contracts/ContractBase.d.ts +1 -0
  13. package/dist/contracts/ContractBase.d.ts.map +1 -0
  14. package/dist/contracts/ContractBase.js +3 -0
  15. package/dist/contracts/ContractsApi.d.ts +1 -0
  16. package/dist/contracts/ContractsApi.d.ts.map +1 -0
  17. package/dist/contracts/ContractsApi.js +43 -0
  18. package/dist/contracts/FiatPaymentTemplate.d.ts +1 -0
  19. package/dist/contracts/FiatPaymentTemplate.d.ts.map +1 -0
  20. package/dist/contracts/FiatSettlementCondition.d.ts +1 -0
  21. package/dist/contracts/FiatSettlementCondition.d.ts.map +1 -0
  22. package/dist/contracts/FixedPaymentTemplate.d.ts +1 -0
  23. package/dist/contracts/FixedPaymentTemplate.d.ts.map +1 -0
  24. package/dist/contracts/FixedPaymentTemplate.js +3 -6
  25. package/dist/contracts/NFT1155Base.d.ts +1 -0
  26. package/dist/contracts/NFT1155Base.d.ts.map +1 -0
  27. package/dist/contracts/NFT1155Credits.d.ts +1 -0
  28. package/dist/contracts/NFT1155Credits.d.ts.map +1 -0
  29. package/dist/contracts/NFT1155ExpirableCredits.d.ts +1 -0
  30. package/dist/contracts/NFT1155ExpirableCredits.d.ts.map +1 -0
  31. package/dist/contracts/NVMConfig.d.ts +1 -0
  32. package/dist/contracts/NVMConfig.d.ts.map +1 -0
  33. package/dist/contracts/ProtocolStandardFees.d.ts +2 -1
  34. package/dist/contracts/ProtocolStandardFees.d.ts.map +1 -0
  35. package/dist/contracts/Roles.d.ts +1 -0
  36. package/dist/contracts/Roles.d.ts.map +1 -0
  37. package/dist/contracts/index.d.ts +1 -0
  38. package/dist/contracts/index.d.ts.map +1 -0
  39. package/dist/errors/NeverminedErrors.d.ts +1 -0
  40. package/dist/errors/NeverminedErrors.d.ts.map +1 -0
  41. package/dist/errors/index.d.ts +1 -0
  42. package/dist/errors/index.d.ts.map +1 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +7 -7
  46. package/dist/models/AgentAccessToken.d.ts +1 -0
  47. package/dist/models/AgentAccessToken.d.ts.map +1 -0
  48. package/dist/models/AgentAccessToken.js +22 -0
  49. package/dist/models/Logger.d.ts +1 -0
  50. package/dist/models/Logger.d.ts.map +1 -0
  51. package/dist/models/NeverminedOptions.d.ts +1 -0
  52. package/dist/models/NeverminedOptions.d.ts.map +1 -0
  53. package/dist/models/NeverminedOptions.js +26 -6
  54. package/dist/models/NvmApiKey.d.ts +1 -0
  55. package/dist/models/NvmApiKey.d.ts.map +1 -0
  56. package/dist/models/NvmApiKey.js +36 -6
  57. package/dist/models/Transactions.d.ts +1 -0
  58. package/dist/models/Transactions.d.ts.map +1 -0
  59. package/dist/models/index.d.ts +1 -0
  60. package/dist/models/index.d.ts.map +1 -0
  61. package/dist/nevermined/DID.d.ts +1 -0
  62. package/dist/nevermined/DID.d.ts.map +1 -0
  63. package/dist/nevermined/DID.js +4 -0
  64. package/dist/nevermined/Nevermined.d.ts +1 -0
  65. package/dist/nevermined/Nevermined.d.ts.map +1 -0
  66. package/dist/nevermined/Nevermined.js +21 -0
  67. package/dist/nevermined/api/PaymentsApi.d.ts +2 -1
  68. package/dist/nevermined/api/PaymentsApi.d.ts.map +1 -0
  69. package/dist/nevermined/api/PaymentsApi.js +1 -1
  70. package/dist/nevermined/api/ServicesApi.d.ts +1 -0
  71. package/dist/nevermined/api/ServicesApi.d.ts.map +1 -0
  72. package/dist/nevermined/api/ServicesApi.js +12 -0
  73. package/dist/nevermined/api/UtilsApi.d.ts +1 -0
  74. package/dist/nevermined/api/UtilsApi.d.ts.map +1 -0
  75. package/dist/nevermined/api/UtilsApi.js +12 -0
  76. package/dist/nevermined/index.d.ts +1 -0
  77. package/dist/nevermined/index.d.ts.map +1 -0
  78. package/dist/nevermined/utils/AgentUtils.d.ts +2 -1
  79. package/dist/nevermined/utils/AgentUtils.d.ts.map +1 -0
  80. package/dist/nevermined/utils/BlockchainViemUtils.d.ts +1 -0
  81. package/dist/nevermined/utils/BlockchainViemUtils.d.ts.map +1 -0
  82. package/dist/nevermined/utils/JwtUtils.d.ts +2 -1
  83. package/dist/nevermined/utils/JwtUtils.d.ts.map +1 -0
  84. package/dist/nevermined/utils/JwtUtils.js +5 -1
  85. package/dist/nevermined/utils/SignatureUtils.d.ts +2 -1
  86. package/dist/nevermined/utils/SignatureUtils.d.ts.map +1 -0
  87. package/dist/nevermined/utils/WebServiceConnector.d.ts +1 -0
  88. package/dist/nevermined/utils/WebServiceConnector.d.ts.map +1 -0
  89. package/dist/nevermined/utils/WebServiceConnector.js +2 -0
  90. package/dist/nevermined/utils/ZeroDevPolicies.d.ts +1 -0
  91. package/dist/nevermined/utils/ZeroDevPolicies.d.ts.map +1 -0
  92. package/dist/nevermined/utils/index.d.ts +1 -0
  93. package/dist/nevermined/utils/index.d.ts.map +1 -0
  94. package/dist/services/Api.d.ts +1 -0
  95. package/dist/services/Api.d.ts.map +1 -0
  96. package/dist/services/MetadataService.d.ts +2 -1
  97. package/dist/services/MetadataService.d.ts.map +1 -0
  98. package/dist/services/MetadataService.js +1 -1
  99. package/dist/services/Profiles.d.ts +2 -1
  100. package/dist/services/Profiles.d.ts.map +1 -0
  101. package/dist/services/index.d.ts +1 -0
  102. package/dist/services/index.d.ts.map +1 -0
  103. package/dist/utils/ConversionTypeHelpers.d.ts +1 -0
  104. package/dist/utils/ConversionTypeHelpers.d.ts.map +1 -0
  105. package/dist/utils/Network.d.ts +1 -0
  106. package/dist/utils/Network.d.ts.map +1 -0
  107. package/dist/utils/helpers.d.ts +2 -1
  108. package/dist/utils/helpers.d.ts.map +1 -0
  109. package/dist/utils/index.d.ts +1 -0
  110. package/dist/utils/index.d.ts.map +1 -0
  111. package/package.json +1 -20
  112. package/dist/vendor/commons/index.d.ts +0 -4
  113. package/dist/vendor/commons/index.js +0 -4
  114. package/dist/vendor/commons/lib/constants/AssetConstants.d.ts +0 -3
  115. package/dist/vendor/commons/lib/constants/AssetConstants.js +0 -3
  116. package/dist/vendor/commons/lib/constants/index.d.ts +0 -2
  117. package/dist/vendor/commons/lib/constants/index.js +0 -1
  118. package/dist/vendor/commons/lib/ddo/DDO.d.ts +0 -39
  119. package/dist/vendor/commons/lib/ddo/DDO.js +0 -95
  120. package/dist/vendor/commons/lib/ddo/index.d.ts +0 -1
  121. package/dist/vendor/commons/lib/ddo/index.js +0 -1
  122. package/dist/vendor/commons/lib/types/ContractsTypes.d.ts +0 -98
  123. package/dist/vendor/commons/lib/types/ContractsTypes.js +0 -36
  124. package/dist/vendor/commons/lib/types/DDOTypes.d.ts +0 -113
  125. package/dist/vendor/commons/lib/types/DDOTypes.js +0 -14
  126. package/dist/vendor/commons/lib/types/GeneralTypes.d.ts +0 -19
  127. package/dist/vendor/commons/lib/types/GeneralTypes.js +0 -1
  128. package/dist/vendor/commons/lib/types/MetadataTypes.d.ts +0 -120
  129. package/dist/vendor/commons/lib/types/MetadataTypes.js +0 -57
  130. package/dist/vendor/commons/lib/types/TranscoderTypes.d.ts +0 -27
  131. package/dist/vendor/commons/lib/types/TranscoderTypes.js +0 -30
  132. package/dist/vendor/commons/lib/types/index.d.ts +0 -6
  133. package/dist/vendor/commons/lib/types/index.js +0 -6
  134. package/dist/vendor/commons/lib/types/types.d.ts +0 -202
  135. package/dist/vendor/commons/lib/types/types.js +0 -140
@@ -1,39 +0,0 @@
1
- import { DIDAsset, Plan } from '../types/ContractsTypes.js';
2
- import { Metadata, NvmConfig } from '../types/DDOTypes.js';
3
- type Registry = DIDAsset | Plan;
4
- export declare class DDO {
5
- /**
6
- * Serializes the DDO object.
7
- * @param ddo - The {@link DDO} to be serialized.
8
- * @returns DDO serialized.
9
- */
10
- static serialize(ddo: DDO): string;
11
- /**
12
- * Deserializes the DDO object.
13
- * @param ddoString - The serialized {@link DDO} to be deserialized.
14
- * @returns The deserialized {@link DDO}.
15
- */
16
- static deserialize(ddoString: string): DDO;
17
- /**
18
- * DID, decentralizes ID.
19
- */
20
- id: string;
21
- ['@context']: string;
22
- _nvm: NvmConfig;
23
- created: string;
24
- updated?: string;
25
- metadata: Metadata;
26
- registry: Registry;
27
- constructor(ddo?: Partial<DDO>);
28
- }
29
- export declare class AgentDDO extends DDO {
30
- registry: DIDAsset;
31
- constructor(ddo?: Partial<AgentDDO>);
32
- static getInstance(userId: string, userAddress: string, appId?: string): AgentDDO;
33
- }
34
- export declare class PlanDDO extends DDO {
35
- registry: Plan;
36
- constructor(ddo?: Partial<PlanDDO>);
37
- static getInstance(userId: string, userAddress: string, appId?: string): PlanDDO;
38
- }
39
- export {};
@@ -1,95 +0,0 @@
1
- const jsonReplacer = (_key, value) => {
2
- // Modify the value or return undefined to exclude the property
3
- return typeof value === 'bigint' ? value.toString() : value;
4
- };
5
- export class DDO {
6
- /**
7
- * Serializes the DDO object.
8
- * @param ddo - The {@link DDO} to be serialized.
9
- * @returns DDO serialized.
10
- */
11
- static serialize(ddo) {
12
- return JSON.stringify(ddo, jsonReplacer, 2);
13
- }
14
- /**
15
- * Deserializes the DDO object.
16
- * @param ddoString - The serialized {@link DDO} to be deserialized.
17
- * @returns The deserialized {@link DDO}.
18
- */
19
- static deserialize(ddoString) {
20
- const ddo = JSON.parse(ddoString);
21
- return new DDO(ddo);
22
- }
23
- constructor(ddo = {}) {
24
- /**
25
- * DID, decentralizes ID.
26
- */
27
- this.id = '';
28
- // public didSeed = ''
29
- this['@context'] = 'https://w3id.org/did/v1';
30
- this._nvm = { userId: '', userAddress: '', appId: '', versions: [] };
31
- this.created = new Date().toISOString().replace(/\.[0-9]{3}/, '');
32
- this.metadata = {
33
- serviceEndpoint: '',
34
- main: {
35
- name: '',
36
- description: '',
37
- dateCreated: '',
38
- datePublished: '',
39
- license: '',
40
- tags: [],
41
- },
42
- curation: {
43
- numVotes: 0,
44
- rating: 0,
45
- schema: '',
46
- isListed: true,
47
- },
48
- };
49
- Object.assign(this, ddo, {
50
- created: (ddo && ddo.created) || new Date().toISOString().replace(/\.[0-9]{3}/, ''),
51
- });
52
- }
53
- }
54
- export class AgentDDO extends DDO {
55
- constructor(ddo = {}) {
56
- super(ddo);
57
- this.registry = {
58
- owner: '0x',
59
- creator: '0x',
60
- url: '',
61
- lastUpdated: 0n,
62
- plans: [],
63
- };
64
- }
65
- static getInstance(userId, userAddress, appId) {
66
- return new AgentDDO({
67
- id: '',
68
- _nvm: { userId, userAddress, appId: appId || '', versions: [] },
69
- registry: { owner: '0x', creator: '0x', url: '', lastUpdated: 0n, plans: [] },
70
- });
71
- }
72
- }
73
- export class PlanDDO extends DDO {
74
- constructor(ddo = {}) {
75
- super(ddo);
76
- this.registry = {
77
- owner: '0x',
78
- price: {},
79
- credits: {},
80
- lastUpdated: 0n,
81
- };
82
- }
83
- static getInstance(userId, userAddress, appId) {
84
- return new PlanDDO({
85
- id: '',
86
- _nvm: { userId, userAddress, appId: appId || '', versions: [] },
87
- registry: {
88
- owner: '0x',
89
- price: {},
90
- credits: {},
91
- lastUpdated: 0n,
92
- },
93
- });
94
- }
95
- }
@@ -1 +0,0 @@
1
- export * from './DDO.js';
@@ -1 +0,0 @@
1
- export * from './DDO.js';
@@ -1,98 +0,0 @@
1
- import { Address } from 'viem';
2
- export declare enum PriceType {
3
- FIXED_PRICE = 0,
4
- FIXED_FIAT_PRICE = 1,
5
- SMART_CONTRACT_PRICE = 2
6
- }
7
- export declare enum CreditsType {
8
- EXPIRABLE = 0,
9
- FIXED = 1,
10
- DYNAMIC = 2
11
- }
12
- export declare enum RedemptionType {
13
- ONLY_GLOBAL_ROLE = 0,
14
- ONLY_OWNER = 1,
15
- ONLY_PLAN_ROLE = 2
16
- }
17
- export interface DIDAsset {
18
- owner: Address;
19
- creator: Address;
20
- url: string;
21
- lastUpdated: bigint;
22
- plans: bigint[];
23
- }
24
- export interface PriceConfig {
25
- /**
26
- * The type or configuration of the price
27
- * @notice 0 - fixed price. 1 - fixed fiat price. 2 - smart contract price
28
- */
29
- priceType: PriceType;
30
- /**
31
- * The address of the token (ERC20 or Native if zero address) for paying the plan
32
- * @notice only if priceType == FIXED_PRICE or SMART_CONTRACT_PRICE
33
- */
34
- tokenAddress?: Address;
35
- /**
36
- * The amounts to be paid for the plan
37
- * @notice only if priceType == FIXED_PRICE or FIXED_FIAT_PRICE
38
- */
39
- amounts: bigint[];
40
- /**
41
- * The receivers of the payments of the plan
42
- * @notice only if priceType == FIXED_PRICE
43
- */
44
- receivers: string[];
45
- /**
46
- * The address of the smart contract that calculates the price
47
- * @notice only if priceType == SMART_CONTRACT_PRICE
48
- */
49
- contractAddress?: Address;
50
- /**
51
- * The address of the fee controller contract, if any
52
- * @notice if not given, the fee controller is the default one
53
- */
54
- feeController?: Address;
55
- }
56
- export interface CreditsConfig {
57
- /**
58
- * The type of configuration of the credits type
59
- */
60
- creditsType: CreditsType;
61
- /**
62
- * How the credits can be redeemed
63
- */
64
- redemptionType: RedemptionType;
65
- /**
66
- * Whether the credits burn proof signed by the user is required
67
- */
68
- proofRequired: boolean;
69
- /**
70
- * The duration of the credits in seconds
71
- * @notice only if creditsType == EXPIRABLE
72
- */
73
- durationSecs: bigint;
74
- /**
75
- * The amount of credits that are granted when purchasing the plan
76
- */
77
- amount: bigint;
78
- /**
79
- * The minimum number of credits redeemed when using the plan
80
- * @notice only if creditsType == FIXED or DYNAMIC
81
- */
82
- minAmount: bigint;
83
- /**
84
- * The maximum number of credits redeemed when using the plan
85
- * @notice only if creditsType == DYNAMIC
86
- */
87
- maxAmount: bigint;
88
- /**
89
- * The address of the NFT contract that represents the plan's credits
90
- */
91
- nftAddress?: Address;
92
- }
93
- export declare class Plan {
94
- owner: Address;
95
- price: PriceConfig;
96
- credits: CreditsConfig;
97
- lastUpdated: bigint;
98
- }
@@ -1,36 +0,0 @@
1
- /// Different types of prices that can be configured for a plan
2
- /// @notice 0 - FIXED_PRICE, 1 - FIXED_FIAT_PRICE, 2 - SMART_CONTRACT_PRICE
3
- /// If FIXED_PRICE it means the plan can be paid in crypto by a fixed amount of a ERC20 or Native token
4
- /// If FIXED_FIAT_PRICE it means the plan can be paid in fiat by a fixed amount (typically USD)
5
- /// If SMART_CONTRACT_PRICE it means the plan can be paid in crypto and the amount to be paid is calculated by a smart contract
6
- export var PriceType;
7
- (function (PriceType) {
8
- PriceType[PriceType["FIXED_PRICE"] = 0] = "FIXED_PRICE";
9
- PriceType[PriceType["FIXED_FIAT_PRICE"] = 1] = "FIXED_FIAT_PRICE";
10
- PriceType[PriceType["SMART_CONTRACT_PRICE"] = 2] = "SMART_CONTRACT_PRICE";
11
- })(PriceType || (PriceType = {}));
12
- /// Different types of credits that can be obtained when purchasing a plan
13
- /// @notice 0 - EXPIRABLE, 1 - FIXED, 2 - DYNAMIC
14
- /// If EXPIRABLE it means the credits can be used for a fixed amount of time (calculated in seconds)
15
- /// If FIXED it means the credits can be used for a fixed amount of times
16
- /// If DYNAMIC it means the credits can be used but the redemption amount is dynamic
17
- export var CreditsType;
18
- (function (CreditsType) {
19
- CreditsType[CreditsType["EXPIRABLE"] = 0] = "EXPIRABLE";
20
- CreditsType[CreditsType["FIXED"] = 1] = "FIXED";
21
- CreditsType[CreditsType["DYNAMIC"] = 2] = "DYNAMIC";
22
- })(CreditsType || (CreditsType = {}));
23
- /// Different types of redemptions criterias that can be used when redeeming credits
24
- /// @notice 0 - ONLY_GLOBAL_ROLE, 1 - ONLY_OWNER, 2 - ROLE_AND_OWNER
25
- /// If ONLY_GLOBAL_ROLE it means the credits can be redeemed only by an account with the `CREDITS_BURNER_ROLE`
26
- /// If ONLY_OWNER it means the credits can be redeemed only by the owner of the Plan
27
- /// If ONLY_PLAN_ROLE it means the credits can be redeemed by an account with specifics grants for the plan
28
- export var RedemptionType;
29
- (function (RedemptionType) {
30
- RedemptionType[RedemptionType["ONLY_GLOBAL_ROLE"] = 0] = "ONLY_GLOBAL_ROLE";
31
- RedemptionType[RedemptionType["ONLY_OWNER"] = 1] = "ONLY_OWNER";
32
- RedemptionType[RedemptionType["ONLY_PLAN_ROLE"] = 2] = "ONLY_PLAN_ROLE";
33
- })(RedemptionType || (RedemptionType = {}));
34
- /// Definition of a plan
35
- export class Plan {
36
- }
@@ -1,113 +0,0 @@
1
- export interface Metadata {
2
- serviceEndpoint: string;
3
- main: MetadataMainAttributes;
4
- agent?: AgentMetadata;
5
- additionalInformation?: unknown;
6
- curation: Curation;
7
- plan?: PlanMetadata;
8
- }
9
- export interface NvmConfigVersions {
10
- id: number;
11
- updated: string;
12
- checksum: string;
13
- }
14
- export interface NvmConfig {
15
- userId: string;
16
- userAddress: string;
17
- appId: string;
18
- versions: NvmConfigVersions[];
19
- }
20
- export interface Proof {
21
- created: string;
22
- creator: string;
23
- signatureValue: string;
24
- type: string;
25
- }
26
- export interface MetadataMainAttributes {
27
- name: string;
28
- description?: string;
29
- author?: string;
30
- dateCreated?: string;
31
- datePublished?: string;
32
- license?: string;
33
- tags?: string[];
34
- }
35
- /**
36
- * Interface describing an asset of type `service`
37
- */
38
- export interface AgentMetadata {
39
- /**
40
- * Type of Web service
41
- */
42
- apiType?: 'restful' | 'graphql' | 'rpc' | 'other';
43
- /**
44
- * Authentication required by the API
45
- */
46
- authentication?: ResourceAuthentication;
47
- /**
48
- * List of endpoints of the API exposed by the Agent
49
- */
50
- endpoints?: ApiEndpoint[];
51
- /**
52
- * List of open endpoints available for the agent. These endpoints are not protected.
53
- * This attribute is useful to indicate which endpoints are available for public access (documentation, definitions, etc).
54
- */
55
- openEndpoints?: string[];
56
- requiredHeaders?: {
57
- [verb: string]: string;
58
- }[];
59
- encryptedAttributes?: string;
60
- }
61
- export interface PlanMetadata {
62
- isTrialPlan?: boolean;
63
- }
64
- export interface ResourceAuthentication {
65
- type: ApiAuthenticationType;
66
- user?: string;
67
- password?: string;
68
- token?: string;
69
- privateParameters?: {
70
- [name: string]: string;
71
- }[];
72
- }
73
- /**
74
- * Curation attributes of Assets Metadata.
75
- * @see https://github.com/nevermined-io/docs/blob/master/docs/architecture/specs/metadata/README.md#curation-attributes
76
- */
77
- export interface Curation {
78
- /**
79
- * Decimal value between 0 and 1. 0 is the default value.
80
- * @example 0.93
81
- */
82
- rating: number;
83
- /**
84
- * Number of votes. 0 is the default value.
85
- * @example 123
86
- */
87
- numVotes: number;
88
- /**
89
- * Schema applied to calculate the rating.
90
- * @example "Binary Voting"
91
- */
92
- schema?: string;
93
- /**
94
- * Flag unsuitable content.
95
- * @example true
96
- */
97
- isListed?: boolean;
98
- }
99
- export declare enum ApiAuthenticationType {
100
- none = "none",
101
- basic = "basic",
102
- bearer = "bearer",
103
- oauth = "oauth"
104
- }
105
- export type ApiEndpoint = {
106
- [verb: string]: string;
107
- };
108
- export declare enum AgentTaskStatus {
109
- SUCCESS = "Success",
110
- FAILURE = "Failure",
111
- PENDING = "Pending",
112
- IN_PROGRESS = "In_Progress"
113
- }
@@ -1,14 +0,0 @@
1
- export var ApiAuthenticationType;
2
- (function (ApiAuthenticationType) {
3
- ApiAuthenticationType["none"] = "none";
4
- ApiAuthenticationType["basic"] = "basic";
5
- ApiAuthenticationType["bearer"] = "bearer";
6
- ApiAuthenticationType["oauth"] = "oauth";
7
- })(ApiAuthenticationType || (ApiAuthenticationType = {}));
8
- export var AgentTaskStatus;
9
- (function (AgentTaskStatus) {
10
- AgentTaskStatus["SUCCESS"] = "Success";
11
- AgentTaskStatus["FAILURE"] = "Failure";
12
- AgentTaskStatus["PENDING"] = "Pending";
13
- AgentTaskStatus["IN_PROGRESS"] = "In_Progress";
14
- })(AgentTaskStatus || (AgentTaskStatus = {}));
@@ -1,19 +0,0 @@
1
- export interface Balance {
2
- eth: bigint;
3
- nevermined: bigint;
4
- }
5
- export interface Eip712Data {
6
- message: string;
7
- chainId: number;
8
- }
9
- export interface TypedDataDomain {
10
- name: string;
11
- version: string;
12
- chainId: number;
13
- }
14
- export interface TypedDataTypes {
15
- Nevermined: {
16
- name: string;
17
- type: string;
18
- }[];
19
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,120 +0,0 @@
1
- import { DDO } from '../ddo/DDO.js';
2
- /**
3
- * It described the policy to be used when resolving an asset. It has the following options:
4
- * * ImmutableFirst - It checks if there is a reference to an immutable data-store (IPFS, Filecoin, etc) on-chain. If that's the case uses the URL to resolve the Metadata. If not try to resolve the metadata using the URL of the Metadata/Marketplace API
5
- * * MetadataAPIFirst - Try to resolve the metadata from the Marketplace/Metadata API, if it can't tries to resolve using the immutable url
6
- * * OnlyImmutable - Try to resolve the metadata only from the immutable data store URL
7
- * * OnlyMetadataAPI - Try to resolve the metadata only from the Metadata API. It gets the metadata api url from the DIDRegistry
8
- * * NoRegisry - Gets the metadata from the Metadata API using as endpoint the metadata api url from the SDK config. This method don't gets any on-chain information because assumes the DID is not registered on-chain
9
- */
10
- export declare enum DIDResolvePolicy {
11
- ImmutableFirst = 0,
12
- MetadataAPIFirst = 1,
13
- OnlyImmutable = 2,
14
- OnlyMetadataAPI = 3,
15
- NoRegistry = 4
16
- }
17
- /**
18
- * Where the metadata will be published. Options:
19
- * - OnlyMetadataAPI, The metadata will be stored only in the Metadata/Marketplace API
20
- * - IPFS, The metadata will be stored in the Metadata/Marketplace API and IPFS
21
- * - Filecoin, The metadata will be stored in the Metadata/Marketplace API and Filecoin
22
- * - Arweave, The metadata will be stored in the Metadata/Marketplace API and Arweave
23
- */
24
- export declare enum PublishMetadataOptions {
25
- OnlyMetadataAPI = 0,
26
- IPFS = 1,
27
- Filecoin = 2,
28
- Arweave = 3
29
- }
30
- /**
31
- * It specifies if the DID will be published on-chain initially or not.
32
- */
33
- export declare enum PublishOnChainOptions {
34
- DIDRegistry = 0,// The DID and the reference to the DDO will be stored in the DIDRegistry contract
35
- OnlyOffchain = 1
36
- }
37
- export declare class AssetPublicationOptions {
38
- metadata?: PublishMetadataOptions;
39
- did?: PublishOnChainOptions;
40
- }
41
- export interface SearchResults {
42
- value: number;
43
- relation: 'eq' | 'gte';
44
- }
45
- export interface QueryResult {
46
- results: DDO[];
47
- page: number;
48
- totalPages: number;
49
- totalResults: {
50
- [jsonPath: string]: any;
51
- };
52
- }
53
- export interface MarketplaceResults<Entity> {
54
- page: number;
55
- results: Entity[];
56
- total_pages: number;
57
- total_results: SearchResults;
58
- }
59
- export interface SearchQuery {
60
- offset?: number;
61
- page?: number;
62
- text?: string;
63
- query?: unknown;
64
- sort?: unknown;
65
- show_unlisted?: boolean;
66
- appId?: string;
67
- }
68
- export declare enum PermissionType {
69
- Read = "read",
70
- Update = "update",
71
- Delete = "delete",
72
- Admin = "admin"
73
- }
74
- export interface NewPermission {
75
- userId: string;
76
- type: PermissionType[];
77
- issuer: string;
78
- holder: string;
79
- }
80
- export interface Permission extends NewPermission {
81
- id: string;
82
- issuanceDate: Date;
83
- }
84
- export declare enum State {
85
- Disabled = "disabled",
86
- Unconfirmed = "unconfirmed",
87
- Confirmed = "confirmed"
88
- }
89
- export interface Stripe {
90
- stripeAccountId?: string | null;
91
- isStripeEnabled?: boolean;
92
- isAccountValidated: boolean;
93
- accountCreatedAt: string;
94
- accountUpdatedAt: string;
95
- additionalInformation: unknown;
96
- }
97
- export interface NewProfile {
98
- isListed: boolean;
99
- state: State;
100
- addresses: string[];
101
- nickname: string;
102
- name?: string;
103
- email?: string;
104
- live?: Stripe;
105
- sandbox?: Stripe;
106
- paymentCountry?: string;
107
- additionalInformation?: unknown;
108
- }
109
- export interface Profile extends NewProfile {
110
- userId: string;
111
- creationDate: Date;
112
- updateDate: Date;
113
- }
114
- export interface ReducedProfile {
115
- userId: string;
116
- nickname?: string;
117
- live?: Stripe;
118
- sandbox?: Stripe;
119
- additionalInformation?: unknown;
120
- }
@@ -1,57 +0,0 @@
1
- /**
2
- * It described the policy to be used when resolving an asset. It has the following options:
3
- * * ImmutableFirst - It checks if there is a reference to an immutable data-store (IPFS, Filecoin, etc) on-chain. If that's the case uses the URL to resolve the Metadata. If not try to resolve the metadata using the URL of the Metadata/Marketplace API
4
- * * MetadataAPIFirst - Try to resolve the metadata from the Marketplace/Metadata API, if it can't tries to resolve using the immutable url
5
- * * OnlyImmutable - Try to resolve the metadata only from the immutable data store URL
6
- * * OnlyMetadataAPI - Try to resolve the metadata only from the Metadata API. It gets the metadata api url from the DIDRegistry
7
- * * NoRegisry - Gets the metadata from the Metadata API using as endpoint the metadata api url from the SDK config. This method don't gets any on-chain information because assumes the DID is not registered on-chain
8
- */
9
- export var DIDResolvePolicy;
10
- (function (DIDResolvePolicy) {
11
- DIDResolvePolicy[DIDResolvePolicy["ImmutableFirst"] = 0] = "ImmutableFirst";
12
- DIDResolvePolicy[DIDResolvePolicy["MetadataAPIFirst"] = 1] = "MetadataAPIFirst";
13
- DIDResolvePolicy[DIDResolvePolicy["OnlyImmutable"] = 2] = "OnlyImmutable";
14
- DIDResolvePolicy[DIDResolvePolicy["OnlyMetadataAPI"] = 3] = "OnlyMetadataAPI";
15
- DIDResolvePolicy[DIDResolvePolicy["NoRegistry"] = 4] = "NoRegistry";
16
- })(DIDResolvePolicy || (DIDResolvePolicy = {}));
17
- /**
18
- * Where the metadata will be published. Options:
19
- * - OnlyMetadataAPI, The metadata will be stored only in the Metadata/Marketplace API
20
- * - IPFS, The metadata will be stored in the Metadata/Marketplace API and IPFS
21
- * - Filecoin, The metadata will be stored in the Metadata/Marketplace API and Filecoin
22
- * - Arweave, The metadata will be stored in the Metadata/Marketplace API and Arweave
23
- */
24
- export var PublishMetadataOptions;
25
- (function (PublishMetadataOptions) {
26
- PublishMetadataOptions[PublishMetadataOptions["OnlyMetadataAPI"] = 0] = "OnlyMetadataAPI";
27
- PublishMetadataOptions[PublishMetadataOptions["IPFS"] = 1] = "IPFS";
28
- PublishMetadataOptions[PublishMetadataOptions["Filecoin"] = 2] = "Filecoin";
29
- PublishMetadataOptions[PublishMetadataOptions["Arweave"] = 3] = "Arweave";
30
- })(PublishMetadataOptions || (PublishMetadataOptions = {}));
31
- /**
32
- * It specifies if the DID will be published on-chain initially or not.
33
- */
34
- export var PublishOnChainOptions;
35
- (function (PublishOnChainOptions) {
36
- PublishOnChainOptions[PublishOnChainOptions["DIDRegistry"] = 0] = "DIDRegistry";
37
- PublishOnChainOptions[PublishOnChainOptions["OnlyOffchain"] = 1] = "OnlyOffchain";
38
- })(PublishOnChainOptions || (PublishOnChainOptions = {}));
39
- export class AssetPublicationOptions {
40
- constructor() {
41
- this.metadata = PublishMetadataOptions.OnlyMetadataAPI;
42
- this.did = PublishOnChainOptions.DIDRegistry;
43
- }
44
- }
45
- export var PermissionType;
46
- (function (PermissionType) {
47
- PermissionType["Read"] = "read";
48
- PermissionType["Update"] = "update";
49
- PermissionType["Delete"] = "delete";
50
- PermissionType["Admin"] = "admin";
51
- })(PermissionType || (PermissionType = {}));
52
- export var State;
53
- (function (State) {
54
- State["Disabled"] = "disabled";
55
- State["Unconfirmed"] = "unconfirmed";
56
- State["Confirmed"] = "confirmed";
57
- })(State || (State = {}));
@@ -1,27 +0,0 @@
1
- export declare enum Flavor {
2
- Avatar = 0,
3
- Cover = 1,
4
- Animation = 2,
5
- Image = 3,
6
- Video = 4,
7
- Audio = 5,
8
- Terms = 6,
9
- Private = 7,
10
- SampleData = 8
11
- }
12
- export declare enum FlavorFolder {
13
- Avatars = "avatars",
14
- Covers = "covers",
15
- Animations = "animations",
16
- Images = "images",
17
- Videos = "videos",
18
- Audios = "audios",
19
- Terms = "terms",
20
- Privates = "private",
21
- SampleData = "sample-data"
22
- }
23
- export declare enum TranscodingStatus {
24
- Pending = "Pending",
25
- Done = "Done",
26
- Error = "Error"
27
- }
@@ -1,30 +0,0 @@
1
- export var Flavor;
2
- (function (Flavor) {
3
- Flavor[Flavor["Avatar"] = 0] = "Avatar";
4
- Flavor[Flavor["Cover"] = 1] = "Cover";
5
- Flavor[Flavor["Animation"] = 2] = "Animation";
6
- Flavor[Flavor["Image"] = 3] = "Image";
7
- Flavor[Flavor["Video"] = 4] = "Video";
8
- Flavor[Flavor["Audio"] = 5] = "Audio";
9
- Flavor[Flavor["Terms"] = 6] = "Terms";
10
- Flavor[Flavor["Private"] = 7] = "Private";
11
- Flavor[Flavor["SampleData"] = 8] = "SampleData";
12
- })(Flavor || (Flavor = {}));
13
- export var FlavorFolder;
14
- (function (FlavorFolder) {
15
- FlavorFolder["Avatars"] = "avatars";
16
- FlavorFolder["Covers"] = "covers";
17
- FlavorFolder["Animations"] = "animations";
18
- FlavorFolder["Images"] = "images";
19
- FlavorFolder["Videos"] = "videos";
20
- FlavorFolder["Audios"] = "audios";
21
- FlavorFolder["Terms"] = "terms";
22
- FlavorFolder["Privates"] = "private";
23
- FlavorFolder["SampleData"] = "sample-data";
24
- })(FlavorFolder || (FlavorFolder = {}));
25
- export var TranscodingStatus;
26
- (function (TranscodingStatus) {
27
- TranscodingStatus["Pending"] = "Pending";
28
- TranscodingStatus["Done"] = "Done";
29
- TranscodingStatus["Error"] = "Error";
30
- })(TranscodingStatus || (TranscodingStatus = {}));
@@ -1,6 +0,0 @@
1
- export * from './ContractsTypes.js';
2
- export * from './DDOTypes.js';
3
- export * from './GeneralTypes.js';
4
- export * from './MetadataTypes.js';
5
- export * from './TranscoderTypes.js';
6
- export * from './types.js';
@@ -1,6 +0,0 @@
1
- export * from './ContractsTypes.js';
2
- export * from './DDOTypes.js';
3
- export * from './GeneralTypes.js';
4
- export * from './MetadataTypes.js';
5
- export * from './TranscoderTypes.js';
6
- export * from './types.js';