@sellout/models 0.0.421 → 0.0.422

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/models",
3
- "version": "0.0.421",
3
+ "version": "0.0.422",
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.421",
21
+ "@sellout/utils": "^0.0.422",
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": "c0e4b0e147547c9643b968f908cc1a0b65a434d4"
36
+ "gitHead": "026cde1e6076e3669b7fec24570b9bf4ecb29213"
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
@@ -0,0 +1,8 @@
1
+ export default interface IHiveIntegration {
2
+ isHiveIntegration?: boolean;
3
+ clientId?: string;
4
+ clientSecret?: string;
5
+ accessToken?: string;
6
+ refreshToken?: string;
7
+ tokenExpiresAt?: number;
8
+ }
@@ -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
  }
@@ -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,22 @@ 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
+
149
175
  service OrganizationService {
150
176
  // Create
151
177
  rpc createOrganization(CreateOrganizationRequest) returns (CreateOrganizationResponse) {}
@@ -162,4 +188,6 @@ service OrganizationService {
162
188
  rpc deleteOrganization(DeleteOrganizationRequest) returns (DeleteOrganizationResponse) {}
163
189
  // Remove Stripe ID
164
190
  rpc removeOrganizationStripeId(RemoveOrganizationStripeIdRequest) returns (RemoveOrganizationStripeIdResponse) {}
191
+ // Connect Hive
192
+ rpc connectHive(ConnectHiveRequest) returns (ConnectHiveResponse) {}
165
193
  }
@@ -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
  };