@trash-streamers/contracts 1.1.63 → 1.1.64

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.
@@ -0,0 +1,213 @@
1
+ export declare const protobufPackage = "google.protobuf";
2
+ /**
3
+ * `FieldMask` represents a set of symbolic field paths, for example:
4
+ *
5
+ * paths: "f.a"
6
+ * paths: "f.b.d"
7
+ *
8
+ * Here `f` represents a field in some root message, `a` and `b`
9
+ * fields in the message found in `f`, and `d` a field found in the
10
+ * message in `f.b`.
11
+ *
12
+ * Field masks are used to specify a subset of fields that should be
13
+ * returned by a get operation or modified by an update operation.
14
+ * Field masks also have a custom JSON encoding (see below).
15
+ *
16
+ * # Field Masks in Projections
17
+ *
18
+ * When used in the context of a projection, a response message or
19
+ * sub-message is filtered by the API to only contain those fields as
20
+ * specified in the mask. For example, if the mask in the previous
21
+ * example is applied to a response message as follows:
22
+ *
23
+ * f {
24
+ * a : 22
25
+ * b {
26
+ * d : 1
27
+ * x : 2
28
+ * }
29
+ * y : 13
30
+ * }
31
+ * z: 8
32
+ *
33
+ * The result will not contain specific values for fields x,y and z
34
+ * (their value will be set to the default, and omitted in proto text
35
+ * output):
36
+ *
37
+ * f {
38
+ * a : 22
39
+ * b {
40
+ * d : 1
41
+ * }
42
+ * }
43
+ *
44
+ * A repeated field is not allowed except at the last position of a
45
+ * paths string.
46
+ *
47
+ * If a FieldMask object is not present in a get operation, the
48
+ * operation applies to all fields (as if a FieldMask of all fields
49
+ * had been specified).
50
+ *
51
+ * Note that a field mask does not necessarily apply to the
52
+ * top-level response message. In case of a REST get operation, the
53
+ * field mask applies directly to the response, but in case of a REST
54
+ * list operation, the mask instead applies to each individual message
55
+ * in the returned resource list. In case of a REST custom method,
56
+ * other definitions may be used. Where the mask applies will be
57
+ * clearly documented together with its declaration in the API. In
58
+ * any case, the effect on the returned resource/resources is required
59
+ * behavior for APIs.
60
+ *
61
+ * # Field Masks in Update Operations
62
+ *
63
+ * A field mask in update operations specifies which fields of the
64
+ * targeted resource are going to be updated. The API is required
65
+ * to only change the values of the fields as specified in the mask
66
+ * and leave the others untouched. If a resource is passed in to
67
+ * describe the updated values, the API ignores the values of all
68
+ * fields not covered by the mask.
69
+ *
70
+ * If a repeated field is specified for an update operation, new values will
71
+ * be appended to the existing repeated field in the target resource. Note that
72
+ * a repeated field is only allowed in the last position of a `paths` string.
73
+ *
74
+ * If a sub-message is specified in the last position of the field mask for an
75
+ * update operation, then new value will be merged into the existing sub-message
76
+ * in the target resource.
77
+ *
78
+ * For example, given the target message:
79
+ *
80
+ * f {
81
+ * b {
82
+ * d: 1
83
+ * x: 2
84
+ * }
85
+ * c: [1]
86
+ * }
87
+ *
88
+ * And an update message:
89
+ *
90
+ * f {
91
+ * b {
92
+ * d: 10
93
+ * }
94
+ * c: [2]
95
+ * }
96
+ *
97
+ * then if the field mask is:
98
+ *
99
+ * paths: ["f.b", "f.c"]
100
+ *
101
+ * then the result will be:
102
+ *
103
+ * f {
104
+ * b {
105
+ * d: 10
106
+ * x: 2
107
+ * }
108
+ * c: [1, 2]
109
+ * }
110
+ *
111
+ * An implementation may provide options to override this default behavior for
112
+ * repeated and message fields.
113
+ *
114
+ * In order to reset a field's value to the default, the field must
115
+ * be in the mask and set to the default value in the provided resource.
116
+ * Hence, in order to reset all fields of a resource, provide a default
117
+ * instance of the resource and set all fields in the mask, or do
118
+ * not provide a mask as described below.
119
+ *
120
+ * If a field mask is not present on update, the operation applies to
121
+ * all fields (as if a field mask of all fields has been specified).
122
+ * Note that in the presence of schema evolution, this may mean that
123
+ * fields the client does not know and has therefore not filled into
124
+ * the request will be reset to their default. If this is unwanted
125
+ * behavior, a specific service may require a client to always specify
126
+ * a field mask, producing an error if not.
127
+ *
128
+ * As with get operations, the location of the resource which
129
+ * describes the updated values in the request message depends on the
130
+ * operation kind. In any case, the effect of the field mask is
131
+ * required to be honored by the API.
132
+ *
133
+ * ## Considerations for HTTP REST
134
+ *
135
+ * The HTTP kind of an update operation which uses a field mask must
136
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
137
+ * (PUT must only be used for full updates).
138
+ *
139
+ * # JSON Encoding of Field Masks
140
+ *
141
+ * In JSON, a field mask is encoded as a single string where paths are
142
+ * separated by a comma. Fields name in each path are converted
143
+ * to/from lower-camel naming conventions.
144
+ *
145
+ * As an example, consider the following message declarations:
146
+ *
147
+ * message Profile {
148
+ * User user = 1;
149
+ * Photo photo = 2;
150
+ * }
151
+ * message User {
152
+ * string display_name = 1;
153
+ * string address = 2;
154
+ * }
155
+ *
156
+ * In proto a field mask for `Profile` may look as such:
157
+ *
158
+ * mask {
159
+ * paths: "user.display_name"
160
+ * paths: "photo"
161
+ * }
162
+ *
163
+ * In JSON, the same mask is represented as below:
164
+ *
165
+ * {
166
+ * mask: "user.displayName,photo"
167
+ * }
168
+ *
169
+ * # Field Masks and Oneof Fields
170
+ *
171
+ * Field masks treat fields in oneofs just as regular fields. Consider the
172
+ * following message:
173
+ *
174
+ * message SampleMessage {
175
+ * oneof test_oneof {
176
+ * string name = 4;
177
+ * SubMessage sub_message = 9;
178
+ * }
179
+ * }
180
+ *
181
+ * The field mask can be:
182
+ *
183
+ * mask {
184
+ * paths: "name"
185
+ * }
186
+ *
187
+ * Or:
188
+ *
189
+ * mask {
190
+ * paths: "sub_message"
191
+ * }
192
+ *
193
+ * Note that oneof type names ("test_oneof" in this case) cannot be used in
194
+ * paths.
195
+ *
196
+ * ## Field Mask Verification
197
+ *
198
+ * The implementation of any API method which has a FieldMask type field in the
199
+ * request should verify the included field paths, and return an
200
+ * `INVALID_ARGUMENT` error if any path is unmappable.
201
+ */
202
+ export interface FieldMask {
203
+ /** The set of field mask paths. */
204
+ paths: string[];
205
+ }
206
+ export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
207
+ export declare const FieldMask: MessageFns<FieldMask> & FieldMaskWrapperFns;
208
+ export interface MessageFns<T> {
209
+ }
210
+ export interface FieldMaskWrapperFns {
211
+ wrap(paths: string[]): FieldMask;
212
+ unwrap(message: FieldMask): string[];
213
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.1
5
+ // protoc v6.33.5
6
+ // source: google/protobuf/field_mask.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.FieldMask = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "google.protobuf";
11
+ exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
12
+ function createBaseFieldMask() {
13
+ return { paths: [] };
14
+ }
15
+ exports.FieldMask = {
16
+ wrap(paths) {
17
+ const result = createBaseFieldMask();
18
+ result.paths = paths;
19
+ return result;
20
+ },
21
+ unwrap(message) {
22
+ return message.paths;
23
+ },
24
+ };
@@ -41,6 +41,15 @@ export interface SettingVideoBySlugRequest {
41
41
  export interface SettingVideoBySlugResponce {
42
42
  video: Video | undefined;
43
43
  }
44
+ export interface UpdateSettingsVideoRequst {
45
+ slug: string;
46
+ ownerId: string;
47
+ video: Video | undefined;
48
+ updateMask: string[] | undefined;
49
+ }
50
+ export interface UpdateSettingsVideoResponse {
51
+ video: Video | undefined;
52
+ }
44
53
  export interface Video {
45
54
  id: string;
46
55
  ownerId: string;
@@ -61,12 +70,14 @@ export interface VideoServiceClient {
61
70
  getAllVideosOwner(request: GetAllVideosOwnerRequest): Observable<GetAllVideosOwnerResponse>;
62
71
  publicVideoBySlug(request: PublicVideoBySlugRequest): Observable<PublicVideoBySlugResponce>;
63
72
  settingVideoBySlug(request: SettingVideoBySlugRequest): Observable<SettingVideoBySlugResponce>;
73
+ updateSettingsVideo(request: UpdateSettingsVideoRequst): Observable<UpdateSettingsVideoResponse>;
64
74
  }
65
75
  export interface VideoServiceController {
66
76
  confirmVideoUpload(request: ConfirmVideoUploadRequest): Promise<ConfirmVideoUploadResponse> | Observable<ConfirmVideoUploadResponse> | ConfirmVideoUploadResponse;
67
77
  getAllVideosOwner(request: GetAllVideosOwnerRequest): Promise<GetAllVideosOwnerResponse> | Observable<GetAllVideosOwnerResponse> | GetAllVideosOwnerResponse;
68
78
  publicVideoBySlug(request: PublicVideoBySlugRequest): Promise<PublicVideoBySlugResponce> | Observable<PublicVideoBySlugResponce> | PublicVideoBySlugResponce;
69
79
  settingVideoBySlug(request: SettingVideoBySlugRequest): Promise<SettingVideoBySlugResponce> | Observable<SettingVideoBySlugResponce> | SettingVideoBySlugResponce;
80
+ updateSettingsVideo(request: UpdateSettingsVideoRequst): Promise<UpdateSettingsVideoResponse> | Observable<UpdateSettingsVideoResponse> | UpdateSettingsVideoResponse;
70
81
  }
71
82
  export declare function VideoServiceControllerMethods(): (constructor: Function) => void;
72
83
  export declare const VIDEO_SERVICE_NAME = "VideoService";
@@ -42,6 +42,7 @@ function VideoServiceControllerMethods() {
42
42
  "getAllVideosOwner",
43
43
  "publicVideoBySlug",
44
44
  "settingVideoBySlug",
45
+ "updateSettingsVideo",
45
46
  ];
46
47
  for (const method of grpcMethods) {
47
48
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
package/proto/video.proto CHANGED
@@ -3,12 +3,14 @@ syntax = "proto3";
3
3
  package video.v1;
4
4
 
5
5
  import "google/protobuf/timestamp.proto";
6
+ import "google/protobuf/field_mask.proto";
6
7
  service VideoService {
7
8
  rpc ConfirmVideoUpload (ConfirmVideoUploadRequest) returns (ConfirmVideoUploadResponse);
8
9
 
9
10
  rpc GetAllVideosOwner (GetAllVideosOwnerRequest) returns (GetAllVideosOwnerResponse);
10
11
  rpc PublicVideoBySlug (PublicVideoBySlugRequest) returns (PublicVideoBySlugResponce);
11
12
  rpc SettingVideoBySlug (SettingVideoBySlugRequest) returns (SettingVideoBySlugResponce);
13
+ rpc UpdateSettingsVideo (UpdateSettingsVideoRequst) returns (UpdateSettingsVideoResponse);
12
14
  }
13
15
 
14
16
  message ConfirmVideoUploadRequest {
@@ -46,6 +48,17 @@ message SettingVideoBySlugRequest {
46
48
  message SettingVideoBySlugResponce{
47
49
  Video video =1;
48
50
  }
51
+
52
+ message UpdateSettingsVideoRequst {
53
+ string slug = 1;
54
+ string owner_id = 2;
55
+ Video video = 3;
56
+ google.protobuf.FieldMask update_mask = 4;
57
+ }
58
+
59
+ message UpdateSettingsVideoResponse {
60
+ Video video = 1;
61
+ }
49
62
  message Video {
50
63
  string id = 1;
51
64
  string owner_id = 2;