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

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 +0 -1
  2. package/dist/Instantiable.abstract.js +1 -2
  3. package/dist/artifacts/generated.d.ts +20 -21
  4. package/dist/artifacts/generated.js +10 -10
  5. package/dist/contracts/AccessManager.d.ts +0 -1
  6. package/dist/contracts/AssetRegistry.d.ts +1 -2
  7. package/dist/contracts/AssetRegistry.js +1 -1
  8. package/dist/contracts/ContractBase.d.ts +0 -1
  9. package/dist/contracts/ContractBase.js +0 -3
  10. package/dist/contracts/ContractsApi.d.ts +0 -1
  11. package/dist/contracts/ContractsApi.js +0 -43
  12. package/dist/contracts/FiatPaymentTemplate.d.ts +0 -1
  13. package/dist/contracts/FiatSettlementCondition.d.ts +0 -1
  14. package/dist/contracts/FixedPaymentTemplate.d.ts +0 -1
  15. package/dist/contracts/FixedPaymentTemplate.js +6 -3
  16. package/dist/contracts/NFT1155Base.d.ts +0 -1
  17. package/dist/contracts/NFT1155Credits.d.ts +0 -1
  18. package/dist/contracts/NFT1155ExpirableCredits.d.ts +0 -1
  19. package/dist/contracts/NVMConfig.d.ts +0 -1
  20. package/dist/contracts/ProtocolStandardFees.d.ts +1 -2
  21. package/dist/contracts/Roles.d.ts +0 -1
  22. package/dist/contracts/index.d.ts +0 -1
  23. package/dist/errors/NeverminedErrors.d.ts +0 -1
  24. package/dist/errors/index.d.ts +0 -1
  25. package/dist/index.d.ts +0 -1
  26. package/dist/index.js +7 -7
  27. package/dist/models/AgentAccessToken.d.ts +0 -1
  28. package/dist/models/AgentAccessToken.js +0 -22
  29. package/dist/models/Logger.d.ts +0 -1
  30. package/dist/models/NeverminedOptions.d.ts +0 -1
  31. package/dist/models/NeverminedOptions.js +6 -26
  32. package/dist/models/NvmApiKey.d.ts +0 -1
  33. package/dist/models/NvmApiKey.js +6 -36
  34. package/dist/models/Transactions.d.ts +0 -1
  35. package/dist/models/index.d.ts +0 -1
  36. package/dist/nevermined/DID.d.ts +0 -1
  37. package/dist/nevermined/DID.js +0 -4
  38. package/dist/nevermined/Nevermined.d.ts +0 -1
  39. package/dist/nevermined/Nevermined.js +0 -21
  40. package/dist/nevermined/api/PaymentsApi.d.ts +1 -2
  41. package/dist/nevermined/api/PaymentsApi.js +5 -1
  42. package/dist/nevermined/api/ServicesApi.d.ts +0 -1
  43. package/dist/nevermined/api/ServicesApi.js +0 -12
  44. package/dist/nevermined/api/UtilsApi.d.ts +0 -1
  45. package/dist/nevermined/api/UtilsApi.js +0 -12
  46. package/dist/nevermined/index.d.ts +0 -1
  47. package/dist/nevermined/utils/AgentUtils.d.ts +1 -2
  48. package/dist/nevermined/utils/BlockchainViemUtils.d.ts +0 -1
  49. package/dist/nevermined/utils/JwtUtils.d.ts +1 -2
  50. package/dist/nevermined/utils/JwtUtils.js +1 -5
  51. package/dist/nevermined/utils/SignatureUtils.d.ts +1 -2
  52. package/dist/nevermined/utils/WebServiceConnector.d.ts +0 -1
  53. package/dist/nevermined/utils/WebServiceConnector.js +0 -2
  54. package/dist/nevermined/utils/ZeroDevPolicies.d.ts +0 -1
  55. package/dist/nevermined/utils/index.d.ts +0 -1
  56. package/dist/services/Api.d.ts +0 -1
  57. package/dist/services/MetadataService.d.ts +1 -2
  58. package/dist/services/MetadataService.js +1 -1
  59. package/dist/services/Profiles.d.ts +1 -2
  60. package/dist/services/index.d.ts +0 -1
  61. package/dist/utils/ConversionTypeHelpers.d.ts +0 -1
  62. package/dist/utils/Network.d.ts +0 -1
  63. package/dist/utils/helpers.d.ts +1 -2
  64. package/dist/utils/index.d.ts +0 -1
  65. package/dist/vendor/commons/index.d.ts +4 -0
  66. package/dist/vendor/commons/index.js +4 -0
  67. package/dist/vendor/commons/lib/constants/AssetConstants.d.ts +3 -0
  68. package/dist/vendor/commons/lib/constants/AssetConstants.js +3 -0
  69. package/dist/vendor/commons/lib/constants/index.d.ts +2 -0
  70. package/dist/vendor/commons/lib/constants/index.js +1 -0
  71. package/dist/vendor/commons/lib/ddo/DDO.d.ts +39 -0
  72. package/dist/vendor/commons/lib/ddo/DDO.js +95 -0
  73. package/dist/vendor/commons/lib/ddo/index.d.ts +1 -0
  74. package/dist/vendor/commons/lib/ddo/index.js +1 -0
  75. package/dist/vendor/commons/lib/types/ContractsTypes.d.ts +98 -0
  76. package/dist/vendor/commons/lib/types/ContractsTypes.js +36 -0
  77. package/dist/vendor/commons/lib/types/DDOTypes.d.ts +113 -0
  78. package/dist/vendor/commons/lib/types/DDOTypes.js +14 -0
  79. package/dist/vendor/commons/lib/types/GeneralTypes.d.ts +19 -0
  80. package/dist/vendor/commons/lib/types/GeneralTypes.js +1 -0
  81. package/dist/vendor/commons/lib/types/MetadataTypes.d.ts +120 -0
  82. package/dist/vendor/commons/lib/types/MetadataTypes.js +57 -0
  83. package/dist/vendor/commons/lib/types/TranscoderTypes.d.ts +27 -0
  84. package/dist/vendor/commons/lib/types/TranscoderTypes.js +30 -0
  85. package/dist/vendor/commons/lib/types/index.d.ts +6 -0
  86. package/dist/vendor/commons/lib/types/index.js +6 -0
  87. package/dist/vendor/commons/lib/types/types.d.ts +202 -0
  88. package/dist/vendor/commons/lib/types/types.js +140 -0
  89. package/package.json +36 -1
  90. package/dist/Instantiable.abstract.d.ts.map +0 -1
  91. package/dist/artifacts/generated.d.ts.map +0 -1
  92. package/dist/contracts/AccessManager.d.ts.map +0 -1
  93. package/dist/contracts/AssetRegistry.d.ts.map +0 -1
  94. package/dist/contracts/ContractBase.d.ts.map +0 -1
  95. package/dist/contracts/ContractsApi.d.ts.map +0 -1
  96. package/dist/contracts/FiatPaymentTemplate.d.ts.map +0 -1
  97. package/dist/contracts/FiatSettlementCondition.d.ts.map +0 -1
  98. package/dist/contracts/FixedPaymentTemplate.d.ts.map +0 -1
  99. package/dist/contracts/NFT1155Base.d.ts.map +0 -1
  100. package/dist/contracts/NFT1155Credits.d.ts.map +0 -1
  101. package/dist/contracts/NFT1155ExpirableCredits.d.ts.map +0 -1
  102. package/dist/contracts/NVMConfig.d.ts.map +0 -1
  103. package/dist/contracts/ProtocolStandardFees.d.ts.map +0 -1
  104. package/dist/contracts/Roles.d.ts.map +0 -1
  105. package/dist/contracts/index.d.ts.map +0 -1
  106. package/dist/errors/NeverminedErrors.d.ts.map +0 -1
  107. package/dist/errors/index.d.ts.map +0 -1
  108. package/dist/index.d.ts.map +0 -1
  109. package/dist/models/AgentAccessToken.d.ts.map +0 -1
  110. package/dist/models/Logger.d.ts.map +0 -1
  111. package/dist/models/NeverminedOptions.d.ts.map +0 -1
  112. package/dist/models/NvmApiKey.d.ts.map +0 -1
  113. package/dist/models/Transactions.d.ts.map +0 -1
  114. package/dist/models/index.d.ts.map +0 -1
  115. package/dist/nevermined/DID.d.ts.map +0 -1
  116. package/dist/nevermined/Nevermined.d.ts.map +0 -1
  117. package/dist/nevermined/api/PaymentsApi.d.ts.map +0 -1
  118. package/dist/nevermined/api/ServicesApi.d.ts.map +0 -1
  119. package/dist/nevermined/api/UtilsApi.d.ts.map +0 -1
  120. package/dist/nevermined/index.d.ts.map +0 -1
  121. package/dist/nevermined/utils/AgentUtils.d.ts.map +0 -1
  122. package/dist/nevermined/utils/BlockchainViemUtils.d.ts.map +0 -1
  123. package/dist/nevermined/utils/JwtUtils.d.ts.map +0 -1
  124. package/dist/nevermined/utils/SignatureUtils.d.ts.map +0 -1
  125. package/dist/nevermined/utils/WebServiceConnector.d.ts.map +0 -1
  126. package/dist/nevermined/utils/ZeroDevPolicies.d.ts.map +0 -1
  127. package/dist/nevermined/utils/index.d.ts.map +0 -1
  128. package/dist/services/Api.d.ts.map +0 -1
  129. package/dist/services/MetadataService.d.ts.map +0 -1
  130. package/dist/services/Profiles.d.ts.map +0 -1
  131. package/dist/services/index.d.ts.map +0 -1
  132. package/dist/utils/ConversionTypeHelpers.d.ts.map +0 -1
  133. package/dist/utils/Network.d.ts.map +0 -1
  134. package/dist/utils/helpers.d.ts.map +0 -1
  135. package/dist/utils/index.d.ts.map +0 -1
@@ -0,0 +1,113 @@
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
+ }
@@ -0,0 +1,14 @@
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 = {}));
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,120 @@
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
+ }
@@ -0,0 +1,57 @@
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 = {}));
@@ -0,0 +1,27 @@
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
+ }
@@ -0,0 +1,30 @@
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 = {}));
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,202 @@
1
+ import * as jose from 'jose';
2
+ export declare enum AuthRoles {
3
+ Admin = "admin"
4
+ }
5
+ export interface AuthUser {
6
+ userId: string;
7
+ address: string;
8
+ hash: string;
9
+ roles?: AuthRoles[];
10
+ nvmApiKey?: jose.JWTPayload;
11
+ }
12
+ export interface Request<G> {
13
+ hostname: string;
14
+ body?: G;
15
+ query?: G;
16
+ params?: G;
17
+ client: {
18
+ localPort: number;
19
+ };
20
+ protocol: string;
21
+ url: string;
22
+ user?: AuthUser;
23
+ }
24
+ export type DistinctPlans = {
25
+ page: number;
26
+ totalPages: number;
27
+ totalResults: number;
28
+ results: any[];
29
+ };
30
+ export declare enum PointsRulesCategory {
31
+ wau = "wau",
32
+ supply = "supply",
33
+ purchases = "purchases",
34
+ demand = "demand",
35
+ curation = "curation",
36
+ network = "network",
37
+ other = "other"
38
+ }
39
+ export declare enum PointsRulesRecurrency {
40
+ unlimitted = "unlimitted",
41
+ timeslimitted = "timeslimitted",
42
+ onlyonce = "onlyonce",
43
+ onceperitem = "onceperitem",
44
+ capday = "capday",
45
+ capweek = "capweek",
46
+ capmonth = "capmonth",
47
+ capyear = "capyear",
48
+ other = "other"
49
+ }
50
+ export declare enum PointsEventStatus {
51
+ Pending = "Pending",
52
+ Processed = "Processed",
53
+ Failed = "Failed",
54
+ Skipped = "Skipped",
55
+ Other = "Other"
56
+ }
57
+ export declare enum NotificationType {
58
+ SubscriptionReceived = "SubscriptionReceived",
59
+ SubscriptionPurchased = "SubscriptionPurchased",
60
+ AccountSetup = "AccountSetup",
61
+ EmailValidation = "EmailValidation",
62
+ Other = "Other"
63
+ }
64
+ export declare enum NotificationOriginator {
65
+ Nevermined = "Nevermined",
66
+ Other = "Other"
67
+ }
68
+ export declare enum NotificationReadStatus {
69
+ Pending = "Pending",
70
+ Read = "Read",
71
+ Deleted = "Deleted",
72
+ Other = "Other"
73
+ }
74
+ export declare enum NotificationDeliveryStatus {
75
+ Pending = "Pending",
76
+ Sent = "Sent",
77
+ Failed = "Failed",
78
+ NotRequired = "NotRequired",
79
+ Skipped = "Skipped",
80
+ Other = "Other"
81
+ }
82
+ export declare enum EmailChallengeStatus {
83
+ Pending = "Pending",
84
+ Validated = "Validated",
85
+ Failed = "Failed"
86
+ }
87
+ export declare enum PlanTransactionType {
88
+ Purchase = "Purchase",
89
+ Mint = "Mint",
90
+ Burn = "Burn",
91
+ Transfer = "Transfer",
92
+ Error = "Error",
93
+ Other = "Other"
94
+ }
95
+ export declare enum PlanTransactionPaymentType {
96
+ Crypto = "Crypto",
97
+ Fiat = "Fiat"
98
+ }
99
+ export declare enum CheckoutSessionType {
100
+ embedded = "embedded",
101
+ redirect = "redirect"
102
+ }
103
+ export declare enum WidgetLayout {
104
+ Horizontal = "Horizontal",
105
+ Vertical = "Vertical",
106
+ Reduced = "Reduced"
107
+ }
108
+ export declare enum StripeEventStatus {
109
+ Pending = "Pending",
110
+ Done = "Done",
111
+ Error = "Error",
112
+ Ignored = "Ignored",
113
+ Other = "Other"
114
+ }
115
+ export declare enum ResultType {
116
+ matrix = "matrix",
117
+ vector = "vector",
118
+ scalar = "scalar",
119
+ string = "string"
120
+ }
121
+ export declare enum ApiKeyTxType {
122
+ NewPlan = "NewPlan",
123
+ NewAgent = "NewAgent",
124
+ EditPlan = "EditPlan",
125
+ EditAgent = "EditAgent",
126
+ Purchase = "Purchase",
127
+ Download = "Download",
128
+ AccessHit = "AccessHit",
129
+ Mint = "Mint",
130
+ Burn = "Burn",
131
+ AgentExecution = "AgentExecution",
132
+ Other = "Other"
133
+ }
134
+ export interface Metric {
135
+ consumer: string;
136
+ did: string;
137
+ endpoint: string;
138
+ job: string;
139
+ namespace: string;
140
+ owner: string;
141
+ access_date: Date;
142
+ }
143
+ export interface AccessHistory {
144
+ date: string;
145
+ owner: string;
146
+ consumer: string;
147
+ endpoint: string;
148
+ }
149
+ export interface LineItem {
150
+ planId: string;
151
+ currency: string;
152
+ name: string;
153
+ price: number;
154
+ quantity: number;
155
+ description?: string;
156
+ imageUrl?: string;
157
+ }
158
+ export interface StripeLineItem {
159
+ price_data: {
160
+ currency: string;
161
+ product_data: {
162
+ name: string;
163
+ description?: string;
164
+ images?: string[];
165
+ metadata?: [string, string];
166
+ };
167
+ unit_amount_decimal: number;
168
+ };
169
+ quantity: number;
170
+ }
171
+ export declare const DEFAULT_PAGE = 1;
172
+ export declare const DEFAULT_OFFSET = 10000;
173
+ export interface PaginationOptions {
174
+ page: number;
175
+ skip: number;
176
+ offset: number;
177
+ sortBy?: string;
178
+ sortOrder?: 'asc' | 'desc';
179
+ }
180
+ export declare enum TaskLogLevel {
181
+ debug = "debug",
182
+ info = "info",
183
+ warn = "warn",
184
+ error = "error"
185
+ }
186
+ export declare enum PaymentPlanTypes {
187
+ expirable = "expirable",
188
+ credits = "credits"
189
+ }
190
+ export interface OrderResult {
191
+ txHash: `0x${string}`;
192
+ planId: bigint;
193
+ planReceiver: `0x${string}`;
194
+ currency: string;
195
+ totalAmount: bigint;
196
+ numCredits: bigint;
197
+ paymentMethod: PlanTransactionPaymentType;
198
+ tokenAddress?: `0x${string}`;
199
+ }
200
+ export declare const NVM_USERID_HEADER = "NVM-User-id";
201
+ export declare const NVM_COST_HEADER = "NVMCreditsConsumed";
202
+ export declare const DEFAULT_COST_CREDITS = "1";