@homespot-sdk/core 0.0.355 → 0.0.357

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.
@@ -191,13 +191,6 @@ export type AddressRequest = {
191
191
  subdistrict: string;
192
192
  street: string;
193
193
  };
194
- export type AmendAgencyDetailsRequest = {
195
- name: string;
196
- email: string;
197
- subdomain: string;
198
- phone: string;
199
- address: AddressRequest;
200
- };
201
194
  export type UpdateAgencyInfoRequest = {
202
195
  name: string;
203
196
  email: string;
@@ -222,13 +215,6 @@ export type UploadAcknowledgmentResponse = {
222
215
  success: Array<string>;
223
216
  fail: Array<string>;
224
217
  };
225
- export type TransferFundsRequest = {
226
- transferTo: string;
227
- amount: number;
228
- };
229
- export type DepositFundsRequest = {
230
- amount: number;
231
- };
232
218
  export type ConnectLinkResponse = {
233
219
  link?: string;
234
220
  expiresAt?: Date;
@@ -282,9 +268,73 @@ export type SubscriptionAddressRequest = {
282
268
  street: string;
283
269
  };
284
270
  export type SubscriptionCheckoutResponse = {
271
+ /**
272
+ * Null when payment is already confirmed; continue onboarding without paying again
273
+ */
285
274
  checkoutUrl?: string;
286
275
  agencyId?: string;
287
276
  subscriptionId?: string;
277
+ status?: 'PENDING' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED' | 'SUPERSEDED';
278
+ };
279
+ export type ProblemDetail = {
280
+ type?: string;
281
+ title?: string;
282
+ status?: number;
283
+ detail?: string;
284
+ instance?: string;
285
+ properties?: {
286
+ [key: string]: unknown;
287
+ };
288
+ };
289
+ export type AgencyRegistrationConflictResponse = {
290
+ type: string;
291
+ title: string;
292
+ status: number;
293
+ detail: string;
294
+ instance: string;
295
+ /**
296
+ * All detected conflicts: NAME is taken, SUBDOMAIN is taken, or OWNER already owns an agency. A retry of the owner's NEW agency is allowed.
297
+ */
298
+ conflicts: Array<'OWNER' | 'NAME' | 'SUBDOMAIN'>;
299
+ code: 'AGENCY_REGISTRATION_CONFLICT';
300
+ };
301
+ export type ConcurrentModificationResponse = {
302
+ type: string;
303
+ title: string;
304
+ status: number;
305
+ detail: string;
306
+ instance: string;
307
+ code: 'CONCURRENT_MODIFICATION';
308
+ };
309
+ export type DataIntegrityConflictResponse = {
310
+ type: string;
311
+ title: string;
312
+ status: number;
313
+ detail: string;
314
+ instance: string;
315
+ code: 'DATA_INTEGRITY_CONFLICT';
316
+ };
317
+ export type SubscriptionConflictResponse = ({
318
+ code: 'AGENCY_REGISTRATION_CONFLICT';
319
+ } & AgencyRegistrationConflictResponse) | ({
320
+ code: 'SUBSCRIPTION_STATE_CONFLICT';
321
+ } & SubscriptionStateConflictResponse) | ({
322
+ code: 'CONCURRENT_MODIFICATION';
323
+ } & ConcurrentModificationResponse) | ({
324
+ code: 'DATA_INTEGRITY_CONFLICT';
325
+ } & DataIntegrityConflictResponse);
326
+ export type SubscriptionStateConflictResponse = {
327
+ type: string;
328
+ title: string;
329
+ status: number;
330
+ detail: string;
331
+ instance: string;
332
+ subscriptionId: string;
333
+ /**
334
+ * Subscription lifecycle status. The standard problem status field remains the HTTP status code.
335
+ */
336
+ subscriptionStatus: 'PENDING' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED' | 'SUPERSEDED';
337
+ code: 'SUBSCRIPTION_STATE_CONFLICT';
288
338
  };
289
339
  export type ChangePlanRequest = {
290
340
  plan: 'STARTER' | 'PRO' | 'ENTERPRISE';
@@ -383,16 +433,6 @@ export type AgencyPrincipalDto = {
383
433
  export type SendMessageRequest = {
384
434
  text: string;
385
435
  };
386
- export type ProblemDetail = {
387
- type?: string;
388
- title?: string;
389
- status?: number;
390
- detail?: string;
391
- instance?: string;
392
- properties?: {
393
- [key: string]: unknown;
394
- };
395
- };
396
436
  export type StartPropertyRegistrationRequest = {
397
437
  propertyType: 'HOUSE' | 'TOWN_HOUSE' | 'COUNTRY_HOUSE' | 'VILLA' | 'COTTAGE' | 'APARTMENT' | 'DUPLEX' | 'TRIPLEX' | 'SEMI_BASEMENT' | 'ATTIC' | 'AGRICULTURAL_LAND' | 'RESIDENTIAL_LAND' | 'HOTEL_ROOM' | 'MOTEL_ROOM' | 'CO_LIVING_SPACE' | 'OFFICE' | 'COMMERCIAL_SPACE' | 'CO_WORKING_SPACE' | 'WAREHOUSE' | 'GARAGE';
398
438
  };
@@ -766,60 +806,6 @@ export type StageCardsResponse = {
766
806
  members: Array<MemberPeekResponse>;
767
807
  data: CursorPageTaskCardResponse;
768
808
  };
769
- export type SubscriptionResponse = {
770
- subscriptionId: string;
771
- plan: 'STARTER' | 'PRO' | 'ENTERPRISE';
772
- billingCycle: 'MONTHLY' | 'ANNUAL';
773
- /**
774
- * Per-cycle price in minor units (tetri)
775
- */
776
- priceMinorUnits: number;
777
- currency: string;
778
- seats: number;
779
- monthlyContactLimit: number;
780
- trialDays: number;
781
- status: 'PENDING' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED';
782
- /**
783
- * Whether the agency is currently entitled to the workspace
784
- */
785
- live: boolean;
786
- trialEndsAt?: Date;
787
- paidThroughAt?: Date;
788
- /**
789
- * When the current entitlement ends, before grace; null while pending or once expired
790
- */
791
- accessEndsAt?: Date;
792
- pastDueSince?: Date;
793
- lastChargedAt?: Date;
794
- createdAt: Date;
795
- activatedAt?: Date;
796
- cancelledAt?: Date;
797
- /**
798
- * When the most recently issued checkout link stops being payable
799
- */
800
- checkoutExpiresAt?: Date;
801
- };
802
- export type PaymentResponse = {
803
- id: string;
804
- subscriptionId: string;
805
- flittPaymentId: string;
806
- flittOrderId: string;
807
- /**
808
- * Flitt's verdict: approved / declined / reversed / expired …
809
- */
810
- orderStatus: string;
811
- tranType?: string;
812
- /**
813
- * What the platform did with it
814
- */
815
- outcome: 'APPLIED' | 'TRIAL_STARTED' | 'DUPLICATE' | 'NOT_APPLIED_CANCELLED' | 'REJECTED_AMOUNT' | 'REJECTED_CURRENCY' | 'IGNORED_TRANSACTION_TYPE' | 'DECLINED' | 'REVERSED' | 'REVERSAL_IGNORED' | 'RECORDED';
816
- amountMinorUnits?: number;
817
- currency?: string;
818
- responseCode?: string;
819
- responseDescription?: string;
820
- orderTime?: Date;
821
- receivedAt: Date;
822
- };
823
809
  export type Bucket = {
824
810
  count: number;
825
811
  value: number;
@@ -1231,7 +1217,7 @@ export type PropertyId = {
1231
1217
  };
1232
1218
  export type SubscriptionEnding = {
1233
1219
  subscriptionId?: SubscriptionId;
1234
- status?: 'PENDING' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED';
1220
+ status?: 'PENDING' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED' | 'SUPERSEDED';
1235
1221
  endsAt?: Date;
1236
1222
  kind: 'SUBSCRIPTION_ENDING';
1237
1223
  };
@@ -2600,21 +2586,6 @@ export type PutBoardByBoardIdRenameResponses = {
2600
2586
  204: void;
2601
2587
  };
2602
2588
  export type PutBoardByBoardIdRenameResponse = PutBoardByBoardIdRenameResponses[keyof PutBoardByBoardIdRenameResponses];
2603
- export type PutAgencyByAgencyIdDetailsData = {
2604
- body: AmendAgencyDetailsRequest;
2605
- path: {
2606
- agencyId: string;
2607
- };
2608
- query?: never;
2609
- url: '/agency/{agencyId}/details';
2610
- };
2611
- export type PutAgencyByAgencyIdDetailsResponses = {
2612
- /**
2613
- * No Content
2614
- */
2615
- 204: void;
2616
- };
2617
- export type PutAgencyByAgencyIdDetailsResponse = PutAgencyByAgencyIdDetailsResponses[keyof PutAgencyByAgencyIdDetailsResponses];
2618
2589
  export type PutAgencySettingsInfoData = {
2619
2590
  body: UpdateAgencyInfoRequest;
2620
2591
  path?: never;
@@ -2729,32 +2700,6 @@ export type PostWhitelabelActivateResponses = {
2729
2700
  204: void;
2730
2701
  };
2731
2702
  export type PostWhitelabelActivateResponse = PostWhitelabelActivateResponses[keyof PostWhitelabelActivateResponses];
2732
- export type PostWalletTransferData = {
2733
- body: TransferFundsRequest;
2734
- path?: never;
2735
- query?: never;
2736
- url: '/wallet/transfer';
2737
- };
2738
- export type PostWalletTransferResponses = {
2739
- /**
2740
- * No Content
2741
- */
2742
- 204: void;
2743
- };
2744
- export type PostWalletTransferResponse = PostWalletTransferResponses[keyof PostWalletTransferResponses];
2745
- export type PostWalletDepositData = {
2746
- body: DepositFundsRequest;
2747
- path?: never;
2748
- query?: never;
2749
- url: '/wallet/deposit';
2750
- };
2751
- export type PostWalletDepositResponses = {
2752
- /**
2753
- * No Content
2754
- */
2755
- 204: void;
2756
- };
2757
- export type PostWalletDepositResponse = PostWalletDepositResponses[keyof PostWalletDepositResponses];
2758
2703
  export type PostTelegramConnectLinkData = {
2759
2704
  body?: never;
2760
2705
  path?: never;
@@ -2928,6 +2873,13 @@ export type DeleteSubscriptionsData = {
2928
2873
  query?: never;
2929
2874
  url: '/subscriptions';
2930
2875
  };
2876
+ export type DeleteSubscriptionsErrors = {
2877
+ /**
2878
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2879
+ */
2880
+ 409: SubscriptionConflictResponse;
2881
+ };
2882
+ export type DeleteSubscriptionsError = DeleteSubscriptionsErrors[keyof DeleteSubscriptionsErrors];
2931
2883
  export type DeleteSubscriptionsResponses = {
2932
2884
  /**
2933
2885
  * No Content
@@ -2935,64 +2887,111 @@ export type DeleteSubscriptionsResponses = {
2935
2887
  204: void;
2936
2888
  };
2937
2889
  export type DeleteSubscriptionsResponse = DeleteSubscriptionsResponses[keyof DeleteSubscriptionsResponses];
2890
+ export type GetSubscriptionsData = {
2891
+ body?: never;
2892
+ path?: never;
2893
+ query?: never;
2894
+ url: '/subscriptions';
2895
+ };
2896
+ export type GetSubscriptionsErrors = {
2897
+ /**
2898
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2899
+ */
2900
+ 409: SubscriptionConflictResponse;
2901
+ };
2902
+ export type GetSubscriptionsError = GetSubscriptionsErrors[keyof GetSubscriptionsErrors];
2938
2903
  export type PostSubscriptionsData = {
2939
2904
  body: SubscribeRequest;
2940
2905
  path?: never;
2941
2906
  query?: never;
2942
2907
  url: '/subscriptions';
2943
2908
  };
2909
+ export type PostSubscriptionsErrors = {
2910
+ /**
2911
+ * Malformed request or invalid field values
2912
+ */
2913
+ 400: ProblemDetail;
2914
+ /**
2915
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2916
+ */
2917
+ 409: SubscriptionConflictResponse;
2918
+ /**
2919
+ * Payment provider unavailable; retry to recover saved checkout details
2920
+ */
2921
+ 502: ProblemDetail;
2922
+ };
2923
+ export type PostSubscriptionsError = PostSubscriptionsErrors[keyof PostSubscriptionsErrors];
2944
2924
  export type PostSubscriptionsResponses = {
2945
2925
  /**
2946
- * Created
2926
+ * Payment already confirmed; checkoutUrl is null
2927
+ */
2928
+ 200: SubscriptionCheckoutResponse;
2929
+ /**
2930
+ * Checkout available
2947
2931
  */
2948
2932
  201: SubscriptionCheckoutResponse;
2949
2933
  };
2950
2934
  export type PostSubscriptionsResponse = PostSubscriptionsResponses[keyof PostSubscriptionsResponses];
2951
- export type PostSubscriptionsByAgencyIdResumeData = {
2935
+ export type PostSubscriptionsResumeData = {
2952
2936
  body?: never;
2953
- path: {
2954
- agencyId: string;
2955
- };
2937
+ path?: never;
2956
2938
  query?: never;
2957
- url: '/subscriptions/{agencyId}/resume';
2939
+ url: '/subscriptions/resume';
2940
+ };
2941
+ export type PostSubscriptionsResumeErrors = {
2942
+ /**
2943
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2944
+ */
2945
+ 409: SubscriptionConflictResponse;
2958
2946
  };
2959
- export type PostSubscriptionsByAgencyIdResumeResponses = {
2947
+ export type PostSubscriptionsResumeError = PostSubscriptionsResumeErrors[keyof PostSubscriptionsResumeErrors];
2948
+ export type PostSubscriptionsResumeResponses = {
2960
2949
  /**
2961
2950
  * No Content
2962
2951
  */
2963
2952
  204: void;
2964
2953
  };
2965
- export type PostSubscriptionsByAgencyIdResumeResponse = PostSubscriptionsByAgencyIdResumeResponses[keyof PostSubscriptionsByAgencyIdResumeResponses];
2966
- export type PostSubscriptionsByAgencyIdPlanData = {
2954
+ export type PostSubscriptionsResumeResponse = PostSubscriptionsResumeResponses[keyof PostSubscriptionsResumeResponses];
2955
+ export type PostSubscriptionsPlanData = {
2967
2956
  body: ChangePlanRequest;
2968
- path: {
2969
- agencyId: string;
2970
- };
2957
+ path?: never;
2971
2958
  query?: never;
2972
- url: '/subscriptions/{agencyId}/plan';
2959
+ url: '/subscriptions/plan';
2960
+ };
2961
+ export type PostSubscriptionsPlanErrors = {
2962
+ /**
2963
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2964
+ */
2965
+ 409: SubscriptionConflictResponse;
2973
2966
  };
2974
- export type PostSubscriptionsByAgencyIdPlanResponses = {
2967
+ export type PostSubscriptionsPlanError = PostSubscriptionsPlanErrors[keyof PostSubscriptionsPlanErrors];
2968
+ export type PostSubscriptionsPlanResponses = {
2975
2969
  /**
2976
2970
  * Created
2977
2971
  */
2978
2972
  201: SubscriptionCheckoutResponse;
2979
2973
  };
2980
- export type PostSubscriptionsByAgencyIdPlanResponse = PostSubscriptionsByAgencyIdPlanResponses[keyof PostSubscriptionsByAgencyIdPlanResponses];
2981
- export type PostSubscriptionsByAgencyIdCheckoutData = {
2974
+ export type PostSubscriptionsPlanResponse = PostSubscriptionsPlanResponses[keyof PostSubscriptionsPlanResponses];
2975
+ export type PostSubscriptionsCheckoutData = {
2982
2976
  body?: CheckoutRequest;
2983
- path: {
2984
- agencyId: string;
2985
- };
2977
+ path?: never;
2986
2978
  query?: never;
2987
- url: '/subscriptions/{agencyId}/checkout';
2979
+ url: '/subscriptions/checkout';
2988
2980
  };
2989
- export type PostSubscriptionsByAgencyIdCheckoutResponses = {
2981
+ export type PostSubscriptionsCheckoutErrors = {
2982
+ /**
2983
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
2984
+ */
2985
+ 409: SubscriptionConflictResponse;
2986
+ };
2987
+ export type PostSubscriptionsCheckoutError = PostSubscriptionsCheckoutErrors[keyof PostSubscriptionsCheckoutErrors];
2988
+ export type PostSubscriptionsCheckoutResponses = {
2990
2989
  /**
2991
2990
  * Created
2992
2991
  */
2993
2992
  201: SubscriptionCheckoutResponse;
2994
2993
  };
2995
- export type PostSubscriptionsByAgencyIdCheckoutResponse = PostSubscriptionsByAgencyIdCheckoutResponses[keyof PostSubscriptionsByAgencyIdCheckoutResponses];
2994
+ export type PostSubscriptionsCheckoutResponse = PostSubscriptionsCheckoutResponses[keyof PostSubscriptionsCheckoutResponses];
2996
2995
  export type GetRolesData = {
2997
2996
  body?: never;
2998
2997
  path?: never;
@@ -3991,51 +3990,19 @@ export type GetTaskBoardByBoardIdCardsResponses = {
3991
3990
  200: StageCardsResponse;
3992
3991
  };
3993
3992
  export type GetTaskBoardByBoardIdCardsResponse = GetTaskBoardByBoardIdCardsResponses[keyof GetTaskBoardByBoardIdCardsResponses];
3994
- export type DeleteSubscriptionsByAgencyIdData = {
3995
- body?: never;
3996
- path: {
3997
- agencyId: string;
3998
- };
3999
- query?: never;
4000
- url: '/subscriptions/{agencyId}';
4001
- };
4002
- export type DeleteSubscriptionsByAgencyIdResponses = {
4003
- /**
4004
- * No Content
4005
- */
4006
- 204: void;
4007
- };
4008
- export type DeleteSubscriptionsByAgencyIdResponse = DeleteSubscriptionsByAgencyIdResponses[keyof DeleteSubscriptionsByAgencyIdResponses];
4009
- export type GetSubscriptionsByAgencyIdData = {
4010
- body?: never;
4011
- path: {
4012
- agencyId: string;
4013
- };
4014
- query?: never;
4015
- url: '/subscriptions/{agencyId}';
4016
- };
4017
- export type GetSubscriptionsByAgencyIdResponses = {
4018
- /**
4019
- * OK
4020
- */
4021
- 200: SubscriptionResponse;
4022
- };
4023
- export type GetSubscriptionsByAgencyIdResponse = GetSubscriptionsByAgencyIdResponses[keyof GetSubscriptionsByAgencyIdResponses];
4024
- export type GetSubscriptionsByAgencyIdPaymentsData = {
3993
+ export type GetSubscriptionsPaymentsData = {
4025
3994
  body?: never;
4026
- path: {
4027
- agencyId: string;
4028
- };
3995
+ path?: never;
4029
3996
  query?: never;
4030
- url: '/subscriptions/{agencyId}/payments';
3997
+ url: '/subscriptions/payments';
4031
3998
  };
4032
- export type GetSubscriptionsByAgencyIdPaymentsResponses = {
3999
+ export type GetSubscriptionsPaymentsErrors = {
4033
4000
  /**
4034
- * OK
4001
+ * Registration conflicts, subscription state, or concurrent changes prevent this operation. Inspect code to select the error type.
4035
4002
  */
4036
- 200: Array<PaymentResponse>;
4003
+ 409: SubscriptionConflictResponse;
4037
4004
  };
4038
- export type GetSubscriptionsByAgencyIdPaymentsResponse = GetSubscriptionsByAgencyIdPaymentsResponses[keyof GetSubscriptionsByAgencyIdPaymentsResponses];
4005
+ export type GetSubscriptionsPaymentsError = GetSubscriptionsPaymentsErrors[keyof GetSubscriptionsPaymentsErrors];
4039
4006
  export type GetStatsPipelineCommissionData = {
4040
4007
  body?: never;
4041
4008
  path?: never;
@@ -5044,6 +5011,21 @@ export type DeleteTaskByTaskIdPropertyByPropertyIdResponses = {
5044
5011
  204: void;
5045
5012
  };
5046
5013
  export type DeleteTaskByTaskIdPropertyByPropertyIdResponse = DeleteTaskByTaskIdPropertyByPropertyIdResponses[keyof DeleteTaskByTaskIdPropertyByPropertyIdResponses];
5014
+ export type DeleteTaskByTaskIdOwnerData = {
5015
+ body?: never;
5016
+ path: {
5017
+ taskId: string;
5018
+ };
5019
+ query?: never;
5020
+ url: '/task/{taskId}/owner';
5021
+ };
5022
+ export type DeleteTaskByTaskIdOwnerResponses = {
5023
+ /**
5024
+ * No Content
5025
+ */
5026
+ 204: void;
5027
+ };
5028
+ export type DeleteTaskByTaskIdOwnerResponse = DeleteTaskByTaskIdOwnerResponses[keyof DeleteTaskByTaskIdOwnerResponses];
5047
5029
  export type DeleteTaskByTaskIdInterestByInterestIdData = {
5048
5030
  body?: never;
5049
5031
  path: {