Преглед на файлове

types: Add storage ContentId types.

Shamil Gadelshin преди 3 години
родител
ревизия
bed3e7420a
променени са 6 файла, в които са добавени 12 реда и са изтрити 3 реда
  1. 1 1
      types/augment-codec/all.ts
  2. 0 0
      types/augment-codec/augment-types.ts
  3. 2 1
      types/augment/all/defs.json
  4. 3 0
      types/augment/all/types.ts
  5. 0 0
      types/augment/augment-types.ts
  6. 6 1
      types/src/storage.ts

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
types/augment-codec/all.ts


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
types/augment-codec/augment-types.ts


+ 2 - 1
types/augment/all/defs.json

@@ -1032,5 +1032,6 @@
         "deletionPrizeSourceAccountId": "GenericAccountId"
     },
     "StorageBucketIdSet": "BTreeSet<StorageBucketId>",
-    "DataObjectIdSet": "BTreeSet<DataObjectId>"
+    "DataObjectIdSet": "BTreeSet<DataObjectId>",
+    "ContentIdSet": "BTreeSet<Text>"
 }

+ 3 - 0
types/augment/all/types.ts

@@ -288,6 +288,9 @@ export interface ClassPropertyValue extends Null {}
 /** @name ContentId */
 export interface ContentId extends U8aFixed {}
 
+/** @name ContentIdSet */
+export interface ContentIdSet extends BTreeSet<Text> {}
+
 /** @name CreateEntityOperation */
 export interface CreateEntityOperation extends Struct {
   readonly class_id: ClassId;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
types/augment/augment-types.ts


+ 6 - 1
types/src/storage.ts

@@ -1,4 +1,4 @@
-import { Null, u64, Text, Vec, GenericAccountId as AccountId } from '@polkadot/types'
+import { Null, u64, Text, Vec, GenericAccountId as AccountId, BTreeSet } from '@polkadot/types'
 import { RegistryTypes } from '@polkadot/types/types'
 import { JoyBTreeSet, JoyEnum, JoyStructDecorated } from './common'
 
@@ -108,6 +108,9 @@ export class UploadParameters
   })
   implements UploadParametersType {}
 
+export class ContentId extends Text {}
+export class ContentIdSet extends BTreeSet.with(ContentId) {}
+
 export const storageTypes: RegistryTypes = {
   StorageBucketId,
   StorageBucketsPerBagValueConstraint,
@@ -127,5 +130,7 @@ export const storageTypes: RegistryTypes = {
   UploadParameters,
   StorageBucketIdSet,
   DataObjectIdSet,
+  ContentIdSet,
+  ContentId
 }
 export default storageTypes

Някои файлове не бяха показани, защото твърде много файлове са промени