@schedulin/sdk 0.1.0 → 0.1.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 (35) hide show
  1. package/cjs/api/resources/media/client/Client.d.ts +2 -2
  2. package/cjs/api/resources/media/client/Client.js +3 -3
  3. package/cjs/api/resources/media/client/requests/ListMediaRequest.d.ts +1 -1
  4. package/cjs/api/resources/media/types/ListMediaResponse.d.ts +7 -0
  5. package/cjs/api/resources/media/types/index.d.ts +1 -1
  6. package/cjs/api/resources/media/types/index.js +1 -1
  7. package/cjs/api/resources/posts/client/Client.d.ts +4 -4
  8. package/cjs/api/resources/posts/client/Client.js +5 -5
  9. package/cjs/api/resources/posts/client/requests/{V0PostCountByTabRequest.d.ts → CountByTabPostsRequest.d.ts} +1 -1
  10. package/cjs/api/resources/posts/client/requests/index.d.ts +1 -1
  11. package/cjs/api/resources/tags/client/Client.d.ts +1 -3
  12. package/cjs/api/resources/tags/client/Client.js +1 -3
  13. package/cjs/api/resources/tags/client/requests/UpdateTagsRequest.d.ts +3 -5
  14. package/cjs/api/types/MediaSearch.d.ts +1 -5
  15. package/esm/api/resources/media/client/Client.d.mts +2 -2
  16. package/esm/api/resources/media/client/Client.mjs +3 -3
  17. package/esm/api/resources/media/client/requests/ListMediaRequest.d.mts +1 -1
  18. package/esm/api/resources/media/types/ListMediaResponse.d.mts +7 -0
  19. package/esm/api/resources/media/types/index.d.mts +1 -1
  20. package/esm/api/resources/media/types/index.mjs +1 -1
  21. package/esm/api/resources/posts/client/Client.d.mts +4 -4
  22. package/esm/api/resources/posts/client/Client.mjs +5 -5
  23. package/esm/api/resources/posts/client/requests/{V0PostCountByTabRequest.d.mts → CountByTabPostsRequest.d.mts} +1 -1
  24. package/esm/api/resources/posts/client/requests/index.d.mts +1 -1
  25. package/esm/api/resources/tags/client/Client.d.mts +1 -3
  26. package/esm/api/resources/tags/client/Client.mjs +1 -3
  27. package/esm/api/resources/tags/client/requests/UpdateTagsRequest.d.mts +3 -5
  28. package/esm/api/types/MediaSearch.d.mts +1 -5
  29. package/package.json +1 -1
  30. package/cjs/api/resources/media/types/ListMediaRequestCursor.d.ts +0 -4
  31. package/esm/api/resources/media/types/ListMediaRequestCursor.d.mts +0 -4
  32. /package/cjs/api/resources/media/types/{ListMediaRequestCursor.js → ListMediaResponse.js} +0 -0
  33. /package/cjs/api/resources/posts/client/requests/{V0PostCountByTabRequest.js → CountByTabPostsRequest.js} +0 -0
  34. /package/esm/api/resources/media/types/{ListMediaRequestCursor.mjs → ListMediaResponse.mjs} +0 -0
  35. /package/esm/api/resources/posts/client/requests/{V0PostCountByTabRequest.mjs → CountByTabPostsRequest.mjs} +0 -0
@@ -44,7 +44,7 @@ export declare class MediaClient {
44
44
  update(request: Schedulin.UpdateMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<Schedulin.Media>;
45
45
  private __update;
46
46
  /**
47
- * List media for the organization with cursor pagination, search, type and tag filters
47
+ * List media for the organization with page pagination, search, type and tag filters
48
48
  *
49
49
  * @param {Schedulin.ListMediaRequest} request
50
50
  * @param {MediaClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -55,7 +55,7 @@ export declare class MediaClient {
55
55
  * @example
56
56
  * await client.media.list()
57
57
  */
58
- list(request?: Schedulin.ListMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<unknown>;
58
+ list(request?: Schedulin.ListMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListMediaResponse>;
59
59
  private __list;
60
60
  /**
61
61
  * Replace the set of tags attached to a media item with the provided tag IDs
@@ -179,7 +179,7 @@ class MediaClient {
179
179
  });
180
180
  }
181
181
  /**
182
- * List media for the organization with cursor pagination, search, type and tag filters
182
+ * List media for the organization with page pagination, search, type and tag filters
183
183
  *
184
184
  * @param {Schedulin.ListMediaRequest} request
185
185
  * @param {MediaClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -196,9 +196,9 @@ class MediaClient {
196
196
  __list() {
197
197
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
198
198
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
199
- const { cursor, limit, q, type: type_, tagIds, tagMode } = request;
199
+ const { page, limit, q, type: type_, tagIds, tagMode } = request;
200
200
  const _queryParams = {
201
- cursor,
201
+ page,
202
202
  limit,
203
203
  q,
204
204
  type: type_ != null ? type_ : undefined,
@@ -4,7 +4,7 @@ import type * as Schedulin from "../../../../index.js";
4
4
  * {}
5
5
  */
6
6
  export interface ListMediaRequest {
7
- cursor?: Schedulin.ListMediaRequestCursor | null;
7
+ page?: number;
8
8
  limit?: number;
9
9
  q?: string;
10
10
  type?: Schedulin.ListMediaRequestType;
@@ -0,0 +1,7 @@
1
+ import type * as Schedulin from "../../../index.js";
2
+ export interface ListMediaResponse {
3
+ items: Schedulin.Media[];
4
+ page: number;
5
+ total: number;
6
+ totalPages: number;
7
+ }
@@ -1,4 +1,4 @@
1
1
  export * from "./CountByTagMediaResponse.js";
2
- export * from "./ListMediaRequestCursor.js";
3
2
  export * from "./ListMediaRequestTagMode.js";
4
3
  export * from "./ListMediaRequestType.js";
4
+ export * from "./ListMediaResponse.js";
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CountByTagMediaResponse.js"), exports);
18
- __exportStar(require("./ListMediaRequestCursor.js"), exports);
19
18
  __exportStar(require("./ListMediaRequestTagMode.js"), exports);
20
19
  __exportStar(require("./ListMediaRequestType.js"), exports);
20
+ __exportStar(require("./ListMediaResponse.js"), exports);
@@ -44,17 +44,17 @@ export declare class PostsClient {
44
44
  /**
45
45
  * Returns counts of posts for the Queue, Drafts, Approvals, and Sent tabs
46
46
  *
47
- * @param {Schedulin.V0PostCountByTabRequest} request
47
+ * @param {Schedulin.CountByTabPostsRequest} request
48
48
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
49
49
  *
50
50
  * @throws {@link Schedulin.UnauthorizedError}
51
51
  * @throws {@link Schedulin.InternalServerError}
52
52
  *
53
53
  * @example
54
- * await client.posts.v0PostCountByTab()
54
+ * await client.posts.countByTab()
55
55
  */
56
- v0PostCountByTab(request?: Schedulin.V0PostCountByTabRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<unknown>;
57
- private __v0PostCountByTab;
56
+ countByTab(request?: Schedulin.CountByTabPostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<unknown>;
57
+ private __countByTab;
58
58
  /**
59
59
  * Retrieve a single post by its ID with all relations
60
60
  *
@@ -192,19 +192,19 @@ class PostsClient {
192
192
  /**
193
193
  * Returns counts of posts for the Queue, Drafts, Approvals, and Sent tabs
194
194
  *
195
- * @param {Schedulin.V0PostCountByTabRequest} request
195
+ * @param {Schedulin.CountByTabPostsRequest} request
196
196
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
197
197
  *
198
198
  * @throws {@link Schedulin.UnauthorizedError}
199
199
  * @throws {@link Schedulin.InternalServerError}
200
200
  *
201
201
  * @example
202
- * await client.posts.v0PostCountByTab()
202
+ * await client.posts.countByTab()
203
203
  */
204
- v0PostCountByTab(request = {}, requestOptions) {
205
- return core.HttpResponsePromise.fromPromise(this.__v0PostCountByTab(request, requestOptions));
204
+ countByTab(request = {}, requestOptions) {
205
+ return core.HttpResponsePromise.fromPromise(this.__countByTab(request, requestOptions));
206
206
  }
207
- __v0PostCountByTab() {
207
+ __countByTab() {
208
208
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
209
209
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
210
210
  const { socialAccountIds } = request;
@@ -2,6 +2,6 @@
2
2
  * @example
3
3
  * {}
4
4
  */
5
- export interface V0PostCountByTabRequest {
5
+ export interface CountByTabPostsRequest {
6
6
  socialAccountIds?: string | string[];
7
7
  }
@@ -1,5 +1,6 @@
1
1
  export type { AnalyticsSeriesPostsRequest } from "./AnalyticsSeriesPostsRequest.js";
2
2
  export type { AnalyticsSummaryPostsRequest } from "./AnalyticsSummaryPostsRequest.js";
3
+ export type { CountByTabPostsRequest } from "./CountByTabPostsRequest.js";
3
4
  export type { DeletePostsRequest } from "./DeletePostsRequest.js";
4
5
  export type { GetJobStatusPostsRequest } from "./GetJobStatusPostsRequest.js";
5
6
  export type { ListPostsRequest } from "./ListPostsRequest.js";
@@ -8,4 +9,3 @@ export type { PublishDraftPostsRequest } from "./PublishDraftPostsRequest.js";
8
9
  export type { RetrievePostsRequest } from "./RetrievePostsRequest.js";
9
10
  export { UpdatePostsRequest } from "./UpdatePostsRequest.js";
10
11
  export type { UpdateTagsPostsRequest } from "./UpdateTagsPostsRequest.js";
11
- export type { V0PostCountByTabRequest } from "./V0PostCountByTabRequest.js";
@@ -52,9 +52,7 @@ export declare class TagsClient {
52
52
  *
53
53
  * @example
54
54
  * await client.tags.update({
55
- * id: "id",
56
- * name: "name",
57
- * color: "color"
55
+ * id: "id"
58
56
  * })
59
57
  */
60
58
  update(request: Schedulin.UpdateTagsRequest, requestOptions?: TagsClient.RequestOptions): core.HttpResponsePromise<Schedulin.Tag>;
@@ -194,9 +194,7 @@ class TagsClient {
194
194
  *
195
195
  * @example
196
196
  * await client.tags.update({
197
- * id: "id",
198
- * name: "name",
199
- * color: "color"
197
+ * id: "id"
200
198
  * })
201
199
  */
202
200
  update(request, requestOptions) {
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * id: "id",
5
- * name: "name",
6
- * color: "color"
4
+ * id: "id"
7
5
  * }
8
6
  */
9
7
  export interface UpdateTagsRequest {
10
8
  id: string;
11
- name: string;
12
- color: string;
9
+ name?: string;
10
+ color?: string;
13
11
  }
@@ -1,5 +1,5 @@
1
1
  export interface MediaSearch {
2
- cursor?: (MediaSearch.Cursor | null) | undefined;
2
+ page?: number | undefined;
3
3
  limit?: number | undefined;
4
4
  q?: string | undefined;
5
5
  type?: MediaSearch.Type | undefined;
@@ -7,10 +7,6 @@ export interface MediaSearch {
7
7
  tagMode?: MediaSearch.TagMode | undefined;
8
8
  }
9
9
  export declare namespace MediaSearch {
10
- interface Cursor {
11
- id: string;
12
- updatedAt: string;
13
- }
14
10
  const Type: {
15
11
  readonly Image: "image";
16
12
  readonly Video: "video";
@@ -44,7 +44,7 @@ export declare class MediaClient {
44
44
  update(request: Schedulin.UpdateMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<Schedulin.Media>;
45
45
  private __update;
46
46
  /**
47
- * List media for the organization with cursor pagination, search, type and tag filters
47
+ * List media for the organization with page pagination, search, type and tag filters
48
48
  *
49
49
  * @param {Schedulin.ListMediaRequest} request
50
50
  * @param {MediaClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -55,7 +55,7 @@ export declare class MediaClient {
55
55
  * @example
56
56
  * await client.media.list()
57
57
  */
58
- list(request?: Schedulin.ListMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<unknown>;
58
+ list(request?: Schedulin.ListMediaRequest, requestOptions?: MediaClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListMediaResponse>;
59
59
  private __list;
60
60
  /**
61
61
  * Replace the set of tags attached to a media item with the provided tag IDs
@@ -143,7 +143,7 @@ export class MediaClient {
143
143
  });
144
144
  }
145
145
  /**
146
- * List media for the organization with cursor pagination, search, type and tag filters
146
+ * List media for the organization with page pagination, search, type and tag filters
147
147
  *
148
148
  * @param {Schedulin.ListMediaRequest} request
149
149
  * @param {MediaClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -160,9 +160,9 @@ export class MediaClient {
160
160
  __list() {
161
161
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
162
162
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
163
- const { cursor, limit, q, type: type_, tagIds, tagMode } = request;
163
+ const { page, limit, q, type: type_, tagIds, tagMode } = request;
164
164
  const _queryParams = {
165
- cursor,
165
+ page,
166
166
  limit,
167
167
  q,
168
168
  type: type_ != null ? type_ : undefined,
@@ -4,7 +4,7 @@ import type * as Schedulin from "../../../../index.mjs";
4
4
  * {}
5
5
  */
6
6
  export interface ListMediaRequest {
7
- cursor?: Schedulin.ListMediaRequestCursor | null;
7
+ page?: number;
8
8
  limit?: number;
9
9
  q?: string;
10
10
  type?: Schedulin.ListMediaRequestType;
@@ -0,0 +1,7 @@
1
+ import type * as Schedulin from "../../../index.mjs";
2
+ export interface ListMediaResponse {
3
+ items: Schedulin.Media[];
4
+ page: number;
5
+ total: number;
6
+ totalPages: number;
7
+ }
@@ -1,4 +1,4 @@
1
1
  export * from "./CountByTagMediaResponse.mjs";
2
- export * from "./ListMediaRequestCursor.mjs";
3
2
  export * from "./ListMediaRequestTagMode.mjs";
4
3
  export * from "./ListMediaRequestType.mjs";
4
+ export * from "./ListMediaResponse.mjs";
@@ -1,4 +1,4 @@
1
1
  export * from "./CountByTagMediaResponse.mjs";
2
- export * from "./ListMediaRequestCursor.mjs";
3
2
  export * from "./ListMediaRequestTagMode.mjs";
4
3
  export * from "./ListMediaRequestType.mjs";
4
+ export * from "./ListMediaResponse.mjs";
@@ -44,17 +44,17 @@ export declare class PostsClient {
44
44
  /**
45
45
  * Returns counts of posts for the Queue, Drafts, Approvals, and Sent tabs
46
46
  *
47
- * @param {Schedulin.V0PostCountByTabRequest} request
47
+ * @param {Schedulin.CountByTabPostsRequest} request
48
48
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
49
49
  *
50
50
  * @throws {@link Schedulin.UnauthorizedError}
51
51
  * @throws {@link Schedulin.InternalServerError}
52
52
  *
53
53
  * @example
54
- * await client.posts.v0PostCountByTab()
54
+ * await client.posts.countByTab()
55
55
  */
56
- v0PostCountByTab(request?: Schedulin.V0PostCountByTabRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<unknown>;
57
- private __v0PostCountByTab;
56
+ countByTab(request?: Schedulin.CountByTabPostsRequest, requestOptions?: PostsClient.RequestOptions): core.HttpResponsePromise<unknown>;
57
+ private __countByTab;
58
58
  /**
59
59
  * Retrieve a single post by its ID with all relations
60
60
  *
@@ -156,19 +156,19 @@ export class PostsClient {
156
156
  /**
157
157
  * Returns counts of posts for the Queue, Drafts, Approvals, and Sent tabs
158
158
  *
159
- * @param {Schedulin.V0PostCountByTabRequest} request
159
+ * @param {Schedulin.CountByTabPostsRequest} request
160
160
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
161
161
  *
162
162
  * @throws {@link Schedulin.UnauthorizedError}
163
163
  * @throws {@link Schedulin.InternalServerError}
164
164
  *
165
165
  * @example
166
- * await client.posts.v0PostCountByTab()
166
+ * await client.posts.countByTab()
167
167
  */
168
- v0PostCountByTab(request = {}, requestOptions) {
169
- return core.HttpResponsePromise.fromPromise(this.__v0PostCountByTab(request, requestOptions));
168
+ countByTab(request = {}, requestOptions) {
169
+ return core.HttpResponsePromise.fromPromise(this.__countByTab(request, requestOptions));
170
170
  }
171
- __v0PostCountByTab() {
171
+ __countByTab() {
172
172
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
173
173
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
174
174
  const { socialAccountIds } = request;
@@ -2,6 +2,6 @@
2
2
  * @example
3
3
  * {}
4
4
  */
5
- export interface V0PostCountByTabRequest {
5
+ export interface CountByTabPostsRequest {
6
6
  socialAccountIds?: string | string[];
7
7
  }
@@ -1,5 +1,6 @@
1
1
  export type { AnalyticsSeriesPostsRequest } from "./AnalyticsSeriesPostsRequest.mjs";
2
2
  export type { AnalyticsSummaryPostsRequest } from "./AnalyticsSummaryPostsRequest.mjs";
3
+ export type { CountByTabPostsRequest } from "./CountByTabPostsRequest.mjs";
3
4
  export type { DeletePostsRequest } from "./DeletePostsRequest.mjs";
4
5
  export type { GetJobStatusPostsRequest } from "./GetJobStatusPostsRequest.mjs";
5
6
  export type { ListPostsRequest } from "./ListPostsRequest.mjs";
@@ -8,4 +9,3 @@ export type { PublishDraftPostsRequest } from "./PublishDraftPostsRequest.mjs";
8
9
  export type { RetrievePostsRequest } from "./RetrievePostsRequest.mjs";
9
10
  export { UpdatePostsRequest } from "./UpdatePostsRequest.mjs";
10
11
  export type { UpdateTagsPostsRequest } from "./UpdateTagsPostsRequest.mjs";
11
- export type { V0PostCountByTabRequest } from "./V0PostCountByTabRequest.mjs";
@@ -52,9 +52,7 @@ export declare class TagsClient {
52
52
  *
53
53
  * @example
54
54
  * await client.tags.update({
55
- * id: "id",
56
- * name: "name",
57
- * color: "color"
55
+ * id: "id"
58
56
  * })
59
57
  */
60
58
  update(request: Schedulin.UpdateTagsRequest, requestOptions?: TagsClient.RequestOptions): core.HttpResponsePromise<Schedulin.Tag>;
@@ -158,9 +158,7 @@ export class TagsClient {
158
158
  *
159
159
  * @example
160
160
  * await client.tags.update({
161
- * id: "id",
162
- * name: "name",
163
- * color: "color"
161
+ * id: "id"
164
162
  * })
165
163
  */
166
164
  update(request, requestOptions) {
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * id: "id",
5
- * name: "name",
6
- * color: "color"
4
+ * id: "id"
7
5
  * }
8
6
  */
9
7
  export interface UpdateTagsRequest {
10
8
  id: string;
11
- name: string;
12
- color: string;
9
+ name?: string;
10
+ color?: string;
13
11
  }
@@ -1,5 +1,5 @@
1
1
  export interface MediaSearch {
2
- cursor?: (MediaSearch.Cursor | null) | undefined;
2
+ page?: number | undefined;
3
3
  limit?: number | undefined;
4
4
  q?: string | undefined;
5
5
  type?: MediaSearch.Type | undefined;
@@ -7,10 +7,6 @@ export interface MediaSearch {
7
7
  tagMode?: MediaSearch.TagMode | undefined;
8
8
  }
9
9
  export declare namespace MediaSearch {
10
- interface Cursor {
11
- id: string;
12
- updatedAt: string;
13
- }
14
10
  const Type: {
15
11
  readonly Image: "image";
16
12
  readonly Video: "video";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schedulin/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official TypeScript SDK for the Schedulin API (schedulin.app)",
5
5
  "keywords": [
6
6
  "schedulin",
@@ -1,4 +0,0 @@
1
- export interface ListMediaRequestCursor {
2
- id: string;
3
- updatedAt: string;
4
- }
@@ -1,4 +0,0 @@
1
- export interface ListMediaRequestCursor {
2
- id: string;
3
- updatedAt: string;
4
- }