@be-link/cs-cli-nodejs 0.1.146 → 0.1.148
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/cs/modules/productPodcast/service.d.ts +18 -0
- package/cs/modules/productPodcast/service.js +31 -0
- package/cs/modules/productPodcast/service.js.map +1 -0
- package/cs/modules/productPodcast/type.d.ts +222 -0
- package/cs/modules/productPodcast/type.js +3 -0
- package/cs/modules/productPodcast/type.js.map +1 -0
- package/cs/modules/tourListing/service.d.ts +29 -0
- package/cs/modules/tourListing/service.js +54 -0
- package/cs/modules/tourListing/service.js.map +1 -0
- package/cs/modules/tourListing/types.d.ts +186 -0
- package/cs/modules/tourListing/types.js +3 -0
- package/cs/modules/tourListing/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +29 -25
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BaseService from '../baseService';
|
|
2
|
+
import { ProductPodcast } from './type';
|
|
3
|
+
/** Internal-token API. BFF resolves actors; source facts and worker results are never accepted. */
|
|
4
|
+
declare class ProductPodcastService extends BaseService implements ProductPodcast.HttpController {
|
|
5
|
+
prefixUrl: string;
|
|
6
|
+
submit(request: Parameters<ProductPodcast.HttpController['submit']>[0]): Promise<ProductPodcast.Versioned>;
|
|
7
|
+
preview(request: Parameters<ProductPodcast.HttpController['preview']>[0]): Promise<{
|
|
8
|
+
url: string;
|
|
9
|
+
expiresAt: number;
|
|
10
|
+
revision: number;
|
|
11
|
+
audioHash: string;
|
|
12
|
+
} | null>;
|
|
13
|
+
getRecord(request: Parameters<ProductPodcast.HttpController['getRecord']>[0]): Promise<ProductPodcast.Versioned | null>;
|
|
14
|
+
execute(request: Parameters<ProductPodcast.HttpController['execute']>[0]): Promise<ProductPodcast.Versioned>;
|
|
15
|
+
getPlayback(request: Parameters<ProductPodcast.HttpController['getPlayback']>[0]): Promise<ProductPodcast.PublicPlayback | null>;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: ProductPodcastService;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const http_1 = require("../../http");
|
|
7
|
+
const baseService_1 = __importDefault(require("../baseService"));
|
|
8
|
+
/** Internal-token API. BFF resolves actors; source facts and worker results are never accepted. */
|
|
9
|
+
class ProductPodcastService extends baseService_1.default {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.prefixUrl = '/product-podcast';
|
|
13
|
+
}
|
|
14
|
+
submit(request) {
|
|
15
|
+
return (0, http_1.callApi)(this.getApiUrl(this.submit), request);
|
|
16
|
+
}
|
|
17
|
+
preview(request) {
|
|
18
|
+
return (0, http_1.callApi)(this.getApiUrl(this.preview), request);
|
|
19
|
+
}
|
|
20
|
+
getRecord(request) {
|
|
21
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getRecord), request);
|
|
22
|
+
}
|
|
23
|
+
execute(request) {
|
|
24
|
+
return (0, http_1.callApi)(this.getApiUrl(this.execute), request);
|
|
25
|
+
}
|
|
26
|
+
getPlayback(request) {
|
|
27
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getPlayback), request);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = new ProductPodcastService();
|
|
31
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/cs/modules/productPodcast/service.ts"],"names":[],"mappings":";;;;;AAAA,qCAAoC;AACpC,iEAAwC;AAGxC,mGAAmG;AACnG,MAAM,qBAAsB,SAAQ,qBAAW;IAA/C;;QACE,cAAS,GAAG,kBAAkB,CAAA;IAqBhC,CAAC;IAnBC,MAAM,CAAC,OAA+D;QACpE,OAAO,IAAA,cAAO,EAA0C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;IAC/F,CAAC;IAED,OAAO,CAAC,OAAgE;QACtE,OAAO,IAAA,cAAO,EAA2C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;IACjG,CAAC;IAED,SAAS,CAAC,OAAkE;QAC1E,OAAO,IAAA,cAAO,EAA6C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CAAA;IACrG,CAAC;IAED,OAAO,CAAC,OAAgE;QACtE,OAAO,IAAA,cAAO,EAA2C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;IACjG,CAAC;IAED,WAAW,CAAC,OAAoE;QAC9E,OAAO,IAAA,cAAO,EAA+C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAA;IACzG,CAAC;CACF;AAED,kBAAe,IAAI,qBAAqB,EAAE,CAAA"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/** Internal service contract. Actors and snapshots must be resolved by a trusted BFF,
|
|
2
|
+
* never copied from an unauthenticated browser request. Amounts are integer fen. */
|
|
3
|
+
export declare namespace ProductPodcast {
|
|
4
|
+
type Profile = 'tour' | 'hotel';
|
|
5
|
+
type Capability = 'submit' | 'review' | 'finalReview' | 'disable' | 'retry';
|
|
6
|
+
type State = 'blocked' | 'draft_queued' | 'drafting' | 'script_review' | 'synth_queued' | 'synthesizing' | 'audio_review' | 'manager_review' | 'ready' | 'published' | 'disabled' | 'failed';
|
|
7
|
+
interface Actor {
|
|
8
|
+
id: string;
|
|
9
|
+
capabilities: Capability[];
|
|
10
|
+
}
|
|
11
|
+
interface Fact {
|
|
12
|
+
id: string;
|
|
13
|
+
text: string;
|
|
14
|
+
source: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface Price {
|
|
18
|
+
/** Defaults to member for historical records. Use sale when detail has no member offer. */
|
|
19
|
+
kind?: 'member' | 'sale';
|
|
20
|
+
amountFen: number;
|
|
21
|
+
unit: string;
|
|
22
|
+
conditions: string;
|
|
23
|
+
/** Fingerprint of the currently sellable minimum member offer. */
|
|
24
|
+
offerKey: string;
|
|
25
|
+
available: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface Snapshot {
|
|
28
|
+
itemId: string;
|
|
29
|
+
scopeKey: string;
|
|
30
|
+
profile: Profile;
|
|
31
|
+
/** Monotonic version produced by the source aggregator, not a client timestamp. */
|
|
32
|
+
sourceSequence: number;
|
|
33
|
+
sourceVersions: {
|
|
34
|
+
[source: string]: string;
|
|
35
|
+
};
|
|
36
|
+
onSale: boolean;
|
|
37
|
+
title: string;
|
|
38
|
+
facts: Fact[];
|
|
39
|
+
issues: string[];
|
|
40
|
+
price?: Price;
|
|
41
|
+
}
|
|
42
|
+
interface Turn {
|
|
43
|
+
role: 'female' | 'male';
|
|
44
|
+
text: string;
|
|
45
|
+
factIds: string[];
|
|
46
|
+
}
|
|
47
|
+
interface Script {
|
|
48
|
+
turns: Turn[];
|
|
49
|
+
hash: string;
|
|
50
|
+
}
|
|
51
|
+
interface Audio {
|
|
52
|
+
objectKey: string;
|
|
53
|
+
sha256: string;
|
|
54
|
+
durationSeconds: number;
|
|
55
|
+
scriptHash: string;
|
|
56
|
+
decoded: boolean;
|
|
57
|
+
providerRequestId?: string;
|
|
58
|
+
}
|
|
59
|
+
interface Claim {
|
|
60
|
+
token: string;
|
|
61
|
+
phase: 'draft' | 'synth';
|
|
62
|
+
revision: number;
|
|
63
|
+
expiresAt: number;
|
|
64
|
+
}
|
|
65
|
+
interface Review {
|
|
66
|
+
actorId: string;
|
|
67
|
+
revision: number;
|
|
68
|
+
scriptHash: string;
|
|
69
|
+
audioHash?: string;
|
|
70
|
+
at: number;
|
|
71
|
+
}
|
|
72
|
+
interface Audit {
|
|
73
|
+
actorId: string;
|
|
74
|
+
action: string;
|
|
75
|
+
revision: number;
|
|
76
|
+
at: number;
|
|
77
|
+
reason?: string;
|
|
78
|
+
requestId?: string;
|
|
79
|
+
}
|
|
80
|
+
interface Record {
|
|
81
|
+
key: string;
|
|
82
|
+
revision: number;
|
|
83
|
+
snapshot: Snapshot;
|
|
84
|
+
fingerprint: string;
|
|
85
|
+
state: State;
|
|
86
|
+
script?: Script;
|
|
87
|
+
audio?: Audio;
|
|
88
|
+
claim?: Claim;
|
|
89
|
+
scriptReview?: Review;
|
|
90
|
+
audioReview?: Review;
|
|
91
|
+
finalReview?: Review;
|
|
92
|
+
failure?: {
|
|
93
|
+
phase: 'draft' | 'synth';
|
|
94
|
+
outcomeUnknown: boolean;
|
|
95
|
+
code: string;
|
|
96
|
+
requestId?: string;
|
|
97
|
+
};
|
|
98
|
+
attempts: {
|
|
99
|
+
draft: number;
|
|
100
|
+
synth: number;
|
|
101
|
+
};
|
|
102
|
+
audit: Audit[];
|
|
103
|
+
}
|
|
104
|
+
interface Versioned {
|
|
105
|
+
version: number;
|
|
106
|
+
record: Record;
|
|
107
|
+
}
|
|
108
|
+
interface Playback {
|
|
109
|
+
revision: number;
|
|
110
|
+
audioHash: string;
|
|
111
|
+
objectKey: string;
|
|
112
|
+
durationSeconds: number;
|
|
113
|
+
transcript: string;
|
|
114
|
+
aiGenerated: true;
|
|
115
|
+
defaultPlaybackRate: 1;
|
|
116
|
+
}
|
|
117
|
+
type Command = {
|
|
118
|
+
kind: 'submit';
|
|
119
|
+
snapshot: Snapshot;
|
|
120
|
+
actor: Actor;
|
|
121
|
+
regenerate?: boolean;
|
|
122
|
+
} | {
|
|
123
|
+
kind: 'editScript';
|
|
124
|
+
turns: Turn[];
|
|
125
|
+
actor: Actor;
|
|
126
|
+
} | {
|
|
127
|
+
kind: 'approveScript';
|
|
128
|
+
actor: Actor;
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'approveAudio';
|
|
131
|
+
actor: Actor;
|
|
132
|
+
} | {
|
|
133
|
+
kind: 'finalReview';
|
|
134
|
+
actor: Actor;
|
|
135
|
+
} | {
|
|
136
|
+
kind: 'disable';
|
|
137
|
+
reason: string;
|
|
138
|
+
actor: Actor;
|
|
139
|
+
} | {
|
|
140
|
+
kind: 'retry';
|
|
141
|
+
previousRequestChecked: boolean;
|
|
142
|
+
actor: Actor;
|
|
143
|
+
} | {
|
|
144
|
+
kind: 'claim';
|
|
145
|
+
token: string;
|
|
146
|
+
leaseMs: number;
|
|
147
|
+
} | {
|
|
148
|
+
kind: 'completeDraft';
|
|
149
|
+
token: string;
|
|
150
|
+
revision: number;
|
|
151
|
+
turns: Turn[];
|
|
152
|
+
} | {
|
|
153
|
+
kind: 'completeAudio';
|
|
154
|
+
token: string;
|
|
155
|
+
revision: number;
|
|
156
|
+
audio: Audio;
|
|
157
|
+
} | {
|
|
158
|
+
kind: 'fail';
|
|
159
|
+
token: string;
|
|
160
|
+
revision: number;
|
|
161
|
+
code: string;
|
|
162
|
+
outcomeUnknown: boolean;
|
|
163
|
+
} | {
|
|
164
|
+
kind: 'expire';
|
|
165
|
+
};
|
|
166
|
+
interface Controller {
|
|
167
|
+
getRecord(request: {
|
|
168
|
+
itemId: string;
|
|
169
|
+
scopeKey: string;
|
|
170
|
+
}): Promise<Versioned | null>;
|
|
171
|
+
execute(request: {
|
|
172
|
+
itemId: string;
|
|
173
|
+
scopeKey: string;
|
|
174
|
+
expectedVersion: number;
|
|
175
|
+
command: Command;
|
|
176
|
+
}): Promise<Versioned>;
|
|
177
|
+
/** Fresh source validation is performed by the server, never supplied by a consumer. */
|
|
178
|
+
getPlayback(request: {
|
|
179
|
+
itemId: string;
|
|
180
|
+
scopeKey: string;
|
|
181
|
+
}): Promise<Playback | null>;
|
|
182
|
+
}
|
|
183
|
+
type PublicPlayback = Omit<Playback, 'objectKey'> & {
|
|
184
|
+
url: string;
|
|
185
|
+
expiresAt: number;
|
|
186
|
+
};
|
|
187
|
+
type ReviewCommand = Extract<Command, {
|
|
188
|
+
kind: 'editScript' | 'approveScript' | 'approveAudio' | 'disable' | 'retry';
|
|
189
|
+
}>;
|
|
190
|
+
interface HttpController {
|
|
191
|
+
getRecord(request: {
|
|
192
|
+
itemId: string;
|
|
193
|
+
scopeKey: 'common';
|
|
194
|
+
}): Promise<Versioned | null>;
|
|
195
|
+
submit(request: {
|
|
196
|
+
itemId: string;
|
|
197
|
+
scopeKey: 'common';
|
|
198
|
+
expectedVersion: number;
|
|
199
|
+
actor: Actor;
|
|
200
|
+
regenerate?: boolean;
|
|
201
|
+
}): Promise<Versioned>;
|
|
202
|
+
execute(request: {
|
|
203
|
+
itemId: string;
|
|
204
|
+
scopeKey: 'common';
|
|
205
|
+
expectedVersion: number;
|
|
206
|
+
command: ReviewCommand;
|
|
207
|
+
}): Promise<Versioned>;
|
|
208
|
+
getPlayback(request: {
|
|
209
|
+
itemId: string;
|
|
210
|
+
scopeKey: 'common';
|
|
211
|
+
}): Promise<PublicPlayback | null>;
|
|
212
|
+
preview(request: {
|
|
213
|
+
itemId: string;
|
|
214
|
+
scopeKey: 'common';
|
|
215
|
+
}): Promise<{
|
|
216
|
+
url: string;
|
|
217
|
+
expiresAt: number;
|
|
218
|
+
revision: number;
|
|
219
|
+
audioHash: string;
|
|
220
|
+
} | null>;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../src/cs/modules/productPodcast/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import BaseService from '../baseService';
|
|
2
|
+
import { TourListing } from './types';
|
|
3
|
+
declare class TourListingService extends BaseService implements TourListing.Controller {
|
|
4
|
+
prefixUrl: string;
|
|
5
|
+
cancelPublication(request: Parameters<TourListing.Controller['cancelPublication']>[0]): Promise<TourListing.Record>;
|
|
6
|
+
publish(request: TourListing.Change): Promise<TourListing.Record>;
|
|
7
|
+
revise(request: TourListing.Change): Promise<TourListing.Record>;
|
|
8
|
+
importXiumi(request: Parameters<TourListing.Controller['importXiumi']>[0]): Promise<{
|
|
9
|
+
title: string;
|
|
10
|
+
html: string;
|
|
11
|
+
sourceUrl: string;
|
|
12
|
+
}>;
|
|
13
|
+
create(request: Parameters<TourListing.Controller['create']>[0]): Promise<TourListing.Record>;
|
|
14
|
+
get(request: Parameters<TourListing.Controller['get']>[0]): Promise<TourListing.Record & {
|
|
15
|
+
events: TourListing.Event[];
|
|
16
|
+
}>;
|
|
17
|
+
list(request: Parameters<TourListing.Controller['list']>[0]): Promise<{
|
|
18
|
+
records: TourListing.Record[];
|
|
19
|
+
total: number;
|
|
20
|
+
}>;
|
|
21
|
+
save(request: Parameters<TourListing.Controller['save']>[0]): Promise<TourListing.Record>;
|
|
22
|
+
submit(request: Parameters<TourListing.Controller['submit']>[0]): Promise<TourListing.Record>;
|
|
23
|
+
withdraw(request: Parameters<TourListing.Controller['withdraw']>[0]): Promise<TourListing.Record>;
|
|
24
|
+
returnForChanges(request: Parameters<TourListing.Controller['returnForChanges']>[0]): Promise<TourListing.Record>;
|
|
25
|
+
approveContent(request: Parameters<TourListing.Controller['approveContent']>[0]): Promise<TourListing.Record>;
|
|
26
|
+
confirmPricing(request: Parameters<TourListing.Controller['confirmPricing']>[0]): Promise<TourListing.Record>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: TourListingService;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const http_1 = require("../../http");
|
|
7
|
+
const baseService_1 = __importDefault(require("../baseService"));
|
|
8
|
+
class TourListingService extends baseService_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.prefixUrl = '/tour-listing';
|
|
12
|
+
}
|
|
13
|
+
cancelPublication(request) {
|
|
14
|
+
return (0, http_1.callApi)(this.getApiUrl(this.cancelPublication), request);
|
|
15
|
+
}
|
|
16
|
+
publish(request) {
|
|
17
|
+
return (0, http_1.callApi)(this.getApiUrl(this.publish), request);
|
|
18
|
+
}
|
|
19
|
+
revise(request) {
|
|
20
|
+
return (0, http_1.callApi)(this.getApiUrl(this.revise), request);
|
|
21
|
+
}
|
|
22
|
+
importXiumi(request) {
|
|
23
|
+
return (0, http_1.callApi)(this.getApiUrl(this.importXiumi), request);
|
|
24
|
+
}
|
|
25
|
+
create(request) {
|
|
26
|
+
return (0, http_1.callApi)(this.getApiUrl(this.create), request);
|
|
27
|
+
}
|
|
28
|
+
get(request) {
|
|
29
|
+
return (0, http_1.callApi)(this.getApiUrl(this.get), request);
|
|
30
|
+
}
|
|
31
|
+
list(request) {
|
|
32
|
+
return (0, http_1.callApi)(this.getApiUrl(this.list), request);
|
|
33
|
+
}
|
|
34
|
+
save(request) {
|
|
35
|
+
return (0, http_1.callApi)(this.getApiUrl(this.save), request);
|
|
36
|
+
}
|
|
37
|
+
submit(request) {
|
|
38
|
+
return (0, http_1.callApi)(this.getApiUrl(this.submit), request);
|
|
39
|
+
}
|
|
40
|
+
withdraw(request) {
|
|
41
|
+
return (0, http_1.callApi)(this.getApiUrl(this.withdraw), request);
|
|
42
|
+
}
|
|
43
|
+
returnForChanges(request) {
|
|
44
|
+
return (0, http_1.callApi)(this.getApiUrl(this.returnForChanges), request);
|
|
45
|
+
}
|
|
46
|
+
approveContent(request) {
|
|
47
|
+
return (0, http_1.callApi)(this.getApiUrl(this.approveContent), request);
|
|
48
|
+
}
|
|
49
|
+
confirmPricing(request) {
|
|
50
|
+
return (0, http_1.callApi)(this.getApiUrl(this.confirmPricing), request);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = new TourListingService();
|
|
54
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/cs/modules/tourListing/service.ts"],"names":[],"mappings":";;;;;AAAA,qCAAoC;AACpC,iEAAwC;AAGxC,MAAM,kBAAmB,SAAQ,qBAAW;IAA5C;;QACE,cAAS,GAAG,eAAe,CAAA;IAkD7B,CAAC;IAhDC,iBAAiB,CAAC,OAAmE;QACnF,OAAO,IAAA,cAAO,EAA8C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAAA;IAC9G,CAAC;IACD,OAAO,CAAC,OAA2B;QACjC,OAAO,IAAA,cAAO,EAAoC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;IAC1F,CAAC;IACD,MAAM,CAAC,OAA2B;QAChC,OAAO,IAAA,cAAO,EAAmC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;IACxF,CAAC;IACD,WAAW,CAAC,OAA6D;QACvE,OAAO,IAAA,cAAO,EAAwC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAA;IAClG,CAAC;IACD,MAAM,CAAC,OAAwD;QAC7D,OAAO,IAAA,cAAO,EAAmC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;IACxF,CAAC;IACD,GAAG,CAAC,OAAqD;QACvD,OAAO,IAAA,cAAO,EAAgC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAA;IAClF,CAAC;IACD,IAAI,CAAC,OAAsD;QACzD,OAAO,IAAA,cAAO,EAAiC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;IACpF,CAAC;IACD,IAAI,CAAC,OAAsD;QACzD,OAAO,IAAA,cAAO,EAAiC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;IACpF,CAAC;IACD,MAAM,CAAC,OAAwD;QAC7D,OAAO,IAAA,cAAO,EAAmC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;IACxF,CAAC;IACD,QAAQ,CAAC,OAA0D;QACjE,OAAO,IAAA,cAAO,EAAqC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAA;IAC5F,CAAC;IACD,gBAAgB,CAAC,OAAkE;QACjF,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,EACrC,OAAO,CACR,CAAA;IACH,CAAC;IACD,cAAc,CAAC,OAAgE;QAC7E,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,EACnC,OAAO,CACR,CAAA;IACH,CAAC;IACD,cAAc,CAAC,OAAgE;QAC7E,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,EACnC,OAAO,CACR,CAAA;IACH,CAAC;CACF;AAED,kBAAe,IAAI,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** Tourism-only workflow. Actor must be resolved by the authenticated BFF, never by a browser. */
|
|
2
|
+
export declare namespace TourListing {
|
|
3
|
+
type Permission = 'review' | 'price' | 'publish';
|
|
4
|
+
type Actor = {
|
|
5
|
+
kind: 'supplier';
|
|
6
|
+
id: string;
|
|
7
|
+
supplierIds: string[];
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'staff';
|
|
10
|
+
id: string;
|
|
11
|
+
permissions: Permission[];
|
|
12
|
+
};
|
|
13
|
+
type State = 'DRAFT' | 'SUBMITTED' | 'RETURNED' | 'READY' | 'PUBLISHING' | 'PUBLISHED';
|
|
14
|
+
interface Source {
|
|
15
|
+
id: string;
|
|
16
|
+
kind: 'XIUMI' | 'WORD' | 'QUOTE' | 'DESIGN';
|
|
17
|
+
name: string;
|
|
18
|
+
reference: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
21
|
+
interface Quote {
|
|
22
|
+
id: string;
|
|
23
|
+
type: string;
|
|
24
|
+
item: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
unit: 'PERSON' | 'GROUP' | 'ROOM' | 'DAY' | 'OTHER';
|
|
27
|
+
currency: string;
|
|
28
|
+
unitPrice: number;
|
|
29
|
+
total: number;
|
|
30
|
+
remark: string;
|
|
31
|
+
sourceId: string;
|
|
32
|
+
}
|
|
33
|
+
interface Departure {
|
|
34
|
+
id: string;
|
|
35
|
+
date: string;
|
|
36
|
+
people: 'ADULT' | 'CHILD' | 'SINGLE_ROOM';
|
|
37
|
+
label?: string;
|
|
38
|
+
relatedDepartureId?: string;
|
|
39
|
+
age?: {
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
minInclusive: boolean;
|
|
43
|
+
maxInclusive: boolean;
|
|
44
|
+
};
|
|
45
|
+
supplierPrice: number;
|
|
46
|
+
currency: 'CNY';
|
|
47
|
+
stock: number;
|
|
48
|
+
saleEnd: string;
|
|
49
|
+
}
|
|
50
|
+
interface SalesPolicy {
|
|
51
|
+
contractType: 'DOMESTIC' | 'INTERNATIONAL' | 'CRUISE';
|
|
52
|
+
ageLowerLimit: number;
|
|
53
|
+
ageUpperLimit: number;
|
|
54
|
+
hasShopping: boolean;
|
|
55
|
+
hasActivity: boolean;
|
|
56
|
+
freeRefundDeadlineDays: number;
|
|
57
|
+
freeRefundDeadlineTime: string;
|
|
58
|
+
autoRefundBeforeAccept: boolean;
|
|
59
|
+
autoRefundAfterAccept: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface Draft {
|
|
62
|
+
/** Confirmed product terms, required for publication; no inherited defaults. */
|
|
63
|
+
salesPolicy?: Partial<SalesPolicy>;
|
|
64
|
+
marketingCopy?: string;
|
|
65
|
+
/** Portable content blocks, compatible with the existing mini-app renderer. */
|
|
66
|
+
content?: {
|
|
67
|
+
type: 'text' | 'image';
|
|
68
|
+
content: string;
|
|
69
|
+
}[];
|
|
70
|
+
title: string;
|
|
71
|
+
category: 'GROUP_TOUR' | 'AROUND_TOUR';
|
|
72
|
+
images: string[];
|
|
73
|
+
summary: string;
|
|
74
|
+
days: number;
|
|
75
|
+
departurePlace: string;
|
|
76
|
+
destination: string;
|
|
77
|
+
itinerary: {
|
|
78
|
+
day: number;
|
|
79
|
+
title: string;
|
|
80
|
+
detail: string;
|
|
81
|
+
images: string[];
|
|
82
|
+
}[];
|
|
83
|
+
inclusions: string;
|
|
84
|
+
exclusions: string;
|
|
85
|
+
cancellation: string;
|
|
86
|
+
childPolicy: string;
|
|
87
|
+
mandatoryFees: string;
|
|
88
|
+
shopping: string;
|
|
89
|
+
optionalActivities: string;
|
|
90
|
+
routeType: 'SELF_ORGANIZED' | 'SHARED';
|
|
91
|
+
minGroupSize: number;
|
|
92
|
+
departures: Departure[];
|
|
93
|
+
quotes: Quote[];
|
|
94
|
+
sources: Source[];
|
|
95
|
+
/** Exact critical field paths explicitly checked by a person, not generated by AI. */
|
|
96
|
+
confirmed: string[];
|
|
97
|
+
}
|
|
98
|
+
interface Pricing {
|
|
99
|
+
departures: {
|
|
100
|
+
id: string;
|
|
101
|
+
settlementPrice: number;
|
|
102
|
+
retailPrice: number;
|
|
103
|
+
quoteIds: string[];
|
|
104
|
+
explanation: string;
|
|
105
|
+
}[];
|
|
106
|
+
note: string;
|
|
107
|
+
}
|
|
108
|
+
interface Event {
|
|
109
|
+
action: string;
|
|
110
|
+
actorId: string;
|
|
111
|
+
version: number;
|
|
112
|
+
at: number;
|
|
113
|
+
reason: string;
|
|
114
|
+
}
|
|
115
|
+
interface Record {
|
|
116
|
+
id: string;
|
|
117
|
+
supplierId: string;
|
|
118
|
+
version: number;
|
|
119
|
+
submittedVersion: number | null;
|
|
120
|
+
state: State;
|
|
121
|
+
draft: Draft;
|
|
122
|
+
contentApproval: {
|
|
123
|
+
actorId: string;
|
|
124
|
+
revision: number;
|
|
125
|
+
} | null;
|
|
126
|
+
pricingApproval: {
|
|
127
|
+
actorId: string;
|
|
128
|
+
revision: number;
|
|
129
|
+
pricing: Pricing;
|
|
130
|
+
} | null;
|
|
131
|
+
itemId: string | null;
|
|
132
|
+
returnReason: string;
|
|
133
|
+
updatedAt: number;
|
|
134
|
+
publicationError?: string;
|
|
135
|
+
}
|
|
136
|
+
interface Context {
|
|
137
|
+
actor: Actor;
|
|
138
|
+
}
|
|
139
|
+
interface Key extends Context {
|
|
140
|
+
id: string;
|
|
141
|
+
}
|
|
142
|
+
interface Change extends Key {
|
|
143
|
+
expectedVersion: number;
|
|
144
|
+
}
|
|
145
|
+
interface Controller {
|
|
146
|
+
importXiumi(request: Key & {
|
|
147
|
+
url: string;
|
|
148
|
+
}): Promise<{
|
|
149
|
+
title: string;
|
|
150
|
+
html: string;
|
|
151
|
+
sourceUrl: string;
|
|
152
|
+
}>;
|
|
153
|
+
create(request: Context & {
|
|
154
|
+
supplierId: string;
|
|
155
|
+
draft: Draft;
|
|
156
|
+
}): Promise<Record>;
|
|
157
|
+
get(request: Key): Promise<Record & {
|
|
158
|
+
events: Event[];
|
|
159
|
+
}>;
|
|
160
|
+
list(request: Context & {
|
|
161
|
+
supplierId?: string;
|
|
162
|
+
state?: State;
|
|
163
|
+
page: number;
|
|
164
|
+
}): Promise<{
|
|
165
|
+
records: Record[];
|
|
166
|
+
total: number;
|
|
167
|
+
}>;
|
|
168
|
+
save(request: Change & {
|
|
169
|
+
draft: Draft;
|
|
170
|
+
}): Promise<Record>;
|
|
171
|
+
publish(request: Change): Promise<Record>;
|
|
172
|
+
cancelPublication(request: Change & {
|
|
173
|
+
reason: string;
|
|
174
|
+
}): Promise<Record>;
|
|
175
|
+
revise(request: Change): Promise<Record>;
|
|
176
|
+
submit(request: Change): Promise<Record>;
|
|
177
|
+
withdraw(request: Change): Promise<Record>;
|
|
178
|
+
returnForChanges(request: Change & {
|
|
179
|
+
reason: string;
|
|
180
|
+
}): Promise<Record>;
|
|
181
|
+
approveContent(request: Change): Promise<Record>;
|
|
182
|
+
confirmPricing(request: Change & {
|
|
183
|
+
pricing: Pricing;
|
|
184
|
+
}): Promise<Record>;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cs/modules/tourListing/types.ts"],"names":[],"mappings":""}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import BizError from './errors/BizError';
|
|
2
|
+
export { ProductPodcast } from './cs/modules/productPodcast/type';
|
|
3
|
+
export { default as productPodcastService } from './cs/modules/productPodcast/service';
|
|
2
4
|
import * as CSDto from './types';
|
|
5
|
+
export { TourListing } from './cs/modules/tourListing/types';
|
|
6
|
+
export { default as tourListingService } from './cs/modules/tourListing/service';
|
|
3
7
|
/** 业务模块 */
|
|
4
8
|
import itemQueryService from './cs/modules/itemQuery';
|
|
5
9
|
import supplierService from './cs/modules/supplier/service';
|
package/index.js
CHANGED
|
@@ -26,42 +26,46 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.tongchengService = exports.scfMigrateService = exports.tourMaterialService = exports.jobService = exports.comboStockService = exports.facilityService = exports.itemCityRelationService = exports.itemManageService = exports.roomStockService = exports.bizTagService = exports.itemDiscountActivityService = exports.serviceVenueService = exports.shuttleBusSupplierService = exports.supplierService = exports.itemQueryService = exports.CSDto = exports.BizError = exports.TongchengAvailability = void 0;
|
|
29
|
+
exports.tongchengService = exports.scfMigrateService = exports.tourMaterialService = exports.jobService = exports.comboStockService = exports.facilityService = exports.itemCityRelationService = exports.itemManageService = exports.roomStockService = exports.bizTagService = exports.itemDiscountActivityService = exports.serviceVenueService = exports.shuttleBusSupplierService = exports.supplierService = exports.itemQueryService = exports.CSDto = exports.BizError = exports.TongchengAvailability = exports.tourListingService = exports.productPodcastService = void 0;
|
|
30
30
|
const BizError_1 = __importDefault(require("./errors/BizError"));
|
|
31
31
|
exports.BizError = BizError_1.default;
|
|
32
|
+
var service_1 = require("./cs/modules/productPodcast/service");
|
|
33
|
+
Object.defineProperty(exports, "productPodcastService", { enumerable: true, get: function () { return __importDefault(service_1).default; } });
|
|
32
34
|
const CSDto = __importStar(require("./types"));
|
|
33
35
|
exports.CSDto = CSDto;
|
|
36
|
+
var service_2 = require("./cs/modules/tourListing/service");
|
|
37
|
+
Object.defineProperty(exports, "tourListingService", { enumerable: true, get: function () { return __importDefault(service_2).default; } });
|
|
34
38
|
/** 业务模块 */
|
|
35
39
|
const itemQuery_1 = __importDefault(require("./cs/modules/itemQuery"));
|
|
36
40
|
exports.itemQueryService = itemQuery_1.default;
|
|
37
|
-
const
|
|
38
|
-
exports.supplierService =
|
|
39
|
-
const
|
|
40
|
-
exports.shuttleBusSupplierService =
|
|
41
|
-
const
|
|
42
|
-
exports.serviceVenueService =
|
|
43
|
-
const
|
|
44
|
-
exports.itemDiscountActivityService =
|
|
45
|
-
const
|
|
46
|
-
exports.bizTagService =
|
|
47
|
-
const
|
|
48
|
-
exports.roomStockService =
|
|
41
|
+
const service_3 = __importDefault(require("./cs/modules/supplier/service"));
|
|
42
|
+
exports.supplierService = service_3.default;
|
|
43
|
+
const service_4 = __importDefault(require("./cs/modules/shuttleBusSupplier/service"));
|
|
44
|
+
exports.shuttleBusSupplierService = service_4.default;
|
|
45
|
+
const service_5 = __importDefault(require("./cs/modules/serviceVenue/service"));
|
|
46
|
+
exports.serviceVenueService = service_5.default;
|
|
47
|
+
const service_6 = __importDefault(require("./cs/modules/itemDiscountActivity/service"));
|
|
48
|
+
exports.itemDiscountActivityService = service_6.default;
|
|
49
|
+
const service_7 = __importDefault(require("./cs/modules/bizTag/service"));
|
|
50
|
+
exports.bizTagService = service_7.default;
|
|
51
|
+
const service_8 = __importDefault(require("./cs/modules/roomStock/service"));
|
|
52
|
+
exports.roomStockService = service_8.default;
|
|
49
53
|
const itemManage_1 = __importDefault(require("./cs/modules/itemManage"));
|
|
50
54
|
exports.itemManageService = itemManage_1.default;
|
|
51
|
-
const
|
|
52
|
-
exports.itemCityRelationService =
|
|
53
|
-
const
|
|
54
|
-
exports.facilityService =
|
|
55
|
-
const
|
|
56
|
-
exports.comboStockService =
|
|
57
|
-
const
|
|
58
|
-
exports.jobService =
|
|
59
|
-
const
|
|
60
|
-
exports.tourMaterialService =
|
|
55
|
+
const service_9 = __importDefault(require("./cs/modules/itemCityRelation/service"));
|
|
56
|
+
exports.itemCityRelationService = service_9.default;
|
|
57
|
+
const service_10 = __importDefault(require("./cs/modules/facility/service"));
|
|
58
|
+
exports.facilityService = service_10.default;
|
|
59
|
+
const service_11 = __importDefault(require("./cs/modules/comboStock/service"));
|
|
60
|
+
exports.comboStockService = service_11.default;
|
|
61
|
+
const service_12 = __importDefault(require("./cs/modules/job/service"));
|
|
62
|
+
exports.jobService = service_12.default;
|
|
63
|
+
const service_13 = __importDefault(require("./cs/modules/tourMaterial/service"));
|
|
64
|
+
exports.tourMaterialService = service_13.default;
|
|
61
65
|
const scfMigrate_1 = __importDefault(require("./cs/modules/scfMigrate"));
|
|
62
66
|
exports.scfMigrateService = scfMigrate_1.default;
|
|
63
|
-
const
|
|
64
|
-
exports.tongchengService =
|
|
67
|
+
const service_14 = __importDefault(require("./cs/modules/tongcheng/service"));
|
|
68
|
+
exports.tongchengService = service_14.default;
|
|
65
69
|
const type_1 = require("./cs/modules/tongcheng/type");
|
|
66
70
|
Object.defineProperty(exports, "TongchengAvailability", { enumerable: true, get: function () { return type_1.TongchengAvailability; } });
|
|
67
71
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAwC;AAmDtC,mBAnDK,kBAAQ,CAmDL;AAjDV,+DAAsF;AAA7E,iIAAA,OAAO,OAAyB;AACzC,+CAAgC;AAiD9B,sBAAK;AA/CP,4DAAgF;AAAvE,8HAAA,OAAO,OAAsB;AAEtC,WAAW;AACX,uEAAqD;AA6CnD,2BA7CK,mBAAgB,CA6CL;AA5ClB,4EAA2D;AA6CzD,0BA7CK,iBAAe,CA6CL;AA5CjB,sFAA+E;AA6C7E,oCA7CK,iBAAyB,CA6CL;AA5C3B,gFAAmE;AA6CjE,8BA7CK,iBAAmB,CA6CL;AA5CrB,wFAAmF;AA6CjF,sCA7CK,iBAA2B,CA6CL;AA5C7B,0EAAuD;AA6CrD,wBA7CK,iBAAa,CA6CL;AA5Cf,6EAA6D;AA6C3D,2BA7CK,iBAAgB,CA6CL;AA5ClB,yEAAuD;AA6CrD,4BA7CK,oBAAiB,CA6CL;AA5CnB,oFAA2E;AA6CzE,kCA7CK,iBAAuB,CA6CL;AA5CzB,6EAA2D;AA6CzD,0BA7CK,kBAAe,CA6CL;AA5CjB,+EAA+D;AA6C7D,4BA7CK,kBAAiB,CA6CL;AA5CnB,wEAAiD;AA6C/C,qBA7CK,kBAAU,CA6CL;AA5CZ,iFAAmE;AA6CjE,8BA7CK,kBAAmB,CA6CL;AA5CrB,yEAAuD;AA6CrD,4BA7CK,oBAAiB,CA6CL;AA5CnB,8EAA6D;AA6C3D,2BA7CK,kBAAgB,CA6CL;AA3ClB,sDAAyF;AAYvF,sGAZO,4BAAqB,OAYP"}
|