@react-pakistan/util-functions 1.25.89 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -315
- package/constants/api-methods.d.ts +3 -1
- package/constants/api-methods.js +1 -15
- package/constants/cache-time.d.ts +7 -5
- package/constants/cache-time.js +1 -8
- package/constants/countries-timezones.d.ts +4 -2
- package/constants/countries-timezones.js +1 -1411
- package/constants/currencies.d.ts +4 -2
- package/constants/currencies.js +1 -1076
- package/constants/dial-codes.d.ts +5 -3
- package/constants/dial-codes.js +1 -1216
- package/constants/layout-direction.d.ts +3 -1
- package/constants/layout-direction.js +1 -8
- package/constants/react-pakistan-meta.d.ts +4 -2
- package/constants/react-pakistan-meta.js +1 -35
- package/constants/react-pakistan.d.ts +5 -3
- package/constants/react-pakistan.js +12 -104
- package/constants/select-value-delimiter.d.ts +3 -1
- package/constants/select-value-delimiter.js +1 -13
- package/constants/social-media-colors.d.ts +3 -1
- package/constants/social-media-colors.js +1 -42
- package/constants/social-media-sizes.d.ts +6 -4
- package/constants/social-media-sizes.js +1 -327
- package/constants/user-roles.d.ts +3 -1
- package/constants/user-roles.js +1 -9
- package/edu-pilot-pro/types/academics.d.ts +2 -0
- package/edu-pilot-pro/types/academics.js +1 -0
- package/edu-pilot-pro/types/admission.d.ts +878 -0
- package/edu-pilot-pro/types/admission.js +1 -0
- package/edu-pilot-pro/types/communication.d.ts +2 -0
- package/edu-pilot-pro/types/communication.js +1 -0
- package/edu-pilot-pro/types/enums.d.ts +413 -0
- package/edu-pilot-pro/types/enums.js +1 -0
- package/edu-pilot-pro/types/finance.d.ts +2 -0
- package/edu-pilot-pro/types/finance.js +1 -0
- package/edu-pilot-pro/types/index.d.ts +2 -0
- package/edu-pilot-pro/types/index.js +1 -0
- package/edu-pilot-pro/types/user-management.d.ts +2 -0
- package/edu-pilot-pro/types/user-management.js +1 -0
- package/factory/generic-component-factory.d.ts +12 -9
- package/factory/generic-component-factory.js +1 -131
- package/factory/generic-module-factory.d.ts +14 -10
- package/factory/generic-module-factory.js +1 -190
- package/general/basic-get.d.ts +8 -1
- package/general/basic-get.js +1 -83
- package/general/basic-post.d.ts +8 -1
- package/general/basic-post.js +1 -70
- package/general/calculate-pages.d.ts +9 -1
- package/general/calculate-pages.js +1 -7
- package/general/camel-to-sentence-case.d.ts +3 -1
- package/general/camel-to-sentence-case.js +1 -20
- package/general/check-even-odd-length.d.ts +3 -1
- package/general/check-even-odd-length.js +1 -17
- package/general/clear-cache.d.ts +7 -2
- package/general/clear-cache.js +1 -12
- package/general/cnic-formatter.d.ts +16 -3
- package/general/cnic-formatter.js +1 -53
- package/general/convert-url-to-base64.d.ts +8 -6
- package/general/convert-url-to-base64.js +1 -231
- package/general/countries.d.ts +5 -3
- package/general/countries.js +1 -514
- package/general/create-date.d.ts +3 -1
- package/general/create-date.js +1 -22
- package/general/crypto.d.ts +4 -2
- package/general/crypto.js +1 -45
- package/general/currencies.d.ts +2 -0
- package/general/currencies.js +0 -1077
- package/general/delete-image-from-private-supabase.d.ts +10 -2
- package/general/delete-image-from-private-supabase.js +1 -66
- package/general/delete-image-from-public-supabase.d.ts +10 -2
- package/general/delete-image-from-public-supabase.js +1 -66
- package/general/download-from-url.d.ts +8 -1
- package/general/download-from-url.js +1 -82
- package/general/dynamic-page-limit.d.ts +9 -3
- package/general/dynamic-page-limit.js +1 -7
- package/general/enum-to-text.d.ts +8 -1
- package/general/enum-to-text.js +1 -11
- package/general/fetch-data.d.ts +16 -4
- package/general/fetch-data.js +1 -95
- package/general/fetch-supabase-image.d.ts +11 -2
- package/general/fetch-supabase-image.js +1 -67
- package/general/fetch-supabase-private-assets.d.ts +11 -2
- package/general/fetch-supabase-private-assets.js +1 -69
- package/general/format-date.d.ts +10 -2
- package/general/format-date.js +1 -49
- package/general/format-number.d.ts +12 -2
- package/general/format-number.js +1 -35
- package/general/format-phone-display.d.ts +9 -1
- package/general/format-phone-display.js +1 -32
- package/general/format-phone.d.ts +10 -2
- package/general/format-phone.js +1 -20
- package/general/format-pricing.d.ts +8 -1
- package/general/format-pricing.js +1 -23
- package/general/format-secs.d.ts +8 -1
- package/general/format-secs.js +1 -21
- package/general/format-time.d.ts +8 -2
- package/general/format-time.js +1 -38
- package/general/format-value.d.ts +8 -1
- package/general/format-value.js +1 -7
- package/general/full-month-range.d.ts +3 -2
- package/general/full-month-range.js +1 -24
- package/general/full-year-range.d.ts +3 -2
- package/general/full-year-range.js +1 -20
- package/general/generate-article-schema.d.ts +3 -2
- package/general/generate-article-schema.js +1 -100
- package/general/generate-blog-schema.d.ts +3 -2
- package/general/generate-blog-schema.js +1 -32
- package/general/generate-book-schema.d.ts +3 -2
- package/general/generate-book-schema.js +1 -109
- package/general/generate-breadcrumb-schema.d.ts +3 -2
- package/general/generate-breadcrumb-schema.js +1 -34
- package/general/generate-carousel-schema.d.ts +3 -2
- package/general/generate-carousel-schema.js +1 -172
- package/general/generate-course-schema.d.ts +3 -2
- package/general/generate-course-schema.js +1 -124
- package/general/generate-dataset-schema.d.ts +3 -2
- package/general/generate-dataset-schema.js +1 -156
- package/general/generate-discussion-forum-schema.d.ts +3 -2
- package/general/generate-discussion-forum-schema.js +1 -67
- package/general/generate-education-schema.d.ts +3 -2
- package/general/generate-education-schema.js +1 -137
- package/general/generate-employer-aggregate-rating-schema.d.ts +3 -2
- package/general/generate-employer-aggregate-rating-schema.js +1 -64
- package/general/generate-event-schema.d.ts +3 -2
- package/general/generate-event-schema.js +1 -214
- package/general/generate-faq-schema.d.ts +3 -2
- package/general/generate-faq-schema.js +1 -43
- package/general/generate-grid.d.ts +3 -2
- package/general/generate-grid.js +1 -55
- package/general/generate-image-metadata-schema.d.ts +3 -2
- package/general/generate-image-metadata-schema.js +1 -73
- package/general/generate-job-posting-schema.d.ts +3 -2
- package/general/generate-job-posting-schema.js +1 -120
- package/general/generate-local-business-schema.d.ts +3 -2
- package/general/generate-local-business-schema.js +1 -75
- package/general/generate-math-solver-schema.d.ts +3 -2
- package/general/generate-math-solver-schema.js +1 -83
- package/general/generate-movie-carousel-schema.d.ts +3 -2
- package/general/generate-movie-carousel-schema.js +1 -160
- package/general/generate-organization-schema.d.ts +3 -2
- package/general/generate-organization-schema.js +1 -39
- package/general/generate-profile-page-schema.d.ts +3 -2
- package/general/generate-profile-page-schema.js +1 -82
- package/general/generate-qa-page-schema.d.ts +3 -2
- package/general/generate-qa-page-schema.js +1 -67
- package/general/generate-recipe-schema.d.ts +3 -2
- package/general/generate-recipe-schema.js +1 -104
- package/general/generate-ref.d.ts +8 -2
- package/general/generate-ref.js +1 -12
- package/general/generate-review-snippet-schema.d.ts +3 -2
- package/general/generate-review-snippet-schema.js +1 -137
- package/general/generate-shopping-loyalty-program-schema.d.ts +3 -2
- package/general/generate-shopping-loyalty-program-schema.js +1 -59
- package/general/generate-shopping-merchant-listing-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-listing-schema.js +1 -153
- package/general/generate-shopping-merchant-return-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-return-policy-schema.js +1 -68
- package/general/generate-shopping-merchant-shipping-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -74
- package/general/generate-shopping-overview-schema.d.ts +3 -2
- package/general/generate-shopping-overview-schema.js +1 -157
- package/general/generate-shopping-product-snippet-schema.d.ts +3 -2
- package/general/generate-shopping-product-snippet-schema.js +1 -167
- package/general/generate-shopping-variants-schema.d.ts +3 -2
- package/general/generate-shopping-variants-schema.js +1 -143
- package/general/generate-software-app-schema.d.ts +3 -2
- package/general/generate-software-app-schema.js +1 -143
- package/general/generate-speakable-schema.d.ts +3 -2
- package/general/generate-speakable-schema.js +1 -139
- package/general/generate-subscription-schema.d.ts +3 -2
- package/general/generate-subscription-schema.js +1 -133
- package/general/generate-vacation-rental-schema.d.ts +3 -2
- package/general/generate-vacation-rental-schema.js +1 -135
- package/general/generate-video-schema.d.ts +3 -2
- package/general/generate-video-schema.js +1 -163
- package/general/generic-cache.d.ts +17 -15
- package/general/generic-cache.js +1 -659
- package/general/get-available-page-limit.d.ts +8 -2
- package/general/get-available-page-limit.js +1 -31
- package/general/get-calendar-current-month.d.ts +11 -3
- package/general/get-calendar-current-month.js +1 -31
- package/general/get-calendar-dates.d.ts +11 -3
- package/general/get-calendar-dates.js +1 -42
- package/general/get-calendar-next-month.d.ts +12 -3
- package/general/get-calendar-next-month.js +1 -32
- package/general/get-calendar-previous-month.d.ts +12 -3
- package/general/get-calendar-previous-month.js +1 -36
- package/general/get-current-year.d.ts +7 -1
- package/general/get-current-year.js +1 -5
- package/general/get-day-name.d.ts +5 -3
- package/general/get-day-name.js +1 -14
- package/general/get-dial-code.d.ts +8 -1
- package/general/get-dial-code.js +1 -8
- package/general/get-full-name.d.ts +9 -2
- package/general/get-full-name.js +1 -8
- package/general/get-href.d.ts +3 -1
- package/general/get-href.js +1 -13
- package/general/get-month-name.d.ts +5 -3
- package/general/get-month-name.js +1 -19
- package/general/get-month-number.d.ts +5 -3
- package/general/get-month-number.js +1 -29
- package/general/get-number-of-days-in-month.d.ts +9 -2
- package/general/get-number-of-days-in-month.js +1 -12
- package/general/get-pathname.d.ts +3 -1
- package/general/get-pathname.js +1 -16
- package/general/get-week-day.d.ts +8 -1
- package/general/get-week-day.js +1 -9
- package/general/image-url-to-base64.d.ts +3 -1
- package/general/image-url-to-base64.js +1 -80
- package/general/is-created-or-updated.d.ts +3 -1
- package/general/is-created-or-updated.js +1 -26
- package/general/is-next-button-disabled.d.ts +9 -1
- package/general/is-next-button-disabled.js +1 -5
- package/general/is-odd.d.ts +3 -1
- package/general/is-odd.js +1 -13
- package/general/is-previous-button-disabled.d.ts +8 -1
- package/general/is-previous-button-disabled.js +1 -7
- package/general/linear-gradients.d.ts +4 -2
- package/general/linear-gradients.js +1 -52
- package/general/multi-part-search.d.ts +10 -2
- package/general/multi-part-search.js +1 -16
- package/general/normalize-phone.d.ts +15 -2
- package/general/normalize-phone.js +1 -40
- package/general/parse-frontmatter.d.ts +11 -4
- package/general/parse-frontmatter.js +2 -35
- package/general/remove-data-image-prefix.d.ts +8 -1
- package/general/remove-data-image-prefix.js +1 -7
- package/general/repeat-times.d.ts +3 -1
- package/general/repeat-times.js +1 -21
- package/general/resolve-anchor-link.d.ts +3 -1
- package/general/resolve-anchor-link.js +1 -26
- package/general/resolve-current-date.d.ts +3 -1
- package/general/resolve-current-date.js +1 -22
- package/general/resolve-grid.d.ts +3 -1
- package/general/resolve-grid.js +1 -18
- package/general/resolve-initials.d.ts +3 -1
- package/general/resolve-initials.js +1 -17
- package/general/set-timezone.d.ts +11 -1
- package/general/set-timezone.js +1 -12
- package/general/slugify.d.ts +3 -1
- package/general/slugify.js +1 -24
- package/general/text-to-enum.d.ts +8 -1
- package/general/text-to-enum.js +1 -10
- package/general/text-to-sentence-case.d.ts +3 -1
- package/general/text-to-sentence-case.js +1 -16
- package/general/time-out.d.ts +3 -1
- package/general/time-out.js +1 -16
- package/general/time-zones.d.ts +3 -1
- package/general/time-zones.js +1 -437
- package/general/truncate-text.d.ts +3 -1
- package/general/truncate-text.js +1 -18
- package/general/type.d.ts +3 -1
- package/general/type.js +1 -2
- package/general/upload-blob-to-private-supabase.d.ts +14 -2
- package/general/upload-blob-to-private-supabase.js +1 -62
- package/general/upload-blob-to-public-supabase.d.ts +14 -2
- package/general/upload-blob-to-public-supabase.js +1 -62
- package/general/upload-image-to-private-supabase.d.ts +15 -3
- package/general/upload-image-to-private-supabase.js +1 -66
- package/general/upload-image-to-public-supabase.d.ts +15 -3
- package/general/upload-image-to-public-supabase.js +1 -66
- package/general/url-to-sentence-case.d.ts +3 -1
- package/general/url-to-sentence-case.js +1 -19
- package/general/validate-comment.d.ts +3 -1
- package/general/validate-comment.js +1 -21
- package/general/validate-email.d.ts +3 -1
- package/general/validate-email.js +1 -24
- package/general/validate-form.d.ts +12 -3
- package/general/validate-form.js +1 -29
- package/general/validate-name.d.ts +3 -1
- package/general/validate-name.js +1 -21
- package/hooks/use-change.d.ts +11 -2
- package/hooks/use-change.js +1 -23
- package/hooks/use-debounce.d.ts +10 -1
- package/hooks/use-debounce.js +1 -14
- package/hooks/use-fetch.d.ts +7 -5
- package/hooks/use-fetch.js +1 -239
- package/hooks/use-force-render.d.ts +6 -2
- package/hooks/use-force-render.js +1 -17
- package/hooks/use-ip-geo-location.d.ts +8 -1
- package/hooks/use-ip-geo-location.js +1 -79
- package/hooks/use-is-mobile.d.ts +8 -1
- package/hooks/use-is-mobile.js +1 -22
- package/hooks/use-module-entity-v2.d.ts +7 -4
- package/hooks/use-module-entity-v2.js +1 -188
- package/hooks/use-module-entity.d.ts +7 -4
- package/hooks/use-module-entity.js +1 -177
- package/hooks/use-phone-formatter.d.ts +10 -2
- package/hooks/use-phone-formatter.js +1 -23
- package/hooks/use-position.d.ts +6 -3
- package/hooks/use-position.js +1 -43
- package/hooks/use-rtl.d.ts +4 -2
- package/hooks/use-rtl.js +1 -84
- package/hooks/use-sticky.d.ts +3 -1
- package/hooks/use-sticky.js +1 -39
- package/hooks/use-toggle-state.d.ts +3 -2
- package/hooks/use-toggle-state.js +1 -26
- package/hooks/use-window-event-listener.d.ts +9 -1
- package/hooks/use-window-event-listener.js +1 -11
- package/hooks/with-seo.d.ts +11 -2
- package/hooks/with-seo.js +1 -37
- package/local-storage/get-storage-value.d.ts +5 -2
- package/local-storage/get-storage-value.js +1 -20
- package/local-storage/remove-storage-value.d.ts +3 -1
- package/local-storage/remove-storage-value.js +1 -14
- package/local-storage/set-storage-value.d.ts +3 -1
- package/local-storage/set-storage-value.js +1 -14
- package/local-storage/type.d.ts +3 -1
- package/local-storage/type.js +1 -2
- package/npm.d.d.ts +2 -0
- package/npm.d.js +0 -0
- package/package.json +20 -18
- package/storybook/generate-sitemap.d.ts +3 -1
- package/storybook/generate-sitemap.js +17 -26
- package/storybook/preview.d.ts +4 -2
- package/storybook/preview.js +1 -62
- package/storybook/react-design-story-script.d.ts +3 -1
- package/storybook/react-design-story-script.js +5 -27
- package/storybook/react-emoji-collection.d.ts +3 -1
- package/storybook/react-emoji-collection.js +10 -55
- package/storybook/react-emoji-story-script.d.ts +3 -1
- package/storybook/react-emoji-story-script.js +5 -31
- package/storybook/react-emoji-story-template.d.ts +3 -1
- package/storybook/react-emoji-story-template.js +45 -15
- package/storybook/react-icon-collection.d.ts +3 -1
- package/storybook/react-icon-collection.js +10 -42
- package/storybook/react-icon-story-script.d.ts +3 -1
- package/storybook/react-icon-story-script.js +5 -27
- package/storybook/react-icon-story-template.d.ts +3 -1
- package/storybook/react-icon-story-template.js +45 -14
- package/storybook/react-logo-collection.d.ts +3 -1
- package/storybook/react-logo-collection.js +10 -42
- package/storybook/react-logo-story-script.d.ts +3 -1
- package/storybook/react-logo-story-script.js +5 -27
- package/storybook/react-logo-story-template.d.ts +3 -1
- package/storybook/react-logo-story-template.js +45 -14
- package/storybook/react-pakistan-theme.d.ts +3 -1
- package/storybook/react-pakistan-theme.js +1 -31
- package/storybook/responsive-args.d.ts +11 -10
- package/storybook/responsive-args.js +1 -19
- package/storybook/responsive-component.d.ts +4 -2
- package/storybook/responsive-component.js +37 -23
- package/storybook/responsive-screens.d.ts +3 -1
- package/storybook/responsive-screens.js +1 -109
- package/storybook/theme.d.ts +17 -15
- package/storybook/theme.js +1 -1022
- package/api/stellar-solutions/app-user/index.d.ts +0 -51
- package/api/stellar-solutions/app-user/index.js +0 -210
- package/api/stellar-solutions/bank/index.d.ts +0 -59
- package/api/stellar-solutions/bank/index.js +0 -210
- package/api/stellar-solutions/branch/index.d.ts +0 -58
- package/api/stellar-solutions/branch/index.js +0 -220
- package/api/stellar-solutions/company/index.d.ts +0 -57
- package/api/stellar-solutions/company/index.js +0 -218
- package/api/stellar-solutions/company-report/index.d.ts +0 -15
- package/api/stellar-solutions/company-report/index.js +0 -74
- package/api/stellar-solutions/constants.d.ts +0 -19
- package/api/stellar-solutions/constants.js +0 -22
- package/api/stellar-solutions/contact/index.d.ts +0 -56
- package/api/stellar-solutions/contact/index.js +0 -217
- package/api/stellar-solutions/currency/index.d.ts +0 -55
- package/api/stellar-solutions/currency/index.js +0 -212
- package/api/stellar-solutions/customer/index.d.ts +0 -68
- package/api/stellar-solutions/customer/index.js +0 -249
- package/api/stellar-solutions/expense/index.d.ts +0 -58
- package/api/stellar-solutions/expense/index.js +0 -229
- package/api/stellar-solutions/expense-category/index.d.ts +0 -53
- package/api/stellar-solutions/expense-category/index.js +0 -214
- package/api/stellar-solutions/lead/index.d.ts +0 -51
- package/api/stellar-solutions/lead/index.js +0 -206
- package/api/stellar-solutions/menu-order/index.d.ts +0 -53
- package/api/stellar-solutions/menu-order/index.js +0 -202
- package/api/stellar-solutions/payment/index.d.ts +0 -65
- package/api/stellar-solutions/payment/index.js +0 -230
- package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
- package/api/stellar-solutions/payment-mode/index.js +0 -191
- package/api/stellar-solutions/preference/index.d.ts +0 -25
- package/api/stellar-solutions/preference/index.js +0 -114
- package/api/stellar-solutions/product/index.d.ts +0 -64
- package/api/stellar-solutions/product/index.js +0 -235
- package/api/stellar-solutions/product-category/index.d.ts +0 -51
- package/api/stellar-solutions/product-category/index.js +0 -212
- package/api/stellar-solutions/profile/index.d.ts +0 -78
- package/api/stellar-solutions/profile/index.js +0 -234
- package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
- package/api/stellar-solutions/quote-invoice/index.js +0 -369
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
- package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
- package/api/stellar-solutions/tax/index.d.ts +0 -55
- package/api/stellar-solutions/tax/index.js +0 -224
- package/api/stellar-solutions/types/common.d.ts +0 -24
- package/api/stellar-solutions/types/common.js +0 -22
- package/api/stellar-solutions/types/erp.d.ts +0 -302
- package/api/stellar-solutions/types/erp.js +0 -73
- package/api/stellar-solutions/types/index.d.ts +0 -3
- package/api/stellar-solutions/types/index.js +0 -19
- package/api/stellar-solutions/types/pos.d.ts +0 -176
- package/api/stellar-solutions/types/pos.js +0 -61
- package/constants/index.d.ts +0 -12
- package/constants/index.js +0 -28
- package/factory/index.d.ts +0 -2
- package/factory/index.js +0 -18
- package/general/index.d.ts +0 -95
- package/general/index.js +0 -111
- package/index.d.ts +0 -28
- package/index.js +0 -44
- package/local-storage/index.d.ts +0 -4
- package/local-storage/index.js +0 -20
- package/setupTests.d.ts +0 -1
- package/setupTests.js +0 -52
- package/storybook/index.d.ts +0 -17
- package/storybook/index.js +0 -33
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface DeleteImageFromPrivateSupabaseArgs {
|
|
2
2
|
supabase: any;
|
|
3
3
|
urls: Array<string>;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Deletes images from the private Supabase storage bucket.
|
|
7
|
+
* @param params.supabase - Supabase client instance.
|
|
8
|
+
* @param params.urls - Array of file URLs to delete.
|
|
9
|
+
* @returns Object containing `data` and `error` from Supabase.
|
|
10
|
+
*/
|
|
11
|
+
declare const deleteImageFromPrivateSupabase: ({ supabase, urls, }: DeleteImageFromPrivateSupabaseArgs) => Promise<{
|
|
6
12
|
data: any;
|
|
7
13
|
error: any;
|
|
8
14
|
}>;
|
|
15
|
+
|
|
16
|
+
export { type DeleteImageFromPrivateSupabaseArgs, deleteImageFromPrivateSupabase };
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.deleteImageFromPrivateSupabase = void 0;
|
|
49
|
-
var deleteImageFromPrivateSupabase = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
50
|
-
var _c, data, error;
|
|
51
|
-
var supabase = _b.supabase, urls = _b.urls;
|
|
52
|
-
return __generator(this, function (_d) {
|
|
53
|
-
switch (_d.label) {
|
|
54
|
-
case 0: return [4 /*yield*/, supabase.storage
|
|
55
|
-
.from(process.env.NEXT_PUBLIC_SUPABASE_PRIVATE_BUCKET)
|
|
56
|
-
.remove(__spreadArray([], urls, true))];
|
|
57
|
-
case 1:
|
|
58
|
-
_c = _d.sent(), data = _c.data, error = _c.error;
|
|
59
|
-
return [2 /*return*/, {
|
|
60
|
-
data: data,
|
|
61
|
-
error: error,
|
|
62
|
-
}];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
66
|
-
exports.deleteImageFromPrivateSupabase = deleteImageFromPrivateSupabase;
|
|
1
|
+
var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var i=(r,e)=>{for(var a in e)o(r,a,{get:e[a],enumerable:!0})},p=(r,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!g.call(r,s)&&s!==a&&o(r,s,{get:()=>e[s],enumerable:!(t=n(e,s))||t.enumerable});return r};var P=r=>p(o({},"__esModule",{value:!0}),r);var A={};i(A,{deleteImageFromPrivateSupabase:()=>u});module.exports=P(A);const u=async({supabase:r,urls:e})=>{const{data:a,error:t}=await r.storage.from(process.env.NEXT_PUBLIC_SUPABASE_PRIVATE_BUCKET).remove([...e]);return{data:a,error:t}};0&&(module.exports={deleteImageFromPrivateSupabase});
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface DeleteImageFromPublicSupabaseArgs {
|
|
2
2
|
supabase: any;
|
|
3
3
|
urls: Array<string>;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Deletes images from the public Supabase storage bucket.
|
|
7
|
+
* @param params.supabase - Supabase client instance.
|
|
8
|
+
* @param params.urls - Array of file URLs to delete.
|
|
9
|
+
* @returns Object containing `data` and `error` from Supabase.
|
|
10
|
+
*/
|
|
11
|
+
declare const deleteImageFromPublicSupabase: ({ supabase, urls, }: DeleteImageFromPublicSupabaseArgs) => Promise<{
|
|
6
12
|
data: any;
|
|
7
13
|
error: any;
|
|
8
14
|
}>;
|
|
15
|
+
|
|
16
|
+
export { type DeleteImageFromPublicSupabaseArgs, deleteImageFromPublicSupabase };
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.deleteImageFromPublicSupabase = void 0;
|
|
49
|
-
var deleteImageFromPublicSupabase = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
50
|
-
var _c, data, error;
|
|
51
|
-
var supabase = _b.supabase, urls = _b.urls;
|
|
52
|
-
return __generator(this, function (_d) {
|
|
53
|
-
switch (_d.label) {
|
|
54
|
-
case 0: return [4 /*yield*/, supabase.storage
|
|
55
|
-
.from(process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_BUCKET)
|
|
56
|
-
.remove(__spreadArray([], urls, true))];
|
|
57
|
-
case 1:
|
|
58
|
-
_c = _d.sent(), data = _c.data, error = _c.error;
|
|
59
|
-
return [2 /*return*/, {
|
|
60
|
-
data: data,
|
|
61
|
-
error: error,
|
|
62
|
-
}];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
66
|
-
exports.deleteImageFromPublicSupabase = deleteImageFromPublicSupabase;
|
|
1
|
+
var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var a in e)o(r,a,{get:e[a],enumerable:!0})},g=(r,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!u.call(r,s)&&s!==a&&o(r,s,{get:()=>e[s],enumerable:!(t=n(e,s))||t.enumerable});return r};var i=r=>g(o({},"__esModule",{value:!0}),r);var l={};c(l,{deleteImageFromPublicSupabase:()=>b});module.exports=i(l);const b=async({supabase:r,urls:e})=>{const{data:a,error:t}=await r.storage.from(process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_BUCKET).remove([...e]);return{data:a,error:t}};0&&(module.exports={deleteImageFromPublicSupabase});
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Triggers a browser file download from a URL string or Blob.
|
|
3
|
+
* @param source - URL string or Blob to download.
|
|
4
|
+
* @param filename - Optional filename for the downloaded file.
|
|
5
|
+
*/
|
|
6
|
+
declare const downloadFromUrl: (source: string | Blob, filename?: string) => Promise<void>;
|
|
7
|
+
|
|
8
|
+
export { downloadFromUrl };
|
|
@@ -1,82 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.downloadFromUrl = void 0;
|
|
40
|
-
var downloadFromUrl = function (source, filename) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var blob, res, urlObj, a, err_1;
|
|
42
|
-
var _a;
|
|
43
|
-
return __generator(this, function (_b) {
|
|
44
|
-
switch (_b.label) {
|
|
45
|
-
case 0:
|
|
46
|
-
_b.trys.push([0, 5, , 6]);
|
|
47
|
-
blob = void 0;
|
|
48
|
-
if (!(typeof source === 'string')) return [3 /*break*/, 3];
|
|
49
|
-
return [4 /*yield*/, fetch(source)];
|
|
50
|
-
case 1:
|
|
51
|
-
res = _b.sent();
|
|
52
|
-
if (!res.ok)
|
|
53
|
-
throw new Error("Failed to fetch file: ".concat(res.status));
|
|
54
|
-
return [4 /*yield*/, res.blob()];
|
|
55
|
-
case 2:
|
|
56
|
-
blob = _b.sent();
|
|
57
|
-
return [3 /*break*/, 4];
|
|
58
|
-
case 3:
|
|
59
|
-
blob = source;
|
|
60
|
-
_b.label = 4;
|
|
61
|
-
case 4:
|
|
62
|
-
urlObj = URL.createObjectURL(blob);
|
|
63
|
-
a = document.createElement('a');
|
|
64
|
-
a.href = urlObj;
|
|
65
|
-
a.download =
|
|
66
|
-
filename !== null && filename !== void 0 ? filename : (typeof source === 'string'
|
|
67
|
-
? ((_a = source.split('/').pop()) !== null && _a !== void 0 ? _a : 'download')
|
|
68
|
-
: 'download');
|
|
69
|
-
document.body.appendChild(a);
|
|
70
|
-
a.click();
|
|
71
|
-
a.remove();
|
|
72
|
-
URL.revokeObjectURL(urlObj);
|
|
73
|
-
return [3 /*break*/, 6];
|
|
74
|
-
case 5:
|
|
75
|
-
err_1 = _b.sent();
|
|
76
|
-
console.error('downloadFromUrl error:', err_1);
|
|
77
|
-
return [3 /*break*/, 6];
|
|
78
|
-
case 6: return [2 /*return*/];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}); };
|
|
82
|
-
exports.downloadFromUrl = downloadFromUrl;
|
|
1
|
+
var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var s=(o,t)=>{for(var r in t)a(o,r,{get:t[r],enumerable:!0})},b=(o,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of c(t))!i.call(o,e)&&e!==r&&a(o,e,{get:()=>t[e],enumerable:!(l=d(t,e))||l.enumerable});return o};var w=o=>b(a({},"__esModule",{value:!0}),o);var p={};s(p,{downloadFromUrl:()=>f});module.exports=w(p);const f=async(o,t)=>{try{let r;if(typeof o=="string"){const n=await fetch(o);if(!n.ok)throw new Error(`Failed to fetch file: ${n.status}`);r=await n.blob()}else r=o;const l=URL.createObjectURL(r),e=document.createElement("a");e.href=l,e.download=t??(typeof o=="string"?o.split("/").pop()??"download":"download"),document.body.appendChild(e),e.click(),e.remove(),URL.revokeObjectURL(l)}catch(r){console.error("downloadFromUrl error:",r)}};0&&(module.exports={downloadFromUrl});
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
type PageLimitOption = 5 | 10 | 15 | 25 | 100;
|
|
2
2
|
interface Return {
|
|
3
3
|
option: string;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Converts an array of numeric page-limit options into dropdown option objects.
|
|
7
|
+
* @param availableOptions - Array of page limit numbers.
|
|
8
|
+
* @returns Array of objects with `option` string property.
|
|
9
|
+
*/
|
|
10
|
+
declare const dynamicPageLimit: (availableOptions: Array<PageLimitOption>) => Array<Return>;
|
|
11
|
+
|
|
12
|
+
export { type PageLimitOption, dynamicPageLimit };
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dynamicPageLimit = void 0;
|
|
4
|
-
var dynamicPageLimit = function (availableOptions) {
|
|
5
|
-
return availableOptions.map(function (txt) { return ({ option: String(txt) }); });
|
|
6
|
-
};
|
|
7
|
-
exports.dynamicPageLimit = dynamicPageLimit;
|
|
1
|
+
var e=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var g=(i,t)=>{for(var r in t)e(i,r,{get:t[r],enumerable:!0})},y=(i,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of p(t))!m.call(i,n)&&n!==r&&e(i,n,{get:()=>t[n],enumerable:!(o=a(t,n))||o.enumerable});return i};var c=i=>y(e({},"__esModule",{value:!0}),i);var L={};g(L,{dynamicPageLimit:()=>u});module.exports=c(L);const u=i=>i.map(t=>({option:String(t)}));0&&(module.exports={dynamicPageLimit});
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Converts a SCREAMING_SNAKE_CASE enum value to Title Case.
|
|
3
|
+
* @param e - The enum string to convert.
|
|
4
|
+
* @returns The formatted title-case string.
|
|
5
|
+
*/
|
|
6
|
+
declare const enumToText: (e: string) => string;
|
|
7
|
+
|
|
8
|
+
export { enumToText };
|
package/general/enum-to-text.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enumToText = void 0;
|
|
4
|
-
var enumToText = function (e) {
|
|
5
|
-
return e
|
|
6
|
-
.toLowerCase()
|
|
7
|
-
.split('_')
|
|
8
|
-
.map(function (item) { return item.charAt(0).toUpperCase() + item.slice(1); })
|
|
9
|
-
.join(' ');
|
|
10
|
-
};
|
|
11
|
-
exports.enumToText = enumToText;
|
|
1
|
+
var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var s in t)r(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of a(t))!i.call(e,o)&&o!==s&&r(e,o,{get:()=>t[o],enumerable:!(n=p(t,o))||n.enumerable});return e};var l=e=>g(r({},"__esModule",{value:!0}),e);var C={};c(C,{enumToText:()=>x});module.exports=l(C);const x=e=>e.toLowerCase().split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");0&&(module.exports={enumToText});
|
package/general/fetch-data.d.ts
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
import { API_METHODS } from '../constants/api-methods';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { API_METHODS } from '../constants/api-methods.js';
|
|
2
|
+
|
|
3
|
+
type FetchDataParamValue = string | number | boolean | null | undefined;
|
|
4
|
+
interface FetchDataParams {
|
|
4
5
|
url: string;
|
|
5
6
|
method?: API_METHODS;
|
|
6
7
|
body?: string;
|
|
7
8
|
headers?: Record<string, string>;
|
|
8
9
|
params?: Record<string, FetchDataParamValue>;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Fetches data from an API endpoint with optional query params, headers, and body.
|
|
13
|
+
* @param params.url - The request URL.
|
|
14
|
+
* @param params.method - HTTP method (default GET).
|
|
15
|
+
* @param params.body - Optional request body string.
|
|
16
|
+
* @param params.headers - Optional request headers.
|
|
17
|
+
* @param params.params - Optional query parameters appended to the URL.
|
|
18
|
+
* @returns Object containing `data` and `error`.
|
|
19
|
+
*/
|
|
20
|
+
declare const fetchData: ({ url, method, body, headers, params, }: FetchDataParams) => Promise<{
|
|
11
21
|
data: any | undefined;
|
|
12
22
|
error: Error | undefined;
|
|
13
23
|
}>;
|
|
24
|
+
|
|
25
|
+
export { type FetchDataParamValue, type FetchDataParams, fetchData };
|
package/general/fetch-data.js
CHANGED
|
@@ -1,95 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.fetchData = void 0;
|
|
51
|
-
var api_methods_1 = require("../constants/api-methods");
|
|
52
|
-
var buildUrl = function (url, params) {
|
|
53
|
-
if (!params)
|
|
54
|
-
return url;
|
|
55
|
-
var filteredEntries = Object.entries(params).filter(function (entry) {
|
|
56
|
-
return entry[1] !== null && entry[1] !== undefined;
|
|
57
|
-
});
|
|
58
|
-
if (filteredEntries.length === 0)
|
|
59
|
-
return url;
|
|
60
|
-
var searchParams = new URLSearchParams(filteredEntries.map(function (_a) {
|
|
61
|
-
var key = _a[0], value = _a[1];
|
|
62
|
-
return [key, String(value)];
|
|
63
|
-
}));
|
|
64
|
-
var separator = url.includes('?') ? '&' : '?';
|
|
65
|
-
return "".concat(url).concat(separator).concat(searchParams.toString());
|
|
66
|
-
};
|
|
67
|
-
var fetchData = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
68
|
-
var data, error, res, err_1;
|
|
69
|
-
var url = _b.url, _c = _b.method, method = _c === void 0 ? api_methods_1.API_METHODS.GET : _c, body = _b.body, headers = _b.headers, params = _b.params;
|
|
70
|
-
return __generator(this, function (_d) {
|
|
71
|
-
switch (_d.label) {
|
|
72
|
-
case 0:
|
|
73
|
-
_d.trys.push([0, 3, , 4]);
|
|
74
|
-
return [4 /*yield*/, fetch(buildUrl(url, params), __assign(__assign({ method: method }, (headers ? { headers: headers } : {})), (method !== api_methods_1.API_METHODS.GET && body && { body: body })))];
|
|
75
|
-
case 1:
|
|
76
|
-
res = _d.sent();
|
|
77
|
-
return [4 /*yield*/, res.json()];
|
|
78
|
-
case 2:
|
|
79
|
-
data = _d.sent();
|
|
80
|
-
if (!res.ok) {
|
|
81
|
-
throw new Error(data.error);
|
|
82
|
-
}
|
|
83
|
-
return [3 /*break*/, 4];
|
|
84
|
-
case 3:
|
|
85
|
-
err_1 = _d.sent();
|
|
86
|
-
error = err_1;
|
|
87
|
-
return [3 /*break*/, 4];
|
|
88
|
-
case 4: return [2 /*return*/, {
|
|
89
|
-
data: data,
|
|
90
|
-
error: error,
|
|
91
|
-
}];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}); };
|
|
95
|
-
exports.fetchData = fetchData;
|
|
1
|
+
var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var f=(t,r)=>{for(var e in r)c(t,e,{get:r[e],enumerable:!0})},m=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of u(r))!g.call(t,a)&&a!==e&&c(t,a,{get:()=>r[a],enumerable:!(i=l(r,a))||i.enumerable});return t};var h=t=>m(c({},"__esModule",{value:!0}),t);var E={};f(E,{fetchData:()=>D});module.exports=h(E);var d=require("../constants/api-methods");const P=(t,r)=>{if(!r)return t;const e=Object.entries(r).filter(n=>n[1]!==null&&n[1]!==void 0);if(e.length===0)return t;const i=new URLSearchParams(e.map(([n,s])=>[n,String(s)])),a=t.includes("?")?"&":"?";return`${t}${a}${i.toString()}`},D=async({url:t,method:r=d.API_METHODS.GET,body:e,headers:i,params:a})=>{let n,s;try{const o=await fetch(P(t,a),{method:r,...i?{headers:i}:{},...r!==d.API_METHODS.GET&&e&&{body:e}});if(n=await o.json(),!o.ok)throw new Error(n.error)}catch(o){s=o}return{data:n,error:s}};0&&(module.exports={fetchData});
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface FetchSupabasePrivateImageArgs {
|
|
2
2
|
apikey: string;
|
|
3
3
|
callback: (url: string | Blob) => void;
|
|
4
4
|
fetchUrl: string;
|
|
5
5
|
token: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Fetches a private Supabase image as a Blob and passes an object URL to the callback.
|
|
9
|
+
* @param params.apikey - Supabase API key.
|
|
10
|
+
* @param params.callback - Callback receiving the Blob URL.
|
|
11
|
+
* @param params.fetchUrl - The image URL to fetch.
|
|
12
|
+
* @param params.token - Auth bearer token.
|
|
13
|
+
*/
|
|
14
|
+
declare const fetchSupabasePrivateImage: ({ apikey, callback, fetchUrl, token, }: FetchSupabasePrivateImageArgs) => Promise<void>;
|
|
15
|
+
|
|
16
|
+
export { type FetchSupabasePrivateImageArgs, fetchSupabasePrivateImage };
|
|
@@ -1,67 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.fetchSupabasePrivateImage = void 0;
|
|
40
|
-
var constants_1 = require("../constants");
|
|
41
|
-
var fetchSupabasePrivateImage = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
42
|
-
var response, blob, url;
|
|
43
|
-
var apikey = _b.apikey, callback = _b.callback, fetchUrl = _b.fetchUrl, token = _b.token;
|
|
44
|
-
return __generator(this, function (_c) {
|
|
45
|
-
switch (_c.label) {
|
|
46
|
-
case 0: return [4 /*yield*/, fetch(fetchUrl, {
|
|
47
|
-
method: constants_1.API_METHODS.GET,
|
|
48
|
-
headers: {
|
|
49
|
-
'Content-Type': 'application/json',
|
|
50
|
-
apikey: apikey,
|
|
51
|
-
Authorization: "Bearer ".concat(token),
|
|
52
|
-
},
|
|
53
|
-
})];
|
|
54
|
-
case 1:
|
|
55
|
-
response = _c.sent();
|
|
56
|
-
if (!response.ok) return [3 /*break*/, 3];
|
|
57
|
-
return [4 /*yield*/, response.blob()];
|
|
58
|
-
case 2:
|
|
59
|
-
blob = _c.sent();
|
|
60
|
-
url = URL.createObjectURL(blob);
|
|
61
|
-
callback(url);
|
|
62
|
-
_c.label = 3;
|
|
63
|
-
case 3: return [2 /*return*/];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); };
|
|
67
|
-
exports.fetchSupabasePrivateImage = fetchSupabasePrivateImage;
|
|
1
|
+
var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of b(e))!g.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=p(e,a))||o.enumerable});return t};var m=t=>h(i({},"__esModule",{value:!0}),t);var u={};l(u,{fetchSupabasePrivateImage:()=>f});module.exports=m(u);var s=require("../constants/api-methods");const f=async({apikey:t,callback:e,fetchUrl:r,token:o})=>{const a=await fetch(r,{method:s.API_METHODS.GET,headers:{"Content-Type":"application/json",apikey:t,Authorization:`Bearer ${o}`}});if(a.ok){const n=await a.blob(),c=URL.createObjectURL(n);e(c)}};0&&(module.exports={fetchSupabasePrivateImage});
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
interface FetchSupabasePrivateAssetsArgs {
|
|
2
2
|
apikey: string;
|
|
3
3
|
fetchUrls: Array<string>;
|
|
4
4
|
token: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Fetches multiple private Supabase assets in parallel and returns an array of Blobs.
|
|
8
|
+
* @param params.apikey - Supabase API key.
|
|
9
|
+
* @param params.fetchUrls - Array of asset URLs to fetch.
|
|
10
|
+
* @param params.token - Auth bearer token.
|
|
11
|
+
* @returns Array of Blob objects.
|
|
12
|
+
*/
|
|
13
|
+
declare const fetchSupabasePrivateAssets: ({ apikey, fetchUrls, token, }: FetchSupabasePrivateAssetsArgs) => Promise<Array<Blob>>;
|
|
14
|
+
|
|
15
|
+
export { type FetchSupabasePrivateAssetsArgs, fetchSupabasePrivateAssets };
|
|
@@ -1,69 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.fetchSupabasePrivateAssets = void 0;
|
|
40
|
-
var constants_1 = require("../constants");
|
|
41
|
-
var fetchSupabasePrivateAssets = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
42
|
-
var fetchPromises, results;
|
|
43
|
-
var apikey = _b.apikey, fetchUrls = _b.fetchUrls, token = _b.token;
|
|
44
|
-
return __generator(this, function (_c) {
|
|
45
|
-
switch (_c.label) {
|
|
46
|
-
case 0:
|
|
47
|
-
fetchPromises = fetchUrls.map(function (url) {
|
|
48
|
-
return fetch(url, {
|
|
49
|
-
method: constants_1.API_METHODS.GET,
|
|
50
|
-
headers: {
|
|
51
|
-
'Content-Type': 'application/json',
|
|
52
|
-
apikey: apikey,
|
|
53
|
-
Authorization: "Bearer ".concat(token),
|
|
54
|
-
},
|
|
55
|
-
}).then(function (response) {
|
|
56
|
-
if (!response.ok) {
|
|
57
|
-
throw new Error("HTTP error! status: ".concat(response.status, " from ").concat(url));
|
|
58
|
-
}
|
|
59
|
-
return response.blob();
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
return [4 /*yield*/, Promise.all(fetchPromises)];
|
|
63
|
-
case 1:
|
|
64
|
-
results = _c.sent();
|
|
65
|
-
return [2 /*return*/, results];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); };
|
|
69
|
-
exports.fetchSupabasePrivateAssets = fetchSupabasePrivateAssets;
|
|
1
|
+
var i=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(r,t)=>{for(var e in t)i(r,e,{get:t[e],enumerable:!0})},f=(r,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of A(t))!p.call(r,s)&&s!==e&&i(r,s,{get:()=>t[s],enumerable:!(a=h(t,s))||a.enumerable});return r};var l=r=>f(i({},"__esModule",{value:!0}),r);var P={};u(P,{fetchSupabasePrivateAssets:()=>m});module.exports=l(P);var c=require("../constants/api-methods");const m=async({apikey:r,fetchUrls:t,token:e})=>{const a=t.map(n=>fetch(n,{method:c.API_METHODS.GET,headers:{"Content-Type":"application/json",apikey:r,Authorization:`Bearer ${e}`}}).then(o=>{if(!o.ok)throw new Error(`HTTP error! status: ${o.status} from ${n}`);return o.blob()}));return await Promise.all(a)};0&&(module.exports={fetchSupabasePrivateAssets});
|