@sellout/models 0.0.424 → 0.0.425
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/graphql/mutations/connectHive.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/connectHive.mutation.js +16 -0
- package/.dist/graphql/mutations/connectHive.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateOrganization.mutation.js +3 -0
- package/.dist/graphql/mutations/updateOrganization.mutation.js.map +1 -1
- package/.dist/graphql/queries/profile.query.js +4 -0
- package/.dist/graphql/queries/profile.query.js.map +1 -1
- package/.dist/interfaces/IHiveIntegration.d.ts +8 -0
- package/.dist/interfaces/IHiveIntegration.js +3 -0
- package/.dist/interfaces/IHiveIntegration.js.map +1 -0
- package/.dist/interfaces/IOrganization.d.ts +2 -0
- package/.dist/interfaces/IOrganization.js.map +1 -1
- package/.dist/schemas/Organization.d.ts +32 -0
- package/.dist/schemas/Organization.js +34 -1
- package/.dist/schemas/Organization.js.map +1 -1
- package/.dist/sellout-proto.js +1821 -286
- package/package.json +3 -3
- package/src/graphql/mutations/connectHive.mutation.ts +15 -0
- package/src/graphql/mutations/updateOrganization.mutation.ts +4 -1
- package/src/graphql/queries/profile.query.ts +5 -1
- package/src/interfaces/IHiveIntegration.ts +8 -0
- package/src/interfaces/IOrganization.ts +3 -1
- package/src/proto/order.proto +1 -0
- package/src/proto/organization.proto +41 -0
- package/src/schemas/Organization.ts +35 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.425",
|
|
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.425",
|
|
22
22
|
"@types/hapi__joi": "^16.0.1",
|
|
23
23
|
"@types/shortid": "^0.0.29",
|
|
24
24
|
"@types/zen-observable": "^0.8.7",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"protobufjs": "^6.11.2",
|
|
34
34
|
"typescript": "^4.9.5"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "42573e2766382927f5448da974d8f5a167bba9fb"
|
|
37
37
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { gql } from "@apollo/client";
|
|
2
|
+
|
|
3
|
+
const mutation = gql`
|
|
4
|
+
mutation ConnectHive($code: String!, $codeVerifier: String!, $clientId: String!, $clientSecret: String!) {
|
|
5
|
+
connectHive(code: $code, codeVerifier: $codeVerifier, clientId: $clientId, clientSecret: $clientSecret) {
|
|
6
|
+
_id
|
|
7
|
+
hiveIntegration {
|
|
8
|
+
isHiveIntegration
|
|
9
|
+
isConnected
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export default mutation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {gql} from "@apollo/client";
|
|
1
|
+
import { gql } from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
const mutation = gql`
|
|
4
4
|
mutation updateOrganization($organization: OrganizationInput!) {
|
|
@@ -13,6 +13,9 @@ const mutation = gql`
|
|
|
13
13
|
ticketFormat
|
|
14
14
|
ticketShareExpiration
|
|
15
15
|
isWeb3Integration
|
|
16
|
+
hiveIntegration {
|
|
17
|
+
isHiveIntegration
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {gql} from "@apollo/client";
|
|
1
|
+
import { gql } from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
const query = gql`
|
|
4
4
|
query Profile {
|
|
@@ -51,6 +51,10 @@ const query = gql`
|
|
|
51
51
|
isSeasonTickets
|
|
52
52
|
isTegIntegration
|
|
53
53
|
isWeb3Integration
|
|
54
|
+
hiveIntegration {
|
|
55
|
+
isHiveIntegration
|
|
56
|
+
isConnected
|
|
57
|
+
}
|
|
54
58
|
validateMemberId
|
|
55
59
|
stripeConnectAccount {
|
|
56
60
|
name
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IAddress from "./IAddress";
|
|
2
|
-
import IOrderIntegration from "./IOrderIntegration"
|
|
2
|
+
import IOrderIntegration from "./IOrderIntegration";
|
|
3
|
+
import IHiveIntegration from "./IHiveIntegration";
|
|
3
4
|
|
|
4
5
|
export enum TicketFormatAsEnum {
|
|
5
6
|
Standard = "Standard",
|
|
@@ -40,4 +41,5 @@ export default interface IOrganization {
|
|
|
40
41
|
isOrgDeletable?: boolean;
|
|
41
42
|
isWeb3Integration?: boolean;
|
|
42
43
|
ticketShareExpiration?: string;
|
|
44
|
+
hiveIntegration?: IHiveIntegration;
|
|
43
45
|
}
|
package/src/proto/order.proto
CHANGED
|
@@ -31,6 +31,7 @@ message Organization {
|
|
|
31
31
|
bool isOrgDeletable = 24;
|
|
32
32
|
bool isWeb3Integration = 25;
|
|
33
33
|
string ticketShareExpiration = 26;
|
|
34
|
+
HiveIntegration hiveIntegration = 27;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
message OrderIntegration {
|
|
@@ -39,6 +40,15 @@ message OrderIntegration {
|
|
|
39
40
|
string orderIntegrationAuthToken = 2;
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
message HiveIntegration {
|
|
44
|
+
bool isHiveIntegration = 1;
|
|
45
|
+
string accessToken = 2;
|
|
46
|
+
string refreshToken = 3;
|
|
47
|
+
int32 tokenExpiresAt = 4;
|
|
48
|
+
string clientId = 5;
|
|
49
|
+
string clientSecret = 6;
|
|
50
|
+
}
|
|
51
|
+
|
|
42
52
|
// Create Organization
|
|
43
53
|
message CreateOrganizationRequest {
|
|
44
54
|
string spanContext = 0;
|
|
@@ -146,6 +156,33 @@ message RemoveOrganizationStripeIdResponse {
|
|
|
146
156
|
Organization organization = 2;
|
|
147
157
|
}
|
|
148
158
|
|
|
159
|
+
// Connect Hive
|
|
160
|
+
message ConnectHiveRequest {
|
|
161
|
+
string spanContext = 1;
|
|
162
|
+
string orgId = 2;
|
|
163
|
+
string code = 3;
|
|
164
|
+
string codeVerifier = 4;
|
|
165
|
+
string clientId = 5;
|
|
166
|
+
string clientSecret = 6;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
message ConnectHiveResponse {
|
|
170
|
+
StatusCode status = 1;
|
|
171
|
+
repeated Error errors = 2;
|
|
172
|
+
Organization organization = 3;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
message RefreshHiveTokenRequest {
|
|
176
|
+
string spanContext = 1;
|
|
177
|
+
string orgId = 2;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
message RefreshHiveTokenResponse {
|
|
181
|
+
StatusCode status = 1;
|
|
182
|
+
repeated Error errors = 2;
|
|
183
|
+
Organization organization = 3;
|
|
184
|
+
}
|
|
185
|
+
|
|
149
186
|
service OrganizationService {
|
|
150
187
|
// Create
|
|
151
188
|
rpc createOrganization(CreateOrganizationRequest) returns (CreateOrganizationResponse) {}
|
|
@@ -162,4 +199,8 @@ service OrganizationService {
|
|
|
162
199
|
rpc deleteOrganization(DeleteOrganizationRequest) returns (DeleteOrganizationResponse) {}
|
|
163
200
|
// Remove Stripe ID
|
|
164
201
|
rpc removeOrganizationStripeId(RemoveOrganizationStripeIdRequest) returns (RemoveOrganizationStripeIdResponse) {}
|
|
202
|
+
// Connect Hive
|
|
203
|
+
rpc connectHive(ConnectHiveRequest) returns (ConnectHiveResponse) {}
|
|
204
|
+
// Refresh Hive
|
|
205
|
+
rpc refreshHiveToken(RefreshHiveTokenRequest) returns (RefreshHiveTokenResponse) {}
|
|
165
206
|
}
|
|
@@ -16,6 +16,39 @@ const OrderIntegration = {
|
|
|
16
16
|
required: false
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
+
|
|
20
|
+
const HiveIntegration = {
|
|
21
|
+
isHiveIntegration: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
required: false,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
clientId: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false,
|
|
29
|
+
default: null,
|
|
30
|
+
},
|
|
31
|
+
clientSecret: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
default: null,
|
|
35
|
+
},
|
|
36
|
+
accessToken: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: false,
|
|
39
|
+
default: null,
|
|
40
|
+
},
|
|
41
|
+
refreshToken: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false,
|
|
44
|
+
default: null,
|
|
45
|
+
},
|
|
46
|
+
tokenExpiresAt: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: false,
|
|
49
|
+
default: null,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
19
52
|
export default {
|
|
20
53
|
_id: {
|
|
21
54
|
type: String,
|
|
@@ -126,5 +159,6 @@ export default {
|
|
|
126
159
|
type:String,
|
|
127
160
|
required:false,
|
|
128
161
|
default:TicketShareExpirationEnum.Never
|
|
129
|
-
}
|
|
162
|
+
},
|
|
163
|
+
hiveIntegration: HiveIntegration,
|
|
130
164
|
};
|