@chevre/factory 4.388.0-alpha.0 → 4.388.0-alpha.2

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/lib/index.d.ts CHANGED
@@ -128,6 +128,7 @@ import * as BusTripFactory from './trip/busTrip';
128
128
  import { TripType } from './tripType';
129
129
  import { UnitCode } from './unitCode';
130
130
  import * as UnitPriceOfferFactory from './unitPriceOffer';
131
+ import * as OrderNotification from './notification/order';
131
132
  import * as ReservationNotification from './notification/reservation';
132
133
  import * as TaskFactory from './task';
133
134
  import * as AcceptCOAOfferTaskFactory from './task/acceptCOAOffer';
@@ -348,6 +349,7 @@ export import merchantReturnPolicy = MerchantReturnPolicyFactory;
348
349
  export import monetaryAmount = MonetaryAmountFactory;
349
350
  export type multilingualString = IMultilingualString;
350
351
  export declare namespace notification {
352
+ export import order = OrderNotification;
351
353
  export import reservation = ReservationNotification;
352
354
  }
353
355
  export import offer = OfferFactory;
package/lib/index.js CHANGED
@@ -117,6 +117,7 @@ var BusTripFactory = require("./trip/busTrip");
117
117
  var tripType_1 = require("./tripType");
118
118
  var unitCode_1 = require("./unitCode");
119
119
  var UnitPriceOfferFactory = require("./unitPriceOffer");
120
+ var OrderNotification = require("./notification/order");
120
121
  var ReservationNotification = require("./notification/reservation");
121
122
  var AcceptCOAOfferTaskFactory = require("./task/acceptCOAOffer");
122
123
  var AccountMoneyTransferTaskFactory = require("./task/accountMoneyTransfer");
@@ -330,6 +331,8 @@ exports.merchantReturnPolicy = MerchantReturnPolicyFactory;
330
331
  exports.monetaryAmount = MonetaryAmountFactory;
331
332
  var notification;
332
333
  (function (notification) {
334
+ // tslint:disable-next-line:no-shadowed-variable
335
+ notification.order = OrderNotification;
333
336
  // tslint:disable-next-line:no-shadowed-variable
334
337
  notification.reservation = ReservationNotification;
335
338
  })(notification = exports.notification || (exports.notification = {}));
@@ -0,0 +1,40 @@
1
+ import { IAcceptedOffer, IItemOffered, IOrder } from '../order';
2
+ import { OrderStatus } from '../orderStatus';
3
+ /**
4
+ * 返品通知
5
+ */
6
+ export type IReturnedOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'orderNumber' | 'dateReturned'> & {
7
+ id?: string;
8
+ orderStatus: OrderStatus.OrderReturned;
9
+ };
10
+ /**
11
+ * 注文作成通知
12
+ */
13
+ export type IProcessingOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'seller' | 'price' | 'priceCurrency' | 'confirmationNumber' | 'orderNumber' | 'orderStatus' | 'orderDate' | 'customer' | 'paymentMethods'> & {
14
+ acceptedOffers: [];
15
+ id?: string;
16
+ numAcceptedOffers: number;
17
+ orderStatus: OrderStatus.OrderProcessing;
18
+ };
19
+ /**
20
+ * 配送中通知
21
+ */
22
+ export type IInTransitOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'orderNumber'> & {
23
+ acceptedOffers: IAcceptedOffer<IItemOffered>[];
24
+ id?: string;
25
+ orderStatus: OrderStatus.OrderInTransit;
26
+ };
27
+ /**
28
+ * 配送済通知
29
+ */
30
+ export type IDeliveredOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'orderNumber'> & {
31
+ id?: string;
32
+ orderStatus: OrderStatus.OrderDelivered;
33
+ };
34
+ /**
35
+ * 属性変更時注文通知
36
+ */
37
+ export type IUpdatedOrder4inform = Pick<IOrder, 'typeOf' | 'orderNumber' | 'name' | 'project'> & {
38
+ updatedAt: Date;
39
+ };
40
+ export type IOrder4inform = IProcessingOrder4inform | IInTransitOrder4inform | IDeliveredOrder4inform | IReturnedOrder4inform | IUpdatedOrder4inform;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/project.d.ts CHANGED
@@ -26,12 +26,6 @@ export interface IOnPaymentStatusChanged {
26
26
  export interface IOnReservationUsed {
27
27
  informAction?: IInformParams[];
28
28
  }
29
- /**
30
- * 注文ステータス変更時イベント
31
- */
32
- export interface IOnOrderStatusChanged {
33
- informOrder?: IInformParams[];
34
- }
35
29
  /**
36
30
  * ウェブフック設定
37
31
  */
@@ -52,7 +46,6 @@ export interface ISendEmailMessageSettings {
52
46
  */
53
47
  export interface ISettings {
54
48
  importEventsInWeeks?: number;
55
- onOrderStatusChanged?: IOnOrderStatusChanged;
56
49
  sendEmailMessage?: ISendEmailMessageSettings;
57
50
  sendgridApiKey?: string;
58
51
  useMyCreditCards?: boolean;
@@ -1,9 +1,16 @@
1
1
  import { IExtendId } from '../autoGenerated';
2
+ import { IOrder4inform } from '../notification/order';
2
3
  import { IReservation4inform } from '../notification/reservation';
3
4
  import * as TaskFactory from '../task';
4
5
  import { TaskName } from '../taskName';
5
- export type INotification = IReservation4inform;
6
- export type IData = INotification[] | INotification;
6
+ export type INotification = IOrder4inform | IReservation4inform | IReservation4inform[];
7
+ export interface IData {
8
+ /**
9
+ * 通知識別子
10
+ */
11
+ identifier?: string;
12
+ object: INotification;
13
+ }
7
14
  export interface IAttributes extends TaskFactory.IAttributes {
8
15
  name: TaskName.HandleNotification;
9
16
  data: IData;
@@ -2,7 +2,12 @@ import { IAttributes as IInformActionAttributes, IObject } from '../action/inter
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import * as TaskFactory from '../task';
4
4
  import { TaskName } from '../taskName';
5
- export type IPotentialInformAction = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'recipient'>;
5
+ export type IPotentialInformAction = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'recipient'> & {
6
+ /**
7
+ * 通知識別子(2024-10-24~)
8
+ */
9
+ identifier?: string;
10
+ };
6
11
  export type IData = IPotentialInformAction;
7
12
  export interface IAttributes extends TaskFactory.IAttributes {
8
13
  name: TaskName.TriggerWebhook;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.388.0-alpha.0",
3
+ "version": "4.388.0-alpha.2",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",