dub 0.1.0 → 0.3.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +43 -23
  3. package/core.d.ts +3 -1
  4. package/core.d.ts.map +1 -1
  5. package/core.js +21 -11
  6. package/core.js.map +1 -1
  7. package/core.mjs +21 -11
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +9 -5
  10. package/index.d.ts +9 -5
  11. package/index.d.ts.map +1 -1
  12. package/index.js +11 -8
  13. package/index.js.map +1 -1
  14. package/index.mjs +11 -8
  15. package/index.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/index.d.ts +1 -1
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js.map +1 -1
  20. package/resources/index.mjs +1 -1
  21. package/resources/index.mjs.map +1 -1
  22. package/resources/links/bulk.d.ts +1 -1
  23. package/resources/links/bulk.d.ts.map +1 -1
  24. package/resources/links/bulk.js +1 -1
  25. package/resources/links/bulk.js.map +1 -1
  26. package/resources/links/bulk.mjs +1 -1
  27. package/resources/links/bulk.mjs.map +1 -1
  28. package/resources/links/info.d.ts +2 -2
  29. package/resources/links/info.d.ts.map +1 -1
  30. package/resources/links/info.js +3 -2
  31. package/resources/links/info.js.map +1 -1
  32. package/resources/links/info.mjs +3 -2
  33. package/resources/links/info.mjs.map +1 -1
  34. package/resources/links/links.d.ts +5 -5
  35. package/resources/links/links.d.ts.map +1 -1
  36. package/resources/links/links.js +6 -5
  37. package/resources/links/links.js.map +1 -1
  38. package/resources/links/links.mjs +6 -5
  39. package/resources/links/links.mjs.map +1 -1
  40. package/resources/projects/index.d.ts +2 -2
  41. package/resources/projects/index.d.ts.map +1 -1
  42. package/resources/projects/index.js.map +1 -1
  43. package/resources/projects/index.mjs.map +1 -1
  44. package/resources/projects/projects.d.ts +10 -1
  45. package/resources/projects/projects.d.ts.map +1 -1
  46. package/resources/projects/projects.js +2 -1
  47. package/resources/projects/projects.js.map +1 -1
  48. package/resources/projects/projects.mjs +2 -1
  49. package/resources/projects/projects.mjs.map +1 -1
  50. package/resources/projects/tags.d.ts +16 -3
  51. package/resources/projects/tags.d.ts.map +1 -1
  52. package/resources/projects/tags.js +4 -2
  53. package/resources/projects/tags.js.map +1 -1
  54. package/resources/projects/tags.mjs +4 -2
  55. package/resources/projects/tags.mjs.map +1 -1
  56. package/src/core.ts +25 -15
  57. package/src/index.ts +19 -11
  58. package/src/resources/index.ts +7 -1
  59. package/src/resources/links/bulk.ts +2 -2
  60. package/src/resources/links/info.ts +4 -3
  61. package/src/resources/links/links.ts +10 -9
  62. package/src/resources/projects/index.ts +2 -2
  63. package/src/resources/projects/projects.ts +12 -1
  64. package/src/resources/projects/tags.ts +20 -3
  65. package/src/version.ts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
@@ -11,7 +11,8 @@ export class Projects extends APIResource {
11
11
  /**
12
12
  * Retrieve a project for the authenticated user.
13
13
  */
14
- retrieve(projectSlug: string, options?: Core.RequestOptions): Core.APIPromise<ProjectDetails> {
14
+ retrieve(params: ProjectRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ProjectDetails> {
15
+ const { projectSlug = this._client.projectSlug } = params;
15
16
  return this._client.get(`/projects/${projectSlug}`, options);
16
17
  }
17
18
 
@@ -111,12 +112,22 @@ export namespace ProjectDetails {
111
112
 
112
113
  export type ProjectListResponse = Array<Project>;
113
114
 
115
+ export interface ProjectRetrieveParams {
116
+ /**
117
+ * The slug for the project to retrieve. E.g. for app.dub.co/acme, the projectSlug
118
+ * is 'acme'.
119
+ */
120
+ projectSlug?: string;
121
+ }
122
+
114
123
  export namespace Projects {
115
124
  export import Project = ProjectsAPI.Project;
116
125
  export import ProjectDetails = ProjectsAPI.ProjectDetails;
117
126
  export import ProjectListResponse = ProjectsAPI.ProjectListResponse;
127
+ export import ProjectRetrieveParams = ProjectsAPI.ProjectRetrieveParams;
118
128
  export import Tags = TagsAPI.Tags;
119
129
  export import Tag = TagsAPI.Tag;
120
130
  export import TagListResponse = TagsAPI.TagListResponse;
121
131
  export import TagCreateParams = TagsAPI.TagCreateParams;
132
+ export import TagListParams = TagsAPI.TagListParams;
122
133
  }
@@ -8,14 +8,16 @@ export class Tags extends APIResource {
8
8
  /**
9
9
  * Create a new tag for the authenticated project.
10
10
  */
11
- create(projectSlug: string, body: TagCreateParams, options?: Core.RequestOptions): Core.APIPromise<Tag> {
11
+ create(params: TagCreateParams, options?: Core.RequestOptions): Core.APIPromise<Tag> {
12
+ const { projectSlug = this._client.projectSlug, ...body } = params;
12
13
  return this._client.post(`/projects/${projectSlug}/tags`, { body, ...options });
13
14
  }
14
15
 
15
16
  /**
16
17
  * Retrieve a list of tags for the authenticated project.
17
18
  */
18
- list(projectSlug: string, options?: Core.RequestOptions): Core.APIPromise<TagListResponse> {
19
+ list(params: TagListParams, options?: Core.RequestOptions): Core.APIPromise<TagListResponse> {
20
+ const { projectSlug = this._client.projectSlug } = params;
19
21
  return this._client.get(`/projects/${projectSlug}/tags`, options);
20
22
  }
21
23
  }
@@ -41,13 +43,28 @@ export type TagListResponse = Array<Tag>;
41
43
 
42
44
  export interface TagCreateParams {
43
45
  /**
44
- * The name of the tag to create.
46
+ * Path param: The slug for the project to create tags for. E.g. for
47
+ * app.dub.co/acme, the projectSlug is 'acme'.
48
+ */
49
+ projectSlug?: string;
50
+
51
+ /**
52
+ * Body param: The name of the tag to create.
45
53
  */
46
54
  tag?: string;
47
55
  }
48
56
 
57
+ export interface TagListParams {
58
+ /**
59
+ * The slug for the project to retrieve tags for. E.g. for app.dub.co/acme, the
60
+ * projectSlug is 'acme'.
61
+ */
62
+ projectSlug?: string;
63
+ }
64
+
49
65
  export namespace Tags {
50
66
  export import Tag = TagsAPI.Tag;
51
67
  export import TagListResponse = TagsAPI.TagListResponse;
52
68
  export import TagCreateParams = TagsAPI.TagCreateParams;
69
+ export import TagListParams = TagsAPI.TagListParams;
53
70
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0'; // x-release-please-version
1
+ export const VERSION = '0.3.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0";
1
+ export declare const VERSION = "0.3.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0'; // x-release-please-version
4
+ exports.VERSION = '0.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0'; // x-release-please-version
1
+ export const VERSION = '0.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map