@izak0s/spacebring-api 15.0.0 → 16.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/dist/index.d.cts CHANGED
@@ -358,7 +358,7 @@ interface paths {
358
358
  put?: never;
359
359
  /**
360
360
  * Create a category
361
- * @description Create a benefit category. <h3>OAuth</h3>Required scopes: <code>benefits</code>
361
+ * @description Create a benefit category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>benefits</code>
362
362
  */
363
363
  post: operations["createBenefitCategory"];
364
364
  delete?: never;
@@ -2388,7 +2388,7 @@ interface paths {
2388
2388
  put?: never;
2389
2389
  /**
2390
2390
  * Create a category
2391
- * @description Create a shop category. <h3>OAuth</h3>Required scopes: <code>shop</code>
2391
+ * @description Create a shop category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>shop</code>
2392
2392
  */
2393
2393
  post: operations["createShopCategory"];
2394
2394
  delete?: never;
@@ -17591,12 +17591,17 @@ interface components {
17591
17591
  * @description Unique identifier of the activity.
17592
17592
  */
17593
17593
  id: string;
17594
- /** @description Present when the activity was created by Lem AI. */
17594
+ /** @description Present when the activity was created by an agent. */
17595
17595
  lemAI?: {
17596
- /** @description Display name of the Lem AI assistant. */
17596
+ /**
17597
+ * Format: uuid
17598
+ * @description ID of the agent that created the activity. Absent for replies posted before agents.
17599
+ */
17600
+ agentRef?: string;
17601
+ /** @description Display name of the agent. */
17597
17602
  name: string;
17598
- /** @description Profile image URL of the Lem AI assistant. */
17599
- photoUrl: string;
17603
+ /** @description Profile image URL of the agent, or null when it has none. */
17604
+ photoUrl: string | null;
17600
17605
  };
17601
17606
  /** @description Membership of the user who performed the action. Holds only an empty user when no membership performed it, such as a Lem AI reply. */
17602
17607
  membership?: {
@@ -22672,16 +22677,14 @@ interface components {
22672
22677
  * @description ID of the location this alt currency belongs to.
22673
22678
  */
22674
22679
  locationRef: string;
22675
- } & ({
22680
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22681
+ exchangeRate?: number;
22676
22682
  /**
22677
- * @description Exchange rate provider when auto-update is enabled.
22683
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22678
22684
  * @enum {string}
22679
22685
  */
22680
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22681
- } | {
22682
- /** @description Exchange rate relative to the location main currency. */
22683
- exchangeRate: number;
22684
- });
22686
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22687
+ };
22685
22688
  };
22686
22689
  };
22687
22690
  };
@@ -22689,16 +22692,15 @@ interface components {
22689
22692
  content: {
22690
22693
  "application/json": {
22691
22694
  /** @description Alt currency fields to update */
22692
- altCurrency: Record<string, never> & ({
22695
+ altCurrency: {
22696
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22697
+ exchangeRate?: number;
22693
22698
  /**
22694
- * @description Exchange rate provider when auto-update is enabled.
22699
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22695
22700
  * @enum {string}
22696
22701
  */
22697
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22698
- } | {
22699
- /** @description Exchange rate relative to the location main currency. */
22700
- exchangeRate: number;
22701
- });
22702
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22703
+ };
22702
22704
  };
22703
22705
  };
22704
22706
  };
@@ -31559,9 +31561,9 @@ interface operations {
31559
31561
  };
31560
31562
  getFeedPosts: {
31561
31563
  parameters: {
31562
- query: {
31563
- /** @description The id of the location. */
31564
- locationRef: string;
31564
+ query?: {
31565
+ /** @description UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
31566
+ locationRef?: string;
31565
31567
  /** @description Token to retrieve the next page of results. */
31566
31568
  nextPageToken?: components["schemas"]["nextPageToken"];
31567
31569
  /** @description The number of items to return. */
@@ -36665,8 +36667,8 @@ type Like = NonNullable<components["schemas"]["postLike"]>;
36665
36667
  type Post = NonNullable<components["schemas"]["post"]>;
36666
36668
  /** Query parameters for `sb.feed.posts.list()`. */
36667
36669
  interface GetFeedPostsQuery {
36668
- /** The id of the location. */
36669
- locationRef: string;
36670
+ /** UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
36671
+ locationRef?: string;
36670
36672
  /** Token to retrieve the next page of results. */
36671
36673
  nextPageToken?: string;
36672
36674
  /** The number of items to return. */
@@ -37353,12 +37355,12 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
37353
37355
  deleteLike(id: string, options?: SpacebringRequestOptions): Promise<undefined>;
37354
37356
  };
37355
37357
  posts: {
37356
- list(query: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37358
+ list(query?: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37357
37359
  nextPageToken?: string;
37358
37360
  posts?: Post[];
37359
37361
  searchQueryNext?: string;
37360
37362
  }>;
37361
- iterate(query: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37363
+ iterate(query?: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37362
37364
  get(id: string, options?: SpacebringRequestOptions): Promise<Post>;
37363
37365
  create(post: CreateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
37364
37366
  update(id: string, post: UpdateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
package/dist/index.d.ts CHANGED
@@ -358,7 +358,7 @@ interface paths {
358
358
  put?: never;
359
359
  /**
360
360
  * Create a category
361
- * @description Create a benefit category. <h3>OAuth</h3>Required scopes: <code>benefits</code>
361
+ * @description Create a benefit category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>benefits</code>
362
362
  */
363
363
  post: operations["createBenefitCategory"];
364
364
  delete?: never;
@@ -2388,7 +2388,7 @@ interface paths {
2388
2388
  put?: never;
2389
2389
  /**
2390
2390
  * Create a category
2391
- * @description Create a shop category. <h3>OAuth</h3>Required scopes: <code>shop</code>
2391
+ * @description Create a shop category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>shop</code>
2392
2392
  */
2393
2393
  post: operations["createShopCategory"];
2394
2394
  delete?: never;
@@ -17591,12 +17591,17 @@ interface components {
17591
17591
  * @description Unique identifier of the activity.
17592
17592
  */
17593
17593
  id: string;
17594
- /** @description Present when the activity was created by Lem AI. */
17594
+ /** @description Present when the activity was created by an agent. */
17595
17595
  lemAI?: {
17596
- /** @description Display name of the Lem AI assistant. */
17596
+ /**
17597
+ * Format: uuid
17598
+ * @description ID of the agent that created the activity. Absent for replies posted before agents.
17599
+ */
17600
+ agentRef?: string;
17601
+ /** @description Display name of the agent. */
17597
17602
  name: string;
17598
- /** @description Profile image URL of the Lem AI assistant. */
17599
- photoUrl: string;
17603
+ /** @description Profile image URL of the agent, or null when it has none. */
17604
+ photoUrl: string | null;
17600
17605
  };
17601
17606
  /** @description Membership of the user who performed the action. Holds only an empty user when no membership performed it, such as a Lem AI reply. */
17602
17607
  membership?: {
@@ -22672,16 +22677,14 @@ interface components {
22672
22677
  * @description ID of the location this alt currency belongs to.
22673
22678
  */
22674
22679
  locationRef: string;
22675
- } & ({
22680
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22681
+ exchangeRate?: number;
22676
22682
  /**
22677
- * @description Exchange rate provider when auto-update is enabled.
22683
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22678
22684
  * @enum {string}
22679
22685
  */
22680
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22681
- } | {
22682
- /** @description Exchange rate relative to the location main currency. */
22683
- exchangeRate: number;
22684
- });
22686
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22687
+ };
22685
22688
  };
22686
22689
  };
22687
22690
  };
@@ -22689,16 +22692,15 @@ interface components {
22689
22692
  content: {
22690
22693
  "application/json": {
22691
22694
  /** @description Alt currency fields to update */
22692
- altCurrency: Record<string, never> & ({
22695
+ altCurrency: {
22696
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22697
+ exchangeRate?: number;
22693
22698
  /**
22694
- * @description Exchange rate provider when auto-update is enabled.
22699
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22695
22700
  * @enum {string}
22696
22701
  */
22697
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22698
- } | {
22699
- /** @description Exchange rate relative to the location main currency. */
22700
- exchangeRate: number;
22701
- });
22702
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22703
+ };
22702
22704
  };
22703
22705
  };
22704
22706
  };
@@ -31559,9 +31561,9 @@ interface operations {
31559
31561
  };
31560
31562
  getFeedPosts: {
31561
31563
  parameters: {
31562
- query: {
31563
- /** @description The id of the location. */
31564
- locationRef: string;
31564
+ query?: {
31565
+ /** @description UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
31566
+ locationRef?: string;
31565
31567
  /** @description Token to retrieve the next page of results. */
31566
31568
  nextPageToken?: components["schemas"]["nextPageToken"];
31567
31569
  /** @description The number of items to return. */
@@ -36665,8 +36667,8 @@ type Like = NonNullable<components["schemas"]["postLike"]>;
36665
36667
  type Post = NonNullable<components["schemas"]["post"]>;
36666
36668
  /** Query parameters for `sb.feed.posts.list()`. */
36667
36669
  interface GetFeedPostsQuery {
36668
- /** The id of the location. */
36669
- locationRef: string;
36670
+ /** UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
36671
+ locationRef?: string;
36670
36672
  /** Token to retrieve the next page of results. */
36671
36673
  nextPageToken?: string;
36672
36674
  /** The number of items to return. */
@@ -37353,12 +37355,12 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
37353
37355
  deleteLike(id: string, options?: SpacebringRequestOptions): Promise<undefined>;
37354
37356
  };
37355
37357
  posts: {
37356
- list(query: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37358
+ list(query?: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37357
37359
  nextPageToken?: string;
37358
37360
  posts?: Post[];
37359
37361
  searchQueryNext?: string;
37360
37362
  }>;
37361
- iterate(query: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37363
+ iterate(query?: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37362
37364
  get(id: string, options?: SpacebringRequestOptions): Promise<Post>;
37363
37365
  create(post: CreateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
37364
37366
  update(id: string, post: UpdateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
package/dist/index.js CHANGED
@@ -739,7 +739,7 @@ function createBenefits(client, defaults) {
739
739
  /**
740
740
  * Create a category
741
741
  *
742
- * Create a benefit category.
742
+ * Create a benefit category. A user needs the Settings permission in the location.
743
743
  */
744
744
  async create(category, options) {
745
745
  return unwrapProp(await client.POST("/benefits/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /benefits/categories/v1");
@@ -2359,7 +2359,7 @@ function createShop(client, defaults) {
2359
2359
  /**
2360
2360
  * Create a category
2361
2361
  *
2362
- * Create a shop category.
2362
+ * Create a shop category. A user needs the Settings permission in the location.
2363
2363
  */
2364
2364
  async create(category, options) {
2365
2365
  return unwrapProp(await client.POST("/shop/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /shop/categories/v1");