@barumetric/contracts 1.4.17 → 1.4.19

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 (75) hide show
  1. package/gen/ts/google/protobuf/empty.ts +2 -2
  2. package/gen/ts/google/protobuf/timestamp.ts +10 -9
  3. package/package.json +1 -1
  4. package/proto/account.proto +74 -74
  5. package/proto/auth.proto +153 -153
  6. package/proto/balance.proto +29 -29
  7. package/proto/images.proto +29 -29
  8. package/proto/listings.proto +126 -126
  9. package/proto/messages.proto +153 -153
  10. package/proto/session.proto +61 -61
  11. package/dist/events/account/email-changed.interface.d.ts +0 -4
  12. package/dist/events/account/email-changed.interface.js +0 -2
  13. package/dist/events/account/index.d.ts +0 -2
  14. package/dist/events/account/index.js +0 -18
  15. package/dist/events/account/phone-changed.interface.d.ts +0 -4
  16. package/dist/events/account/phone-changed.interface.js +0 -2
  17. package/dist/events/auth/index.d.ts +0 -1
  18. package/dist/events/auth/index.js +0 -17
  19. package/dist/events/auth/otp-requested.interface.d.ts +0 -5
  20. package/dist/events/auth/otp-requested.interface.js +0 -2
  21. package/dist/events/balance/index.d.ts +0 -1
  22. package/dist/events/balance/index.js +0 -17
  23. package/dist/events/balance/top-up.interface.d.ts +0 -5
  24. package/dist/events/balance/top-up.interface.js +0 -2
  25. package/dist/events/images/index.d.ts +0 -1
  26. package/dist/events/images/index.js +0 -17
  27. package/dist/events/images/process-images.interface.d.ts +0 -9
  28. package/dist/events/images/process-images.interface.js +0 -2
  29. package/dist/events/index.d.ts +0 -7
  30. package/dist/events/index.js +0 -23
  31. package/dist/events/listings/create-listing.interface.d.ts +0 -16
  32. package/dist/events/listings/create-listing.interface.js +0 -2
  33. package/dist/events/listings/delete-listing.interface.d.ts +0 -4
  34. package/dist/events/listings/delete-listing.interface.js +0 -2
  35. package/dist/events/listings/index.d.ts +0 -3
  36. package/dist/events/listings/index.js +0 -19
  37. package/dist/events/listings/update-listing.interface.d.ts +0 -17
  38. package/dist/events/listings/update-listing.interface.js +0 -2
  39. package/dist/events/messages/index.d.ts +0 -5
  40. package/dist/events/messages/index.js +0 -21
  41. package/dist/events/messages/mark-as-read-command.interface.d.ts +0 -9
  42. package/dist/events/messages/mark-as-read-command.interface.js +0 -2
  43. package/dist/events/messages/message-read-event.interface.d.ts +0 -13
  44. package/dist/events/messages/message-read-event.interface.js +0 -2
  45. package/dist/events/messages/message-sent-event.interface.d.ts +0 -32
  46. package/dist/events/messages/message-sent-event.interface.js +0 -2
  47. package/dist/events/messages/message-types.d.ts +0 -1
  48. package/dist/events/messages/message-types.js +0 -2
  49. package/dist/events/messages/send-message-command.interface.d.ts +0 -17
  50. package/dist/events/messages/send-message-command.interface.js +0 -2
  51. package/dist/events/payment/index.d.ts +0 -2
  52. package/dist/events/payment/index.js +0 -18
  53. package/dist/events/payment/payment-failed.interface.d.ts +0 -6
  54. package/dist/events/payment/payment-failed.interface.js +0 -2
  55. package/dist/events/payment/payment-succeeded.interface.d.ts +0 -6
  56. package/dist/events/payment/payment-succeeded.interface.js +0 -2
  57. package/dist/index.d.ts +0 -2
  58. package/dist/index.js +0 -18
  59. package/dist/proto/index.d.ts +0 -1
  60. package/dist/proto/index.js +0 -17
  61. package/dist/proto/paths.d.ts +0 -14
  62. package/dist/proto/paths.js +0 -18
  63. package/gen/ts/account.ts +0 -133
  64. package/gen/ts/auth.ts +0 -236
  65. package/gen/ts/balance.ts +0 -67
  66. package/gen/ts/categories.ts +0 -354
  67. package/gen/ts/google/protobuf/struct.ts +0 -197
  68. package/gen/ts/images.ts +0 -60
  69. package/gen/ts/listings.ts +0 -202
  70. package/gen/ts/media.ts +0 -77
  71. package/gen/ts/messages.ts +0 -211
  72. package/gen/ts/payment.ts +0 -190
  73. package/gen/ts/presence.ts +0 -127
  74. package/gen/ts/session.ts +0 -110
  75. package/gen/ts/users.ts +0 -277
@@ -1,197 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.1
4
- // protoc v3.21.12
5
- // source: google/protobuf/struct.proto
6
-
7
- /* eslint-disable */
8
- import { wrappers } from "protobufjs";
9
-
10
- export const protobufPackage = "google.protobuf";
11
-
12
- /**
13
- * `NullValue` is a singleton enumeration to represent the null value for the
14
- * `Value` type union.
15
- *
16
- * The JSON representation for `NullValue` is JSON `null`.
17
- */
18
- export enum NullValue {
19
- /** NULL_VALUE - Null value. */
20
- NULL_VALUE = 0,
21
- UNRECOGNIZED = -1,
22
- }
23
-
24
- /**
25
- * `Struct` represents a structured data value, consisting of fields
26
- * which map to dynamically typed values. In some languages, `Struct`
27
- * might be supported by a native representation. For example, in
28
- * scripting languages like JS a struct is represented as an
29
- * object. The details of that representation are described together
30
- * with the proto support for the language.
31
- *
32
- * The JSON representation for `Struct` is JSON object.
33
- */
34
- export interface Struct {
35
- /** Unordered map of dynamically typed values. */
36
- fields: { [key: string]: any | undefined };
37
- }
38
-
39
- export interface Struct_FieldsEntry {
40
- key: string;
41
- value: any | undefined;
42
- }
43
-
44
- /**
45
- * `Value` represents a dynamically typed value which can be either
46
- * null, a number, a string, a boolean, a recursive struct value, or a
47
- * list of values. A producer of value is expected to set one of these
48
- * variants. Absence of any variant indicates an error.
49
- *
50
- * The JSON representation for `Value` is JSON value.
51
- */
52
- export interface Value {
53
- /** Represents a null value. */
54
- nullValue?:
55
- | NullValue
56
- | undefined;
57
- /** Represents a double value. */
58
- numberValue?:
59
- | number
60
- | undefined;
61
- /** Represents a string value. */
62
- stringValue?:
63
- | string
64
- | undefined;
65
- /** Represents a boolean value. */
66
- boolValue?:
67
- | boolean
68
- | undefined;
69
- /** Represents a structured value. */
70
- structValue?:
71
- | { [key: string]: any }
72
- | undefined;
73
- /** Represents a repeated `Value`. */
74
- listValue?: Array<any> | undefined;
75
- }
76
-
77
- /**
78
- * `ListValue` is a wrapper around a repeated field of values.
79
- *
80
- * The JSON representation for `ListValue` is JSON array.
81
- */
82
- export interface ListValue {
83
- /** Repeated field of dynamically typed values. */
84
- values: any[];
85
- }
86
-
87
- export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
88
-
89
- function createBaseStruct(): Struct {
90
- return { fields: {} };
91
- }
92
-
93
- export const Struct: MessageFns<Struct> & StructWrapperFns = {
94
- wrap(object: { [key: string]: any } | undefined): Struct {
95
- const struct = createBaseStruct();
96
-
97
- if (object !== undefined) {
98
- for (const key of globalThis.Object.keys(object)) {
99
- struct.fields[key] = Value.wrap(object[key]);
100
- }
101
- }
102
- return struct;
103
- },
104
-
105
- unwrap(message: Struct): { [key: string]: any } {
106
- const object: { [key: string]: any } = {};
107
- if (message.fields) {
108
- for (const key of globalThis.Object.keys(message.fields)) {
109
- object[key] = Value.unwrap(message.fields[key]);
110
- }
111
- }
112
- return object;
113
- },
114
- };
115
-
116
- function createBaseValue(): Value {
117
- return {};
118
- }
119
-
120
- export const Value: MessageFns<Value> & AnyValueWrapperFns = {
121
- wrap(value: any): Value {
122
- const result = {} as any;
123
- if (value === null) {
124
- result.nullValue = NullValue.NULL_VALUE;
125
- } else if (typeof value === "boolean") {
126
- result.boolValue = value;
127
- } else if (typeof value === "number") {
128
- result.numberValue = value;
129
- } else if (typeof value === "string") {
130
- result.stringValue = value;
131
- } else if (globalThis.Array.isArray(value)) {
132
- result.listValue = ListValue.wrap(value);
133
- } else if (typeof value === "object") {
134
- result.structValue = Struct.wrap(value);
135
- } else if (typeof value !== "undefined") {
136
- throw new globalThis.Error("Unsupported any value type: " + typeof value);
137
- }
138
- return result;
139
- },
140
-
141
- unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined {
142
- if (message?.hasOwnProperty("stringValue") && message.stringValue !== undefined) {
143
- return message.stringValue;
144
- } else if (message?.hasOwnProperty("numberValue") && message?.numberValue !== undefined) {
145
- return message.numberValue;
146
- } else if (message?.hasOwnProperty("boolValue") && message?.boolValue !== undefined) {
147
- return message.boolValue;
148
- } else if (message?.hasOwnProperty("structValue") && message?.structValue !== undefined) {
149
- return Struct.unwrap(message.structValue as any);
150
- } else if (message?.hasOwnProperty("listValue") && message?.listValue !== undefined) {
151
- return ListValue.unwrap(message.listValue);
152
- } else if (message?.hasOwnProperty("nullValue") && message?.nullValue !== undefined) {
153
- return null;
154
- }
155
- return undefined;
156
- },
157
- };
158
-
159
- function createBaseListValue(): ListValue {
160
- return { values: [] };
161
- }
162
-
163
- export const ListValue: MessageFns<ListValue> & ListValueWrapperFns = {
164
- wrap(array: Array<any> | undefined): ListValue {
165
- const result = createBaseListValue();
166
- result.values = (array ?? []).map(Value.wrap);
167
- return result;
168
- },
169
-
170
- unwrap(message: ListValue): Array<any> {
171
- if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
172
- return message.values.map(Value.unwrap);
173
- } else {
174
- return message as any;
175
- }
176
- },
177
- };
178
-
179
- wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
180
-
181
- export interface MessageFns<T> {
182
- }
183
-
184
- export interface StructWrapperFns {
185
- wrap(object: { [key: string]: any } | undefined): Struct;
186
- unwrap(message: Struct): { [key: string]: any };
187
- }
188
-
189
- export interface AnyValueWrapperFns {
190
- wrap(value: any): Value;
191
- unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
192
- }
193
-
194
- export interface ListValueWrapperFns {
195
- wrap(array: Array<any> | undefined): ListValue;
196
- unwrap(message: ListValue): Array<any>;
197
- }
package/gen/ts/images.ts DELETED
@@ -1,60 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.1
4
- // protoc v3.21.12
5
- // source: images.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
- import { Timestamp } from "./google/protobuf/timestamp";
11
-
12
- export const protobufPackage = "images.v1";
13
-
14
- export interface GetStatusImagesRequest {
15
- listingId: string;
16
- }
17
-
18
- export interface GetStatusImagesResponse {
19
- listingId: string;
20
- status: string;
21
- imageCount: number;
22
- results: ImageProcessing[];
23
- createdAt: Timestamp | undefined;
24
- completedAt: Timestamp | undefined;
25
- }
26
-
27
- export interface ImageProcessing {
28
- imageNumber: number;
29
- status: string;
30
- error: string;
31
- }
32
-
33
- export const IMAGES_V1_PACKAGE_NAME = "images.v1";
34
-
35
- export interface ImagesServiceClient {
36
- getStatusImages(request: GetStatusImagesRequest): Observable<GetStatusImagesResponse>;
37
- }
38
-
39
- export interface ImagesServiceController {
40
- getStatusImages(
41
- request: GetStatusImagesRequest,
42
- ): Promise<GetStatusImagesResponse> | Observable<GetStatusImagesResponse> | GetStatusImagesResponse;
43
- }
44
-
45
- export function ImagesServiceControllerMethods() {
46
- return function (constructor: Function) {
47
- const grpcMethods: string[] = ["getStatusImages"];
48
- for (const method of grpcMethods) {
49
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
50
- GrpcMethod("ImagesService", method)(constructor.prototype[method], method, descriptor);
51
- }
52
- const grpcStreamMethods: string[] = [];
53
- for (const method of grpcStreamMethods) {
54
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
55
- GrpcStreamMethod("ImagesService", method)(constructor.prototype[method], method, descriptor);
56
- }
57
- };
58
- }
59
-
60
- export const IMAGES_SERVICE_NAME = "ImagesService";
@@ -1,202 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.1
4
- // protoc v3.21.12
5
- // source: listings.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { wrappers } from "protobufjs";
10
- import { Observable } from "rxjs";
11
- import { Struct } from "./google/protobuf/struct";
12
-
13
- export const protobufPackage = "listings.v1";
14
-
15
- /** Статусы объявлений */
16
- export enum ListingStatus {
17
- UNSPECIFIED = 0,
18
- /** DRAFT - Черновик */
19
- DRAFT = 1,
20
- /** ACTIVE - Активные */
21
- ACTIVE = 2,
22
- /** UNPUBLISHED - Неопубликованные */
23
- UNPUBLISHED = 3,
24
- /** WITH_ERRORS - С ошибками */
25
- WITH_ERRORS = 4,
26
- /** ARCHIVED - Архив */
27
- ARCHIVED = 5,
28
- /** DELETED - Удаленные */
29
- DELETED = 6,
30
- /** PENDING_REVIEW - На модерации (внутренний) */
31
- PENDING_REVIEW = 7,
32
- /** REJECTED - Отклонено (внутренний) */
33
- REJECTED = 8,
34
- /** SUSPENDED - Приостановлено (внутренний) */
35
- SUSPENDED = 9,
36
- UNRECOGNIZED = -1,
37
- }
38
-
39
- export interface CreateListingRequest {
40
- userId: string;
41
- title: string;
42
- description?: string | undefined;
43
- price?: number | undefined;
44
- categoryId: string;
45
- latitude?: number | undefined;
46
- longitude?: number | undefined;
47
- videoUrl?: string | undefined;
48
- status?: string | undefined;
49
- attributes?: { [key: string]: any } | undefined;
50
- }
51
-
52
- export interface CreateListingResponse {
53
- id: string;
54
- }
55
-
56
- export interface UpdateListingRequest {
57
- id: string;
58
- userId: string;
59
- title: string;
60
- description?: string | undefined;
61
- price?: number | undefined;
62
- categoryId: string;
63
- latitude?: number | undefined;
64
- longitude?: number | undefined;
65
- videoUrl?: string | undefined;
66
- status?: string | undefined;
67
- attributes?: { [key: string]: any } | undefined;
68
- }
69
-
70
- export interface UpdateListingResponse {
71
- id: string;
72
- }
73
-
74
- export interface GetListingRequest {
75
- id: string;
76
- }
77
-
78
- export interface DeleteListingRequest {
79
- id: string;
80
- userId: string;
81
- }
82
-
83
- export interface DeleteListingResponse {
84
- ok: boolean;
85
- }
86
-
87
- export interface GetListingsByUserRequest {
88
- userId: string;
89
- status?: ListingStatus | undefined;
90
- take?: number | undefined;
91
- skip?: number | undefined;
92
- }
93
-
94
- export interface GetListingsByCategoryRequest {
95
- categoryId: string;
96
- status?: ListingStatus | undefined;
97
- }
98
-
99
- /** Ответы */
100
- export interface GetListingResponse {
101
- listing: Listing | undefined;
102
- }
103
-
104
- export interface GetListingsByUserResponse {
105
- listings: Listing[];
106
- total: number;
107
- }
108
-
109
- export interface GetListingsByCategoryResponse {
110
- listings: Listing[];
111
- }
112
-
113
- /** Модели */
114
- export interface Listing {
115
- id: string;
116
- title: string;
117
- description?: string | undefined;
118
- price?: number | undefined;
119
- categoryId: string;
120
- userId: string;
121
- latitude?: number | undefined;
122
- longitude?: number | undefined;
123
- videoUrl?: string | undefined;
124
- status: ListingStatus;
125
- viewsCount: number;
126
- favoritesCount: number;
127
- imagesCount: number;
128
- /** JSON строка */
129
- attributes: string;
130
- createdAt: string;
131
- updatedAt: string;
132
- publishedAt?: string | undefined;
133
- deletedAt?: string | undefined;
134
- }
135
-
136
- export const LISTINGS_V1_PACKAGE_NAME = "listings.v1";
137
-
138
- wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
139
-
140
- export interface ListingsServiceClient {
141
- getListing(request: GetListingRequest): Observable<GetListingResponse>;
142
-
143
- getListingsByUser(request: GetListingsByUserRequest): Observable<GetListingsByUserResponse>;
144
-
145
- getListingsByCategory(request: GetListingsByCategoryRequest): Observable<GetListingsByCategoryResponse>;
146
-
147
- createListing(request: CreateListingRequest): Observable<CreateListingResponse>;
148
-
149
- updateListing(request: UpdateListingRequest): Observable<UpdateListingResponse>;
150
-
151
- deleteListing(request: DeleteListingRequest): Observable<DeleteListingResponse>;
152
- }
153
-
154
- export interface ListingsServiceController {
155
- getListing(
156
- request: GetListingRequest,
157
- ): Promise<GetListingResponse> | Observable<GetListingResponse> | GetListingResponse;
158
-
159
- getListingsByUser(
160
- request: GetListingsByUserRequest,
161
- ): Promise<GetListingsByUserResponse> | Observable<GetListingsByUserResponse> | GetListingsByUserResponse;
162
-
163
- getListingsByCategory(
164
- request: GetListingsByCategoryRequest,
165
- ): Promise<GetListingsByCategoryResponse> | Observable<GetListingsByCategoryResponse> | GetListingsByCategoryResponse;
166
-
167
- createListing(
168
- request: CreateListingRequest,
169
- ): Promise<CreateListingResponse> | Observable<CreateListingResponse> | CreateListingResponse;
170
-
171
- updateListing(
172
- request: UpdateListingRequest,
173
- ): Promise<UpdateListingResponse> | Observable<UpdateListingResponse> | UpdateListingResponse;
174
-
175
- deleteListing(
176
- request: DeleteListingRequest,
177
- ): Promise<DeleteListingResponse> | Observable<DeleteListingResponse> | DeleteListingResponse;
178
- }
179
-
180
- export function ListingsServiceControllerMethods() {
181
- return function (constructor: Function) {
182
- const grpcMethods: string[] = [
183
- "getListing",
184
- "getListingsByUser",
185
- "getListingsByCategory",
186
- "createListing",
187
- "updateListing",
188
- "deleteListing",
189
- ];
190
- for (const method of grpcMethods) {
191
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
192
- GrpcMethod("ListingsService", method)(constructor.prototype[method], method, descriptor);
193
- }
194
- const grpcStreamMethods: string[] = [];
195
- for (const method of grpcStreamMethods) {
196
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
197
- GrpcStreamMethod("ListingsService", method)(constructor.prototype[method], method, descriptor);
198
- }
199
- };
200
- }
201
-
202
- export const LISTINGS_SERVICE_NAME = "ListingsService";
package/gen/ts/media.ts DELETED
@@ -1,77 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.1
4
- // protoc v3.21.12
5
- // source: media.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
-
11
- export const protobufPackage = "media.v1";
12
-
13
- export interface UploadRequest {
14
- fileName: string;
15
- folder: string;
16
- contentType: string;
17
- data: Uint8Array;
18
- resizeWidth?: number | undefined;
19
- resizeHeight?: number | undefined;
20
- watermark?: boolean | undefined;
21
- }
22
-
23
- export interface UploadResponse {
24
- key: string;
25
- }
26
-
27
- export interface GetRequest {
28
- key: string;
29
- }
30
-
31
- export interface GetResponse {
32
- data: Uint8Array;
33
- contentType: string;
34
- }
35
-
36
- export interface DeleteRequest {
37
- key: string;
38
- }
39
-
40
- export interface DeleteResponse {
41
- ok: boolean;
42
- }
43
-
44
- export const MEDIA_V1_PACKAGE_NAME = "media.v1";
45
-
46
- export interface MediaServiceClient {
47
- upload(request: UploadRequest): Observable<UploadResponse>;
48
-
49
- get(request: GetRequest): Observable<GetResponse>;
50
-
51
- delete(request: DeleteRequest): Observable<DeleteResponse>;
52
- }
53
-
54
- export interface MediaServiceController {
55
- upload(request: UploadRequest): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
56
-
57
- get(request: GetRequest): Promise<GetResponse> | Observable<GetResponse> | GetResponse;
58
-
59
- delete(request: DeleteRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
60
- }
61
-
62
- export function MediaServiceControllerMethods() {
63
- return function (constructor: Function) {
64
- const grpcMethods: string[] = ["upload", "get", "delete"];
65
- for (const method of grpcMethods) {
66
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
67
- GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
68
- }
69
- const grpcStreamMethods: string[] = [];
70
- for (const method of grpcStreamMethods) {
71
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
72
- GrpcStreamMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
73
- }
74
- };
75
- }
76
-
77
- export const MEDIA_SERVICE_NAME = "MediaService";