@things-factory/biz-base 4.3.591 → 4.3.671
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 +3 -3
- package/server/service/bizplace/bizplace-query.ts +19 -10
- package/dist-server/index.js +0 -20
- package/dist-server/index.js.map +0 -1
- package/dist-server/middlewares/index.js +0 -1
- package/dist-server/middlewares/index.js.map +0 -1
- package/dist-server/migrations/index.js +0 -12
- package/dist-server/migrations/index.js.map +0 -1
- package/dist-server/service/biz-option/biz-option-mutation.js +0 -80
- package/dist-server/service/biz-option/biz-option-mutation.js.map +0 -1
- package/dist-server/service/biz-option/biz-option-query.js +0 -55
- package/dist-server/service/biz-option/biz-option-query.js.map +0 -1
- package/dist-server/service/biz-option/biz-option-types.js +0 -75
- package/dist-server/service/biz-option/biz-option-types.js.map +0 -1
- package/dist-server/service/biz-option/biz-option.js +0 -86
- package/dist-server/service/biz-option/biz-option.js.map +0 -1
- package/dist-server/service/biz-option/index.js +0 -9
- package/dist-server/service/biz-option/index.js.map +0 -1
- package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js +0 -80
- package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js.map +0 -1
- package/dist-server/service/biz-option-detail/biz-option-detail-query.js +0 -54
- package/dist-server/service/biz-option-detail/biz-option-detail-query.js.map +0 -1
- package/dist-server/service/biz-option-detail/biz-option-detail-types.js +0 -67
- package/dist-server/service/biz-option-detail/biz-option-detail-types.js.map +0 -1
- package/dist-server/service/biz-option-detail/biz-option-detail.js +0 -82
- package/dist-server/service/biz-option-detail/biz-option-detail.js.map +0 -1
- package/dist-server/service/biz-option-detail/index.js +0 -9
- package/dist-server/service/biz-option-detail/index.js.map +0 -1
- package/dist-server/service/bizplace/bizplace-mutation.js +0 -144
- package/dist-server/service/bizplace/bizplace-mutation.js.map +0 -1
- package/dist-server/service/bizplace/bizplace-query.js +0 -279
- package/dist-server/service/bizplace/bizplace-query.js.map +0 -1
- package/dist-server/service/bizplace/bizplace-types.js +0 -189
- package/dist-server/service/bizplace/bizplace-types.js.map +0 -1
- package/dist-server/service/bizplace/bizplace.js +0 -194
- package/dist-server/service/bizplace/bizplace.js.map +0 -1
- package/dist-server/service/bizplace/index.js +0 -9
- package/dist-server/service/bizplace/index.js.map +0 -1
- package/dist-server/service/company/company-mutation.js +0 -141
- package/dist-server/service/company/company-mutation.js.map +0 -1
- package/dist-server/service/company/company-query.js +0 -102
- package/dist-server/service/company/company-query.js.map +0 -1
- package/dist-server/service/company/company-types.js +0 -109
- package/dist-server/service/company/company-types.js.map +0 -1
- package/dist-server/service/company/company.js +0 -135
- package/dist-server/service/company/company.js.map +0 -1
- package/dist-server/service/company/index.js +0 -9
- package/dist-server/service/company/index.js.map +0 -1
- package/dist-server/service/contact-point/contact-point-mutation.js +0 -164
- package/dist-server/service/contact-point/contact-point-mutation.js.map +0 -1
- package/dist-server/service/contact-point/contact-point-query.js +0 -63
- package/dist-server/service/contact-point/contact-point-query.js.map +0 -1
- package/dist-server/service/contact-point/contact-point-types.js +0 -171
- package/dist-server/service/contact-point/contact-point-types.js.map +0 -1
- package/dist-server/service/contact-point/contact-point.js +0 -139
- package/dist-server/service/contact-point/contact-point.js.map +0 -1
- package/dist-server/service/contact-point/index.js +0 -9
- package/dist-server/service/contact-point/index.js.map +0 -1
- package/dist-server/service/index.js +0 -67
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/worker/index.js +0 -9
- package/dist-server/service/worker/index.js.map +0 -1
- package/dist-server/service/worker/worker-mutation.js +0 -134
- package/dist-server/service/worker/worker-mutation.js.map +0 -1
- package/dist-server/service/worker/worker-query.js +0 -63
- package/dist-server/service/worker/worker-query.js.map +0 -1
- package/dist-server/service/worker/worker-types.js +0 -83
- package/dist-server/service/worker/worker-types.js.map +0 -1
- package/dist-server/service/worker/worker.js +0 -83
- package/dist-server/service/worker/worker.js.map +0 -1
- package/dist-server/utils/get-permitted-bizplaces.js +0 -285
- package/dist-server/utils/get-permitted-bizplaces.js.map +0 -1
- package/dist-server/utils/index.js +0 -18
- package/dist-server/utils/index.js.map +0 -1
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var _a, _b;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.NewBizplace = exports.BizplacePatch = exports.UserBizplace = exports.BizplaceList = void 0;
|
|
14
|
-
const type_graphql_1 = require("type-graphql");
|
|
15
|
-
const shell_1 = require("@things-factory/shell");
|
|
16
|
-
const bizplace_1 = require("./bizplace");
|
|
17
|
-
let BizplaceList = class BizplaceList {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, type_graphql_1.Field)(type => [bizplace_1.Bizplace], { nullable: true }),
|
|
21
|
-
__metadata("design:type", Array)
|
|
22
|
-
], BizplaceList.prototype, "items", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], BizplaceList.prototype, "total", void 0);
|
|
27
|
-
BizplaceList = __decorate([
|
|
28
|
-
(0, type_graphql_1.ObjectType)()
|
|
29
|
-
], BizplaceList);
|
|
30
|
-
exports.BizplaceList = BizplaceList;
|
|
31
|
-
let UserBizplace = class UserBizplace {
|
|
32
|
-
};
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], UserBizplace.prototype, "id", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], UserBizplace.prototype, "name", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], UserBizplace.prototype, "description", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
|
-
__metadata("design:type", Boolean)
|
|
48
|
-
], UserBizplace.prototype, "assigned", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], UserBizplace.prototype, "userBizplaceId", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
-
__metadata("design:type", Boolean)
|
|
56
|
-
], UserBizplace.prototype, "mainBizplace", void 0);
|
|
57
|
-
UserBizplace = __decorate([
|
|
58
|
-
(0, type_graphql_1.ObjectType)()
|
|
59
|
-
], UserBizplace);
|
|
60
|
-
exports.UserBizplace = UserBizplace;
|
|
61
|
-
let BizplacePatch = class BizplacePatch {
|
|
62
|
-
};
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
65
|
-
__metadata("design:type", String)
|
|
66
|
-
], BizplacePatch.prototype, "id", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], BizplacePatch.prototype, "name", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
-
__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
74
|
-
], BizplacePatch.prototype, "company", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
|
-
__metadata("design:type", String)
|
|
78
|
-
], BizplacePatch.prototype, "description", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], BizplacePatch.prototype, "address", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], BizplacePatch.prototype, "city", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
89
|
-
__metadata("design:type", String)
|
|
90
|
-
], BizplacePatch.prototype, "state", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
93
|
-
__metadata("design:type", String)
|
|
94
|
-
], BizplacePatch.prototype, "postalCode", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
97
|
-
__metadata("design:type", String)
|
|
98
|
-
], BizplacePatch.prototype, "countryCode", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], BizplacePatch.prototype, "latlng", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
105
|
-
__metadata("design:type", String)
|
|
106
|
-
], BizplacePatch.prototype, "status", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
109
|
-
__metadata("design:type", String)
|
|
110
|
-
], BizplacePatch.prototype, "phone", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
113
|
-
__metadata("design:type", String)
|
|
114
|
-
], BizplacePatch.prototype, "cuFlag", void 0);
|
|
115
|
-
BizplacePatch = __decorate([
|
|
116
|
-
(0, type_graphql_1.InputType)()
|
|
117
|
-
], BizplacePatch);
|
|
118
|
-
exports.BizplacePatch = BizplacePatch;
|
|
119
|
-
let NewBizplace = class NewBizplace {
|
|
120
|
-
};
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, type_graphql_1.Field)(),
|
|
123
|
-
__metadata("design:type", String)
|
|
124
|
-
], NewBizplace.prototype, "name", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, type_graphql_1.Field)(),
|
|
127
|
-
__metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
|
|
128
|
-
], NewBizplace.prototype, "company", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
131
|
-
__metadata("design:type", String)
|
|
132
|
-
], NewBizplace.prototype, "description", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
(0, type_graphql_1.Field)(),
|
|
135
|
-
__metadata("design:type", String)
|
|
136
|
-
], NewBizplace.prototype, "address", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
139
|
-
__metadata("design:type", String)
|
|
140
|
-
], NewBizplace.prototype, "address2", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
143
|
-
__metadata("design:type", String)
|
|
144
|
-
], NewBizplace.prototype, "city", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
147
|
-
__metadata("design:type", String)
|
|
148
|
-
], NewBizplace.prototype, "ward", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
151
|
-
__metadata("design:type", String)
|
|
152
|
-
], NewBizplace.prototype, "district", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
155
|
-
__metadata("design:type", String)
|
|
156
|
-
], NewBizplace.prototype, "state", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, type_graphql_1.Field)(),
|
|
159
|
-
__metadata("design:type", String)
|
|
160
|
-
], NewBizplace.prototype, "postalCode", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
163
|
-
__metadata("design:type", String)
|
|
164
|
-
], NewBizplace.prototype, "countryCode", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
(0, type_graphql_1.Field)(),
|
|
167
|
-
__metadata("design:type", String)
|
|
168
|
-
], NewBizplace.prototype, "latlng", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
171
|
-
__metadata("design:type", String)
|
|
172
|
-
], NewBizplace.prototype, "status", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
175
|
-
__metadata("design:type", String)
|
|
176
|
-
], NewBizplace.prototype, "phone", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
179
|
-
__metadata("design:type", String)
|
|
180
|
-
], NewBizplace.prototype, "email", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
183
|
-
__metadata("design:type", String)
|
|
184
|
-
], NewBizplace.prototype, "fullfillmentName", void 0);
|
|
185
|
-
NewBizplace = __decorate([
|
|
186
|
-
(0, type_graphql_1.InputType)()
|
|
187
|
-
], NewBizplace);
|
|
188
|
-
exports.NewBizplace = NewBizplace;
|
|
189
|
-
//# sourceMappingURL=bizplace-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bizplace-types.js","sourceRoot":"","sources":["../../../server/service/bizplace/bizplace-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAgE;AAEhE,iDAAiD;AAEjD,yCAAqC;AAG9B,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC5B;AAElB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;AALH,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB;AANY,oCAAY;AASlB,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkBxB,CAAA;AAjBC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACH;AAEvB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACJ;AAjBX,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAkBxB;AAlBY,oCA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guments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Bizplace = void 0;
|
|
14
|
-
const type_graphql_1 = require("type-graphql");
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
17
|
-
const shell_1 = require("@things-factory/shell");
|
|
18
|
-
const biz_option_1 = require("../biz-option/biz-option");
|
|
19
|
-
const company_1 = require("../company/company");
|
|
20
|
-
let Bizplace = class Bizplace {
|
|
21
|
-
constructor(obj) {
|
|
22
|
-
if (obj) {
|
|
23
|
-
this.id = obj.Bizplace_id;
|
|
24
|
-
this.name = obj.Bizplace_name;
|
|
25
|
-
this.description = obj.Bizplace_description;
|
|
26
|
-
this.address = obj.Bizplace_address;
|
|
27
|
-
this.address2 = obj.Bizplace_address2;
|
|
28
|
-
this.city = obj.Bizplace_city;
|
|
29
|
-
this.ward = obj.Bizplace_ward;
|
|
30
|
-
this.district = obj.Bizplace_district;
|
|
31
|
-
this.state = obj.Bizplace_state;
|
|
32
|
-
this.postalCode = obj.Bizplace_postal_code;
|
|
33
|
-
this.countryCode = obj.Bizplace_country_code;
|
|
34
|
-
this.latlng = obj.Bizplace_latlng;
|
|
35
|
-
this.status = obj.Bizplace_status;
|
|
36
|
-
this.phone = obj.Bizplace_phone;
|
|
37
|
-
this.email = obj.Bizplace_email;
|
|
38
|
-
this.fullfillmentName = obj.Bizplace_fullfillment_name;
|
|
39
|
-
this.createdAt = obj.Bizplace_created_at;
|
|
40
|
-
this.updatedAt = obj.Bizplace_updated_at;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
46
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], Bizplace.prototype, "id", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
51
|
-
(0, type_graphql_1.Field)(),
|
|
52
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
53
|
-
], Bizplace.prototype, "domain", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.OneToMany)(type => biz_option_1.BizOption, bizOption => bizOption.bizplace),
|
|
56
|
-
(0, type_graphql_1.Field)(type => [biz_option_1.BizOption], { nullable: true }),
|
|
57
|
-
__metadata("design:type", Array)
|
|
58
|
-
], Bizplace.prototype, "bizOptions", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.ManyToMany)(type => auth_base_1.User),
|
|
61
|
-
(0, typeorm_1.JoinTable)({ name: 'bizplaces_users' }),
|
|
62
|
-
(0, type_graphql_1.Field)(type => [auth_base_1.User]),
|
|
63
|
-
__metadata("design:type", Array)
|
|
64
|
-
], Bizplace.prototype, "users", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.ManyToOne)(type => company_1.Company),
|
|
67
|
-
(0, type_graphql_1.Field)(type => company_1.Company),
|
|
68
|
-
__metadata("design:type", company_1.Company)
|
|
69
|
-
], Bizplace.prototype, "company", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)(),
|
|
72
|
-
(0, type_graphql_1.Field)(),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], Bizplace.prototype, "name", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
77
|
-
nullable: true
|
|
78
|
-
}),
|
|
79
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
80
|
-
__metadata("design:type", String)
|
|
81
|
-
], Bizplace.prototype, "description", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)(),
|
|
84
|
-
(0, type_graphql_1.Field)(),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], Bizplace.prototype, "address", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, typeorm_1.Column)({
|
|
89
|
-
nullable: true
|
|
90
|
-
}),
|
|
91
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
92
|
-
__metadata("design:type", String)
|
|
93
|
-
], Bizplace.prototype, "address2", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
96
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
97
|
-
__metadata("design:type", String)
|
|
98
|
-
], Bizplace.prototype, "city", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
101
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
102
|
-
__metadata("design:type", String)
|
|
103
|
-
], Bizplace.prototype, "ward", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
106
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
107
|
-
__metadata("design:type", String)
|
|
108
|
-
], Bizplace.prototype, "district", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
111
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
112
|
-
__metadata("design:type", String)
|
|
113
|
-
], Bizplace.prototype, "state", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, typeorm_1.Column)(),
|
|
116
|
-
(0, type_graphql_1.Field)(),
|
|
117
|
-
__metadata("design:type", String)
|
|
118
|
-
], Bizplace.prototype, "postalCode", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
121
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
122
|
-
__metadata("design:type", String)
|
|
123
|
-
], Bizplace.prototype, "countryCode", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, typeorm_1.Column)(),
|
|
126
|
-
(0, type_graphql_1.Field)(),
|
|
127
|
-
__metadata("design:type", String)
|
|
128
|
-
], Bizplace.prototype, "latlng", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, typeorm_1.Column)({
|
|
131
|
-
nullable: true
|
|
132
|
-
}),
|
|
133
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
134
|
-
__metadata("design:type", String)
|
|
135
|
-
], Bizplace.prototype, "status", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, typeorm_1.Column)({
|
|
138
|
-
nullable: true
|
|
139
|
-
}),
|
|
140
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
141
|
-
__metadata("design:type", String)
|
|
142
|
-
], Bizplace.prototype, "phone", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
145
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], Bizplace.prototype, "email", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
(0, typeorm_1.Column)({
|
|
150
|
-
nullable: true
|
|
151
|
-
}),
|
|
152
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
153
|
-
__metadata("design:type", String)
|
|
154
|
-
], Bizplace.prototype, "fullfillmentName", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
(0, typeorm_1.Column)({
|
|
157
|
-
nullable: true
|
|
158
|
-
}),
|
|
159
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], Bizplace.prototype, "refBizplaceId", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
164
|
-
nullable: true
|
|
165
|
-
}),
|
|
166
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
167
|
-
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
168
|
-
], Bizplace.prototype, "creator", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
171
|
-
nullable: true
|
|
172
|
-
}),
|
|
173
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
174
|
-
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
175
|
-
], Bizplace.prototype, "updater", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
178
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
179
|
-
__metadata("design:type", Date)
|
|
180
|
-
], Bizplace.prototype, "createdAt", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
183
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
184
|
-
__metadata("design:type", Date)
|
|
185
|
-
], Bizplace.prototype, "updatedAt", void 0);
|
|
186
|
-
Bizplace = __decorate([
|
|
187
|
-
(0, typeorm_1.Entity)(),
|
|
188
|
-
(0, typeorm_1.Index)('ix_bizplaces_0', (bizplace) => [bizplace.name], { unique: true }),
|
|
189
|
-
(0, typeorm_1.Index)('ix_bizplaces_1', (company) => [company.domain], { unique: false }),
|
|
190
|
-
(0, type_graphql_1.ObjectType)(),
|
|
191
|
-
__metadata("design:paramtypes", [Object])
|
|
192
|
-
], Bizplace);
|
|
193
|
-
exports.Bizplace = Bizplace;
|
|
194
|
-
//# sourceMappingURL=bizplace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bizplace.js","sourceRoot":"","sources":["../../../server/service/bizplace/bizplace.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,yDAAoD;AACpD,gDAA4C;AAMrC,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAsHnB,YAAY,GAAI;QACd,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,CAAA;YACzB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,CAAA;YAC7B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,oBAAoB,CAAA;YAC3C,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,CAAA;YACnC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,iBAAiB,CAAA;YACrC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,CAAA;YAC7B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,CAAA;YAC7B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,iBAAiB,CAAA;YACrC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,cAAc,CAAA;YAC/B,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,oBAAoB,CAAA;YAC1C,IAAI,CAAC,WAAW,GAAI,GAAG,CAAC,qBAAqB,CAAA;YAC7C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,eAAe,CAAA;YACjC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,eAAe,C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,IAAI;2CAAA;AApHJ,QAAQ;IAJpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClF,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAClF,IAAA,yBAAU,GAAE;;GACA,QAAQ,CA4IpB;AA5IY,4BAAQ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolvers = exports.entities = void 0;
|
|
4
|
-
const bizplace_1 = require("./bizplace");
|
|
5
|
-
const bizplace_mutation_1 = require("./bizplace-mutation");
|
|
6
|
-
const bizplace_query_1 = require("./bizplace-query");
|
|
7
|
-
exports.entities = [bizplace_1.Bizplace];
|
|
8
|
-
exports.resolvers = [bizplace_query_1.BizplaceQuery, bizplace_mutation_1.BizplaceMutation];
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/bizplace/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,2DAAsD;AACtD,qDAAgD;AAEnC,QAAA,QAAQ,GAAG,CAAC,mBAAQ,CAAC,CAAA;AACrB,QAAA,SAAS,GAAG,CAAC,8BAAa,EAAE,oCAAgB,CAAC,CAAA"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.deleteCompany = exports.deleteCompanies = exports.updateCompany = exports.createCompany = exports.CompanyMutation = void 0;
|
|
16
|
-
const type_graphql_1 = require("type-graphql");
|
|
17
|
-
const typeorm_1 = require("typeorm");
|
|
18
|
-
const shell_1 = require("@things-factory/shell");
|
|
19
|
-
const utils_1 = require("@things-factory/utils");
|
|
20
|
-
const company_1 = require("./company");
|
|
21
|
-
const company_types_1 = require("./company-types");
|
|
22
|
-
let CompanyMutation = class CompanyMutation {
|
|
23
|
-
async createCompany(company, context) {
|
|
24
|
-
const { domain, user, tx } = context.state;
|
|
25
|
-
return await createCompany(company, domain, user, tx);
|
|
26
|
-
}
|
|
27
|
-
async updateCompany(name, patch, context) {
|
|
28
|
-
const { domain, user, tx } = context.state;
|
|
29
|
-
return await updateCompany(name, patch, domain, user, tx);
|
|
30
|
-
}
|
|
31
|
-
async updateMultipleCompany(patches, context) {
|
|
32
|
-
let results = [];
|
|
33
|
-
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
34
|
-
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
35
|
-
if (_createRecords.length > 0) {
|
|
36
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
37
|
-
const patch = _createRecords[i];
|
|
38
|
-
const result = await this.createCompany(patch, context);
|
|
39
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (_updateRecords.length > 0) {
|
|
43
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
44
|
-
const patch = _updateRecords[i];
|
|
45
|
-
const result = await this.updateCompany(patch.name, patch, context);
|
|
46
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return results;
|
|
50
|
-
}
|
|
51
|
-
async deleteCompany(id, context) {
|
|
52
|
-
await deleteCompany(id, context.state.tx);
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
async deleteCompanies(ids, context) {
|
|
56
|
-
await deleteCompanies(ids, context.state.tx);
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
62
|
-
(0, type_graphql_1.Mutation)(returns => company_1.Company),
|
|
63
|
-
__param(0, (0, type_graphql_1.Arg)('company')),
|
|
64
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
65
|
-
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [company_types_1.NewCompany, Object]),
|
|
67
|
-
__metadata("design:returntype", Promise)
|
|
68
|
-
], CompanyMutation.prototype, "createCompany", null);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, type_graphql_1.Directive)('@privilege(category: "company", privilege: "mutation")'),
|
|
71
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
|
-
(0, type_graphql_1.Mutation)(returns => company_1.Company),
|
|
73
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
74
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
75
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
76
|
-
__metadata("design:type", Function),
|
|
77
|
-
__metadata("design:paramtypes", [String, company_types_1.CompanyPatch, Object]),
|
|
78
|
-
__metadata("design:returntype", Promise)
|
|
79
|
-
], CompanyMutation.prototype, "updateCompany", null);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, type_graphql_1.Directive)('@privilege(category: "company", privilege: "mutation")'),
|
|
82
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
83
|
-
(0, type_graphql_1.Mutation)(returns => [company_1.Company]),
|
|
84
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [company_types_1.CompanyPatch])),
|
|
85
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
86
|
-
__metadata("design:type", Function),
|
|
87
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
88
|
-
__metadata("design:returntype", Promise)
|
|
89
|
-
], CompanyMutation.prototype, "updateMultipleCompany", null);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
92
|
-
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
93
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
94
|
-
__metadata("design:type", Function),
|
|
95
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
96
|
-
__metadata("design:returntype", Promise)
|
|
97
|
-
], CompanyMutation.prototype, "deleteCompany", null);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
100
|
-
(0, type_graphql_1.Directive)('@privilege(category: "company", privilege: "mutation")'),
|
|
101
|
-
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
102
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
103
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
104
|
-
__metadata("design:type", Function),
|
|
105
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
106
|
-
__metadata("design:returntype", Promise)
|
|
107
|
-
], CompanyMutation.prototype, "deleteCompanies", null);
|
|
108
|
-
CompanyMutation = __decorate([
|
|
109
|
-
(0, type_graphql_1.Resolver)(company_1.Company)
|
|
110
|
-
], CompanyMutation);
|
|
111
|
-
exports.CompanyMutation = CompanyMutation;
|
|
112
|
-
async function createCompany(company, domain, user, tx) {
|
|
113
|
-
const companyRepository = tx ? tx.getRepository(company_1.Company) : (0, typeorm_1.getRepository)(company_1.Company);
|
|
114
|
-
const domainRepository = tx ? tx.getRepository(shell_1.Domain) : (0, typeorm_1.getRepository)(shell_1.Domain);
|
|
115
|
-
const companyDomain = await domainRepository.save({
|
|
116
|
-
subdomain: (0, utils_1.slugger)(company.name),
|
|
117
|
-
name: company.name
|
|
118
|
-
});
|
|
119
|
-
return await companyRepository.save(Object.assign(Object.assign({}, company), { domain: companyDomain, creator: user, updater: user }));
|
|
120
|
-
}
|
|
121
|
-
exports.createCompany = createCompany;
|
|
122
|
-
async function updateCompany(name, patch, domain, user, tx) {
|
|
123
|
-
const repository = tx ? tx.getRepository(company_1.Company) : (0, typeorm_1.getRepository)(company_1.Company);
|
|
124
|
-
const company = await repository.findOne({
|
|
125
|
-
domain,
|
|
126
|
-
name
|
|
127
|
-
});
|
|
128
|
-
return repository.save(Object.assign(Object.assign(Object.assign({}, company), patch), { updater: user }));
|
|
129
|
-
}
|
|
130
|
-
exports.updateCompany = updateCompany;
|
|
131
|
-
async function deleteCompanies(ids, tx) {
|
|
132
|
-
const repository = tx ? tx.getRepository(company_1.Company) : (0, typeorm_1.getRepository)(company_1.Company);
|
|
133
|
-
return await repository.delete(ids);
|
|
134
|
-
}
|
|
135
|
-
exports.deleteCompanies = deleteCompanies;
|
|
136
|
-
async function deleteCompany(id, tx) {
|
|
137
|
-
const repository = tx ? tx.getRepository(company_1.Company) : (0, typeorm_1.getRepository)(company_1.Company);
|
|
138
|
-
return await repository.delete(id);
|
|
139
|
-
}
|
|
140
|
-
exports.deleteCompany = deleteCompany;
|
|
141
|
-
//# sourceMappingURL=company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