@learnpack/learnpack 5.0.162 → 5.0.166

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/src/ui/app.tar.gz CHANGED
Binary file
package/src/utils/api.ts CHANGED
@@ -544,6 +544,20 @@ const updateRigoAssetID = async (
544
544
  }
545
545
  }
546
546
 
547
+ const createRigoPackage = async (token: string, slug: string, config: any) => {
548
+ const url = `${RIGOBOT_HOST}/v1/learnpack/package`
549
+ const headers = {
550
+ Authorization: `Token ${token}`,
551
+ }
552
+ try {
553
+ const response = await axios.post(url, { slug, config }, { headers })
554
+ return response.data
555
+ } catch (error) {
556
+ console.error("Failed to create Rigo package:", error)
557
+ throw error
558
+ }
559
+ }
560
+
547
561
  export default {
548
562
  login,
549
563
  publish,
@@ -560,4 +574,5 @@ export default {
560
574
  updateAsset,
561
575
  getCategories,
562
576
  updateRigoAssetID,
577
+ createRigoPackage,
563
578
  }