@flyteorg/flyteidl 0.21.25 → 0.22.0

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.
@@ -3290,6 +3290,58 @@ export namespace flyteidl {
3290
3290
  public static verify(message: { [k: string]: any }): (string|null);
3291
3291
  }
3292
3292
 
3293
+ /** Properties of a TypeAnnotation. */
3294
+ interface ITypeAnnotation {
3295
+
3296
+ /** TypeAnnotation annotations */
3297
+ annotations?: (google.protobuf.IStruct|null);
3298
+ }
3299
+
3300
+ /** Represents a TypeAnnotation. */
3301
+ class TypeAnnotation implements ITypeAnnotation {
3302
+
3303
+ /**
3304
+ * Constructs a new TypeAnnotation.
3305
+ * @param [properties] Properties to set
3306
+ */
3307
+ constructor(properties?: flyteidl.core.ITypeAnnotation);
3308
+
3309
+ /** TypeAnnotation annotations. */
3310
+ public annotations?: (google.protobuf.IStruct|null);
3311
+
3312
+ /**
3313
+ * Creates a new TypeAnnotation instance using the specified properties.
3314
+ * @param [properties] Properties to set
3315
+ * @returns TypeAnnotation instance
3316
+ */
3317
+ public static create(properties?: flyteidl.core.ITypeAnnotation): flyteidl.core.TypeAnnotation;
3318
+
3319
+ /**
3320
+ * Encodes the specified TypeAnnotation message. Does not implicitly {@link flyteidl.core.TypeAnnotation.verify|verify} messages.
3321
+ * @param message TypeAnnotation message or plain object to encode
3322
+ * @param [writer] Writer to encode to
3323
+ * @returns Writer
3324
+ */
3325
+ public static encode(message: flyteidl.core.ITypeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
3326
+
3327
+ /**
3328
+ * Decodes a TypeAnnotation message from the specified reader or buffer.
3329
+ * @param reader Reader or buffer to decode from
3330
+ * @param [length] Message length if known beforehand
3331
+ * @returns TypeAnnotation
3332
+ * @throws {Error} If the payload is not a reader or valid buffer
3333
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3334
+ */
3335
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.TypeAnnotation;
3336
+
3337
+ /**
3338
+ * Verifies a TypeAnnotation message.
3339
+ * @param message Plain object to verify
3340
+ * @returns `null` if valid, otherwise the reason why it is not
3341
+ */
3342
+ public static verify(message: { [k: string]: any }): (string|null);
3343
+ }
3344
+
3293
3345
  /** Properties of a LiteralType. */
3294
3346
  interface ILiteralType {
3295
3347
 
@@ -3316,6 +3368,9 @@ export namespace flyteidl {
3316
3368
 
3317
3369
  /** LiteralType metadata */
3318
3370
  metadata?: (google.protobuf.IStruct|null);
3371
+
3372
+ /** LiteralType annotation */
3373
+ annotation?: (flyteidl.core.ITypeAnnotation|null);
3319
3374
  }
3320
3375
 
3321
3376
  /** Represents a LiteralType. */
@@ -3351,6 +3406,9 @@ export namespace flyteidl {
3351
3406
  /** LiteralType metadata. */
3352
3407
  public metadata?: (google.protobuf.IStruct|null);
3353
3408
 
3409
+ /** LiteralType annotation. */
3410
+ public annotation?: (flyteidl.core.ITypeAnnotation|null);
3411
+
3354
3412
  /** LiteralType type. */
3355
3413
  public type?: ("simple"|"schema"|"collectionType"|"mapValueType"|"blob"|"enumType"|"structuredDatasetType");
3356
3414
 
@@ -7856,6 +7856,118 @@ export const flyteidl = $root.flyteidl = (() => {
7856
7856
  return EnumType;
7857
7857
  })();
7858
7858
 
7859
+ core.TypeAnnotation = (function() {
7860
+
7861
+ /**
7862
+ * Properties of a TypeAnnotation.
7863
+ * @memberof flyteidl.core
7864
+ * @interface ITypeAnnotation
7865
+ * @property {google.protobuf.IStruct|null} [annotations] TypeAnnotation annotations
7866
+ */
7867
+
7868
+ /**
7869
+ * Constructs a new TypeAnnotation.
7870
+ * @memberof flyteidl.core
7871
+ * @classdesc Represents a TypeAnnotation.
7872
+ * @implements ITypeAnnotation
7873
+ * @constructor
7874
+ * @param {flyteidl.core.ITypeAnnotation=} [properties] Properties to set
7875
+ */
7876
+ function TypeAnnotation(properties) {
7877
+ if (properties)
7878
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7879
+ if (properties[keys[i]] != null)
7880
+ this[keys[i]] = properties[keys[i]];
7881
+ }
7882
+
7883
+ /**
7884
+ * TypeAnnotation annotations.
7885
+ * @member {google.protobuf.IStruct|null|undefined} annotations
7886
+ * @memberof flyteidl.core.TypeAnnotation
7887
+ * @instance
7888
+ */
7889
+ TypeAnnotation.prototype.annotations = null;
7890
+
7891
+ /**
7892
+ * Creates a new TypeAnnotation instance using the specified properties.
7893
+ * @function create
7894
+ * @memberof flyteidl.core.TypeAnnotation
7895
+ * @static
7896
+ * @param {flyteidl.core.ITypeAnnotation=} [properties] Properties to set
7897
+ * @returns {flyteidl.core.TypeAnnotation} TypeAnnotation instance
7898
+ */
7899
+ TypeAnnotation.create = function create(properties) {
7900
+ return new TypeAnnotation(properties);
7901
+ };
7902
+
7903
+ /**
7904
+ * Encodes the specified TypeAnnotation message. Does not implicitly {@link flyteidl.core.TypeAnnotation.verify|verify} messages.
7905
+ * @function encode
7906
+ * @memberof flyteidl.core.TypeAnnotation
7907
+ * @static
7908
+ * @param {flyteidl.core.ITypeAnnotation} message TypeAnnotation message or plain object to encode
7909
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7910
+ * @returns {$protobuf.Writer} Writer
7911
+ */
7912
+ TypeAnnotation.encode = function encode(message, writer) {
7913
+ if (!writer)
7914
+ writer = $Writer.create();
7915
+ if (message.annotations != null && message.hasOwnProperty("annotations"))
7916
+ $root.google.protobuf.Struct.encode(message.annotations, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
7917
+ return writer;
7918
+ };
7919
+
7920
+ /**
7921
+ * Decodes a TypeAnnotation message from the specified reader or buffer.
7922
+ * @function decode
7923
+ * @memberof flyteidl.core.TypeAnnotation
7924
+ * @static
7925
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7926
+ * @param {number} [length] Message length if known beforehand
7927
+ * @returns {flyteidl.core.TypeAnnotation} TypeAnnotation
7928
+ * @throws {Error} If the payload is not a reader or valid buffer
7929
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7930
+ */
7931
+ TypeAnnotation.decode = function decode(reader, length) {
7932
+ if (!(reader instanceof $Reader))
7933
+ reader = $Reader.create(reader);
7934
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.TypeAnnotation();
7935
+ while (reader.pos < end) {
7936
+ let tag = reader.uint32();
7937
+ switch (tag >>> 3) {
7938
+ case 1:
7939
+ message.annotations = $root.google.protobuf.Struct.decode(reader, reader.uint32());
7940
+ break;
7941
+ default:
7942
+ reader.skipType(tag & 7);
7943
+ break;
7944
+ }
7945
+ }
7946
+ return message;
7947
+ };
7948
+
7949
+ /**
7950
+ * Verifies a TypeAnnotation message.
7951
+ * @function verify
7952
+ * @memberof flyteidl.core.TypeAnnotation
7953
+ * @static
7954
+ * @param {Object.<string,*>} message Plain object to verify
7955
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
7956
+ */
7957
+ TypeAnnotation.verify = function verify(message) {
7958
+ if (typeof message !== "object" || message === null)
7959
+ return "object expected";
7960
+ if (message.annotations != null && message.hasOwnProperty("annotations")) {
7961
+ let error = $root.google.protobuf.Struct.verify(message.annotations);
7962
+ if (error)
7963
+ return "annotations." + error;
7964
+ }
7965
+ return null;
7966
+ };
7967
+
7968
+ return TypeAnnotation;
7969
+ })();
7970
+
7859
7971
  core.LiteralType = (function() {
7860
7972
 
7861
7973
  /**
@@ -7870,6 +7982,7 @@ export const flyteidl = $root.flyteidl = (() => {
7870
7982
  * @property {flyteidl.core.IEnumType|null} [enumType] LiteralType enumType
7871
7983
  * @property {flyteidl.core.IStructuredDatasetType|null} [structuredDatasetType] LiteralType structuredDatasetType
7872
7984
  * @property {google.protobuf.IStruct|null} [metadata] LiteralType metadata
7985
+ * @property {flyteidl.core.ITypeAnnotation|null} [annotation] LiteralType annotation
7873
7986
  */
7874
7987
 
7875
7988
  /**
@@ -7951,6 +8064,14 @@ export const flyteidl = $root.flyteidl = (() => {
7951
8064
  */
7952
8065
  LiteralType.prototype.metadata = null;
7953
8066
 
8067
+ /**
8068
+ * LiteralType annotation.
8069
+ * @member {flyteidl.core.ITypeAnnotation|null|undefined} annotation
8070
+ * @memberof flyteidl.core.LiteralType
8071
+ * @instance
8072
+ */
8073
+ LiteralType.prototype.annotation = null;
8074
+
7954
8075
  // OneOf field names bound to virtual getters and setters
7955
8076
  let $oneOfFields;
7956
8077
 
@@ -8005,6 +8126,8 @@ export const flyteidl = $root.flyteidl = (() => {
8005
8126
  $root.flyteidl.core.EnumType.encode(message.enumType, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
8006
8127
  if (message.structuredDatasetType != null && message.hasOwnProperty("structuredDatasetType"))
8007
8128
  $root.flyteidl.core.StructuredDatasetType.encode(message.structuredDatasetType, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
8129
+ if (message.annotation != null && message.hasOwnProperty("annotation"))
8130
+ $root.flyteidl.core.TypeAnnotation.encode(message.annotation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
8008
8131
  return writer;
8009
8132
  };
8010
8133
 
@@ -8050,6 +8173,9 @@ export const flyteidl = $root.flyteidl = (() => {
8050
8173
  case 6:
8051
8174
  message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32());
8052
8175
  break;
8176
+ case 9:
8177
+ message.annotation = $root.flyteidl.core.TypeAnnotation.decode(reader, reader.uint32());
8178
+ break;
8053
8179
  default:
8054
8180
  reader.skipType(tag & 7);
8055
8181
  break;
@@ -8153,6 +8279,11 @@ export const flyteidl = $root.flyteidl = (() => {
8153
8279
  if (error)
8154
8280
  return "metadata." + error;
8155
8281
  }
8282
+ if (message.annotation != null && message.hasOwnProperty("annotation")) {
8283
+ let error = $root.flyteidl.core.TypeAnnotation.verify(message.annotation);
8284
+ if (error)
8285
+ return "annotation." + error;
8286
+ }
8156
8287
  return null;
8157
8288
  };
8158
8289
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyteorg/flyteidl",
3
- "version": "0.21.25",
3
+ "version": "0.22.0",
4
4
  "description": "Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -2383,6 +2383,7 @@ Defines a strong type to allow type checking between interfaces.
2383
2383
  "enum_type", ":ref:`ref_flyteidl.core.EnumType`", "", "Defines an enum with pre-defined string values."
2384
2384
  "structured_dataset_type", ":ref:`ref_flyteidl.core.StructuredDatasetType`", "", "Generalized schema support"
2385
2385
  "metadata", ":ref:`ref_google.protobuf.Struct`", "", "This field contains type metadata that is descriptive of the type, but is NOT considered in type-checking. This might be used by consumers to identify special behavior or display extended information for the type."
2386
+ "annotation", ":ref:`ref_flyteidl.core.TypeAnnotation`", "", "This field contains arbitrary data that might have special semantic meaning for the client but does not effect internal flyte behavior."
2386
2387
 
2387
2388
 
2388
2389
 
@@ -2500,6 +2501,27 @@ StructuredDatasetType.DatasetColumn
2500
2501
 
2501
2502
 
2502
2503
 
2504
+
2505
+
2506
+ .. _ref_flyteidl.core.TypeAnnotation:
2507
+
2508
+ TypeAnnotation
2509
+ ------------------------------------------------------------------
2510
+
2511
+ TypeAnnotation encapsulates registration time information about a type. This can be used for various control-plane operations. TypeAnnotation will not be available at runtime when a task runs.
2512
+
2513
+
2514
+
2515
+ .. csv-table:: TypeAnnotation type fields
2516
+ :header: "Field", "Type", "Label", "Description"
2517
+ :widths: auto
2518
+
2519
+ "annotations", ":ref:`ref_google.protobuf.Struct`", "", "A arbitrary JSON payload to describe a type."
2520
+
2521
+
2522
+
2523
+
2524
+
2503
2525
 
2504
2526
 
2505
2527
 
@@ -90,6 +90,12 @@ message EnumType {
90
90
  repeated string values = 1;
91
91
  }
92
92
 
93
+ // TypeAnnotation encapsulates registration time information about a type. This can be used for various control-plane operations. TypeAnnotation will not be available at runtime when a task runs.
94
+ message TypeAnnotation {
95
+ // A arbitrary JSON payload to describe a type.
96
+ google.protobuf.Struct annotations = 1;
97
+ }
98
+
93
99
  // Defines a strong type to allow type checking between interfaces.
94
100
  message LiteralType {
95
101
  oneof type {
@@ -118,6 +124,10 @@ message LiteralType {
118
124
  // This field contains type metadata that is descriptive of the type, but is NOT considered in type-checking. This might be used by
119
125
  // consumers to identify special behavior or display extended information for the type.
120
126
  google.protobuf.Struct metadata = 6;
127
+
128
+ // This field contains arbitrary data that might have special semantic
129
+ // meaning for the client but does not effect internal flyte behavior.
130
+ TypeAnnotation annotation = 9;
121
131
  }
122
132
 
123
133
  // A reference to an output produced by a node. The type can be retrieved -and validated- from