arky-sdk 0.5.41 → 0.5.43

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/dist/index.cjs CHANGED
@@ -1100,14 +1100,37 @@ var createBookingApi = (apiConfig) => {
1100
1100
  }
1101
1101
  );
1102
1102
  },
1103
- async getProviderWorkingTime(params, options) {
1104
- const { providerId, ...queryParams } = params;
1103
+ async findServiceProviders(params, options) {
1104
+ const { businessId, ...queryParams } = params;
1105
+ const targetBusinessId = businessId || apiConfig.businessId;
1105
1106
  return apiConfig.httpClient.get(
1106
- `/v1/businesses/${apiConfig.businessId}/providers/${providerId}/working-time`,
1107
- {
1108
- ...options,
1109
- params: queryParams
1110
- }
1107
+ `/v1/businesses/${targetBusinessId}/service-providers`,
1108
+ { ...options, params: queryParams }
1109
+ );
1110
+ },
1111
+ async createServiceProvider(params, options) {
1112
+ const { businessId, ...payload } = params;
1113
+ const targetBusinessId = businessId || apiConfig.businessId;
1114
+ return apiConfig.httpClient.post(
1115
+ `/v1/businesses/${targetBusinessId}/service-providers`,
1116
+ payload,
1117
+ options
1118
+ );
1119
+ },
1120
+ async updateServiceProvider(params, options) {
1121
+ const { businessId, id, ...payload } = params;
1122
+ const targetBusinessId = businessId || apiConfig.businessId;
1123
+ return apiConfig.httpClient.put(
1124
+ `/v1/businesses/${targetBusinessId}/service-providers/${id}`,
1125
+ payload,
1126
+ options
1127
+ );
1128
+ },
1129
+ async deleteServiceProvider(params, options) {
1130
+ const targetBusinessId = params.businessId || apiConfig.businessId;
1131
+ return apiConfig.httpClient.delete(
1132
+ `/v1/businesses/${targetBusinessId}/service-providers/${params.id}`,
1133
+ options
1111
1134
  );
1112
1135
  }
1113
1136
  };