@homespot-sdk/core 0.0.356 → 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.
@@ -729,28 +729,6 @@ export const AddressRequestSchema = {
729
729
  },
730
730
  required: ['city', 'country', 'district', 'street', 'subdistrict'],
731
731
  };
732
- export const AmendAgencyDetailsRequestSchema = {
733
- type: 'object',
734
- properties: {
735
- name: {
736
- type: 'string',
737
- },
738
- email: {
739
- type: 'string',
740
- format: 'email',
741
- },
742
- subdomain: {
743
- type: 'string',
744
- },
745
- phone: {
746
- type: 'string',
747
- },
748
- address: {
749
- $ref: '#/components/schemas/AddressRequest',
750
- },
751
- },
752
- required: ['address', 'email', 'name', 'phone', 'subdomain'],
753
- };
754
732
  export const UpdateAgencyInfoRequestSchema = {
755
733
  type: 'object',
756
734
  properties: {
@@ -842,28 +820,6 @@ export const UploadAcknowledgmentResponseSchema = {
842
820
  },
843
821
  required: ['fail', 'success'],
844
822
  };
845
- export const TransferFundsRequestSchema = {
846
- type: 'object',
847
- properties: {
848
- transferTo: {
849
- type: 'string',
850
- format: 'uuid',
851
- },
852
- amount: {
853
- type: 'number',
854
- },
855
- },
856
- required: ['amount', 'transferTo'],
857
- };
858
- export const DepositFundsRequestSchema = {
859
- type: 'object',
860
- properties: {
861
- amount: {
862
- type: 'number',
863
- },
864
- },
865
- required: ['amount'],
866
- };
867
823
  export const ConnectLinkResponseSchema = {
868
824
  type: 'object',
869
825
  properties: {
@@ -1038,6 +994,7 @@ export const SubscriptionCheckoutResponseSchema = {
1038
994
  properties: {
1039
995
  checkoutUrl: {
1040
996
  type: 'string',
997
+ description: 'Null when payment is already confirmed; continue onboarding without paying again',
1041
998
  },
1042
999
  agencyId: {
1043
1000
  type: 'string',
@@ -1047,7 +1004,226 @@ export const SubscriptionCheckoutResponseSchema = {
1047
1004
  type: 'string',
1048
1005
  format: 'uuid',
1049
1006
  },
1007
+ status: {
1008
+ type: 'string',
1009
+ enum: [
1010
+ 'PENDING',
1011
+ 'TRIALING',
1012
+ 'ACTIVE',
1013
+ 'PAST_DUE',
1014
+ 'CANCELLED',
1015
+ 'EXPIRED',
1016
+ 'SUPERSEDED',
1017
+ ],
1018
+ },
1019
+ },
1020
+ };
1021
+ export const ProblemDetailSchema = {
1022
+ type: 'object',
1023
+ properties: {
1024
+ type: {
1025
+ type: 'string',
1026
+ format: 'uri',
1027
+ },
1028
+ title: {
1029
+ type: 'string',
1030
+ },
1031
+ status: {
1032
+ type: 'integer',
1033
+ format: 'int32',
1034
+ },
1035
+ detail: {
1036
+ type: 'string',
1037
+ },
1038
+ instance: {
1039
+ type: 'string',
1040
+ format: 'uri',
1041
+ },
1042
+ properties: {
1043
+ type: 'object',
1044
+ additionalProperties: {},
1045
+ },
1046
+ },
1047
+ };
1048
+ export const AgencyRegistrationConflictResponseSchema = {
1049
+ type: 'object',
1050
+ properties: {
1051
+ type: {
1052
+ type: 'string',
1053
+ format: 'uri',
1054
+ },
1055
+ title: {
1056
+ type: 'string',
1057
+ },
1058
+ status: {
1059
+ type: 'integer',
1060
+ format: 'int32',
1061
+ },
1062
+ detail: {
1063
+ type: 'string',
1064
+ },
1065
+ instance: {
1066
+ type: 'string',
1067
+ format: 'uri',
1068
+ },
1069
+ conflicts: {
1070
+ type: 'array',
1071
+ description: "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.",
1072
+ items: {
1073
+ type: 'string',
1074
+ enum: ['OWNER', 'NAME', 'SUBDOMAIN'],
1075
+ },
1076
+ uniqueItems: true,
1077
+ },
1078
+ code: {
1079
+ type: 'string',
1080
+ enum: ['AGENCY_REGISTRATION_CONFLICT'],
1081
+ },
1082
+ },
1083
+ required: [
1084
+ 'code',
1085
+ 'conflicts',
1086
+ 'detail',
1087
+ 'instance',
1088
+ 'status',
1089
+ 'title',
1090
+ 'type',
1091
+ ],
1092
+ };
1093
+ export const ConcurrentModificationResponseSchema = {
1094
+ type: 'object',
1095
+ properties: {
1096
+ type: {
1097
+ type: 'string',
1098
+ format: 'uri',
1099
+ },
1100
+ title: {
1101
+ type: 'string',
1102
+ },
1103
+ status: {
1104
+ type: 'integer',
1105
+ format: 'int32',
1106
+ },
1107
+ detail: {
1108
+ type: 'string',
1109
+ },
1110
+ instance: {
1111
+ type: 'string',
1112
+ format: 'uri',
1113
+ },
1114
+ code: {
1115
+ type: 'string',
1116
+ enum: ['CONCURRENT_MODIFICATION'],
1117
+ },
1118
+ },
1119
+ required: ['code', 'detail', 'instance', 'status', 'title', 'type'],
1120
+ };
1121
+ export const DataIntegrityConflictResponseSchema = {
1122
+ type: 'object',
1123
+ properties: {
1124
+ type: {
1125
+ type: 'string',
1126
+ format: 'uri',
1127
+ },
1128
+ title: {
1129
+ type: 'string',
1130
+ },
1131
+ status: {
1132
+ type: 'integer',
1133
+ format: 'int32',
1134
+ },
1135
+ detail: {
1136
+ type: 'string',
1137
+ },
1138
+ instance: {
1139
+ type: 'string',
1140
+ format: 'uri',
1141
+ },
1142
+ code: {
1143
+ type: 'string',
1144
+ enum: ['DATA_INTEGRITY_CONFLICT'],
1145
+ },
1146
+ },
1147
+ required: ['code', 'detail', 'instance', 'status', 'title', 'type'],
1148
+ };
1149
+ export const SubscriptionConflictResponseSchema = {
1150
+ discriminator: {
1151
+ propertyName: 'code',
1152
+ mapping: {
1153
+ AGENCY_REGISTRATION_CONFLICT: '#/components/schemas/AgencyRegistrationConflictResponse',
1154
+ SUBSCRIPTION_STATE_CONFLICT: '#/components/schemas/SubscriptionStateConflictResponse',
1155
+ CONCURRENT_MODIFICATION: '#/components/schemas/ConcurrentModificationResponse',
1156
+ DATA_INTEGRITY_CONFLICT: '#/components/schemas/DataIntegrityConflictResponse',
1157
+ },
1158
+ },
1159
+ oneOf: [
1160
+ {
1161
+ $ref: '#/components/schemas/AgencyRegistrationConflictResponse',
1162
+ },
1163
+ {
1164
+ $ref: '#/components/schemas/SubscriptionStateConflictResponse',
1165
+ },
1166
+ {
1167
+ $ref: '#/components/schemas/ConcurrentModificationResponse',
1168
+ },
1169
+ {
1170
+ $ref: '#/components/schemas/DataIntegrityConflictResponse',
1171
+ },
1172
+ ],
1173
+ };
1174
+ export const SubscriptionStateConflictResponseSchema = {
1175
+ type: 'object',
1176
+ properties: {
1177
+ type: {
1178
+ type: 'string',
1179
+ format: 'uri',
1180
+ },
1181
+ title: {
1182
+ type: 'string',
1183
+ },
1184
+ status: {
1185
+ type: 'integer',
1186
+ format: 'int32',
1187
+ },
1188
+ detail: {
1189
+ type: 'string',
1190
+ },
1191
+ instance: {
1192
+ type: 'string',
1193
+ format: 'uri',
1194
+ },
1195
+ subscriptionId: {
1196
+ type: 'string',
1197
+ format: 'uuid',
1198
+ },
1199
+ subscriptionStatus: {
1200
+ type: 'string',
1201
+ description: 'Subscription lifecycle status. The standard problem status field remains the HTTP status code.',
1202
+ enum: [
1203
+ 'PENDING',
1204
+ 'TRIALING',
1205
+ 'ACTIVE',
1206
+ 'PAST_DUE',
1207
+ 'CANCELLED',
1208
+ 'EXPIRED',
1209
+ 'SUPERSEDED',
1210
+ ],
1211
+ },
1212
+ code: {
1213
+ type: 'string',
1214
+ enum: ['SUBSCRIPTION_STATE_CONFLICT'],
1215
+ },
1050
1216
  },
1217
+ required: [
1218
+ 'code',
1219
+ 'detail',
1220
+ 'instance',
1221
+ 'status',
1222
+ 'subscriptionId',
1223
+ 'subscriptionStatus',
1224
+ 'title',
1225
+ 'type',
1226
+ ],
1051
1227
  };
1052
1228
  export const ChangePlanRequestSchema = {
1053
1229
  type: 'object',
@@ -1407,33 +1583,6 @@ export const SendMessageRequestSchema = {
1407
1583
  },
1408
1584
  required: ['text'],
1409
1585
  };
1410
- export const ProblemDetailSchema = {
1411
- type: 'object',
1412
- properties: {
1413
- type: {
1414
- type: 'string',
1415
- format: 'uri',
1416
- },
1417
- title: {
1418
- type: 'string',
1419
- },
1420
- status: {
1421
- type: 'integer',
1422
- format: 'int32',
1423
- },
1424
- detail: {
1425
- type: 'string',
1426
- },
1427
- instance: {
1428
- type: 'string',
1429
- format: 'uri',
1430
- },
1431
- properties: {
1432
- type: 'object',
1433
- additionalProperties: {},
1434
- },
1435
- },
1436
- };
1437
1586
  export const StartPropertyRegistrationRequestSchema = {
1438
1587
  type: 'object',
1439
1588
  properties: {
@@ -3012,182 +3161,6 @@ export const StageCardsResponseSchema = {
3012
3161
  },
3013
3162
  required: ['data', 'members'],
3014
3163
  };
3015
- export const SubscriptionResponseSchema = {
3016
- type: 'object',
3017
- properties: {
3018
- subscriptionId: {
3019
- type: 'string',
3020
- format: 'uuid',
3021
- },
3022
- plan: {
3023
- type: 'string',
3024
- enum: ['STARTER', 'PRO', 'ENTERPRISE'],
3025
- },
3026
- billingCycle: {
3027
- type: 'string',
3028
- enum: ['MONTHLY', 'ANNUAL'],
3029
- },
3030
- priceMinorUnits: {
3031
- type: 'integer',
3032
- format: 'int64',
3033
- description: 'Per-cycle price in minor units (tetri)',
3034
- },
3035
- currency: {
3036
- type: 'string',
3037
- },
3038
- seats: {
3039
- type: 'integer',
3040
- format: 'int32',
3041
- },
3042
- monthlyContactLimit: {
3043
- type: 'integer',
3044
- format: 'int32',
3045
- },
3046
- trialDays: {
3047
- type: 'integer',
3048
- format: 'int32',
3049
- },
3050
- status: {
3051
- type: 'string',
3052
- enum: [
3053
- 'PENDING',
3054
- 'TRIALING',
3055
- 'ACTIVE',
3056
- 'PAST_DUE',
3057
- 'CANCELLED',
3058
- 'EXPIRED',
3059
- ],
3060
- },
3061
- live: {
3062
- type: 'boolean',
3063
- description: 'Whether the agency is currently entitled to the workspace',
3064
- },
3065
- trialEndsAt: {
3066
- type: 'string',
3067
- format: 'date-time',
3068
- },
3069
- paidThroughAt: {
3070
- type: 'string',
3071
- format: 'date-time',
3072
- },
3073
- accessEndsAt: {
3074
- type: 'string',
3075
- format: 'date-time',
3076
- description: 'When the current entitlement ends, before grace; null while pending or once expired',
3077
- },
3078
- pastDueSince: {
3079
- type: 'string',
3080
- format: 'date-time',
3081
- },
3082
- lastChargedAt: {
3083
- type: 'string',
3084
- format: 'date-time',
3085
- },
3086
- createdAt: {
3087
- type: 'string',
3088
- format: 'date-time',
3089
- },
3090
- activatedAt: {
3091
- type: 'string',
3092
- format: 'date-time',
3093
- },
3094
- cancelledAt: {
3095
- type: 'string',
3096
- format: 'date-time',
3097
- },
3098
- checkoutExpiresAt: {
3099
- type: 'string',
3100
- format: 'date-time',
3101
- description: 'When the most recently issued checkout link stops being payable',
3102
- },
3103
- },
3104
- required: [
3105
- 'billingCycle',
3106
- 'createdAt',
3107
- 'currency',
3108
- 'live',
3109
- 'monthlyContactLimit',
3110
- 'plan',
3111
- 'priceMinorUnits',
3112
- 'seats',
3113
- 'status',
3114
- 'subscriptionId',
3115
- 'trialDays',
3116
- ],
3117
- };
3118
- export const PaymentResponseSchema = {
3119
- type: 'object',
3120
- properties: {
3121
- id: {
3122
- type: 'string',
3123
- format: 'uuid',
3124
- },
3125
- subscriptionId: {
3126
- type: 'string',
3127
- format: 'uuid',
3128
- },
3129
- flittPaymentId: {
3130
- type: 'string',
3131
- },
3132
- flittOrderId: {
3133
- type: 'string',
3134
- },
3135
- orderStatus: {
3136
- type: 'string',
3137
- description: "Flitt's verdict: approved / declined / reversed / expired …",
3138
- },
3139
- tranType: {
3140
- type: 'string',
3141
- },
3142
- outcome: {
3143
- type: 'string',
3144
- description: 'What the platform did with it',
3145
- enum: [
3146
- 'APPLIED',
3147
- 'TRIAL_STARTED',
3148
- 'DUPLICATE',
3149
- 'NOT_APPLIED_CANCELLED',
3150
- 'REJECTED_AMOUNT',
3151
- 'REJECTED_CURRENCY',
3152
- 'IGNORED_TRANSACTION_TYPE',
3153
- 'DECLINED',
3154
- 'REVERSED',
3155
- 'REVERSAL_IGNORED',
3156
- 'RECORDED',
3157
- ],
3158
- },
3159
- amountMinorUnits: {
3160
- type: 'integer',
3161
- format: 'int64',
3162
- },
3163
- currency: {
3164
- type: 'string',
3165
- },
3166
- responseCode: {
3167
- type: 'string',
3168
- },
3169
- responseDescription: {
3170
- type: 'string',
3171
- },
3172
- orderTime: {
3173
- type: 'string',
3174
- format: 'date-time',
3175
- },
3176
- receivedAt: {
3177
- type: 'string',
3178
- format: 'date-time',
3179
- },
3180
- },
3181
- required: [
3182
- 'flittOrderId',
3183
- 'flittPaymentId',
3184
- 'id',
3185
- 'orderStatus',
3186
- 'outcome',
3187
- 'receivedAt',
3188
- 'subscriptionId',
3189
- ],
3190
- };
3191
3164
  export const BucketSchema = {
3192
3165
  type: 'object',
3193
3166
  properties: {
@@ -4875,6 +4848,7 @@ export const SubscriptionEndingSchema = {
4875
4848
  'PAST_DUE',
4876
4849
  'CANCELLED',
4877
4850
  'EXPIRED',
4851
+ 'SUPERSEDED',
4878
4852
  ],
4879
4853
  },
4880
4854
  endsAt: {