@sellout/models 0.0.337 → 0.0.338
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.
- package/.dist/enums/ContactsScreenEnum.d.ts +5 -0
- package/.dist/enums/ContactsScreenEnum.js +10 -0
- package/.dist/enums/ContactsScreenEnum.js.map +1 -0
- package/.dist/graphql/mutations/createContacts.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createContacts.mutation.js +10 -0
- package/.dist/graphql/mutations/createContacts.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateContact.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateContact.mutation.js +17 -0
- package/.dist/graphql/mutations/updateContact.mutation.js.map +1 -0
- package/.dist/graphql/queries/userProfilesAdmin.query.js +3 -0
- package/.dist/graphql/queries/userProfilesAdmin.query.js.map +1 -1
- package/.dist/interfaces/IContact.d.ts +9 -0
- package/.dist/interfaces/IContact.js +3 -0
- package/.dist/interfaces/IContact.js.map +1 -0
- package/.dist/sellout-proto.js +2599 -157
- package/package.json +3 -3
- package/src/enums/ContactsScreenEnum.ts +5 -0
- package/src/graphql/mutations/createContacts.mutation.ts +9 -0
- package/src/graphql/mutations/updateContact.mutation.ts +16 -0
- package/src/graphql/queries/userProfilesAdmin.query.ts +3 -0
- package/src/interfaces/IContact.ts +9 -0
- package/src/proto/user-profile.proto +1 -0
- package/src/proto/user.proto +61 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.338",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@apollo/client": "^3.9.6",
|
|
20
20
|
"@hapi/joi": "^17.1.1",
|
|
21
|
-
"@sellout/utils": "^0.0.
|
|
21
|
+
"@sellout/utils": "^0.0.338",
|
|
22
22
|
"@types/hapi__joi": "^16.0.1",
|
|
23
23
|
"@types/shortid": "^0.0.29",
|
|
24
24
|
"@types/zen-observable": "^0.8.7",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"protobufjs": "^6.11.2",
|
|
33
33
|
"typescript": "^4.9.5"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "20ab75a1331e1df651c3b21d31f594cf6a6454cc"
|
|
36
36
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {gql} from "@apollo/client";
|
|
2
|
+
|
|
3
|
+
const mutation = gql`
|
|
4
|
+
mutation updateContact($contact: UpdateContactInput!) {
|
|
5
|
+
updateContact(contact: $contact) {
|
|
6
|
+
_id
|
|
7
|
+
firstName
|
|
8
|
+
lastName
|
|
9
|
+
orgId
|
|
10
|
+
userId
|
|
11
|
+
email
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export default mutation;
|
package/src/proto/user.proto
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
import "error.proto";
|
|
4
|
+
import "user-profile.proto";
|
|
4
5
|
|
|
5
6
|
message User {
|
|
6
7
|
string _id = 1;
|
|
@@ -358,6 +359,63 @@ message DeleteUnverifiedUserResponse {
|
|
|
358
359
|
bool deleted = 2;
|
|
359
360
|
}
|
|
360
361
|
|
|
362
|
+
message Contact {
|
|
363
|
+
string _id = 0;
|
|
364
|
+
string firstName = 1;
|
|
365
|
+
string lastName = 2;
|
|
366
|
+
string userId = 3;
|
|
367
|
+
string orgId = 4;
|
|
368
|
+
string email = 5;
|
|
369
|
+
int32 createdAt = 6;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
message CreateContactRequest {
|
|
373
|
+
string spanContext = 0;
|
|
374
|
+
string orgId = 1;
|
|
375
|
+
repeated Contact contact = 2;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
message CreateContactResponse {
|
|
379
|
+
StatusCode status = 1;
|
|
380
|
+
repeated Error errors = 2;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
message ContactsQuery {
|
|
384
|
+
string name = 0;
|
|
385
|
+
string email = 1;
|
|
386
|
+
string userId = 2;
|
|
387
|
+
string orgId = 3;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
message QueryContactsRequest {
|
|
391
|
+
string spanContext = 1;
|
|
392
|
+
Pagination pagination = 2;
|
|
393
|
+
ContactsQuery query = 3;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
message QueryContactsResponse {
|
|
397
|
+
StatusCode status = 1;
|
|
398
|
+
repeated Error errors = 2;
|
|
399
|
+
repeated UserProfile contacts = 3;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
message UpdateContactRequest {
|
|
403
|
+
string spanContext = 0;
|
|
404
|
+
string _id = 1;
|
|
405
|
+
string email = 2;
|
|
406
|
+
string firstName = 3;
|
|
407
|
+
string lastName = 4;
|
|
408
|
+
string userId = 5;
|
|
409
|
+
string orgId = 6;
|
|
410
|
+
bool isNewUser = 7;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
message UpdateContactResponse {
|
|
414
|
+
StatusCode status = 1;
|
|
415
|
+
repeated Error errors = 2;
|
|
416
|
+
Contact contact = 3;
|
|
417
|
+
}
|
|
418
|
+
|
|
361
419
|
service UserService {
|
|
362
420
|
// Create
|
|
363
421
|
rpc createUser(CreateUserRequest) returns (CreateUserResponse) {}
|
|
@@ -394,4 +452,7 @@ service UserService {
|
|
|
394
452
|
// Delete
|
|
395
453
|
rpc deleteUnverifiedUser(DeleteUnverifiedUserRequest) returns (DeleteUnverifiedUserResponse) {}
|
|
396
454
|
rpc findUserByPhoneNumber(FindUserByEmailRequest) returns (FindUserByEmailResponse) {}
|
|
455
|
+
rpc createContact(CreateContactRequest) returns (CreateContactResponse) {}
|
|
456
|
+
rpc queryContacts(QueryContactsRequest) returns (QueryContactsResponse) {}
|
|
457
|
+
rpc updateContact(UpdateContactRequest) returns (UpdateContactResponse) {}
|
|
397
458
|
}
|