@sellout/models 0.0.308 → 0.0.310

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.308",
3
+ "version": "0.0.310",
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.308",
21
+ "@sellout/utils": "^0.0.310",
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": "13457b0209c6f94d26b1d8ae6869110f97d5ffe6"
35
+ "gitHead": "d3ad56a6580453cc8bb0ec71a6188054b6e1ccc4"
36
36
  }
@@ -0,0 +1,10 @@
1
+ import {gql} from "@apollo/client";
2
+
3
+ const mutation = gql`
4
+ mutation orderIntegrationUpdate($orderId: String) {
5
+ orderIntegrationUpdate(orderId: $orderId) {
6
+ _id
7
+ }
8
+ }
9
+ `;
10
+ export default mutation;
@@ -26,8 +26,8 @@ const query = gql`
26
26
  hasOrders
27
27
  subscription {
28
28
  _id
29
- email
30
- frequency
29
+ email
30
+ frequency
31
31
  }
32
32
  organization {
33
33
  orgName
@@ -1,4 +1,4 @@
1
- import {gql} from "@apollo/client";
1
+ import { gql } from "@apollo/client";
2
2
  import Order from "../fragments/order.fragment";
3
3
 
4
4
  const query = gql`
@@ -154,6 +154,15 @@ const query = gql`
154
154
  lastName
155
155
  }
156
156
  qrCodeUrl
157
+ orderIntegrationResponse {
158
+ success
159
+ title
160
+ message
161
+ statusCode
162
+ actionType
163
+ createdAt
164
+ orderType
165
+ }
157
166
  payments {
158
167
  _id
159
168
  paymentIntentId
@@ -1,4 +1,4 @@
1
- import {gql} from "@apollo/client";
1
+ import { gql } from "@apollo/client";
2
2
  import Order from "../fragments/order.fragment";
3
3
 
4
4
  const query = gql`
@@ -109,6 +109,15 @@ const query = gql`
109
109
  lng
110
110
  zip
111
111
  }
112
+ orderIntegrationResponse {
113
+ success
114
+ title
115
+ message
116
+ statusCode
117
+ actionType
118
+ createdAt
119
+ orderType
120
+ }
112
121
  payments {
113
122
  _id
114
123
  paymentIntentId
@@ -7,7 +7,7 @@ import { OrderStateEnum } from './IOrderState';
7
7
  import { OrderTypeEnum } from './IOrderType';
8
8
  import { OrderChannelEnum } from '../enums/OrderChannelEnum';
9
9
  import IOrderShareEnum from './IOrderShareEnum';
10
-
10
+ import IOrderIntegrationResponse from './IOrderIntegrationResponse';
11
11
  import IProcessingFee from './IProcessingFees';
12
12
  import IUser from "./IUser";
13
13
  import IFee from "./IFee";
@@ -56,7 +56,8 @@ export default interface IOrder {
56
56
  promoterFee?: IProcessingFee;
57
57
  discountAmount?: number,
58
58
  discount?:string,
59
- sharing?:[IOrderShareEnum]
59
+ sharing?:[IOrderShareEnum],
60
+ orderIntegrationResponse?:IOrderIntegrationResponse[];
60
61
  };
61
62
 
62
63
  export interface IEventGraphQL extends IEvent {
@@ -0,0 +1,9 @@
1
+ export default interface IOrderIntegrationResponse {
2
+ success: boolean;
3
+ title: string;
4
+ message: string;
5
+ statusCode: string;
6
+ actionType: string;
7
+ createdAt: number;
8
+ orderType: string;
9
+ }
@@ -44,8 +44,20 @@ message Order {
44
44
  string email = 33;
45
45
  string discountCode = 34;
46
46
  int32 discountAmount = 35;
47
+ repeated OrderIntegrationResponse orderIntegrationResponse = 36;
48
+ }
47
49
 
50
+ message OrderIntegrationResponse {
51
+ bool success = 0;
52
+ string title = 1;
53
+ string message = 2;
54
+ string statusCode = 3;
55
+ string actionType = 4;
56
+ int32 createdAt = 5;
57
+ string orderType = 6;
58
+ string _id = 7;
48
59
  }
60
+
49
61
  message ProcessingFees {
50
62
  Refund refund = 0;
51
63
  int32 amount = 1;
@@ -440,6 +452,20 @@ message UpdateOrderResponse {
440
452
  repeated Error errors = 2;
441
453
  Order order = 3;
442
454
  }
455
+
456
+
457
+ message OrderIntegrationUpdateRequest {
458
+ string spanContext = 0;
459
+ string orderId = 1;
460
+ string orderIntegrationId = 2;
461
+ }
462
+
463
+ message OrderIntegrationUpdateResponse {
464
+ StatusCode status = 0;
465
+ repeated Error errors = 1;
466
+ Order order = 2;
467
+ }
468
+
443
469
  /****************************************************************************************
444
470
  QR Code
445
471
  ****************************************************************************************/
@@ -810,5 +836,5 @@ service OrderService {
810
836
  rpc getSharingTickets(GetSharingticketsRequest) returns(GetSharingticketsResponse){}
811
837
  rpc getSharedTicketsByEmailPhoneNumber(GetSharedTicketsByEmailPhoneNumberRequest) returns (GetSharedTicketsByEmailPhoneNumberResponse){}
812
838
  rpc sharingTicketStatusChange(SharingTicketStatusChangeRequest) returns(SharingTicketStatusChangeResponse){}
813
-
839
+ rpc orderIntegrationUpdate(OrderIntegrationUpdateRequest) returns(OrderIntegrationUpdateResponse){}
814
840
  }
@@ -376,6 +376,49 @@ const Payment = {
376
376
  },
377
377
  }
378
378
 
379
+ const orderIntegrationResponse = {
380
+ _id: {
381
+ type: String,
382
+ required: false,
383
+ default: shortid.generate,
384
+ },
385
+ success:{
386
+ type: Boolean,
387
+ required: false,
388
+ default: null
389
+ },
390
+ title:{
391
+ type: String,
392
+ required: false,
393
+ default: null
394
+ },
395
+ message:{
396
+ type: String,
397
+ required: false,
398
+ default: null
399
+ },
400
+ statusCode:{
401
+ type: String,
402
+ required: false,
403
+ default: null
404
+ },
405
+ actionType:{
406
+ type: String,
407
+ required: false,
408
+ default: null
409
+ },
410
+ createdAt:{
411
+ type: Number,
412
+ required: false,
413
+ default: null
414
+ },
415
+ orderType:{
416
+ type: String,
417
+ required: false,
418
+ default: null
419
+ },
420
+ }
421
+
379
422
  export default {
380
423
  _id: {
381
424
  type: String,
@@ -538,5 +581,6 @@ export default {
538
581
  }, cancelReason: {
539
582
  type: String,
540
583
  required: false
541
- },sharing:[SharingTickets]
584
+ }, sharing:[SharingTickets]
585
+ , orderIntegrationResponse: [orderIntegrationResponse]
542
586
  };