@insurup/sdk 0.1.15 → 0.1.16

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
@@ -60,7 +60,7 @@ module.exports = __toCommonJS(index_exports);
60
60
  // package.json
61
61
  var package_default = {
62
62
  name: "@insurup/sdk",
63
- version: "0.1.15",
63
+ version: "0.1.16",
64
64
  description: "Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",
65
65
  keywords: [
66
66
  "insurup",
@@ -1703,11 +1703,8 @@ var customers = {
1703
1703
  render: (customerId) => "customers/{CustomerId}/consents".replace("{CustomerId}", encodeURIComponent(customerId))
1704
1704
  },
1705
1705
  revoke: {
1706
- definition: "customers/{CustomerId}/consents/revoke",
1707
- render: (customerId) => "customers/{CustomerId}/consents/revoke".replace(
1708
- "{CustomerId}",
1709
- encodeURIComponent(customerId)
1710
- )
1706
+ definition: "customers/{CustomerId}/consents/{ConsentType}",
1707
+ render: (customerId, consentType) => "customers/{CustomerId}/consents/{ConsentType}".replace("{CustomerId}", encodeURIComponent(customerId)).replace("{ConsentType}", encodeURIComponent(consentType))
1711
1708
  },
1712
1709
  getAll: {
1713
1710
  definition: "customers/{CustomerId}/consents",
@@ -3280,7 +3277,7 @@ var InsurUpCustomerClient = class {
3280
3277
  async giveCustomerConsent(customerId, request, options) {
3281
3278
  return this.http.postNoContent(
3282
3279
  endpoints.customers.consents.give.render(customerId),
3283
- request,
3280
+ { ...request, customerId },
3284
3281
  options
3285
3282
  );
3286
3283
  }
@@ -3290,13 +3287,12 @@ var InsurUpCustomerClient = class {
3290
3287
  * Müşteri veri hakları uyarınca önceden verilmiş bir müşteri iznini geri çeker.
3291
3288
  *
3292
3289
  * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı
3293
- * @param request Consent revocation request / İzin geri çekme talebi
3290
+ * @param consentType Type of consent to revoke / Geri çekilecek izin türü
3294
3291
  * @returns Operation result / İşlem sonucu
3295
3292
  */
3296
- async revokeCustomerConsent(customerId, request, options) {
3297
- return this.http.postNoContent(
3298
- endpoints.customers.consents.revoke.render(customerId),
3299
- request,
3293
+ async revokeCustomerConsent(customerId, consentType, options) {
3294
+ return this.http.deleteNoContent(
3295
+ endpoints.customers.consents.revoke.render(customerId, consentType),
3300
3296
  options
3301
3297
  );
3302
3298
  }