@chaty-app/proto 0.1.12 → 0.1.14

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 (101) hide show
  1. package/README.md +21 -9
  2. package/dist/node/index.d.ts +1 -1
  3. package/dist/node/index.d.ts.map +1 -1
  4. package/dist/node/index.js +1 -1
  5. package/dist/node/index.js.map +1 -1
  6. package/dist/node/service/index.d.ts.map +1 -0
  7. package/dist/node/service/index.js.map +1 -0
  8. package/dist/node/service/v1/index.d.ts +4 -0
  9. package/dist/node/service/v1/index.d.ts.map +1 -0
  10. package/dist/node/service/v1/index.js +4 -0
  11. package/dist/node/service/v1/index.js.map +1 -0
  12. package/dist/node/service/v1/main.d.ts +42 -0
  13. package/dist/node/service/v1/main.d.ts.map +1 -0
  14. package/dist/node/service/v1/main.js +31 -0
  15. package/dist/node/service/v1/main.js.map +1 -0
  16. package/dist/node/service/v1/users.d.ts +86 -0
  17. package/dist/node/service/v1/users.d.ts.map +1 -0
  18. package/dist/node/service/v1/users.js +703 -0
  19. package/dist/node/service/v1/users.js.map +1 -0
  20. package/dist/node-cjs/index.d.ts +1 -1
  21. package/dist/node-cjs/index.d.ts.map +1 -1
  22. package/dist/node-cjs/index.js +3 -3
  23. package/dist/node-cjs/index.js.map +1 -1
  24. package/dist/node-cjs/service/index.d.ts.map +1 -0
  25. package/dist/node-cjs/service/index.js.map +1 -0
  26. package/dist/node-cjs/service/v1/index.d.ts +4 -0
  27. package/dist/node-cjs/service/v1/index.d.ts.map +1 -0
  28. package/dist/node-cjs/{users → service}/v1/index.js +3 -3
  29. package/dist/node-cjs/service/v1/index.js.map +1 -0
  30. package/dist/node-cjs/service/v1/main.d.ts +42 -0
  31. package/dist/node-cjs/service/v1/main.d.ts.map +1 -0
  32. package/dist/node-cjs/service/v1/main.js +56 -0
  33. package/dist/node-cjs/service/v1/main.js.map +1 -0
  34. package/dist/node-cjs/service/v1/users.d.ts +86 -0
  35. package/dist/node-cjs/service/v1/users.d.ts.map +1 -0
  36. package/dist/node-cjs/service/v1/users.js +742 -0
  37. package/dist/node-cjs/service/v1/users.js.map +1 -0
  38. package/dist/web/index.d.ts +1 -1
  39. package/dist/web/index.d.ts.map +1 -1
  40. package/dist/web/index.js +1 -1
  41. package/dist/web/index.js.map +1 -1
  42. package/dist/web/service/index.d.ts.map +1 -0
  43. package/dist/web/service/index.js.map +1 -0
  44. package/dist/web/service/v1/index.d.ts +4 -0
  45. package/dist/web/service/v1/index.d.ts.map +1 -0
  46. package/dist/web/service/v1/index.js +4 -0
  47. package/dist/web/service/v1/index.js.map +1 -0
  48. package/dist/web/{users/v1/users.d.ts → service/v1/main.d.ts} +12 -9
  49. package/dist/web/service/v1/main.d.ts.map +1 -0
  50. package/dist/web/{users/v1/users.js → service/v1/main.js} +38 -12
  51. package/dist/web/service/v1/main.js.map +1 -0
  52. package/dist/web/service/v1/users.d.ts +86 -0
  53. package/dist/web/service/v1/users.d.ts.map +1 -0
  54. package/dist/web/service/v1/users.js +703 -0
  55. package/dist/web/service/v1/users.js.map +1 -0
  56. package/package.json +22 -22
  57. package/dist/node/users/index.d.ts.map +0 -1
  58. package/dist/node/users/index.js.map +0 -1
  59. package/dist/node/users/v1/auth.d.ts +0 -38
  60. package/dist/node/users/v1/auth.d.ts.map +0 -1
  61. package/dist/node/users/v1/auth.js +0 -220
  62. package/dist/node/users/v1/auth.js.map +0 -1
  63. package/dist/node/users/v1/index.d.ts +0 -4
  64. package/dist/node/users/v1/index.d.ts.map +0 -1
  65. package/dist/node/users/v1/index.js +0 -4
  66. package/dist/node/users/v1/index.js.map +0 -1
  67. package/dist/node/users/v1/users.d.ts +0 -29
  68. package/dist/node/users/v1/users.d.ts.map +0 -1
  69. package/dist/node/users/v1/users.js +0 -22
  70. package/dist/node/users/v1/users.js.map +0 -1
  71. package/dist/node-cjs/users/index.d.ts.map +0 -1
  72. package/dist/node-cjs/users/index.js.map +0 -1
  73. package/dist/node-cjs/users/v1/auth.d.ts +0 -38
  74. package/dist/node-cjs/users/v1/auth.d.ts.map +0 -1
  75. package/dist/node-cjs/users/v1/auth.js +0 -243
  76. package/dist/node-cjs/users/v1/auth.js.map +0 -1
  77. package/dist/node-cjs/users/v1/index.d.ts +0 -4
  78. package/dist/node-cjs/users/v1/index.d.ts.map +0 -1
  79. package/dist/node-cjs/users/v1/index.js.map +0 -1
  80. package/dist/node-cjs/users/v1/users.d.ts +0 -29
  81. package/dist/node-cjs/users/v1/users.d.ts.map +0 -1
  82. package/dist/node-cjs/users/v1/users.js +0 -47
  83. package/dist/node-cjs/users/v1/users.js.map +0 -1
  84. package/dist/web/users/index.d.ts.map +0 -1
  85. package/dist/web/users/index.js.map +0 -1
  86. package/dist/web/users/v1/auth.d.ts +0 -38
  87. package/dist/web/users/v1/auth.d.ts.map +0 -1
  88. package/dist/web/users/v1/auth.js +0 -220
  89. package/dist/web/users/v1/auth.js.map +0 -1
  90. package/dist/web/users/v1/index.d.ts +0 -4
  91. package/dist/web/users/v1/index.d.ts.map +0 -1
  92. package/dist/web/users/v1/index.js +0 -4
  93. package/dist/web/users/v1/index.js.map +0 -1
  94. package/dist/web/users/v1/users.d.ts.map +0 -1
  95. package/dist/web/users/v1/users.js.map +0 -1
  96. /package/dist/node/{users → service}/index.d.ts +0 -0
  97. /package/dist/node/{users → service}/index.js +0 -0
  98. /package/dist/node-cjs/{users → service}/index.d.ts +0 -0
  99. /package/dist/node-cjs/{users → service}/index.js +0 -0
  100. /package/dist/web/{users → service}/index.d.ts +0 -0
  101. /package/dist/web/{users → service}/index.js +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @chaty/proto
1
+ # @chaty-app/proto
2
2
 
3
3
  TypeScript Protobuf bindings for Chaty services.
4
4
 
@@ -7,9 +7,9 @@ Includes message definitions and gRPC client/server stubs for both Node.js and w
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install @chaty/proto
10
+ npm install @chaty-app/proto
11
11
  # or
12
- pnpm add @chaty/proto
12
+ pnpm add @chaty-app/proto
13
13
  ```
14
14
 
15
15
  ## Usage
@@ -17,26 +17,38 @@ pnpm add @chaty/proto
17
17
  ### Node.js (gRPC-JS)
18
18
 
19
19
  ```typescript
20
- import { UsersClient } from '@chaty/proto/users/v1';
20
+ import { ChatyServiceClient } from '@chaty-app/proto/service/v1';
21
21
  import { createChannel } from '@grpc/grpc-js';
22
22
 
23
23
  const channel = createChannel('localhost:50051');
24
- const client = new UsersClient(channel);
24
+ const client = new ChatyServiceClient(channel);
25
+
26
+ // Call UsersLogin RPC
27
+ const response = await client.usersLogin({
28
+ email: 'user@example.com',
29
+ password: 'password123'
30
+ });
25
31
  ```
26
32
 
27
33
  ### Browser (gRPC-Web)
28
34
 
29
35
  ```typescript
30
- import { UsersClient } from '@chaty/proto/web/users/v1';
36
+ import { ChatyServiceClient } from '@chaty-app/proto/web/service/v1';
31
37
 
32
- const client = new UsersClient({
38
+ const client = new ChatyServiceClient({
33
39
  host: 'http://localhost:8080'
34
40
  });
41
+
42
+ // Call UsersLogin RPC
43
+ const response = await client.usersLogin({
44
+ email: 'user@example.com',
45
+ password: 'password123'
46
+ });
35
47
  ```
36
48
 
37
49
  ## Exports
38
50
 
39
- - `./users/v1` - Users service messages and client
51
+ - `./service/v1` - Chaty unified service (authentication, user management)
40
52
  - `./shared/v1` - Shared message definitions
41
- - `./web/users/v1` - Browser-compatible gRPC-Web client for users
53
+ - `./web/service/v1` - Browser-compatible gRPC-Web for Chaty service
42
54
  - `./web/shared/v1` - Browser-compatible shared definitions
@@ -1,3 +1,3 @@
1
+ export * from './service/index.js';
1
2
  export * from './shared/index.js';
2
- export * from './users/index.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
@@ -1,3 +1,3 @@
1
+ export * from './service/index.js';
1
2
  export * from './shared/index.js';
2
- export * from './users/index.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/service/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/service/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as Main from './main.js';
2
+ import * as Users from './users.js';
3
+ export { Main, Users };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,IAAI,EACJ,KAAK,EACN,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as Main from './main.js';
2
+ import * as Users from './users.js';
3
+ export { Main, Users };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/node/service/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,IAAI,EACJ,KAAK,EACN,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
2
+ import { LoginRequest, LoginResponse, UserCreateRequest, UserCreateResponse } from "./users";
3
+ export declare const protobufPackage = "service.v1";
4
+ export type ChatyServiceService = typeof ChatyServiceService;
5
+ export declare const ChatyServiceService: {
6
+ readonly usersCreate: {
7
+ readonly path: "/service.v1.ChatyService/UsersCreate";
8
+ readonly requestStream: false;
9
+ readonly responseStream: false;
10
+ readonly requestSerialize: (value: UserCreateRequest) => Buffer;
11
+ readonly requestDeserialize: (value: Buffer) => UserCreateRequest;
12
+ readonly responseSerialize: (value: UserCreateResponse) => Buffer;
13
+ readonly responseDeserialize: (value: Buffer) => UserCreateResponse;
14
+ };
15
+ readonly usersLogin: {
16
+ readonly path: "/service.v1.ChatyService/UsersLogin";
17
+ readonly requestStream: false;
18
+ readonly responseStream: false;
19
+ readonly requestSerialize: (value: LoginRequest) => Buffer;
20
+ readonly requestDeserialize: (value: Buffer) => LoginRequest;
21
+ readonly responseSerialize: (value: LoginResponse) => Buffer;
22
+ readonly responseDeserialize: (value: Buffer) => LoginResponse;
23
+ };
24
+ };
25
+ export interface ChatyServiceServer extends UntypedServiceImplementation {
26
+ usersCreate: handleUnaryCall<UserCreateRequest, UserCreateResponse>;
27
+ usersLogin: handleUnaryCall<LoginRequest, LoginResponse>;
28
+ }
29
+ export interface ChatyServiceClient extends Client {
30
+ usersCreate(request: UserCreateRequest, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
31
+ usersCreate(request: UserCreateRequest, metadata: Metadata, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
32
+ usersCreate(request: UserCreateRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
33
+ usersLogin(request: LoginRequest, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
34
+ usersLogin(request: LoginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
35
+ usersLogin(request: LoginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
36
+ }
37
+ export declare const ChatyServiceClient: {
38
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): ChatyServiceClient;
39
+ service: typeof ChatyServiceService;
40
+ serviceName: string;
41
+ };
42
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/main.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,4BAA4B,EAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAC7D,eAAO,MAAM,mBAAmB;;;;;2CAKF,iBAAiB,KAAG,MAAM;6CACxB,MAAM,KAAG,iBAAiB;4CAC3B,kBAAkB,KAAG,MAAM;8CACzB,MAAM,KAAG,kBAAkB;;;;;;2CAM9B,YAAY,KAAG,MAAM;6CACnB,MAAM,KAAG,YAAY;4CACtB,aAAa,KAAG,MAAM;8CACpB,MAAM,KAAG,aAAa;;CAE7C,CAAC;AAEX,MAAM,WAAW,kBAAmB,SAAQ,4BAA4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AAK,IAAI,GACtE,eAAe,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,EAGf;IACd,KAAK,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;IAC7G,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,31 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.10.0
4
+ // protoc unknown
5
+ // source: service/v1/main.proto
6
+ /* eslint-disable */
7
+ import { makeGenericClientConstructor, } from "@grpc/grpc-js";
8
+ import { LoginRequest, LoginResponse, UserCreateRequest, UserCreateResponse } from "./users";
9
+ export const protobufPackage = "service.v1";
10
+ export const ChatyServiceService = {
11
+ usersCreate: {
12
+ path: "/service.v1.ChatyService/UsersCreate",
13
+ requestStream: false,
14
+ responseStream: false,
15
+ requestSerialize: (value) => Buffer.from(UserCreateRequest.encode(value).finish()),
16
+ requestDeserialize: (value) => UserCreateRequest.decode(value),
17
+ responseSerialize: (value) => Buffer.from(UserCreateResponse.encode(value).finish()),
18
+ responseDeserialize: (value) => UserCreateResponse.decode(value),
19
+ },
20
+ usersLogin: {
21
+ path: "/service.v1.ChatyService/UsersLogin",
22
+ requestStream: false,
23
+ responseStream: false,
24
+ requestSerialize: (value) => Buffer.from(LoginRequest.encode(value).finish()),
25
+ requestDeserialize: (value) => LoginRequest.decode(value),
26
+ responseSerialize: (value) => Buffer.from(LoginResponse.encode(value).finish()),
27
+ responseDeserialize: (value) => LoginResponse.decode(value),
28
+ },
29
+ };
30
+ export const ChatyServiceClient = makeGenericClientConstructor(ChatyServiceService, "service.v1.ChatyService");
31
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/node/service/v1/main.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,KAAoB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACtG,mBAAmB,EAAE,CAAC,KAAa,EAAiB,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;KACnF;CACO,CAAC;AAwCX,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAA4B,CAC5D,mBAAmB,EACnB,yBAAyB,CAK1B,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { AppError } from "../../shared/v1/error";
3
+ export declare const protobufPackage = "service.v1";
4
+ export declare enum UserStatus {
5
+ USER_STATUS_ONLINE = 0,
6
+ USER_STATUS_IDLE = 1,
7
+ USER_STATUS_FOCUS = 2,
8
+ USER_STATUS_BUSY = 3,
9
+ USER_STATUS_INVISIBLE = 4,
10
+ UNRECOGNIZED = -1
11
+ }
12
+ export declare function userStatusFromJSON(object: any): UserStatus;
13
+ export declare function userStatusToJSON(object: UserStatus): string;
14
+ export declare enum UserFlag {
15
+ USER_FLAG_UNSPECIFIED = 0,
16
+ USER_FLAG_SUSPENDED_UNTIL = 1,
17
+ USER_FLAG_DELETED = 2,
18
+ USER_FLAG_BANNED = 4,
19
+ USER_FLAG_SPAM = 8,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export declare function userFlagFromJSON(object: any): UserFlag;
23
+ export declare function userFlagToJSON(object: UserFlag): string;
24
+ export interface User {
25
+ id: string;
26
+ username: string;
27
+ email: string;
28
+ password: string;
29
+ displayName?: string | undefined;
30
+ badges?: number | undefined;
31
+ statusText?: string | undefined;
32
+ statusPresence?: UserStatus | undefined;
33
+ profileContent?: string | undefined;
34
+ profileBackgroundId?: string | undefined;
35
+ privileged: boolean;
36
+ suspendedUntil?: string | undefined;
37
+ /** unix timestamp */
38
+ createdAt: string;
39
+ /** unix timestamp */
40
+ updatedAt: string;
41
+ }
42
+ export interface UserCreateRequest {
43
+ email: string;
44
+ password: string;
45
+ username: string;
46
+ }
47
+ export interface UserCreateResponse {
48
+ }
49
+ export interface LoginRequest {
50
+ email: string;
51
+ password: string;
52
+ mfa: string;
53
+ loginChallenge: string;
54
+ }
55
+ export interface LoginResponse {
56
+ data?: LoginResponseData | undefined;
57
+ error?: AppError | undefined;
58
+ }
59
+ export interface LoginResponseData {
60
+ }
61
+ export declare const User: MessageFns<User>;
62
+ export declare const UserCreateRequest: MessageFns<UserCreateRequest>;
63
+ export declare const UserCreateResponse: MessageFns<UserCreateResponse>;
64
+ export declare const LoginRequest: MessageFns<LoginRequest>;
65
+ export declare const LoginResponse: MessageFns<LoginResponse>;
66
+ export declare const LoginResponseData: MessageFns<LoginResponseData>;
67
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
68
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
69
+ [K in keyof T]?: DeepPartial<T[K]>;
70
+ } : Partial<T>;
71
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
72
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
73
+ [K in keyof P]: Exact<P[K], I[K]>;
74
+ } & {
75
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
76
+ };
77
+ export interface MessageFns<T> {
78
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
79
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
80
+ fromJSON(object: any): T;
81
+ toJSON(message: T): unknown;
82
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
83
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
84
+ }
85
+ export {};
86
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/users.ts"],"names":[],"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