@knpkv/jira-api-client 1.0.0 → 1.1.1

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.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { JiraApiClient, type JiraApiClientShape, layer, make, type UploadAttachmentInput } from "./JiraApiClient.js";
7
- export { JiraApiConfig, type JiraApiConfigShape } from "./JiraApiConfig.js";
6
+ export { JiraApiClient, type JiraApiClientContract, layer, make, type UploadAttachmentInput } from "./JiraApiClient.js";
7
+ export { JiraApiConfig, type JiraApiConfigContract } from "./JiraApiConfig.js";
8
8
  export * as JiraApi from "./generated/JiraApi.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAEpH,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE3E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,qBAAqB,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAEvH,OAAO,EAAE,aAAa,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE9E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAA2B,KAAK,EAAE,IAAI,EAA8B,MAAM,oBAAoB,CAAA;AAEpH,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAA;AAE3E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAA8B,KAAK,EAAE,IAAI,EAA8B,MAAM,oBAAoB,CAAA;AAEvH,OAAO,EAAE,aAAa,EAA8B,MAAM,oBAAoB,CAAA;AAE9E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/jira-api-client",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Effect-based Jira Cloud REST API v3 client",
5
5
  "license": "MIT",
6
6
  "author": "knpkv",
@@ -39,17 +39,17 @@
39
39
  "access": "public"
40
40
  },
41
41
  "peerDependencies": {
42
- "effect": "4.0.0-beta.98"
42
+ "effect": "4.0.0-rc.109"
43
43
  },
44
44
  "devDependencies": {
45
- "@effect/openapi-generator": "4.0.0-beta.98",
46
- "@effect/platform-node": "4.0.0-beta.98",
47
- "@effect/vitest": "4.0.0-beta.98",
45
+ "@effect/openapi-generator": "4.0.0-rc.109",
46
+ "@effect/platform-node": "4.0.0-rc.109",
47
+ "@effect/vitest": "4.0.0-rc.109",
48
48
  "@types/node": "latest",
49
- "effect": "4.0.0-beta.98",
50
- "prettier": "^3.9.5",
51
- "tsx": "^4.23.0",
52
- "typescript": "~6.0.3",
49
+ "effect": "4.0.0-rc.109",
50
+ "prettier": "^3.9.6",
51
+ "tsx": "^4.23.12",
52
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
53
53
  "vitest": "^4.1.10"
54
54
  },
55
55
  "keywords": [
@@ -19,7 +19,7 @@ import type * as HttpClientError from "effect/unstable/http/HttpClientError"
19
19
  import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"
20
20
  import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"
21
21
  import * as Generated from "./generated/JiraApi.js"
22
- import { JiraApiConfig, type JiraApiConfigShape } from "./JiraApiConfig.js"
22
+ import { JiraApiConfig, type JiraApiConfigContract } from "./JiraApiConfig.js"
23
23
 
24
24
  export interface UploadAttachmentInput {
25
25
  readonly bytes: Uint8Array
@@ -27,26 +27,26 @@ export interface UploadAttachmentInput {
27
27
  readonly mediaType?: string | undefined
28
28
  }
29
29
 
30
- export interface JiraApiClientShape extends Generated.JiraApi {
30
+ export interface JiraApiClientContract extends Generated.JiraApi {
31
31
  readonly uploadAttachment: (
32
32
  issueIdOrKey: string,
33
33
  input: UploadAttachmentInput
34
34
  ) => Effect.Effect<Generated.AddAttachment200, HttpClientError.HttpClientError | SchemaError>
35
35
  }
36
36
 
37
- const authorizationHeader = (config: JiraApiConfigShape): string =>
37
+ const authorizationHeader = (config: JiraApiConfigContract): string =>
38
38
  config.auth.type === "basic"
39
39
  ? `Basic ${Encoding.encodeBase64(`${config.auth.email}:${Redacted.value(config.auth.apiToken)}`)}`
40
40
  : `Bearer ${Redacted.value(config.auth.accessToken)}`
41
41
 
42
- const apiBaseUrl = (config: JiraApiConfigShape): string =>
42
+ const apiBaseUrl = (config: JiraApiConfigContract): string =>
43
43
  config.auth.type === "oauth2"
44
44
  ? `https://api.atlassian.com/ex/jira/${config.auth.cloudId}`
45
45
  : config.baseUrl
46
46
 
47
47
  export const make = (
48
48
  httpClient: HttpClient.HttpClient,
49
- config: JiraApiConfigShape
49
+ config: JiraApiConfigContract
50
50
  ): Generated.JiraApi =>
51
51
  Generated.make(httpClient.pipe(
52
52
  HttpClient.mapRequest(flow(
@@ -57,7 +57,7 @@ export const make = (
57
57
  ))
58
58
 
59
59
  const makeUploadAttachment =
60
- (api: Generated.JiraApi): JiraApiClientShape["uploadAttachment"] => (issueIdOrKey, input) => {
60
+ (api: Generated.JiraApi): JiraApiClientContract["uploadAttachment"] => (issueIdOrKey, input) => {
61
61
  const buffer = new ArrayBuffer(input.bytes.byteLength)
62
62
  new Uint8Array(buffer).set(input.bytes)
63
63
  const form = new FormData()
@@ -77,7 +77,7 @@ const makeUploadAttachment =
77
77
  )
78
78
  }
79
79
 
80
- export class JiraApiClient extends Context.Service<JiraApiClient, JiraApiClientShape>()(
80
+ export class JiraApiClient extends Context.Service<JiraApiClient, JiraApiClientContract>()(
81
81
  "@knpkv/jira-api-client/JiraApiClient"
82
82
  ) {
83
83
  static readonly layer: Layer.Layer<
@@ -18,7 +18,7 @@ import type * as Redacted from "effect/Redacted"
18
18
  *
19
19
  * @category Config
20
20
  */
21
- export interface JiraApiConfigShape {
21
+ export interface JiraApiConfigContract {
22
22
  readonly baseUrl: string
23
23
  readonly auth:
24
24
  | { readonly type: "basic"; readonly email: string; readonly apiToken: Redacted.Redacted<string> }
@@ -46,6 +46,6 @@ export interface JiraApiConfigShape {
46
46
  *
47
47
  * @category Config
48
48
  */
49
- export class JiraApiConfig extends Context.Service<JiraApiConfig, JiraApiConfigShape>()(
49
+ export class JiraApiConfig extends Context.Service<JiraApiConfig, JiraApiConfigContract>()(
50
50
  "@knpkv/jira-api-client/JiraApiConfig"
51
51
  ) {}
@@ -148,8 +148,8 @@ export type CreatePriorityDetails = { readonly "avatarId"?: number, readonly "de
148
148
  export const CreatePriorityDetails = Schema.Struct({ "avatarId": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID for the avatar for the priority. Either the iconUrl or avatarId must be defined, but not both. This parameter is nullable and will become mandatory once the iconUrl parameter is deprecated.", "writeOnly": true, "format": "int64" }).check(Schema.isInt())), "description": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxLength(255, { "description": "The description of the priority.", "writeOnly": true }))])), "iconUrl": Schema.optionalKey(Schema.Union([Schema.Literals(["/images/icons/priorities/blocker.png", "/images/icons/priorities/critical.png", "/images/icons/priorities/high.png", "/images/icons/priorities/highest.png", "/images/icons/priorities/low.png", "/images/icons/priorities/lowest.png", "/images/icons/priorities/major.png", "/images/icons/priorities/medium.png", "/images/icons/priorities/minor.png", "/images/icons/priorities/trivial.png", "/images/icons/priorities/blocker_new.png", "/images/icons/priorities/critical_new.png", "/images/icons/priorities/high_new.png", "/images/icons/priorities/highest_new.png", "/images/icons/priorities/low_new.png", "/images/icons/priorities/lowest_new.png", "/images/icons/priorities/major_new.png", "/images/icons/priorities/medium_new.png", "/images/icons/priorities/minor_new.png", "/images/icons/priorities/trivial_new.png"]).annotate({ "description": "The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Either the iconUrl or avatarId must be defined, but not both.", "writeOnly": true }), Schema.Union([Schema.Null]).annotate({ "description": "The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Either the iconUrl or avatarId must be defined, but not both.", "writeOnly": true })])), "name": Schema.String.annotate({ "description": "The name of the priority. Must be unique.", "writeOnly": true }).check(Schema.isMaxLength(60)), "statusColor": Schema.String.annotate({ "description": "The status color of the priority in 3-digit or 6-digit hexadecimal format.", "writeOnly": true }) }).annotate({ "description": "Details of an issue priority." })
149
149
  export type CreatePrioritySchemeDetails = { readonly "defaultPriorityId": number, readonly "description"?: string, readonly "mappings"?: { readonly "in"?: { readonly [x: string]: number }, readonly "out"?: { readonly [x: string]: number } }, readonly "name": string, readonly "priorityIds": ReadonlyArray<number>, readonly "projectIds"?: ReadonlyArray<number> }
150
150
  export const CreatePrioritySchemeDetails = Schema.Struct({ "defaultPriorityId": Schema.Number.annotate({ "description": "The ID of the default priority for the priority scheme.", "writeOnly": true, "format": "int64" }).check(Schema.isInt()), "description": Schema.optionalKey(Schema.String.annotate({ "description": "The description of the priority scheme.", "writeOnly": true }).check(Schema.isMaxLength(4000))), "mappings": Schema.optionalKey(Schema.Struct({ "in": Schema.optionalKey(Schema.Record(Schema.String, Schema.Number.annotate({ "writeOnly": true, "format": "int64" }).check(Schema.isInt())).annotate({ "description": "The mapping of priorities for issues being migrated **into** this priority scheme. Key is the old priority ID, value is the new priority ID (must exist in this priority scheme).\n\nE.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10000` are being migrated into this priority scheme will need mapping to new priorities. The `in` mapping would be `{\"10000\": 10001}`.", "writeOnly": true })), "out": Schema.optionalKey(Schema.Record(Schema.String, Schema.Number.annotate({ "writeOnly": true, "format": "int64" }).check(Schema.isInt())).annotate({ "description": "The mapping of priorities for issues being migrated **out of** this priority scheme. Key is the old priority ID (must exist in this priority scheme), value is the new priority ID (must exist in the default priority scheme). Required for updating an existing priority scheme. Not used when creating a new priority scheme.\n\nE.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10001` are being migrated out of this priority scheme will need mapping to new priorities. The `out` mapping would be `{\"10001\": 10000}`.", "writeOnly": true })) }).annotate({ "description": "Mapping of issue priorities for changes in priority schemes.", "writeOnly": true })), "name": Schema.String.annotate({ "description": "The name of the priority scheme. Must be unique.", "writeOnly": true }).check(Schema.isMaxLength(255)), "priorityIds": Schema.Array(Schema.Number.annotate({ "writeOnly": true, "format": "int64" }).check(Schema.isInt())).annotate({ "description": "The IDs of priorities in the scheme.", "writeOnly": true }), "projectIds": Schema.optionalKey(Schema.Array(Schema.Number.annotate({ "writeOnly": true, "format": "int64" }).check(Schema.isInt())).annotate({ "description": "The IDs of projects that will use the priority scheme.", "writeOnly": true }).check(Schema.isUnique())) }).annotate({ "description": "Details of a new priority scheme" })
151
- export type CreateProjectDetails = { readonly "assigneeType"?: "PROJECT_LEAD" | "UNASSIGNED", readonly "avatarId"?: number, readonly "categoryId"?: number, readonly "description"?: string, readonly "fieldConfigurationScheme"?: number, readonly "fieldScheme"?: number, readonly "issueSecurityScheme"?: number, readonly "issueTypeScheme"?: number, readonly "issueTypeScreenScheme"?: number, readonly "key": string, readonly "lead"?: string, readonly "leadAccountId"?: string, readonly "name": string, readonly "notificationScheme"?: number, readonly "permissionScheme"?: number, readonly "projectTemplateKey"?: "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban" | "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum" | "com.pyxis.greenhopper.jira:gh-simplified-basic" | "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic" | "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic" | "com.pyxis.greenhopper.jira:gh-cross-team-template" | "com.pyxis.greenhopper.jira:gh-cross-team-planning-template" | "com.atlassian.servicedesk:simplified-it-service-management" | "com.atlassian.servicedesk:simplified-it-service-management-basic" | "com.atlassian.servicedesk:simplified-it-service-management-operations" | "com.atlassian.servicedesk:simplified-internal-service-desk" | "com.atlassian.servicedesk:simplified-external-service-desk" | "com.atlassian.servicedesk:simplified-hr-service-desk" | "com.atlassian.servicedesk:simplified-facilities-service-desk" | "com.atlassian.servicedesk:simplified-legal-service-desk" | "com.atlassian.servicedesk:simplified-marketing-service-desk" | "com.atlassian.servicedesk:simplified-finance-service-desk" | "com.atlassian.servicedesk:simplified-analytics-service-desk" | "com.atlassian.servicedesk:simplified-design-service-desk" | "com.atlassian.servicedesk:simplified-sales-service-desk" | "com.atlassian.servicedesk:simplified-halp-service-desk" | "com.atlassian.servicedesk:next-gen-it-service-desk" | "com.atlassian.servicedesk:next-gen-hr-service-desk" | "com.atlassian.servicedesk:next-gen-legal-service-desk" | "com.atlassian.servicedesk:next-gen-marketing-service-desk" | "com.atlassian.servicedesk:next-gen-facilities-service-desk" | "com.atlassian.servicedesk:next-gen-general-service-desk" | "com.atlassian.servicedesk:next-gen-analytics-service-desk" | "com.atlassian.servicedesk:next-gen-finance-service-desk" | "com.atlassian.servicedesk:next-gen-design-service-desk" | "com.atlassian.servicedesk:next-gen-sales-service-desk" | "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval" | "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking" | "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control" | "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement" | "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment" | "com.atlassian.jira-core-project-templates:jira-core-simplified-task-" | "com.atlassian.jcs:customer-service-management", readonly "projectTypeKey"?: "software" | "service_desk" | "business", readonly "url"?: string, readonly "workflowScheme"?: number }
152
- export const CreateProjectDetails = Schema.Struct({ "assigneeType": Schema.optionalKey(Schema.Literals(["PROJECT_LEAD", "UNASSIGNED"]).annotate({ "description": "The default assignee when creating issues for this project." })), "avatarId": Schema.optionalKey(Schema.Number.annotate({ "description": "An integer value for the project's avatar.", "format": "int64" }).check(Schema.isInt())), "categoryId": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation.", "format": "int64" }).check(Schema.isInt())), "description": Schema.optionalKey(Schema.String.annotate({ "description": "A brief description of the project." })), "fieldConfigurationScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "Deprecated use [fieldScheme](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes/#api-group-field-schemes) instead. The ID of the field configuration scheme for the project. Use the [Get all field configuration schemes](#api-rest-api-3-fieldconfigurationscheme-get) operation to get a list of field configuration scheme IDs. If you specify the field configuration scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "fieldScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the field scheme for the project. Use the [Get field schemes](#api-rest-api-3-config-fieldschemes-get) operation to get a list of field scheme IDs. If you specify the field scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "issueSecurityScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) resource to get all issue security scheme IDs.", "format": "int64" }).check(Schema.isInt())), "issueTypeScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue type scheme for the project. Use the [Get all issue type schemes](#api-rest-api-3-issuetypescheme-get) operation to get a list of issue type scheme IDs. If you specify the issue type scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "issueTypeScreenScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue type screen scheme for the project. Use the [Get all issue type screen schemes](#api-rest-api-3-issuetypescreenscheme-get) operation to get a list of issue type screen scheme IDs. If you specify the issue type screen scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "key": Schema.String.annotate({ "description": "Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 characters." }), "lead": Schema.optionalKey(Schema.String.annotate({ "description": "This parameter is deprecated because of privacy changes. Use `leadAccountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. The user name of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `leadAccountId`." })), "leadAccountId": Schema.optionalKey(Schema.String.annotate({ "description": "The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `lead`." }).check(Schema.isMaxLength(128))), "name": Schema.String.annotate({ "description": "The name of the project." }), "notificationScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the notification scheme for the project. Use the [Get notification schemes](#api-rest-api-3-notificationscheme-get) resource to get a list of notification scheme IDs.", "format": "int64" }).check(Schema.isInt())), "permissionScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the permission scheme for the project. Use the [Get all permission schemes](#api-rest-api-3-permissionscheme-get) resource to see a list of all permission scheme IDs.", "format": "int64" }).check(Schema.isInt())), "projectTemplateKey": Schema.optionalKey(Schema.Literals(["com.pyxis.greenhopper.jira:gh-simplified-agility-kanban", "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum", "com.pyxis.greenhopper.jira:gh-simplified-basic", "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic", "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic", "com.pyxis.greenhopper.jira:gh-cross-team-template", "com.pyxis.greenhopper.jira:gh-cross-team-planning-template", "com.atlassian.servicedesk:simplified-it-service-management", "com.atlassian.servicedesk:simplified-it-service-management-basic", "com.atlassian.servicedesk:simplified-it-service-management-operations", "com.atlassian.servicedesk:simplified-internal-service-desk", "com.atlassian.servicedesk:simplified-external-service-desk", "com.atlassian.servicedesk:simplified-hr-service-desk", "com.atlassian.servicedesk:simplified-facilities-service-desk", "com.atlassian.servicedesk:simplified-legal-service-desk", "com.atlassian.servicedesk:simplified-marketing-service-desk", "com.atlassian.servicedesk:simplified-finance-service-desk", "com.atlassian.servicedesk:simplified-analytics-service-desk", "com.atlassian.servicedesk:simplified-design-service-desk", "com.atlassian.servicedesk:simplified-sales-service-desk", "com.atlassian.servicedesk:simplified-halp-service-desk", "com.atlassian.servicedesk:next-gen-it-service-desk", "com.atlassian.servicedesk:next-gen-hr-service-desk", "com.atlassian.servicedesk:next-gen-legal-service-desk", "com.atlassian.servicedesk:next-gen-marketing-service-desk", "com.atlassian.servicedesk:next-gen-facilities-service-desk", "com.atlassian.servicedesk:next-gen-general-service-desk", "com.atlassian.servicedesk:next-gen-analytics-service-desk", "com.atlassian.servicedesk:next-gen-finance-service-desk", "com.atlassian.servicedesk:next-gen-design-service-desk", "com.atlassian.servicedesk:next-gen-sales-service-desk", "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management", "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval", "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking", "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control", "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement", "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management", "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment", "com.atlassian.jira-core-project-templates:jira-core-simplified-task-", "com.atlassian.jcs:customer-service-management"]).annotate({ "description": "A predefined configuration for a project. The type of the `projectTemplateKey` must match with the type of the `projectTypeKey`." })), "projectTypeKey": Schema.optionalKey(Schema.Literals(["software", "service_desk", "business"]).annotate({ "description": "The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which defines the application-specific feature set. If you don't specify the project template you have to specify the project type." })), "url": Schema.optionalKey(Schema.String.annotate({ "description": "A link to information about this project, such as project documentation" })), "workflowScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the workflow scheme for the project. Use the [Get all workflow schemes](#api-rest-api-3-workflowscheme-get) operation to get a list of workflow scheme IDs. If you specify the workflow scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())) }).annotate({ "description": "Details about the project." })
151
+ export type CreateProjectDetails = { readonly "assigneeType"?: "PROJECT_LEAD" | "UNASSIGNED", readonly "avatarId"?: number, readonly "categoryId"?: number, readonly "description"?: string, readonly "fieldConfigurationScheme"?: number, readonly "fieldScheme"?: number, readonly "issueSecurityScheme"?: number, readonly "issueTypeScheme"?: number, readonly "issueTypeScreenScheme"?: number, readonly "key": string, readonly "lead"?: string, readonly "leadAccountId"?: string, readonly "name": string, readonly "notificationScheme"?: number, readonly "permissionScheme"?: number, readonly "projectTemplateKey"?: "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban" | "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum" | "com.pyxis.greenhopper.jira:gh-simplified-basic" | "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic" | "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic" | "com.pyxis.greenhopper.jira:gh-cross-team-template" | "com.pyxis.greenhopper.jira:gh-cross-team-planning-template" | "com.atlassian.servicedesk:simplified-it-service-management" | "com.atlassian.servicedesk:simplified-it-service-management-basic" | "com.atlassian.servicedesk:simplified-it-service-management-operations" | "com.atlassian.servicedesk:simplified-internal-service-desk" | "com.atlassian.servicedesk:simplified-external-service-desk" | "com.atlassian.servicedesk:simplified-hr-service-desk" | "com.atlassian.servicedesk:simplified-facilities-service-desk" | "com.atlassian.servicedesk:simplified-legal-service-desk" | "com.atlassian.servicedesk:simplified-marketing-service-desk" | "com.atlassian.servicedesk:simplified-finance-service-desk" | "com.atlassian.servicedesk:simplified-analytics-service-desk" | "com.atlassian.servicedesk:simplified-design-service-desk" | "com.atlassian.servicedesk:simplified-sales-service-desk" | "com.atlassian.servicedesk:simplified-halp-service-desk" | "com.atlassian.servicedesk:next-gen-it-service-desk" | "com.atlassian.servicedesk:next-gen-hr-service-desk" | "com.atlassian.servicedesk:next-gen-legal-service-desk" | "com.atlassian.servicedesk:next-gen-marketing-service-desk" | "com.atlassian.servicedesk:next-gen-facilities-service-desk" | "com.atlassian.servicedesk:next-gen-analytics-service-desk" | "com.atlassian.servicedesk:next-gen-finance-service-desk" | "com.atlassian.servicedesk:next-gen-design-service-desk" | "com.atlassian.servicedesk:next-gen-sales-service-desk" | "com.atlassian.servicedesk:company-managed-blank-service-project" | "com.atlassian.servicedesk:company-managed-general-service-project" | "com.atlassian.servicedesk:team-managed-general-service-project" | "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval" | "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking" | "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control" | "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement" | "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment" | "com.atlassian.jira-core-project-templates:jira-core-simplified-task-" | "com.atlassian.jcs:customer-service-management", readonly "projectTypeKey"?: "software" | "service_desk" | "business", readonly "url"?: string, readonly "workflowScheme"?: number }
152
+ export const CreateProjectDetails = Schema.Struct({ "assigneeType": Schema.optionalKey(Schema.Literals(["PROJECT_LEAD", "UNASSIGNED"]).annotate({ "description": "The default assignee when creating issues for this project." })), "avatarId": Schema.optionalKey(Schema.Number.annotate({ "description": "An integer value for the project's avatar.", "format": "int64" }).check(Schema.isInt())), "categoryId": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation.", "format": "int64" }).check(Schema.isInt())), "description": Schema.optionalKey(Schema.String.annotate({ "description": "A brief description of the project." })), "fieldConfigurationScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "Deprecated use [fieldScheme](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes/#api-group-field-schemes) instead. The ID of the field configuration scheme for the project. Use the [Get all field configuration schemes](#api-rest-api-3-fieldconfigurationscheme-get) operation to get a list of field configuration scheme IDs. If you specify the field configuration scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "fieldScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the field scheme for the project. Use the [Get field schemes](#api-rest-api-3-config-fieldschemes-get) operation to get a list of field scheme IDs. If you specify the field scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "issueSecurityScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) resource to get all issue security scheme IDs.", "format": "int64" }).check(Schema.isInt())), "issueTypeScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue type scheme for the project. Use the [Get all issue type schemes](#api-rest-api-3-issuetypescheme-get) operation to get a list of issue type scheme IDs. If you specify the issue type scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "issueTypeScreenScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the issue type screen scheme for the project. Use the [Get all issue type screen schemes](#api-rest-api-3-issuetypescreenscheme-get) operation to get a list of issue type screen scheme IDs. If you specify the issue type screen scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())), "key": Schema.String.annotate({ "description": "Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 characters." }), "lead": Schema.optionalKey(Schema.String.annotate({ "description": "This parameter is deprecated because of privacy changes. Use `leadAccountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. The user name of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `leadAccountId`." })), "leadAccountId": Schema.optionalKey(Schema.String.annotate({ "description": "The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `lead`." }).check(Schema.isMaxLength(128))), "name": Schema.String.annotate({ "description": "The name of the project." }), "notificationScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the notification scheme for the project. Use the [Get notification schemes](#api-rest-api-3-notificationscheme-get) resource to get a list of notification scheme IDs.", "format": "int64" }).check(Schema.isInt())), "permissionScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the permission scheme for the project. Use the [Get all permission schemes](#api-rest-api-3-permissionscheme-get) resource to see a list of all permission scheme IDs.", "format": "int64" }).check(Schema.isInt())), "projectTemplateKey": Schema.optionalKey(Schema.Literals(["com.pyxis.greenhopper.jira:gh-simplified-agility-kanban", "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum", "com.pyxis.greenhopper.jira:gh-simplified-basic", "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic", "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic", "com.pyxis.greenhopper.jira:gh-cross-team-template", "com.pyxis.greenhopper.jira:gh-cross-team-planning-template", "com.atlassian.servicedesk:simplified-it-service-management", "com.atlassian.servicedesk:simplified-it-service-management-basic", "com.atlassian.servicedesk:simplified-it-service-management-operations", "com.atlassian.servicedesk:simplified-internal-service-desk", "com.atlassian.servicedesk:simplified-external-service-desk", "com.atlassian.servicedesk:simplified-hr-service-desk", "com.atlassian.servicedesk:simplified-facilities-service-desk", "com.atlassian.servicedesk:simplified-legal-service-desk", "com.atlassian.servicedesk:simplified-marketing-service-desk", "com.atlassian.servicedesk:simplified-finance-service-desk", "com.atlassian.servicedesk:simplified-analytics-service-desk", "com.atlassian.servicedesk:simplified-design-service-desk", "com.atlassian.servicedesk:simplified-sales-service-desk", "com.atlassian.servicedesk:simplified-halp-service-desk", "com.atlassian.servicedesk:next-gen-it-service-desk", "com.atlassian.servicedesk:next-gen-hr-service-desk", "com.atlassian.servicedesk:next-gen-legal-service-desk", "com.atlassian.servicedesk:next-gen-marketing-service-desk", "com.atlassian.servicedesk:next-gen-facilities-service-desk", "com.atlassian.servicedesk:next-gen-analytics-service-desk", "com.atlassian.servicedesk:next-gen-finance-service-desk", "com.atlassian.servicedesk:next-gen-design-service-desk", "com.atlassian.servicedesk:next-gen-sales-service-desk", "com.atlassian.servicedesk:company-managed-blank-service-project", "com.atlassian.servicedesk:company-managed-general-service-project", "com.atlassian.servicedesk:team-managed-general-service-project", "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management", "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval", "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking", "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control", "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement", "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management", "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment", "com.atlassian.jira-core-project-templates:jira-core-simplified-task-", "com.atlassian.jcs:customer-service-management"]).annotate({ "description": "A predefined configuration for a project. The type of the `projectTemplateKey` must match with the type of the `projectTypeKey`." })), "projectTypeKey": Schema.optionalKey(Schema.Literals(["software", "service_desk", "business"]).annotate({ "description": "The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which defines the application-specific feature set. If you don't specify the project template you have to specify the project type." })), "url": Schema.optionalKey(Schema.String.annotate({ "description": "A link to information about this project, such as project documentation" })), "workflowScheme": Schema.optionalKey(Schema.Number.annotate({ "description": "The ID of the workflow scheme for the project. Use the [Get all workflow schemes](#api-rest-api-3-workflowscheme-get) operation to get a list of workflow scheme IDs. If you specify the workflow scheme you cannot specify the project template key.", "format": "int64" }).check(Schema.isInt())) }).annotate({ "description": "Details about the project." })
153
153
  export type CreateResolutionDetails = { readonly "description"?: string, readonly "name": string }
154
154
  export const CreateResolutionDetails = Schema.Struct({ "description": Schema.optionalKey(Schema.String.annotate({ "description": "The description of the resolution.", "writeOnly": true }).check(Schema.isMaxLength(255))), "name": Schema.String.annotate({ "description": "The name of the resolution. Must be unique (case-insensitive).", "writeOnly": true }).check(Schema.isMaxLength(60)) }).annotate({ "description": "Details of an issue resolution." })
155
155
  export type CreateUpdateRoleRequestBean = { readonly "description"?: string, readonly "name"?: string }
@@ -1482,8 +1482,8 @@ export type StatusWorkflowUsageDTO = { readonly "statusId"?: string, readonly "w
1482
1482
  export const StatusWorkflowUsageDTO = Schema.Struct({ "statusId": Schema.optionalKey(Schema.String.annotate({ "description": "The status ID." })), "workflows": Schema.optionalKey(StatusWorkflowUsagePage) }).annotate({ "description": "Workflows using the status." })
1483
1483
  export type IssuePickerSuggestions = { readonly "sections"?: ReadonlyArray<IssuePickerSuggestionsIssueType> }
1484
1484
  export const IssuePickerSuggestions = Schema.Struct({ "sections": Schema.optionalKey(Schema.Array(IssuePickerSuggestionsIssueType).annotate({ "description": "A list of issues for an issue type suggested for use in auto-completion.", "readOnly": true })) }).annotate({ "description": "A list of issues suggested for use in auto-completion." })
1485
- export type BoardPayload = { readonly "boardFilterJQL"?: string, readonly "cardColorStrategy"?: "ISSUE_TYPE" | "REQUEST_TYPE" | "ASSIGNEE" | "PRIORITY" | "NONE" | "CUSTOM", readonly "cardLayout"?: CardLayout, readonly "cardLayouts"?: ReadonlyArray<CardLayoutField>, readonly "columns"?: ReadonlyArray<BoardColumnPayload>, readonly "features"?: ReadonlyArray<BoardFeaturePayload>, readonly "name"?: string, readonly "pcri"?: ProjectCreateResourceIdentifier, readonly "quickFilters"?: ReadonlyArray<QuickFilterPayload>, readonly "supportsSprint"?: boolean, readonly "swimlanes"?: SwimlanesPayload, readonly "workingDaysConfig"?: WorkingDaysConfig }
1486
- export const BoardPayload = Schema.Struct({ "boardFilterJQL": Schema.optionalKey(Schema.String.annotate({ "description": "Takes in a JQL string to create a new filter. If no value is provided, it'll default to a JQL filter for the project creating" })), "cardColorStrategy": Schema.optionalKey(Schema.Literals(["ISSUE_TYPE", "REQUEST_TYPE", "ASSIGNEE", "PRIORITY", "NONE", "CUSTOM"]).annotate({ "description": "Card color settings of the board" })), "cardLayout": Schema.optionalKey(CardLayout), "cardLayouts": Schema.optionalKey(Schema.Array(CardLayoutField).annotate({ "description": "Card layout settings of the board" })), "columns": Schema.optionalKey(Schema.Array(BoardColumnPayload).annotate({ "description": "The columns of the board" })), "features": Schema.optionalKey(Schema.Array(BoardFeaturePayload).annotate({ "description": "Feature settings for the board. Deprecated: use boardFeatures capability instead." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "The name of the board" })), "pcri": Schema.optionalKey(ProjectCreateResourceIdentifier), "quickFilters": Schema.optionalKey(Schema.Array(QuickFilterPayload).annotate({ "description": "The quick filters for the board." })), "supportsSprint": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether sprints are supported on the board" })), "swimlanes": Schema.optionalKey(SwimlanesPayload), "workingDaysConfig": Schema.optionalKey(WorkingDaysConfig) }).annotate({ "description": "The payload for creating a board" })
1485
+ export type BoardPayload = { readonly "boardFilterJQL"?: string, readonly "cardColorStrategy"?: "ISSUE_TYPE" | "REQUEST_TYPE" | "ASSIGNEE" | "PRIORITY" | "NONE" | "CUSTOM", readonly "cardLayout"?: CardLayout, readonly "cardLayouts"?: ReadonlyArray<CardLayoutField>, readonly "columns"?: ReadonlyArray<BoardColumnPayload>, readonly "enableCardCover"?: boolean, readonly "features"?: ReadonlyArray<BoardFeaturePayload>, readonly "name"?: string, readonly "pcri"?: ProjectCreateResourceIdentifier, readonly "quickFilters"?: ReadonlyArray<QuickFilterPayload>, readonly "supportsSprint"?: boolean, readonly "swimlanes"?: SwimlanesPayload, readonly "workingDaysConfig"?: WorkingDaysConfig }
1486
+ export const BoardPayload = Schema.Struct({ "boardFilterJQL": Schema.optionalKey(Schema.String.annotate({ "description": "Takes in a JQL string to create a new filter. If no value is provided, it'll default to a JQL filter for the project creating" })), "cardColorStrategy": Schema.optionalKey(Schema.Literals(["ISSUE_TYPE", "REQUEST_TYPE", "ASSIGNEE", "PRIORITY", "NONE", "CUSTOM"]).annotate({ "description": "Card color settings of the board" })), "cardLayout": Schema.optionalKey(CardLayout), "cardLayouts": Schema.optionalKey(Schema.Array(CardLayoutField).annotate({ "description": "Card layout settings of the board" })), "columns": Schema.optionalKey(Schema.Array(BoardColumnPayload).annotate({ "description": "The columns of the board" })), "enableCardCover": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether to enable the card cover option on this board" })), "features": Schema.optionalKey(Schema.Array(BoardFeaturePayload).annotate({ "description": "Feature settings for the board. Deprecated: use boardFeatures capability instead." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "The name of the board" })), "pcri": Schema.optionalKey(ProjectCreateResourceIdentifier), "quickFilters": Schema.optionalKey(Schema.Array(QuickFilterPayload).annotate({ "description": "The quick filters for the board." })), "supportsSprint": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether sprints are supported on the board" })), "swimlanes": Schema.optionalKey(SwimlanesPayload), "workingDaysConfig": Schema.optionalKey(WorkingDaysConfig) }).annotate({ "description": "The payload for creating a board" })
1487
1487
  export type PageBeanUiModificationDetails = { readonly "isLast"?: boolean, readonly "maxResults"?: number, readonly "nextPage"?: string, readonly "self"?: string, readonly "startAt"?: number, readonly "total"?: number, readonly "values"?: ReadonlyArray<UiModificationDetails> }
1488
1488
  export const PageBeanUiModificationDetails = Schema.Struct({ "isLast": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether this is the last page.", "readOnly": true })), "maxResults": Schema.optionalKey(Schema.Number.annotate({ "description": "The maximum number of items that could be returned.", "readOnly": true, "format": "int32" }).check(Schema.isInt())), "nextPage": Schema.optionalKey(Schema.String.annotate({ "description": "If there is another page of results, the URL of the next page.", "readOnly": true, "format": "uri" })), "self": Schema.optionalKey(Schema.String.annotate({ "description": "The URL of the page.", "readOnly": true, "format": "uri" })), "startAt": Schema.optionalKey(Schema.Number.annotate({ "description": "The index of the first item returned.", "readOnly": true, "format": "int64" }).check(Schema.isInt())), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "The number of items returned.", "readOnly": true, "format": "int64" }).check(Schema.isInt())), "values": Schema.optionalKey(Schema.Array(UiModificationDetails).annotate({ "description": "The list of items.", "readOnly": true })) }).annotate({ "description": "A page of items." })
1489
1489
  export type CustomFieldContextDefaultValueUpdate = { readonly "defaultValues"?: ReadonlyArray<CustomFieldContextDefaultValue> }
package/src/index.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
- export { JiraApiClient, type JiraApiClientShape, layer, make, type UploadAttachmentInput } from "./JiraApiClient.js"
7
+ export { JiraApiClient, type JiraApiClientContract, layer, make, type UploadAttachmentInput } from "./JiraApiClient.js"
8
8
 
9
- export { JiraApiConfig, type JiraApiConfigShape } from "./JiraApiConfig.js"
9
+ export { JiraApiConfig, type JiraApiConfigContract } from "./JiraApiConfig.js"
10
10
 
11
11
  export * as JiraApi from "./generated/JiraApi.js"
@@ -5,10 +5,10 @@ import * as Redacted from "effect/Redacted"
5
5
  import * as HttpClient from "effect/unstable/http/HttpClient"
6
6
  import type * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"
7
7
  import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"
8
- import { JiraApiClient, JiraApiConfig, type JiraApiConfigShape } from "../src/index.js"
8
+ import { JiraApiClient, JiraApiConfig, type JiraApiConfigContract } from "../src/index.js"
9
9
 
10
10
  const clientLayer = (
11
- config: JiraApiConfigShape,
11
+ config: JiraApiConfigContract,
12
12
  response: { readonly status: number; readonly body?: unknown },
13
13
  requests: Array<HttpClientRequest.HttpClientRequest>
14
14
  ) =>
@@ -31,7 +31,7 @@ const clientLayer = (
31
31
  ))
32
32
  )
33
33
 
34
- const basicConfig: JiraApiConfigShape = {
34
+ const basicConfig: JiraApiConfigContract = {
35
35
  baseUrl: "https://jira.test",
36
36
  auth: {
37
37
  type: "basic",