@commercelayer/provisioning-sdk 3.0.0-beta.0 → 3.0.0-beta.2

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.
Files changed (146) hide show
  1. package/README.md +18 -9
  2. package/lib/{api-BY0jb79k.d.cts → api-C4jp_9vb.d.cts} +489 -480
  3. package/lib/{api-e4p3q-SB.d.ts → api-C_E9e1ea.d.ts} +489 -480
  4. package/lib/api.cjs +23 -23
  5. package/lib/api.d.cts +1 -1
  6. package/lib/api.d.ts +1 -1
  7. package/lib/api.js +13 -13
  8. package/lib/binding.cjs +3 -3
  9. package/lib/binding.d.cts +2 -2
  10. package/lib/binding.d.ts +2 -2
  11. package/lib/binding.js +2 -2
  12. package/lib/bundle.cjs +17 -17
  13. package/lib/bundle.d.cts +1 -1
  14. package/lib/bundle.d.ts +1 -1
  15. package/lib/bundle.js +15 -15
  16. package/lib/{chunk-63TTSE4U.cjs → chunk-3ILNEP2F.cjs} +26 -26
  17. package/lib/{chunk-63TTSE4U.cjs.map → chunk-3ILNEP2F.cjs.map} +1 -1
  18. package/lib/{chunk-C6AOOHOR.cjs → chunk-3NDVX4SE.cjs} +4 -4
  19. package/lib/{chunk-C6AOOHOR.cjs.map → chunk-3NDVX4SE.cjs.map} +1 -1
  20. package/lib/{chunk-DTD2FIJ3.js → chunk-3PJNJ7B6.js} +3 -3
  21. package/lib/{chunk-DTD2FIJ3.js.map → chunk-3PJNJ7B6.js.map} +1 -1
  22. package/lib/{chunk-ELYBYKRM.cjs → chunk-6FB54J7W.cjs} +4 -4
  23. package/lib/chunk-6FB54J7W.cjs.map +1 -0
  24. package/lib/{chunk-5KN7B3T2.cjs → chunk-6MXIGF2G.cjs} +10 -10
  25. package/lib/{chunk-5KN7B3T2.cjs.map → chunk-6MXIGF2G.cjs.map} +1 -1
  26. package/lib/{chunk-YYHZPR4Z.js → chunk-7YEOUGXO.js} +3 -3
  27. package/lib/{chunk-YYHZPR4Z.js.map → chunk-7YEOUGXO.js.map} +1 -1
  28. package/lib/{chunk-E2ERI2EX.js → chunk-CWXGTX7W.js} +4 -4
  29. package/lib/{chunk-E2ERI2EX.js.map → chunk-CWXGTX7W.js.map} +1 -1
  30. package/lib/{chunk-HAZ53WDW.cjs → chunk-DYMRH6LP.cjs} +4 -4
  31. package/lib/{chunk-HAZ53WDW.cjs.map → chunk-DYMRH6LP.cjs.map} +1 -1
  32. package/lib/{chunk-FWF7HBWB.js → chunk-ECGUWRRG.js} +3 -3
  33. package/lib/{chunk-FWF7HBWB.js.map → chunk-ECGUWRRG.js.map} +1 -1
  34. package/lib/{chunk-F2RLD5SN.cjs → chunk-EVDEBFHZ.cjs} +13 -8
  35. package/lib/chunk-EVDEBFHZ.cjs.map +1 -0
  36. package/lib/{chunk-BWDFMGX6.cjs → chunk-FMHTNUZ4.cjs} +4 -4
  37. package/lib/{chunk-BWDFMGX6.cjs.map → chunk-FMHTNUZ4.cjs.map} +1 -1
  38. package/lib/{chunk-HOL7SMFN.cjs → chunk-FRLV5YFL.cjs} +4 -4
  39. package/lib/{chunk-HOL7SMFN.cjs.map → chunk-FRLV5YFL.cjs.map} +1 -1
  40. package/lib/{chunk-UYATAIX7.js → chunk-G4JBHI2H.js} +3 -3
  41. package/lib/{chunk-UYATAIX7.js.map → chunk-G4JBHI2H.js.map} +1 -1
  42. package/lib/{chunk-4Z4U45XQ.js → chunk-GHXKZEH7.js} +8 -3
  43. package/lib/chunk-GHXKZEH7.js.map +1 -0
  44. package/lib/{chunk-35GNS3WW.js → chunk-I4LPOTDO.js} +3 -3
  45. package/lib/{chunk-35GNS3WW.js.map → chunk-I4LPOTDO.js.map} +1 -1
  46. package/lib/{chunk-VAL4CE5R.js → chunk-IRFPCJTG.js} +3 -3
  47. package/lib/{chunk-VAL4CE5R.js.map → chunk-IRFPCJTG.js.map} +1 -1
  48. package/lib/{chunk-3XLKYXM6.cjs → chunk-KO4FQ4V2.cjs} +4 -4
  49. package/lib/{chunk-3XLKYXM6.cjs.map → chunk-KO4FQ4V2.cjs.map} +1 -1
  50. package/lib/{chunk-U2CAAK2J.js → chunk-KT6LCJJQ.js} +3 -3
  51. package/lib/{chunk-U2CAAK2J.js.map → chunk-KT6LCJJQ.js.map} +1 -1
  52. package/lib/{chunk-FOU52N6P.js → chunk-LTIWXCVE.js} +3 -3
  53. package/lib/{chunk-FOU52N6P.js.map → chunk-LTIWXCVE.js.map} +1 -1
  54. package/lib/{chunk-W6XILXYS.cjs → chunk-MHV7FMLE.cjs} +4 -4
  55. package/lib/{chunk-W6XILXYS.cjs.map → chunk-MHV7FMLE.cjs.map} +1 -1
  56. package/lib/{chunk-Z4IAVXOO.cjs → chunk-NDKGLF4B.cjs} +4 -4
  57. package/lib/{chunk-Z4IAVXOO.cjs.map → chunk-NDKGLF4B.cjs.map} +1 -1
  58. package/lib/{chunk-CFU5DNH2.cjs → chunk-OROPOAHK.cjs} +4 -4
  59. package/lib/{chunk-CFU5DNH2.cjs.map → chunk-OROPOAHK.cjs.map} +1 -1
  60. package/lib/{chunk-UB3WPGDV.js → chunk-SQLX22US.js} +3 -3
  61. package/lib/chunk-SQLX22US.js.map +1 -0
  62. package/lib/{chunk-3ELZDTFF.js → chunk-STPXKF53.js} +4 -4
  63. package/lib/{chunk-3ELZDTFF.js.map → chunk-STPXKF53.js.map} +1 -1
  64. package/lib/{chunk-RDLVNJEW.js → chunk-T2U6MUX4.js} +3 -3
  65. package/lib/{chunk-RDLVNJEW.js.map → chunk-T2U6MUX4.js.map} +1 -1
  66. package/lib/{chunk-CLOSZJSZ.cjs → chunk-TXONK7R5.cjs} +4 -4
  67. package/lib/{chunk-CLOSZJSZ.cjs.map → chunk-TXONK7R5.cjs.map} +1 -1
  68. package/lib/{chunk-WRVLCJQZ.cjs → chunk-TY46WNR6.cjs} +8 -8
  69. package/lib/{chunk-WRVLCJQZ.cjs.map → chunk-TY46WNR6.cjs.map} +1 -1
  70. package/lib/{chunk-7OPCEEJV.cjs → chunk-UILXNOZE.cjs} +4 -4
  71. package/lib/{chunk-7OPCEEJV.cjs.map → chunk-UILXNOZE.cjs.map} +1 -1
  72. package/lib/{chunk-GES5UXTI.js → chunk-WMUY7Z2Q.js} +3 -3
  73. package/lib/{chunk-GES5UXTI.js.map → chunk-WMUY7Z2Q.js.map} +1 -1
  74. package/lib/{chunk-3FP4NVLD.cjs → chunk-XS6QLJHG.cjs} +3 -3
  75. package/lib/chunk-XS6QLJHG.cjs.map +1 -0
  76. package/lib/{chunk-6I5KGZAU.js → chunk-YUNEDDTL.js} +14 -14
  77. package/lib/{chunk-6I5KGZAU.js.map → chunk-YUNEDDTL.js.map} +1 -1
  78. package/lib/{chunk-QRZGS4TB.js → chunk-ZWZHZ4SU.js} +3 -3
  79. package/lib/chunk-ZWZHZ4SU.js.map +1 -0
  80. package/lib/commercelayer.cjs +10 -10
  81. package/lib/commercelayer.d.cts +1 -1
  82. package/lib/commercelayer.d.ts +1 -1
  83. package/lib/commercelayer.js +4 -4
  84. package/lib/enum.d.cts +1 -1
  85. package/lib/enum.d.ts +1 -1
  86. package/lib/index.cjs +22 -22
  87. package/lib/index.cjs.map +1 -1
  88. package/lib/index.d.cts +1 -1
  89. package/lib/index.d.ts +1 -1
  90. package/lib/index.js +17 -17
  91. package/lib/index.js.map +1 -1
  92. package/lib/model.d.cts +1 -1
  93. package/lib/model.d.ts +1 -1
  94. package/lib/resources/api_credentials.cjs +5 -5
  95. package/lib/resources/api_credentials.d.cts +2 -2
  96. package/lib/resources/api_credentials.d.ts +1 -1
  97. package/lib/resources/api_credentials.js +4 -4
  98. package/lib/resources/application_memberships.cjs +5 -5
  99. package/lib/resources/application_memberships.d.cts +2 -2
  100. package/lib/resources/application_memberships.d.ts +1 -1
  101. package/lib/resources/application_memberships.js +4 -4
  102. package/lib/resources/identity_providers.cjs +5 -5
  103. package/lib/resources/identity_providers.d.cts +2 -2
  104. package/lib/resources/identity_providers.d.ts +1 -1
  105. package/lib/resources/identity_providers.js +4 -4
  106. package/lib/resources/membership_profiles.cjs +5 -5
  107. package/lib/resources/membership_profiles.d.cts +2 -2
  108. package/lib/resources/membership_profiles.d.ts +1 -1
  109. package/lib/resources/membership_profiles.js +4 -4
  110. package/lib/resources/memberships.cjs +5 -5
  111. package/lib/resources/memberships.d.cts +2 -2
  112. package/lib/resources/memberships.d.ts +1 -1
  113. package/lib/resources/memberships.js +4 -4
  114. package/lib/resources/organizations.cjs +5 -5
  115. package/lib/resources/organizations.d.cts +2 -2
  116. package/lib/resources/organizations.d.ts +1 -1
  117. package/lib/resources/organizations.js +4 -4
  118. package/lib/resources/permissions.cjs +5 -5
  119. package/lib/resources/permissions.d.cts +2 -2
  120. package/lib/resources/permissions.d.ts +1 -1
  121. package/lib/resources/permissions.js +4 -4
  122. package/lib/resources/roles.cjs +5 -5
  123. package/lib/resources/roles.d.cts +2 -2
  124. package/lib/resources/roles.d.ts +1 -1
  125. package/lib/resources/roles.js +4 -4
  126. package/lib/resources/users.cjs +5 -5
  127. package/lib/resources/users.d.cts +2 -2
  128. package/lib/resources/users.d.ts +1 -1
  129. package/lib/resources/users.js +4 -4
  130. package/lib/resources/versions.cjs +5 -5
  131. package/lib/resources/versions.d.cts +2 -2
  132. package/lib/resources/versions.d.ts +1 -1
  133. package/lib/resources/versions.js +4 -4
  134. package/lib/static.cjs +6 -6
  135. package/lib/static.d.cts +1 -1
  136. package/lib/static.d.ts +1 -1
  137. package/lib/static.js +5 -5
  138. package/lib/version.cjs +4 -4
  139. package/lib/version.js +1 -1
  140. package/package.json +10 -11
  141. package/lib/chunk-3FP4NVLD.cjs.map +0 -1
  142. package/lib/chunk-4Z4U45XQ.js.map +0 -1
  143. package/lib/chunk-ELYBYKRM.cjs.map +0 -1
  144. package/lib/chunk-F2RLD5SN.cjs.map +0 -1
  145. package/lib/chunk-QRZGS4TB.js.map +0 -1
  146. package/lib/chunk-UB3WPGDV.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen/resources/organizations.ts"],"names":["ApiResource"],"mapp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,GAAW,IAAI,aAAA,EAAc;AACnC,IAAO,qBAAA,GAAQ","file":"chunk-Z4IAVXOO.cjs","sourcesContent":["import type { QueryParamsList, QueryParamsRetrieve } from '@runtime/query'\nimport type {\n ListResponse,\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\nimport type { TransferOwnershipDataType } from '../../src/actions'\nimport type { ApiCredential } from './api_credentials'\nimport type { Membership } from './memberships'\nimport type { Permission } from './permissions'\nimport type { Role } from './roles'\n\ntype OrganizationType = 'organizations'\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\n\nexport type OrganizationSort = Pick<Organization, 'id' | 'name' | 'slug' | 'domain'> & ResourceSort\n// export type OrganizationFilter = Pick<Organization, 'id' | 'name' | 'slug' | 'domain' | 'contrast_color' | 'region'> & ResourceFilter\n\n/**\n * The Organization object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/organizations endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/organizations/object\n */\ninterface Organization extends Resource {\n readonly type: OrganizationType\n\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's slug name.\n * @example ```\"the-blue-brand\"```\n */\n slug?: string | null\n /**\n * The organization's domain.\n * @example ```\"the-blue-brand.commercelayer.io\"```\n */\n domain?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * Indicates if the organization can switch to live mode.\n */\n can_switch_live?: boolean | null\n /**\n * Information about the current subscription such as the plan type, limits, and subscription totals counter.\n * @example ```{\"plan_type\":\"growth\",\"limits\":{\"markets\":5,\"skus\":10000,\"organizations\":2,\"memberships\":5},\"totals\":{\"organizations\":1,\"markets\":0,\"memberships\":2,\"skus\":0}}```\n */\n subscription_info?: Record<string, any> | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n /**\n * Enables the redirect on the new Auth API.\n * @example ```true```\n */\n api_auth_redirect?: boolean | null\n /**\n * Enables fragment caching for resources with related directive.\n */\n api_fragment_caching_enabled?: boolean | null\n /**\n * Enables the rules engine for flex promotions and price list rules.\n */\n api_rules_engine?: boolean | null\n /**\n * The fallback maximum number of conditions within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n api_rules_engine_max_conditions_size?: number | null\n /**\n * The fallback maximum number of rules within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_RULES_SIZE}.\n * @example ```15```\n */\n api_rules_engine_max_rules_size?: number | null\n /**\n * Forces the usage of the new Authentication API.\n * @example ```true```\n */\n api_new_auth?: boolean | null\n /**\n * Enables the purge of cached single resources when list is purged.\n */\n api_purge_single_resource?: boolean | null\n /**\n * The maximum length for the regular expressions, default is {API_MAX_REGEX_LENGTH}.\n * @example ```5000```\n */\n api_max_regex_length?: number | null\n /**\n * Indicates if AVS checking will be enforced during payment workflow by passing specific attributes, default is {ADDRESSES_AVS_CHECK}.\n * @example ```true```\n */\n addresses_avs_check?: boolean | null\n /**\n * Indicates if the phone attribute is required for addresses, default is {ADDRESSES_PHONE_REQUIRED}.\n * @example ```true```\n */\n addresses_phone_required?: boolean | null\n /**\n * Indicates if a sales channel application without customer can read and update just guest orders.\n * @example ```true```\n */\n orders_sales_channel_guest_only?: boolean | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive shipments rebuilt. If shipments rebuilt is triggered within the minimum lapse, the update is performed, but no rebuilt is done.\n */\n orders_min_rebuild_shipments_lapse?: number | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive order refreshes. If refresh is triggered within the minimum lapse, the update is performed, but no order refresh is done.\n */\n orders_min_refresh_lapse?: number | null\n /**\n * The maximum number line items allowed for a test order before disabling the autorefresh option.\n * @example ```50```\n */\n orders_autorefresh_cutoff_test?: number | null\n /**\n * The maximum number line items allowed for a live order before disabling the autorefresh option.\n * @example ```500```\n */\n orders_autorefresh_cutoff_live?: number | null\n /**\n * Enables orders number editing as a string in test (for enterprise plans only).\n */\n orders_number_editable_test?: boolean | null\n /**\n * Enables orders number editing as a string in live (for enterprise plans only).\n */\n orders_number_editable_live?: boolean | null\n /**\n * Enables to use the order number as payment reference on supported gateways.\n * @example ```true```\n */\n orders_number_as_reference?: boolean | null\n /**\n * Enables raising of API errors in case the provided coupon code is invalid, default is {ORDERS_INVALID_COUPON_ERRORS}.\n * @example ```true```\n */\n orders_invalid_coupon_errors?: boolean | null\n /**\n * Enables raising of API errors in case the provided gift card code is invalid, default is {ORDERS_INVALID_GIFT_CARD_ERRORS}.\n * @example ```true```\n */\n orders_invalid_gift_card_errors?: boolean | null\n /**\n * Enables the validation of the generated stock line items and stock transfers before placing the order, default is {ORDERS_VALIDATE_SHIPPING_STOCK}.\n */\n orders_validate_shipping_stock?: boolean | null\n /**\n * The maximum number of SKUs allowed for bundles, default is {BUNDLES_MAX_ITEMS_COUNT}.\n * @example ```10```\n */\n bundles_max_items_count?: number | null\n /**\n * The minimum length for coupon code, default is {COUPONS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n coupons_min_code_length?: number | null\n /**\n * The maximum length for coupon code, default is {COUPONS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n coupons_max_code_length?: number | null\n /**\n * Enables matching the gift card code by its exact value, instead of by its first charachters, default is {GIFT_CARDS_EXACT_CODE_MATCHING}.\n */\n gift_cards_exact_code_matching?: boolean | null\n /**\n * The minimum length for gift card code, default is {GIFT_CARDS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n gift_cards_min_code_length?: number | null\n /**\n * The maximum length for gift card code, default is {GIFT_CARDS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n gift_cards_max_code_length?: number | null\n /**\n * The maximum number of concurrent cleanups allowed for your organization, default is {CLEANUPS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n cleanups_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent exports allowed for your organization, default is {EXPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n exports_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent imports allowed for your organization, default is {IMPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n imports_max_concurrent_count?: number | null\n /**\n * Enables purging of cached resources upon succeeded imports.\n * @example ```true```\n */\n imports_purge_cache?: boolean | null\n /**\n * Disables the interruption of the import in case its errors exceeds the 10% threshold, default is {IMPORTS_SKIP_ERRORS}.\n */\n imports_skip_errors?: boolean | null\n /**\n * The maximum number for stock locations cutoff, default is {INVENTORY_MODELS_MAX_STOCK_LOCATIONS_CUTOFF}.\n * @example ```10```\n */\n inventory_models_max_stock_locations_cutoff?: number | null\n /**\n * The maximum number of active concurrent promotions allowed for your organization, default is {PROMOTIONS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n promotions_max_concurrent_count?: number | null\n /**\n * The maximum number of conditions within a rules payload on a promotion object, default is {PROMOTIONS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n promotions_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a promotion object, default is {PROMOTIONS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n promotions_max_rules_size?: number | null\n /**\n * The maximum number of conditions within a rules payload on a price list object, default is {PRICE_LISTS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n price_lists_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a price list object, default is {PRICE_LISTS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n price_lists_max_rules_size?: number | null\n /**\n * Enables triggering of webhooks during imports, default is {IMPORTS_TRIGGER_WEBHOOKS}.\n * @example ```\"false\"```\n */\n imports_trigger_webhooks?: number | null\n /**\n * Enables the use of an external discount engine in place of the standard one, default is {DISCOUNT_ENGINES_ENABLED}.\n */\n discount_engines_enabled?: boolean | null\n /**\n * Enables raising of API errors in case of discount engine failure, default is {DISCOUNT_ENGINES_ERRORS}.\n */\n discount_engines_errors?: boolean | null\n /**\n * The maximum length for the tag name, default is {TAGS_MAX_NAME_LENGTH}.\n * @example ```25```\n */\n tags_max_name_length?: number | null\n /**\n * The maximum allowed number of tags for each resource, default is {TAGS_MAX_ALLOWED_NUMBER}.\n * @example ```10```\n */\n tags_max_allowed_number?: number | null\n /**\n * Enables raising of API errors in case of tax calculation failure, default is {TAX_CALCULATORS_ERRORS}.\n */\n tax_calculators_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external promotion failure, default is {EXTERNAL_PROMOTIONS_ERRORS}.\n */\n external_promotions_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external price failure, default is {EXTERNAL_PRICES_ERRORS}.\n * @example ```true```\n */\n external_prices_errors?: boolean | null\n /**\n * Enables the Sku discovery by similarity search.\n */\n skus_discovery?: boolean | null\n /**\n * Enables the creation of the authorization when the gateway event is received, even if there is no reference on Commerce Layer.\n */\n payment_gateways_transaction_on_event?: boolean | null\n\n memberships?: Membership[] | null\n roles?: Role[] | null\n permissions?: Permission[] | null\n api_credentials?: ApiCredential[] | null\n}\n\ninterface OrganizationCreate extends ResourceCreate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\ninterface OrganizationUpdate extends ResourceUpdate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\nclass Organizations extends ApiResource<Organization> {\n static readonly TYPE: OrganizationType = 'organizations' as const\n\n async create(\n resource: OrganizationCreate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.create<OrganizationCreate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: OrganizationUpdate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.update<OrganizationUpdate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async memberships(\n organizationId: string | Organization,\n params?: QueryParamsList<Membership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Membership>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `organizations/${_organizationId}/memberships`,\n params,\n options,\n ) as unknown as ListResponse<Membership>\n }\n\n async roles(\n organizationId: string | Organization,\n params?: QueryParamsList<Role>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Role>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `organizations/${_organizationId}/roles`,\n params,\n options,\n ) as unknown as ListResponse<Role>\n }\n\n async permissions(\n organizationId: string | Organization,\n params?: QueryParamsList<Permission>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Permission>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Permission>(\n { type: 'permissions' },\n `organizations/${_organizationId}/permissions`,\n params,\n options,\n ) as unknown as ListResponse<Permission>\n }\n\n async api_credentials(\n organizationId: string | Organization,\n params?: QueryParamsList<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApiCredential>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `organizations/${_organizationId}/api_credentials`,\n params,\n options,\n ) as unknown as ListResponse<ApiCredential>\n }\n\n async transfer_ownership(\n organizationId: string | Organization,\n payload: TransferOwnershipDataType,\n options?: ResourcesConfig,\n ): Promise<void> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n await this.resources.action('PATCH', `organizations/${_organizationId}/transfer_ownership`, { ...payload }, options)\n }\n\n isOrganization(resource: any): resource is Organization {\n return resource.type && resource.type === Organizations.TYPE\n }\n\n relationship(id: string | ResourceId | null): OrganizationRel {\n return super.relationshipOneToOne<OrganizationRel>(id)\n }\n\n relationshipToMany(...ids: string[]): OrganizationRel[] {\n return super.relationshipOneToMany<OrganizationRel>(...ids)\n }\n\n type(): OrganizationType {\n return Organizations.TYPE\n }\n}\n\nconst instance = new Organizations()\nexport default instance\n\nexport type { Organization, OrganizationCreate, Organizations, OrganizationType, OrganizationUpdate }\n"]}
1
+ {"version":3,"sources":["../gen/resources/organizations.ts"],"names":["ApiResource"],"mappings":";;;;;AAgcA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsBA,6BAAA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NDKGLF4B.cjs","sourcesContent":["import type { QueryParamsList, QueryParamsRetrieve } from '@runtime/query'\nimport type {\n ListResponse,\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\nimport type { TransferOwnershipDataType } from '../../src/actions'\nimport type { ApiCredential } from './api_credentials'\nimport type { Membership } from './memberships'\nimport type { Permission } from './permissions'\nimport type { Role } from './roles'\n\ntype OrganizationType = 'organizations'\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\n\nexport type OrganizationSort = Pick<Organization, 'id' | 'name' | 'slug' | 'domain'> & ResourceSort\n// export type OrganizationFilter = Pick<Organization, 'id' | 'name' | 'slug' | 'domain' | 'contrast_color' | 'region'> & ResourceFilter\n\n/**\n * The Organization object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/organizations endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/organizations/object\n */\ninterface Organization extends Resource {\n readonly type: OrganizationType\n\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's slug name.\n * @example ```\"the-blue-brand\"```\n */\n slug?: string | null\n /**\n * The organization's domain.\n * @example ```\"the-blue-brand.commercelayer.io\"```\n */\n domain?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * Indicates if the organization can switch to live mode.\n */\n can_switch_live?: boolean | null\n /**\n * Information about the current subscription such as the plan type, limits, and subscription totals counter.\n * @example ```{\"plan_type\":\"growth\",\"limits\":{\"markets\":5,\"skus\":10000,\"organizations\":2,\"memberships\":5},\"totals\":{\"organizations\":1,\"markets\":0,\"memberships\":2,\"skus\":0}}```\n */\n subscription_info?: Record<string, any> | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n /**\n * Enables the redirect on the new Auth API.\n * @example ```true```\n */\n api_auth_redirect?: boolean | null\n /**\n * Enables fragment caching for resources with related directive.\n */\n api_fragment_caching_enabled?: boolean | null\n /**\n * Enables the rules engine for flex promotions and price list rules.\n */\n api_rules_engine?: boolean | null\n /**\n * The fallback maximum number of conditions within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n api_rules_engine_max_conditions_size?: number | null\n /**\n * The fallback maximum number of rules within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_RULES_SIZE}.\n * @example ```15```\n */\n api_rules_engine_max_rules_size?: number | null\n /**\n * Forces the usage of the new Authentication API.\n * @example ```true```\n */\n api_new_auth?: boolean | null\n /**\n * Enables the purge of cached single resources when list is purged.\n */\n api_purge_single_resource?: boolean | null\n /**\n * The maximum length for the regular expressions, default is {API_MAX_REGEX_LENGTH}.\n * @example ```5000```\n */\n api_max_regex_length?: number | null\n /**\n * Indicates if AVS checking will be enforced during payment workflow by passing specific attributes, default is {ADDRESSES_AVS_CHECK}.\n * @example ```true```\n */\n addresses_avs_check?: boolean | null\n /**\n * Indicates if the phone attribute is required for addresses, default is {ADDRESSES_PHONE_REQUIRED}.\n * @example ```true```\n */\n addresses_phone_required?: boolean | null\n /**\n * Indicates if a sales channel application without customer can read and update just guest orders.\n * @example ```true```\n */\n orders_sales_channel_guest_only?: boolean | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive shipments rebuilt. If shipments rebuilt is triggered within the minimum lapse, the update is performed, but no rebuilt is done.\n */\n orders_min_rebuild_shipments_lapse?: number | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive order refreshes. If refresh is triggered within the minimum lapse, the update is performed, but no order refresh is done.\n */\n orders_min_refresh_lapse?: number | null\n /**\n * The maximum number line items allowed for a test order before disabling the autorefresh option.\n * @example ```50```\n */\n orders_autorefresh_cutoff_test?: number | null\n /**\n * The maximum number line items allowed for a live order before disabling the autorefresh option.\n * @example ```500```\n */\n orders_autorefresh_cutoff_live?: number | null\n /**\n * Enables orders number editing as a string in test (for enterprise plans only).\n */\n orders_number_editable_test?: boolean | null\n /**\n * Enables orders number editing as a string in live (for enterprise plans only).\n */\n orders_number_editable_live?: boolean | null\n /**\n * Enables to use the order number as payment reference on supported gateways.\n * @example ```true```\n */\n orders_number_as_reference?: boolean | null\n /**\n * Enables raising of API errors in case the provided coupon code is invalid, default is {ORDERS_INVALID_COUPON_ERRORS}.\n * @example ```true```\n */\n orders_invalid_coupon_errors?: boolean | null\n /**\n * Enables raising of API errors in case the provided gift card code is invalid, default is {ORDERS_INVALID_GIFT_CARD_ERRORS}.\n * @example ```true```\n */\n orders_invalid_gift_card_errors?: boolean | null\n /**\n * Enables the validation of the generated stock line items and stock transfers before placing the order, default is {ORDERS_VALIDATE_SHIPPING_STOCK}.\n */\n orders_validate_shipping_stock?: boolean | null\n /**\n * The maximum number of SKUs allowed for bundles, default is {BUNDLES_MAX_ITEMS_COUNT}.\n * @example ```10```\n */\n bundles_max_items_count?: number | null\n /**\n * The minimum length for coupon code, default is {COUPONS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n coupons_min_code_length?: number | null\n /**\n * The maximum length for coupon code, default is {COUPONS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n coupons_max_code_length?: number | null\n /**\n * Enables matching the gift card code by its exact value, instead of by its first charachters, default is {GIFT_CARDS_EXACT_CODE_MATCHING}.\n */\n gift_cards_exact_code_matching?: boolean | null\n /**\n * The minimum length for gift card code, default is {GIFT_CARDS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n gift_cards_min_code_length?: number | null\n /**\n * The maximum length for gift card code, default is {GIFT_CARDS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n gift_cards_max_code_length?: number | null\n /**\n * The maximum number of concurrent cleanups allowed for your organization, default is {CLEANUPS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n cleanups_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent exports allowed for your organization, default is {EXPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n exports_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent imports allowed for your organization, default is {IMPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n imports_max_concurrent_count?: number | null\n /**\n * Enables purging of cached resources upon succeeded imports.\n * @example ```true```\n */\n imports_purge_cache?: boolean | null\n /**\n * Disables the interruption of the import in case its errors exceeds the 10% threshold, default is {IMPORTS_SKIP_ERRORS}.\n */\n imports_skip_errors?: boolean | null\n /**\n * The maximum number for stock locations cutoff, default is {INVENTORY_MODELS_MAX_STOCK_LOCATIONS_CUTOFF}.\n * @example ```10```\n */\n inventory_models_max_stock_locations_cutoff?: number | null\n /**\n * The maximum number of active concurrent promotions allowed for your organization, default is {PROMOTIONS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n promotions_max_concurrent_count?: number | null\n /**\n * The maximum number of conditions within a rules payload on a promotion object, default is {PROMOTIONS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n promotions_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a promotion object, default is {PROMOTIONS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n promotions_max_rules_size?: number | null\n /**\n * The maximum number of conditions within a rules payload on a price list object, default is {PRICE_LISTS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n price_lists_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a price list object, default is {PRICE_LISTS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n price_lists_max_rules_size?: number | null\n /**\n * Enables triggering of webhooks during imports, default is {IMPORTS_TRIGGER_WEBHOOKS}.\n * @example ```\"false\"```\n */\n imports_trigger_webhooks?: number | null\n /**\n * Enables the use of an external discount engine in place of the standard one, default is {DISCOUNT_ENGINES_ENABLED}.\n */\n discount_engines_enabled?: boolean | null\n /**\n * Enables raising of API errors in case of discount engine failure, default is {DISCOUNT_ENGINES_ERRORS}.\n */\n discount_engines_errors?: boolean | null\n /**\n * The maximum length for the tag name, default is {TAGS_MAX_NAME_LENGTH}.\n * @example ```25```\n */\n tags_max_name_length?: number | null\n /**\n * The maximum allowed number of tags for each resource, default is {TAGS_MAX_ALLOWED_NUMBER}.\n * @example ```10```\n */\n tags_max_allowed_number?: number | null\n /**\n * Enables raising of API errors in case of tax calculation failure, default is {TAX_CALCULATORS_ERRORS}.\n */\n tax_calculators_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external promotion failure, default is {EXTERNAL_PROMOTIONS_ERRORS}.\n */\n external_promotions_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external price failure, default is {EXTERNAL_PRICES_ERRORS}.\n * @example ```true```\n */\n external_prices_errors?: boolean | null\n /**\n * Enables the Sku discovery by similarity search.\n */\n skus_discovery?: boolean | null\n /**\n * Enables the creation of the authorization when the gateway event is received, even if there is no reference on Commerce Layer.\n */\n payment_gateways_transaction_on_event?: boolean | null\n\n memberships?: Membership[] | null\n roles?: Role[] | null\n permissions?: Permission[] | null\n api_credentials?: ApiCredential[] | null\n}\n\ninterface OrganizationCreate extends ResourceCreate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\ninterface OrganizationUpdate extends ResourceUpdate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\nclass Organizations extends ApiResource<Organization> {\n static readonly TYPE: OrganizationType = 'organizations' as const\n\n async create(\n resource: OrganizationCreate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.create<OrganizationCreate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: OrganizationUpdate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.update<OrganizationUpdate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async memberships(\n organizationId: string | Organization,\n params?: QueryParamsList<Membership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Membership>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `organizations/${_organizationId}/memberships`,\n params,\n options,\n ) as unknown as ListResponse<Membership>\n }\n\n async roles(\n organizationId: string | Organization,\n params?: QueryParamsList<Role>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Role>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `organizations/${_organizationId}/roles`,\n params,\n options,\n ) as unknown as ListResponse<Role>\n }\n\n async permissions(\n organizationId: string | Organization,\n params?: QueryParamsList<Permission>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Permission>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Permission>(\n { type: 'permissions' },\n `organizations/${_organizationId}/permissions`,\n params,\n options,\n ) as unknown as ListResponse<Permission>\n }\n\n async api_credentials(\n organizationId: string | Organization,\n params?: QueryParamsList<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApiCredential>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `organizations/${_organizationId}/api_credentials`,\n params,\n options,\n ) as unknown as ListResponse<ApiCredential>\n }\n\n async transfer_ownership(\n organizationId: string | Organization,\n payload: TransferOwnershipDataType,\n options?: ResourcesConfig,\n ): Promise<void> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n await this.resources.action('PATCH', `organizations/${_organizationId}/transfer_ownership`, { ...payload }, options)\n }\n\n isOrganization(resource: any): resource is Organization {\n return resource.type && resource.type === Organizations.TYPE\n }\n\n relationship(id: string | ResourceId | null): OrganizationRel {\n return super.relationshipOneToOne<OrganizationRel>(id)\n }\n\n relationshipToMany(...ids: string[]): OrganizationRel[] {\n return super.relationshipOneToMany<OrganizationRel>(...ids)\n }\n\n type(): OrganizationType {\n return Organizations.TYPE\n }\n}\n\nconst instance = new Organizations()\nexport default instance\n\nexport type { Organization, OrganizationCreate, Organizations, OrganizationType, OrganizationUpdate }\n"]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk3FP4NVLD_cjs = require('./chunk-3FP4NVLD.cjs');
3
+ var chunkXS6QLJHG_cjs = require('./chunk-XS6QLJHG.cjs');
4
4
  var chunkVFTFSHXQ_cjs = require('./chunk-VFTFSHXQ.cjs');
5
5
 
6
6
  // gen/binding.ts
7
7
  var binding = {
8
8
  subdomain: "provisioning",
9
9
  name: "provisioning",
10
- sdkVersion: chunk3FP4NVLD_cjs.SDK_VERSION,
10
+ sdkVersion: chunkXS6QLJHG_cjs.SDK_VERSION,
11
11
  schemaVersion: "latest",
12
12
  supportedVersions: [],
13
13
  resourceList: chunkVFTFSHXQ_cjs.resourceList,
@@ -15,5 +15,5 @@ var binding = {
15
15
  };
16
16
 
17
17
  exports.binding = binding;
18
- //# sourceMappingURL=chunk-CFU5DNH2.cjs.map
19
- //# sourceMappingURL=chunk-CFU5DNH2.cjs.map
18
+ //# sourceMappingURL=chunk-OROPOAHK.cjs.map
19
+ //# sourceMappingURL=chunk-OROPOAHK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen/binding.ts"],"names":["SDK_VERSION","resourceList","getResources"],"mappings":";;;;;;AAeO,IAAM,OAAA,GAAU;AAAA,EACrB,SAAA,EAAW,cAAA;AAAA,EACX,IAAA,EAAM,cAAA;AAAA,EACN,UAAA,EAAYA,6BAAA;AAAA,EACZ,aAAA,EAAe,QAAA;AAAA,EACf,mBAAmB,EAAC;AAAA,gBACpBC,8BAAA;AAAA,gBACAC;AACF","file":"chunk-CFU5DNH2.cjs","sourcesContent":["/**\n * © Commerce Layer Inc.\n **/\nimport type { TargetBinding } from '@runtime/binding'\nimport { getResources, resourceList } from './enum'\nimport { SDK_VERSION } from './version'\n\n// Type-level maps cannot be injected, so they are re-exported here and reached\n// through the same `#registry` alias as the value binding below.\nexport type { ResourceFields, ResourceSortFields, ResourceTypeLock } from './enum'\n\n/**\n * This target's binding. Every field comes from the Target config or the parsed\n * schema — edit `sdk.config.ts`, not this file.\n */\nexport const binding = {\n subdomain: 'provisioning',\n name: 'provisioning',\n sdkVersion: SDK_VERSION,\n schemaVersion: 'latest',\n supportedVersions: [] as const,\n resourceList,\n getResources,\n} as const satisfies TargetBinding\n\n/** The API versions this build accepts as `apiVersion`; `never` on legacy schemas. */\nexport type ApiVersion = (typeof binding.supportedVersions)[number]\n"]}
1
+ {"version":3,"sources":["../gen/binding.ts"],"names":["SDK_VERSION","resourceList","getResources"],"mappings":";;;;;;AAeO,IAAM,OAAA,GAAU;AAAA,EACrB,SAAA,EAAW,cAAA;AAAA,EACX,IAAA,EAAM,cAAA;AAAA,EACN,UAAA,EAAYA,6BAAA;AAAA,EACZ,aAAA,EAAe,QAAA;AAAA,EACf,mBAAmB,EAAC;AAAA,gBACpBC,8BAAA;AAAA,gBACAC;AACF","file":"chunk-OROPOAHK.cjs","sourcesContent":["/**\n * © Commerce Layer Inc.\n **/\nimport type { TargetBinding } from '@runtime/binding'\nimport { getResources, resourceList } from './enum'\nimport { SDK_VERSION } from './version'\n\n// Type-level maps cannot be injected, so they are re-exported here and reached\n// through the same `#registry` alias as the value binding below.\nexport type { ResourceFields, ResourceSortFields, ResourceTypeLock } from './enum'\n\n/**\n * This target's binding. Every field comes from the Target config or the parsed\n * schema — edit `sdk.config.ts`, not this file.\n */\nexport const binding = {\n subdomain: 'provisioning',\n name: 'provisioning',\n sdkVersion: SDK_VERSION,\n schemaVersion: 'latest',\n supportedVersions: [] as const,\n resourceList,\n getResources,\n} as const satisfies TargetBinding\n\n/** The API versions this build accepts as `apiVersion`; `never` on legacy schemas. */\nexport type ApiVersion = (typeof binding.supportedVersions)[number]\n"]}
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "3.0.0-beta.0"};
3
+ version: "3.0.0-beta.2"};
4
4
 
5
5
  // gen/version.ts
6
6
  var SDK_VERSION = package_default.version;
@@ -8,5 +8,5 @@ var API_SCHEMA_VERSION = "latest";
8
8
  var API_SUPPORTED_VERSIONS = [];
9
9
 
10
10
  export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION };
11
- //# sourceMappingURL=chunk-UB3WPGDV.js.map
12
- //# sourceMappingURL=chunk-UB3WPGDV.js.map
11
+ //# sourceMappingURL=chunk-SQLX22US.js.map
12
+ //# sourceMappingURL=chunk-SQLX22US.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json","../gen/version.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,cAmEb,CAAA;;;ACnEO,IAAM,cAAsB,eAAA,CAAI;AAGhC,IAAM,kBAAA,GAA6B;AAGnC,IAAM,yBAAyB","file":"chunk-SQLX22US.js","sourcesContent":["{\n \"name\": \"@commercelayer/provisioning-sdk\",\n \"version\": \"3.0.0-beta.2\",\n \"main\": \"lib/index.cjs\",\n \"types\": \"lib/index.d.ts\",\n \"module\": \"lib/index.js\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"generate\": \"tsx ../sdk-generator/src/generator.ts && pnpm check\",\n \"generate-local\": \"tsx ../sdk-generator/src/generator.ts --local && pnpm check\",\n \"lint\": \"biome check --enforce-assist=true\",\n \"check\": \"biome check --enforce-assist=true --write\",\n \"ts:check\": \"tsc --noEmit -p tsconfig.json\",\n \"test\": \"vitest\",\n \"coverage\": \"vitest run --coverage\",\n \"verify:pack\": \"publint && attw --pack .\"\n },\n \"keywords\": [\n \"javascript\",\n \"ecommerce\",\n \"jamstack\",\n \"commercelayer\",\n \"provisioning\"\n ],\n \"author\": \"Pierluigi Viti <pierluigi@commercelayer.io>\",\n \"license\": \"MIT\",\n \"description\": \"Commerce Layer Provisioning API Javascript SDK\",\n \"files\": [\n \"lib/**/*\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.5\",\n \"@biomejs/biome\": \"^2.5.14\",\n \"@commercelayer/js-auth\": \"^8.0.1\",\n \"@commercelayer/sdk-generator\": \"workspace:*\",\n \"@types/debug\": \"^4.1.13\",\n \"@types/node\": \"^25.9.8\",\n \"@vitest/coverage-v8\": \"^5.0.2\",\n \"dotenv\": \"^18.0.4\",\n \"json-typescript\": \"^1.1.2\",\n \"jsonapi-typescript\": \"^0.1.3\",\n \"publint\": \"^0.3.24\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.23.15\",\n \"typescript\": \"^5.9.3\",\n \"vitest\": \"^5.0.2\"\n },\n \"repository\": \"github:commercelayer/commercelayer-sdk\",\n \"bugs\": \"https://github.com/commercelayer/commercelayer-sdk/issues\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n","import pkg from '../package.json' with { type: 'json' }\n\nexport const SDK_VERSION: string = pkg.version\n\n// Autogenerated API schema version, do not remove this line\nexport const API_SCHEMA_VERSION: string = 'latest'\n\n// Autogenerated supported API versions, do not remove this line\nexport const API_SUPPORTED_VERSIONS = [] as const\n\n/**\n * The API versions this build accepts as the `apiVersion` init option — the\n * union of {@link API_SUPPORTED_VERSIONS}. On a legacy build the tuple is\n * empty, so this resolves to `never` and the option can only be omitted (the\n * legacy API is unversioned).\n */\nexport type ApiVersion = (typeof API_SUPPORTED_VERSIONS)[number]\n"]}
@@ -1,5 +1,5 @@
1
- import { isTokenExpired, isApiError, isSdkError } from './chunk-4Z4U45XQ.js';
2
- import { API_SCHEMA_VERSION } from './chunk-UB3WPGDV.js';
1
+ import { isTokenExpired, isApiError, isSdkError } from './chunk-GHXKZEH7.js';
2
+ import { API_SCHEMA_VERSION } from './chunk-SQLX22US.js';
3
3
  import { isDeletable, isUpdatable, isCreatable, isSingleton, getSingletons, getResources } from './chunk-YS5PCY5D.js';
4
4
 
5
5
  // src/static.ts
@@ -37,5 +37,5 @@ var CommerceLayerProvisioningStatic = {
37
37
  };
38
38
 
39
39
  export { CommerceLayerProvisioningStatic };
40
- //# sourceMappingURL=chunk-3ELZDTFF.js.map
41
- //# sourceMappingURL=chunk-3ELZDTFF.js.map
40
+ //# sourceMappingURL=chunk-STPXKF53.js.map
41
+ //# sourceMappingURL=chunk-STPXKF53.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/static.ts"],"names":[],"mappings":";;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAO,cAAc,IAAI,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAO,eAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAO,kBAAA;AAAA,EACT;AACF","file":"chunk-3ELZDTFF.js","sourcesContent":["import { type ApiError, isApiError, isSdkError, type SdkError } from '@runtime/error'\nimport { isTokenExpired } from '@runtime/util'\nimport type { ResourceTypeLock } from '../gen/enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable } from '../gen/enum'\nimport { API_SCHEMA_VERSION } from './commercelayer'\n\n/* Static functions */\nexport const CommerceLayerProvisioningStatic = {\n resources: (sort?: boolean): readonly string[] => {\n return getResources(sort)\n },\n\n singletons: (sort?: boolean): readonly string[] => {\n return getSingletons(sort)\n },\n\n isSingleton: (resource: ResourceTypeLock): boolean => {\n return isSingleton(resource)\n },\n\n isCreatable: (resource: ResourceTypeLock): boolean => {\n return isCreatable(resource)\n },\n\n isUpdatable: (resource: ResourceTypeLock): boolean => {\n return isUpdatable(resource)\n },\n\n isDeletable: (resource: ResourceTypeLock): boolean => {\n return isDeletable(resource)\n },\n\n isSdkError: (error: unknown): error is SdkError => {\n return isSdkError(error)\n },\n\n isApiError: (error: unknown): error is ApiError => {\n return isApiError(error)\n },\n\n isTokenExpired: (token: string): boolean => {\n return isTokenExpired(token)\n },\n\n get schemaVersion(): string {\n return API_SCHEMA_VERSION\n },\n}\n"]}
1
+ {"version":3,"sources":["../src/static.ts"],"names":[],"mappings":";;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAO,cAAc,IAAI,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAO,eAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAO,kBAAA;AAAA,EACT;AACF","file":"chunk-STPXKF53.js","sourcesContent":["import { type ApiError, isApiError, isSdkError, type SdkError } from '@runtime/error'\nimport { isTokenExpired } from '@runtime/util'\nimport type { ResourceTypeLock } from '../gen/enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable } from '../gen/enum'\nimport { API_SCHEMA_VERSION } from './commercelayer'\n\n/* Static functions */\nexport const CommerceLayerProvisioningStatic = {\n resources: (sort?: boolean): readonly string[] => {\n return getResources(sort)\n },\n\n singletons: (sort?: boolean): readonly string[] => {\n return getSingletons(sort)\n },\n\n isSingleton: (resource: ResourceTypeLock): boolean => {\n return isSingleton(resource)\n },\n\n isCreatable: (resource: ResourceTypeLock): boolean => {\n return isCreatable(resource)\n },\n\n isUpdatable: (resource: ResourceTypeLock): boolean => {\n return isUpdatable(resource)\n },\n\n isDeletable: (resource: ResourceTypeLock): boolean => {\n return isDeletable(resource)\n },\n\n isSdkError: (error: unknown): error is SdkError => {\n return isSdkError(error)\n },\n\n isApiError: (error: unknown): error is ApiError => {\n return isApiError(error)\n },\n\n isTokenExpired: (token: string): boolean => {\n return isTokenExpired(token)\n },\n\n get schemaVersion(): string {\n return API_SCHEMA_VERSION\n },\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { ApiResource } from './chunk-4Z4U45XQ.js';
1
+ import { ApiResource } from './chunk-GHXKZEH7.js';
2
2
 
3
3
  // gen/resources/memberships.ts
4
4
  var Memberships = class _Memberships extends ApiResource {
@@ -78,5 +78,5 @@ var instance = new Memberships();
78
78
  var memberships_default = instance;
79
79
 
80
80
  export { memberships_default };
81
- //# sourceMappingURL=chunk-RDLVNJEW.js.map
82
- //# sourceMappingURL=chunk-RDLVNJEW.js.map
81
+ //# sourceMappingURL=chunk-T2U6MUX4.js.map
82
+ //# sourceMappingURL=chunk-T2U6MUX4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen/resources/memberships.ts"],"names":[],"mappings":";;;AA6GA,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoB,WAAA,CAAwB;AAAA,EAChD,OAAgB,IAAA,GAAuB,aAAA;AAAA,EAEvC,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,YAAA,CAAY,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACrH;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,YAAA,CAAY,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACrH;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC9E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,YAAA,CAAY,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EACnG;AAAA,EAEA,MAA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EACgC;AAChC,IAAA,MAAM,aAAA,GAAiB,aAA4B,EAAA,IAAO,YAAA;AAC1D,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,UAAA,EAAW;AAAA,MACnB,eAAe,aAAa,CAAA,SAAA,CAAA;AAAA,MAC5B,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,YAAA,EAAmC,OAAA,EAA0C;AACxF,IAAA,MAAM,aAAA,GAAiB,aAA4B,EAAA,IAAO,YAAA;AAC1D,IAAA,MAAM,IAAA,CAAK,UAAU,MAAA,CAAO,MAAA,EAAQ,eAAe,aAAa,CAAA,OAAA,CAAA,EAAW,EAAC,EAAG,OAAO,CAAA;AAAA,EACxF;AAAA,EAEA,aAAa,QAAA,EAAuC;AAClD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,YAAA,CAAY,IAAA;AAAA,EACxD;AAAA,EAEA,aAAa,EAAA,EAA+C;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA,EACrD;AAAA,EAEA,sBAAsB,GAAA,EAAgC;AACpD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAqC,GAAG,GAAG,CAAA;AAAA,EAC1D;AAAA,EAEA,IAAA,GAAuB;AACrB,IAAA,OAAO,YAAA,CAAY,IAAA;AAAA,EACrB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,WAAA,EAAY;AACjC,IAAO,mBAAA,GAAQ","file":"chunk-RDLVNJEW.js","sourcesContent":["import type { QueryParamsList, QueryParamsRetrieve } from '@runtime/query'\nimport type {\n ListResponse,\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\nimport type { ApplicationMembership, ApplicationMembershipType } from './application_memberships'\nimport type { MembershipProfile, MembershipProfileType } from './membership_profiles'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\nimport type { Version } from './versions'\n\ntype MembershipType = 'memberships'\ntype MembershipRel = ResourceRel & { type: MembershipType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\n\nexport type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort\n// export type MembershipFilter = Pick<Membership, 'id' | 'user_email' | 'status' | 'owner' | 'access_scope'> & ResourceFilter\n\n/**\n * The Membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/memberships endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/memberships/object\n */\ninterface Membership extends Resource {\n readonly type: MembershipType\n\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The user first name.\n * @example ```\"John\"```\n */\n user_first_name?: string | null\n /**\n * The user last name.\n * @example ```\"Doe\"```\n */\n user_last_name?: string | null\n /**\n * The memberships status. One of `pending` (default), `active`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'active'\n /**\n * Indicates if the user it's the owner of the organization.\n * @example ```true```\n */\n owner?: boolean | null\n /**\n * Reflects the organization's access scope, either test_access or all_access.\n * @example ```true```\n */\n test_enabled?: boolean | null\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization?: Organization | null\n role?: Role | null\n application_memberships?: ApplicationMembership[] | null\n membership_profile?: MembershipProfile | null\n versions?: Version[] | null\n}\n\ninterface MembershipCreate extends ResourceCreate {\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization: OrganizationRel\n role: RoleRel\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\ninterface MembershipUpdate extends ResourceUpdate {\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n role?: RoleRel | null\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\nclass Memberships extends ApiResource<Membership> {\n static readonly TYPE: MembershipType = 'memberships' as const\n\n async create(\n resource: MembershipCreate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.create<MembershipCreate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async update(\n resource: MembershipUpdate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.update<MembershipUpdate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: Memberships.TYPE } : id, options)\n }\n\n async organization(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `memberships/${_membershipId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `memberships/${_membershipId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n async application_memberships(\n membershipId: string | Membership,\n params?: QueryParamsList<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApplicationMembership>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<ApplicationMembership>(\n { type: 'application_memberships' },\n `memberships/${_membershipId}/application_memberships`,\n params,\n options,\n ) as unknown as ListResponse<ApplicationMembership>\n }\n\n async membership_profile(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<MembershipProfile>(\n { type: 'membership_profiles' },\n `memberships/${_membershipId}/membership_profile`,\n params,\n options,\n ) as unknown as MembershipProfile\n }\n\n async versions(\n membershipId: string | Membership,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `memberships/${_membershipId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n async resend(membershipId: string | Membership, options?: ResourcesConfig): Promise<void> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n await this.resources.action('POST', `memberships/${_membershipId}/resend`, {}, options)\n }\n\n isMembership(resource: any): resource is Membership {\n return resource.type && resource.type === Memberships.TYPE\n }\n\n relationship(id: string | ResourceId | null): MembershipRel {\n return super.relationshipOneToOne<MembershipRel>(id)\n }\n\n relationshipToMany(...ids: string[]): MembershipRel[] {\n return super.relationshipOneToMany<MembershipRel>(...ids)\n }\n\n type(): MembershipType {\n return Memberships.TYPE\n }\n}\n\nconst instance = new Memberships()\nexport default instance\n\nexport type { Membership, MembershipCreate, Memberships, MembershipType, MembershipUpdate }\n"]}
1
+ {"version":3,"sources":["../gen/resources/memberships.ts"],"names":[],"mappings":";;;AA6GA,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoB,WAAA,CAAwB;AAAA,EAChD,OAAgB,IAA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AAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,YAAA,CAAY,IAAA;AAAA,EACxD;AAAA,EAEA,aAAa,EAAA,EAA+C;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA,EACrD;AAAA,EAEA,sBAAsB,GAAA,EAAgC;AACpD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAqC,GAAG,GAAG,CAAA;AAAA,EAC1D;AAAA,EAEA,IAAA,GAAuB;AACrB,IAAA,OAAO,YAAA,CAAY,IAAA;AAAA,EACrB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,WAAA,EAAY;AACjC,IAAO,mBAAA,GAAQ","file":"chunk-T2U6MUX4.js","sourcesContent":["import type { QueryParamsList, QueryParamsRetrieve } from '@runtime/query'\nimport type {\n ListResponse,\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\nimport type { ApplicationMembership, ApplicationMembershipType } from './application_memberships'\nimport type { MembershipProfile, MembershipProfileType } from './membership_profiles'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\nimport type { Version } from './versions'\n\ntype MembershipType = 'memberships'\ntype MembershipRel = ResourceRel & { type: MembershipType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\n\nexport type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort\n// export type MembershipFilter = Pick<Membership, 'id' | 'user_email' | 'status' | 'owner' | 'access_scope'> & ResourceFilter\n\n/**\n * The Membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/memberships endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/memberships/object\n */\ninterface Membership extends Resource {\n readonly type: MembershipType\n\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The user first name.\n * @example ```\"John\"```\n */\n user_first_name?: string | null\n /**\n * The user last name.\n * @example ```\"Doe\"```\n */\n user_last_name?: string | null\n /**\n * The memberships status. One of `pending` (default), `active`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'active'\n /**\n * Indicates if the user it's the owner of the organization.\n * @example ```true```\n */\n owner?: boolean | null\n /**\n * Reflects the organization's access scope, either test_access or all_access.\n * @example ```true```\n */\n test_enabled?: boolean | null\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization?: Organization | null\n role?: Role | null\n application_memberships?: ApplicationMembership[] | null\n membership_profile?: MembershipProfile | null\n versions?: Version[] | null\n}\n\ninterface MembershipCreate extends ResourceCreate {\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization: OrganizationRel\n role: RoleRel\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\ninterface MembershipUpdate extends ResourceUpdate {\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n role?: RoleRel | null\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\nclass Memberships extends ApiResource<Membership> {\n static readonly TYPE: MembershipType = 'memberships' as const\n\n async create(\n resource: MembershipCreate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.create<MembershipCreate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async update(\n resource: MembershipUpdate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.update<MembershipUpdate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: Memberships.TYPE } : id, options)\n }\n\n async organization(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `memberships/${_membershipId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `memberships/${_membershipId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n async application_memberships(\n membershipId: string | Membership,\n params?: QueryParamsList<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApplicationMembership>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<ApplicationMembership>(\n { type: 'application_memberships' },\n `memberships/${_membershipId}/application_memberships`,\n params,\n options,\n ) as unknown as ListResponse<ApplicationMembership>\n }\n\n async membership_profile(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<MembershipProfile>(\n { type: 'membership_profiles' },\n `memberships/${_membershipId}/membership_profile`,\n params,\n options,\n ) as unknown as MembershipProfile\n }\n\n async versions(\n membershipId: string | Membership,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `memberships/${_membershipId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n async resend(membershipId: string | Membership, options?: ResourcesConfig): Promise<void> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n await this.resources.action('POST', `memberships/${_membershipId}/resend`, {}, options)\n }\n\n isMembership(resource: any): resource is Membership {\n return resource.type && resource.type === Memberships.TYPE\n }\n\n relationship(id: string | ResourceId | null): MembershipRel {\n return super.relationshipOneToOne<MembershipRel>(id)\n }\n\n relationshipToMany(...ids: string[]): MembershipRel[] {\n return super.relationshipOneToMany<MembershipRel>(...ids)\n }\n\n type(): MembershipType {\n return Memberships.TYPE\n }\n}\n\nconst instance = new Memberships()\nexport default instance\n\nexport type { Membership, MembershipCreate, Memberships, MembershipType, MembershipUpdate }\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
3
+ var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
4
4
 
5
5
  // gen/resources/identity_providers.ts
6
- var IdentityProviders = class _IdentityProviders extends chunkF2RLD5SN_cjs.ApiResource {
6
+ var IdentityProviders = class _IdentityProviders extends chunkEVDEBFHZ_cjs.ApiResource {
7
7
  static TYPE = "identity_providers";
8
8
  async create(resource, params, options) {
9
9
  return this.resources.create(
@@ -62,5 +62,5 @@ var instance = new IdentityProviders();
62
62
  var identity_providers_default = instance;
63
63
 
64
64
  exports.identity_providers_default = identity_providers_default;
65
- //# sourceMappingURL=chunk-CLOSZJSZ.cjs.map
66
- //# sourceMappingURL=chunk-CLOSZJSZ.cjs.map
65
+ //# sourceMappingURL=chunk-TXONK7R5.cjs.map
66
+ //# sourceMappingURL=chunk-TXONK7R5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen/resources/identity_providers.ts"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AAAA,MACpB,EAAE,EAAA,EAAI,OAAO,EAAA,KAAO,QAAA,GAAW,EAAA,GAAK,EAAA,CAAG,EAAA,EAAI,IAAA,EAAM,kBAAA,CAAkB,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK;AAAA,MACxF,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,OAAA,CACJ,EAAA,EACA,MAAA,EACA,OAAA,EAC2B;AAC3B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,EAAA,EAAI,OAAO,EAAA,KAAO,QAAA,GAAW,EAAA,GAAK,EAAA,CAAG,EAAA,EAAI,IAAA,EAAM,kBAAA,CAAkB,IAAA,EAAM,OAAA,EAAS,IAAA,EAAK;AAAA,MACvF,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAA,EAA6C;AAC9D,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,kBAAA,CAAkB,IAAA;AAAA,EAC9D;AAAA,EAEA,aAAa,EAAA,EAAqD;AAChE,IAAA,OAAO,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA,EAC3D;AAAA,EAEA,sBAAsB,GAAA,EAAsC;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA2C,GAAG,GAAG,CAAA;AAAA,EAChE;AAAA,EAEA,IAAA,GAA6B;AAC3B,IAAA,OAAO,kBAAA,CAAkB,IAAA;AAAA,EAC3B;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,iBAAA,EAAkB;AACvC,IAAO,0BAAA,GAAQ","file":"chunk-CLOSZJSZ.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { User } from './users'\n\ntype IdentityProviderType = 'identity_providers'\ntype IdentityProviderRel = ResourceRel & { type: IdentityProviderType }\n\nexport type IdentityProviderSort = Pick<\n IdentityProvider,\n | 'id'\n | 'name'\n | 'client_id'\n | 'client_secret'\n | 'issuer'\n | 'status'\n | 'domains'\n | 'token_url'\n | 'authorize_url'\n | 'jwks_url'\n | 'txt_record'\n | 'organization'\n | 'disabled_at'\n> &\n ResourceSort\n// export type IdentityProviderFilter = Pick<IdentityProvider, 'id' | 'name' | 'client_id' | 'client_secret' | 'issuer' | 'status' | 'domains' | 'token_url' | 'authorize_url' | 'jwks_url' | 'txt_record' | 'organization' | 'disabled_at'> & ResourceFilter\n\n/**\n * The Identity provider object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/identity_providers endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/identity_providers/object\n */\ninterface IdentityProvider extends Resource {\n readonly type: IdentityProviderType\n\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The identity provider status. One of `pending` (default), `verified` or `error`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'verified' | 'error'\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The TXT record value used to check the domain.\n * @example ```\"cl-verification=a6CDk5v\"```\n */\n txt_record?: string | null\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Time at which this resource was disabled.\n * @example ```\"2018-01-01T12:00:00.000Z\"```\n */\n disabled_at?: string | null\n\n user?: User | null\n}\n\ninterface IdentityProviderCreate extends ResourceCreate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\ninterface IdentityProviderUpdate extends ResourceUpdate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name?: string | null\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id?: string | null\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret?: string | null\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer?: string | null\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains?: string | null\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url?: string | null\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url?: string | null\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url?: string | null\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\nclass IdentityProviders extends ApiResource<IdentityProvider> {\n static readonly TYPE: IdentityProviderType = 'identity_providers' as const\n\n async create(\n resource: IdentityProviderCreate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.create<IdentityProviderCreate, IdentityProvider>(\n { ...resource, type: IdentityProviders.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: IdentityProviderUpdate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { ...resource, type: IdentityProviders.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: IdentityProviders.TYPE } : id, options)\n }\n\n async user(\n identityProviderId: string | IdentityProvider,\n params?: QueryParamsRetrieve<User>,\n options?: ResourcesConfig,\n ): Promise<User> {\n const _identityProviderId = (identityProviderId as IdentityProvider).id || (identityProviderId as string)\n return this.resources.fetch<User>(\n { type: 'users' },\n `identity_providers/${_identityProviderId}/user`,\n params,\n options,\n ) as unknown as User\n }\n\n async _disable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _disable: true },\n params,\n options,\n )\n }\n\n async _enable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _enable: true },\n params,\n options,\n )\n }\n\n isIdentityProvider(resource: any): resource is IdentityProvider {\n return resource.type && resource.type === IdentityProviders.TYPE\n }\n\n relationship(id: string | ResourceId | null): IdentityProviderRel {\n return super.relationshipOneToOne<IdentityProviderRel>(id)\n }\n\n relationshipToMany(...ids: string[]): IdentityProviderRel[] {\n return super.relationshipOneToMany<IdentityProviderRel>(...ids)\n }\n\n type(): IdentityProviderType {\n return IdentityProviders.TYPE\n }\n}\n\nconst instance = new IdentityProviders()\nexport default instance\n\nexport type {\n IdentityProvider,\n IdentityProviderCreate,\n IdentityProviders,\n IdentityProviderType,\n IdentityProviderUpdate,\n}\n"]}
1
+ {"version":3,"sources":["../gen/resources/identity_providers.ts"],"names":["ApiResource"],"mappings":";;;;;AAgOA,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0BA,6BAAA,CAA8B;AAAA,EAC5D,OAAgB,IAAA,GAA6B,oBAAA;AAAA,EAE7C,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EAC2B;AAC3B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,M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ACA,MAAA,EACA,OAAA,EAC2B;AAC3B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,EAAA,EAAI,OAAO,EAAA,KAAO,QAAA,GAAW,EAAA,GAAK,EAAA,CAAG,EAAA,EAAI,IAAA,EAAM,kBAAA,CAAkB,IAAA,EAAM,OAAA,EAAS,IAAA,EAAK;AAAA,MACvF,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAA,EAA6C;AAC9D,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,kBAAA,CAAkB,IAAA;AAAA,EAC9D;AAAA,EAEA,aAAa,EAAA,EAAqD;AAChE,IAAA,OAAO,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA,EAC3D;AAAA,EAEA,sBAAsB,GAAA,EAAsC;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA2C,GAAG,GAAG,CAAA;AAAA,EAChE;AAAA,EAEA,IAAA,GAA6B;AAC3B,IAAA,OAAO,kBAAA,CAAkB,IAAA;AAAA,EAC3B;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,iBAAA,EAAkB;AACvC,IAAO,0BAAA,GAAQ","file":"chunk-TXONK7R5.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { User } from './users'\n\ntype IdentityProviderType = 'identity_providers'\ntype IdentityProviderRel = ResourceRel & { type: IdentityProviderType }\n\nexport type IdentityProviderSort = Pick<\n IdentityProvider,\n | 'id'\n | 'name'\n | 'client_id'\n | 'client_secret'\n | 'issuer'\n | 'status'\n | 'domains'\n | 'token_url'\n | 'authorize_url'\n | 'jwks_url'\n | 'txt_record'\n | 'organization'\n | 'disabled_at'\n> &\n ResourceSort\n// export type IdentityProviderFilter = Pick<IdentityProvider, 'id' | 'name' | 'client_id' | 'client_secret' | 'issuer' | 'status' | 'domains' | 'token_url' | 'authorize_url' | 'jwks_url' | 'txt_record' | 'organization' | 'disabled_at'> & ResourceFilter\n\n/**\n * The Identity provider object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/identity_providers endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/identity_providers/object\n */\ninterface IdentityProvider extends Resource {\n readonly type: IdentityProviderType\n\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The identity provider status. One of `pending` (default), `verified` or `error`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'verified' | 'error'\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The TXT record value used to check the domain.\n * @example ```\"cl-verification=a6CDk5v\"```\n */\n txt_record?: string | null\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Time at which this resource was disabled.\n * @example ```\"2018-01-01T12:00:00.000Z\"```\n */\n disabled_at?: string | null\n\n user?: User | null\n}\n\ninterface IdentityProviderCreate extends ResourceCreate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\ninterface IdentityProviderUpdate extends ResourceUpdate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name?: string | null\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id?: string | null\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret?: string | null\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer?: string | null\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains?: string | null\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url?: string | null\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url?: string | null\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url?: string | null\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\nclass IdentityProviders extends ApiResource<IdentityProvider> {\n static readonly TYPE: IdentityProviderType = 'identity_providers' as const\n\n async create(\n resource: IdentityProviderCreate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.create<IdentityProviderCreate, IdentityProvider>(\n { ...resource, type: IdentityProviders.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: IdentityProviderUpdate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { ...resource, type: IdentityProviders.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: IdentityProviders.TYPE } : id, options)\n }\n\n async user(\n identityProviderId: string | IdentityProvider,\n params?: QueryParamsRetrieve<User>,\n options?: ResourcesConfig,\n ): Promise<User> {\n const _identityProviderId = (identityProviderId as IdentityProvider).id || (identityProviderId as string)\n return this.resources.fetch<User>(\n { type: 'users' },\n `identity_providers/${_identityProviderId}/user`,\n params,\n options,\n ) as unknown as User\n }\n\n async _disable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _disable: true },\n params,\n options,\n )\n }\n\n async _enable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _enable: true },\n params,\n options,\n )\n }\n\n isIdentityProvider(resource: any): resource is IdentityProvider {\n return resource.type && resource.type === IdentityProviders.TYPE\n }\n\n relationship(id: string | ResourceId | null): IdentityProviderRel {\n return super.relationshipOneToOne<IdentityProviderRel>(id)\n }\n\n relationshipToMany(...ids: string[]): IdentityProviderRel[] {\n return super.relationshipOneToMany<IdentityProviderRel>(...ids)\n }\n\n type(): IdentityProviderType {\n return IdentityProviders.TYPE\n }\n}\n\nconst instance = new IdentityProviders()\nexport default instance\n\nexport type {\n IdentityProvider,\n IdentityProviderCreate,\n IdentityProviders,\n IdentityProviderType,\n IdentityProviderUpdate,\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
4
- var chunk3FP4NVLD_cjs = require('./chunk-3FP4NVLD.cjs');
3
+ var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
4
+ var chunkXS6QLJHG_cjs = require('./chunk-XS6QLJHG.cjs');
5
5
  var chunkVFTFSHXQ_cjs = require('./chunk-VFTFSHXQ.cjs');
6
6
 
7
7
  // src/static.ts
@@ -25,19 +25,19 @@ var CommerceLayerProvisioningStatic = {
25
25
  return chunkVFTFSHXQ_cjs.isDeletable(resource);
26
26
  },
27
27
  isSdkError: (error) => {
28
- return chunkF2RLD5SN_cjs.isSdkError(error);
28
+ return chunkEVDEBFHZ_cjs.isSdkError(error);
29
29
  },
30
30
  isApiError: (error) => {
31
- return chunkF2RLD5SN_cjs.isApiError(error);
31
+ return chunkEVDEBFHZ_cjs.isApiError(error);
32
32
  },
33
33
  isTokenExpired: (token) => {
34
- return chunkF2RLD5SN_cjs.isTokenExpired(token);
34
+ return chunkEVDEBFHZ_cjs.isTokenExpired(token);
35
35
  },
36
36
  get schemaVersion() {
37
- return chunk3FP4NVLD_cjs.API_SCHEMA_VERSION;
37
+ return chunkXS6QLJHG_cjs.API_SCHEMA_VERSION;
38
38
  }
39
39
  };
40
40
 
41
41
  exports.CommerceLayerProvisioningStatic = CommerceLayerProvisioningStatic;
42
- //# sourceMappingURL=chunk-WRVLCJQZ.cjs.map
43
- //# sourceMappingURL=chunk-WRVLCJQZ.cjs.map
42
+ //# sourceMappingURL=chunk-TY46WNR6.cjs.map
43
+ //# sourceMappingURL=chunk-TY46WNR6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isSdkError","isApiError","isTokenExpired","API_SCHEMA_VERSION"],"mappings":";;;;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAOC,oCAAA;AAAA,EACT;AACF","file":"chunk-WRVLCJQZ.cjs","sourcesContent":["import { type ApiError, isApiError, isSdkError, type SdkError } from '@runtime/error'\nimport { isTokenExpired } from '@runtime/util'\nimport type { ResourceTypeLock } from '../gen/enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable } from '../gen/enum'\nimport { API_SCHEMA_VERSION } from './commercelayer'\n\n/* Static functions */\nexport const CommerceLayerProvisioningStatic = {\n resources: (sort?: boolean): readonly string[] => {\n return getResources(sort)\n },\n\n singletons: (sort?: boolean): readonly string[] => {\n return getSingletons(sort)\n },\n\n isSingleton: (resource: ResourceTypeLock): boolean => {\n return isSingleton(resource)\n },\n\n isCreatable: (resource: ResourceTypeLock): boolean => {\n return isCreatable(resource)\n },\n\n isUpdatable: (resource: ResourceTypeLock): boolean => {\n return isUpdatable(resource)\n },\n\n isDeletable: (resource: ResourceTypeLock): boolean => {\n return isDeletable(resource)\n },\n\n isSdkError: (error: unknown): error is SdkError => {\n return isSdkError(error)\n },\n\n isApiError: (error: unknown): error is ApiError => {\n return isApiError(error)\n },\n\n isTokenExpired: (token: string): boolean => {\n return isTokenExpired(token)\n },\n\n get schemaVersion(): string {\n return API_SCHEMA_VERSION\n },\n}\n"]}
1
+ {"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isSdkError","isApiError","isTokenExpired","API_SCHEMA_VERSION"],"mappings":";;;;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAOC,oCAAA;AAAA,EACT;AACF","file":"chunk-TY46WNR6.cjs","sourcesContent":["import { type ApiError, isApiError, isSdkError, type SdkError } from '@runtime/error'\nimport { isTokenExpired } from '@runtime/util'\nimport type { ResourceTypeLock } from '../gen/enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable } from '../gen/enum'\nimport { API_SCHEMA_VERSION } from './commercelayer'\n\n/* Static functions */\nexport const CommerceLayerProvisioningStatic = {\n resources: (sort?: boolean): readonly string[] => {\n return getResources(sort)\n },\n\n singletons: (sort?: boolean): readonly string[] => {\n return getSingletons(sort)\n },\n\n isSingleton: (resource: ResourceTypeLock): boolean => {\n return isSingleton(resource)\n },\n\n isCreatable: (resource: ResourceTypeLock): boolean => {\n return isCreatable(resource)\n },\n\n isUpdatable: (resource: ResourceTypeLock): boolean => {\n return isUpdatable(resource)\n },\n\n isDeletable: (resource: ResourceTypeLock): boolean => {\n return isDeletable(resource)\n },\n\n isSdkError: (error: unknown): error is SdkError => {\n return isSdkError(error)\n },\n\n isApiError: (error: unknown): error is ApiError => {\n return isApiError(error)\n },\n\n isTokenExpired: (token: string): boolean => {\n return isTokenExpired(token)\n },\n\n get schemaVersion(): string {\n return API_SCHEMA_VERSION\n },\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
3
+ var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
4
4
 
5
5
  // gen/resources/application_memberships.ts
6
- var ApplicationMemberships = class _ApplicationMemberships extends chunkF2RLD5SN_cjs.ApiResource {
6
+ var ApplicationMemberships = class _ApplicationMemberships extends chunkEVDEBFHZ_cjs.ApiResource {
7
7
  static TYPE = "application_memberships";
8
8
  async create(resource, params, options) {
9
9
  return this.resources.create(
@@ -84,5 +84,5 @@ var instance = new ApplicationMemberships();
84
84
  var application_memberships_default = instance;
85
85
 
86
86
  exports.application_memberships_default = application_memberships_default;
87
- //# sourceMappingURL=chunk-7OPCEEJV.cjs.map
88
- //# sourceMappingURL=chunk-7OPCEEJV.cjs.map
87
+ //# sourceMappingURL=chunk-UILXNOZE.cjs.map
88
+ //# sourceMapp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,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,uBAAA,CAAuB,IAAA;AAAA,EACnE;AAAA,EAEA,aAAa,EAAA,EAA0D;AACrE,IAAA,OAAO,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA,EAChE;AAAA,EAEA,sBAAsB,GAAA,EAA2C;AAC/D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAgD,GAAG,GAAG,CAAA;AAAA,EACrE;AAAA,EAEA,IAAA,GAAkC;AAChC,IAAA,OAAO,uBAAA,CAAuB,IAAA;AAAA,EAChC;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,sBAAA,EAAuB;AAC5C,IAAO,+BAAA,GAAQ","file":"chunk-7OPCEEJV.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { ApiCredential, ApiCredentialType } from './api_credentials'\nimport type { MembershipProfile, MembershipProfileType } from './membership_profiles'\nimport type { Membership, MembershipType } from './memberships'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\n\ntype ApplicationMembershipType = 'application_memberships'\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\ntype ApiCredentialRel = ResourceRel & { type: ApiCredentialType }\ntype MembershipRel = ResourceRel & { type: MembershipType }\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSort\n// export type ApplicationMembershipFilter = Pick<ApplicationMembership, 'id' | 'filters'> & ResourceFilter\n\n/**\n * The Application membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/application_memberships endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/application_memberships/object\n */\ninterface ApplicationMembership extends Resource {\n readonly type: ApplicationMembershipType\n\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n api_credential?: ApiCredential | null\n membership?: Membership | null\n membership_profile?: MembershipProfile | null\n organization?: Organization | null\n role?: Role | null\n}\n\ninterface ApplicationMembershipCreate extends ResourceCreate {\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n api_credential: ApiCredentialRel\n membership?: MembershipRel | null\n membership_profile?: MembershipProfileRel | null\n organization: OrganizationRel\n role: RoleRel\n}\n\ninterface ApplicationMembershipUpdate extends ResourceUpdate {\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n membership_profile?: MembershipProfileRel | null\n role?: RoleRel | null\n}\n\nclass ApplicationMemberships extends ApiResource<ApplicationMembership> {\n static readonly TYPE: ApplicationMembershipType = 'application_memberships' as const\n\n async create(\n resource: ApplicationMembershipCreate,\n params?: QueryParamsRetrieve<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ApplicationMembership> {\n return this.resources.create<ApplicationMembershipCreate, ApplicationMembership>(\n { ...resource, type: ApplicationMemberships.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: ApplicationMembershipUpdate,\n params?: QueryParamsRetrieve<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ApplicationMembership> {\n return this.resources.update<ApplicationMembershipUpdate, ApplicationMembership>(\n { ...resource, type: ApplicationMemberships.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: ApplicationMemberships.TYPE } : id, options)\n }\n\n async api_credential(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `application_memberships/${_applicationMembershipId}/api_credential`,\n params,\n options,\n ) as unknown as ApiCredential\n }\n\n async membership(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `application_memberships/${_applicationMembershipId}/membership`,\n params,\n options,\n ) as unknown as Membership\n }\n\n async membership_profile(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<MembershipProfile>(\n { type: 'membership_profiles' },\n `application_memberships/${_applicationMembershipId}/membership_profile`,\n params,\n options,\n ) as unknown as MembershipProfile\n }\n\n async organization(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `application_memberships/${_applicationMembershipId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `application_memberships/${_applicationMembershipId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n isApplicationMembership(resource: any): resource is ApplicationMembership {\n return resource.type && resource.type === ApplicationMemberships.TYPE\n }\n\n relationship(id: string | ResourceId | null): ApplicationMembershipRel {\n return super.relationshipOneToOne<ApplicationMembershipRel>(id)\n }\n\n relationshipToMany(...ids: string[]): ApplicationMembershipRel[] {\n return super.relationshipOneToMany<ApplicationMembershipRel>(...ids)\n }\n\n type(): ApplicationMembershipType {\n return ApplicationMemberships.TYPE\n }\n}\n\nconst instance = new ApplicationMemberships()\nexport default instance\n\nexport type {\n ApplicationMembership,\n ApplicationMembershipCreate,\n ApplicationMemberships,\n ApplicationMembershipType,\n ApplicationMembershipUpdate,\n}\n"]}
1
+ {"version":3,"sources":["../gen/resources/application_memberships.ts"],"names":["ApiResource"],"mappings":";;;;;AA2EA,IAAM,sBAAA,GAAN,MAAM,uBAAA,SAA+BA,6BAAA,CAAmC;AAAA,EACtE,OAAgB,IAAA,GAAkC,yBAAA;AAAA,EAElD,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACgC;AAChC,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,wBAAuB,IAAA,EAAK;AAAA,MACjD,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACgC;AAChC,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,wBAAuB,IAAA,EAAK;AAAA,MACjD,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC9E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,uBAAA,CAAu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AAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,IAAA,CACJ,uBAAA,EACA,MAAA,EACA,OAAA,EACe;AACf,IAAA,MAAM,wBAAA,GACH,wBAAkD,EAAA,IAAO,uBAAA;AAC5D,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,OAAA,EAAQ;AAAA,MAChB,2BAA2B,wBAAwB,CAAA,KAAA,CAAA;AAAA,MACnD,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,wBAAwB,QAAA,EAAkD;AACxE,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,uBAAA,CAAuB,IAAA;AAAA,EACnE;AAAA,EAEA,aAAa,EAAA,EAA0D;AACrE,IAAA,OAAO,KAAA,CAAM,qBAA+C,EAAE,CAAA;AAAA,EAChE;AAAA,EAEA,sBAAsB,GAAA,EAA2C;AAC/D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAgD,GAAG,GAAG,CAAA;AAAA,EACrE;AAAA,EAEA,IAAA,GAAkC;AAChC,IAAA,OAAO,uBAAA,CAAuB,IAAA;AAAA,EAChC;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,sBAAA,EAAuB;AAC5C,IAAO,+BAAA,GAAQ","file":"chunk-UILXNOZE.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { ApiCredential, ApiCredentialType } from './api_credentials'\nimport type { MembershipProfile, MembershipProfileType } from './membership_profiles'\nimport type { Membership, MembershipType } from './memberships'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\n\ntype ApplicationMembershipType = 'application_memberships'\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\ntype ApiCredentialRel = ResourceRel & { type: ApiCredentialType }\ntype MembershipRel = ResourceRel & { type: MembershipType }\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSort\n// export type ApplicationMembershipFilter = Pick<ApplicationMembership, 'id' | 'filters'> & ResourceFilter\n\n/**\n * The Application membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/application_memberships endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/application_memberships/object\n */\ninterface ApplicationMembership extends Resource {\n readonly type: ApplicationMembershipType\n\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n api_credential?: ApiCredential | null\n membership?: Membership | null\n membership_profile?: MembershipProfile | null\n organization?: Organization | null\n role?: Role | null\n}\n\ninterface ApplicationMembershipCreate extends ResourceCreate {\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n api_credential: ApiCredentialRel\n membership?: MembershipRel | null\n membership_profile?: MembershipProfileRel | null\n organization: OrganizationRel\n role: RoleRel\n}\n\ninterface ApplicationMembershipUpdate extends ResourceUpdate {\n /**\n * Set of key-value pairs that contains restrictions and scopes of the application membership.\n * @example ```{\"market_id_in\":[202,203]}```\n */\n filters?: Record<string, any> | null\n\n membership_profile?: MembershipProfileRel | null\n role?: RoleRel | null\n}\n\nclass ApplicationMemberships extends ApiResource<ApplicationMembership> {\n static readonly TYPE: ApplicationMembershipType = 'application_memberships' as const\n\n async create(\n resource: ApplicationMembershipCreate,\n params?: QueryParamsRetrieve<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ApplicationMembership> {\n return this.resources.create<ApplicationMembershipCreate, ApplicationMembership>(\n { ...resource, type: ApplicationMemberships.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: ApplicationMembershipUpdate,\n params?: QueryParamsRetrieve<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ApplicationMembership> {\n return this.resources.update<ApplicationMembershipUpdate, ApplicationMembership>(\n { ...resource, type: ApplicationMemberships.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: ApplicationMemberships.TYPE } : id, options)\n }\n\n async api_credential(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `application_memberships/${_applicationMembershipId}/api_credential`,\n params,\n options,\n ) as unknown as ApiCredential\n }\n\n async membership(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `application_memberships/${_applicationMembershipId}/membership`,\n params,\n options,\n ) as unknown as Membership\n }\n\n async membership_profile(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<MembershipProfile>(\n { type: 'membership_profiles' },\n `application_memberships/${_applicationMembershipId}/membership_profile`,\n params,\n options,\n ) as unknown as MembershipProfile\n }\n\n async organization(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `application_memberships/${_applicationMembershipId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n applicationMembershipId: string | ApplicationMembership,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _applicationMembershipId =\n (applicationMembershipId as ApplicationMembership).id || (applicationMembershipId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `application_memberships/${_applicationMembershipId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n isApplicationMembership(resource: any): resource is ApplicationMembership {\n return resource.type && resource.type === ApplicationMemberships.TYPE\n }\n\n relationship(id: string | ResourceId | null): ApplicationMembershipRel {\n return super.relationshipOneToOne<ApplicationMembershipRel>(id)\n }\n\n relationshipToMany(...ids: string[]): ApplicationMembershipRel[] {\n return super.relationshipOneToMany<ApplicationMembershipRel>(...ids)\n }\n\n type(): ApplicationMembershipType {\n return ApplicationMemberships.TYPE\n }\n}\n\nconst instance = new ApplicationMemberships()\nexport default instance\n\nexport type {\n ApplicationMembership,\n ApplicationMembershipCreate,\n ApplicationMemberships,\n ApplicationMembershipType,\n ApplicationMembershipUpdate,\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { ApiResource } from './chunk-4Z4U45XQ.js';
1
+ import { ApiResource } from './chunk-GHXKZEH7.js';
2
2
 
3
3
  // gen/resources/identity_providers.ts
4
4
  var IdentityProviders = class _IdentityProviders extends ApiResource {
@@ -60,5 +60,5 @@ var instance = new IdentityProviders();
60
60
  var identity_providers_default = instance;
61
61
 
62
62
  export { identity_providers_default };
63
- //# sourceMappingURL=chunk-GES5UXTI.js.map
64
- //# sourceMappingURL=chunk-GES5UXTI.js.map
63
+ //# sourceMappingURL=chunk-WMUY7Z2Q.js.map
64
+ //# sourceMappingURL=chunk-WMUY7Z2Q.js.map