@chaosinsight/postoffice-portalclient 1.26.3 → 1.26.4
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/extensions/locations.d.ts +4 -4
- package/dist/extensions/locations.js +6 -6
- package/dist/extensions/locations.js.map +1 -1
- package/dist/extensions/reportSubscription.d.ts +5 -1
- package/dist/extensions/reportSubscription.js +5 -1
- package/dist/extensions/reportSubscription.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/extensions/locations.ts +7 -7
- package/src/extensions/reportSubscription.ts +6 -1
- package/src/index.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Extension, IServiceCall } from "@chaosinsight/portalclient";
|
|
2
|
-
import type { DealState, IContentGroup, IFile, IFilter, ILocationDealTextConfiguration, ILocationReportSubscription, IPickUpDeal, IPostWithDeal, IPostWithStatisticsAndDeal, IPostWithStatisticsAndLocation, IProduct, IPublicServiceConnection, IPublicUser, IScheduledTemplate, IService, IServiceConnectionIdentity, ISummaryStatistics, ISummeryDealPostStatistics, ITemplateCategory, LocationReportComparePeriod, LocationReportType, PostType, ServiceConnectionType, ServiceType } from "../index";
|
|
2
|
+
import type { DealState, IContentGroup, IFile, IFilter, ILocationDealTextConfiguration, ILocationReportSubscription, IPickUpDeal, IPostWithDeal, IPostWithStatisticsAndDeal, IPostWithStatisticsAndLocation, IProduct, IPublicServiceConnection, IPublicUser, IScheduledTemplate, IService, IServiceConnectionIdentity, ISummaryStatistics, ISummeryDealPostStatistics, ITemplateCategory, LocationReportComparePeriod, LocationReportPeriod, LocationReportType, PostType, ServiceConnectionType, ServiceType } from "../index";
|
|
3
3
|
export default class Locations extends Extension {
|
|
4
4
|
protected extensionName: string;
|
|
5
5
|
get(pageIndex?: number, pageSize?: number, query?: string): IServiceCall<ILocation[]>;
|
|
@@ -17,9 +17,9 @@ export default class Locations extends Extension {
|
|
|
17
17
|
postsPost(locationId: number, serviceType: ServiceConnectionType | null, postType: PostType | undefined, message: string | null, link: string | null, publishDate: Date | null, scheduledTemplateId: number | null, templateId: number | null, deal: IPickUpDeal<null, IProduct<null, null>> | null, matchEnd?: string): IServiceCall<IPostWithDeal>;
|
|
18
18
|
postsStatisticsSummaryGet(locationsId: number, currentFrom: Date, currentTo: Date, previousFrom: Date, previousTo: Date, q?: string, serviceType?: ServiceType, isDeal?: boolean): IServiceCall<ISummaryStatistics<ISummeryDealPostStatistics>>;
|
|
19
19
|
postsRankingsGet(locationsId: number, from: Date, to: Date, q?: string, serviceType?: ServiceType, isDeal?: boolean, pageIndex?: number, pageSize?: number): IServiceCall<IPostWithStatisticsAndLocation[]>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
reportsSubscriptionGet(locationId: number, reportType: LocationReportType): IServiceCall<ILocationReportSubscription[]>;
|
|
21
|
+
reportsSubscriptionPost(locationId: number, reportType: LocationReportType, period: LocationReportPeriod, comparePeriod: LocationReportComparePeriod, serviceType: ServiceType): IServiceCall<void>;
|
|
22
|
+
reportsSubscriptionDelete(locationId: number, reportType: LocationReportType, reportPeriod: LocationReportPeriod): IServiceCall<void>;
|
|
23
23
|
scheduledTemplatesGet(locationId: number, from?: Date, to?: Date): IServiceCall<IScheduledTemplate[]>;
|
|
24
24
|
templateCategoriesGet(locationId: number): IServiceCall<ITemplateCategory[]>;
|
|
25
25
|
servicesGet(locationId: number): IServiceCall<IService[]>;
|
|
@@ -46,14 +46,14 @@ export default class Locations extends Extension {
|
|
|
46
46
|
postsRankingsGet(locationsId, from, to, q, serviceType, isDeal, pageIndex = 0, pageSize = 20) {
|
|
47
47
|
return this.call(locationsId.toString(10) + "/PostRankings", { from, to, q, serviceType, isDeal, pageIndex, pageSize }, HttpMethod.Get, SessionRequirement.authenticated);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
return this.call(`${locationId.toString(10)}/
|
|
49
|
+
reportsSubscriptionGet(locationId, reportType) {
|
|
50
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions`, null, HttpMethod.Get, SessionRequirement.authenticated);
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
return this.call(`${locationId.toString(10)}/
|
|
52
|
+
reportsSubscriptionPost(locationId, reportType, period, comparePeriod, serviceType) {
|
|
53
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions`, { period, comparePeriod, serviceType }, HttpMethod.PostJson, SessionRequirement.authenticated);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
return this.call(`${locationId.toString(10)}/
|
|
55
|
+
reportsSubscriptionDelete(locationId, reportType, reportPeriod) {
|
|
56
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions/${reportType.toString(10)}`, { reportPeriod }, HttpMethod.Delete, SessionRequirement.authenticated);
|
|
57
57
|
}
|
|
58
58
|
scheduledTemplatesGet(locationId, from, to) {
|
|
59
59
|
return this.call(locationId.toString(10) + "/ScheduledTemplates", { from, to }, HttpMethod.Get, SessionRequirement.authenticated);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../../src/extensions/locations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAgB,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAGlG,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;IACrC,aAAa,GAAW,WAAW,CAAA;IAEtC,GAAG,CAAC,SAAkB,EAAE,QAAiB,EAAE,KAAc;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAC,EAAE,UAAU,CAAC,GAAG,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IACvG,CAAC;IAEM,QAAQ,CAAC,GAAW;QAC1B,OAAO,IAAI,C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EAAE,CAAC,GAAI,SAAS,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAC3H,CAAC;CACD;AAoDD,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA"}
|
|
@@ -16,11 +16,15 @@ export interface IOrganizationReportSubscription extends IReportSubscription {
|
|
|
16
16
|
export interface ILocationReportSubscription extends IReportSubscription {
|
|
17
17
|
LocationId: number;
|
|
18
18
|
LocationName: string;
|
|
19
|
-
|
|
19
|
+
Period: LocationReportPeriod;
|
|
20
20
|
ComparePeriod: LocationReportComparePeriod;
|
|
21
|
+
Type: LocationReportType;
|
|
21
22
|
ServiceType: ServiceType;
|
|
22
23
|
}
|
|
23
24
|
export declare enum LocationReportType {
|
|
25
|
+
default = 1
|
|
26
|
+
}
|
|
27
|
+
export declare enum LocationReportPeriod {
|
|
24
28
|
weekly = 1
|
|
25
29
|
}
|
|
26
30
|
export declare enum LocationReportComparePeriod {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export var LocationReportType;
|
|
2
2
|
(function (LocationReportType) {
|
|
3
|
-
LocationReportType[LocationReportType["
|
|
3
|
+
LocationReportType[LocationReportType["default"] = 1] = "default";
|
|
4
4
|
})(LocationReportType || (LocationReportType = {}));
|
|
5
|
+
export var LocationReportPeriod;
|
|
6
|
+
(function (LocationReportPeriod) {
|
|
7
|
+
LocationReportPeriod[LocationReportPeriod["weekly"] = 1] = "weekly";
|
|
8
|
+
})(LocationReportPeriod || (LocationReportPeriod = {}));
|
|
5
9
|
export var LocationReportComparePeriod;
|
|
6
10
|
(function (LocationReportComparePeriod) {
|
|
7
11
|
LocationReportComparePeriod[LocationReportComparePeriod["sameTimeLastWeek"] = 0] = "sameTimeLastWeek";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportSubscription.js","sourceRoot":"","sources":["../../src/extensions/reportSubscription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reportSubscription.js","sourceRoot":"","sources":["../../src/extensions/reportSubscription.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAN,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC7B,iEAAW,CAAA;AACZ,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,QAE7B;AAED,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC/B,mEAAU,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACtC,qGAAoB,CAAA;IACpB,qGAAoB,CAAA;AACrB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAED,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IACnC,yEAAS,CAAA;IACT,2EAAU,CAAA;IACV,6EAAW,CAAA;AACZ,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AAED,MAAM,CAAN,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IACjC,yEAAW,CAAA;AACZ,CAAC,EAFW,sBAAsB,KAAtB,sBAAsB,QAEjC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { DealState } from "./extensions/deals";
|
|
|
20
20
|
export { FilterType } from "./extensions/filters";
|
|
21
21
|
export { InvitationType, OrganizationRole, ServiceType } from "./extensions/organizations";
|
|
22
22
|
export { DeleteReason, PostError, PostState, PostType } from "./extensions/posts";
|
|
23
|
-
export { LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType } from "./extensions/reportSubscription";
|
|
23
|
+
export { LocationReportPeriod, LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType } from "./extensions/reportSubscription";
|
|
24
24
|
export { ServiceConnectionType } from "./extensions/serviceConnections";
|
|
25
25
|
export { FileStatus } from "./iFile";
|
|
26
26
|
export type { IContentGroup, IPrivateContentGroup, IContentGroupContent } from "./extensions/contentGroups";
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { DealState } from "./extensions/deals";
|
|
|
20
20
|
export { FilterType } from "./extensions/filters";
|
|
21
21
|
export { InvitationType, OrganizationRole, ServiceType } from "./extensions/organizations";
|
|
22
22
|
export { DeleteReason, PostError, PostState, PostType } from "./extensions/posts";
|
|
23
|
-
export { LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType } from "./extensions/reportSubscription";
|
|
23
|
+
export { LocationReportPeriod, LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType } from "./extensions/reportSubscription";
|
|
24
24
|
export { ServiceConnectionType } from "./extensions/serviceConnections";
|
|
25
25
|
export { FileStatus } from "./iFile";
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,oBAAoB,CAAA;AAC3B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,qBAAqB,CAAA;AAC5B,OAAO,4BAA4B,CAAA;AACnC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,0BAA0B,CAAA;AACjC,OAAO,8BAA8B,CAAA;AACrC,OAAO,iCAAiC,CAAA;AACxC,OAAO,iCAAiC,CAAA;AACxC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,kCAAkC,CAAA;AACzC,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAC,UAAU,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,sBAAsB,EAAC,MAAM,iCAAiC,CAAA;AACvK,OAAO,EAAC,qBAAqB,EAAC,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Extension, HttpMethod, IServiceCall, SessionRequirement} from "@chaosinsight/portalclient"
|
|
2
|
-
import type {DealState, IContentGroup, IFile, IFilter, ILocationDealTextConfiguration, ILocationReportSubscription, IPickUpDeal, IPostWithDeal, IPostWithStatisticsAndDeal, IPostWithStatisticsAndLocation, IProduct, IPublicServiceConnection, IPublicUser, IScheduledTemplate, IService, IServiceConnectionIdentity, ISummaryStatistics, ISummeryDealPostStatistics, ITemplateCategory, LocationReportComparePeriod, LocationReportType, PostType, ServiceConnectionType, ServiceType} from "../index"
|
|
2
|
+
import type {DealState, IContentGroup, IFile, IFilter, ILocationDealTextConfiguration, ILocationReportSubscription, IPickUpDeal, IPostWithDeal, IPostWithStatisticsAndDeal, IPostWithStatisticsAndLocation, IProduct, IPublicServiceConnection, IPublicUser, IScheduledTemplate, IService, IServiceConnectionIdentity, ISummaryStatistics, ISummeryDealPostStatistics, ITemplateCategory, LocationReportComparePeriod, LocationReportPeriod, LocationReportType, PostType, ServiceConnectionType, ServiceType} from "../index"
|
|
3
3
|
|
|
4
4
|
export default class Locations extends Extension {
|
|
5
5
|
protected extensionName: string = "Locations"
|
|
@@ -64,16 +64,16 @@ export default class Locations extends Extension {
|
|
|
64
64
|
return this.call(locationsId.toString(10) + "/PostRankings", {from, to, q, serviceType, isDeal, pageIndex, pageSize}, HttpMethod.Get, SessionRequirement.authenticated)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
public
|
|
68
|
-
return this.call(`${locationId.toString(10)}/
|
|
67
|
+
public reportsSubscriptionGet(locationId: number, reportType: LocationReportType): IServiceCall<ILocationReportSubscription[]> {
|
|
68
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions`, null, HttpMethod.Get, SessionRequirement.authenticated)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
public
|
|
72
|
-
return this.call(`${locationId.toString(10)}/
|
|
71
|
+
public reportsSubscriptionPost(locationId: number, reportType: LocationReportType, period: LocationReportPeriod, comparePeriod: LocationReportComparePeriod, serviceType: ServiceType): IServiceCall<void> {
|
|
72
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions`, {period, comparePeriod, serviceType}, HttpMethod.PostJson, SessionRequirement.authenticated)
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
public
|
|
76
|
-
return this.call(`${locationId.toString(10)}/
|
|
75
|
+
public reportsSubscriptionDelete(locationId: number, reportType: LocationReportType, reportPeriod: LocationReportPeriod): IServiceCall<void> {
|
|
76
|
+
return this.call(`${locationId.toString(10)}/Reports/${reportType.toString(10)}/Subscriptions/${reportType.toString(10)}`, {reportPeriod}, HttpMethod.Delete, SessionRequirement.authenticated)
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
public scheduledTemplatesGet(locationId: number, from?: Date, to?: Date): IServiceCall<IScheduledTemplate[]> {
|
|
@@ -19,12 +19,17 @@ export interface IOrganizationReportSubscription extends IReportSubscription{
|
|
|
19
19
|
export interface ILocationReportSubscription extends IReportSubscription {
|
|
20
20
|
LocationId: number
|
|
21
21
|
LocationName: string
|
|
22
|
-
|
|
22
|
+
Period: LocationReportPeriod
|
|
23
23
|
ComparePeriod: LocationReportComparePeriod
|
|
24
|
+
Type: LocationReportType
|
|
24
25
|
ServiceType: ServiceType
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export enum LocationReportType {
|
|
29
|
+
default = 1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export enum LocationReportPeriod {
|
|
28
33
|
weekly = 1
|
|
29
34
|
}
|
|
30
35
|
|
package/src/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ export {DealState} from "./extensions/deals"
|
|
|
22
22
|
export {FilterType} from "./extensions/filters"
|
|
23
23
|
export {InvitationType,OrganizationRole, ServiceType} from "./extensions/organizations"
|
|
24
24
|
export {DeleteReason, PostError, PostState, PostType} from "./extensions/posts"
|
|
25
|
-
export {LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType} from "./extensions/reportSubscription"
|
|
25
|
+
export {LocationReportPeriod, LocationReportComparePeriod, LocationReportType, OrganizationReportPeriod, OrganizationReportType} from "./extensions/reportSubscription"
|
|
26
26
|
export {ServiceConnectionType} from "./extensions/serviceConnections"
|
|
27
27
|
export {FileStatus} from "./iFile"
|
|
28
28
|
|