@sesamy/sesamy-js 1.30.0 → 1.31.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 CHANGED
@@ -18,8 +18,6 @@ The following events are tracked:
18
18
 
19
19
  The following methods are available on the `sesamy` object:
20
20
 
21
- Certainly! Here’s the list with bullet points sorted alphabetically:
22
-
23
21
  - attributions
24
22
  - get: get the attributions for a user
25
23
  - set: set the attributions for a user
@@ -37,6 +35,10 @@ Certainly! Here’s the list with bullet points sorted alphabetically:
37
35
  - cancel: cancel a contract by id
38
36
  - get: get a contract by id
39
37
  - list: lists all the user's contracts
38
+ - content:
39
+ - list: get all articles based on the configured selectors
40
+ - get: get an article based on an element or a selector
41
+ - getLanguage: get the current language
40
42
  - entitlements
41
43
  - access: fetches the user's access URL for an entitlement
42
44
  - get: gets a single entitlement by id
@@ -44,7 +46,7 @@ Certainly! Here’s the list with bullet points sorted alphabetically:
44
46
  - signedLinks: lists and signedLinks registered in the current session
45
47
  - fulfillments
46
48
  - list: list the user's fulfillments for a SKU
47
- - generateLink: creates a link to a Sesamy hosted service such as account, consume, or checkout. If the user is authenticated, the link will be signed so that the user can access the service without logging in again.
49
+ - generateLink: creates a link to a Sesamy hosted service such as account, change-payment, consume, or checkout. If the user is authenticated, the link will be signed so that the user can access the service without logging in again.
48
50
  - getPaymentIssues: returns a list of failed payments and cards that will expire
49
51
  - getVersion: returns the version of the sesamy-js library
50
52
  - init: Initializes the sesamy-js library
@@ -560,20 +562,21 @@ export type Address = {
560
562
  };
561
563
  ```
562
564
 
563
- ## `generateLink(params: GenerateAccountLink | GenerateConsumeLink)`
565
+ ## `generateLink(params: GenerateAccountLink | GenerateChangePaymentLink | GenerateConsumeLink | GenerateCheckoutLink)`
564
566
 
565
567
  Generates a link to a Sesamy-hosted service such as account or consume. If the user is authenticated, the link will be signed so that the user can access the service without logging in again.
566
568
 
567
569
  ### Parameters
568
570
 
569
571
  - params (GenerateAccountLink | GenerateConsumeLink): The parameters for generating the link.
570
- - target (string): The target service, either 'account' or 'consume'.
572
+ - target (string): The target service, either 'account', 'change-payment', 'consume' or 'checkout'.
571
573
  - sku (string, required for 'consume' target): The SKU of the product to consume.
572
574
  - episodeId (string, optional for 'consume' target): The ID of the episode to consume.
573
575
  - shorten (boolean, optional): If true, the link will be shortened.
574
576
  - ttl (number, optional): The time-to-live for the shortened link in seconds.
575
577
  - redirectUrl (string, optional): The URL to redirect to after the link is accessed.
576
578
  - language (string, optional): The language for the link. If not provided the language will be fetched from the HTML element's `lang` attribute.
579
+ - contractId (string): used for change-payment
577
580
 
578
581
  ### Returns
579
582