Skip to content

Commit

Permalink
feat: add module AppleDeveloper for related types
Browse files Browse the repository at this point in the history
  • Loading branch information
c4710n committed Oct 13, 2024
1 parent 823844f commit d528506
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 38 deletions.
38 changes: 0 additions & 38 deletions lib/apple.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,4 @@ defmodule Apple do
>
> Read more about this idea at [Ship utilities for building platform SDKs](https://github.com/cozy-elixir/proposals/blob/main/ship-utilities-for-building-platform-sdks.md).
"""

@typedoc """
The team ID, which is a 10-character string, like `"6MPDV0UYYX"`
It can be obtained from your Apple Developer account by following this path:
1. Sign into your Apple Developer account.
2. Navigate to "Membership details".
"""
@type team_id :: String.t()

@typedoc """
The private key ID, like `"2Y9R5HMY68"`.
It can be obtained from your Apple Developer account by following this path:
1. Sign into your Apple Developer account.
2. Navigate to "Certificates, IDs & Profiles".
3. Navigate to "Keys".
4. Click the plus button to add a new key.
"""
@type key_id :: String.t()

@typedoc """
The private key associated with the `key_id`.
It's in PEM format, like:
```text
-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
-----END PRIVATE KEY-----
```
"""
@type private_key :: String.t()
end
43 changes: 43 additions & 0 deletions lib/types/apple_developer.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
defmodule Apple.Types.AppleDeveloper do
@moduledoc """
Provides Apple Developer related types.
"""

@typedoc """
The team ID, which is a 10-character string, like `"6MPDV0UYYX"`
It can be obtained from your Apple Developer account by following this path:
1. Sign into your Apple Developer account.
2. Navigate to "Membership details".
"""
@type team_id :: String.t()

@typedoc """
The private key ID, like `"2Y9R5HMY68"`.
It can be obtained from your Apple Developer account by following this path:
1. Sign into your Apple Developer account.
2. Navigate to "Certificates, IDs & Profiles".
3. Navigate to "Keys".
4. Click the plus button to add a new key.
"""
@type key_id :: String.t()

@typedoc """
The private key associated with the `key_id`.
It's in PEM format, like:
```text
-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
-----END PRIVATE KEY-----
```
"""
@type private_key :: String.t()
end

0 comments on commit d528506

Please sign in to comment.