@rolatech/angular-services 20.1.12 → 20.1.14

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.
@@ -1783,117 +1783,12 @@ class PropertyService extends BaseService {
1783
1783
  withCredentials: true,
1784
1784
  });
1785
1785
  }
1786
- makeOffer(propertyId, data) {
1787
- return this.http.post(`${this.actionUrl}/${propertyId}/offers`, data, {
1788
- withCredentials: true,
1789
- });
1790
- }
1791
- findOffers(options) {
1792
- return this.http
1793
- .get(`${this.actionUrl}/offers`, {
1794
- params: options,
1795
- withCredentials: true,
1796
- })
1797
- .pipe(switchMap((res) => {
1798
- const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
1799
- return this.findPropertiesByIds(propertyIds).pipe(map((properties) => {
1800
- res.data?.forEach((item) => {
1801
- const matchingUser = _.find(properties.data, { id: item.propertyId });
1802
- item.property = matchingUser;
1803
- });
1804
- return res;
1805
- }));
1806
- }));
1807
- }
1808
- findOffersByUser(options) {
1809
- return this.http
1810
- .get(`${this.actionUrl}/offers/by/user`, {
1811
- params: options,
1812
- withCredentials: true,
1813
- })
1814
- .pipe(switchMap((res) => {
1815
- const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
1816
- return this.findPropertiesByIds(propertyIds).pipe(map((properties) => {
1817
- res.data?.forEach((item) => {
1818
- const matchingUser = _.find(properties.data, { id: item.propertyId });
1819
- item.property = matchingUser;
1820
- });
1821
- return res;
1822
- }));
1823
- }));
1824
- }
1825
- findOffersByAgent(options) {
1826
- return this.http
1827
- .get(`${this.actionUrl}/offers/by/agent`, {
1828
- params: options,
1829
- withCredentials: true,
1830
- })
1831
- .pipe(switchMap((res) => {
1832
- const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
1833
- return this.findPropertiesByIds(propertyIds).pipe(map((properties) => {
1834
- res.data?.forEach((item) => {
1835
- const matchingUser = _.find(properties.data, { id: item.propertyId });
1836
- item.property = matchingUser;
1837
- });
1838
- return res;
1839
- }));
1840
- }));
1841
- }
1842
1786
  findPropertiesByIds(ids) {
1843
1787
  const params = { ids: ids.join(',') };
1844
1788
  return this.http.get(`${this.actionUrl}`, {
1845
1789
  params: params,
1846
1790
  });
1847
1791
  }
1848
- getOffer(offerId) {
1849
- return this.http.get(`${this.actionUrl}/offers/${offerId}`, { withCredentials: true });
1850
- }
1851
- cancelOffer(id) {
1852
- return this.http.post(`${this.actionUrl}/offers/${id}/cancel`, {}, {
1853
- withCredentials: true,
1854
- });
1855
- }
1856
- acceptOffer(id) {
1857
- return this.http.put(`${this.actionUrl}/offers/${id}/accept`, {}, {
1858
- withCredentials: true,
1859
- });
1860
- }
1861
- rejectOffer(id, data) {
1862
- return this.http.put(`${this.actionUrl}/offers/${id}/reject`, data, {
1863
- withCredentials: true,
1864
- });
1865
- }
1866
- referencesAccept(id) {
1867
- return this.http.post(`${this.actionUrl}/offers/${id}/references/accept`, {}, {
1868
- withCredentials: true,
1869
- });
1870
- }
1871
- referencesReject(id, data) {
1872
- return this.http.post(`${this.actionUrl}/offers/${id}/references/reject`, data, {
1873
- withCredentials: true,
1874
- });
1875
- }
1876
- createHoldingDepositCheckout(offerId, data) {
1877
- return this.http.post(`${this.actionUrl}/offers/${offerId}/pay/holding-deposit`, data, {
1878
- withCredentials: true,
1879
- });
1880
- }
1881
- createSecurityDepositCheckout(offerId, data) {
1882
- return this.http.post(`${this.actionUrl}/offers/${offerId}/pay/security-deposit`, data, {
1883
- withCredentials: true,
1884
- });
1885
- }
1886
- checkOfferPaymentStatus(offerId, sessionId) {
1887
- const options = {
1888
- sessionId,
1889
- };
1890
- return this.http.get(`${this.actionUrl}/offers/${offerId}/session`, { params: options, withCredentials: true });
1891
- }
1892
- offerTimeline(offerId) {
1893
- return this.http.get(`${this.actionUrl}/offers/${offerId}/timeline`, {
1894
- withCredentials: true,
1895
- });
1896
- }
1897
1792
  // Highlights
1898
1793
  getHighlights(id) {
1899
1794
  return this.http.get(`${this.actionUrl}/${id}/highlights`, { withCredentials: false });
@@ -3163,6 +3058,11 @@ class InvoiceService extends BaseService {
3163
3058
  withCredentials: true,
3164
3059
  });
3165
3060
  }
3061
+ updateInvoice(invoiceId, data) {
3062
+ return this.http.put(`${this.actionUrl}/${invoiceId}`, data, {
3063
+ withCredentials: true,
3064
+ });
3065
+ }
3166
3066
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: InvoiceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3167
3067
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: InvoiceService, providedIn: 'root' });
3168
3068
  }
@@ -3278,6 +3178,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
3278
3178
  }]
3279
3179
  }] });
3280
3180
 
3181
+ class PropertyOfferService extends BaseService {
3182
+ propertyService = inject(PropertyService);
3183
+ init() {
3184
+ this.endpoint = 'properties';
3185
+ super.init();
3186
+ }
3187
+ makeOffer(propertyId, data) {
3188
+ return this.http.post(`${this.actionUrl}/${propertyId}/offers`, data, {
3189
+ withCredentials: true,
3190
+ });
3191
+ }
3192
+ findOffers(options) {
3193
+ return this.http
3194
+ .get(`${this.actionUrl}/offers`, {
3195
+ params: options,
3196
+ withCredentials: true,
3197
+ })
3198
+ .pipe(switchMap((res) => {
3199
+ const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
3200
+ return this.propertyService.findPropertiesByIds(propertyIds).pipe(map((properties) => {
3201
+ res.data?.forEach((item) => {
3202
+ const matchingUser = _.find(properties.data, { id: item.propertyId });
3203
+ item.property = matchingUser;
3204
+ });
3205
+ return res;
3206
+ }));
3207
+ }));
3208
+ }
3209
+ findOffersByUser(options) {
3210
+ return this.http
3211
+ .get(`${this.actionUrl}/offers/by/user`, {
3212
+ params: options,
3213
+ withCredentials: true,
3214
+ })
3215
+ .pipe(switchMap((res) => {
3216
+ const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
3217
+ return this.propertyService.findPropertiesByIds(propertyIds).pipe(map((properties) => {
3218
+ res.data?.forEach((item) => {
3219
+ const matchingUser = _.find(properties.data, { id: item.propertyId });
3220
+ item.property = matchingUser;
3221
+ });
3222
+ return res;
3223
+ }));
3224
+ }));
3225
+ }
3226
+ findOffersByAgent(options) {
3227
+ return this.http
3228
+ .get(`${this.actionUrl}/offers/by/agent`, {
3229
+ params: options,
3230
+ withCredentials: true,
3231
+ })
3232
+ .pipe(switchMap((res) => {
3233
+ const propertyIds = _.uniq(_.map(res.data, 'propertyId')); // [12, 14, 16, 18]
3234
+ return this.propertyService.findPropertiesByIds(propertyIds).pipe(map((properties) => {
3235
+ res.data?.forEach((item) => {
3236
+ const matchingUser = _.find(properties.data, { id: item.propertyId });
3237
+ item.property = matchingUser;
3238
+ });
3239
+ return res;
3240
+ }));
3241
+ }));
3242
+ }
3243
+ getOffer(offerId) {
3244
+ return this.http.get(`${this.actionUrl}/offers/${offerId}`, { withCredentials: true });
3245
+ }
3246
+ cancelOffer(id) {
3247
+ return this.http.post(`${this.actionUrl}/offers/${id}/cancel`, {}, {
3248
+ withCredentials: true,
3249
+ });
3250
+ }
3251
+ acceptOffer(id) {
3252
+ return this.http.put(`${this.actionUrl}/offers/${id}/accept`, {}, {
3253
+ withCredentials: true,
3254
+ });
3255
+ }
3256
+ rejectOffer(id, data) {
3257
+ return this.http.put(`${this.actionUrl}/offers/${id}/reject`, data, {
3258
+ withCredentials: true,
3259
+ });
3260
+ }
3261
+ referencesAccept(id) {
3262
+ return this.http.post(`${this.actionUrl}/offers/${id}/references/accept`, {}, {
3263
+ withCredentials: true,
3264
+ });
3265
+ }
3266
+ referencesReject(id, data) {
3267
+ return this.http.post(`${this.actionUrl}/offers/${id}/references/reject`, data, {
3268
+ withCredentials: true,
3269
+ });
3270
+ }
3271
+ createHoldingDepositCheckout(offerId, data) {
3272
+ return this.http.post(`${this.actionUrl}/offers/${offerId}/pay/holding-deposit`, data, {
3273
+ withCredentials: true,
3274
+ });
3275
+ }
3276
+ createSecurityDepositCheckout(offerId, data) {
3277
+ return this.http.post(`${this.actionUrl}/offers/${offerId}/pay/security-deposit`, data, {
3278
+ withCredentials: true,
3279
+ });
3280
+ }
3281
+ checkOfferPaymentStatus(offerId, sessionId) {
3282
+ const options = {
3283
+ sessionId,
3284
+ };
3285
+ return this.http.get(`${this.actionUrl}/offers/${offerId}/session`, { params: options, withCredentials: true });
3286
+ }
3287
+ offerTimeline(offerId) {
3288
+ return this.http.get(`${this.actionUrl}/offers/${offerId}/timeline`, {
3289
+ withCredentials: true,
3290
+ });
3291
+ }
3292
+ updateOffer(offerId, data) {
3293
+ return this.http.put(`${this.actionUrl}/offers/${offerId}`, data, {
3294
+ withCredentials: true,
3295
+ });
3296
+ }
3297
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyOfferService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3298
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyOfferService, providedIn: 'root' });
3299
+ }
3300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyOfferService, decorators: [{
3301
+ type: Injectable,
3302
+ args: [{
3303
+ providedIn: 'root',
3304
+ }]
3305
+ }] });
3306
+
3307
+ class PropertyViewingService extends BaseService {
3308
+ propertyService = inject(PropertyService);
3309
+ init() {
3310
+ this.endpoint = 'properties';
3311
+ super.init();
3312
+ }
3313
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyViewingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3314
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyViewingService, providedIn: 'root' });
3315
+ }
3316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: PropertyViewingService, decorators: [{
3317
+ type: Injectable,
3318
+ args: [{
3319
+ providedIn: 'root',
3320
+ }]
3321
+ }] });
3322
+
3281
3323
  class LoadingInterceptor {
3282
3324
  loadingService = inject(LoadingService);
3283
3325
  activeRequests = 0;
@@ -3442,5 +3484,5 @@ function provideAngularServices() {
3442
3484
  * Generated bundle index. Do not edit.
3443
3485
  */
3444
3486
 
3445
- export { AmenityService, BackButtonDirective, BaseService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, InventoryService, InvoiceService, InvoiceStatsService, LayoutService, LoadingInterceptor, LoadingService, MediaService, MembershipService, NavigationService, NotificationService, NotificationStore, NotificationTemplateService, OfferingService, OrderPayoutService, OrderService, PaymentService, PostService, ProductCategoryService, ProductService, PropertyHighlightsService, PropertySearchService, PropertyService, PropertyStatsService, ResourceCategoryService, ResourceService, SERVICE_DIRECTIVES, SidenavService, SnackBarService, SupportService, ThemeService, TimeZoneService, TitleService, acceptLanguageInterceptor, provideAngularServices };
3487
+ export { AmenityService, BackButtonDirective, BaseService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, InventoryService, InvoiceService, InvoiceStatsService, LayoutService, LoadingInterceptor, LoadingService, MediaService, MembershipService, NavigationService, NotificationService, NotificationStore, NotificationTemplateService, OfferingService, OrderPayoutService, OrderService, PaymentService, PostService, ProductCategoryService, ProductService, PropertyHighlightsService, PropertyOfferService, PropertySearchService, PropertyService, PropertyStatsService, PropertyViewingService, ResourceCategoryService, ResourceService, SERVICE_DIRECTIVES, SidenavService, SnackBarService, SupportService, ThemeService, TimeZoneService, TitleService, acceptLanguageInterceptor, provideAngularServices };
3446
3488
  //# sourceMappingURL=rolatech-angular-services.mjs.map