@sellout/models 0.0.337 → 0.0.339
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/superAdminAllCustomer.query.d.ts +2 -0
- package/.dist/graphql/queries/superAdminAllCustomer.query.js +24 -0
- package/.dist/graphql/queries/superAdminAllCustomer.query.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 +8121 -5016
- 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/superAdminAllCustomer.query.ts +23 -0
- package/src/graphql/queries/userProfilesAdmin.query.ts +3 -0
- package/src/interfaces/IContact.ts +9 -0
- package/src/proto/user-profile.proto +16 -0
- package/src/proto/user.proto +62 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.339",
|
|
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.339",
|
|
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": "18c1f7ad1c6ba5dda974d7c01f815c26c7be7476"
|
|
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;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {gql} from "@apollo/client";
|
|
2
|
+
|
|
3
|
+
const query = gql`
|
|
4
|
+
query allUserProfilesAdmin($query: UserProfileQueryInput, $pagination: PaginationInput ) {
|
|
5
|
+
allUserProfilesAdmin(query: $query, pagination: $pagination) {
|
|
6
|
+
_id
|
|
7
|
+
userId
|
|
8
|
+
imageUrl
|
|
9
|
+
firstName
|
|
10
|
+
lastName
|
|
11
|
+
email
|
|
12
|
+
phoneNumber
|
|
13
|
+
stripeCustomerId
|
|
14
|
+
organization{
|
|
15
|
+
orgName
|
|
16
|
+
_id
|
|
17
|
+
}
|
|
18
|
+
__typename
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export default query;
|
|
@@ -2,6 +2,7 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
import "error.proto";
|
|
4
4
|
import "common.proto";
|
|
5
|
+
import "organization.proto";
|
|
5
6
|
|
|
6
7
|
message UserProfile {
|
|
7
8
|
string _id = 0;
|
|
@@ -19,6 +20,7 @@ message UserProfile {
|
|
|
19
20
|
repeated string venueIds = 12;
|
|
20
21
|
repeated string artistIds = 13;
|
|
21
22
|
Address address = 14;
|
|
23
|
+
repeated Organization organization = 15;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/****************************************************************************************
|
|
@@ -88,6 +90,7 @@ message UserProfileQuery {
|
|
|
88
90
|
string phoneNumber = 6;
|
|
89
91
|
bool any = 7;
|
|
90
92
|
string orgId = 8;
|
|
93
|
+
string screenType = 9;
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
message QueryUserProfilesRequest {
|
|
@@ -126,6 +129,18 @@ message DeleteUnverifiedUserProfileResponse {
|
|
|
126
129
|
bool deleted = 2;
|
|
127
130
|
}
|
|
128
131
|
|
|
132
|
+
message QueryAllUserProfilesRequest {
|
|
133
|
+
string spanContext = 0;
|
|
134
|
+
UserProfileQuery query = 1;
|
|
135
|
+
Pagination pagination = 2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message QueryAllUserProfilesResponse {
|
|
139
|
+
StatusCode status = 0;
|
|
140
|
+
repeated Error errors = 1;
|
|
141
|
+
repeated UserProfile userProfiles = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
129
144
|
service UserProfileService {
|
|
130
145
|
// Create
|
|
131
146
|
rpc createUserProfile(CreateUserProfileRequest) returns (CreateUserProfileResponse) {}
|
|
@@ -136,6 +151,7 @@ service UserProfileService {
|
|
|
136
151
|
// Find
|
|
137
152
|
rpc findUserProfile(FindUserProfileRequest) returns (FindUserProfileResponse) {}
|
|
138
153
|
rpc queryUserProfiles(QueryUserProfilesRequest) returns (QueryUserProfilesResponse) {}
|
|
154
|
+
rpc queryAllUserProfiles(QueryAllUserProfilesRequest) returns (QueryAllUserProfilesResponse) {}
|
|
139
155
|
// Delete
|
|
140
156
|
rpc deleteUnverifiedUserProfile(DeleteUnverifiedUserProfileRequest) returns (DeleteUnverifiedUserProfileResponse) {}
|
|
141
157
|
}
|
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,64 @@ 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
|
+
string phoneNumber = 4;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
message QueryContactsRequest {
|
|
392
|
+
string spanContext = 1;
|
|
393
|
+
Pagination pagination = 2;
|
|
394
|
+
ContactsQuery query = 3;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
message QueryContactsResponse {
|
|
398
|
+
StatusCode status = 1;
|
|
399
|
+
repeated Error errors = 2;
|
|
400
|
+
repeated UserProfile contacts = 3;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
message UpdateContactRequest {
|
|
404
|
+
string spanContext = 0;
|
|
405
|
+
string _id = 1;
|
|
406
|
+
string email = 2;
|
|
407
|
+
string firstName = 3;
|
|
408
|
+
string lastName = 4;
|
|
409
|
+
string userId = 5;
|
|
410
|
+
string orgId = 6;
|
|
411
|
+
bool isNewUser = 7;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
message UpdateContactResponse {
|
|
415
|
+
StatusCode status = 1;
|
|
416
|
+
repeated Error errors = 2;
|
|
417
|
+
Contact contact = 3;
|
|
418
|
+
}
|
|
419
|
+
|
|
361
420
|
service UserService {
|
|
362
421
|
// Create
|
|
363
422
|
rpc createUser(CreateUserRequest) returns (CreateUserResponse) {}
|
|
@@ -394,4 +453,7 @@ service UserService {
|
|
|
394
453
|
// Delete
|
|
395
454
|
rpc deleteUnverifiedUser(DeleteUnverifiedUserRequest) returns (DeleteUnverifiedUserResponse) {}
|
|
396
455
|
rpc findUserByPhoneNumber(FindUserByEmailRequest) returns (FindUserByEmailResponse) {}
|
|
456
|
+
rpc createContact(CreateContactRequest) returns (CreateContactResponse) {}
|
|
457
|
+
rpc queryContacts(QueryContactsRequest) returns (QueryContactsResponse) {}
|
|
458
|
+
rpc updateContact(UpdateContactRequest) returns (UpdateContactResponse) {}
|
|
397
459
|
}
|