소스 검색

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

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.